AliPhysics  master (3d17d9d)
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  kBeamTestNS = 18, // Custom fit of all avail. TB points and E>100 GeV data
89  kPi0MCNS = 19 // Custom fit of all avail. TB points and E>100 GeV MC
90  };
91 
94 
96  enum { kNCuts = 12 };
97 
101 
102  //-----------------------------------------------------
103  // Position recalculation
104  //-----------------------------------------------------
105  void RecalculateClusterPosition (const AliEMCALGeometry *geom, AliVCaloCells* cells, AliVCluster* clu);
106  void RecalculateClusterPositionFromTowerIndex (const AliEMCALGeometry *geom, AliVCaloCells* cells, AliVCluster* clu);
107  void RecalculateClusterPositionFromTowerGlobal(const AliEMCALGeometry *geom, AliVCaloCells* cells, AliVCluster* clu);
108 
109  Float_t GetCellWeight(Float_t eCell, Float_t eCluster) const ;
110  void GetMaxEnergyCell(const AliEMCALGeometry *geom, AliVCaloCells* cells, const AliVCluster* clu,
111  Int_t & absId, Int_t& iSupMod, Int_t& ieta, Int_t& iphi, Bool_t &shared);
112 
113  Float_t GetMisalTransShift(Int_t i) const { if(i < 15 ) { return fMisalTransShift[i] ; }
114  else { AliInfo(Form("Index %d larger than 15, do nothing\n",i)) ;
115  return 0. ; } }
117  void SetMisalTransShift(Int_t i, Float_t shift) { if(i < 15 ) { fMisalTransShift[i] = shift ; }
118  else { AliInfo(Form("Index %d larger than 15, do nothing\n",i)) ; } }
119  void SetMisalTransShiftArray(Float_t * misal) { for(Int_t i = 0; i < 15; i++) fMisalTransShift[i] = misal[i] ; }
120  Float_t GetMisalRotShift(Int_t i) const { if(i < 15 ) { return fMisalRotShift[i] ; }
121  else { AliInfo(Form("Index %d larger than 15, do nothing\n",i)) ;
122  return 0. ; } }
124  void SetMisalRotShift(Int_t i, Float_t shift) { if(i < 15 ) { fMisalRotShift[i] = shift ; }
125  else { AliInfo(Form("Index %d larger than 15, do nothing\n",i)) ; } }
126  void SetMisalRotShiftArray(Float_t * misal) { for(Int_t i = 0; i < 15; i++)fMisalRotShift[i] = misal[i] ; }
127  Int_t GetParticleType() const { return fParticleType ; }
128  void SetParticleType(Int_t particle) { fParticleType = particle ; }
129  Int_t GetPositionAlgorithm() const { return fPosAlgo ; }
130  void SetPositionAlgorithm(Int_t alg) { fPosAlgo = alg ; }
131  Float_t GetW0() const { return fW0 ; }
132  void SetW0(Float_t w0) { fW0 = w0 ; }
133 
135 
136  //-----------------------------------------------------
137  // Non Linearity
138  //-----------------------------------------------------
139  Float_t CorrectClusterEnergyLinearity(AliVCluster* clu) ;
140  Float_t GetNonLinearityParam(Int_t i) const { if(i < 10 && i >=0 ){ return fNonLinearityParams[i] ; }
141  else { AliInfo(Form("Index %d larger than 9 or negative, do nothing\n",i)) ;
142  return 0. ; } }
143  void SetNonLinearityParam(Int_t i, Float_t param) { if(i < 10 && i >=0 ){ fNonLinearityParams[i] = param ; }
144  else { AliInfo(Form("Index %d larger than 9 or negative, do nothing\n",i)) ; } }
145  void InitNonLinearityParam();
148  void SetNonLinearityThreshold(Int_t threshold) { fNonLinearThreshold = threshold ; } //only for Alexie's non linearity correction
151 
152  //-----------------------------------------------------
153  // MC clusters energy smearing
154  //-----------------------------------------------------
155  Float_t SmearClusterEnergy(const AliVCluster* clu) ;
159  void SetSmearingParameters(Int_t i, Float_t param) { if(i < 3){ fSmearClusterParam[i] = param ; }
160  else { AliInfo(Form("Index %d larger than 2, do nothing\n",i)) ; } }
161  //-----------------------------------------------------
162  // Recalibration
163  //-----------------------------------------------------
165  Float_t & amp, Double_t & time, AliVCaloCells* cells) ; // Energy and Time
166  void RecalibrateCells(AliVCaloCells * cells, Int_t bc) ; // Energy and Time
167  void RecalibrateClusterEnergy(const AliEMCALGeometry* geom, AliVCluster* cluster, AliVCaloCells * cells, Int_t bc=-1) ; // Energy and time
169 
170  // Energy recalibration
172  Float_t CorrectShaperNonLin(Float_t Emeas, Float_t EcalibHG) ; // shaper energy nonlinearity
181  TH1S * GetEMCALChannelRecalibrationFactors1D() const { return (TH1S*)fEMCALRecalibrationFactors->At(0) ; }
183  void SetEMCALChannelRecalibrationFactors(Int_t iSM , const TH2F* h);
184  void SetEMCALChannelRecalibrationFactors1D(const TH1S* h);
187  return (Float_t) ((TH2F*)fEMCALRecalibrationFactors->At(iSM))->GetBinContent(iCol,iRow);
188  else return 1 ; }
191  return (Float_t) ((TH1S*)fEMCALRecalibrationFactors->At(0))->GetBinContent(iCell)/1000;
192  else return 1 ; }
195  ((TH2F*)fEMCALRecalibrationFactors->At(iSM))->SetBinContent(iCol,iRow,c) ; }
196 
199  ((TH1S*)fEMCALRecalibrationFactors->At(0))->SetBinContent(icell,c) ; }
200 
201  // Recalibrate channels energy with run dependent corrections
205  SwitchOnRecalibration() ; }
206  // Time Recalibration
207  void SetUseOneHistForAllBCs(Bool_t useOneHist) { fDoUseMergedBC = useOneHist ; }
209 
210  void RecalibrateCellTime(Int_t absId, Int_t bc, Double_t & time,Bool_t isLGon = kFALSE) const;
211 
218 
219  Float_t GetEMCALChannelTimeRecalibrationFactor(Int_t bc, Int_t absID, Bool_t isLGon = kFALSE) const {
221  if(fDoUseMergedBC)
222  return (Float_t) ((TH1S*)fEMCALTimeRecalibrationFactors->At(1*isLGon))->GetBinContent(absID);
223  else
224  return (Float_t) ((TH1F*)fEMCALTimeRecalibrationFactors->At(bc+4*isLGon))->GetBinContent(absID);
225  } else return 0 ; }
226  void SetEMCALChannelTimeRecalibrationFactor(Int_t bc, Int_t absID, Double_t c = 0, Bool_t isLGon=kFALSE) {
228  if(fDoUseMergedBC)
229  ((TH1S*)fEMCALTimeRecalibrationFactors->At(isLGon))->SetBinContent(absID,c) ;
230  else
231  ((TH1F*)fEMCALTimeRecalibrationFactors->At(bc+4*isLGon))->SetBinContent(absID,c) ; }
232 
236 
237  Bool_t IsLGOn()const { return fLowGain ; }
238  void SwitchOffLG() { fLowGain = kFALSE ; }
239  void SwitchOnLG() { fLowGain = kTRUE ; }
240 
241 
242  // Time Recalibration with L1 phase
248 
249  void RecalibrateCellTimeL1Phase(Int_t iSM, Int_t bc, Double_t & time, Short_t par=0) const;
253  return (Int_t) ((TH1C*)fEMCALL1PhaseInTimeRecalibration->At(par))->GetBinContent(iSM);
254  else return 0 ; }
257  ((TH1C*)fEMCALL1PhaseInTimeRecalibration->At(par))->SetBinContent(iSM,c) ; }
258 
261  void SetEMCALL1PhaseInTimeRecalibrationForAllSM(const TH1C* h, Short_t par=0);
262 
263  void SwitchOnParRun() { fIsParRun = kTRUE ; }
264  void SwitchOffParRun() { fIsParRun = kFALSE ; }
265  Bool_t IsParRun() { return fIsParRun ; }
268  Short_t GetNPars() { return fNPars ; }
269  void SetNPars(Short_t npars) { fNPars = npars ;
270  if(fGlobalEventID) delete fGlobalEventID;
271  fGlobalEventID = new ULong64_t[npars];
272  for(Short_t i=0;i<npars;i++) fGlobalEventID[i]=0;
273  }
274  ULong64_t GetGlobalIDPar(Short_t par) {
275  return par<fNPars ? fGlobalEventID[par] : 0 ;
276  }
277  void SetGlobalIDPar(ULong64_t glob, Short_t par) {
278  if(par < fNPars) fGlobalEventID[par] = glob ;
279  else AliInfo("PAR index exceeds max number of PARs in the run");
280  }
281 
282  //-----------------------------------------------------
283  // Modules fiducial region, remove clusters in borders
284  //-----------------------------------------------------
285  Bool_t CheckCellFiducialRegion(const AliEMCALGeometry* geom,
286  const AliVCluster* cluster,
287  AliVCaloCells* cells) ;
290 
294 
295  //-----------------------------------------------------
296  // Bad channels
297  //-----------------------------------------------------
310  void SetEMCALBadChannelStatusSelection(Bool_t all, Bool_t dead, Bool_t hot, Bool_t warm);
312  { fBadStatusSelection[0] = kFALSE; fBadStatusSelection[AliCaloCalibPedestal::kWarning] = kFALSE; }
314  { fBadStatusSelection[0] = kFALSE; fBadStatusSelection[AliCaloCalibPedestal::kDead] = kFALSE; }
316  { fBadStatusSelection[0] = kFALSE; fBadStatusSelection[AliCaloCalibPedestal::kHot] = kFALSE; }
317  Bool_t GetEMCALChannelStatus(Int_t iSM , Int_t iCol, Int_t iRow, Int_t & status) const ;
318  Bool_t GetEMCALChannelStatus1D(Int_t iCell, Int_t & status) const ;
319  void SetEMCALChannelStatus(Int_t iSM , Int_t iCol, Int_t iRow, Double_t status = 1) {
321  ((TH2I*)fEMCALBadChannelMap->At(iSM))->SetBinContent(iCol,iRow,status) ; }
322  void SetEMCALChannelStatus1D(Int_t iCell, Double_t status = 1) {
324  ((TH1C*)fEMCALBadChannelMap->At(0))->SetBinContent(iCell,status) ; }
325  TH2I * GetEMCALChannelStatusMap(Int_t iSM) const;
326  TH1C * GetEMCALChannelStatusMap1D() const { return (TH1C*)fEMCALBadChannelMap->At(0) ; }
327  void SetEMCALChannelStatusMap(const TObjArray *map);
328  void SetEMCALChannelStatusMap(Int_t iSM , const TH2I* h);
329  void SetEMCALChannelStatusMap1D(const TH1C* h);
330  Bool_t ClusterContainsBadChannel(const AliEMCALGeometry* geom, const UShort_t* cellList, Int_t nCells);
331 
332  //-----------------------------------------------------
333  // Recalculate other cluster parameters
334  //-----------------------------------------------------
335  void RecalculateClusterDistanceToBadChannel (const AliEMCALGeometry * geom, AliVCaloCells* cells, AliVCluster * cluster);
336  void RecalculateClusterShowerShapeParameters(const AliEMCALGeometry * geom, AliVCaloCells* cells, AliVCluster * cluster);
337  void RecalculateClusterShowerShapeParameters(const AliEMCALGeometry * geom, AliVCaloCells* cells, AliVCluster * cluster,
338  Float_t & l0, Float_t & l1,
339  Float_t & disp, Float_t & dEta, Float_t & dPhi,
340  Float_t & sEta, Float_t & sPhi, Float_t & sEtaPhi);
341 
342  void RecalculateClusterShowerShapeParametersWithCellCuts(const AliEMCALGeometry * geom, AliVCaloCells* cells, AliVCluster * cluster,
343  Float_t cellEcut, Float_t cellTimeCut, Int_t bc, Float_t & enAfterCuts);
344 
345  void RecalculateClusterShowerShapeParametersWithCellCuts(const AliEMCALGeometry * geom, AliVCaloCells* cells, AliVCluster * cluster,
346  Float_t cellEcut, Float_t cellTimeCut, Int_t bc,
347  Float_t & enAfterCuts, Float_t & l0, Float_t & l1,
348  Float_t & disp, Float_t & dEta, Float_t & dPhi,
349  Float_t & sEta, Float_t & sPhi, Float_t & sEtaPhi);
350  void RecalculateClusterPID(AliVCluster * cluster);
351  AliEMCALPIDUtils * GetPIDUtils() { return fPIDUtils;}
352 
353  //----------------------------------------------------
354  // Track matching
355  //----------------------------------------------------
356  void FindMatches(AliVEvent *event, TObjArray * clusterArr=0x0, const AliEMCALGeometry *geom=0x0, AliMCEvent* mc = 0x0);
357  Int_t FindMatchedClusterInEvent(const AliESDtrack *track, const AliVEvent *event,
358  const AliEMCALGeometry *geom, Float_t &dEta, Float_t &dPhi);
359  Int_t FindMatchedClusterInClusterArr(const AliExternalTrackParam *emcalParam,
360  AliExternalTrackParam *trkParam,
361  const TObjArray * clusterArr,
362  Float_t &dEta, Float_t &dPhi);
363 
364  // Needed by analysis task in AliPhysics, could be removed once base class committed and analysis task is fixed.
365  static Bool_t ExtrapolateTrackToCluster (AliExternalTrackParam *trkParam, const AliVCluster *cluster,
366  Double_t mass, Double_t step,
367  Float_t &tmpEta, Float_t &tmpPhi)
368  { return AliEMCALRecoUtilsBase::ExtrapolateTrackToCluster (trkParam, cluster, mass, step, tmpEta, tmpPhi) ; }
369 
370  Bool_t ExtrapolateTrackToCluster (AliExternalTrackParam *trkParam, const AliVCluster *cluster,
371  Float_t &tmpEta, Float_t &tmpPhi);
372 
373  UInt_t FindMatchedPosForCluster(Int_t clsIndex) const;
374  UInt_t FindMatchedPosForTrack (Int_t trkIndex) const;
375  void GetMatchedResiduals (Int_t clsIndex, Float_t &dEta, Float_t &dPhi);
376  void GetMatchedClusterResiduals(Int_t trkIndex, Float_t &dEta, Float_t &dPhi);
377  Int_t GetMatchedTrackIndex(Int_t clsIndex);
379  Bool_t IsClusterMatched(Int_t clsIndex) const;
380  Bool_t IsTrackMatched (Int_t trkIndex) const;
381  void SetClusterMatchedToTrack (const AliVEvent *event);
382  void SetTracksMatchedToCluster(const AliVEvent *event);
384  fCutEtaPhiSeparate = kFALSE ; }
386  fCutEtaPhiSum = kFALSE ; }
387  Float_t GetCutR() const { return fCutR ; }
388  Float_t GetCutEta() const { return fCutEta ; }
389  Float_t GetCutPhi() const { return fCutPhi ; }
391  void SetCutR(Float_t cutR) { fCutR = cutR ; }
392  void SetCutEta(Float_t cutEta) { fCutEta = cutEta ; }
393  void SetCutPhi(Float_t cutPhi) { fCutPhi = cutPhi ; }
394  void SetClusterWindow(Double_t window) { fClusterWindow = window ; }
395  void SetCutZ(Float_t cutZ) { printf("Obsolete fucntion of cutZ=%1.1f\n",cutZ) ; } //Obsolete
397  Double_t GetMass() const { return fMass ; }
398  Double_t GetStep() const { return fStepCluster ; }
399  Double_t GetStepSurface() const { return fStepSurface ; }
401  void SetStep(Double_t step) { fStepSurface = step ; }
402  void SetStepCluster(Double_t step) { fStepCluster = step ; }
403  void SetITSTrackSA(Bool_t isITS) { fITSTrackSA = isITS ; } //Special Handle of AliExternTrackParam
406 
407 
408  // Track Cuts
409  Bool_t IsAccepted(AliESDtrack *track);
410  void InitTrackCuts();
411  void SetTrackCutsType(Int_t type) { fTrackCutsType = type ;
412  InitTrackCuts() ; }
414 
415  // Define AOD track type for matching
422 
423  // track quality cut setters
424  void SetMinTrackPt(Double_t pt=0) { fCutMinTrackPt = pt ; }
425  void SetMinNClustersTPC(Int_t min=-1) { fCutMinNClusterTPC = min ; }
426  void SetMinNClustersITS(Int_t min=-1) { fCutMinNClusterITS = min ; }
432  void SetMaxDCAToVertexXY(Float_t dist=1e10) { fCutMaxDCAToVertexXY = dist ; }
433  void SetMaxDCAToVertexZ(Float_t dist=1e10) { fCutMaxDCAToVertexZ = dist ; }
434  void SetDCAToVertex2D(Bool_t b=kFALSE) { fCutDCAToVertex2D = b ; }
437  void SetRequireTrackDCA(Bool_t b=kFALSE) { fUseTrackDCA = b ; }
438 
439  // getters
440  Double_t GetMinTrackPt() const { return fCutMinTrackPt ; }
452  Bool_t GetRequireTrackDCA() const { return fUseTrackDCA ; }
453 
454  //----------------------------------------------------
455  // Exotic cells / clusters
456  //----------------------------------------------------
457 
458  Bool_t IsExoticCell(Int_t absId, AliVCaloCells* cells, Int_t bc =-1) ;
462  Float_t GetECross(Int_t absID, Double_t tcell, AliVCaloCells* cells, Int_t bc,
463  Float_t cellMinEn = 0., Bool_t useWeight = kFALSE, Float_t energyClus = 0.);
470  Bool_t IsExoticCluster(const AliVCluster *cluster, AliVCaloCells* cells, Int_t bc=0) ;
472  fRejectExoticCells = kTRUE ; }
475 
476  Bool_t IsAbsIDsFromTCard(Int_t absId1, Int_t absId2,
477  Int_t & rowDiff, Int_t & colDiff) const ;
478 
479  void GetEnergyAndNumberOfCellsInTCard(AliVCluster* clus, Int_t absIdMax, AliVCaloCells* cells,
480  Int_t & nDiff, Int_t & nSame,
481  Float_t & eDiff, Float_t & eSame,
482  Float_t emin = 0.);
483 
484  // Cluster selection
485  Bool_t IsGoodCluster(AliVCluster *cluster, const AliEMCALGeometry *geom,
486  AliVCaloCells* cells, Int_t bc =-1);
487 
488  //----------------------------------------------------
489  // MC labels in cells
490  //----------------------------------------------------
491 
494  if ( nGen > 5 ) fNMCGenerToAccept = 5 ;
495  else if ( nGen < 0 ) fNMCGenerToAccept = 0 ; }
496 
498  { if (ig < fNMCGenerToAccept && ig > 0 && ig < 5 ) return fMCGenerToAccept[ig] ;
499  else return "" ; }
500  void SetNameOfMCGeneratorsToAccept(Int_t ig, TString name) { if ( ig < 5 && ig >= 0 ) fMCGenerToAccept[ig] = name ; }
501 
502 
506 
507  void RecalculateCellLabelsRemoveAddedGenerator( Int_t absID, AliVCluster* clus, AliMCEvent* mc,
508  Float_t & amp, TArrayI & labeArr, TArrayF & eDepArr ) const;
509 private:
510 
511  // Position recalculation
516 
518 
522 
523  // Non linearity
528 
529  // Energy smearing for MC
532  TRandom3 fRandom;
533 
534  // Energy Recalibration
539 
540  // Time Recalibration
545 
546  // Time Recalibration with L1 phase
552  ULong64_t* fGlobalEventID;
554 
555  // Recalibrate with run dependent corrections, energy
557 
558  // Bad Channels
564 
569  // Border cells
572 
573  // Exotic cell / cluster
579 
580  // PID
581  AliEMCALPIDUtils * fPIDUtils;
582 
583  // Track matching
587 
590  TArrayF * fResidualEta;
591  TArrayF * fResidualPhi;
605 
606  // Track cuts
621 
622  // MC labels in cells
626 
628  ClassDef(AliEMCALRecoUtils, 33) ;
630 
631 };
632 
633 #endif // ALIEMCALRECOUTILS_H
634 
635 
void SetEMCALChannelStatusMap1D(const TH1C *h)
void SetUse1DRecalibration(Bool_t use)
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)
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)
Float_t GetECross(Int_t absID, Double_t tcell, AliVCaloCells *cells, Int_t bc, Float_t cellMinEn=0., Bool_t useWeight=kFALSE, Float_t energyClus=0.)
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.
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
TH2I * GetEMCALChannelStatusMap(Int_t iSM) const
Double_t GetClusterWindow() const
Bool_t IsRejectExoticCluster() 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)
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
TH1C * GetEMCALChannelStatusMap1D() 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
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, ESDs.
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
Int_t GetEMCALL1PhaseInTimeRecalibrationForSM(Int_t iSM, Short_t par=0) const
void SetNumberOfMCGeneratorsToAccept(Int_t nGen)
Float_t fMisalRotShift[15]
Cluster position rotation shift parameters.
ULong64_t GetGlobalIDPar(Short_t par)
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
Short_t fCurrentParNumber
! Current par number
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 GetRequireTrackDCA() const
TH2F * GetEMCALChannelRecalibrationFactors(Int_t iSM) 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 SetUseOneHistForAllBCs(Bool_t useOneHist)
void SwitchOffAODHybridTracksMatch()
TString GetNameOfMCGeneratorsToAccept(Int_t ig) const
Short_t fNPars
Number of PARs in run.
void SwitchOnAODTPCOnlyTracksMatch()
void RecalculateClusterDistanceToBadChannel(const AliEMCALGeometry *geom, AliVCaloCells *cells, AliVCluster *cluster)
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.
Short_t GetCurrentParNumber()
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()
Float_t GetEMCALChannelRecalibrationFactor1D(UInt_t iCell) const
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
TH1 * GetEMCALChannelTimeRecalibrationFactors(Int_t bc) 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 fIsParRun
! flag if run contains PAR
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
TH1S * GetEMCALChannelRecalibrationFactors1D() const
Bool_t fUseOuterTrackParam
Use OuterTrackParam not InnerTrackParam, ESDs.
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 RecalibrateCellTimeL1Phase(Int_t iSM, Int_t bc, Double_t &time, Short_t par=0) const
void SetMaxChi2PerClusterTPC(Float_t max=1e10)
Float_t fConstantTimeShift
Apply a 600 ns (+15.8) time shift in case of simulation, shift in ns.
Int_t GetMatchedClusterIndex(Int_t trkIndex)
Int_t fNonLinearityFunction
Non linearity function choice, see enum NonlinearityFunctions.
Bool_t GetEMCALChannelStatus1D(Int_t iCell, Int_t &status) const
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 SetRequireTrackDCA(Bool_t b=kFALSE)
Bool_t fUse1Drecalib
Flag to use one dimensional recalibration histogram.
void SwitchOnMCGeneratorToAcceptForTrackMatching()
void SetClusterWindow(Double_t window)
short Short_t
Definition: External.C:23
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 IsAbsIDsFromTCard(Int_t absId1, Int_t absId2, Int_t &rowDiff, Int_t &colDiff) const
Bool_t IsGoodCluster(AliVCluster *cluster, const AliEMCALGeometry *geom, AliVCaloCells *cells, Int_t bc=-1)
ULong64_t * fGlobalEventID
array with globalID for PAR runs
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
Bool_t useWeight
Definition: anaTree.C:26
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.
TH1C * GetEMCALL1PhaseInTimeRecalibrationForAllSM(Short_t par=0) const
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.
void SetUse1DBadChannelMap(Bool_t use)
void SetEMCALChannelRecalibrationFactors1D(const TH1S *h)
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)
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()
void SetCurrentParNumber(Short_t par)
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)
void SetEMCALL1PhaseInTimeRecalibrationForSM(Int_t iSM, Int_t c=0, Short_t par=0)
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.
void SetEMCALChannelRecalibrationFactor1D(UInt_t icell, Double_t c=1)
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.
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)
void SetNPars(Short_t npars)
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...
Bool_t fUse1Dmap
Flag to use one 1D bad channel map (for all cells)
Float_t GetCutPhi() const
void SetStepCluster(Double_t step)
void SetGlobalIDPar(ULong64_t glob, Short_t par)
void SetEMCALChannelStatus1D(Int_t iCell, Double_t status=1)
void SetEMCALChannelRecalibrationFactors(const TObjArray *map)
Bool_t fUseShaperNonlin
Shaper non linearity correction for towers.
Int_t GetNumberOfMCGeneratorsToAccept() const
Int_t GetTrackCutsType() const
Bool_t fUseTrackDCA
Activate use of aodtrack->GetXYZ or XvYxZv like in AliEMCALRecoUtilsBase::ExtrapolateTrackToEMCalSurf...
void SwitchOffClusterEnergySmearing()
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()
Definition: External.C:196
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
Float_t CorrectShaperNonLin(Float_t Emeas, Float_t EcalibHG)
Bool_t fCutEtaPhiSeparate
Cut on dEta and dPhi separately.
void SetMass(Double_t mass)
void SetUseTowerShaperNonlinarityCorrection(Bool_t doCorr)
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)
Bool_t fDoUseMergedBC
flag for using one histo for all BCs