]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Redefinition of stable condition.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 4 Oct 2001 08:12:24 +0000 (08:12 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 4 Oct 2001 08:12:24 +0000 (08:12 +0000)
EVGEN/AliGenHijing.cxx

index 67a27da7e6cd03aca057c815a41d8bbfabaf107e..c0bcf86c2db2ef0fd3c3b1a70f6f0b3eb29d70e0 100644 (file)
 
 /*
 $Log$
+Revision 1.25  2001/07/27 17:09:36  morsch
+Use local SetTrack, KeepTrack and SetHighWaterMark methods
+to delegate either to local stack or to stack owned by AliRun.
+(Piotr Skowronski, A.M.)
+
 Revision 1.24  2001/07/20 09:34:56  morsch
 Count the number of spectator neutrons and protons and add information
 to the event header. (Chiara Oppedisano)
@@ -275,10 +280,12 @@ void AliGenHijing::Generate()
            origin[2] = origin0[2]+iparticle->Vz()/10;
            tof = kconv*iparticle->T();
            imo = -1;
+           TParticle* mother = 0;
            if (hasMother) {
                imo = iparticle->GetFirstMother();
-               TParticle* mother = (TParticle *) particles->At(imo);
+               mother = (TParticle *) particles->At(imo);
                imo = (mother->GetPdgCode() != 92) ? imo =* (newPos+imo) : -1;
+               
            }
 // Put particle on the stack ... 
 //             printf("\n set track mother: %d %d %d %d %d %d ",i,imo, kf, nt+1, selected, hasSelectedDaughters);
@@ -329,21 +336,21 @@ void AliGenHijing::Generate()
            origin[2] = origin0[2]+iparticle->Vz()/10;
            tof = kconv*iparticle->T();
            imo = -1;
-           
+           TParticle* mother = 0;
            if (hasMother) {
                imo = iparticle->GetFirstMother();
-               TParticle* mother = (TParticle *) particles->At(imo);
+               mother = (TParticle *) particles->At(imo);
                imo = (mother->GetPdgCode() != 92) ? imo=*(newPos+imo) : -1;
            }   
 // Put particle on the stack
            SetTrack(fTrackIt,imo,kf,p,origin,polar,
-                            tof,kPNoProcess,nt);
+                                                    tof,kPNoProcess,nt);
            KeepTrack(nt);
            *(newPos+i)=nt;
         } // selected
       } // particle loop final state
  
-      delete newPos;
+      delete[] newPos;
 
       printf("\n I've put %i particles on the stack \n",nc);
       if (nc > 0) {
@@ -477,7 +484,7 @@ Bool_t AliGenHijing::Stable(TParticle*  particle)
 //
     Int_t kf = TMath::Abs(particle->GetPdgCode());
     
-    if ( (particle->GetFirstDaughter() < 0 ) || (kf == 1000*fFlavor+122))
+    if (particle->GetFirstDaughter() < 0 )
     {
        return kTRUE;
     } else {