]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
The change is only in the "heavy flavour" part of GeneratedMB().
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 Mar 2011 19:36:12 +0000 (19:36 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 Mar 2011 19:36:12 +0000 (19:36 +0000)
I use the existing member fTriggerParticle to request, in addition to the other requests on the c/b quarks,
the presence in the stack of a given particle. We can use this to generate events enriched with "rare" charm hadrons
(Lambdac and Ds). This will be needed for a MC for pp (not the PbPb one) that we want to request.
A. Dainese

PYTHIA6/AliGenPythia.cxx

index b9fc124438bce1ad8ee41db9bcb0c92f5d969535..253804e84f528defaca46e056024c4f611d5d219 100644 (file)
@@ -1072,6 +1072,7 @@ Int_t  AliGenPythia::GenerateMB()
       TParticle *mother;
       Bool_t  theQ=kFALSE,theQbar=kFALSE,inYcut=kFALSE;
       Bool_t  theChild=kFALSE;
+      Bool_t  triggered=kFALSE;
       Float_t y;  
       Int_t   pdg,mpdg,mpdgUpperFamily;
       for(i=0; i<np; i++) {
@@ -1083,6 +1084,9 @@ Int_t  AliGenPythia::GenerateMB()
                             (partCheck->Energy()-partCheck->Pz()+1.e-13));
          if(y>fYMin && y<fYMax) inYcut=kTRUE;
        }
+       if(fTriggerParticle) {
+         if(TMath::Abs(pdg)==fTriggerParticle) triggered=kTRUE;
+       }
        if(fCutOnChild && TMath::Abs(pdg) == fPdgCodeParticleforAcceptanceCut) {
          Int_t mi = partCheck->GetFirstMother() - 1;
          if(mi<0) continue;
@@ -1105,6 +1109,10 @@ Int_t  AliGenPythia::GenerateMB()
        delete[] pParent;
        return 0;       
       }
+      if(fTriggerParticle && !triggered) { // particle requested is not produced
+       delete[] pParent;
+       return 0;       
+      }
 
     }