00001
00002
00003 #ifndef XAODTRACKING_VERSIONS_TRACKPARTICLE_V1_H
00004 #define XAODTRACKING_VERSIONS_TRACKPARTICLE_V1_H
00005
00006
00007 #include <bitset>
00008 extern "C" {
00009 # include <stdint.h>
00010 }
00011
00012
00013 #include "AthLinks/ElementLink.h"
00014 #include "AthContainers/DataVector.h"
00015
00016
00017 #include "xAODBase/IParticle.h"
00018 #include "xAODTracking/TrackingPrimitives.h"
00019 #include "xAODTracking/VertexContainerFwd.h"
00020
00021 #ifndef XAOD_STANDALONE
00022 #ifndef XAOD_MANACORE
00023
00024 #include "TrkParameters/TrackParameters.h"
00025 #include "TrkTrack/TrackCollection.h"
00026 #endif // not XAOD_MANACORE
00027 #endif // not XAOD_STANDALONE
00028
00029 namespace xAOD {
00030
00036 class TrackParticle_v1 : public IParticle {
00037
00038 public:
00039
00041 TrackParticle_v1();
00043 ~TrackParticle_v1();
00045 TrackParticle_v1(const TrackParticle_v1& o );
00047 TrackParticle_v1& operator=(const TrackParticle_v1& tp );
00048
00052 virtual double pt() const;
00054 virtual double eta() const;
00056 virtual double phi() const;
00058 virtual double m() const;
00060 virtual double e() const;
00062 virtual double rapidity() const;
00063
00065 typedef IParticle::FourMom_t FourMom_t;
00066
00068 virtual const FourMom_t& p4() const;
00069
00071 virtual Type::ObjectType type() const;
00073
00084 float charge() const;
00086 float d0() const;
00088 float z0() const;
00090 float phi0() const;
00092 float theta() const;
00094 float qOverP() const;
00098 const DefiningParameters_t definingParameters() const;
00100 const ParametersCovMatrix_t definingParametersCovMatrix() const;
00102 const std::vector<float>& definingParametersCovMatrixVec() const;
00104 void setDefiningParameters(float d0, float z0, float phi0, float theta, float qOverP);
00106 void setDefiningParametersCovMatrix(const ParametersCovMatrix_t& cov);
00108 void setDefiningParametersCovMatrixVec(const std::vector<float>& cov);
00110 float vx() const;
00112 float vy() const;
00114 float vz() const;
00116 void setParametersOrigin(float x, float y, float z);
00117
00118 #if ( ! defined(XAOD_STANDALONE) ) && ( ! defined(XAOD_MANACORE) )
00124 const Trk::Perigee& perigeeParameters() const;
00125 #endif // not XAOD_STANDALONE and not XAOD_MANACORE
00127
00143 size_t numberOfParameters() const;
00145 const CurvilinearParameters_t trackParameters(unsigned int index) const;
00147 float parameterX(unsigned int index) const;
00149 float parameterY(unsigned int index) const;
00151 float parameterZ(unsigned int index) const;
00153 float parameterPX(unsigned int index) const;
00155 float parameterPY(unsigned int index) const;
00157 float parameterPZ(unsigned int index) const;
00160 void setTrackParameters(std::vector<std::vector<float> >& parameters);
00163 ParametersCovMatrix_t trackParameterCovarianceMatrix(unsigned int index) const;
00167 void setTrackParameterCovarianceMatrix(unsigned int index, std::vector<float>& cov);
00169 xAOD::ParameterPosition parameterPosition(unsigned int index) const;
00174 bool indexOfParameterAtPosition(unsigned int& index, ParameterPosition position) const;
00176 void setParameterPosition(unsigned int index, ParameterPosition pos);
00177 #if ( ! defined(XAOD_STANDALONE) ) && ( ! defined(XAOD_MANACORE) )
00180 const Trk::CurvilinearParameters curvilinearParameters(unsigned int index) const;
00181 #endif // not XAOD_STANDALONE and not XAOD_MANACORE
00182
00184 float radiusOfFirstHit() const;
00186 void setRadiusOfFirstHit(float radius);
00187
00189 uint64_t identifierOfFirstHit() const;
00191 void setIdentifierOfFirstHit( uint64_t id);
00192
00193 float beamlineTiltX() const;
00194 void setBeamlineTiltX(float tiltX);
00195
00196 float beamlineTiltY() const;
00197 void setBeamlineTiltY(float tiltY);
00198
00199 uint32_t hitPattern() const;
00200 void setHitPattern(uint32_t hitpattern);
00201
00202 uint8_t numberOfUsedHitsdEdx() const;
00203 void setNumberOfUsedHitsdEdx(uint8_t numhits);
00204
00205 uint8_t numberOfIBLOverflowsdEdx() const;
00206 void setNumberOfIBLOverflowsdEdx(uint8_t numoverflows);
00207
00209
00214 float chiSquared() const;
00216 float numberDoF() const;
00218 void setFitQuality(float chiSquared, float numberDoF);
00220
00227 void setTrackProperties (const TrackProperties properties) ;
00234 void setPatternRecognitionInfo(const std::bitset<xAOD::NumberOfTrackRecoInfo>& patternReco) ;
00241 void setPatternRecognitionInfo(uint64_t patternReco) ;
00243 void setTrackFitter(const TrackFitter fitter) ;
00245 void setParticleHypothesis(const ParticleHypothesis hypo);
00255 TrackProperties trackProperties() const;
00257 std::bitset<NumberOfTrackRecoInfo> patternRecoInfo() const;
00259 ParticleHypothesis particleHypothesis() const;
00261 TrackFitter trackFitter() const;
00263
00264
00282 bool summaryValue(uint8_t& value, const SummaryType &information) const;
00284 bool summaryValue(float& value, const SummaryType &information) const;
00286 void setSummaryValue(uint8_t& value, const SummaryType &information);
00288 void setSummaryValue(float& value, const SummaryType &information);
00290
00293 #if ( ! defined(XAOD_STANDALONE) ) && ( ! defined(XAOD_MANACORE) )
00296 const ElementLink< TrackCollection >& trackLink() const;
00299 void setTrackLink(const ElementLink< TrackCollection >& track);
00302 const Trk::Track* track() const;
00303 #endif // not XAOD_STANDALONE and not XAOD_MANACORE
00304
00306 const ElementLink< VertexContainer >& vertexLink() const;
00308 void setVertexLink(const ElementLink< VertexContainer >& vertex);
00310 const Vertex* vertex() const;
00312 private:
00314 mutable FourMom_t m_p4;
00316 mutable bool m_p4Cached;
00317
00320 mutable bool m_perigeeCached;
00321
00322 #if ( ! defined(XAOD_STANDALONE) ) && ( ! defined(XAOD_MANACORE) ) && ( ! defined(__GCCXML__) ) && !defined(__CLING__)
00325 mutable Trk::Perigee* m_perigeeParameters;
00326 #endif // not XAOD_STANDALONE and not XAOD_MANACORE and not __GCCXML__
00327
00328 };
00329
00330 }
00331
00332
00333 #endif // XAODTRACKING_VERSIONS_TrackParticle_v1_H