]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Correction in IsPhysicalPrimary(int) (thanks to R. Vernet)
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 24 Jan 2008 08:22:53 +0000 (08:22 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 24 Jan 2008 08:22:53 +0000 (08:22 +0000)
STEER/AliStack.cxx

index 2dfbda0999d795d1935dfd6685eaed10fc4564b8..19bdf7adf27c94e5fb9ca74309d3087b49eda0b6 100644 (file)
@@ -1016,10 +1016,16 @@ Bool_t AliStack::IsPhysicalPrimary(Int_t index)
 //
 // Particle produced during transport
 //
-// Check if this is a heavy flavor decay product
+
        Int_t imo =  p->GetFirstMother();
        TParticle* pm  = Particle(imo);
        Int_t mpdg = TMath::Abs(pm->GetPdgCode());
+// Check if it comes from a pi0 decay
+//
+// What about the pi0 Dalitz ??
+//     if ((mpdg == kPi0) && (imo < GetNprimary())) return kTRUE; 
+
+// Check if this is a heavy flavor decay product
        Int_t mfl  = Int_t (mpdg / TMath::Power(10, Int_t(TMath::Log10(mpdg))));
        //
        // Light hadron
@@ -1034,7 +1040,7 @@ Bool_t AliStack::IsPhysicalPrimary(Int_t index)
        // To be sure that heavy flavor has not been produced in a secondary interaction
        // Loop back to the generated mother
        while (imo >=  GetNprimary()) {
-           imo = p->GetFirstMother();
+           imo = pm->GetFirstMother();
            pm  =  Particle(imo);
        }
        mpdg = TMath::Abs(pm->GetPdgCode());
@@ -1047,4 +1053,3 @@ Bool_t AliStack::IsPhysicalPrimary(Int_t index)
        } 
     } // produced by generator ?
 } 
-