24 #include <TObjArray.h> 51 fTrackReferences(rarray),
121 const Float_t kRMin = 90;
122 const Float_t kRMax = 245;
124 const Float_t kMinPt= ptmin;
132 for (Int_t i = 0; i < 21; i++) cv[i]=0;
138 Float_t direction = 0;
140 for (Int_t iref = 1; iref < nrefs; iref++){
145 direction = ((ref0->
X() * ref0->
Px() + ref0->
Y() * ref0->
Py()) > 0)? 1. : -1.;
149 Float_t newdirection = ((ref->
X() * ref->
Px() + ref->
Y() * ref->
Py()) > 0)? 1. : -1.;
150 if (newdirection*direction<0) {
152 direction = newdirection;
155 if (counter>0)
continue;
156 if (ref0->
Pt() < kMinPt)
break;
157 Float_t radius0 = TMath::Max(TMath::Min(ref0->
R(),kRMax),kRMin);;
158 Float_t radius1 = TMath::Max(TMath::Min(ref->
R(),kRMax),kRMin);
159 Double_t xyz[3] = {ref0->
X(), ref0->
Y(), ref0->
Z()};
160 Double_t pxyz[3]= {ref0->
Px(), ref0->
Py(), ref0->
Pz()};
162 param.
Set(xyz,pxyz,cv,TMath::Nint(
fParticle->GetPDG()->Charge()/3.));
164 for (Float_t radius = radius0; radius < radius1; radius+=1){
167 if (TMath::Abs(xyz[2]) > zMax)
continue;
168 Float_t gradius = TMath::Sqrt(xyz[1] * xyz[1] + xyz[0] * xyz[0]);
169 if (gradius > kRMax)
continue;
170 alpha = TMath::ATan2(xyz[1],xyz[0]);
171 if (alpha<0) alpha += TMath::TwoPi();
173 Int_t sector = Int_t(9 * alpha / TMath::Pi());
174 Float_t lalpha = alpha - ((sector + 0.5) * TMath::Pi() / 9.);
175 Float_t dedge = (TMath::Tan(TMath::Pi() / 18.) - TMath::Abs(TMath::Tan(lalpha))) * gradius;
176 if (dedge>deadWidth) length++;
virtual Float_t R() const
AliMCParticle & operator=(const AliMCParticle &mcPart)
void Set(T x, T alpha, const T param[5], const T covar[15])
AliVParticle & operator=(const AliVParticle &vPart)
Float_t GetTPCTrackLength(Float_t bz, Float_t ptmin, Int_t &counter, Float_t deadWidth, Float_t zMax=230.)
virtual Float_t Px() const
virtual Float_t Pz() const
virtual Float_t Pt() const
virtual Float_t Py() const
virtual Float_t Y() const
TObjArray * fTrackReferences
virtual Float_t Z() const
virtual Float_t X() const
Bool_t GetXYZAt(Double_t x, Double_t b, Double_t r[3]) const
virtual Int_t DetectorId() const