if (!fPythia) fPythia=(AliPythia*) fMCEvGen;
fDecayer->ForceDecay();
- Float_t polar[3] = {0,0,0};
- Float_t origin[3] = {0,0,0};
- Float_t p[4];
+ Double_t polar[3] = {0,0,0};
+ Double_t origin[3] = {0,0,0};
+ Double_t p[4];
// converts from mm/c to s
const Float_t kconv=0.001/2.999792458e8;
//
//
Int_t i, kf, nt, iparent;
Int_t nc = 0;
- Float_t p[4];
- Float_t polar[3] = {0,0,0};
- Float_t origin[3] = {0,0,0};
+ Double_t p[4];
+ Double_t polar[3] = {0,0,0};
+ Double_t origin[3] = {0,0,0};
// converts from mm/c to s
const Float_t kconv=0.001/2.999792458e8;
}
}
}
- if(!ok)
- return 0;
+ if(!ok) {
+ delete[] pParent;
+ return 0;
+ }
}
// Select beauty jets with electron in EMCAL
ok =kTRUE;
}
}
- if(!ok)
+ if(!ok) {
+ delete[] pParent;
return 0;
+ }
+
AliDebug(5,Form("Found an electron jet (pt,eta,phi) = (%f,%f,%f)",pt,eta,phi));
}
// Check for minimum multiplicity
if(!okd && iphcand != -1) // execute rotation in phi
RotatePhi(iphcand,okd);
- if(!okd)
- return 0;
+ if(!okd) {
+ delete [] pParent;
+ return 0;
+ }
}
if (fTriggerParticle) {
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;
+ }
}
fHeader = 0x0;
}
-Bool_t AliGenPythia::CheckTrigger(TParticle* jet1, TParticle* jet2)
+Bool_t AliGenPythia::CheckTrigger(const TParticle* jet1, const TParticle* jet2)
{
// Check the kinematic trigger condition
//
}
}
-void AliGenPythia::LoadEvent(TObjArray* stack, Int_t flag, Int_t reHadr)
+void AliGenPythia::LoadEvent(const TObjArray* stack, Int_t flag, Int_t reHadr)
{
//
// Load event into Pythia Common Block
for (Int_t part = 0; part < npart; part++) {
TParticle *mPart = dynamic_cast<TParticle *>(stack->At(part));
+ if (!mPart) continue;
+
Int_t kf = mPart->GetPdgCode();
Int_t ks = mPart->GetStatusCode();
Int_t idf = mPart->GetFirstDaughter();
Int_t idl = mPart->GetLastDaughter();
if (reHadr) {
- if (ks == 11 || ks == 12) {
- ks -= 10;
- idf = -1;
- idl = -1;
- }
+ if (ks == 11 || ks == 12) {
+ ks -= 10;
+ idf = -1;
+ idl = -1;
+ }
}
Float_t px = mPart->Px();
return;
}
-Bool_t AliGenPythia::IsInEMCAL(Float_t phi, Float_t eta)
+Bool_t AliGenPythia::IsInEMCAL(Float_t phi, Float_t eta) const
{
// Is particle in EMCAL acceptance?
// phi in degrees, etamin=-etamax
return kFALSE;
}
-Bool_t AliGenPythia::IsInPHOS(Float_t phi, Float_t eta)
+Bool_t AliGenPythia::IsInPHOS(Float_t phi, Float_t eta) const
{
// Is particle in PHOS acceptance?
// Acceptance slightly larger considered.