00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef ATLFAST_TRACK_H
00029 #define ATLFAST_TRACK_H
00030
00031
00032
00033 #include "CLHEP/Vector/ThreeVector.h"
00034 #include "HepMC/GenParticle.h"
00035 #include "CLHEP/Matrix/Matrix.h"
00036
00037
00038 #include "AtlfastEvent/ITrackTrajectory.h"
00039 #include "AtlfastEvent/TrackTrajectory.h"
00040 #include "AtlfastEvent/AssociationManager.h"
00041
00042
00043 #include "GaudiKernel/ContainedObject.h"
00044 #include "GaudiKernel/MsgStream.h"
00045
00046
00047
00048 static const CLID CLID_ATLFAST_Track=2306 ;
00049
00050 using ::HepMatrix;
00051
00052 namespace Atlfast {
00053
00054
00055
00056 class Track :
00057 virtual public ITrackTrajectory,
00058 virtual public ContainedObject,
00059 public AssociationManager
00060 {
00061
00062 private:
00063
00064
00065
00066
00067 TrackTrajectory m_trajectory;
00068 TrackTrajectory m_truthTrajectory;
00069
00070 const HepMC::GenParticle* m_truth ;
00071 HepMatrix m_smearMatrix;
00072
00073 public:
00074
00075
00076
00077
00078
00079 Track( const TrackTrajectory& trajectory,
00080 const HepMC::GenParticle* progenitor )
00081 : ContainedObject(),
00082 AssociationManager(),
00083 m_trajectory(trajectory),
00084 m_truthTrajectory(trajectory),
00085 m_truth( progenitor ),
00086 m_smearMatrix(HepMatrix(5,5,0.))
00087 { }
00088
00089 Track( const TrackTrajectory& truthTrajectory,
00090 const TrackTrajectory& smearTrajectory,
00091 const HepMC::GenParticle* progenitor,
00092 const HepMatrix& matrix )
00093 : ContainedObject(),
00094 AssociationManager(),
00095 m_trajectory(smearTrajectory),
00096 m_truthTrajectory(truthTrajectory),
00097 m_truth( progenitor ),
00098 m_smearMatrix(matrix)
00099 { }
00100
00101
00102 Track( const Track& src )
00103 : ContainedObject( ),
00104 AssociationManager(src),
00105 m_trajectory(src.m_trajectory),
00106 m_truthTrajectory(src.m_truthTrajectory),
00107 m_truth( src.m_truth ),
00108 m_smearMatrix(src.m_smearMatrix)
00109 { }
00110
00111
00112
00113 Track()
00114 : ContainedObject(),
00115 AssociationManager(),
00116 m_trajectory( TrackTrajectory( 0,0,Phi(),0,0,0,HepPoint3D()
00117 )
00118 ),
00119 m_truthTrajectory( TrackTrajectory( 0,0,Phi(),0,0,0,HepPoint3D()
00120 )
00121 ),
00122 m_truth(NULL),
00123 m_smearMatrix(HepMatrix(5,5,0.))
00124 { }
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140 ~Track() {}
00141
00142
00143
00144 virtual Hep3Vector threeMomentum() const {
00145 return Hep3Vector(m_trajectory); }
00146 virtual operator Hep3Vector() const { return Hep3Vector(m_trajectory); }
00147 virtual double eta() const { return m_trajectory.eta() ;}
00148 virtual double phi() const { return m_trajectory.phi() ;}
00149 virtual double pT() const { return m_trajectory.pT() ;}
00150 virtual double impactParameter() const {
00151 return m_trajectory.impactParameter() ;}
00152 virtual double zPerigee() const { return m_trajectory.zPerigee() ;}
00153 virtual double cotTheta() const { return m_trajectory.cotTheta() ;}
00154 virtual double invPtCharge() const {
00155 return m_trajectory.invPtCharge();}
00156 virtual double radius() const { return m_trajectory.radius() ;}
00157 virtual HepPoint3D startPoint() const {
00158 return m_trajectory.startPoint(); }
00159 virtual int signOfCharge() const {
00160 return m_trajectory.signOfCharge() ;}
00161 virtual TrackTrajectory trajectory() const {return m_trajectory;}
00162 virtual double curvature() const {return m_trajectory.curvature() ;}
00163
00164
00165
00166 const HepMC::GenParticle* truth() const { return m_truth ; }
00167 const HepMatrix smearMatrix() const {return m_smearMatrix;}
00168 void setMatrix(const HepMatrix& matrix) {m_smearMatrix = matrix;}
00169 const TrackTrajectory truthTrajectory() const {return m_truthTrajectory;}
00170
00171
00172 static const CLID& classID() { return CLID_ATLFAST_Track; }
00173 virtual const CLID& clID() const { return CLID_ATLFAST_Track; }
00174
00175 };
00176
00177
00178
00179
00180
00181 MsgStream& operator << ( MsgStream& s, const Track& t ) ;
00182 MsgStream& operator << ( MsgStream& s, const Track* t ) ;
00183
00184
00185 }
00186
00187
00188 #endif