AliPhysics  ff1d528 (ff1d528)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ConfigureEMCALRecoUtils.C
Go to the documentation of this file.
1 void ConfigureEMCALRecoUtils(AliEMCALRecoUtils* reco,
22  Bool_t bMC = kFALSE,
23  Bool_t bExotic= kTRUE,
24  Bool_t bNonLin= kFALSE,
25  Bool_t bRecalE= kTRUE,
26  Bool_t bBad = kTRUE,
27  Bool_t bRecalT= kTRUE,
28  Int_t debug = -1)
29 {
30  if ( debug > 0 ) printf("**** Configure AliEMCALRecoUtils ***\n");
31 
32  // Exotic cells removal
33 
34  if(bExotic)
35  {
36  if ( debug > 0 ) printf("Remove exotics in EMCAL\n");
37  reco->SwitchOnRejectExoticCell() ;
38  reco->SwitchOnRejectExoticCluster();
39 
40 // reco->SetExoticCellDiffTimeCut(50); // If |t cell max - t cell in cross| > 50 do not add its energy, avoid
41  reco->SetExoticCellFractionCut(0.97); // 1-Ecross/Ecell > 0.97 -> out
42  reco->SetExoticCellMinAmplitudeCut(4.); // 4 GeV
43  }
44 
45  // Recalibration factors
46 
47  if(bRecalE && ! bMC)
48  {
49  reco->SwitchOnRecalibration();
50  reco->SwitchOnRunDepCorrection();
51  }
52 
53  // Remove EMCAL hot channels
54 
55  if(bBad)
56  {
57  reco->SwitchOnBadChannelsRemoval();
58  reco->SwitchOnDistToBadChannelRecalculation();
59  }
60 
61  // *** Time recalibration settings ***
62 
63  if(bRecalT && ! bMC)
64  {
65  reco->SwitchOnTimeRecalibration();
66  reco->SwitchOnL1PhaseInTimeRecalibration() ;
67  }
68 
69  // Recalculate position with method
70 
71  reco->SetPositionAlgorithm(AliEMCALRecoUtils::kPosTowerGlobal);
72 
73  // Non linearity
74 
75  if( bNonLin )
76  {
77  if(!bMC)
78  {
79  if ( debug > 0 ) printf("xxx SET Non linearity correction kBeamTestCorrected xxx\n");
80  reco->SetNonLinearityFunction(AliEMCALRecoUtils::kBeamTestCorrectedv3);
81  }
82  else
83  {
84  if ( debug > 0 ) printf("xxx SET Non linearity correction kPi0MCv3 xxx\n");
85  reco->SetNonLinearityFunction(AliEMCALRecoUtils::kPi0MCv3);
86  }
87  }
88  else
89  {
90  if ( debug > 0 ) printf("xxx DON'T SET Non linearity correction xxx\n");
91  reco->SetNonLinearityFunction(AliEMCALRecoUtils::kNoCorrection);
92  }
93 
94 }
int Int_t
Definition: External.C:63
void ConfigureEMCALRecoUtils(AliEMCALRecoUtils *reco, Bool_t bMC=kFALSE, Bool_t bExotic=kTRUE, Bool_t bNonLin=kFALSE, Bool_t bRecalE=kTRUE, Bool_t bBad=kTRUE, Bool_t bRecalT=kTRUE, Int_t debug=-1)
bool Bool_t
Definition: External.C:53