NtupleReader/NtupleReader/MyTrack.ixx

00001 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00002 // 22.10.2006, AUTHOR: OLIVER KORTNER
00003 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00004 
00005 //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
00006 //:: IMPLEMENTATION OF INLINE METHODS DEFINED IN THE CLASS MyTrack ::
00007 //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
00008 
00009 //*****************************************************************************
00010 
00011 //:::::::::::::::::
00012 //:: METHOD init ::
00013 //:::::::::::::::::
00014 
00015 inline void MyTrack::init(const int & SCThit,
00016                           const int & Phit,
00017                           const int & BLayerhit,
00018                           const int & TRThit,
00019                           const int & MDThit,
00020                           const int & CSChit_eta,
00021                           const int & TGChit_eta,
00022                           const int & RPChit_eta,
00023                           const int & CSChit_phi,
00024                           const int & TGChit_phi,
00025                           const int & RPChit_phi,
00026                           const double & d0,
00027                           const double & z0,
00028                           const double & chi2,
00029                           const double & nDoF,
00030                           const std::vector<double> * trackIsolationEnergy) {
00031 
00032         m_SCThit = SCThit;
00033         m_Phit = Phit;
00034         m_BLayerhit = BLayerhit;
00035         m_TRThit = TRThit;
00036         m_CSChit_eta = CSChit_eta;
00037         m_TGChit_eta = TGChit_eta;
00038         m_RPChit_eta = RPChit_eta;
00039         m_CSChit_phi = CSChit_phi;
00040         m_TGChit_phi = TGChit_phi;
00041         m_RPChit_phi = RPChit_phi;
00042         m_d0 = d0;
00043         m_z0 = z0;
00044         m_chi2 = chi2;
00045         m_nDoF = nDoF;
00046         
00047         if (trackIsolationEnergy!=0) {
00048             if (trackIsolationEnergy->size()!=5) {
00049                 std::cerr << std::endl
00050                           << "Class MyTrack, method init: ERROR!\n"
00051                           << "Wrong dimension of trackIsolationEnergy!\n"
00052                           << "Size should be 5!\n"
00053                           << std::endl;
00054                 exit(1);
00055             }
00056             for (unsigned int k=0; k<5; k++) {
00057                 m_trackIsolationEnergy[k] = (*trackIsolationEnergy)[k];
00058             }
00059         } else {
00060             for (unsigned int k=0; k<5; k++) {
00061                 m_trackIsolationEnergy[k] = 0;
00062             }
00063         }
00064         return;
00065 
00066 }
00067 
00068 //*****************************************************************************
00069 
00070 //:::::::::::::::::::
00071 //:: METHOD SCThit ::
00072 //:::::::::::::::::::
00073 
00074 inline int MyTrack::SCThit(void) const {
00075 
00076     return m_SCThit;
00077 
00078 }
00079 
00080 //*****************************************************************************
00081 
00082 //:::::::::::::::::
00083 //:: METHOD Phit ::
00084 //:::::::::::::::::
00085 
00086 inline int MyTrack::Phit(void) const {
00087 
00088     return m_Phit;
00089 
00090 }
00091 
00092 //*****************************************************************************
00093 
00094 //::::::::::::::::::::::
00095 //:: METHOD BLayerhit ::
00096 //::::::::::::::::::::::
00097 
00098 inline int MyTrack::BLayerhit(void) const {
00099 
00100     return m_BLayerhit;
00101 
00102 }
00103 //*****************************************************************************
00104 
00105 //:::::::::::::::::::
00106 //:: METHOD TRThit ::
00107 //:::::::::::::::::::
00108 
00109 inline int MyTrack::TRThit(void) const {
00110 
00111     return m_TRThit;
00112 
00113 }
00114 //*****************************************************************************
00115 
00116 //:::::::::::::::::::
00117 //:: METHOD MDThit ::
00118 //:::::::::::::::::::
00119 
00120 inline int MyTrack::MDThit(void) const {
00121 
00122     return m_MDThit;
00123 
00124 }
00125 //*****************************************************************************
00126 
00127 //:::::::::::::::::::::::
00128 //:: METHOD CSChit_eta ::
00129 //:::::::::::::::::::::::
00130 
00131 inline int MyTrack::CSChit_eta(void) const {
00132 
00133     return m_CSChit_eta;
00134 
00135 }
00136 //*****************************************************************************
00137 
00138 //:::::::::::::::::::::::
00139 //:: METHOD TGChit_eta ::
00140 //:::::::::::::::::::::::
00141 
00142 inline int MyTrack::TGChit_eta(void) const {
00143 
00144     return m_TGChit_eta;
00145 
00146 }
00147 //*****************************************************************************
00148 
00149 //:::::::::::::::::::::::
00150 //:: METHOD CSChit_phi ::
00151 //:::::::::::::::::::::::
00152 
00153 inline int MyTrack::CSChit_phi(void) const {
00154 
00155     return m_CSChit_phi;
00156 
00157 }
00158 //*****************************************************************************
00159 
00160 //:::::::::::::::::::::::
00161 //:: METHOD TGChit_phi ::
00162 //:::::::::::::::::::::::
00163 
00164 inline int MyTrack::TGChit_phi(void) const {
00165 
00166     return m_TGChit_phi;
00167 
00168 }
00169 //*****************************************************************************
00170 
00171 //:::::::::::::::::::::::
00172 //:: METHOD RPChit_phi ::
00173 //:::::::::::::::::::::::
00174 
00175 inline int MyTrack::RPChit_phi(void) const {
00176 
00177     return m_RPChit_phi;
00178 
00179 }
00180 //*****************************************************************************
00181 
00182 //:::::::::::::::
00183 //:: METHOD d0 ::
00184 //:::::::::::::::
00185 
00186 inline double MyTrack::d0(void) const {
00187 
00188     return m_d0;
00189 
00190 }
00191 //*****************************************************************************
00192 
00193 //:::::::::::::::
00194 //:: METHOD z0 ::
00195 //:::::::::::::::
00196 
00197 inline double MyTrack::z0(void) const {
00198 
00199     return m_z0;
00200 
00201 }
00202 //*****************************************************************************
00203 
00204 //:::::::::::::::::
00205 //:: METHOD chi2 ::
00206 //:::::::::::::::::
00207 
00208 inline double MyTrack::chi2(void) const {
00209 
00210     return m_chi2;
00211 
00212 }
00213 //*****************************************************************************
00214 
00215 //:::::::::::::::::
00216 //:: METHOD nDoF ::
00217 //:::::::::::::::::
00218 
00219 inline double MyTrack::nDoF(void) const {
00220 
00221     return m_nDoF;
00222 
00223 }
00224 //*****************************************************************************
00225 
00226 //:::::::::::::::::::::::::::::::::
00227 //:: METHOD trackIsolationEnergy ::
00228 //:::::::::::::::::::::::::::::::::
00229 
00230 inline double MyTrack::trackIsolationEnergy(const int & delta_R_index) const {
00231 
00233 // CHECK THE INDEX //
00235 
00236     if (delta_R_index<0 || delta_R_index>4) {
00237         std::cerr << "\n"
00238                   << "Class MyTrack, method trackIsolationEnergy: ERROR!\n"
00239                   << "Wrong delta_R_index " << delta_R_index
00240                   << ", must be >=0 and <=4.\n";
00241         exit(1);
00242     }
00243 
00245 // RETURN THE REQUESTED TRANSVERSE ENERGY //
00247     
00248     return m_trackIsolationEnergy[delta_R_index];
00249 
00250 }

Generated on Tue Oct 21 11:50:45 2008 for NtupleAnalysis by  doxygen 1.5.1