]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Protection.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 Mar 2011 19:44:32 +0000 (19:44 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 Mar 2011 19:44:32 +0000 (19:44 +0000)
 Chiara Oppedisano <Chiara.Oppedisano@to.infn.it>

EVGEN/AliGenReaderEMD.cxx

index 8c8ec979409cdd5e9857830b06ccda1a57dfd47a..b250c62c4f5bc88030f02f993047c3ca7aacf346 100644 (file)
@@ -301,11 +301,11 @@ Int_t AliGenReaderEMD::NextEvent()
        }
        fNcurrent++;
        printf("\t #### Putting %d particles in the stack\n", nTracks);
-       if(fPcToTrack==kAll || fPcToTrack==kOnlyNucleons) printf("\t\t  %d+%d neutrons, %d+%d protons\n", 
+       /*if(fPcToTrack==kAll || fPcToTrack==kOnlyNucleons) printf("\t\t  %d+%d neutrons, %d+%d protons\n", 
                fNnAside,fNnCside, fNpAside,fNpCside);
        if(fPcToTrack==kAll || fPcToTrack==kNotNucleons) printf("\t %d+%d pi+, %d+%d pi-, %d+%d pi0, %d+%d eta, %d+%d omega\n",
                fNppAside,fNppCside,fNpmAside,fNpmCside, 
-               fNp0Aside,fNp0Cside,fNetaAside,fNetaCside, fNomegaAside,fNomegaCside);
+               fNp0Aside,fNp0Cside,fNetaAside,fNetaCside, fNomegaAside,fNomegaCside);*/
        return nTracks;
     }
 
@@ -434,12 +434,16 @@ TParticle* AliGenReaderEMD::NextParticle()
     Double_t amass = TDatabasePDG::Instance()->GetParticle(pdgCode)->Mass();
     p[3] = TMath::Sqrt(ptot*ptot+amass*amass);
     
-    if(p[3]<=amass) 
-      Warning("Generate","Particle %d  E = %f GeV mass = %f GeV/c^2",pdgCode,p[3],amass);
+    if(p[3]<=amass){ 
+       Warning("Generate","Particle %d  E = %f GeV mass = %f GeV ",pdgCode,p[3],amass);
+    }
+    
+    //printf("  Pc %d:  PDGcode %d  p(%1.2f, %1.2f, %1.2f, %1.3f)\n",
+    // fNparticle,pdgCode,p[0], p[1], p[2], p[3]);
     
     TParticle* particle = new TParticle(pdgCode, 0, -1, -1, -1, -1, 
        p[0], p[1], p[2], p[3], 0., 0., 0., 0.);
-    particle->SetBit(kTransportBit);
+    if((p[0]*p[0]+p[1]*p[1]+p[2]*p[2])>1e-5) particle->SetBit(kTransportBit);
     fNparticle++;
     return particle;
 }