}
else{
AliWarning("There are problems!! particle was expected to be either a D0 or a D0bar, check...");
+ delete decay;
return vectorMC;
}
if (cosThetaStar < -1 || cosThetaStar > 1) {
AliWarning("Invalid value for cosine Theta star, returning");
+ delete decay;
return bGenValues;
}
// evaluate the correct cascade
if (!EvaluateIfD0toKpi(mcPartDaughterD0,vectorD0)) {
AliDebug(2, "Error! the D0 MC doesn't have correct daughters!!");
+ delete decay;
return bGenValues;
}
return isHadronic;
}
+ Double_t sumPxDau=mcPartDaughterD00->Px()+mcPartDaughterD01->Px();
+ Double_t sumPyDau=mcPartDaughterD00->Py()+mcPartDaughterD01->Py();
+ Double_t sumPzDau=mcPartDaughterD00->Pz()+mcPartDaughterD01->Pz();
+ Double_t pxMother=neutralDaugh->Px();
+ Double_t pyMother=neutralDaugh->Py();
+ Double_t pzMother=neutralDaugh->Pz();
+ if(TMath::Abs(pxMother-sumPxDau)/(TMath::Abs(pxMother)+1.e-13)>0.00001 ||
+ TMath::Abs(pyMother-sumPyDau)/(TMath::Abs(pyMother)+1.e-13)>0.00001 ||
+ TMath::Abs(pzMother-sumPzDau)/(TMath::Abs(pzMother)+1.e-13)>0.00001){
+ AliDebug(2, "Momentum conservation violated, skipping!!");
+ return isHadronic;
+ }
+
Double_t pTD0pi = 0;
Double_t pTD0K = 0;