]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/AliAnalysisTaskMCParticleFilter.cxx
Reconstructor for digits and fix of some bugs
[u/mrichter/AliRoot.git] / ANALYSIS / AliAnalysisTaskMCParticleFilter.cxx
index f699ef145350e32ea7ea7e606dc8a7dcba0affae..82849a73a96c5766f9f46b836ac45510aee7b01f 100644 (file)
@@ -354,7 +354,7 @@ void AliAnalysisTaskMCParticleFilter::UserExec(Option_t */*option*/)
       // Check that the decay chain ends at a primary particle
       AliMCParticle* mother = mcpart;
       Int_t imo = mcpart->GetMother();
-      while((imo >= nprim) && (mother->GetUniqueID() == kPDecay)) {
+      while((imo >= nprim) && (mother->Particle()->GetUniqueID() == kPDecay)) {
        mother =  (AliMCParticle*) mcE->GetTrack(imo);
        imo =  mother->GetMother();
       }
@@ -371,7 +371,7 @@ void AliAnalysisTaskMCParticleFilter::UserExec(Option_t */*option*/)
        // Check if the gamma comes from the decay chain of a primary particle
        AliMCParticle* mother =  (AliMCParticle*) mcE->GetTrack(imo);
        imo = mother->GetMother();
-       while((imo >= nprim) && (mother->GetUniqueID() == kPDecay)) {
+       while((imo >= nprim) && (mother->Particle()->GetUniqueID() == kPDecay)) {
          mother =   (AliMCParticle*) mcE->GetTrack(imo);
          imo =  mother->GetMother();
        }