* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//-----------------------------------------------------------------------
// Class for HF corrections as a function of many variables
// 6 Steps introduced: MC, MC Acc, Reco, Reco Acc, Reco Acc + ITS Cl,
for (Int_t iPart=0; iPart<mcArray->GetEntriesFast(); iPart++) {
AliAODMCParticle* mcPart = dynamic_cast<AliAODMCParticle*>(mcArray->At(iPart));
- if (mcPart->GetPdgCode() == 4) cquarks++;
- if (mcPart->GetPdgCode() == -4) cquarks++;
if (!mcPart) {
AliWarning("Particle not found in tree, skipping");
continue;
}
+ if (mcPart->GetPdgCode() == 4) cquarks++;
+ if (mcPart->GetPdgCode() == -4) cquarks++;
// check the MC-level cuts
istep++;
AliDebug(2,Form("mother at step %d = %d", istep, mother));
AliAODMCParticle* mcGranma = dynamic_cast<AliAODMCParticle*>(mcArray->At(mother));
+ if(!mcGranma) break;
pdgGranma = mcGranma->GetPdgCode();
AliDebug(2,Form("Pdg mother at step %d = %d", istep, pdgGranma));
Int_t abspdgGranma = TMath::Abs(pdgGranma);