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