From: jbook Date: Tue, 12 Nov 2013 14:11:43 +0000 (+0000) Subject: -small fix for pdg code of grandmothers X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=69050fc7127c48e26845b630417a05f8c60e7a58;p=u%2Fmrichter%2FAliRoot.git -small fix for pdg code of grandmothers --- diff --git a/PWGDQ/dielectron/AliDielectronVarManager.h b/PWGDQ/dielectron/AliDielectronVarManager.h index c213f57428e..6b00cb507e5 100644 --- a/PWGDQ/dielectron/AliDielectronVarManager.h +++ b/PWGDQ/dielectron/AliDielectronVarManager.h @@ -618,7 +618,8 @@ inline void AliDielectronVarManager::FillVarESDtrack(const AliESDtrack *particle values[AliDielectronVarManager::kPdgCode] =mc->GetMCTrack(particle)->PdgCode(); values[AliDielectronVarManager::kHasCocktailMother] =mc->CheckParticleSource(trkLbl, AliDielectronSignalMC::kDirect); values[AliDielectronVarManager::kPdgCodeMother] =mc->GetMotherPDG(particle); - values[AliDielectronVarManager::kPdgCodeGrandMother]=mc->GetPdgFromLabel(mc->GetMothersLabel(trkLbl)); + AliMCParticle *motherMC=mc->GetMCTrackMother(particle); //mother + if(motherMC) values[AliDielectronVarManager::kPdgCodeGrandMother]=mc->GetMotherPDG(motherMC); } values[AliDielectronVarManager::kNumberOfDaughters]=mc->NumberOfDaughters(particle); } //if(mc->HasMC()) @@ -937,7 +938,8 @@ inline void AliDielectronVarManager::FillVarAODTrack(const AliAODTrack *particle values[AliDielectronVarManager::kPdgCode] =mc->GetMCTrack(particle)->PdgCode(); values[AliDielectronVarManager::kHasCocktailMother] =mc->CheckParticleSource(trkLbl, AliDielectronSignalMC::kDirect); values[AliDielectronVarManager::kPdgCodeMother] =mc->GetMotherPDG(particle); - values[AliDielectronVarManager::kPdgCodeGrandMother]=mc->GetPdgFromLabel(mc->GetMothersLabel(trkLbl)); + AliAODMCParticle *motherMC=mc->GetMCTrackMother(particle); //mother + if(motherMC) values[AliDielectronVarManager::kPdgCodeGrandMother]=mc->GetMotherPDG(motherMC); } values[AliDielectronVarManager::kNumberOfDaughters]=mc->NumberOfDaughters(particle); } //if(mc->HasMC()) @@ -1004,7 +1006,9 @@ inline void AliDielectronVarManager::FillVarMCParticle(const AliMCParticle *part values[AliDielectronVarManager::kPdgCode] = particle->PdgCode(); values[AliDielectronVarManager::kHasCocktailMother] = mc->CheckParticleSource(trkLbl, AliDielectronSignalMC::kDirect); values[AliDielectronVarManager::kPdgCodeMother] = mc->GetMotherPDG(particle); - values[AliDielectronVarManager::kPdgCodeGrandMother]= mc->GetPdgFromLabel(mc->GetMothersLabel(trkLbl)); + AliMCParticle *motherMC=mc->GetMCTrackMother(particle); //mother + if(motherMC) values[AliDielectronVarManager::kPdgCodeGrandMother]=mc->GetMotherPDG(motherMC); + values[AliDielectronVarManager::kIsJpsiPrimary] = mc->IsJpsiPrimary(particle); values[AliDielectronVarManager::kNumberOfDaughters]=mc->NumberOfDaughters(particle); @@ -1165,7 +1169,9 @@ inline void AliDielectronVarManager::FillVarAODMCParticle(const AliAODMCParticle values[AliDielectronVarManager::kPdgCode] = particle->PdgCode(); values[AliDielectronVarManager::kHasCocktailMother] = mc->CheckParticleSource(trkLbl, AliDielectronSignalMC::kDirect); values[AliDielectronVarManager::kPdgCodeMother] = mc->GetMotherPDG(particle); - values[AliDielectronVarManager::kPdgCodeGrandMother]= mc->GetPdgFromLabel(mc->GetMothersLabel(trkLbl)); + AliAODMCParticle *motherMC=mc->GetMCTrackMother(particle); //mother + if(motherMC) values[AliDielectronVarManager::kPdgCodeGrandMother]=mc->GetMotherPDG(motherMC); + values[AliDielectronVarManager::kIsJpsiPrimary] = mc->IsJpsiPrimary(particle); values[AliDielectronVarManager::kNumberOfDaughters]=mc->NumberOfDaughters(particle);