1 #ifndef ALIEMCALRECOUTILS_H 2 #define ALIEMCALRECOUTILS_H 52 #include "AliEMCALRecoUtilsBase.h" 53 class AliEMCALGeometry;
54 class AliEMCALPIDUtils;
56 class AliExternalTrackParam;
104 void GetMaxEnergyCell(
const AliEMCALGeometry *geom, AliVCaloCells* cells,
const AliVCluster* clu,
108 else { AliInfo(Form(
"Index %d larger than 15, do nothing\n",i)) ;
112 else { AliInfo(Form(
"Index %d larger than 15, do nothing\n",i)) ; } }
115 else { AliInfo(Form(
"Index %d larger than 15, do nothing\n",i)) ;
119 else { AliInfo(Form(
"Index %d larger than 15, do nothing\n",i)) ; } }
135 else { AliInfo(Form(
"Index %d larger than 9 or negative, do nothing\n",i)) ;
138 else { AliInfo(Form(
"Index %d larger than 9 or negative, do nothing\n",i)) ; } }
153 else { AliInfo(Form(
"Index %d larger than 2, do nothing\n",i)) ; } }
240 const AliVCluster* cluster,
241 AliVCaloCells* cells) ;
297 void FindMatches(AliVEvent *event,
TObjArray * clusterArr=0x0,
const AliEMCALGeometry *geom=0x0, AliMCEvent* mc = 0x0);
301 AliExternalTrackParam *trkParam,
309 {
return AliEMCALRecoUtilsBase::ExtrapolateTrackToCluster (trkParam, cluster, mass, step, tmpEta, tmpPhi) ; }
336 void SetCutZ(
Float_t cutZ) { printf(
"Obsolete fucntion of cutZ=%1.1f\n",cutZ) ; }
399 AliVCaloCells* cells,
Int_t bc);
414 AliVCaloCells* cells,
Int_t bc =-1);
426 {
if (ig < fNMCGenerToAccept && ig > 0 && ig < 5 )
return fMCGenerToAccept[ig] ;
546 #endif // ALIEMCALRECOUTILS_H
Bool_t IsRunDepRecalibrationOn() const
void RecalculateCellLabelsRemoveAddedGenerator(Int_t absID, AliVCluster *clus, AliMCEvent *mc, Float_t &, TArrayI &labeArr, TArrayF &eDepArr) const
void SetCutPhi(Float_t cutPhi)
TH1F * GetEMCALChannelTimeRecalibrationFactors(Int_t bc) const
Int_t GetNonLinearityThreshold() const
Bool_t IsL1PhaseInTimeRecalibrationOn() const
Double_t fMass
Mass hypothesis of the track.
Double_t GetMinTrackPt() const
void SetShowerShapeCellLocationType(Int_t type)
Bool_t fMCGenerToAcceptForTrack
Activate the removal of tracks entering the track matching that come from a particular generator...
Float_t GetMisalTransShift(Int_t i) const
TObjArray * GetEMCALRecalibrationFactorsArray() const
Bool_t CheckCellFiducialRegion(const AliEMCALGeometry *geom, const AliVCluster *cluster, AliVCaloCells *cells)
Bool_t fAODTPCOnlyTracks
Match with TPC only tracks.
TH2F * GetEMCALChannelRecalibrationFactors(Int_t iSM) const
Bool_t fCutRequireTPCRefit
Require TPC refit.
void InitEMCALRecalibrationFactors()
void SwitchOnCutEtaPhiSum()
Int_t GetPositionAlgorithm() const
void SetRequireITSStandAlone(Bool_t b=kFALSE)
Bool_t IsClusterMatched(Int_t clsIndex) const
Float_t GetEMCALChannelTimeRecalibrationFactor(Int_t bc, Int_t absID, Bool_t isLGon=kFALSE) const
Double_t GetClusterWindow() const
Bool_t IsRejectExoticCluster() const
void SetNumberOfCellsFromEMCALBorder(Int_t n)
TArrayI * fMatchedClusterIndex
Array that stores indexes of matched clusters.
TObjArray * fEMCALTimeRecalibrationFactors
Array of histograms with map of time recalibration factors, EMCAL.
Float_t GetExoticCellFractionCut() const
void SetMaxDCAToVertexXY(Float_t dist=1e10)
TRandom3 fRandom
Random generator for cluster energy smearing.
Bool_t fTimeRecalibration
Switch on or off the time recalibration.
void SwitchOffAODTPCOnlyTracksMatch()
void SwitchOffDistToBadChannelRecalculation()
Bool_t fCutEtaPhiSum
Place cut on sqrt(dEta^2+dPhi^2)
Int_t FindMatchedClusterInClusterArr(const AliExternalTrackParam *emcalParam, AliExternalTrackParam *trkParam, const TObjArray *clusterArr, Float_t &dEta, Float_t &dPhi)
void InitEMCALL1PhaseInTimeRecalibration()
Int_t fCutMinNClusterTPC
Min number of tpc clusters.
Float_t fCutMaxDCAToVertexZ
Track-to-vertex cut in max absolute distance in z-plane.
void SetRequireITSRefit(Bool_t b=kFALSE)
void SetNonLinearityThreshold(Int_t threshold)
TH1C * GetEMCALL1PhaseInTimeRecalibrationForAllSM() const
Int_t fShowerShapeCellLocationType
void SetEMCALL1PhaseInTimeRecalibrationForSM(Int_t iSM, Int_t c=0)
Float_t GetMaxChi2PerClusterITS() const
void SetDCAToVertex2D(Bool_t b=kFALSE)
Float_t * GetMisalTransShiftArray()
void SetEMCALChannelRecalibrationFactor(Int_t iSM, Int_t iCol, Int_t iRow, Double_t c=1)
Int_t fNonLinearThreshold
Non linearity threshold value for kBeamTest non linearity function.
TrackCutsType
Track matching cuts enum list.
Bool_t fITSTrackSA
If track matching is to be done with ITS tracks standing alone.
void SetITSTrackSA(Bool_t isITS)
Float_t GetMisalRotShift(Int_t i) const
Bool_t IsExoticCluster(const AliVCluster *cluster, AliVCaloCells *cells, Int_t bc=0)
Int_t GetMinNClusterTPC() const
void SetNumberOfMCGeneratorsToAccept(Int_t nGen)
Float_t fMisalRotShift[15]
Cluster position rotation shift parameters.
void SetMinNClustersTPC(Int_t min=-1)
virtual ~AliEMCALRecoUtils()
Int_t GetNumberOfCellsFromEMCALBorder() const
TObjArray * GetEMCALBadChannelStatusMapArray() const
Bool_t fRecalDistToBadChannels
Calculate distance from highest energy tower of cluster to closes bad channel.
Bool_t fRecalibration
Switch on or off the recalibration.
void SetMisalRotShift(Int_t i, Float_t shift)
TArrayI * fMatchedTrackIndex
Array that stores indexes of matched tracks.
void SetMaxDCAToVertexZ(Float_t dist=1e10)
void SwitchOffNoFiducialBorderInEMCALEta0()
Bool_t GetRequireTPCRefit() const
void SetCutZ(Float_t cutZ)
Bool_t IsBadChannelsRemovalSwitchedOn() const
Bool_t IsExoticCell(Int_t absId, AliVCaloCells *cells, Int_t bc=-1)
Int_t GetParticleType() const
void RecalculateClusterPositionFromTowerGlobal(const AliEMCALGeometry *geom, AliVCaloCells *cells, AliVCluster *clu)
void SwitchOffRecalibration()
Float_t fExoticCellDiffTime
If time of candidate to exotic and close cell is too different (in ns), it must be noisy...
void SetNonLinearityFunction(Int_t fun)
Float_t GetNonLinearityParam(Int_t i) const
TArrayF * fResidualPhi
Array that stores the residual phi.
Bool_t IsDistanceToBadChannelRecalculated() const
void SetMisalTransShiftArray(Float_t *misal)
void RecalibrateCells(AliVCaloCells *cells, Int_t bc)
Double_t fCutMinTrackPt
Cut on track pT.
PositionAlgorithms
Cluster position enum list of possible algoritms.
Float_t GetMaxDCAToVertexXY() const
Bool_t IsRecalibrationOn() const
Some utilities for cluster and cell treatment.
Float_t fCutMaxChi2PerClusterITS
Max its fit chi2 per its cluster.
void SetAODTrackFilterMask(UInt_t mask)
void RecalculateClusterShowerShapeParametersWithCellCuts(const AliEMCALGeometry *geom, AliVCaloCells *cells, AliVCluster *cluster, Float_t cellEcut, Float_t cellTimeCut, Int_t bc, Float_t &enAfterCuts)
TObjArray * GetEMCALL1PhaseInTimeRecalibrationArray() const
Bool_t fRemoveBadChannels
Check the channel status provided and remove clusters with bad channels.
Bool_t IsAccepted(AliESDtrack *track)
Float_t fMisalTransShift[15]
Cluster position translation shift parameters.
void SwitchOffMCGeneratorToAcceptForTrackMatching()
void SetAcceptKinkDaughters(Bool_t b=kTRUE)
void SwitchOffAODHybridTracksMatch()
TString GetNameOfMCGeneratorsToAccept(Int_t ig) const
void SwitchOnAODTPCOnlyTracksMatch()
void RecalculateClusterDistanceToBadChannel(const AliEMCALGeometry *geom, AliVCaloCells *cells, AliVCluster *cluster)
void SwitchOffRejectExoticCell()
TH2I * GetEMCALChannelStatusMap(Int_t iSM) const
Double_t fClusterWindow
Select clusters in the window to be matched.
Bool_t fCutRequireITSRefit
Require ITS refit.
Float_t fNonLinearityParams[10]
Parameters for the non linearity function.
Float_t GetCellWeight(Float_t eCell, Float_t eCluster) const
void SwitchOnBadChannelsRemoval()
Bool_t fUseL1PhaseInTimeRecalibration
Switch on or off the L1 phase in time recalibration.
Float_t GetEMCALChannelRecalibrationFactor(Int_t iSM, Int_t iCol, Int_t iRow) const
void SetClusterMatchedToTrack(const AliVEvent *event)
Int_t GetMinNClustersITS() const
Bool_t fCutDCAToVertex2D
If true a 2D DCA cut is made.
Int_t GetMatchedTrackIndex(Int_t clsIndex)
void SwitchOffRejectExoticCluster()
void RecalculateClusterPositionFromTowerIndex(const AliEMCALGeometry *geom, AliVCaloCells *cells, AliVCluster *clu)
void SwitchOnL1PhaseInTimeRecalibration()
void Print(const Option_t *) const
UInt_t FindMatchedPosForCluster(Int_t clsIndex) const
Bool_t AcceptCalibrateCell(Int_t absId, Int_t bc, Float_t &, Double_t &time, AliVCaloCells *cells)
Bool_t AcceptMCGeneratorForTrackMatching() const
Bool_t IsEMCALNoBorderAtEta0() const
void RecalculateClusterShowerShapeParameters(const AliEMCALGeometry *geom, AliVCaloCells *cells, AliVCluster *cluster)
Float_t fCutR
sqrt(dEta^2+dPhi^2) cut on matching
Int_t fNCellsFromEMCALBorder
Number of cells from EMCAL border the cell with maximum amplitude has to be.
Bool_t fCellsRecalibrated
Internal bool to check if cells (time/energy) where recalibrated and not recalibrate them when recalc...
Double_t GetStepSurface() const
Bool_t fRejectExoticCluster
Switch on or off exotic cluster rejection.
Float_t GetExoticCellDiffTimeCut() const
Bool_t IsTimeRecalibrationOn() const
void SetExoticCellDiffTimeCut(Float_t dt)
void SetMaxChi2PerClusterITS(Float_t max=1e10)
void SetMisalTransShift(Int_t i, Float_t shift)
Int_t fParticleType
Particle type for depth calculation, see enum ParticleType.
Int_t GetEMCALChannelStatus(Int_t iSM, Int_t iCol, Int_t iRow) const
void SetMaxChi2PerClusterTPC(Float_t max=1e10)
Float_t fConstantTimeShift
Apply a 600 ns (+15.8) time shift in case of simulation, shift in ns.
Int_t GetMatchedClusterIndex(Int_t trkIndex)
Int_t fNonLinearityFunction
Non linearity function choice, see enum NonlinearityFunctions.
Bool_t fCutRequireITSStandAlone
Require ITSStandAlone.
void SetNonLinearityParam(Int_t i, Float_t param)
TObjArray * fEMCALL1PhaseInTimeRecalibration
Histogram with map of L1 phase per SM, EMCAL.
TObjArray * fEMCALRecalibrationFactors
Array of histograms with map of recalibration factors, EMCAL.
void SwitchOnRecalibration()
Bool_t fUseRunCorrectionFactors
Use Run Dependent Correction.
void SwitchOffBadChannelsRemoval()
void SetTracksMatchedToCluster(const AliVEvent *event)
Bool_t GetRequireITSStandAlone() const
Float_t fCutMaxChi2PerClusterTPC
Max tpc fit chi2 per tpc cluster.
Float_t fExoticCellMinAmplitude
Check for exotic only if amplitud is larger than this value.
void RecalibrateClusterEnergy(const AliEMCALGeometry *geom, AliVCluster *cluster, AliVCaloCells *cells, Int_t bc=-1)
Float_t fW0
Energy weight used in cluster position and shower shape calculations.
Bool_t fAODHybridTracks
Match with hybrid.
void GetMatchedResiduals(Int_t clsIndex, Float_t &dEta, Float_t &dPhi)
AliEMCALRecoUtils & operator=(const AliEMCALRecoUtils &)
void SetRequireTPCRefit(Bool_t b=kFALSE)
Int_t GetNonLinearityFunction() const
void SetPositionAlgorithm(Int_t alg)
void SetSmearingParameters(Int_t i, Float_t param)
TArrayF * fResidualEta
Array that stores the residual eta.
void SetEMCalSurfaceDistance(Double_t d)
void SwitchOffRunDepCorrection()
void SwitchOffL1PhaseInTimeRecalibration()
void SwitchOnMCGeneratorToAcceptForTrackMatching()
void SetClusterWindow(Double_t window)
TString fMCGenerToAccept[5]
List with name of generators that should not be included.
void SetCutR(Float_t cutR)
void SwitchOnDistToBadChannelRecalculation()
void SetMinTrackPt(Double_t pt=0)
Bool_t fSmearClusterEnergy
Smear cluster energy, to be done only for simulated data to match real data.
Bool_t IsGoodCluster(AliVCluster *cluster, const AliEMCALGeometry *geom, AliVCaloCells *cells, Int_t bc=-1)
void SetParticleType(Int_t particle)
Bool_t IsClusterEnergySmeared() const
void SetEMCALChannelStatus(Int_t iSM, Int_t iCol, Int_t iRow, Double_t c=1)
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)
Float_t GetExoticCellMinAmplitudeCut() const
void InitEMCALTimeRecalibrationFactors()
Double_t fStepSurface
Length of step to extrapolate tracks to EMCal surface.
void SwitchOnAODHybridTracksMatch()
void SwitchOnNoFiducialBorderInEMCALEta0()
UInt_t fAODFilterMask
Filter mask to select AOD tracks. Refer to $ALICE_ROOT/ANALYSIS/macros/AddTaskESDFilter.C.
static Bool_t ExtrapolateTrackToCluster(AliExternalTrackParam *trkParam, const AliVCluster *cluster, Double_t mass, Double_t step, Float_t &tmpEta, Float_t &tmpPhi)
void GetMatchedClusterResiduals(Int_t trkIndex, Float_t &dEta, Float_t &dPhi)
Float_t fSmearClusterParam[3]
Energy smearing parameters.
Bool_t fCutAcceptKinkDaughters
Accepting kink daughters?
void RecalculateClusterPosition(const AliEMCALGeometry *geom, AliVCaloCells *cells, AliVCluster *clu)
void SwitchOnRunDepCorrection()
Float_t fExoticCellFraction
Good cell if fraction < 1-ecross/ecell.
void RecalculateClusterPID(AliVCluster *cluster)
Int_t fPosAlgo
Position recalculation algorithm, see enum PositionAlgorithms.
void SetEMCALL1PhaseInTimeRecalibrationForAllSM(const TObjArray *map)
void SwitchOnRejectExoticCluster()
Bool_t GetAcceptKinkDaughters() const
AliEMCALPIDUtils * fPIDUtils
Recalculate PID parameters.
Bool_t IsRejectExoticCell() const
Bool_t fRejectExoticCells
Remove exotic cells.
void SwitchOffTimeRecalibration()
Int_t FindMatchedClusterInEvent(const AliESDtrack *track, const AliVEvent *event, const AliEMCALGeometry *geom, Float_t &dEta, Float_t &dPhi)
Bool_t IsTrackMatched(Int_t trkIndex) const
void SetExoticCellMinAmplitudeCut(Float_t ma)
void RecalibrateCellTimeL1Phase(Int_t iSM, Int_t bc, Double_t &time) const
TObjArray * GetEMCALTimeRecalibrationFactorsArray() const
Float_t fCutMaxDCAToVertexXY
Track-to-vertex cut in max absolute distance in xy-plane.
void SetRequireITSPureStandAlone(Bool_t b=kFALSE)
Bool_t GetDCAToVertex2D() const
Bool_t GetRequireITSRefit() const
void SwitchOnClusterEnergySmearing()
Float_t GetCutEta() const
void FindMatches(AliVEvent *event, TObjArray *clusterArr=0x0, const AliEMCALGeometry *geom=0x0, AliMCEvent *mc=0x0)
void SetExoticCellFractionCut(Float_t f)
TObjArray * fEMCALBadChannelMap
Array of histograms with map of bad channels, EMCAL.
void SetEMCALChannelTimeRecalibrationFactors(const TObjArray *map)
Double_t fStepCluster
Length of step to extrapolate tracks to clusters.
Bool_t fNoEMCALBorderAtEta0
Do fiducial cut in EMCAL region eta = 0?
Int_t fNMCGenerToAccept
Number of MC generators that should not be included in analysis.
void SwitchOnCutEtaPhiSeparate()
void SetEMCALChannelTimeRecalibrationFactor(Int_t bc, Int_t absID, Double_t c=0, Bool_t isLGon=kFALSE)
Bool_t fCutRequireITSpureSA
ITS pure standalone tracks.
void InitEMCALBadChannelStatusMap()
Int_t GetEMCALL1PhaseInTimeRecalibrationForSM(Int_t iSM) const
Int_t fCutMinNClusterITS
Min number of its clusters.
AliEMCALPIDUtils * GetPIDUtils()
void SetTrackCutsType(Int_t type)
Float_t CorrectClusterEnergyLinearity(AliVCluster *clu)
UInt_t FindMatchedPosForTrack(Int_t trkIndex) const
void SetMisalRotShiftArray(Float_t *misal)
void SetCutEta(Float_t cutEta)
Bool_t ClusterContainsBadChannel(const AliEMCALGeometry *geom, const UShort_t *cellList, Int_t nCells)
Double_t fEMCalSurfaceDistance
EMCal surface distance (= 430 by default, the last 10 cm are propagated on a cluster-track pair basis...
Float_t GetCutPhi() const
void SetStepCluster(Double_t step)
void SetEMCALChannelRecalibrationFactors(const TObjArray *map)
Int_t GetNumberOfMCGeneratorsToAccept() const
Int_t GetTrackCutsType() const
void ResetCellsCalibrated()
void InitNonLinearityParam()
void SwitchOffClusterEnergySmearing()
Float_t GetECross(Int_t absID, Double_t tcell, AliVCaloCells *cells, Int_t bc)
void SwitchOnTimeRecalibration()
Bool_t fLowGain
Switch on or off calibration with low gain channels.
void SetEMCALChannelStatusMap(const TObjArray *map)
Float_t fCutPhi
dPhi cut on matching
Float_t * GetMisalRotShiftArray()
void SetConstantTimeShift(Float_t shift)
Int_t fTrackCutsType
ESD track cuts type for matching, see enum TrackCutsType.
Float_t GetMaxChi2PerClusterTPC() const
Float_t GetMaxDCAToVertexZ() const
void SetMinNClustersITS(Int_t min=-1)
void RecalibrateCellTime(Int_t absId, Int_t bc, Double_t &time, Bool_t isLGon=kFALSE) const
Bool_t fCutEtaPhiSeparate
Cut on dEta and dPhi separately.
void SetMass(Double_t mass)
Float_t fCutEta
dEta cut on matching
void SwitchOnRejectExoticCell()
void SetStep(Double_t step)
Float_t SmearClusterEnergy(const AliVCluster *clu)
void SetNameOfMCGeneratorsToAccept(Int_t ig, TString name)