]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Don't track pi0 if already decayed.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 28 Nov 2002 11:46:15 +0000 (11:46 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 28 Nov 2002 11:46:15 +0000 (11:46 +0000)
EVGEN/AliGenHIJINGpara.cxx

index bbfadcefdd1dbfdd74b8ef37c1b99cb89514991f..dc763e6adfa9ab6bf6779f8818d100b4493b84e7 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.15  2002/11/28 11:38:53  morsch
+Typo corrected.
+
 Revision 1.14  2002/11/26 17:12:36  morsch
 Decay pi0 if requested.
 
@@ -388,10 +391,15 @@ void AliGenHIJINGpara::Generate()
                        TMath::Sqrt(-2*TMath::Log(random[2*j+1]));
                }
            }
-           SetTrack(fTrackIt,-1,part,p,origin,polar,0,kPPrimary,nt,fParentWeight);
+           if (part == kPi0 && fPi0Decays){
 //
 //          Decay pi0 if requested
-           if (part == kPi0 && fPi0Decays) DecayPi0(origin, p);
+               SetTrack(0,-1,part,p,origin,polar,0,kPPrimary,nt,fParentWeight);
+               DecayPi0(origin, p);
+           } else {
+               SetTrack(fTrackIt,-1,part,p,origin,polar,0,kPPrimary,nt,fParentWeight);
+           }
+
            break;
        }
     }