Go to the documentation of this file.00001 #ifndef FORIA_TRACK_HH
00002 #define FORIA_TRACK_HH
00003
00004 #include "ForIA/IFourMomentum.hh"
00005 #include "ForIA/Track.fh"
00006 #include "ForIA/Vertex.fh"
00007 #include "ForIA/Event.hh"
00008
00009 #include "boost/smart_ptr.hpp"
00010
00011 #include <vector>
00012 #include <set>
00013 #include <iostream>
00014
00015 namespace ForIA{
00016
00017 using std::vector;
00018 using boost::weak_ptr;
00019
00021 class Track: public IFourMomentum{
00022
00023 public:
00034 enum Origin {ORIGIN, BEAM_SPOT, PRIMARY_VERTEX, TRACK_VERTEX};
00035
00038 enum TrackAuthor {INSIDE_OUT=0, BACK_TRACKING=4, TRT_STANDALONE=20, LOW_PT=36, VERY_LOW_PT=38, BAD_AUTHOR=9999};
00039
00041 Track();
00042
00044 double eta()const;
00046 double theta()const;
00049 double theta(Origin org) const;
00051 double phi()const;
00054 double phi(Origin org) const;
00056 double ET()const;
00058 double PT()const;
00060 double E()const;
00061
00063 double px()const;
00065 double py()const;
00067 double pz()const;
00068
00070 double px(Origin org)const;
00072 double py(Origin org)const;
00074 double pz(Origin org)const;
00075
00076
00078 double d0(Origin org)const;
00080 double z0(Origin org)const;
00082 double chi2()const;
00084 int DOF()const;
00086 double chi2_DOF()const;
00088 double fitProbability()const;
00090 int nPix()const;
00092 int nSCT()const;
00094 int nTRT()const;
00096 bool expectBLayer()const;
00098 int nBLayer() const;
00100 TrackAuthor author()const;
00102 bool isMC()const;
00107 int id()const;
00108
00110 VertexVector associatedVertices()const;
00111
00112
00113 private:
00114
00115 friend std::ostream &operator << (std::ostream &out, const Track &trk);
00116
00117 friend class DataConverter;
00118 friend void Event::matchVerticesToTracks()const;
00119
00120 double m_eta;
00121 double m_theta;
00122 double m_phi;
00123
00124 double m_theta_wrt_bs;
00125 double m_theta_wrt_pvtx;
00126 double m_theta_wrt_tv;
00127
00128 double m_phi_wrt_bs;
00129 double m_phi_wrt_pvtx;
00130 double m_phi_wrt_tv;
00131
00132 double m_PT;
00133
00134 double m_d0;
00135 double m_z0;
00136
00137 double m_d0_wrt_bs;
00138 double m_z0_wrt_bs;
00139 double m_d0_wrt_pvtx;
00140 double m_z0_wrt_pvtx;
00141 double m_d0_wrt_tv;
00142 double m_z0_wrt_tv;
00143
00144 double m_chi2;
00145 int m_dof;
00146
00147 mutable double m_chi2_dof;
00148 mutable bool m_gotChi2_dof;
00149
00150 mutable double m_probability;
00151 mutable double m_gotProbability;
00152
00153 int m_nPix;
00154 int m_nSCT;
00155 int m_nTRT;
00156 int m_nBLayer;
00157
00158 bool m_expectBLayer;
00159
00160 TrackAuthor m_author;
00161
00162 mutable double m_e;
00163 mutable bool m_doE;
00164
00165 unsigned int m_id;
00166
00167 bool m_isMC;
00168
00169 bool m_haveThetaOrigins;
00170
00171 bool m_haveTV;
00172
00174 mutable vector<weak_ptr<Vertex const> > m_vertices;
00175 mutable bool m_haveMatchedVertices;
00176
00177 const Event *m_event;
00178
00179 };
00180
00181 typedef vector<Track::TrackAuthor> TrackAuthorVector;
00182 typedef std::set<Track::TrackAuthor> TrackAuthorSet;
00183
00184
00185 }
00186 #endif