TParticle* iparticle = (TParticle *) fParticles->At(i);
if(iparticle->GetStatusCode()==1 && iparticle->GetPdgCode()==pdg &&
iparticle->Pt() > fFragPhotonOrPi0MinPt){
+ Int_t imother = iparticle->GetFirstMother() - 1;
+ TParticle* pmother = (TParticle *) fParticles->At(imother);
if(pdg == 111 ||
- (pdg == 22 && iparticle->GetFirstMother() != 11))//No photon from hadron decay
+ (pdg == 22 && pmother->GetStatusCode() != 11))//No photon from hadron decay
{
Float_t phi = iparticle->Phi()*180./TMath::Pi(); //Convert to degrees
Float_t eta =TMath::Abs(iparticle->Eta());//in calos etamin=-etamax