#include <TObjArray.h>
#include "AliIsolationCut.h"
#include "AliAODPWG4ParticleCorrelation.h"
#include "AliEMCALGeometry.h"
#include "AliEMCALGeoParams.h"
#include "AliCalorimeterUtils.h"
#include "AliAODTrack.h"
#include "AliVCluster.h"
#include "AliCaloTrackReader.h"
#include "AliMixedEvent.h"
#include "AliCaloPID.h"
#include "AliLog.h"
ClassImp(AliIsolationCut)
AliIsolationCut::AliIsolationCut() :
TObject(),
fConeSize(0.),
fPtThreshold(0.),
fPtThresholdMax(10000.),
fSumPtThreshold(0.),
fSumPtThresholdMax(10000.),
fPtFraction(0.),
fICMethod(0),
fPartInCone(0),
fDebug(0),
fFracIsThresh(1),
fMomentum(),
fTrackVector()
{
InitParameters();
}
void AliIsolationCut::CalculateUEBandClusterNormalization(AliCaloTrackReader * , Float_t etaC, Float_t ,
Float_t phiUEptsumCluster, Float_t etaUEptsumCluster,
Float_t & phiUEptsumClusterNorm, Float_t & etaUEptsumClusterNorm,
Float_t & excessFracEta, Float_t & excessFracPhi ) const
{
Float_t coneA = fConeSize*fConeSize*TMath::Pi();
Float_t emcEtaSize = 0.7*2;
Float_t emcPhiSize = TMath::DegToRad()*100.;
if((2*fConeSize*emcPhiSize-coneA)!=0) phiUEptsumClusterNorm = phiUEptsumCluster*(coneA / (((2*fConeSize*emcPhiSize)-coneA)));
if((2*fConeSize*emcEtaSize-coneA)!=0) etaUEptsumClusterNorm = etaUEptsumCluster*(coneA / (((2*fConeSize*emcEtaSize)-coneA)));
excessFracEta = 1;
excessFracPhi = 1;
if(TMath::Abs(etaC)+fConeSize > emcEtaSize/2.)
{
Float_t excess = TMath::Abs(etaC) + fConeSize - emcEtaSize/2.;
excessFracEta = CalculateExcessAreaFraction(excess);
if ( excessFracEta != 0) coneA /= excessFracEta;
if(((2*fConeSize-excess)*emcPhiSize-coneA) != 0 ) phiUEptsumClusterNorm = phiUEptsumCluster*(coneA / ((((2*fConeSize-excess)*emcPhiSize)-coneA)));
if(( 2*fConeSize *emcEtaSize-coneA) != 0 ) etaUEptsumClusterNorm = etaUEptsumCluster*(coneA / ((( 2*fConeSize *emcEtaSize)-coneA)));
}
}
void AliIsolationCut::CalculateUEBandTrackNormalization (AliCaloTrackReader * reader, Float_t etaC, Float_t ,
Float_t phiUEptsumTrack, Float_t etaUEptsumTrack,
Float_t & phiUEptsumTrackNorm, Float_t & etaUEptsumTrackNorm,
Float_t & excessFracEta, Float_t & excessFracPhi ) const
{
Float_t coneA = fConeSize*fConeSize*TMath::Pi();
Float_t tpcEtaSize = reader->GetFiducialCut()->GetCTSFidCutMaxEtaArray()->At(0) -
reader->GetFiducialCut()->GetCTSFidCutMinEtaArray()->At(0) ;
Float_t tpcPhiSize = TMath::TwoPi();
excessFracEta = 1;
excessFracPhi = 1;
if((2*fConeSize*tpcPhiSize-coneA)!=0) phiUEptsumTrackNorm = phiUEptsumTrack*(coneA / (((2*fConeSize*tpcPhiSize)-coneA)));
if((2*fConeSize*tpcEtaSize-coneA)!=0) etaUEptsumTrackNorm = etaUEptsumTrack*(coneA / (((2*fConeSize*tpcEtaSize)-coneA)));
if(TMath::Abs(etaC)+fConeSize > tpcEtaSize/2.)
{
Float_t excess = TMath::Abs(etaC) + fConeSize - tpcEtaSize/2.;
excessFracEta = CalculateExcessAreaFraction(excess);
if (excessFracEta != 0) coneA /= excessFracEta;
if(((2*fConeSize-excess)*tpcPhiSize - coneA) !=0 ) phiUEptsumTrackNorm = phiUEptsumTrack*(coneA / ((((2*fConeSize-excess)*tpcPhiSize)-coneA)));
if(( 2*fConeSize *tpcEtaSize - coneA) !=0 ) etaUEptsumTrackNorm = etaUEptsumTrack*(coneA / ((( 2*fConeSize *tpcEtaSize)-coneA)));
}
}
Float_t AliIsolationCut::CalculateExcessAreaFraction(Float_t excess) const
{
Float_t angle = 2*TMath::ACos( (fConeSize-excess) / fConeSize );
Float_t coneA = fConeSize*fConeSize*TMath::Pi();
Float_t excessA = fConeSize*fConeSize / 2 * (angle-TMath::Sin(angle));
if(coneA > excessA) return coneA / (coneA-excessA);
else
{
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;
}
}
Float_t AliIsolationCut::GetCellDensity(AliAODPWG4ParticleCorrelation * pCandidate,
AliCaloTrackReader * reader) const
{
Double_t coneCells = 0.;
Double_t coneCellsBad = 0.;
Double_t cellDensity = 1.;
Float_t phiC = pCandidate->Phi() ;
if(phiC<0) phiC+=TMath::TwoPi();
Float_t etaC = pCandidate->Eta() ;
if(pCandidate->GetDetectorTag() == AliCaloTrackReader::kEMCAL)
{
AliEMCALGeometry* eGeom = AliEMCALGeometry::GetInstance();
AliCalorimeterUtils *cu = reader->GetCaloUtils();
Int_t absId = -999;
if (eGeom->GetAbsCellIdFromEtaPhi(etaC,phiC,absId))
{
Int_t iEta=-1, iPhi=-1, iRCU = -1;
Int_t nSupMod = cu->GetModuleNumberCellIndexes(absId, pCandidate->GetDetectorTag(), iEta, iPhi, iRCU);
Int_t colC = iEta;
if (nSupMod % 2) colC = AliEMCALGeoParams::fgkEMCALCols + iEta ;
Int_t rowC = iPhi + AliEMCALGeoParams::fgkEMCALRows*int(nSupMod/2);
Int_t sqrSize = int(fConeSize/0.0143) ;
for(Int_t icol = colC-sqrSize; icol < colC+sqrSize;icol++)
{
for(Int_t irow = rowC-sqrSize; irow < rowC+sqrSize; irow++)
{
if (Radius(colC, rowC, icol, irow) < sqrSize)
{
coneCells += 1.;
Int_t cellSM = -999;
Int_t cellEta = -999;
Int_t cellPhi = -999;
if(icol > AliEMCALGeoParams::fgkEMCALCols-1)
{
cellSM = 0+int(irow/AliEMCALGeoParams::fgkEMCALRows)*2;
cellEta = icol-AliEMCALGeoParams::fgkEMCALCols;
cellPhi = irow-AliEMCALGeoParams::fgkEMCALRows*int(cellSM/2);
}
if(icol < AliEMCALGeoParams::fgkEMCALCols)
{
cellSM = 1+int(irow/AliEMCALGeoParams::fgkEMCALRows)*2;
cellEta = icol;
cellPhi = irow-AliEMCALGeoParams::fgkEMCALRows*int(cellSM/2);
}
if(icol < 0 || icol > AliEMCALGeoParams::fgkEMCALCols*2 ||
irow < 0 || irow > AliEMCALGeoParams::fgkEMCALRows*16./3)
{
coneCellsBad += 1.;
}
else if (cu->GetEMCALChannelStatus(cellSM,cellEta,cellPhi)==1)
{
coneCellsBad += 1. ;
}
}
}
}
}
else AliWarning("Cluster with bad (eta,phi) in EMCal for energy density calculation");
if (coneCells > 0.)
{
cellDensity = (coneCells-coneCellsBad)/coneCells;
}
}
return cellDensity;
}
void AliIsolationCut::GetCoeffNormBadCell(AliAODPWG4ParticleCorrelation * pCandidate,
AliCaloTrackReader * reader,
Float_t & coneBadCellsCoeff,
Float_t & etaBandBadCellsCoeff,
Float_t & phiBandBadCellsCoeff)
{
Double_t coneCells = 0.;
Double_t phiBandCells = 0.;
Double_t etaBandCells = 0.;
Float_t phiC = pCandidate->Phi() ;
if(phiC<0) phiC+=TMath::TwoPi();
Float_t etaC = pCandidate->Eta() ;
if(pCandidate->GetDetectorTag() == AliCaloTrackReader::kEMCAL)
{
AliEMCALGeometry* eGeom = AliEMCALGeometry::GetInstance();
AliCalorimeterUtils *cu = reader->GetCaloUtils();
Int_t absId = -999;
if (eGeom->GetAbsCellIdFromEtaPhi(etaC,phiC,absId))
{
Int_t iEta=-1, iPhi=-1, iRCU = -1;
Int_t nSupMod = cu->GetModuleNumberCellIndexes(absId, pCandidate->GetDetectorTag(),
iEta, iPhi, iRCU);
Int_t colC = iEta;
if (nSupMod % 2) colC = AliEMCALGeoParams::fgkEMCALCols + iEta ;
Int_t rowC = iPhi + AliEMCALGeoParams::fgkEMCALRows*int(nSupMod/2);
Int_t sqrSize = int(fConeSize/0.0143) ;
for(Int_t icol = 0; icol < 2*AliEMCALGeoParams::fgkEMCALCols-1;icol++)
{
for(Int_t irow = 0; irow < 5*AliEMCALGeoParams::fgkEMCALRows -1; irow++)
{
if ( Radius(colC, rowC, icol, irow) < sqrSize ) { coneCells += 1.; }
else if( icol>colC-sqrSize && icol<colC+sqrSize ) { phiBandCells += 1 ; }
else if( irow>rowC-sqrSize && irow<rowC+sqrSize ) { etaBandCells += 1 ; }
Int_t cellSM = -999;
Int_t cellEta = -999;
Int_t cellPhi = -999;
if(icol > AliEMCALGeoParams::fgkEMCALCols-1)
{
cellSM = 0+int(irow/AliEMCALGeoParams::fgkEMCALRows)*2;
cellEta = icol-AliEMCALGeoParams::fgkEMCALCols;
cellPhi = irow-AliEMCALGeoParams::fgkEMCALRows*int(cellSM/2);
}
if(icol < AliEMCALGeoParams::fgkEMCALCols)
{
cellSM = 1+int(irow/AliEMCALGeoParams::fgkEMCALRows)*2;
cellEta = icol;
cellPhi = irow-AliEMCALGeoParams::fgkEMCALRows*int(cellSM/2);
}
if( (icol < 0 || icol > AliEMCALGeoParams::fgkEMCALCols*2-1 ||
irow < 0 || irow > AliEMCALGeoParams::fgkEMCALRows*5 - 1)
|| (cu->GetEMCALChannelStatus(cellSM,cellEta,cellPhi)==1))
{
if ( Radius(colC, rowC, icol, irow) < sqrSize ) coneBadCellsCoeff += 1.;
else if( icol>colC-sqrSize && icol<colC+sqrSize ) phiBandBadCellsCoeff += 1 ;
else if( irow>rowC-sqrSize && irow<rowC+sqrSize ) etaBandBadCellsCoeff += 1 ;
}
}
}
}
else AliWarning("Cluster with bad (eta,phi) in EMCal for energy density coeff calculation");
if (coneCells > 0.)
{
coneBadCellsCoeff = (coneCells-coneBadCellsCoeff)/coneCells;
}
if (phiBandCells > 0.)
{
phiBandBadCellsCoeff = (phiBandCells-phiBandBadCellsCoeff)/phiBandCells;
}
if (etaBandCells > 0.)
{
etaBandBadCellsCoeff = (etaBandCells-etaBandBadCellsCoeff)/etaBandCells;
}
}
}
TString AliIsolationCut::GetICParametersList()
{
TString parList ;
const Int_t buffersize = 255;
char onePar[buffersize] ;
snprintf(onePar,buffersize,"--- AliIsolationCut ---\n") ;
parList+=onePar ;
snprintf(onePar,buffersize,"fConeSize: (isolation cone size) %1.2f\n",fConeSize) ;
parList+=onePar ;
snprintf(onePar,buffersize,"fPtThreshold >%2.2f;<%2.2f (isolation pt threshold) \n",fPtThreshold,fPtThresholdMax) ;
parList+=onePar ;
snprintf(onePar,buffersize,"fSumPtThreshold >%2.2f;<%2.2f (isolation sum pt threshold) \n",fSumPtThreshold,fSumPtThresholdMax) ;
parList+=onePar ;
snprintf(onePar,buffersize,"fPtFraction=%2.2f (isolation pt threshold fraction) \n",fPtFraction) ;
parList+=onePar ;
snprintf(onePar,buffersize,"fICMethod=%d (isolation cut case) \n",fICMethod) ;
parList+=onePar ;
snprintf(onePar,buffersize,"fPartInCone=%d \n",fPartInCone) ;
parList+=onePar ;
snprintf(onePar,buffersize,"fFracIsThresh=%i \n",fFracIsThresh) ;
parList+=onePar ;
return parList;
}
void AliIsolationCut::InitParameters()
{
fConeSize = 0.4 ;
fPtThreshold = 0.5 ;
fPtThresholdMax = 10000. ;
fSumPtThreshold = 1.0 ;
fSumPtThresholdMax = 10000. ;
fPtFraction = 0.1 ;
fPartInCone = kNeutralAndCharged;
fICMethod = kSumPtIC;
fFracIsThresh = 1;
}
void AliIsolationCut::MakeIsolationCut(TObjArray * plCTS,
TObjArray * plNe,
AliCaloTrackReader * reader,
AliCaloPID * pid,
Bool_t bFillAOD,
AliAODPWG4ParticleCorrelation *pCandidate,
TString aodArrayRefName,
Int_t & n,
Int_t & nfrac,
Float_t & coneptsum, Float_t & ptLead,
Bool_t & isolated)
{
Float_t ptC = pCandidate->Pt() ;
Float_t phiC = pCandidate->Phi() ;
if(phiC<0) phiC+=TMath::TwoPi();
Float_t etaC = pCandidate->Eta() ;
Float_t pt = -100. ;
Float_t eta = -100. ;
Float_t phi = -100. ;
Float_t rad = -100. ;
Float_t coneptsumCluster = 0;
Float_t coneptsumTrack = 0;
Float_t etaBandPtSumTrack = 0;
Float_t phiBandPtSumTrack = 0;
Float_t etaBandPtSumCluster = 0;
Float_t phiBandPtSumCluster = 0;
n = 0 ;
nfrac = 0 ;
isolated = kFALSE;
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));
TObjArray * refclusters = 0x0;
TObjArray * reftracks = 0x0;
Int_t ntrackrefs = 0;
Int_t nclusterrefs = 0;
if(plCTS &&
(fPartInCone==kOnlyCharged || fPartInCone==kNeutralAndCharged))
{
for(Int_t ipr = 0;ipr < plCTS->GetEntries() ; ipr ++ )
{
AliVTrack* track = dynamic_cast<AliVTrack*>(plCTS->At(ipr)) ;
if(track)
{
if(track->GetID() == pCandidate->GetTrackLabel(0) || track->GetID() == pCandidate->GetTrackLabel(1) ||
track->GetID() == pCandidate->GetTrackLabel(2) || track->GetID() == pCandidate->GetTrackLabel(3) ) continue ;
fTrackVector.SetXYZ(track->Px(),track->Py(),track->Pz());
pt = fTrackVector.Pt();
eta = fTrackVector.Eta();
phi = fTrackVector.Phi() ;
}
else
{
AliAODPWG4Particle * trackmix = dynamic_cast<AliAODPWG4Particle*>(plCTS->At(ipr)) ;
if(!trackmix)
{
AliWarning("Wrong track data type, continue");
continue;
}
pt = trackmix->Pt();
eta = trackmix->Eta();
phi = trackmix->Phi() ;
}
if( phi < 0 ) phi+=TMath::TwoPi();
rad = Radius(etaC, phiC, eta, phi);
if(rad > fConeSize)
{
if(eta > (etaC-fConeSize) && eta < (etaC+fConeSize)) phiBandPtSumTrack += pt;
if(phi > (phiC-fConeSize) && phi < (phiC+fConeSize)) etaBandPtSumTrack += pt;
}
if(TMath::Abs(phi-phiC) > TMath::PiOver2()) continue ;
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)
{
AliDebug(2,"Inside candidate cone");
if(bFillAOD)
{
ntrackrefs++;
if(ntrackrefs == 1)
{
reftracks = new TObjArray(0);
TString tempo(aodArrayRefName) ;
tempo += "Tracks" ;
reftracks->SetName(tempo);
reftracks->SetOwner(kFALSE);
}
reftracks->Add(track);
}
coneptsumTrack+=pt;
if( ptLead < pt ) ptLead = pt;
}
}
}
if(plNe &&
(fPartInCone==kOnlyNeutral || fPartInCone==kNeutralAndCharged))
{
for(Int_t ipr = 0;ipr < plNe->GetEntries() ; ipr ++ )
{
AliVCluster * calo = dynamic_cast<AliVCluster *>(plNe->At(ipr)) ;
if(calo)
{
Int_t evtIndex = 0 ;
if (reader->GetMixedEvent())
evtIndex=reader->GetMixedEvent()->EventIndexForCaloCluster(calo->GetID()) ;
if(calo->GetID() == pCandidate->GetCaloLabel(0) ||
calo->GetID() == pCandidate->GetCaloLabel(1) ) continue ;
if( fPartInCone == kNeutralAndCharged &&
pid->IsTrackMatched(calo,reader->GetCaloUtils(),reader->GetInputEvent()) ) continue ;
calo->GetMomentum(fMomentum,reader->GetVertex(evtIndex)) ;
pt = fMomentum.Pt() ;
eta = fMomentum.Eta() ;
phi = fMomentum.Phi() ;
}
else
{
AliAODPWG4Particle * calomix = dynamic_cast<AliAODPWG4Particle*>(plNe->At(ipr)) ;
if(!calomix)
{
AliWarning("Wrong calo data type, continue");
continue;
}
pt = calomix->Pt();
eta = calomix->Eta();
phi = calomix->Phi() ;
}
if( phi < 0 ) phi+=TMath::TwoPi();
rad = Radius(etaC, phiC, eta, phi);
if(rad > fConeSize)
{
if(eta > (etaC-fConeSize) && eta < (etaC+fConeSize)) phiBandPtSumCluster += pt;
if(phi > (phiC-fConeSize) && phi < (phiC+fConeSize)) etaBandPtSumCluster += pt;
}
if(TMath::Abs(phi-phiC)>TMath::PiOver2()) continue ;
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)
{
AliDebug(2,"Inside candidate cone");
if(bFillAOD)
{
nclusterrefs++;
if(nclusterrefs==1)
{
refclusters = new TObjArray(0);
TString tempo(aodArrayRefName) ;
tempo += "Clusters" ;
refclusters->SetName(tempo);
refclusters->SetOwner(kFALSE);
}
refclusters->Add(calo);
}
coneptsumCluster+=pt;
if( ptLead < pt ) ptLead = pt;
}
}
}
if(bFillAOD)
{
if(refclusters) pCandidate->AddObjArray(refclusters);
if(reftracks) pCandidate->AddObjArray(reftracks);
}
coneptsum = coneptsumCluster + coneptsumTrack;
if(ptLead > fPtThreshold && ptLead < fPtThresholdMax) n = 1;
if(fFracIsThresh)
{
if( fPtFraction*ptC < fPtThreshold )
{
if( ptLead > fPtThreshold ) nfrac = 1 ;
}
else
{
if( ptLead > fPtFraction*ptC ) nfrac = 1;
}
}
else
{
if( ptLead > fPtFraction*ptC ) nfrac = 1;
}
if( fICMethod == kPtThresIC)
{
if( n == 0 ) isolated = kTRUE ;
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 )
{
if( coneptsum > fSumPtThreshold &&
coneptsum < fSumPtThresholdMax )
isolated = kFALSE ;
else
isolated = kTRUE ;
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 )
{
if(nfrac == 0 ) isolated = kTRUE ;
}
else if( fICMethod == kSumPtFracIC )
{
if( fFracIsThresh )
{
if( fPtFraction*ptC < fSumPtThreshold && coneptsum < fSumPtThreshold ) isolated = kTRUE ;
if( fPtFraction*ptC > fSumPtThreshold && coneptsum < fPtFraction*ptC ) isolated = kTRUE ;
}
else
{
if( coneptsum < fPtFraction*ptC ) isolated = kTRUE ;
}
}
else if( fICMethod == kSumDensityIC )
{
Float_t cellDensity = GetCellDensity(pCandidate,reader);
if( coneptsum < fSumPtThreshold*cellDensity )
isolated = kTRUE;
}
else if( fICMethod == kSumBkgSubIC )
{
Double_t coneptsumBkg = 0.;
Float_t etaBandPtSumTrackNorm = 0;
Float_t phiBandPtSumTrackNorm = 0;
Float_t etaBandPtSumClusterNorm = 0;
Float_t phiBandPtSumClusterNorm = 0;
Float_t excessFracEtaTrack = 1;
Float_t excessFracPhiTrack = 1;
Float_t excessFracEtaCluster = 1;
Float_t excessFracPhiCluster = 1;
if (fPartInCone != kOnlyCharged )
CalculateUEBandClusterNormalization(reader, etaC, phiC,
phiBandPtSumCluster , etaBandPtSumCluster,
phiBandPtSumClusterNorm, etaBandPtSumClusterNorm,
excessFracEtaCluster , excessFracPhiCluster );
if (fPartInCone != kOnlyNeutral )
CalculateUEBandTrackNormalization(reader, etaC, phiC,
phiBandPtSumTrack , etaBandPtSumTrack ,
phiBandPtSumTrackNorm, etaBandPtSumTrackNorm,
excessFracEtaTrack , excessFracPhiTrack );
if (fPartInCone == kOnlyCharged ) coneptsumBkg = etaBandPtSumTrackNorm;
else if(fPartInCone == kOnlyNeutral ) coneptsumBkg = etaBandPtSumClusterNorm;
else if(fPartInCone == kNeutralAndCharged ) coneptsumBkg = etaBandPtSumClusterNorm + etaBandPtSumTrackNorm;
coneptsum = coneptsumCluster+coneptsumTrack;
coneptsum -= coneptsumBkg;
if( coneptsum > fSumPtThreshold && coneptsum < fSumPtThresholdMax )
isolated = kFALSE ;
else
isolated = kTRUE ;
}
}
void AliIsolationCut::Print(const Option_t * opt) const
{
if(! opt)
return;
printf("**** Print %s %s **** \n", GetName(), GetTitle() ) ;
printf("IC method = %d\n", fICMethod ) ;
printf("Cone Size = %1.2f\n", fConeSize ) ;
printf("pT threshold = >%2.1f;<%2.1f\n", fPtThreshold , fPtThresholdMax) ;
printf("Sum pT threshold = >%2.1f;<%2.1f\n", fSumPtThreshold,fSumPtThresholdMax) ;
printf("pT fraction = %3.1f\n", fPtFraction ) ;
printf("particle type in cone = %d\n", fPartInCone ) ;
printf("using fraction for high pt leading instead of frac ? %i\n",fFracIsThresh);
printf(" \n") ;
}
Float_t AliIsolationCut::Radius(Float_t etaC, Float_t phiC,
Float_t eta , Float_t phi) const
{
Float_t dEta = etaC-eta;
Float_t dPhi = phiC-phi;
if(TMath::Abs(dPhi) >= TMath::Pi())
dPhi = TMath::TwoPi()-TMath::Abs(dPhi);
return TMath::Sqrt( dEta*dEta + dPhi*dPhi );
}