// Check that the decay chain ends at a primary particle
AliMCParticle* mother = mcpart;
Int_t imo = mcpart->GetMother();
- while((imo >= nprim) && (mother->GetUniqueID() == kPDecay)) {
+ while((imo >= nprim) && (mother->Particle()->GetUniqueID() == kPDecay)) {
mother = (AliMCParticle*) mcE->GetTrack(imo);
imo = mother->GetMother();
}
// Check if the gamma comes from the decay chain of a primary particle
AliMCParticle* mother = (AliMCParticle*) mcE->GetTrack(imo);
imo = mother->GetMother();
- while((imo >= nprim) && (mother->GetUniqueID() == kPDecay)) {
+ while((imo >= nprim) && (mother->Particle()->GetUniqueID() == kPDecay)) {
mother = (AliMCParticle*) mcE->GetTrack(imo);
imo = mother->GetMother();
}