AliMCAnalysisUtils: Add to the method to get first common ancestor of 2 particles the possibility to recover the momentum of this ancestor.
//_________________________________________________________________________
Int_t AliMCAnalysisUtils::CheckCommonAncestor(const Int_t index1, const Int_t index2, AliCaloTrackReader* reader,
- Int_t & ancPDG, Int_t & ancStatus) {
+ Int_t & ancPDG, Int_t & ancStatus, TLorentzVector & momentum) {
//Check the first common ancestor of 2 clusters, given the most likely labels of the primaries generating such clusters.
Int_t label1[100];
Int_t label2[100];
if (mom) {
ancPDG = mom->GetPdgCode();
ancStatus = mom->GetStatus();
+ momentum.SetPxPyPzE(mom->Px(),mom->Py(),mom->Pz(),mom->E());
}
}
else {
if (mom) {
ancPDG = mom->GetPdgCode();
ancStatus = mom->GetStatusCode();
+ mom->Momentum(momentum);
}
}
//First ancestor found, end the loops
//Check only the label of the most significant particle
Int_t CheckCommonAncestor(const Int_t index1, const Int_t index2, AliCaloTrackReader* reader,
- Int_t & ancPDG, Int_t & ancStatus) ;
+ Int_t & ancPDG, Int_t & ancStatus, TLorentzVector & momentum) ;
Int_t CheckOrigin(const Int_t label, AliCaloTrackReader * reader, const Int_t input) ;
//Check the label of the most significant particle but do checks on the rest of the contributing labels
Int_t CheckOrigin(const Int_t *label, const Int_t nlabels, AliCaloTrackReader * reader, const Int_t input) ;
if(imax == ipos) continue;
absId = indexList[ipos];
Float_t diff = (tmax-cell->GetCellTime(absId))*1e9;
- printf("diff time %f %p",diff,fhCellTimeSpreadRespectToCellMax);
fhCellTimeSpreadRespectToCellMax->Fill(diff);
if(TMath::Abs(TMath::Abs(diff) > 100)) fhCellIdCellLargeTimeSpread->Fill(absId);
}// fill cell-cluster histogram loop