00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef ATLFAST_TRACK_H
00024 #define ATLFAST_TRACK_H
00025
00026
00027
00028 #include "CLHEP/Vector/ThreeVector.h"
00029 #include "HepMC/GenParticle.h"
00030 #include "CLHEP/Matrix/SymMatrix.h"
00031
00032
00033 #ifndef ATLFAST_TRACKTRAJECTORY_H
00034 #include "AtlfastEvent/TrackTrajectory.h"
00035 #endif
00036
00037
00038
00039
00040
00041 #ifndef ATLFAST_IAODNAVIGATION_H
00042 #include "AtlfastEvent/IAODNavigation.h"
00043 #endif
00044
00045
00046
00047
00048
00049 #ifndef ATLFAST_AODNAVIGATIONIMP_H
00050 #include "AtlfastEvent/AODNavigationImp.h"
00051 #endif
00052
00053 #ifndef ATLFAST_IAOOVISITOR_H
00054 #include "AtlfastEvent/IAOOvisitor.h"
00055 #endif
00056
00057 #include <iostream>
00058
00059
00060 using ::HepSymMatrix;
00061 class MsgStream;
00062
00063 namespace Atlfast {
00064
00065
00066 class IAOOvisitor;
00067
00068 class Track :
00069 virtual public IAODNavigation, private AODNavigationImp {
00070
00071 private:
00072
00073 TrackTrajectory m_trajectory;
00074 TrackTrajectory m_truthTrajectory;
00075
00079 const HepMC::GenParticle* m_truth ;
00080 HepSymMatrix m_smearMatrix;
00081 int m_pdg_id;
00082
00083 public:
00084
00085
00086
00087
00088 Track( const TrackTrajectory& trajectory,
00089 const HepMC::GenParticle* progenitor );
00090
00091 Track( const TrackTrajectory& truthTrajectory,
00092 const TrackTrajectory& smearTrajectory,
00093 const HepMC::GenParticle* progenitor,
00094 const HepSymMatrix& matrix );
00095
00096 Track( const Track& other );
00097 Track& operator=( const Track& other );
00098
00101 Track();
00102
00103 virtual ~Track();
00104
00105
00107 virtual TrackTrajectory trajectory() const;
00108 virtual int pdg_id() const;
00109 const HepMC::GenParticle* truth() const;
00110 const HepSymMatrix smearMatrix() const;
00111 void setMatrix(const HepSymMatrix& matrix) ;
00112 const TrackTrajectory truthTrajectory() const;
00113
00115 virtual void accept(IAOOvisitor*) const;
00116
00118
00119 virtual HepLorentzVector momentum() const;
00120 virtual double eta() const;
00121 virtual double phi() const;
00122 virtual double pT() const;
00123 virtual double eT() const;
00124 virtual double mT() const;
00125 virtual IKinematic* clone() const;
00127 virtual void print(const std::string& coor, std::string t="" ) const;
00128
00129 };
00131
00133
00134 inline
00135 Track::Track( const TrackTrajectory& trajectory,
00136 const HepMC::GenParticle* progenitor ) :
00137 AODNavigationImp(),
00138 m_trajectory(trajectory),
00139 m_truthTrajectory(trajectory),
00140 m_truth( progenitor ),
00141 m_smearMatrix(HepSymMatrix(5,0)),
00142 m_pdg_id(progenitor->pdg_id())
00143 {
00144 }
00145
00147
00148 inline
00149 Track::Track( const TrackTrajectory& truthTrajectory,
00150 const TrackTrajectory& smearTrajectory,
00151 const HepMC::GenParticle* progenitor,
00152 const HepSymMatrix& matrix ):
00153 AODNavigationImp(),
00154 m_trajectory(smearTrajectory),
00155 m_truthTrajectory(truthTrajectory),
00156 m_truth( progenitor ),
00157 m_smearMatrix(matrix),
00158 m_pdg_id(progenitor->pdg_id())
00159 { }
00160
00162
00163 inline
00164 Track::Track( const Track& other ):
00165 Atlfast::IAOO(other),
00166 INavigable(other),
00167 I4Momentum(other),
00168 INavigable4Momentum(other),
00169 Atlfast::IKinematic(other),
00170 Atlfast::IAODNavigation(other),
00171 AODNavigationImp(other),
00172 m_trajectory(other.m_trajectory),
00173 m_truthTrajectory(other.m_truthTrajectory),
00174 m_truth( other.m_truth ),
00175 m_smearMatrix(other.m_smearMatrix),
00176 m_pdg_id(other.m_pdg_id)
00177 { }
00178
00180
00181 inline
00182 Track& Track::operator=( const Track& other ){
00183 if(this == &other) return *this;
00184 AODNavigationImp::operator=(other);
00185 m_trajectory = other.m_trajectory;
00186 m_truthTrajectory = other.m_truthTrajectory;
00187 m_truth = other.m_truth;
00188 m_smearMatrix = other.m_smearMatrix;
00189 m_pdg_id = other.m_pdg_id;
00190 return *this;
00191 }
00192
00194
00195 inline
00196
00197
00198 Track::Track():
00199 AODNavigationImp(),
00200 m_truth(0){}
00201
00203
00204 inline
00205 Track::~Track() {}
00206
00207
00208
00209
00210 MsgStream& operator << ( MsgStream& s, const Track& t ) ;
00211 MsgStream& operator << ( MsgStream& s, const Track* t ) ;
00212
00213
00214 }
00215
00216
00217 #endif
00218
00219