Bool_t bRecoAccStep = kFALSE;
- Float_t etaCutMin, ptCutMin, etaCutMax, ptCutMax;
+ Float_t etaCutMin=0, ptCutMin=0, etaCutMax=0, ptCutMax=0;
Float_t etaProng=0., ptProng=0.;
AliAODMCParticle *mcPartDaughter;
Int_t label0 = fmcPartCandidate->GetDaughter(0);
Int_t label1 = fmcPartCandidate->GetDaughter(1);
- //AliDebug(2,Form("label0 = %d, label1 = %d",label0,label1));
- AliAODMCParticle* tmp0 = dynamic_cast<AliAODMCParticle*>(fmcArray->At(label0));
- AliAODMCParticle* tmp1 = dynamic_cast<AliAODMCParticle*>(fmcArray->At(label1));
-
- AliDebug(2, Form("label0 = %d (pdg = %d), label1 = %d (pdg = %d)", label0, tmp0->GetPdgCode(), label1, tmp1->GetPdgCode()));
+ AliDebug(2, Form("label0 = %d, label1 = %d", label0, label1));
if (label1<=0 || label0 <= 0){
AliDebug(2, Form("The MC particle doesn't have correct daughters, skipping!!"));
delete [] fLabelArray;
fLabelArray = 0x0;
return bLabelArray;
}
+ AliAODMCParticle* tmp0 = dynamic_cast<AliAODMCParticle*>(fmcArray->At(label0));
+ AliAODMCParticle* tmp1 = dynamic_cast<AliAODMCParticle*>(fmcArray->At(label1));
+ AliDebug(2, Form("label0 = %d (pdg = %d), label1 = %d (pdg = %d)", label0, tmp0->GetPdgCode(), label1, tmp1->GetPdgCode()));
if (label1 - label0 == fProngs-1){
for (Int_t iProng = 0; iProng<fProngs; iProng++){
if (part) {
fLabelArray[foundDaughters] = part->GetLabel();
AliDebug(3, Form("part found at %d has label = %d", iLabelDau, part->GetLabel()));
+ AliDebug(3, Form("fLabelArray[%d] = %d", foundDaughters, fLabelArray[foundDaughters]));
foundDaughters++;
}
else{
}
// added K0S case - Start
else if (pdgCode==311) {
- AliDebug(3, "K0S case");
+ AliDebug(3, Form("K0S case, foundDaughters = %d", foundDaughters));
if (part->GetNDaughters()!=1) {
delete [] fLabelArray;
fLabelArray = 0x0;
return bLabelArray;
}
Int_t labelFirstDauRes = partK0S->GetDaughter(0);
- AliDebug(2, Form(" Found K0S (%d)", labelK0Dau));
+ AliDebug(2, Form("Found K0S (%d)", labelK0Dau));
for(Int_t iDauRes=0; iDauRes<nDauRes; iDauRes++){
Int_t iLabelDauRes = labelFirstDauRes+iDauRes;
AliAODMCParticle* dauRes = dynamic_cast<AliAODMCParticle*>(fmcArray->At(iLabelDauRes));
- AliDebug(3, Form("daughter = %d, pointer = %p", iLabelDauRes, dauRes));
+ AliDebug(3, Form("daughter = %d, pointer = %p, with label = %d", iLabelDauRes, dauRes, dauRes->GetLabel()));
if (dauRes){
AliDebug(3, Form("PDG code = %d", dauRes->GetPdgCode()));
if (TMath::Abs(dauRes->GetPdgCode())!=211) {
return bLabelArray;
}
else {
- fLabelArray[foundDaughters] = dauRes->GetLabel();
-
+ fLabelArray[foundDaughters] = iLabelDauRes; // N.B.: do not use dauRes->GetLabel()!!!! it is wrong!!!
+ AliDebug(3, Form("Setting fLabelArray[%d] = %d (before it was %d)", foundDaughters, iLabelDauRes, dauRes->GetLabel()));
foundDaughters++;
}
}