1 #ifndef ALICALORIMETERUTILS_H 2 #define ALICALORIMETERUTILS_H 24 #include <TObjArray.h> 27 #include <TGeoMatrix.h> 34 class AliAODCaloCluster;
36 class AliPHOSGeoUtils;
37 class AliEMCALGeometry;
38 class AliAODMCParticle;
63 AliVCluster* cluster);
87 AliAODCaloCluster *cluster1, AliAODCaloCluster *cluster2,
189 else printf(
"Not set, position larger than allocated set size first") ; }
335 AliMCEvent* mc = 0x0) ;
497 #endif //ALICALORIMETERUTILS_H void SwitchOnBadChannelsRemoval()
void SetCutEta(Float_t e)
void SetCutPhi(Float_t cutPhi)
Bool_t fRecalculatePosition
Recalculate cluster position.
void SetNumberOfCellsFromPHOSBorder(Int_t n)
void SwitchOffRunDepCorrection()
AliEMCALGeometry * fEMCALGeo
! EMCAL geometry pointer.
Bool_t IsL1PhaseInTimeRecalibrationOn() const
Bool_t IsMCParticleInCalorimeterAcceptance(Int_t calo, AliVParticle *particle)
Check that a MC AOD is in the calorimeter acceptance.
void InitPHOSRecalibrationFactors()
Init PHOS recalibration factors.
void SetRunNumber(Int_t run)
Bool_t IsRecalculationOfClusterTrackMatchingOn() const
TH2F * GetEMCALChannelRecalibrationFactors(Int_t iSM) const
TGeoHMatrix * fEMCALMatrix[22]
Geometry matrices with alignments.
Int_t GetPHOSChannelStatus(Int_t imod, Int_t iCol, Int_t iRow) const
void SetFirstSuperModuleUsed(Int_t first)
Float_t fLocMaxCutEDiff
Local maxima cut, when aggregating cells, next can be a bit higher.
Bool_t IsCorrectionOfClusterEnergyOn() const
Bool_t IsAbsIDsFromTCard(Int_t absId1, Int_t absId2, Int_t &rowDiff, Int_t &colDiff) const
void SetEMCALOADBFilePath(TString path)
TGeoHMatrix * fPHOSMatrix[5]
Geometry matrices with alignments.
Bool_t ClusterContainsBadChannel(Int_t calo, UShort_t *cellList, Int_t nCells)
Float_t GetEMCALChannelTimeRecalibrationFactor(Int_t bc, Int_t absID, Bool_t isLGon=kFALSE) const
void SwitchOnLoadOwnEMCALGeometryMatrices()
AliPHOSGeoUtils * fPHOSGeo
! PHOS geometry pointer.
TH2F * GetPHOSChannelRecalibrationFactors(Int_t imod) const
void SetNumberOfCellsFromEMCALBorder(Int_t n)
Int_t GetLastSuperModuleUsed() const
void SetImportGeometryFromFile(Bool_t import, TString path="")
void SwitchOffCorrectClusterLinearity()
AliEMCALRecoUtils * GetEMCALRecoUtils() const
void SetLastSuperModuleUsed(Int_t last)
Int_t GetEMCALL1PhaseInTimeRecalibrationForSM(Int_t iSM) const
Float_t GetECross(Int_t absId, AliVCaloCells *cells, Int_t bc)
TString EMCALGeometryName() const
void SetEMCALL1PhaseInTimeRecalibrationForAllSM(TObjArray *map)
void SwitchOnDistToBadChannelRecalculation()
void SwitchOffDistToBadChannelRecalculation()
void SwitchOffClusterPlot()
void SwitchOnNoFiducialBorderInEMCALEta0()
void SwitchOnMCECellClusFracCorrection()
Float_t GetCutPhi() const
void SetEMCALChannelStatus(Int_t iSM, Int_t iCol, Int_t iRow, Double_t c=1)
void SetPHOSChannelRecalibrationFactors(Int_t imod, TH2F *h)
AliPHOSGeoUtils * GetPHOSGeometry() const
TH1C * GetEMCALL1PhaseInTimeRecalibrationForAllSM() const
Bool_t fOADBForEMCAL
Get calibration from OADB for EMCAL.
void SetEMCALL1PhaseInTimeRecalibrationForSM(Int_t iSM, Int_t c=0)
void SwitchOnRecalculateClusterPosition()
TString PHOSGeometryName() const
void SetEMCALChannelRecalibrationFactor(Int_t iSM, Int_t iCol, Int_t iRow, Double_t c=1)
Float_t GetPHOSChannelRecalibrationFactor(Int_t imod, Int_t iCol, Int_t iRow) const
void SetEMCALChannelTimeRecalibrationFactors(Int_t bc, TH1F *h)
void SwitchOffRecalculateClusterPosition()
void SwitchOffDistToBadChannelRecalculation()
Bool_t ClusterContainsBadChannel(TString, UShort_t *, Int_t)
Float_t fLocMaxCutE
Local maxima cut must have more than this energy.
Float_t GetMCECellClusFracCorrection(Float_t eCell, Float_t eCluster) const
void RecalculateClusterDistanceToBadChannel(AliVCaloCells *cells, AliVCluster *clu)
Bool_t CheckCellFiducialRegion(AliVCluster *cluster, AliVCaloCells *cells, AliVEvent *, Int_t)
void SetEMCALChannelStatusMap(Int_t iSM, TH2I *h)
Int_t GetNumberOfCellsFromEMCALBorder() const
Bool_t fRunDependentCorrection
Switch on or off the recalibration dependent on T.
void SwitchOnRunDepCorrection()
void SetLocalMaximaCutEDiff(Float_t c)
void SetNumberOfCellsFromEMCALBorder(Int_t n)
TObjArray * fPHOSRecalibrationFactors
Array of histograms with map of recalibration factors, PHOS.
void SwitchOffNoFiducialBorderInEMCALEta0()
TString fEMCALGeoName
Name of geometry to use for EMCAL.
void SetEMCALL1PhaseInTimeRecalibrationForAllSM(TH1C *h)
void SwitchOffRecalibration()
TH2F * GetEMCALChannelRecalibrationFactors(Int_t iSM) const
void SetPHOSChannelStatus(Int_t imod, Int_t iCol, Int_t iRow, Double_t c=1)
Bool_t fRecalibration
Switch on or off the recalibration.
Float_t GetEMCALChannelRecalibrationFactor(Int_t iSM, Int_t iCol, Int_t iRow) const
void SwitchOffTimeRecalibration()
TH1F * GetEMCALChannelTimeRecalibrationFactors(Int_t bc) const
Bool_t IsDistanceToBadChannelRecalculated() const
void SwitchOnLoadOwnPHOSGeometryMatrices()
Int_t fDebug
Debugging level.
void SwitchOnRecalibration()
TH1C * GetEMCALL1PhaseInTimeRecalibrationForAllSM() const
Int_t GetNumberOfCellsFromPHOSBorder() const
Bool_t IsRecalibrationOn() const
void SetMCECellClusFracCorrectionParamters(Int_t i, Float_t param)
Some utilities for cluster and cell treatment.
void SetPHOSGeometryName(TString name)
virtual void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetMaskCellColumn(Int_t ipos, Int_t icol)
void RecalculateClusterPID(AliVCluster *clu)
Float_t GetEMCALChannelTimeRecalibrationFactor(Int_t bc, Int_t absID) const
void RecalculateClusterDistanceToBadChannel(const AliEMCALGeometry *geom, AliVCaloCells *cells, AliVCluster *cluster)
void SwitchOffRecalculateClusterTrackMatching()
TH2I * GetEMCALChannelStatusMap(Int_t iSM) const
Float_t fCutEta
dEta cut on matching (EMCAL).
Float_t GetLocalMaximaCutE() const
Int_t GetModuleNumber(AliCaloTrackParticle *particle, AliVEvent *inputEvent) const
Get the EMCAL/PHOS module number that corresponds to this particle.
void SetCutPhi(Float_t p)
void SwitchOnBadChannelsRemoval()
Float_t GetEMCALChannelRecalibrationFactor(Int_t iSM, Int_t iCol, Int_t iRow) const
Bool_t fLoadEMCALMatrices
Matrices set from configuration, not get from geometry.root or from ESDs/AODs.
void SwitchOffRecalibration()
void SwitchOnTimeRecalibration()
virtual void SetDebug(Int_t d)
AliEMCALGeometry * GetEMCALGeometry() const
void SwitchOnL1PhaseInTimeRecalibration()
void RecalculateClusterShowerShapeParameters(AliVCaloCells *cells, AliVCluster *clu)
void SwitchOffMCECellClusFracCorrection()
Container for input particle information on CaloTrackCorr package.
void SetNMaskCellColumns(Int_t n)
Float_t GetLocalMaximaCutEDiff() const
Bool_t IsL1PhaseInTimeRecalibrationOn() const
Bool_t fRecalculateMatching
Recalculate cluster position.
Bool_t IsEMCALNoBorderAtEta0() const
Bool_t GetEMCALChannelStatus(Int_t iSM, Int_t iCol, Int_t iRow, Int_t &status) const
Bool_t MaskFrameCluster(Int_t iSM, Int_t ieta) const
void SwitchOffEMCALOADB()
void RecalculateClusterShowerShapeParameters(const AliEMCALGeometry *geom, AliVCaloCells *cells, AliVCluster *cluster)
AliCalorimeterUtils & operator=(const AliCalorimeterUtils &cu)
Assignment operator not implemented.
Bool_t fOADBForPHOS
Get calibration from OADB for PHOS.
Bool_t IsBadChannelsRemovalSwitchedOn() const
Int_t * fMaskCellColumns
List of masked cells collumn index.
Bool_t fRemoveBadChannels
Check the channel status provided and remove clusters with bad channels.
void InitPHOSBadChannelStatusMap()
Init PHOS bad channels map.
virtual Int_t GetDebug() const
virtual ~AliCalorimeterUtils()
Int_t GetRunNumber() const
void RecalculateClusterTrackMatching(AliVEvent *event, TObjArray *clusterArray=0x0, AliMCEvent *mc=0x0)
Bool_t IsTimeRecalibrationOn() const
AliCalorimeterUtils()
Constructor. Initialize parameters.
void SetEMCALChannelTimeRecalibrationFactor(Int_t bc, Int_t absID, Double_t c=0)
virtual void InitParameters()
Initialize the parameters of the analysis.
void SwitchOnRecalculateClusterTrackMatching()
void SetEMCALChannelRecalibrationFactors(TObjArray *map)
Int_t fNMaskCellColumns
Number of masked columns.
Bool_t IsMCECellClusFracCorrectionOn() const
Int_t fLastSuperModuleUsed
Number of last supermodule to be used in analysis, to activate only certain range (DCal or EMCal) ...
void SwitchOnRecalibration()
void SetPHOSGeometryMatrixInSM(TGeoHMatrix *m, Int_t i)
Int_t GetNumberOfSuperModulesUsed() const
void SwitchOnCorrectClusterLinearity()
void SwitchOffBadChannelsRemoval()
Bool_t IsEMCALNoBorderAtEta0() const
Bool_t IsClusterSharedByTwoSuperModules(const AliEMCALGeometry *geom, AliVCluster *cluster)
Int_t fFirstSuperModuleUsed
Number of first supermodule to be used in analysis, to activate only certain range (DCal or EMCal) ...
void GetMatchedResiduals(Int_t clsIndex, Float_t &dEta, Float_t &dPhi)
Bool_t IsRecalculationOfClusterPositionOn() const
Float_t fMCECellClusFracCorrParam[4]
Parameters for the function correcting the weight of the cells in the cluster.
Int_t GetNumberOfLocalMaxima(AliVCluster *cluster, AliVCaloCells *cells)
Find the number of local maxima in cluster.
Bool_t fEMCALGeoMatrixSet
Check if the transformation matrix is set for EMCAL.
void SetEMCALGeometryName(TString name)
void SetPHOSOADBFilePath(TString path)
void SwitchOffBadChannelsRemoval()
void SetNumberOfSuperModulesUsed(Int_t nSM)
void SwitchOffNoFiducialBorderInEMCALEta0()
void SwitchOffL1PhaseInTimeRecalibration()
TH2I * GetPHOSChannelStatusMap(Int_t imod) const
void SetEMCALChannelRecalibrationFactor(Int_t iSM, Int_t iCol, Int_t iRow, Double_t c=1)
Float_t GetCutEta() const
TString GetPass()
Get passx from filename.
void SetCutR(Float_t cutR)
void RecalculateClusterPosition(AliVCaloCells *cells, AliVCluster *clu)
void SwitchOnDistToBadChannelRecalculation()
Bool_t fImportGeometryFromFile
Import geometry settings in geometry.root file.
Int_t GetNMaskCellColumns() const
Bool_t fCorrectELinearity
Correct cluster energy linearity.
Bool_t fPHOSGeoMatrixSet
Check if the transformation matrix is set for PHOS.
TString fOADBFilePathPHOS
Default path $ALICE_PHYSICS/OADB/PHOS, if needed change.
void SwitchOnNoFiducialBorderInEMCALEta0()
void CorrectClusterEnergy(AliVCluster *cl)
Correct cluster energy non linearity.
void SetEMCALGeometryMatrixInSM(TGeoHMatrix *m, Int_t i)
void GetMatchedResiduals(Int_t index, Float_t &dR, Float_t &dZ)
Float_t fCutZ
dZ cut on matching (EMCAL/PHOS).
Bool_t fLoadPHOSMatrices
Matrices set from configuration, not get from geometry.root or from ESDs/AODs.
void SetPHOSChannelStatusMap(Int_t imod, TH2I *h)
Int_t fNCellsFromPHOSBorder
Number of cells from PHOS border the cell with maximum amplitude has to be.
void RecalculateClusterPID(AliVCluster *cluster)
AliVTrack * GetMatchedTrack(AliVCluster *cluster, AliVEvent *event, Int_t index=-1) const
void RecalibrateCellTimeL1Phase(Double_t &time, Int_t calo, Int_t iSM, Int_t bunchCrossNumber) const
Recalculate time L1 phase shift if time recalibration available for EMCAL.
Bool_t fMCECellClusFracCorrOn
Correct or not the weight of cells in cluster.
void SetEMCALL1PhaseInTimeRecalibrationForAllSM(const TObjArray *map)
void SetPHOSChannelStatusMap(TObjArray *map)
Int_t fNSuperModulesUsed
Number of supermodules to be used in analysis, can be different than the real geo, to be used at initialization of histograms.
TString fImportGeometryFilePath
Path fo geometry.root file.
void SwitchOffTimeRecalibration()
Bool_t fPlotCluster
Plot cluster in splitting method.
void SwitchOnL1PhaseInTimeRecalibration()
Int_t fRunNumber
Run number of the data, take it from data itself unless set by user.
void SwitchOffLoadOwnPHOSGeometryMatrices()
void RecalibrateCellAmplitude(Float_t &, Int_t calo, Int_t absId) const
Recalculate cell energy if recalibration factor.
void SetEMCALChannelTimeRecalibrationFactors(TObjArray *map)
Bool_t IsPHOSGeoMatrixSet() const
void SwitchOffLoadOwnEMCALGeometryMatrices()
void SetEMCALChannelStatusMap(TObjArray *map)
Bool_t IsTimeRecalibrationOn() const
Bool_t IsDistanceToBadChannelRecalculated() const
Bool_t fOADBSet
AODB parameters already set.
void SetEMCALChannelTimeRecalibrationFactors(const TObjArray *map)
TObjArray * fPHOSBadChannelMap
Array of histograms with map of bad channels, PHOS.
TString fPHOSGeoName
Name of geometry to use for PHOS.
Bool_t AreNeighbours(Int_t calo, Int_t absId1, Int_t absId2) const
void ConfigureEMCALRecoUtils(Bool_t bMC=kFALSE, Bool_t bExotic=kTRUE, Bool_t bNonLin=kFALSE, Bool_t bRecalE=kTRUE, Bool_t bBad=kTRUE, Bool_t bRecalT=kTRUE, Int_t debug=-1)
void SwitchOnClusterPlot()
Float_t fCutPhi
dPhi cut on matching (EMCAL).
void SetEMCALChannelTimeRecalibrationFactor(Int_t bc, Int_t absID, Double_t c=0, Bool_t isLGon=kFALSE)
Int_t GetEMCALL1PhaseInTimeRecalibrationForSM(Int_t iSM) const
void SetEMCALChannelStatus(Int_t iSM, Int_t iCol, Int_t iRow, Double_t status=1)
Bool_t IsEMCALGeoMatrixSet() const
Class with utils specific to calorimeter clusters/cells.
Int_t GetNumberOfCellsFromEMCALBorder() const
void AccessGeometry(AliVEvent *inputEvent)
void SetCutEta(Float_t cutEta)
void SetPHOSChannelRecalibrationFactors(TObjArray *map)
void SetEMCALRecoUtils(AliEMCALRecoUtils *ru)
AliEMCALRecoUtils * fEMCALRecoUtils
EMCAL utils for cluster rereconstruction.
Int_t GetFirstSuperModuleUsed() const
void SetEMCALL1PhaseInTimeRecalibrationForSM(Int_t iSM, Int_t c=0)
void SetEMCALChannelRecalibrationFactors(Int_t iSM, TH2F *h)
void AccessOADB(AliVEvent *event)
void SetEMCALChannelRecalibrationFactors(const TObjArray *map)
void SwitchOnTimeRecalibration()
TString fOADBFilePathEMCAL
Default path $ALICE_PHYSICS/OADB/EMCAL, if needed change.
void RecalibrateCellTime(Double_t &time, Int_t calo, Int_t absId, Int_t bunchCrossNumber) const
Recalculate time if time recalibration available for EMCAL not ready for PHOS.
Int_t GetMaxEnergyCell(AliVCaloCells *cells, AliVCluster *clu, Float_t &fraction) const
For a given CaloCluster, it gets the absId of the cell with maximum energy deposit.
Float_t fCutR
dR cut on matching (PHOS).
void SwitchOffL1PhaseInTimeRecalibration()
void SetEMCALChannelStatusMap(const TObjArray *map)
Int_t GetEMCALChannelStatus(Int_t iSM, Int_t iCol, Int_t iRow, Int_t status) const
void SetLocalMaximaCutE(Float_t cut)
Float_t RecalibrateClusterEnergyWeightCell(AliVCluster *cluster, AliVCaloCells *cells, Float_t energyOrg)
void SplitEnergy(Int_t absId1, Int_t absId2, AliVCluster *cluster, AliVCaloCells *cells, AliAODCaloCluster *cluster1, AliAODCaloCluster *cluster2, Int_t nMax, Int_t eventNumber=0)
Bool_t GetFECCorrelatedCellAbsId(Int_t absId, Int_t absIdCorr[4]) const
Int_t GetModuleNumberCellIndexes(Int_t absId, Int_t calo, Int_t &icol, Int_t &irow, Int_t &iRCU) const
Get the EMCAL/PHOS module, columns, row and RCU/DDL number that corresponds to this absId...
TH2I * GetEMCALChannelStatusMap(Int_t iSM) const
void SetPHOSChannelRecalibrationFactor(Int_t imod, Int_t iCol, Int_t iRow, Double_t c=1)
Float_t RecalibrateClusterEnergy(AliVCluster *cluster, AliVCaloCells *cells)
Recalibrate the cluster energy, considering the recalibration map and the energy of the cells that co...
void GetEMCALSubregion(AliVCluster *clus, AliVCaloCells *cells, Int_t ®Eta, Int_t ®Phi) const
Bool_t CheckCellFiducialRegion(AliVCluster *cluster, AliVCaloCells *cells) const
Int_t GetModuleNumberCellIndexesAbsCaloMap(Int_t absId, Int_t calo, Int_t &icol, Int_t &irow, Int_t &iRCU, Int_t &icolAbs, Int_t &irowAbs) const