Float_t rmin = geo->Rmin();
Float_t rmax = geo->Rmax();
- Float_t length = geo->GetChamberLengthI(0);
+ Float_t length = geo->GetChamberLength(0,2);
Float_t width = geo->GetChamberWidth(0);
Int_t ncol = geo->GetColMax(0);
Int_t nrow = geo->GetRowMax(0,2,13);
Int_t nTotE = 0;
Int_t nTotP = 0;
- // Get the number of hits in the TRD created by this particle
- Int_t nHit = trd->Hits()->GetEntriesFast();
-
// Loop through the TRD hits
- for (Int_t iHit = 0; iHit < nHit; iHit++) {
+ Int_t iHit = 0;
+ AliTRDhit *hit = (AliTRDhit *) trd->FirstHit(-1);
+ while (hit) {
countHits++;
-
- AliTRDhit *hit = (AliTRDhit *) trd->Hits()->UncheckedAt(iHit);
+ iHit++;
Float_t x = hit->X();
Float_t y = hit->Y();
Int_t det = hit->GetDetector();
Int_t plane = geo->GetPlane(det);
- if (hit->FromDrift()) {
+ if (q > 0) {
hQdedx->Fill(q);
hZY->Fill(z,y);
if (plane == 0) {
hXZ->Fill(x,z);
}
}
- else if (hit->FromTRphoton()) {
+ else if (q < 0) {
hQtr->Fill(TMath::Abs(q));
}
TParticle *part = gAlice->Particle(track);
- if ((plane == 0) && (hit->FromDrift())) {
+ if ((plane == 0) && (q > 0)) {
// 3 GeV electrons
if ((part->GetPdgCode() == 11) &&
}
+ hit = (AliTRDhit *) trd->NextHit();
+
}
- if (nPrimE > 0) hNprimE->Fill(((Double_t) nPrimE)/3.);
- if (nPrimP > 0) hNprimP->Fill(((Double_t) nPrimP)/3.);
- if (nTotE > 0) hNtotE->Fill(((Double_t) nTotE)/3.);
- if (nTotP > 0) hNtotP->Fill(((Double_t) nTotP)/3.);
+ if (nPrimE > 0) hNprimE->Fill(((Double_t) nPrimE)/3.7);
+ if (nPrimP > 0) hNprimP->Fill(((Double_t) nPrimP)/3.7);
+ if (nTotE > 0) hNtotE->Fill(((Double_t) nTotE)/3.7);
+ if (nTotP > 0) hNtotP->Fill(((Double_t) nTotP)/3.7);
}