X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TRD%2FAliTRDmcTrack.cxx;h=19d6a16842fa914156827d3b2aa6e4af721fd1fe;hb=c2798013822493b95950e7967a8e7a7bb59996a5;hp=bfec860f34254aa0f4e3916fcea59c7cdb6f30dd;hpb=517ac658cc8a31b805dd33219d2f103e26133e77;p=u%2Fmrichter%2FAliRoot.git diff --git a/TRD/AliTRDmcTrack.cxx b/TRD/AliTRDmcTrack.cxx index bfec860f342..19d6a16842f 100644 --- a/TRD/AliTRDmcTrack.cxx +++ b/TRD/AliTRDmcTrack.cxx @@ -13,130 +13,160 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ +/* $Id$ */ + +//////////////////////////////////////////////////////////////////////////// +// // +// TRD MC track // +// Used for efficiency estimates and matching of reconstructed tracks // +// to MC particles // +// // +//////////////////////////////////////////////////////////////////////////// + #include "AliTRDmcTrack.h" #include "AliTRDgeometry.h" - ClassImp(AliTRDmcTrack) //_____________________________________________________________________________ AliTRDmcTrack::AliTRDmcTrack() + :TObject() + ,fLab(-1) + ,fSeedLab(-1) + ,fPrimary(kFALSE) + ,fMass(0) + ,fCharge(0) + ,fPDG(0) + ,fN(0) { - // // Default constructor // - fLab = -1; - fPrimary = kFALSE; - fMass = 0; - fCharge = 0; - fN = 0; - - for(Int_t ltb=0; ltb= 0), or exit (opt < 0) of TRD. // - Int_t i; + Int_t i = 0; + + if (opt >= 0) { - if(opt >= 0) { - for(i = 0; i < AliTRDgeometry::Nplan(); i++) { - if( Pin[i][0] * Pin[i][0] - + Pin[i][1] * Pin[i][1] - + Pin[i][2] * Pin[i][2] > 0.0005) break; + for (i = 0; i < AliTRDgeometry::Nplan(); i++) { + if ((Pin[i][0]*Pin[i][0] + + Pin[i][1]*Pin[i][1] + + Pin[i][2]*Pin[i][2]) > 0.0005) { + break; + } } - px = Pin[i][0]; py = Pin[i][1]; pz = Pin[i][2]; - x = XYZin[i][0]; y = XYZin[i][1]; z = XYZin[i][2]; + + px = Pin[i][0]; + py = Pin[i][1]; + pz = Pin[i][2]; + x = XYZin[i][0]; + y = XYZin[i][1]; + z = XYZin[i][2]; + } else { - for(i = AliTRDgeometry::Nplan() - 1; i >= 0; i--) { - if( Pout[i][0] * Pout[i][0] - + Pout[i][1] * Pout[i][1] - + Pout[i][2] * Pout[i][2] > 0.0005) break; + + for (i = AliTRDgeometry::Nplan() - 1; i >= 0; i--) { + if ((Pout[i][0]*Pout[i][0] + + Pout[i][1]*Pout[i][1] + + Pout[i][2]*Pout[i][2]) > 0.0005) { + break; + } } - px = Pout[i][0]; py = Pout[i][1]; pz = Pout[i][2]; - x = XYZout[i][0]; y = XYZout[i][1]; z = XYZout[i][2]; + + px = Pout[i][0]; + py = Pout[i][1]; + pz = Pout[i][2]; + x = XYZout[i][0]; + y = XYZout[i][1]; + z = XYZout[i][2]; + } + return; } //_____________________________________________________________________________ -void AliTRDmcTrack::GetPlanePxPyPz(Double_t& px, Double_t& py, Double_t& pz, - Int_t plane, Int_t opt) const +void AliTRDmcTrack::GetPlanePxPyPz(Double_t& px, Double_t& py, Double_t& pz + , Int_t plane, Int_t opt) const { // // Returns momentum components at the entrance (opt >= 0), or // exit (opt < 0) of TRD plane . // - if(opt >= 0) { - px = Pin[plane][0]; py = Pin[plane][1]; pz = Pin[plane][2]; + if (opt >= 0) { + px = Pin[plane][0]; + py = Pin[plane][1]; + pz = Pin[plane][2]; } else { - px = Pout[plane][0]; py = Pout[plane][1]; pz = Pout[plane][2]; + px = Pout[plane][0]; + py = Pout[plane][1]; + pz = Pout[plane][2]; } - return; -} - - + return; +}