message: PWGGA/GammaConv: Bugfix for MC-ESD running
diff: @@ -175,12 +175,14 @@ void AliAODConversionPhoton::SetCaloPhotonMCFlags(AliMCEvent *mcEvent, Bool_t en
  orginalContrib[i] = fCaloPhotonMCLabels[i];
  if (fCaloPhotonMCLabels[i]> -1){
  TParticle* dummy = mcEvent->Particle(fCaloPhotonMCLabels[i]);
  + if (dummy){
  energyPerPart[i] = dummy->Energy();
  // suppress energy of hadrons !!! DIRTY hack !!!
  if (!(TMath::Abs(dummy->GetPdgCode())== 11 || TMath::Abs(dummy->GetPdgCode())== 22)){
  // cout << "suppressed hadron energy for:" << dummy->GetPdgCode() << endl;
  energyPerPart[i]= 0.25; // put energy to mip
  }
  + }
  } else {
  energyPerPart[i] = 0;
  }
  @@ -318,14 +320,17 @@ void AliAODConversionPhoton::SetCaloPhotonMCFlags(AliMCEvent *mcEvent, Bool_t en
  }
  // consider the case, where a photon stems from a photon which stems from a photon etc...which is common for frag. photons
  + if (particleMotherLabel > -1){
  TParticle *dummyMother = mcEvent->Particle(particleMotherLabel);
  + if (dummyMother){
  while (dummyMother->GetPdgCode() == 22){ // follow conversion photon's history, as long as the mother is a photon
  dummyMother = mcEvent->Particle(dummyMother->GetMother(0));
  if (TMath::Abs(dummyMother->GetPdgCode()) == 11) // in case of additional conversion skip to photon's grandma, which should be a photon
  dummyMother = mcEvent->Particle(dummyMother->GetMother(0));
  isElectronFromFragPhoton = (TMath::Abs(dummyMother->GetPdgCode()) < 6);// photon stems from quark = fragmentation photon
  }
  -
  + }
  + }
  }
  Bool_t enablePrintOuts = kFALSE;
  