AliPhysics  d9e9949 (d9e9949)
AliEMCALRecoUtils.h
Go to the documentation of this file.
1 #ifndef ALIEMCALRECOUTILS_H
2 #define ALIEMCALRECOUTILS_H
3 
33 
34 // Root includes
35 #include <TNamed.h>
36 #include <TMath.h>
37 class TObjArray;
38 class TArrayI;
39 class TArrayF;
40 #include <TH2I.h>
41 class TH2F;
42 #include <TRandom3.h>
43 
44 // AliRoot includes
45 class AliVCluster;
46 class AliVCaloCells;
47 class AliVEvent;
48 #include "AliLog.h"
49 class AliMCEvent;
50 #include "AliCaloCalibPedestal.h"
51 
52 // EMCAL includes
53 #include "AliEMCALRecoUtilsBase.h"
54 class AliEMCALGeometry;
55 class AliEMCALPIDUtils;
56 class AliESDtrack;
57 class AliExternalTrackParam;
58 class AliVTrack;
59 
60 class AliEMCALRecoUtils : public AliEMCALRecoUtilsBase {
61 
62 public:
63 
67  virtual ~AliEMCALRecoUtils() ;
68 
69  void InitParameters();
70  void Print(const Option_t*) const;
71 
75  {
79  kPi0MCv2 = 6, kPi0MCv3 = 7,
81  kSDMv5 = 9, kPi0MCv5 = 10,
82  kSDMv6 =11, kPi0MCv6 = 12,
84  kPCMv1 = 14, // pure symmetric decay muon method
85  kPCMplusBTCv1 = 15, // kPCMv1 convoluted with kBeamTestCorrectedv3
86  kPCMsysv1 = 16, // variation of kPCMv1 to calculate systematics
87  kBeamTestCorrectedv4 = 17 // Different parametrization of v3 but similar, improve E>100 GeV linearity
88  };
89 
92 
94  enum { kNCuts = 12 };
95 
99 
100  //-----------------------------------------------------
101  // Position recalculation
102  //-----------------------------------------------------
103  void RecalculateClusterPosition (const AliEMCALGeometry *geom, AliVCaloCells* cells, AliVCluster* clu);
104  void RecalculateClusterPositionFromTowerIndex (const AliEMCALGeometry *geom, AliVCaloCells* cells, AliVCluster* clu);
105  void RecalculateClusterPositionFromTowerGlobal(const AliEMCALGeometry *geom, AliVCaloCells* cells, AliVCluster* clu);
106 
107  Float_t GetCellWeight(Float_t eCell, Float_t eCluster) const ;
108  void GetMaxEnergyCell(const AliEMCALGeometry *geom, AliVCaloCells* cells, const AliVCluster* clu,
109  Int_t & absId, Int_t& iSupMod, Int_t& ieta, Int_t& iphi, Bool_t &shared);
110 
111  Float_t GetMisalTransShift(Int_t i) const { if(i < 15 ) { return fMisalTransShift[i] ; }
112  else { AliInfo(Form("Index %d larger than 15, do nothing\n",i)) ;
113  return 0. ; } }
115  void SetMisalTransShift(Int_t i, Float_t shift) { if(i < 15 ) { fMisalTransShift[i] = shift ; }
116  else { AliInfo(Form("Index %d larger than 15, do nothing\n",i)) ; } }
117  void SetMisalTransShiftArray(Float_t * misal) { for(Int_t i = 0; i < 15; i++) fMisalTransShift[i] = misal[i] ; }
118  Float_t GetMisalRotShift(Int_t i) const { if(i < 15 ) { return fMisalRotShift[i] ; }
119  else { AliInfo(Form("Index %d larger than 15, do nothing\n",i)) ;
120  return 0. ; } }
122  void SetMisalRotShift(Int_t i, Float_t shift) { if(i < 15 ) { fMisalRotShift[i] = shift ; }
123  else { AliInfo(Form("Index %d larger than 15, do nothing\n",i)) ; } }
124  void SetMisalRotShiftArray(Float_t * misal) { for(Int_t i = 0; i < 15; i++)fMisalRotShift[i] = misal[i] ; }
125  Int_t GetParticleType() const { return fParticleType ; }
126  void SetParticleType(Int_t particle) { fParticleType = particle ; }
127  Int_t GetPositionAlgorithm() const { return fPosAlgo ; }
128  void SetPositionAlgorithm(Int_t alg) { fPosAlgo = alg ; }
129  Float_t GetW0() const { return fW0 ; }
130  void SetW0(Float_t w0) { fW0 = w0 ; }
131 
133 
134  //-----------------------------------------------------
135  // Non Linearity
136  //-----------------------------------------------------
137  Float_t CorrectClusterEnergyLinearity(AliVCluster* clu) ;
138  Float_t GetNonLinearityParam(Int_t i) const { if(i < 10 && i >=0 ){ return fNonLinearityParams[i] ; }
139  else { AliInfo(Form("Index %d larger than 9 or negative, do nothing\n",i)) ;
140  return 0. ; } }
141  void SetNonLinearityParam(Int_t i, Float_t param) { if(i < 10 && i >=0 ){ fNonLinearityParams[i] = param ; }
142  else { AliInfo(Form("Index %d larger than 9 or negative, do nothing\n",i)) ; } }
143  void InitNonLinearityParam();
146  void SetNonLinearityThreshold(Int_t threshold) { fNonLinearThreshold = threshold ; } //only for Alexie's non linearity correction
148 
149  //-----------------------------------------------------
150  // MC clusters energy smearing
151  //-----------------------------------------------------
152  Float_t SmearClusterEnergy(const AliVCluster* clu) ;
156  void SetSmearingParameters(Int_t i, Float_t param) { if(i < 3){ fSmearClusterParam[i] = param ; }
157  else { AliInfo(Form("Index %d larger than 2, do nothing\n",i)) ; } }
158  //-----------------------------------------------------
159  // Recalibration
160  //-----------------------------------------------------
162  Float_t & amp, Double_t & time, AliVCaloCells* cells) ; // Energy and Time
163  void RecalibrateCells(AliVCaloCells * cells, Int_t bc) ; // Energy and Time
164  void RecalibrateClusterEnergy(const AliEMCALGeometry* geom, AliVCluster* cluster, AliVCaloCells * cells, Int_t bc=-1) ; // Energy and time
166 
167  // Energy recalibration
176  void SetEMCALChannelRecalibrationFactors(Int_t iSM , const TH2F* h);
179  return (Float_t) ((TH2F*)fEMCALRecalibrationFactors->At(iSM))->GetBinContent(iCol,iRow);
180  else return 1 ; }
183  ((TH2F*)fEMCALRecalibrationFactors->At(iSM))->SetBinContent(iCol,iRow,c) ; }
184 
185  // Recalibrate channels energy with run dependent corrections
189  SwitchOnRecalibration() ; }
190  // Time Recalibration
192 
193  void RecalibrateCellTime(Int_t absId, Int_t bc, Double_t & time,Bool_t isLGon = kFALSE) const;
194 
201 
202  Float_t GetEMCALChannelTimeRecalibrationFactor(Int_t bc, Int_t absID, Bool_t isLGon = kFALSE) const {
204  return (Float_t) ((TH1F*)fEMCALTimeRecalibrationFactors->At(bc+4*isLGon))->GetBinContent(absID);
205  else return 0 ; }
206  void SetEMCALChannelTimeRecalibrationFactor(Int_t bc, Int_t absID, Double_t c = 0, Bool_t isLGon=kFALSE) {
208  ((TH1F*)fEMCALTimeRecalibrationFactors->At(bc+4*isLGon))->SetBinContent(absID,c) ; }
209 
212  void SetEMCALChannelTimeRecalibrationFactors(Int_t bc , const TH1F* h);
213 
214  Bool_t IsLGOn()const { return fLowGain ; }
215  void SwitchOffLG() { fLowGain = kFALSE ; }
216  void SwitchOnLG() { fLowGain = kTRUE ; }
217 
218 
219  // Time Recalibration with L1 phase
225 
226  void RecalibrateCellTimeL1Phase(Int_t iSM, Int_t bc, Double_t & time) const;
230  return (Int_t) ((TH1C*)fEMCALL1PhaseInTimeRecalibration->At(0))->GetBinContent(iSM);
231  else return 0 ; }
234  ((TH1C*)fEMCALL1PhaseInTimeRecalibration->At(0))->SetBinContent(iSM,c) ; }
235 
238  void SetEMCALL1PhaseInTimeRecalibrationForAllSM(const TH1C* h);
239 
240  //-----------------------------------------------------
241  // Modules fiducial region, remove clusters in borders
242  //-----------------------------------------------------
243  Bool_t CheckCellFiducialRegion(const AliEMCALGeometry* geom,
244  const AliVCluster* cluster,
245  AliVCaloCells* cells) ;
248 
252 
253  //-----------------------------------------------------
254  // Bad channels
255  //-----------------------------------------------------
266  void SetEMCALBadChannelStatusSelection(Bool_t all, Bool_t dead, Bool_t hot, Bool_t warm);
268  { fBadStatusSelection[0] = kFALSE; fBadStatusSelection[AliCaloCalibPedestal::kWarning] = kFALSE; }
270  { fBadStatusSelection[0] = kFALSE; fBadStatusSelection[AliCaloCalibPedestal::kDead] = kFALSE; }
272  { fBadStatusSelection[0] = kFALSE; fBadStatusSelection[AliCaloCalibPedestal::kHot] = kFALSE; }
273  Bool_t GetEMCALChannelStatus(Int_t iSM , Int_t iCol, Int_t iRow, Int_t & status) const ;
274  void SetEMCALChannelStatus(Int_t iSM , Int_t iCol, Int_t iRow, Double_t status = 1) {
276  ((TH2I*)fEMCALBadChannelMap->At(iSM))->SetBinContent(iCol,iRow,status) ; }
277  TH2I * GetEMCALChannelStatusMap(Int_t iSM) const { return (TH2I*)fEMCALBadChannelMap->At(iSM) ; }
278  void SetEMCALChannelStatusMap(const TObjArray *map);
279  void SetEMCALChannelStatusMap(Int_t iSM , const TH2I* h);
280  Bool_t ClusterContainsBadChannel(const AliEMCALGeometry* geom, const UShort_t* cellList, Int_t nCells);
281 
282  //-----------------------------------------------------
283  // Recalculate other cluster parameters
284  //-----------------------------------------------------
285  void RecalculateClusterDistanceToBadChannel (const AliEMCALGeometry * geom, AliVCaloCells* cells, AliVCluster * cluster);
286  void RecalculateClusterShowerShapeParameters(const AliEMCALGeometry * geom, AliVCaloCells* cells, AliVCluster * cluster);
287  void RecalculateClusterShowerShapeParameters(const AliEMCALGeometry * geom, AliVCaloCells* cells, AliVCluster * cluster,
288  Float_t & l0, Float_t & l1,
289  Float_t & disp, Float_t & dEta, Float_t & dPhi,
290  Float_t & sEta, Float_t & sPhi, Float_t & sEtaPhi);
291 
292  void RecalculateClusterShowerShapeParametersWithCellCuts(const AliEMCALGeometry * geom, AliVCaloCells* cells, AliVCluster * cluster,
293  Float_t cellEcut, Float_t cellTimeCut, Int_t bc, Float_t & enAfterCuts);
294 
295  void RecalculateClusterShowerShapeParametersWithCellCuts(const AliEMCALGeometry * geom, AliVCaloCells* cells, AliVCluster * cluster,
296  Float_t cellEcut, Float_t cellTimeCut, Int_t bc,
297  Float_t & enAfterCuts, Float_t & l0, Float_t & l1,
298  Float_t & disp, Float_t & dEta, Float_t & dPhi,
299  Float_t & sEta, Float_t & sPhi, Float_t & sEtaPhi);
300  void RecalculateClusterPID(AliVCluster * cluster);
301  AliEMCALPIDUtils * GetPIDUtils() { return fPIDUtils;}
302 
303  //----------------------------------------------------
304  // Track matching
305  //----------------------------------------------------
306  void FindMatches(AliVEvent *event, TObjArray * clusterArr=0x0, const AliEMCALGeometry *geom=0x0, AliMCEvent* mc = 0x0);
307  Int_t FindMatchedClusterInEvent(const AliESDtrack *track, const AliVEvent *event,
308  const AliEMCALGeometry *geom, Float_t &dEta, Float_t &dPhi);
309  Int_t FindMatchedClusterInClusterArr(const AliExternalTrackParam *emcalParam,
310  AliExternalTrackParam *trkParam,
311  const TObjArray * clusterArr,
312  Float_t &dEta, Float_t &dPhi);
313 
314  // Needed by analysis task in AliPhysics, could be removed once base class committed and analysis task is fixed.
315  static Bool_t ExtrapolateTrackToCluster (AliExternalTrackParam *trkParam, const AliVCluster *cluster,
316  Double_t mass, Double_t step,
317  Float_t &tmpEta, Float_t &tmpPhi)
318  { return AliEMCALRecoUtilsBase::ExtrapolateTrackToCluster (trkParam, cluster, mass, step, tmpEta, tmpPhi) ; }
319 
320  Bool_t ExtrapolateTrackToCluster (AliExternalTrackParam *trkParam, const AliVCluster *cluster,
321  Float_t &tmpEta, Float_t &tmpPhi);
322 
323  UInt_t FindMatchedPosForCluster(Int_t clsIndex) const;
324  UInt_t FindMatchedPosForTrack (Int_t trkIndex) const;
325  void GetMatchedResiduals (Int_t clsIndex, Float_t &dEta, Float_t &dPhi);
326  void GetMatchedClusterResiduals(Int_t trkIndex, Float_t &dEta, Float_t &dPhi);
327  Int_t GetMatchedTrackIndex(Int_t clsIndex);
329  Bool_t IsClusterMatched(Int_t clsIndex) const;
330  Bool_t IsTrackMatched (Int_t trkIndex) const;
331  void SetClusterMatchedToTrack (const AliVEvent *event);
332  void SetTracksMatchedToCluster(const AliVEvent *event);
334  fCutEtaPhiSeparate = kFALSE ; }
336  fCutEtaPhiSum = kFALSE ; }
337  Float_t GetCutR() const { return fCutR ; }
338  Float_t GetCutEta() const { return fCutEta ; }
339  Float_t GetCutPhi() const { return fCutPhi ; }
341  void SetCutR(Float_t cutR) { fCutR = cutR ; }
342  void SetCutEta(Float_t cutEta) { fCutEta = cutEta ; }
343  void SetCutPhi(Float_t cutPhi) { fCutPhi = cutPhi ; }
344  void SetClusterWindow(Double_t window) { fClusterWindow = window ; }
345  void SetCutZ(Float_t cutZ) { printf("Obsolete fucntion of cutZ=%1.1f\n",cutZ) ; } //Obsolete
347  Double_t GetMass() const { return fMass ; }
348  Double_t GetStep() const { return fStepCluster ; }
349  Double_t GetStepSurface() const { return fStepSurface ; }
351  void SetStep(Double_t step) { fStepSurface = step ; }
352  void SetStepCluster(Double_t step) { fStepCluster = step ; }
353  void SetITSTrackSA(Bool_t isITS) { fITSTrackSA = isITS ; } //Special Handle of AliExternTrackParam
354 
355  // Track Cuts
356  Bool_t IsAccepted(AliESDtrack *track);
357  void InitTrackCuts();
358  void SetTrackCutsType(Int_t type) { fTrackCutsType = type ;
359  InitTrackCuts() ; }
361 
362  // Define AOD track type for matching
369 
370  // track quality cut setters
371  void SetMinTrackPt(Double_t pt=0) { fCutMinTrackPt = pt ; }
372  void SetMinNClustersTPC(Int_t min=-1) { fCutMinNClusterTPC = min ; }
373  void SetMinNClustersITS(Int_t min=-1) { fCutMinNClusterITS = min ; }
379  void SetMaxDCAToVertexXY(Float_t dist=1e10) { fCutMaxDCAToVertexXY = dist ; }
380  void SetMaxDCAToVertexZ(Float_t dist=1e10) { fCutMaxDCAToVertexZ = dist ; }
381  void SetDCAToVertex2D(Bool_t b=kFALSE) { fCutDCAToVertex2D = b ; }
384 
385  // getters
386  Double_t GetMinTrackPt() const { return fCutMinTrackPt ; }
398 
399  //----------------------------------------------------
400  // Exotic cells / clusters
401  //----------------------------------------------------
402 
403  Bool_t IsExoticCell(Int_t absId, AliVCaloCells* cells, Int_t bc =-1) ;
407  Float_t GetECross(Int_t absID, Double_t tcell,
408  AliVCaloCells* cells, Int_t bc);
415  Bool_t IsExoticCluster(const AliVCluster *cluster, AliVCaloCells* cells, Int_t bc=0) ;
417  fRejectExoticCells = kTRUE ; }
420 
421  // Cluster selection
422  Bool_t IsGoodCluster(AliVCluster *cluster, const AliEMCALGeometry *geom,
423  AliVCaloCells* cells, Int_t bc =-1);
424 
425  //----------------------------------------------------
426  // MC labels in cells
427  //----------------------------------------------------
428 
431  if ( nGen > 5 ) fNMCGenerToAccept = 5 ;
432  else if ( nGen < 0 ) fNMCGenerToAccept = 0 ; }
433 
435  { if (ig < fNMCGenerToAccept && ig > 0 && ig < 5 ) return fMCGenerToAccept[ig] ;
436  else return "" ; }
437  void SetNameOfMCGeneratorsToAccept(Int_t ig, TString name) { if ( ig < 5 && ig >= 0 ) fMCGenerToAccept[ig] = name ; }
438 
439 
443 
444  void RecalculateCellLabelsRemoveAddedGenerator( Int_t absID, AliVCluster* clus, AliMCEvent* mc,
445  Float_t & amp, TArrayI & labeArr, TArrayF & eDepArr ) const;
446 private:
447 
448  // Position recalculation
453 
455 
459 
460  // Non linearity
464 
465  // Energy smearing for MC
468  TRandom3 fRandom;
469 
470  // Energy Recalibration
474 
475  // Time Recalibration
480 
481  // Time Recalibration with L1 phase
484 
485  // Recalibrate with run dependent corrections, energy
487 
488  // Bad Channels
493 
498  // Border cells
501 
502  // Exotic cell / cluster
508 
509  // PID
510  AliEMCALPIDUtils * fPIDUtils;
511 
512  // Track matching
516 
519  TArrayF * fResidualEta;
520  TArrayF * fResidualPhi;
532 
533  // Track cuts
548 
549  // MC labels in cells
553 
555  ClassDef(AliEMCALRecoUtils, 26) ;
557 
558 };
559 
560 #endif // ALIEMCALRECOUTILS_H
561 
562 
Bool_t IsRunDepRecalibrationOn() const
void RecalculateCellLabelsRemoveAddedGenerator(Int_t absID, AliVCluster *clus, AliMCEvent *mc, Float_t &amp, 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
double Double_t
Definition: External.C:58
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.
Definition: External.C:236
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)
Double_t GetMass() const
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)
Double_t mass
TH1C * GetEMCALL1PhaseInTimeRecalibrationForAllSM() const
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)
Bool_t IsLGOn() const
Int_t GetNumberOfCellsFromEMCALBorder() const
TObjArray * GetEMCALBadChannelStatusMapArray() const
Bool_t fRecalDistToBadChannels
Calculate distance from highest energy tower of cluster to closes bad channel.
TCanvas * c
Definition: TestFitELoss.C:172
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)
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)
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
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()
int Int_t
Definition: External.C:63
void Print(const Option_t *) const
UInt_t FindMatchedPosForCluster(Int_t clsIndex) const
Bool_t AcceptCalibrateCell(Int_t absId, Int_t bc, Float_t &amp, Double_t &time, AliVCaloCells *cells)
Bool_t AcceptMCGeneratorForTrackMatching() const
unsigned int UInt_t
Definition: External.C:33
Bool_t IsEMCALNoBorderAtEta0() const
Bool_t GetEMCALChannelStatus(Int_t iSM, Int_t iCol, Int_t iRow, Int_t &status) const
void RecalculateClusterShowerShapeParameters(const AliEMCALGeometry *geom, AliVCaloCells *cells, AliVCluster *cluster)
float Float_t
Definition: External.C:68
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.
void SetEMCALBadChannelStatusSelection(Bool_t all, Bool_t dead, Bool_t hot, Bool_t warm)
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.
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 SetW0(Float_t w0)
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 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 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)
Double_t GetStep() const
Float_t fExoticCellFraction
Good cell if fraction < 1-ecross/ecell.
void RecalculateClusterPID(AliVCluster *cluster)
Int_t fPosAlgo
Position recalculation algorithm, see enum PositionAlgorithms.
Float_t GetW0() const
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.
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)
unsigned short UShort_t
Definition: External.C:28
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?
const char Option_t
Definition: External.C:48
Int_t fNMCGenerToAccept
Number of MC generators that should not be included in analysis.
Bool_t fBadStatusSelection[4]
void SetEMCALChannelTimeRecalibrationFactor(Int_t bc, Int_t absID, Double_t c=0, Bool_t isLGon=kFALSE)
Bool_t fCutRequireITSpureSA
ITS pure standalone tracks.
Int_t GetEMCALL1PhaseInTimeRecalibrationForSM(Int_t iSM) const
void SetEMCALChannelStatus(Int_t iSM, Int_t iCol, Int_t iRow, Double_t status=1)
bool Bool_t
Definition: External.C:53
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 SwitchOffClusterEnergySmearing()
Float_t GetECross(Int_t absID, Double_t tcell, AliVCaloCells *cells, Int_t bc)
Bool_t fLowGain
Switch on or off calibration with low gain channels.
void SetEMCALChannelStatusMap(const TObjArray *map)
Float_t GetCutR() const
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 SetStep(Double_t step)
Float_t SmearClusterEnergy(const AliVCluster *clu)
void SetNameOfMCGeneratorsToAccept(Int_t ig, TString name)