AliPhysics  c6e65cb (c6e65cb)
 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("ConfigureEMCALRecoUtils() - **** Start ***\n");
31 
32  // Exotic cells removal
33 
34  if(bExotic)
35  {
36  if ( debug > 0 ) printf("ConfigureEMCALRecoUtils() - 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  if ( debug > 0 ) printf("ConfigureEMCALRecoUtils() - Switch on energy recalibration in EMCAL\n");
50  reco->SwitchOnRecalibration();
51  reco->SwitchOnRunDepCorrection();
52  }
53 
54  // Remove EMCAL hot channels
55 
56  if(bBad)
57  {
58  if ( debug > 0 ) printf("ConfigureEMCALRecoUtils() - Switch on bad channels removal in EMCAL\n");
59  reco->SwitchOnBadChannelsRemoval();
60  reco->SwitchOnDistToBadChannelRecalculation();
61  }
62 
63  // *** Time recalibration settings ***
64 
65  if(bRecalT && ! bMC)
66  {
67  if ( debug > 0 ) printf("ConfigureEMCALRecoUtils() - Switch on time recalibration in EMCAL\n");
68  reco->SwitchOnTimeRecalibration();
69  reco->SwitchOnL1PhaseInTimeRecalibration() ;
70  }
71 
72  // Recalculate position with method
73 
74  reco->SetPositionAlgorithm(AliEMCALRecoUtils::kPosTowerGlobal);
75 
76  // Non linearity
77 
78  if( bNonLin )
79  {
80  if(!bMC)
81  {
82  if ( debug > 0 ) printf("ConfigureEMCALRecoUtils() xxx SET Non linearity correction kBeamTestCorrected xxx\n");
83  reco->SetNonLinearityFunction(AliEMCALRecoUtils::kBeamTestCorrectedv3);
84  }
85  else
86  {
87  if ( debug > 0 ) printf("ConfigureEMCALRecoUtils() xxx SET Non linearity correction kPi0MCv3 xxx\n");
88  reco->SetNonLinearityFunction(AliEMCALRecoUtils::kPi0MCv3);
89  }
90  }
91  else
92  {
93  if ( debug > 0 ) printf("ConfigureEMCALRecoUtils() xxx DON'T SET Non linearity correction xxx\n");
94  reco->SetNonLinearityFunction(AliEMCALRecoUtils::kNoCorrection);
95  }
96 
97 }
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