Update of input distributions.
[u/mrichter/AliRoot.git] / TOF / tofanal.C
index ac351d8c96f85281225f11c38aee87e223ffab8a..07873e2546f75b3d580b0d1b40eff69ed53f2d82 100644 (file)
@@ -47,7 +47,6 @@ void tofanal (Int_t evNumber=0)
 
 // Get pointers to Alice detectors and Hits containers
    AliDetector *TOF  = gAlice->GetDetector("TOF");
-   TClonesArray *Particles = gAlice->Particles();
 
    Int_t ntracks    = gAlice->TreeH()->GetEntries();
 
@@ -59,10 +58,10 @@ void tofanal (Int_t evNumber=0)
      if(TOF) {
      // ======>Histogram TOF
        for(AliTOFhit* tofHit=(AliTOFhit*)TOF->FirstHit(track); tofHit; tofHit=(AliTOFhit*)TOF->NextHit()) {
-         tof = tofHit->fTof;
+         tof = tofHit->GetTof();
          hTOF->Fill(tof);
-         ipart    = tofHit->fTrack;
-         particle = (TParticle*)Particles->UncheckedAt(ipart);
+         ipart    = tofHit->GetTrack();
+         particle = (TParticle*)gAlice->Particle(ipart);
          if (particle->GetFirstMother() < 0) hTOFprim->Fill(tof);
        }
      }        
@@ -82,4 +81,6 @@ void tofanal (Int_t evNumber=0)
    hTOFprim->Draw();
    //   hTOFprim->Draw("same");
    c1->Print("tofanal.ps");
+   delete c1;
+   c1 = 0;
 }