]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDpid.cxx
Pyhtia comparison extended
[u/mrichter/AliRoot.git] / TRD / AliTRDpid.cxx
index 6f06f7138ac4f31cef69247b7e04141691571a63..d42e656693f0ca302e5f98038b663b899b97cc20 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.3  2001/11/14 10:50:46  cblume
-Changes in digits IO. Add merging of summable digits
-
-Revision 1.2  2001/11/06 17:19:41  cblume
-Add detailed geometry and simple simulator
-
-Revision 1.1  2001/05/07 08:08:05  cblume
-Update of TRD code
-
-*/
+/* $Id$ */
 
 ///////////////////////////////////////////////////////////////////////////////
 //                                                                           //
@@ -53,6 +42,7 @@ Update of TRD code
 #include "AliTRDtrack.h"
 #include "AliTRDtracker.h"
 #include "AliTRDgeometry.h"
+#include "AliMC.h"
 
 ClassImp(AliTRDpid)
 
@@ -98,7 +88,7 @@ AliTRDpid::AliTRDpid(const char* name, const char* title):TNamed(name,title)
 }
 
 //_____________________________________________________________________________
-AliTRDpid::AliTRDpid(const AliTRDpid &p)
+AliTRDpid::AliTRDpid(const AliTRDpid &p):TNamed(p)
 {
   //
   // AliTRDpid copy constructor
@@ -361,7 +351,7 @@ Bool_t AliTRDpid::ReadCluster(const Char_t *name)
   printf("AliTRDpid::ReadCluster -- ");
   printf("Open file %s\n",name);
 
-  AliTRDtracker *tracker = new AliTRDtracker("dummy","dummy");
+  AliTRDtracker *tracker = new AliTRDtracker();
   tracker->ReadClusters(fClusterArray,name);
 
   if (!fClusterArray) {
@@ -458,7 +448,7 @@ Int_t AliTRDpid::MCpid(const AliTRDtrack *t)
   }
   
   // Loop through all clusters associated to this track
-  Int_t nCluster = t->GetNclusters();
+  Int_t nCluster = t->GetNumberOfClusters();
   for (Int_t iCluster = 0; iCluster < nCluster; iCluster++) {
 
     // Get a cluster
@@ -468,8 +458,8 @@ Int_t AliTRDpid::MCpid(const AliTRDtrack *t)
     } 
 
     // Get the first two MC track indices
-    Int_t track0 = cluster->GetTrackIndex(0);
-    Int_t track1 = cluster->GetTrackIndex(1);
+    Int_t track0 = cluster->GetLabel(0);
+    Int_t track1 = cluster->GetLabel(1);
 
     // Check on the track index to find the right primaries
     if ((track0 >  fPIDindexMin) && 
@@ -482,7 +472,7 @@ Int_t AliTRDpid::MCpid(const AliTRDtrack *t)
       }
       if (accept) {
 
-        particle = gAlice->Particle(track0);
+        particle = gAlice->GetMCApp()->Particle(track0);
         if (particle->GetFirstMother() == -1) {
           switch (TMath::Abs(particle->GetPdgCode())) {
           case kPdgEl:
@@ -574,7 +564,7 @@ Int_t AliTRDpid::MCpid(const AliTRDtrack *t, Int_t *pdg
   }
 
   // Loop through all clusters associated to this track
-  Int_t nCluster = t->GetNclusters();
+  Int_t nCluster = t->GetNumberOfClusters();
   for (iCluster = 0; iCluster < nCluster; iCluster++) {
 
     // Get a cluster
@@ -586,9 +576,9 @@ Int_t AliTRDpid::MCpid(const AliTRDtrack *t, Int_t *pdg
     // Get the MC track indices
     for (iTrack = 0; iTrack < kNtrack; iTrack++) {
 
-      Int_t trackIndex = cluster->GetTrackIndex(iTrack);
+      Int_t trackIndex = cluster->GetLabel(iTrack);
       if (trackIndex >= 0) {
-        particle = gAlice->Particle(trackIndex);
+        particle = gAlice->GetMCApp()->Particle(trackIndex);
         Int_t  pdgCode = particle->GetPdgCode(); 
         Bool_t newPart = kTRUE;
         for (iPart = 0; iPart < nPart; iPart++) {
@@ -655,7 +645,7 @@ Bool_t AliTRDpid::SumCharge(const AliTRDtrack *t
   }
   
   // Loop through all clusters associated to this track
-  Int_t nClus = t->GetNclusters();
+  Int_t nClus = t->GetNumberOfClusters();
   for (Int_t iClus = 0; iClus < nClus; iClus++) {
 
     // Get a cluster