if(phiC<0) phiC+=TMath::TwoPi();
Float_t etaC = pCandidate->Eta() ;
- if(pCandidate->GetDetector()=="EMCAL")
+ if(pCandidate->GetDetectorTag() == AliCaloTrackReader::kEMCAL)
{
AliEMCALGeometry* eGeom = AliEMCALGeometry::GetInstance();
AliCalorimeterUtils *cu = reader->GetCaloUtils();
if(phiC<0) phiC+=TMath::TwoPi();
Float_t etaC = pCandidate->Eta() ;
- if(pCandidate->GetDetector()=="EMCAL")
+ if(pCandidate->GetDetectorTag() == AliCaloTrackReader::kEMCAL)
{
AliEMCALGeometry* eGeom = AliEMCALGeometry::GetInstance();
AliCalorimeterUtils *cu = reader->GetCaloUtils();
//________________________________________________________________________________________
Int_t AliMCAnalysisUtils::CheckOrigin(const Int_t * label, Int_t nlabels,
- const AliCaloTrackReader* reader, TString calorimeter)
+ const AliCaloTrackReader* reader, Int_t calorimeter)
{
// Play with the montecarlo particles if available.
}
TObjArray* arrayCluster = 0;
- if ( calorimeter == "EMCAL" ) arrayCluster = reader->GetEMCALClusters();
- else if ( calorimeter == "PHOS" ) arrayCluster= reader->GetPHOSClusters();
+ if ( calorimeter == AliCaloTrackReader::kEMCAL ) arrayCluster = reader->GetEMCALClusters();
+ else if ( calorimeter == AliCaloTrackReader::kPHOS ) arrayCluster = reader->GetPHOSClusters ();
//Select where the information is, ESD-galice stack or AOD mcparticles branch
if(reader->ReadStack()){
}
//____________________________________________________________________________________________________
-Int_t AliMCAnalysisUtils::CheckOrigin(Int_t label, const AliCaloTrackReader* reader, TString calorimeter)
+Int_t AliMCAnalysisUtils::CheckOrigin(Int_t label, const AliCaloTrackReader* reader, Int_t calorimeter)
{
// Play with the montecarlo particles if available.
}
TObjArray* arrayCluster = 0;
- if ( calorimeter == "EMCAL" ) arrayCluster = reader->GetEMCALClusters();
- else if ( calorimeter == "PHOS" ) arrayCluster= reader->GetPHOSClusters();
+ if ( calorimeter == AliCaloTrackReader::kEMCAL ) arrayCluster = reader->GetEMCALClusters();
+ else if ( calorimeter == AliCaloTrackReader::kPHOS ) arrayCluster = reader->GetPHOSClusters();
Int_t labels[]={label};
CheckOverlapped2GammaDecay(labels,nlabels, iParent, mcparticles, tag); //set to kMCPi0 if 2 gammas in same cluster
// In case it did not merge, check if the decay companion is lost
if(!CheckTagBit(tag, kMCPi0) && !CheckTagBit(tag,kMCDecayPairInCalo) && !CheckTagBit(tag,kMCDecayPairLost))
+ {
CheckLostDecayPair(arrayCluster,iMom, iParent, mcparticles, tag);
-
+ }
+
//printf("Bit set is Merged %d, Pair in calo %d, Lost %d\n",CheckTagBit(tag, kMCPi0),CheckTagBit(tag,kMCDecayPairInCalo),CheckTagBit(tag,kMCDecayPairLost));
}
else if (pPdg == 221)
const TClonesArray* mcparticles, Int_t & tag)
{
// Check on AODs if the current decay photon has the second photon companion lost.
-
+
if(!arrayCluster || iMom < 0 || iParent < 0|| !mcparticles) return;
AliAODMCParticle * parent = (AliAODMCParticle*) mcparticles->At(iParent);
Int_t CheckCommonAncestor(Int_t index1, Int_t index2, const AliCaloTrackReader* reader,
Int_t & ancPDG, Int_t & ancStatus, TLorentzVector & momentum, TVector3 & v) ;
- Int_t CheckOrigin(Int_t label, const AliCaloTrackReader * reader, TString calorimeter) ;
+ Int_t CheckOrigin(Int_t label, const AliCaloTrackReader * reader, Int_t calorimeter) ;
//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, Int_t nlabels, const AliCaloTrackReader * reader, TString calorimeter) ;
+ Int_t CheckOrigin (const Int_t *label, Int_t nlabels, const AliCaloTrackReader * reader, Int_t calorimeter) ;
Int_t CheckOriginInStack(const Int_t *labels, Int_t nlabels, AliStack * stack , const TObjArray *arrayCluster) ; // ESD
Int_t CheckOriginInAOD (const Int_t *labels, Int_t nlabels, const TClonesArray* mcparticles, const TObjArray *arrayCluster) ; // AOD