#include "AliCaloTrackReader.h"
#include "AliMixedEvent.h"
#include "AliCaloPID.h"
+#include "AliLog.h"
ClassImp(AliIsolationCut)
fPtFraction(0.),
fICMethod(0),
fPartInCone(0),
-fDebug(-1),
+fDebug(0),
fFracIsThresh(1),
fMomentum(),
fTrackVector()
if(coneA > excessA) return coneA / (coneA-excessA);
else
{
- printf("AliIsolationCut::CalculateExcessAreaFraction() - Please Check : Excess Track %2.3f, coneA %2.2f, excessA %2.2f, angle %2.2f,factor %2.2f\n",
- excess,coneA, excessA, angle*TMath::RadToDeg(), coneA / (coneA-excessA));
+ AliWarning(Form("Please Check : Excess Track %2.3f, coneA %2.2f, excessA %2.2f, angle %2.2f,factor %2.2f",
+ excess,coneA, excessA, angle*TMath::RadToDeg(), coneA / (coneA-excessA)));
return 1;
}
}
}
}//end of cells loop
}
-
- else if(fDebug>0) printf("cluster with bad (eta,phi) in EMCal for energy density calculation\n");
+ else AliWarning("Cluster with bad (eta,phi) in EMCal for energy density calculation");
if (coneCells > 0.)
{
}
}//end of cells loop
}
-
- else if(fDebug > 0) printf("cluster with bad (eta,phi) in EMCal for energy density coeff calculation\n");
+ else AliWarning("Cluster with bad (eta,phi) in EMCal for energy density coeff calculation");
if (coneCells > 0.)
{
nfrac = 0 ;
isolated = kFALSE;
- if(fDebug>0)
- {
- printf("AliIsolationCut::MakeIsolationCut() - Cadidate pT %2.2f, eta %2.2f, phi %2.2f, cone %1.2f, thres %2.2f, Fill AOD? %d",
- pCandidate->Pt(), pCandidate->Eta(), pCandidate->Phi()*TMath::RadToDeg(), fConeSize,fPtThreshold,bFillAOD);
- if(plCTS) printf(", nTracks %d" ,plCTS->GetEntriesFast());
- if(plNe) printf(", nClusters %d",plNe ->GetEntriesFast());
-
- printf("\n");
- }
-
+ AliDebug(1,Form("Candidate pT %2.2f, eta %2.2f, phi %2.2f, cone %1.2f, thres %2.2f, Fill AOD? %d",
+ pCandidate->Pt(), pCandidate->Eta(), pCandidate->Phi()*TMath::RadToDeg(), fConeSize,fPtThreshold,bFillAOD));
+
//Initialize the array with refrences
TObjArray * refclusters = 0x0;
TObjArray * reftracks = 0x0;
AliAODPWG4Particle * trackmix = dynamic_cast<AliAODPWG4Particle*>(plCTS->At(ipr)) ;
if(!trackmix)
{
- printf("AliIsolationCut::MakeIsolationCut() - Wrong track data type, continue\n");
+ AliWarning("Wrong track data type, continue");
continue;
}
// // Check if there is any particle inside cone with pt larger than fPtThreshold
// Check if the leading particule inside the cone has a ptLead larger than fPtThreshold
- if( fDebug > 0 )
- printf("\t track %d, pT %2.2f, eta %1.2f, phi %2.2f, R candidate %2.2f", ipr,pt,eta,phi,rad);
+ AliDebug(2,Form("\t Track %d, pT %2.2f, eta %1.2f, phi %2.2f, R candidate %2.2f", ipr,pt,eta,phi,rad));
if(rad < fConeSize)
{
- if(fDebug > 0) printf(" - inside candidate cone");
+ AliDebug(2,"Inside candidate cone");
if(bFillAOD)
{
} // Inside cone
- if( fDebug > 0 ) printf("\n");
-
}// charged particle loop
}//Tracks
AliAODPWG4Particle * calomix = dynamic_cast<AliAODPWG4Particle*>(plNe->At(ipr)) ;
if(!calomix)
{
- printf("AliIsolationCut::MakeIsolationCut() - Wrong calo data type, continue\n");
+ AliWarning("Wrong calo data type, continue");
continue;
}
//Check if there is any particle inside cone with pt larger than fPtThreshold
- if(fDebug > 0 )
- printf("\t cluster %d, pT %2.2f, eta %1.2f, phi %2.2f, R candidate %2.2f", ipr,pt,eta,phi,rad);
+ AliDebug(2,Form("\t Cluster %d, pT %2.2f, eta %1.2f, phi %2.2f, R candidate %2.2f", ipr,pt,eta,phi,rad));
if(rad < fConeSize)
{
- if(fDebug > 0 ) printf(" - inside candidate cone");
+ AliDebug(2,"Inside candidate cone");
if(bFillAOD)
{
}//in cone
- if(fDebug > 0 ) printf("\n");
-
}// neutral particle loop
}//neutrals
{
if( n == 0 ) isolated = kTRUE ;
- if(fDebug > 0 )
- printf("pT Cand %2.2f, pT Lead %2.2f, %2.2f<pT Lead< %2.2f, isolated %d\n",
- ptC,ptLead,fPtThreshold,fPtThresholdMax,isolated);
+ AliDebug(1,Form("pT Cand %2.2f, pT Lead %2.2f, %2.2f<pT Lead< %2.2f, isolated %d",
+ ptC,ptLead,fPtThreshold,fPtThresholdMax,isolated));
}
else if( fICMethod == kSumPtIC )
{
else
isolated = kTRUE ;
- if(fDebug > 0 )
- printf("pT Cand %2.2f, SumPt %2.2f, %2.2f<Sum pT< %2.2f, isolated %d\n",
- ptC,ptLead,fSumPtThreshold,fSumPtThresholdMax,isolated);
+ AliDebug(1,Form("pT Cand %2.2f, SumPt %2.2f, %2.2f<Sum pT< %2.2f, isolated %d",
+ ptC,ptLead,fSumPtThreshold,fSumPtThresholdMax,isolated));
}
else if( fICMethod == kPtFracIC )
{