AliPhysics  88b7ad0 (88b7ad0)
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 
77  kPi0MCv2 = 6, kPi0MCv3 = 7,
79  kSDMv5 = 9, kPi0MCv5 = 10,
80  kSDMv6 =11, kPi0MCv6 = 12,
82  kPCMv1 = 14, //pure symmetric decay muon method
83  kPCMplusBTCv1 = 15, //kPCMv1 convoluted with kBeamTestCorrectedv3
84  kPCMsysv1 = 16 //variation of kPCMv1 to calculate systematics
85  };
86 
89 
91  enum { kNCuts = 12 };
92 
96 
97  //-----------------------------------------------------
98  // Position recalculation
99  //-----------------------------------------------------
100  void RecalculateClusterPosition (const AliEMCALGeometry *geom, AliVCaloCells* cells, AliVCluster* clu);
101  void RecalculateClusterPositionFromTowerIndex (const AliEMCALGeometry *geom, AliVCaloCells* cells, AliVCluster* clu);
102  void RecalculateClusterPositionFromTowerGlobal(const AliEMCALGeometry *geom, AliVCaloCells* cells, AliVCluster* clu);
103 
104  Float_t GetCellWeight(Float_t eCell, Float_t eCluster) const ;
105  void GetMaxEnergyCell(const AliEMCALGeometry *geom, AliVCaloCells* cells, const AliVCluster* clu,
106  Int_t & absId, Int_t& iSupMod, Int_t& ieta, Int_t& iphi, Bool_t &shared);
107 
108  Float_t GetMisalTransShift(Int_t i) const { if(i < 15 ) { return fMisalTransShift[i] ; }
109  else { AliInfo(Form("Index %d larger than 15, do nothing\n",i)) ;
110  return 0. ; } }
112  void SetMisalTransShift(Int_t i, Float_t shift) { if(i < 15 ) { fMisalTransShift[i] = shift ; }
113  else { AliInfo(Form("Index %d larger than 15, do nothing\n",i)) ; } }
114  void SetMisalTransShiftArray(Float_t * misal) { for(Int_t i = 0; i < 15; i++) fMisalTransShift[i] = misal[i] ; }
115  Float_t GetMisalRotShift(Int_t i) const { if(i < 15 ) { return fMisalRotShift[i] ; }
116  else { AliInfo(Form("Index %d larger than 15, do nothing\n",i)) ;
117  return 0. ; } }
119  void SetMisalRotShift(Int_t i, Float_t shift) { if(i < 15 ) { fMisalRotShift[i] = shift ; }
120  else { AliInfo(Form("Index %d larger than 15, do nothing\n",i)) ; } }
121  void SetMisalRotShiftArray(Float_t * misal) { for(Int_t i = 0; i < 15; i++)fMisalRotShift[i] = misal[i] ; }
122  Int_t GetParticleType() const { return fParticleType ; }
123  void SetParticleType(Int_t particle) { fParticleType = particle ; }
124  Int_t GetPositionAlgorithm() const { return fPosAlgo ; }
125  void SetPositionAlgorithm(Int_t alg) { fPosAlgo = alg ; }
126  Float_t GetW0() const { return fW0 ; }
127  void SetW0(Float_t w0) { fW0 = w0 ; }
128 
130 
131  //-----------------------------------------------------
132  // Non Linearity
133  //-----------------------------------------------------
134  Float_t CorrectClusterEnergyLinearity(AliVCluster* clu) ;
135  Float_t GetNonLinearityParam(Int_t i) const { if(i < 10 && i >=0 ){ return fNonLinearityParams[i] ; }
136  else { AliInfo(Form("Index %d larger than 9 or negative, do nothing\n",i)) ;
137  return 0. ; } }
138  void SetNonLinearityParam(Int_t i, Float_t param) { if(i < 10 && i >=0 ){ fNonLinearityParams[i] = param ; }
139  else { AliInfo(Form("Index %d larger than 9 or negative, do nothing\n",i)) ; } }
140  void InitNonLinearityParam();
143  void SetNonLinearityThreshold(Int_t threshold) { fNonLinearThreshold = threshold ; } //only for Alexie's non linearity correction
145 
146  //-----------------------------------------------------
147  // MC clusters energy smearing
148  //-----------------------------------------------------
149  Float_t SmearClusterEnergy(const AliVCluster* clu) ;
153  void SetSmearingParameters(Int_t i, Float_t param) { if(i < 3){ fSmearClusterParam[i] = param ; }
154  else { AliInfo(Form("Index %d larger than 2, do nothing\n",i)) ; } }
155  //-----------------------------------------------------
156  // Recalibration
157  //-----------------------------------------------------
159  Float_t & amp, Double_t & time, AliVCaloCells* cells) ; // Energy and Time
160  void RecalibrateCells(AliVCaloCells * cells, Int_t bc) ; // Energy and Time
161  void RecalibrateClusterEnergy(const AliEMCALGeometry* geom, AliVCluster* cluster, AliVCaloCells * cells, Int_t bc=-1) ; // Energy and time
163 
164  // Energy recalibration
173  void SetEMCALChannelRecalibrationFactors(Int_t iSM , const TH2F* h);
176  return (Float_t) ((TH2F*)fEMCALRecalibrationFactors->At(iSM))->GetBinContent(iCol,iRow);
177  else return 1 ; }
180  ((TH2F*)fEMCALRecalibrationFactors->At(iSM))->SetBinContent(iCol,iRow,c) ; }
181 
182  // Recalibrate channels energy with run dependent corrections
186  SwitchOnRecalibration() ; }
187  // Time Recalibration
189 
190  void RecalibrateCellTime(Int_t absId, Int_t bc, Double_t & time,Bool_t isLGon = kFALSE) const;
191 
198 
199  Float_t GetEMCALChannelTimeRecalibrationFactor(Int_t bc, Int_t absID, Bool_t isLGon = kFALSE) const {
201  return (Float_t) ((TH1F*)fEMCALTimeRecalibrationFactors->At(bc+4*isLGon))->GetBinContent(absID);
202  else return 0 ; }
203  void SetEMCALChannelTimeRecalibrationFactor(Int_t bc, Int_t absID, Double_t c = 0, Bool_t isLGon=kFALSE) {
205  ((TH1F*)fEMCALTimeRecalibrationFactors->At(bc+4*isLGon))->SetBinContent(absID,c) ; }
206 
209  void SetEMCALChannelTimeRecalibrationFactors(Int_t bc , const TH1F* h);
210 
211  Bool_t IsLGOn()const { return fLowGain ; }
212  void SwitchOffLG() { fLowGain = kFALSE ; }
213  void SwitchOnLG() { fLowGain = kTRUE ; }
214 
215 
216  // Time Recalibration with L1 phase
222 
223  void RecalibrateCellTimeL1Phase(Int_t iSM, Int_t bc, Double_t & time) const;
227  return (Int_t) ((TH1C*)fEMCALL1PhaseInTimeRecalibration->At(0))->GetBinContent(iSM);
228  else return 0 ; }
231  ((TH1C*)fEMCALL1PhaseInTimeRecalibration->At(0))->SetBinContent(iSM,c) ; }
232 
235  void SetEMCALL1PhaseInTimeRecalibrationForAllSM(const TH1C* h);
236 
237  //-----------------------------------------------------
238  // Modules fiducial region, remove clusters in borders
239  //-----------------------------------------------------
240  Bool_t CheckCellFiducialRegion(const AliEMCALGeometry* geom,
241  const AliVCluster* cluster,
242  AliVCaloCells* cells) ;
245 
249 
250  //-----------------------------------------------------
251  // Bad channels
252  //-----------------------------------------------------
263  void SetEMCALBadChannelStatusSelection(Bool_t all, Bool_t dead, Bool_t hot, Bool_t warm);
265  { fBadStatusSelection[0] = kFALSE; fBadStatusSelection[AliCaloCalibPedestal::kWarning] = kFALSE; }
267  { fBadStatusSelection[0] = kFALSE; fBadStatusSelection[AliCaloCalibPedestal::kDead] = kFALSE; }
269  { fBadStatusSelection[0] = kFALSE; fBadStatusSelection[AliCaloCalibPedestal::kHot] = kFALSE; }
270  Bool_t GetEMCALChannelStatus(Int_t iSM , Int_t iCol, Int_t iRow, Int_t & status) const ;
271  void SetEMCALChannelStatus(Int_t iSM , Int_t iCol, Int_t iRow, Double_t status = 1) {
273  ((TH2I*)fEMCALBadChannelMap->At(iSM))->SetBinContent(iCol,iRow,status) ; }
274  TH2I * GetEMCALChannelStatusMap(Int_t iSM) const { return (TH2I*)fEMCALBadChannelMap->At(iSM) ; }
275  void SetEMCALChannelStatusMap(const TObjArray *map);
276  void SetEMCALChannelStatusMap(Int_t iSM , const TH2I* h);
277  Bool_t ClusterContainsBadChannel(const AliEMCALGeometry* geom, const UShort_t* cellList, Int_t nCells);
278 
279  //-----------------------------------------------------
280  // Recalculate other cluster parameters
281  //-----------------------------------------------------
282  void RecalculateClusterDistanceToBadChannel (const AliEMCALGeometry * geom, AliVCaloCells* cells, AliVCluster * cluster);
283  void RecalculateClusterShowerShapeParameters(const AliEMCALGeometry * geom, AliVCaloCells* cells, AliVCluster * cluster);
284  void RecalculateClusterShowerShapeParameters(const AliEMCALGeometry * geom, AliVCaloCells* cells, AliVCluster * cluster,
285  Float_t & l0, Float_t & l1,
286  Float_t & disp, Float_t & dEta, Float_t & dPhi,
287  Float_t & sEta, Float_t & sPhi, Float_t & sEtaPhi);
288 
289  void RecalculateClusterShowerShapeParametersWithCellCuts(const AliEMCALGeometry * geom, AliVCaloCells* cells, AliVCluster * cluster,
290  Float_t cellEcut, Float_t cellTimeCut, Int_t bc, Float_t & enAfterCuts);
291 
292  void RecalculateClusterShowerShapeParametersWithCellCuts(const AliEMCALGeometry * geom, AliVCaloCells* cells, AliVCluster * cluster,
293  Float_t cellEcut, Float_t cellTimeCut, Int_t bc,
294  Float_t & enAfterCuts, Float_t & l0, Float_t & l1,
295  Float_t & disp, Float_t & dEta, Float_t & dPhi,
296  Float_t & sEta, Float_t & sPhi, Float_t & sEtaPhi);
297  void RecalculateClusterPID(AliVCluster * cluster);
298  AliEMCALPIDUtils * GetPIDUtils() { return fPIDUtils;}
299 
300  //----------------------------------------------------
301  // Track matching
302  //----------------------------------------------------
303  void FindMatches(AliVEvent *event, TObjArray * clusterArr=0x0, const AliEMCALGeometry *geom=0x0, AliMCEvent* mc = 0x0);
304  Int_t FindMatchedClusterInEvent(const AliESDtrack *track, const AliVEvent *event,
305  const AliEMCALGeometry *geom, Float_t &dEta, Float_t &dPhi);
306  Int_t FindMatchedClusterInClusterArr(const AliExternalTrackParam *emcalParam,
307  AliExternalTrackParam *trkParam,
308  const TObjArray * clusterArr,
309  Float_t &dEta, Float_t &dPhi);
310 
311  // Needed by analysis task in AliPhysics, could be removed once base class committed and analysis task is fixed.
312  static Bool_t ExtrapolateTrackToCluster (AliExternalTrackParam *trkParam, const AliVCluster *cluster,
313  Double_t mass, Double_t step,
314  Float_t &tmpEta, Float_t &tmpPhi)
315  { return AliEMCALRecoUtilsBase::ExtrapolateTrackToCluster (trkParam, cluster, mass, step, tmpEta, tmpPhi) ; }
316 
317  Bool_t ExtrapolateTrackToCluster (AliExternalTrackParam *trkParam, const AliVCluster *cluster,
318  Float_t &tmpEta, Float_t &tmpPhi);
319 
320  UInt_t FindMatchedPosForCluster(Int_t clsIndex) const;
321  UInt_t FindMatchedPosForTrack (Int_t trkIndex) const;
322  void GetMatchedResiduals (Int_t clsIndex, Float_t &dEta, Float_t &dPhi);
323  void GetMatchedClusterResiduals(Int_t trkIndex, Float_t &dEta, Float_t &dPhi);
324  Int_t GetMatchedTrackIndex(Int_t clsIndex);
326  Bool_t IsClusterMatched(Int_t clsIndex) const;
327  Bool_t IsTrackMatched (Int_t trkIndex) const;
328  void SetClusterMatchedToTrack (const AliVEvent *event);
329  void SetTracksMatchedToCluster(const AliVEvent *event);
331  fCutEtaPhiSeparate = kFALSE ; }
333  fCutEtaPhiSum = kFALSE ; }
334  Float_t GetCutR() const { return fCutR ; }
335  Float_t GetCutEta() const { return fCutEta ; }
336  Float_t GetCutPhi() const { return fCutPhi ; }
338  void SetCutR(Float_t cutR) { fCutR = cutR ; }
339  void SetCutEta(Float_t cutEta) { fCutEta = cutEta ; }
340  void SetCutPhi(Float_t cutPhi) { fCutPhi = cutPhi ; }
341  void SetClusterWindow(Double_t window) { fClusterWindow = window ; }
342  void SetCutZ(Float_t cutZ) { printf("Obsolete fucntion of cutZ=%1.1f\n",cutZ) ; } //Obsolete
344  Double_t GetMass() const { return fMass ; }
345  Double_t GetStep() const { return fStepCluster ; }
346  Double_t GetStepSurface() const { return fStepSurface ; }
348  void SetStep(Double_t step) { fStepSurface = step ; }
349  void SetStepCluster(Double_t step) { fStepCluster = step ; }
350  void SetITSTrackSA(Bool_t isITS) { fITSTrackSA = isITS ; } //Special Handle of AliExternTrackParam
351 
352  // Track Cuts
353  Bool_t IsAccepted(AliESDtrack *track);
354  void InitTrackCuts();
355  void SetTrackCutsType(Int_t type) { fTrackCutsType = type ;
356  InitTrackCuts() ; }
358 
359  // Define AOD track type for matching
366 
367  // track quality cut setters
368  void SetMinTrackPt(Double_t pt=0) { fCutMinTrackPt = pt ; }
369  void SetMinNClustersTPC(Int_t min=-1) { fCutMinNClusterTPC = min ; }
370  void SetMinNClustersITS(Int_t min=-1) { fCutMinNClusterITS = min ; }
376  void SetMaxDCAToVertexXY(Float_t dist=1e10) { fCutMaxDCAToVertexXY = dist ; }
377  void SetMaxDCAToVertexZ(Float_t dist=1e10) { fCutMaxDCAToVertexZ = dist ; }
378  void SetDCAToVertex2D(Bool_t b=kFALSE) { fCutDCAToVertex2D = b ; }
381 
382  // getters
383  Double_t GetMinTrackPt() const { return fCutMinTrackPt ; }
395 
396  //----------------------------------------------------
397  // Exotic cells / clusters
398  //----------------------------------------------------
399 
400  Bool_t IsExoticCell(Int_t absId, AliVCaloCells* cells, Int_t bc =-1) ;
404  Float_t GetECross(Int_t absID, Double_t tcell,
405  AliVCaloCells* cells, Int_t bc);
412  Bool_t IsExoticCluster(const AliVCluster *cluster, AliVCaloCells* cells, Int_t bc=0) ;
414  fRejectExoticCells = kTRUE ; }
417 
418  // Cluster selection
419  Bool_t IsGoodCluster(AliVCluster *cluster, const AliEMCALGeometry *geom,
420  AliVCaloCells* cells, Int_t bc =-1);
421 
422  //----------------------------------------------------
423  // MC labels in cells
424  //----------------------------------------------------
425 
428  if ( nGen > 5 ) fNMCGenerToAccept = 5 ;
429  else if ( nGen < 0 ) fNMCGenerToAccept = 0 ; }
430 
432  { if (ig < fNMCGenerToAccept && ig > 0 && ig < 5 ) return fMCGenerToAccept[ig] ;
433  else return "" ; }
434  void SetNameOfMCGeneratorsToAccept(Int_t ig, TString name) { if ( ig < 5 && ig >= 0 ) fMCGenerToAccept[ig] = name ; }
435 
436 
440 
441  void RecalculateCellLabelsRemoveAddedGenerator( Int_t absID, AliVCluster* clus, AliMCEvent* mc,
442  Float_t & amp, TArrayI & labeArr, TArrayF & eDepArr ) const;
443 private:
444 
445  // Position recalculation
450 
452 
456 
457  // Non linearity
461 
462  // Energy smearing for MC
465  TRandom3 fRandom;
466 
467  // Energy Recalibration
471 
472  // Time Recalibration
477 
478  // Time Recalibration with L1 phase
481 
482  // Recalibrate with run dependent corrections, energy
484 
485  // Bad Channels
490 
495  // Border cells
498 
499  // Exotic cell / cluster
505 
506  // PID
507  AliEMCALPIDUtils * fPIDUtils;
508 
509  // Track matching
513 
516  TArrayF * fResidualEta;
517  TArrayF * fResidualPhi;
529 
530  // Track cuts
545 
546  // MC labels in cells
550 
552  ClassDef(AliEMCALRecoUtils, 26) ;
554 
555 };
556 
557 #endif // ALIEMCALRECOUTILS_H
558 
559 
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)