ROOT logo
AliRoot » EMCAL » AliEMCALRecoUtils

class AliEMCALRecoUtils: public TNamed


 Class AliEMCALRecoUtils
 Some utilities to recalculate the cluster position or energy linearity


 Author:  Gustavo Conesa (LPSC- Grenoble)
          Track matching part: Rongrong Ma (Yale)

Function Members (Methods)

public:
AliEMCALRecoUtils()
AliEMCALRecoUtils(const AliEMCALRecoUtils&)
virtual~AliEMCALRecoUtils()
voidTObject::AbstractMethod(const char* method) const
Bool_tAcceptCalibrateCell(Int_t absId, Int_t bc, Float_t& amp, Double_t& time, AliVCaloCells* cells)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
Bool_tCheckCellFiducialRegion(const AliEMCALGeometry* geom, const AliVCluster* cluster, AliVCaloCells* cells)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
Bool_tClusterContainsBadChannel(const AliEMCALGeometry* geom, const UShort_t* cellList, Int_t nCells)
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
Float_tCorrectClusterEnergyLinearity(AliVCluster* clu)
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
Bool_tExtrapolateTrackToCluster(AliExternalTrackParam* trkParam, const AliVCluster* cluster, Float_t& tmpEta, Float_t& tmpPhi)
static Bool_tExtrapolateTrackToCluster(AliExternalTrackParam* trkParam, const AliVCluster* cluster, Double_t mass, Double_t step, Float_t& tmpEta, Float_t& tmpPhi)
static Bool_tExtrapolateTrackToEMCalSurface(AliVTrack* track, Double_t emcalR = 440, Double_t mass = 0.1396, Double_t step = 20, Double_t minpT = 0.35, Bool_t useMassForTracking = kFALSE)
static Bool_tExtrapolateTrackToEMCalSurface(AliExternalTrackParam* trkParam, Double_t emcalR, Double_t mass, Double_t step, Float_t& eta, Float_t& phi, Float_t& pt)
static Bool_tExtrapolateTrackToPosition(AliExternalTrackParam* trkParam, const Float_t* clsPos, Double_t mass, Double_t step, Float_t& tmpEta, Float_t& tmpPhi)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
Int_tFindMatchedClusterInClusterArr(const AliExternalTrackParam* emcalParam, AliExternalTrackParam* trkParam, const TObjArray* clusterArr, Float_t& dEta, Float_t& dPhi)
Int_tFindMatchedClusterInEvent(const AliESDtrack* track, const AliVEvent* event, const AliEMCALGeometry* geom, Float_t& dEta, Float_t& dPhi)
UInt_tFindMatchedPosForCluster(Int_t clsIndex) const
UInt_tFindMatchedPosForTrack(Int_t trkIndex) const
voidFindMatches(AliVEvent* event, TObjArray* clusterArr = 0x0, const AliEMCALGeometry* geom = 0x0)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
Bool_tGetAcceptKinkDaughters() const
Float_tGetCellWeight(Float_t eCell, Float_t eCluster) const
Double_tGetClusterWindow() const
Float_tGetCutEta() const
Float_tGetCutPhi() const
Float_tGetCutR() const
Bool_tGetDCAToVertex2D() const
Float_tGetDepth(Float_t eCluster, Int_t iParticle, Int_t iSM) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Float_tGetECross(Int_t absID, Double_t tcell, AliVCaloCells* cells, Int_t bc)
TObjArray*GetEMCALBadChannelStatusMapArray() const
Float_tGetEMCALChannelRecalibrationFactor(Int_t iSM, Int_t iCol, Int_t iRow) const
TH2F*GetEMCALChannelRecalibrationFactors(Int_t iSM) const
Int_tGetEMCALChannelStatus(Int_t iSM, Int_t iCol, Int_t iRow) const
TH2I*GetEMCALChannelStatusMap(Int_t iSM) const
Float_tGetEMCALChannelTimeRecalibrationFactor(Int_t bc, Int_t absID) const
TH1F*GetEMCALChannelTimeRecalibrationFactors(Int_t bc) const
TObjArray*GetEMCALRecalibrationFactorsArray() const
TObjArray*GetEMCALTimeRecalibrationFactorsArray() const
Float_tGetExoticCellDiffTimeCut() const
Float_tGetExoticCellFractionCut() const
Float_tGetExoticCellMinAmplitudeCut() const
virtual const char*TObject::GetIconName() const
Double_tGetMass() const
Int_tGetMatchedClusterIndex(Int_t trkIndex)
voidGetMatchedClusterResiduals(Int_t trkIndex, Float_t& dEta, Float_t& dPhi)
voidGetMatchedResiduals(Int_t clsIndex, Float_t& dEta, Float_t& dPhi)
Int_tGetMatchedTrackIndex(Int_t clsIndex)
Float_tGetMaxChi2PerClusterITS() const
Float_tGetMaxChi2PerClusterTPC() const
Float_tGetMaxDCAToVertexXY() const
Float_tGetMaxDCAToVertexZ() const
voidGetMaxEnergyCell(const AliEMCALGeometry* geom, AliVCaloCells* cells, const AliVCluster* clu, Int_t& absId, Int_t& iSupMod, Int_t& ieta, Int_t& iphi, Bool_t& shared)
Int_tGetMinNClustersITS() const
Int_tGetMinNClusterTPC() const
Double_tGetMinTrackPt() const
Float_tGetMisalRotShift(Int_t i) const
Float_t*GetMisalRotShiftArray()
Float_tGetMisalTransShift(Int_t i) const
Float_t*GetMisalTransShiftArray()
virtual const char*TNamed::GetName() const
Int_tGetNonLinearityFunction() const
Float_tGetNonLinearityParam(Int_t i) const
Int_tGetNonLinearityThreshold() const
Int_tGetNumberOfCellsFromEMCALBorder() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Int_tGetParticleType() const
AliEMCALPIDUtils*GetPIDUtils()
Int_tGetPositionAlgorithm() const
Bool_tGetRequireITSRefit() const
Bool_tGetRequireITSStandAlone() const
Bool_tGetRequireTPCRefit() const
Double_tGetStep() const
Double_tGetStepSurface() const
virtual const char*TNamed::GetTitle() const
Int_tGetTrackCutsType() const
virtual UInt_tTObject::GetUniqueID() const
Float_tGetW0() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
voidInitEMCALBadChannelStatusMap()
voidInitEMCALRecalibrationFactors()
voidInitEMCALTimeRecalibrationFactors()
voidInitNonLinearityParam()
voidInitParameters()
voidInitTrackCuts()
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
Bool_tIsAccepted(AliESDtrack* track)
Bool_tIsBadChannelsRemovalSwitchedOn() const
Bool_tIsClusterEnergySmeared() const
Bool_tIsClusterMatched(Int_t clsIndex) const
Bool_tIsDistanceToBadChannelRecalculated() const
Bool_tIsEMCALNoBorderAtEta0() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
Bool_tIsExoticCell(Int_t absId, AliVCaloCells* cells, Int_t bc = -1)
Bool_tIsExoticCluster(const AliVCluster* cluster, AliVCaloCells* cells, Int_t bc = 0)
virtual Bool_tTObject::IsFolder() const
Bool_tIsGoodCluster(AliVCluster* cluster, const AliEMCALGeometry* geom, AliVCaloCells* cells, Int_t bc = -1)
Bool_tTObject::IsOnHeap() const
Bool_tIsRecalibrationOn() const
Bool_tIsRejectExoticCell() const
Bool_tIsRejectExoticCluster() const
Bool_tIsRunDepRecalibrationOn() const
virtual Bool_tTNamed::IsSortable() const
Bool_tIsTimeRecalibrationOn() const
Bool_tIsTrackMatched(Int_t trkIndex) const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
AliEMCALRecoUtils&operator=(const AliEMCALRecoUtils&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t*) const
virtual Int_tTObject::Read(const char* name)
voidRecalculateClusterDistanceToBadChannel(const AliEMCALGeometry* geom, AliVCaloCells* cells, AliVCluster* cluster)
voidRecalculateClusterPID(AliVCluster* cluster)
voidRecalculateClusterPosition(const AliEMCALGeometry* geom, AliVCaloCells* cells, AliVCluster* clu)
voidRecalculateClusterPositionFromTowerGlobal(const AliEMCALGeometry* geom, AliVCaloCells* cells, AliVCluster* clu)
voidRecalculateClusterPositionFromTowerIndex(const AliEMCALGeometry* geom, AliVCaloCells* cells, AliVCluster* clu)
voidRecalculateClusterShowerShapeParameters(const AliEMCALGeometry* geom, AliVCaloCells* cells, AliVCluster* cluster)
voidRecalculateClusterShowerShapeParameters(const AliEMCALGeometry* geom, AliVCaloCells* cells, AliVCluster* cluster, Float_t& l0, Float_t& l1, Float_t& disp, Float_t& dEta, Float_t& dPhi, Float_t& sEta, Float_t& sPhi, Float_t& sEtaPhi)
voidRecalibrateCells(AliVCaloCells* cells, Int_t bc)
voidRecalibrateCellTime(Int_t absId, Int_t bc, Double_t& time) const
voidRecalibrateClusterEnergy(const AliEMCALGeometry* geom, AliVCluster* cluster, AliVCaloCells* cells, Int_t bc = -1)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
voidResetCellsCalibrated()
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidSetAcceptKinkDaughters(Bool_t b = kTRUE)
voidSetAODTrackFilterMask(UInt_t mask)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidSetClusterMatchedToTrack(const AliVEvent* event)
voidSetClusterWindow(Double_t window)
voidSetCutEta(Float_t cutEta)
voidSetCutPhi(Float_t cutPhi)
voidSetCutR(Float_t cutR)
voidSetCutZ(Float_t cutZ)
voidSetDCAToVertex2D(Bool_t b = kFALSE)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetEMCALChannelRecalibrationFactor(Int_t iSM, Int_t iCol, Int_t iRow, Double_t c = 1)
voidSetEMCALChannelRecalibrationFactors(TObjArray* map)
voidSetEMCALChannelRecalibrationFactors(Int_t iSM, TH2F* h)
voidSetEMCALChannelStatus(Int_t iSM, Int_t iCol, Int_t iRow, Double_t c = 1)
voidSetEMCALChannelStatusMap(TObjArray* map)
voidSetEMCALChannelStatusMap(Int_t iSM, TH2I* h)
voidSetEMCALChannelTimeRecalibrationFactor(Int_t bc, Int_t absID, Double_t c = 0)
voidSetEMCALChannelTimeRecalibrationFactors(TObjArray* map)
voidSetEMCALChannelTimeRecalibrationFactors(Int_t bc, TH1F* h)
voidSetEMCalSurfaceDistance(Double_t d)
voidSetExoticCellDiffTimeCut(Float_t dt)
voidSetExoticCellFractionCut(Float_t f)
voidSetExoticCellMinAmplitudeCut(Float_t ma)
voidSetITSTrackSA(Bool_t isITS)
voidSetMass(Double_t mass)
voidSetMaxChi2PerClusterITS(Float_t max = 1e10)
voidSetMaxChi2PerClusterTPC(Float_t max = 1e10)
voidSetMaxDCAToVertexXY(Float_t dist = 1e10)
voidSetMaxDCAToVertexZ(Float_t dist = 1e10)
voidSetMinNClustersITS(Int_t min = -1)
voidSetMinNClustersTPC(Int_t min = -1)
voidSetMinTrackPt(Double_t pt = 0)
voidSetMisalRotShift(Int_t i, Float_t shift)
voidSetMisalRotShiftArray(Float_t* misal)
voidSetMisalTransShift(Int_t i, Float_t shift)
voidSetMisalTransShiftArray(Float_t* misal)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
voidSetNonLinearityFunction(Int_t fun)
voidSetNonLinearityParam(Int_t i, Float_t param)
voidSetNonLinearityThreshold(Int_t threshold)
voidSetNumberOfCellsFromEMCALBorder(Int_t n)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetParticleType(Int_t particle)
voidSetPositionAlgorithm(Int_t alg)
voidSetRequireITSPureStandAlone(Bool_t b = kFALSE)
voidSetRequireITSRefit(Bool_t b = kFALSE)
voidSetRequireITSStandAlone(Bool_t b = kFALSE)
voidSetRequireTPCRefit(Bool_t b = kFALSE)
voidSetSmearingParameters(Int_t i, Float_t param)
voidSetStep(Double_t step)
voidSetStepCluster(Double_t step)
virtual voidTNamed::SetTitle(const char* title = "")MENU
voidSetTrackCutsType(Int_t type)
voidSetTracksMatchedToCluster(const AliVEvent* event)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidSetW0(Float_t w0)
virtual voidShowMembers(TMemberInspector&)
virtual Int_tTNamed::Sizeof() const
Float_tSmearClusterEnergy(const AliVCluster* clu)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
voidSwitchOffAODHybridTracksMatch()
voidSwitchOffAODTPCOnlyTracksMatch()
voidSwitchOffBadChannelsRemoval()
voidSwitchOffClusterEnergySmearing()
voidSwitchOffDistToBadChannelRecalculation()
voidSwitchOffNoFiducialBorderInEMCALEta0()
voidSwitchOffRecalibration()
voidSwitchOffRejectExoticCell()
voidSwitchOffRejectExoticCluster()
voidSwitchOffRunDepCorrection()
voidSwitchOffTimeRecalibration()
voidSwitchOnAODHybridTracksMatch()
voidSwitchOnAODTPCOnlyTracksMatch()
voidSwitchOnBadChannelsRemoval()
voidSwitchOnClusterEnergySmearing()
voidSwitchOnCutEtaPhiSeparate()
voidSwitchOnCutEtaPhiSum()
voidSwitchOnDistToBadChannelRecalculation()
voidSwitchOnNoFiducialBorderInEMCALEta0()
voidSwitchOnRecalibration()
voidSwitchOnRejectExoticCell()
voidSwitchOnRejectExoticCluster()
voidSwitchOnRunDepCorrection()
voidSwitchOnTimeRecalibration()
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()

Data Members

public:
enum NonlinearityFunctions { kPi0MC
kPi0GammaGamma
kPi0GammaConversion
kNoCorrection
kBeamTest
kBeamTestCorrected
kPi0MCv2
kPi0MCv3
kBeamTestCorrectedv2
kSDMv5
kPi0MCv5
kSDMv6
kPi0MCv6
};
enum PositionAlgorithms { kUnchanged
kPosTowerIndex
kPosTowerGlobal
};
enum ParticleType { kPhoton
kElectron
kHadron
kUnknown
};
enum { kNCuts
};
enum TrackCutsType { kTPCOnlyCut
kGlobalCut
kLooseCut
kITSStandAlone
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
TStringTNamed::fNameobject identifier
TStringTNamed::fTitleobject title
private:
UInt_tfAODFilterMaskFilter mask to select AOD tracks. Refer to $ALICE_ROOT/ANALYSIS/macros/AddTaskESDFilter.C
Bool_tfAODHybridTracksMatch with hybrid
Bool_tfAODTPCOnlyTracksMatch with TPC only tracks
Bool_tfCellsRecalibratedInternal bool to check if cells (time/energy) where recalibrated and not recalibrate them when recalculating different things
Double_tfClusterWindowSelect clusters in the window to be matched
Bool_tfCutAcceptKinkDaughtersAccepting kink daughters?
Bool_tfCutDCAToVertex2DIf true a 2D DCA cut is made.
Float_tfCutEtadEta cut on matching
Bool_tfCutEtaPhiSeparateCut on dEta and dPhi separately
Bool_tfCutEtaPhiSumPlace cut on sqrt(dEta^2+dPhi^2)
Float_tfCutMaxChi2PerClusterITSMax its fit chi2 per its cluster
Float_tfCutMaxChi2PerClusterTPCMax tpc fit chi2 per tpc cluster
Float_tfCutMaxDCAToVertexXYTrack-to-vertex cut in max absolute distance in xy-plane
Float_tfCutMaxDCAToVertexZTrack-to-vertex cut in max absolute distance in z-plane
Int_tfCutMinNClusterITSMin number of its clusters
Int_tfCutMinNClusterTPCMin number of tpc clusters
Double_tfCutMinTrackPtCut on track pT
Float_tfCutPhidPhi cut on matching
Float_tfCutRsqrt(dEta^2+dPhi^2) cut on matching
Bool_tfCutRequireITSRefitRequire ITS refit
Bool_tfCutRequireITSStandAloneRequire ITSStandAlone
Bool_tfCutRequireITSpureSAITS pure standalone tracks
Bool_tfCutRequireTPCRefitRequire TPC refit
TObjArray*fEMCALBadChannelMapArray of histograms with map of bad channels, EMCAL
TObjArray*fEMCALRecalibrationFactorsArray of histograms with map of recalibration factors, EMCAL
TObjArray*fEMCALTimeRecalibrationFactorsArray of histograms with map of time recalibration factors, EMCAL
Double_tfEMCalSurfaceDistanceEMCal surface distance (= 430 by default, the last 10 cm are propagated on a cluster-track pair basis)
Float_tfExoticCellDiffTimeIf time of candidate to exotic and close cell is too different (in ns), it must be noisy, set amp to 0
Float_tfExoticCellFractionGood cell if fraction < 1-ecross/ecell
Float_tfExoticCellMinAmplitudeCheck for exotic only if amplitud is larger than this value
Bool_tfITSTrackSAIf track matching is to be done with ITS tracks standing alone
Double_tfMassMass hypothesis of the track
TArrayI*fMatchedClusterIndexArray that stores indexes of matched clusters
TArrayI*fMatchedTrackIndexArray that stores indexes of matched tracks
Float_tfMisalRotShift[15]Shift parameters
Float_tfMisalTransShift[15]Shift parameters
Int_tfNCellsFromEMCALBorderNumber of cells from EMCAL border the cell with maximum amplitude has to be.
Bool_tfNoEMCALBorderAtEta0Do fiducial cut in EMCAL region eta = 0?
Int_tfNonLinearThresholdNon linearity threshold value for kBeamTesh non linearity function
Int_tfNonLinearityFunctionNon linearity function choice
Float_tfNonLinearityParams[7]Parameters for the non linearity function
AliEMCALPIDUtils*fPIDUtilsRecalculate PID parameters
Int_tfParticleTypeParticle type for depth calculation
Int_tfPosAlgoPosition recalculation algorithm
TRandom3fRandomRandom generator
Bool_tfRecalDistToBadChannelsCalculate distance from highest energy tower of cluster to closes bad channel
Bool_tfRecalibrationSwitch on or off the recalibration
Bool_tfRejectExoticCellsRemove exotic cells
Bool_tfRejectExoticClusterSwitch on or off exotic cluster rejection
Bool_tfRemoveBadChannelsCheck the channel status provided and remove clusters with bad channels
TArrayF*fResidualEtaArray that stores the residual eta
TArrayF*fResidualPhiArray that stores the residual phi
Bool_tfSmearClusterEnergySmear cluster energy, to be done only for simulated data to match real data
Float_tfSmearClusterParam[3]Smearing parameters
Double_tfStepClusterLength of step to extrapolate tracks to clusters
Double_tfStepSurfaceLength of step to extrapolate tracks to EMCal surface
Bool_tfTimeRecalibrationSwitch on or off the time recalibration
Int_tfTrackCutsTypeEsd track cuts type for matching
Bool_tfUseRunCorrectionFactorsUse Run Dependent Correction
Float_tfW0Weight0

Class Charts

Inheritance Chart:
TNamed
AliEMCALRecoUtils

Function documentation

AliEMCALRecoUtils()
 Constructor.
 Initialize all constant values which have to be used
 during Reco algorithm execution

AliEMCALRecoUtils(const AliEMCALRecoUtils& )
Copy ctor
~AliEMCALRecoUtils()
Destructor.
Bool_t AcceptCalibrateCell(Int_t absId, Int_t bc, Float_t& amp, Double_t& time, AliVCaloCells* cells)
 Reject cell if criteria not passed and calibrate it
Bool_t CheckCellFiducialRegion(const AliEMCALGeometry* geom, const AliVCluster* cluster, AliVCaloCells* cells)
 Given the list of AbsId of the cluster, get the maximum cell and
 check if there are fNCellsFromBorder from the calorimeter border
Bool_t ClusterContainsBadChannel(const AliEMCALGeometry* geom, const UShort_t* cellList, Int_t nCells)
 Check that in the cluster cells, there is no bad channel of those stored
 in fEMCALBadChannelMap or fPHOSBadChannelMap
Float_t GetECross(Int_t absID, Double_t tcell, AliVCaloCells* cells, Int_t bc)
Calculate the energy in the cross around the energy given cell
Bool_t IsExoticCell(Int_t absId, AliVCaloCells* cells, Int_t bc = -1)
 Look to cell neighbourhood and reject if it seems exotic
 Do before recalibrating the cells
Bool_t IsExoticCluster(const AliVCluster* cluster, AliVCaloCells* cells, Int_t bc = 0)
 Check if the cluster highest energy tower is exotic
Float_t SmearClusterEnergy(const AliVCluster* clu)
In case of MC analysis, smear energy to match resolution/calibration in real data
Float_t CorrectClusterEnergyLinearity(AliVCluster* clu)
 Correct cluster energy from non linearity functions
void InitNonLinearityParam()
Initialising Non Linearity Parameters
Float_t GetDepth(Float_t eCluster, Int_t iParticle, Int_t iSM) const
Calculate shower depth for a given cluster energy and particle type
void GetMaxEnergyCell(const AliEMCALGeometry* geom, AliVCaloCells* cells, const AliVCluster* clu, Int_t& absId, Int_t& iSupMod, Int_t& ieta, Int_t& iphi, Bool_t& shared)
For a given CaloCluster gets the absId of the cell
with maximum energy deposit.
void InitParameters()
 Initialize data members with default values
void InitEMCALRecalibrationFactors()
Init EMCAL recalibration factors
void InitEMCALTimeRecalibrationFactors()
Init EMCAL recalibration factors
void InitEMCALBadChannelStatusMap()
Init EMCAL bad channels map
void RecalibrateClusterEnergy(const AliEMCALGeometry* geom, AliVCluster* cluster, AliVCaloCells* cells, Int_t bc = -1)
 Recalibrate the cluster energy and Time, considering the recalibration map
 and the energy of the cells and time that compose the cluster.
 bc= bunch crossing number returned by esdevent->GetBunchCrossNumber();
void RecalibrateCells(AliVCaloCells* cells, Int_t bc)
 Recalibrate the cells time and energy, considering the recalibration map and the energy
 of the cells that compose the cluster.
 bc= bunch crossing number returned by esdevent->GetBunchCrossNumber();
void RecalibrateCellTime(Int_t absId, Int_t bc, Double_t& time) const
 Recalibrate time of cell with absID  considering the recalibration map
 bc= bunch crossing number returned by esdevent->GetBunchCrossNumber();
void RecalculateClusterPosition(const AliEMCALGeometry* geom, AliVCaloCells* cells, AliVCluster* clu)
For a given CaloCluster recalculates the position for a given set of misalignment shifts and puts it again in the CaloCluster.
void RecalculateClusterPositionFromTowerGlobal(const AliEMCALGeometry* geom, AliVCaloCells* cells, AliVCluster* clu)
 For a given CaloCluster recalculates the position for a given set of misalignment shifts and puts it again in the CaloCluster.
 The algorithm is a copy of what is done in AliEMCALRecPoint
void RecalculateClusterPositionFromTowerIndex(const AliEMCALGeometry* geom, AliVCaloCells* cells, AliVCluster* clu)
 For a given CaloCluster recalculates the position for a given set of misalignment shifts and puts it again in the CaloCluster.
 The algorithm works with the tower indeces, averages the indeces and from them it calculates the global position
void RecalculateClusterDistanceToBadChannel(const AliEMCALGeometry* geom, AliVCaloCells* cells, AliVCluster* cluster)
re-evaluate distance to bad channel with updated bad map
void RecalculateClusterPID(AliVCluster* cluster)
re-evaluate identification parameters with bayesian
void RecalculateClusterShowerShapeParameters(const AliEMCALGeometry* geom, AliVCaloCells* cells, AliVCluster* cluster, Float_t& l0, Float_t& l1, Float_t& disp, Float_t& dEta, Float_t& dPhi, Float_t& sEta, Float_t& sPhi, Float_t& sEtaPhi)
 Calculates new center of gravity in the local EMCAL-module coordinates
 and tranfers into global ALICE coordinates
 Calculates Dispersion and main axis
void RecalculateClusterShowerShapeParameters(const AliEMCALGeometry* geom, AliVCaloCells* cells, AliVCluster* cluster)
 Calculates new center of gravity in the local EMCAL-module coordinates
 and tranfers into global ALICE coordinates
 Calculates Dispersion and main axis and puts them into the cluster
void FindMatches(AliVEvent* event, TObjArray* clusterArr = 0x0, const AliEMCALGeometry* geom = 0x0)
This function should be called before the cluster loop
Before call this function, please recalculate the cluster positions
Given the input event, loop over all the tracks, select the closest cluster as matched with fCutR
Store matched cluster indexes and residuals
Int_t FindMatchedClusterInEvent(const AliESDtrack* track, const AliVEvent* event, const AliEMCALGeometry* geom, Float_t& dEta, Float_t& dPhi)
 This function returns the index of matched cluster to input track
 Returns -1 if no match is found
Int_t FindMatchedClusterInClusterArr(const AliExternalTrackParam* emcalParam, AliExternalTrackParam* trkParam, const TObjArray* clusterArr, Float_t& dEta, Float_t& dPhi)
 Find matched cluster in array
Bool_t ExtrapolateTrackToEMCalSurface(AliVTrack* track, Double_t emcalR = 440, Double_t mass = 0.1396, Double_t step = 20, Double_t minpT = 0.35, Bool_t useMassForTracking = kFALSE)
 Extrapolate track to EMCAL surface
Bool_t ExtrapolateTrackToEMCalSurface(AliExternalTrackParam* trkParam, Double_t emcalR, Double_t mass, Double_t step, Float_t& eta, Float_t& phi, Float_t& pt)
Extrapolate track to EMCAL surface
Bool_t ExtrapolateTrackToPosition(AliExternalTrackParam* trkParam, const Float_t* clsPos, Double_t mass, Double_t step, Float_t& tmpEta, Float_t& tmpPhi)
Return the residual by extrapolating a track param to a global position

Bool_t ExtrapolateTrackToCluster(AliExternalTrackParam* trkParam, const AliVCluster* cluster, Double_t mass, Double_t step, Float_t& tmpEta, Float_t& tmpPhi)
Return the residual by extrapolating a track param to a cluster

Bool_t ExtrapolateTrackToCluster(AliExternalTrackParam* trkParam, const AliVCluster* cluster, Float_t& tmpEta, Float_t& tmpPhi)
Return the residual by extrapolating a track param to a clusterfStepCluster

void GetMatchedResiduals(Int_t clsIndex, Float_t& dEta, Float_t& dPhi)
Given a cluster index as in AliESDEvent::GetCaloCluster(clsIndex)
Get the residuals dEta and dPhi for this cluster to the closest track
Works with ESDs and AODs
void GetMatchedClusterResiduals(Int_t trkIndex, Float_t& dEta, Float_t& dPhi)
Given a track index as in AliESDEvent::GetTrack(trkIndex)
Get the residuals dEta and dPhi for this track to the closest cluster
Works with ESDs and AODs
Int_t GetMatchedTrackIndex(Int_t clsIndex)
Given a cluster index as in AliESDEvent::GetCaloCluster(clsIndex)
Get the index of matched track to this cluster
Works with ESDs and AODs
Int_t GetMatchedClusterIndex(Int_t trkIndex)
Given a track index as in AliESDEvent::GetTrack(trkIndex)
Get the index of matched cluster to this track
Works with ESDs and AODs
Bool_t IsClusterMatched(Int_t clsIndex) const
Given a cluster index as in AliESDEvent::GetCaloCluster(clsIndex)
Returns if the cluster has a match
Bool_t IsTrackMatched(Int_t trkIndex) const
Given a track index as in AliESDEvent::GetTrack(trkIndex)
Returns if the track has a match
UInt_t FindMatchedPosForCluster(Int_t clsIndex) const
Given a cluster index as in AliESDEvent::GetCaloCluster(clsIndex)
Returns the position of the match in the fMatchedClusterIndex array
UInt_t FindMatchedPosForTrack(Int_t trkIndex) const
Given a track index as in AliESDEvent::GetTrack(trkIndex)
Returns the position of the match in the fMatchedTrackIndex array
Bool_t IsGoodCluster(AliVCluster* cluster, const AliEMCALGeometry* geom, AliVCaloCells* cells, Int_t bc = -1)
 check if the cluster survives some quality cut


Bool_t IsAccepted(AliESDtrack* track)
 Given a esd track, return whether the track survive all the cuts
void InitTrackCuts()
Intilize the track cut criteria
By default these cuts are set according to AliESDtrackCuts::GetStandardTPCOnlyTrackCuts()
Also you can customize the cuts using the setters
void SetClusterMatchedToTrack(const AliVEvent* event)
 Checks if tracks are matched to EMC clusters and set the matched EMCAL cluster index to ESD track.
void SetTracksMatchedToCluster(const AliVEvent* event)
 Checks if EMC clusters are matched to ESD track.
 Adds track indexes of all the tracks matched to a cluster withing residuals in ESDCalocluster.
void Print(Option_t* ) const
 Print Parameters
AliEMCALRecoUtils& operator=(const AliEMCALRecoUtils& )
Float_t GetCellWeight(Float_t eCell, Float_t eCluster) const
Float_t GetMisalTransShift(Int_t i) const
Float_t* GetMisalTransShiftArray()
{ return fMisalTransShift ; }
void SetMisalTransShift(Int_t i, Float_t shift)
void SetMisalTransShiftArray(Float_t* misal)
{ for(Int_t i = 0; i < 15; i++) fMisalTransShift[i] = misal[i] ; }
Float_t GetMisalRotShift(Int_t i) const
Float_t* GetMisalRotShiftArray()
{ return fMisalRotShift ; }
void SetMisalRotShift(Int_t i, Float_t shift)
void SetMisalRotShiftArray(Float_t* misal)
{ for(Int_t i = 0; i < 15; i++)fMisalRotShift[i] = misal[i] ; }
Int_t GetParticleType() const
{ return fParticleType ; }
void SetParticleType(Int_t particle)
{ fParticleType = particle ; }
Int_t GetPositionAlgorithm() const
{ return fPosAlgo ; }
void SetPositionAlgorithm(Int_t alg)
{ fPosAlgo = alg ; }
Float_t GetW0() const
{ return fW0 ; }
void SetW0(Float_t w0)
{ fW0 = w0 ; }
Float_t GetNonLinearityParam(Int_t i) const
void SetNonLinearityParam(Int_t i, Float_t param)
Int_t GetNonLinearityFunction() const
void SetNonLinearityFunction(Int_t fun)
void SetNonLinearityThreshold(Int_t threshold)
{ fNonLinearThreshold = threshold ; }
Int_t GetNonLinearityThreshold() const
{ return fNonLinearThreshold ; }
void SwitchOnClusterEnergySmearing()
void SwitchOffClusterEnergySmearing()
Bool_t IsClusterEnergySmeared() const
{ return fSmearClusterEnergy ; }
void SetSmearingParameters(Int_t i, Float_t param)
void ResetCellsCalibrated()
Bool_t IsRecalibrationOn() const
 Energy recalibration
{ return fRecalibration ; }
void SwitchOffRecalibration()
void SwitchOnRecalibration()
TObjArray* GetEMCALRecalibrationFactorsArray() const
TH2F * GetEMCALChannelRecalibrationFactors(Int_t iSM) const
{ return (TH2F*)fEMCALRecalibrationFactors->At(iSM) ; }
void SetEMCALChannelRecalibrationFactors(TObjArray* map)
void SetEMCALChannelRecalibrationFactors(Int_t iSM, TH2F* h)
{ fEMCALRecalibrationFactors->AddAt(h,iSM) ; }
Float_t GetEMCALChannelRecalibrationFactor(Int_t iSM, Int_t iCol, Int_t iRow) const
void SetEMCALChannelRecalibrationFactor(Int_t iSM, Int_t iCol, Int_t iRow, Double_t c = 1)
Bool_t IsRunDepRecalibrationOn() const
Recalibrate channels energy with run dependent corrections
void SwitchOffRunDepCorrection()
void SwitchOnRunDepCorrection()
Bool_t IsTimeRecalibrationOn() const
{ return fTimeRecalibration ; }
void SwitchOffTimeRecalibration()
void SwitchOnTimeRecalibration()
TObjArray* GetEMCALTimeRecalibrationFactorsArray() const
Float_t GetEMCALChannelTimeRecalibrationFactor(Int_t bc, Int_t absID) const
void SetEMCALChannelTimeRecalibrationFactor(Int_t bc, Int_t absID, Double_t c = 0)
TH1F * GetEMCALChannelTimeRecalibrationFactors(Int_t bc) const
{ return (TH1F*)fEMCALTimeRecalibrationFactors->At(bc) ; }
void SetEMCALChannelTimeRecalibrationFactors(TObjArray* map)
void SetEMCALChannelTimeRecalibrationFactors(Int_t bc, TH1F* h)
void SetNumberOfCellsFromEMCALBorder(Int_t n)
Int_t GetNumberOfCellsFromEMCALBorder() const
void SwitchOnNoFiducialBorderInEMCALEta0()
void SwitchOffNoFiducialBorderInEMCALEta0()
Bool_t IsEMCALNoBorderAtEta0() const
Bool_t IsBadChannelsRemovalSwitchedOn() const
 Bad channels

{ return fRemoveBadChannels ; }
void SwitchOffBadChannelsRemoval()
void SwitchOnBadChannelsRemoval()
Bool_t IsDistanceToBadChannelRecalculated() const
void SwitchOffDistToBadChannelRecalculation()
void SwitchOnDistToBadChannelRecalculation()
TObjArray* GetEMCALBadChannelStatusMapArray() const
{ return fEMCALBadChannelMap ; }
Int_t GetEMCALChannelStatus(Int_t iSM, Int_t iCol, Int_t iRow) const
void SetEMCALChannelStatus(Int_t iSM, Int_t iCol, Int_t iRow, Double_t c = 1)
TH2I * GetEMCALChannelStatusMap(Int_t iSM) const
{ return (TH2I*)fEMCALBadChannelMap->At(iSM) ; }
void SetEMCALChannelStatusMap(TObjArray* map)
void SetEMCALChannelStatusMap(Int_t iSM, TH2I* h)
{ fEMCALBadChannelMap->AddAt(h,iSM) ; }
AliEMCALPIDUtils * GetPIDUtils()
{ return fPIDUtils;}
void SwitchOnCutEtaPhiSum()
void SwitchOnCutEtaPhiSeparate()
Float_t GetCutR() const
{ return fCutR ; }
Float_t GetCutEta() const
{ return fCutEta ; }
Float_t GetCutPhi() const
{ return fCutPhi ; }
Double_t GetClusterWindow() const
{ return fClusterWindow ; }
void SetCutR(Float_t cutR)
{ fCutR = cutR ; }
void SetCutEta(Float_t cutEta)
{ fCutEta = cutEta ; }
void SetCutPhi(Float_t cutPhi)
{ fCutPhi = cutPhi ; }
void SetClusterWindow(Double_t window)
{ fClusterWindow = window ; }
void SetCutZ(Float_t cutZ)
{ printf("Obsolete fucntion of cutZ=%1.1f\n",cutZ) ; }
void SetEMCalSurfaceDistance(Double_t d)
Double_t GetMass() const
{ return fMass ; }
Double_t GetStep() const
{ return fStepCluster ; }
Double_t GetStepSurface() const
{ return fStepSurface ; }
void SetMass(Double_t mass)
{ fMass = mass ; }
void SetStep(Double_t step)
{ fStepSurface = step ; }
void SetStepCluster(Double_t step)
{ fStepCluster = step ; }
void SetITSTrackSA(Bool_t isITS)
{ fITSTrackSA = isITS ; }
void SwitchOnRejectExoticCell()
void SwitchOffRejectExoticCell()
Bool_t IsRejectExoticCell() const
{ return fRejectExoticCells ; }
Float_t GetExoticCellFractionCut() const
{ return fExoticCellFraction ; }
Float_t GetExoticCellDiffTimeCut() const
{ return fExoticCellDiffTime ; }
Float_t GetExoticCellMinAmplitudeCut() const
void SetExoticCellFractionCut(Float_t f)
void SetExoticCellDiffTimeCut(Float_t dt)
void SetExoticCellMinAmplitudeCut(Float_t ma)
void SwitchOnRejectExoticCluster()
void SwitchOffRejectExoticCluster()
Bool_t IsRejectExoticCluster() const
void SetTrackCutsType(Int_t type)
Int_t GetTrackCutsType() const
{ return fTrackCutsType; }
void SwitchOffAODHybridTracksMatch()
 Define AOD track type for matching
void SwitchOffAODTPCOnlyTracksMatch()
void SwitchOnAODHybridTracksMatch()
void SwitchOnAODTPCOnlyTracksMatch()
void SetAODTrackFilterMask(UInt_t mask)
void SetMinTrackPt(Double_t pt = 0)
 track quality cut setters
{ fCutMinTrackPt = pt ; }
void SetMinNClustersTPC(Int_t min = -1)
{ fCutMinNClusterTPC = min ; }
void SetMinNClustersITS(Int_t min = -1)
{ fCutMinNClusterITS = min ; }
void SetMaxChi2PerClusterTPC(Float_t max = 1e10)
void SetMaxChi2PerClusterITS(Float_t max = 1e10)
void SetRequireTPCRefit(Bool_t b = kFALSE)
void SetRequireITSRefit(Bool_t b = kFALSE)
void SetAcceptKinkDaughters(Bool_t b = kTRUE)
void SetMaxDCAToVertexXY(Float_t dist = 1e10)
void SetMaxDCAToVertexZ(Float_t dist = 1e10)
{ fCutMaxDCAToVertexZ = dist ; }
void SetDCAToVertex2D(Bool_t b = kFALSE)
void SetRequireITSStandAlone(Bool_t b = kFALSE)
void SetRequireITSPureStandAlone(Bool_t b = kFALSE)
Double_t GetMinTrackPt() const
 getters
{ return fCutMinTrackPt ; }
Int_t GetMinNClusterTPC() const
{ return fCutMinNClusterTPC ; }
Int_t GetMinNClustersITS() const
{ return fCutMinNClusterITS ; }
Float_t GetMaxChi2PerClusterTPC() const
Float_t GetMaxChi2PerClusterITS() const
Bool_t GetRequireTPCRefit() const
{ return fCutRequireTPCRefit ; }
Bool_t GetRequireITSRefit() const
{ return fCutRequireITSRefit ; }
Bool_t GetAcceptKinkDaughters() const
Float_t GetMaxDCAToVertexXY() const
Float_t GetMaxDCAToVertexZ() const
{ return fCutMaxDCAToVertexZ ; }
Bool_t GetDCAToVertex2D() const
{ return fCutDCAToVertex2D ; }
Bool_t GetRequireITSStandAlone() const