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
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++) {
(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;
delete[] pParent;
return 0;
}
+ if(fTriggerParticle && !triggered) { // particle requested is not produced
+ delete[] pParent;
+ return 0;
+ }
}