AliPhysics  master (3d17d9d)
AliCalorimeterUtils.h
Go to the documentation of this file.
1 #ifndef ALICALORIMETERUTILS_H
2 #define ALICALORIMETERUTILS_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 //_________________________________________________________________________
19 //_________________________________________________________________________
20 
21 // --- ROOT system ---
22 #include <TObject.h>
23 #include <TString.h>
24 #include <TObjArray.h>
25 class TArrayF;
26 #include <TH2I.h>
27 #include <TGeoMatrix.h>
28 class AliMCEvent;
29 
30 //--- ANALYSIS system ---
31 class AliVEvent;
32 class AliVTrack;
34 class AliAODCaloCluster;
35 class AliVCaloCells;
36 class AliPHOSGeoUtils;
37 class AliEMCALGeometry;
38 class AliAODMCParticle;
39 class TParticle;
40 class AliVParticle;
41 
42 #include "AliEMCALRecoUtils.h"
43 
44 class AliCalorimeterUtils : public TObject {
45 
46  public:
47  AliCalorimeterUtils() ; // ctor
48  virtual ~AliCalorimeterUtils() ;//virtual dtor
49 
50  virtual void InitParameters();
51  virtual void Print(const Option_t * opt) const ;
52 
53  virtual Int_t GetDebug() const { return fDebug ; }
54  virtual void SetDebug(Int_t d) { fDebug = d ; }
55 
56  //virtual void Init();
57 
58  // Cluster contents
59 
60  Bool_t AreNeighbours(Int_t calo, Int_t absId1, Int_t absId2) const ;
61 
62  Bool_t IsClusterSharedByTwoSuperModules(const AliEMCALGeometry * geom,
63  AliVCluster* cluster);
64 
65  Float_t GetECross(Int_t absId, AliVCaloCells* cells, Int_t bc,
66  Float_t cellMinEn = 0., Bool_t useWeight = kFALSE, Float_t energyClus = 0.);
67 
68  Bool_t GetFECCorrelatedCellAbsId(Int_t absId, Int_t absIdCorr[4]) const ;
69 
71  Int_t & rowDiff, Int_t & colDiff) const
72  { return fEMCALRecoUtils->IsAbsIDsFromTCard(absId1, absId2, rowDiff, colDiff) ; }
73 
74  void GetEnergyAndNumberOfCellsInTCard(AliVCluster* clus, Int_t absIdMax, AliVCaloCells* cells,
75  Int_t & nDiff, Int_t & nSame,
76  Float_t & eDiff, Float_t & eSame,
77  Float_t emin = 0.)
78  { fEMCALRecoUtils->GetEnergyAndNumberOfCellsInTCard(clus, absIdMax, cells, nDiff, nSame, eDiff, eSame, emin) ; }
79 
80  Int_t GetNumberOfLocalMaxima(AliVCluster* cluster, AliVCaloCells* cells) ;
81 
82  Int_t GetNumberOfLocalMaxima(AliVCluster* cluster, AliVCaloCells* cells,
83  Int_t *absIdList, Float_t *maxEList) ;
84 
85  Float_t GetLocalMaximaCutE() const { return fLocMaxCutE ; }
86  void SetLocalMaximaCutE(Float_t cut) { fLocMaxCutE = cut ; }
87 
90 
91  Int_t GetMaxEnergyCell(AliVCaloCells* cells, AliVCluster* clu, Float_t & fraction) const ;
92 
93  void SplitEnergy(Int_t absId1, Int_t absId2, AliVCluster *cluster, AliVCaloCells* cells,
94  //Float_t & e1, Float_t & e2,
95  AliAODCaloCluster *cluster1, AliAODCaloCluster *cluster2,
96  Int_t nMax, Int_t eventNumber = 0);//, Int_t *absIdList, Float_t *maxEList,
97 
98  void SwitchOnClusterPlot() { fPlotCluster = kTRUE ; }
99  void SwitchOffClusterPlot() { fPlotCluster = kFALSE ; }
100 
101  Float_t GetMCECellClusFracCorrection(Float_t eCell, Float_t eCluster) const ;
103 
107 
108  //------------------------------
109  // Calorimeters Geometry Methods
110  //------------------------------
111 
112  AliEMCALGeometry * GetEMCALGeometry() const { return fEMCALGeo ; }
115  void InitEMCALGeometry() ;
117 
118  AliPHOSGeoUtils * GetPHOSGeometry() const { return fPHOSGeo ; }
119  TString PHOSGeometryName() const { return fPHOSGeoName ; }
120  void SetPHOSGeometryName(TString name) { fPHOSGeoName = name ; }
121  void InitPHOSGeometry() ;
123 
124  void AccessGeometry(AliVEvent* inputEvent) ;
125 
127  TString path = ""){
128  fImportGeometryFromFile = import ;
129  fImportGeometryFilePath = path ; } // EMCAL
130 
131  Bool_t IsMCParticleInCalorimeterAcceptance(Int_t calo, AliVParticle* particle);
132  Bool_t IsMCParticleInCalorimeterAcceptance(Int_t calo, TParticle* particle);
133  Bool_t IsMCParticleInCalorimeterAcceptance(Int_t calo, AliAODMCParticle* particle);
135 
138  void SetEMCALGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fEMCALMatrix[i] = m ; }
139 
142  void SetPHOSGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fPHOSMatrix[i] = m ; }
143 
144  void GetEMCALSubregion(AliVCluster* clus, AliVCaloCells* cells,
145  Int_t & regEta, Int_t & regPhi) const ;
146 
147  //------------------------------
148  // Bad channels
149  //------------------------------
150 
157 
159 
163 
165 
166  Int_t GetEMCALChannelStatus(Int_t iSM , Int_t iCol, Int_t iRow, Int_t status) const {
167  return fEMCALRecoUtils->GetEMCALChannelStatus(iSM, iCol, iRow, status); }//Channel is ok by default
168 
169  Int_t GetPHOSChannelStatus (Int_t imod, Int_t iCol, Int_t iRow) const {
170  if(fPHOSBadChannelMap) return (Int_t) ((TH2I*)fPHOSBadChannelMap->At(imod))->GetBinContent(iCol,iRow);
171  else return 0 ; }//Channel is ok by default
172 
173  void SetEMCALChannelStatus(Int_t iSM , Int_t iCol, Int_t iRow, Double_t c = 1) {
174  fEMCALRecoUtils->SetEMCALChannelStatus(iSM,iCol,iRow,c) ; }
175 
176  void SetPHOSChannelStatus (Int_t imod, Int_t iCol, Int_t iRow, Double_t c = 1) {
178  ((TH2I*)fPHOSBadChannelMap->At(imod))->SetBinContent(iCol,iRow,c) ; }
179 
182  void SetPHOSChannelStatusMap(Int_t imod , TH2I* h) { fPHOSBadChannelMap ->AddAt(h,imod) ; }
183 
186  TH2I * GetPHOSChannelStatusMap(Int_t imod) const { return (TH2I*)fPHOSBadChannelMap->At(imod) ; }
187 
190 
191  Bool_t ClusterContainsBadChannel(Int_t calo,UShort_t* cellList, Int_t nCells);
192  Bool_t ClusterContainsBadChannel(TString /*calo*/,UShort_t* /*cellList*/, Int_t /*nCells*/) {return kFALSE;} // Stupid thing to do but just to avoid compilation break in AliTrackComparisonESD while I find the authors
193 
194  // Mask clusters in front of frame, EMCAL only
197  if(n > fNMaskCellColumns) { delete [] fMaskCellColumns ; fMaskCellColumns = new Int_t[n] ; }
198  fNMaskCellColumns = n ; }
199  void SetMaskCellColumn(Int_t ipos, Int_t icol) {
200  if(ipos < fNMaskCellColumns) fMaskCellColumns[ipos] = icol;
201  else printf("Not set, position larger than allocated set size first") ; }
202  Bool_t MaskFrameCluster(Int_t iSM, Int_t ieta) const ;
203 
204  //------------------------------
205  // Calorimeter indexes information
206  //------------------------------
207 
208  Int_t GetModuleNumber(AliCaloTrackParticle * particle, AliVEvent* inputEvent) const;
209  Int_t GetModuleNumber(AliVCluster * cluster) const;
210  Int_t GetModuleNumberCellIndexes(Int_t absId, Int_t calo, Int_t & icol, Int_t & irow, Int_t &iRCU) const ;
211  Int_t GetModuleNumberCellIndexesAbsCaloMap(Int_t absId, Int_t calo, Int_t & icol, Int_t & irow, Int_t &iRCU,
212  Int_t & icolAbs, Int_t & irowAbs) const ;
213 
214  //------------------------------
215  // Modules fiducial region
216  //------------------------------
217 
218  Bool_t CheckCellFiducialRegion(AliVCluster* cluster, AliVCaloCells* cells) const ;
219  Bool_t CheckCellFiducialRegion(AliVCluster* cluster, AliVCaloCells* cells, AliVEvent* , Int_t )
220  { return CheckCellFiducialRegion(cluster, cells) ; } // Stupid thing to do but just to avoid compilation break in AliTrackComparisonESD while I find the authors
228 
229  //------------------------------
230  // Recalibration
231  //------------------------------
232 
238 
240 
242 
244  return fEMCALRecoUtils->GetEMCALChannelRecalibrationFactor(iSM , iCol, iRow) ; }
245 
248  return (Float_t) ((TH2F*)fPHOSRecalibrationFactors->At(imod))->GetBinContent(iCol,iRow);
249  else return 1 ; }
250 
253 
256  ((TH2F*)fPHOSRecalibrationFactors->At(imod))->SetBinContent(iCol,iRow,c) ; }
257 
261 
265 
268 
269  void RecalibrateCellTime (Double_t & time, Int_t calo, Int_t absId, Int_t bunchCrossNumber) const ;
270  void RecalibrateCellTimeL1Phase(Double_t & time, Int_t calo, Int_t iSM , Int_t bunchCrossNumber, Short_t par=0) const;
271  void RecalibrateCellAmplitude (Float_t & amp , Int_t calo, Int_t absId) const ;
272  Float_t RecalibrateClusterEnergy(AliVCluster* cluster, AliVCaloCells * cells);
273  Float_t RecalibrateClusterEnergyWeightCell(AliVCluster* cluster, AliVCaloCells * cells, Float_t energyOrg);
274 
275  //------------------------------
276  // Run dependent energy calibrations (EMCAL)
277  //------------------------------
278 
281 
282  //------------------------------
283  // Time Recalibration (EMCAL)
284  //------------------------------
285 
289 
292 
295 
299 
300  //------------------------------
301  // Time Recalibration - L1 phase (EMCAL)
302  //------------------------------
306 
309 
313 
318  void SetNPars(Short_t npars) { fEMCALRecoUtils->SetNPars(npars) ; }
319  ULong64_t GetGlobalIDPar(Short_t par) { return fEMCALRecoUtils->GetGlobalIDPar(par) ; }
320  void SetGlobalIDPar(ULong64_t glob, Short_t par) { fEMCALRecoUtils->SetGlobalIDPar(glob,par) ; }
321 
322  //------------------------------
323  // EMCAL specific utils for the moment
324  //------------------------------
325 
328 
329  void ConfigureEMCALRecoUtils(Bool_t bMC = kFALSE, Bool_t bExotic= kTRUE, Bool_t bNonLin= kFALSE,
330  Bool_t bRecalE= kTRUE , Bool_t bBad = kTRUE, Bool_t bRecalT= kTRUE, Int_t debug = -1);
331 
335  void CorrectClusterEnergy(AliVCluster *cl);
336 
340  void RecalculateClusterPosition(AliVCaloCells* cells, AliVCluster* clu);
341  void RecalculateClusterShowerShapeParameters(AliVCaloCells* cells, AliVCluster* clu){
342  fEMCALRecoUtils->RecalculateClusterShowerShapeParameters((AliEMCALGeometry*)fEMCALGeo, cells, clu) ; }
343 
344  void RecalculateClusterDistanceToBadChannel(AliVCaloCells* cells, AliVCluster* clu){
345  fEMCALRecoUtils->RecalculateClusterDistanceToBadChannel((AliEMCALGeometry*)fEMCALGeo, cells, clu) ; }
346 
348 
349  //------------------------------
350  // *** Track Matching ***
351  //------------------------------
352 
353  AliVTrack * GetMatchedTrack(AliVCluster * cluster, AliVEvent * event, Int_t index = -1) const ;
354 
355  // Recalculation
356 
357  void RecalculateClusterTrackMatching(AliVEvent * event,
358  TObjArray* clusterArray = 0x0,
359  AliMCEvent* mc = 0x0) ;
360 
361  void GetMatchedResiduals(Int_t index, Float_t &dR, Float_t &dZ) {
363 
364  //------------------------------
365  // This could be used for PHOS ...
366  //------------------------------
367 
371 
372  Float_t GetCutZ() const { return fCutZ ; } // PHOS only
373  void SetCutZ(Float_t z) { fCutZ = z ; } // PHOS only
374 
375 
376  Float_t GetCutR() const { return fCutR ; } // PHOS and EMCAL
377  void SetCutR(Float_t r) { fCutR = r ; // PHOS and EMCA
378  fEMCALRecoUtils->SetCutR(r) ; }
379 
380  Float_t GetCutEta() const { return fCutEta ; } // EMCAL only
381  void SetCutEta(Float_t e) { fCutEta = e ; // EMCAL only
382  fEMCALRecoUtils->SetCutEta(e) ; }
383 
384  Float_t GetCutPhi() const { return fCutPhi ; } // EMCAL only
385  void SetCutPhi(Float_t p) { fCutPhi = p ; // EMCAL only
386  fEMCALRecoUtils->SetCutPhi(p) ; }
387 
388  //------------------------------
389  // OADB options settings
390  //------------------------------
391 
392  void AccessOADB(AliVEvent * event) ;
393 
394  TString GetPass() ;
395 
396  void SwitchOnEMCALOADB() { fOADBForEMCAL = kTRUE ; }
397  void SwitchOffEMCALOADB() { fOADBForEMCAL = kFALSE ; }
398 
399  void SwitchOnPHOSOADB() { fOADBForPHOS = kTRUE ; }
400  void SwitchOffPHOSOADB() { fOADBForPHOS = kFALSE ; }
401 
404 
405  //------------------------------
406  // Other settings
407  //------------------------------
408 
411 
416 
417 
418  void SetRunNumber(Int_t run) { fRunNumber = run ; }
419  Int_t GetRunNumber() const { return fRunNumber ; }
420 
421  void SetUseOneHistForAllBCs(Bool_t useOneHist) { fDoUseMergedBCs = useOneHist ; fEMCALRecoUtils->SetUseOneHistForAllBCs(useOneHist) ; }
422 
423  private:
424 
426 
428 
430 
431  AliEMCALGeometry * fEMCALGeo ;
432 
433  AliPHOSGeoUtils * fPHOSGeo ;
434 
436 
438 
440 
441  TGeoHMatrix * fEMCALMatrix[22];
442 
444 
445  TGeoHMatrix * fPHOSMatrix[5];
446 
448 
450 
452 
454 
456 
458 
460  Int_t * fMaskCellColumns; //[fNMaskCellColumns]
461 
463 
465 
467 
469 
471 
473 
475 
477 
479 
481 
483 
485 
487 
489 
491 
493 
495 
497 
499 
501 
503 
507 
509 
511 
513 
515 
518 
521 
523  ClassDef(AliCalorimeterUtils,21) ;
525 
526 } ;
527 
528 
529 #endif //ALICALORIMETERUTILS_H
530 
531 
532 
void SetEMCALChannelStatusMap1D(const TH1C *h)
void SetCutEta(Float_t e)
void SetCutPhi(Float_t cutPhi)
Bool_t fRecalculatePosition
Recalculate cluster position.
Float_t GetCutZ() const
void SetNumberOfCellsFromPHOSBorder(Int_t n)
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.
double Double_t
Definition: External.C:58
void InitPHOSRecalibrationFactors()
Init PHOS recalibration factors.
void SetRunNumber(Int_t run)
Bool_t IsRecalculationOfClusterTrackMatchingOn() const
Definition: External.C:236
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
TH2I * GetEMCALChannelStatusMap(Int_t iSM) const
void SwitchOnLoadOwnEMCALGeometryMatrices()
AliPHOSGeoUtils * fPHOSGeo
! PHOS geometry pointer.
TH2F * GetPHOSChannelRecalibrationFactors(Int_t imod) const
void GetEnergyAndNumberOfCellsInTCard(AliVCluster *clus, Int_t absIdMax, AliVCaloCells *cells, Int_t &nDiff, Int_t &nSame, Float_t &eDiff, Float_t &eSame, Float_t emin=0.)
void SetNumberOfCellsFromEMCALBorder(Int_t n)
Int_t GetLastSuperModuleUsed() const
void SetImportGeometryFromFile(Bool_t import, TString path="")
AliEMCALRecoUtils * GetEMCALRecoUtils() const
void SetLastSuperModuleUsed(Int_t last)
void GetEnergyAndNumberOfCellsInTCard(AliVCluster *clus, Int_t absIdMax, AliVCaloCells *cells, Int_t &nDiff, Int_t &nSame, Float_t &eDiff, Float_t &eSame, Float_t emin=0.)
ULong64_t GetGlobalIDPar(Short_t par)
TH1C * GetEMCALChannelStatusMap1D() const
void SetEMCALChannelStatusMap1D(TH1C *h)
TString EMCALGeometryName() const
void SetEMCALL1PhaseInTimeRecalibrationForAllSM(TObjArray *map)
void SwitchOnDistToBadChannelRecalculation()
void SwitchOffDistToBadChannelRecalculation()
void SetGlobalIDPar(ULong64_t glob, Short_t par)
void SwitchOnNoFiducialBorderInEMCALEta0()
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
Bool_t fOADBForEMCAL
Get calibration from OADB for EMCAL.
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 SwitchOffRecalculateClusterPosition()
void SwitchOffDistToBadChannelRecalculation()
Int_t GetEMCALL1PhaseInTimeRecalibrationForSM(Int_t iSM, Short_t par=0) const
Bool_t ClusterContainsBadChannel(TString, UShort_t *, Int_t)
Float_t fLocMaxCutE
Local maxima cut must have more than this energy.
ULong64_t GetGlobalIDPar(Short_t par)
Bool_t fLoad1DBadChMap
Flag to load 1D bad channel map.
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.
TCanvas * c
Definition: TestFitELoss.C:172
void SetLocalMaximaCutEDiff(Float_t c)
void SetNumberOfCellsFromEMCALBorder(Int_t n)
TObjArray * fPHOSRecalibrationFactors
Array of histograms with map of recalibration factors, PHOS.
void SwitchOffNoFiducialBorderInEMCALEta0()
TH1C * GetEMCALL1PhaseInTimeRecalibrationForAllSM(Short_t par=0) const
TString fEMCALGeoName
Name of geometry to use for EMCAL.
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 SetNPars(Short_t npars)
Bool_t IsDistanceToBadChannelRecalculated() const
void SwitchOnLoadOwnPHOSGeometryMatrices()
Int_t fDebug
Debugging level.
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)
TH2F * GetEMCALChannelRecalibrationFactors(Int_t iSM) const
void RecalculateClusterPID(AliVCluster *clu)
void SetUseOneHistForAllBCs(Bool_t useOneHist)
void RecalibrateCellTimeL1Phase(Double_t &time, Int_t calo, Int_t iSM, Int_t bunchCrossNumber, Short_t par=0) const
Recalculate time L1 phase shift if time recalibration available for EMCAL.
TH1S * GetEMCALChannelRecalibrationFactors1D() const
Float_t GetEMCALChannelTimeRecalibrationFactor(Int_t bc, Int_t absID) const
void RecalculateClusterDistanceToBadChannel(const AliEMCALGeometry *geom, AliVCaloCells *cells, AliVCluster *cluster)
void SwitchOffRecalculateClusterTrackMatching()
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)
Short_t GetCurrentParNumber()
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.
virtual void SetDebug(Int_t d)
AliEMCALGeometry * GetEMCALGeometry() const
void SwitchOnL1PhaseInTimeRecalibration()
int Int_t
Definition: External.C:63
void RecalculateClusterShowerShapeParameters(AliVCaloCells *cells, AliVCluster *clu)
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 RecalculateClusterShowerShapeParameters(const AliEMCALGeometry *geom, AliVCaloCells *cells, AliVCluster *cluster)
float Float_t
Definition: External.C:68
TH1S * GetEMCALChannelRecalibrationFactors1D() const
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
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 SetEMCALL1PhaseInTimeRecalibrationForSM(Int_t iSM, Int_t c=0, Short_t par=0)
void SetEMCALChannelRecalibrationFactors(TObjArray *map)
Int_t fNMaskCellColumns
Number of masked columns.
Bool_t fLoad1DRecalibFactors
Flag to load 1D energy recalibration histogram.
Float_t GetCutR() const
void SetUseOneHistForAllBCs(Bool_t useOneHist)
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 SetPHOSGeometryMatrixInSM(TGeoHMatrix *m, Int_t i)
Int_t GetNumberOfSuperModulesUsed() const
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.
TH1 * GetEMCALChannelTimeRecalibrationFactors(Int_t bc) const
void SetEMCALGeometryName(TString name)
void SetPHOSOADBFilePath(TString path)
void SetNumberOfSuperModulesUsed(Int_t nSM)
void SwitchOffNoFiducialBorderInEMCALEta0()
void SwitchOffL1PhaseInTimeRecalibration()
TH2I * GetPHOSChannelStatusMap(Int_t imod) const
Bool_t fDoUseMergedBCs
flag to use one histo for all BCs
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.
short Short_t
Definition: External.C:23
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 IsAbsIDsFromTCard(Int_t absId1, Int_t absId2, Int_t &rowDiff, Int_t &colDiff) const
Bool_t fPHOSGeoMatrixSet
Check if the transformation matrix is set for PHOS.
Bool_t useWeight
Definition: anaTree.C:26
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).
TH1C * GetEMCALL1PhaseInTimeRecalibrationForAllSM(Short_t par=0) const
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
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 SetEMCALChannelRecalibrationFactors1D(TH1S *h)
Bool_t fPlotCluster
Plot cluster in splitting method.
void SetEMCALChannelRecalibrationFactors1D(const TH1S *h)
Int_t fRunNumber
Run number of the data, take it from data itself unless set by user.
void SwitchOffLoadOwnPHOSGeometryMatrices()
void RecalibrateCellAmplitude(Float_t &amp, Int_t calo, Int_t absId) const
Recalculate cell energy if recalibration factor.
void SetEMCALChannelTimeRecalibrationFactors(TObjArray *map)
Bool_t IsPHOSGeoMatrixSet() const
void SetEMCALChannelTimeRecalibrationFactors(Int_t bc, TH1 *h)
void SetCurrentParNumber(Short_t par)
void SwitchOffLoadOwnEMCALGeometryMatrices()
void SetEMCALChannelStatusMap(TObjArray *map)
Bool_t IsTimeRecalibrationOn() const
Bool_t IsDistanceToBadChannelRecalculated() const
void SetCurrentParNumber(Short_t par)
Bool_t fOADBSet
AODB parameters already set.
unsigned short UShort_t
Definition: External.C:28
void SetEMCALL1PhaseInTimeRecalibrationForSM(Int_t iSM, Int_t c=0, Short_t par=0)
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
const char Option_t
Definition: External.C:48
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)
Int_t GetEMCALL1PhaseInTimeRecalibrationForSM(Int_t iSM, Short_t par=0) const
Float_t fCutPhi
dPhi cut on matching (EMCAL).
void SetEMCALChannelTimeRecalibrationFactor(Int_t bc, Int_t absID, Double_t c=0, Bool_t isLGon=kFALSE)
void SetEMCALChannelStatus(Int_t iSM, Int_t iCol, Int_t iRow, Double_t status=1)
bool Bool_t
Definition: External.C:53
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)
void SetNPars(Short_t npars)
AliEMCALRecoUtils * fEMCALRecoUtils
EMCAL utils for cluster rereconstruction.
Int_t GetFirstSuperModuleUsed() const
void SetEMCALChannelRecalibrationFactors(Int_t iSM, TH2F *h)
void SetGlobalIDPar(ULong64_t glob, Short_t par)
void AccessOADB(AliVEvent *event)
void SetEMCALChannelRecalibrationFactors(const TObjArray *map)
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)
Definition: External.C:196
Bool_t GetFECCorrelatedCellAbsId(Int_t absId, Int_t absIdCorr[4]) const
Float_t GetECross(Int_t absId, AliVCaloCells *cells, Int_t bc, Float_t cellMinEn=0., Bool_t useWeight=kFALSE, Float_t energyClus=0.)
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...
void SetEMCALL1PhaseInTimeRecalibrationForAllSM(TH1C *h, Short_t par=0)
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 &regEta, Int_t &regPhi) const
TH1C * GetEMCALChannelStatusMap1D() 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