AliPhysics  58f3d52 (58f3d52)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ConfigureEMCALRecoUtils.C
Go to the documentation of this file.
1 //#ifndef CONFIGUREEMCALRECOUTILS_C
2 //#define CONFIGUREEMCALRECOUTILS_C
3 
14 
15 #if !defined(__CINT__) || defined(__MAKECINT__)
16 
17 #include "AliEMCALRecoUtils.h"
18 
19 #endif
20 
32 
34 void ConfigureEMCALRecoUtils(AliEMCALRecoUtils* reco,
35  Bool_t bMC = kFALSE,
36  Bool_t bExotic= kTRUE,
37  Bool_t bNonLin= kFALSE,
38  Bool_t bRecalE= kTRUE,
39  Bool_t bBad = kTRUE,
40  Bool_t bRecalT= kTRUE,
41  Int_t debug = -1)
42 {
43  if ( debug > 0 ) printf("ConfigureEMCALRecoUtils() - **** Start ***\n");
44 
45  // Exotic cells removal
46 
47  if(bExotic)
48  {
49  if ( debug > 0 ) printf("ConfigureEMCALRecoUtils() - Remove exotics in EMCAL\n");
50  reco->SwitchOnRejectExoticCell() ;
51  reco->SwitchOnRejectExoticCluster();
52 
53 // reco->SetExoticCellDiffTimeCut(50); // If |t cell max - t cell in cross| > 50 do not add its energy, avoid
54  reco->SetExoticCellFractionCut(0.97); // 1-Ecross/Ecell > 0.97 -> out
55  reco->SetExoticCellMinAmplitudeCut(4.); // 4 GeV
56  }
57 
58  // Recalibration factors
59 
60  if(bRecalE && ! bMC)
61  {
62  if ( debug > 0 ) printf("ConfigureEMCALRecoUtils() - Switch on energy recalibration in EMCAL\n");
63  reco->SwitchOnRecalibration();
64  reco->SwitchOnRunDepCorrection();
65  }
66 
67  // Remove EMCAL hot channels
68 
69  if(bBad)
70  {
71  if ( debug > 0 ) printf("ConfigureEMCALRecoUtils() - Switch on bad channels removal in EMCAL\n");
72  reco->SwitchOnBadChannelsRemoval();
73  reco->SwitchOnDistToBadChannelRecalculation();
74  }
75 
76  // *** Time recalibration settings ***
77 
78  if(bRecalT && ! bMC)
79  {
80  if ( debug > 0 ) printf("ConfigureEMCALRecoUtils() - Switch on time recalibration in EMCAL\n");
81  reco->SwitchOnTimeRecalibration();
82  reco->SwitchOnL1PhaseInTimeRecalibration() ;
83  }
84 
85  // Recalculate position with method
86 
87  reco->SetPositionAlgorithm(AliEMCALRecoUtils::kPosTowerGlobal);
88 
89  // Non linearity
90 
91  if( bNonLin )
92  {
93  if(!bMC)
94  {
95  if ( debug > 0 ) printf("ConfigureEMCALRecoUtils() xxx SET Non linearity correction kBeamTestCorrected xxx\n");
96  reco->SetNonLinearityFunction(AliEMCALRecoUtils::kBeamTestCorrectedv3);
97  }
98  else
99  {
100  if ( debug > 0 ) printf("ConfigureEMCALRecoUtils() xxx SET Non linearity correction kPi0MCv3 xxx\n");
101  reco->SetNonLinearityFunction(AliEMCALRecoUtils::kPi0MCv3);
102  }
103  }
104  else
105  {
106  if ( debug > 0 ) printf("ConfigureEMCALRecoUtils() xxx DON'T SET Non linearity correction xxx\n");
107  reco->SetNonLinearityFunction(AliEMCALRecoUtils::kNoCorrection);
108  }
109 
110 }
111 
112 //#endif //CONFIGUREEMCALRECOUTILS_C
113 
const int debug
Definition: scanAll.C:15
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