added run dependent corrections on T for calibration, removed old method
[u/mrichter/AliRoot.git] / PWGGA / EMCALTasks / macros / ConfigureEMCALRecoUtils.C
1 // $Id$
2
3 void ConfigureEMCALRecoUtils(AliEMCALRecoUtils* reco,
4                              Bool_t  bMC    = kFALSE,
5                              Bool_t  bExotic= kTRUE,
6                              Bool_t  bNonLin= kFALSE,
7                              Bool_t  bRecalE= kTRUE,
8                              Bool_t  bBad   = kTRUE,
9                              Bool_t  bRecalT= kTRUE)
10 {  
11
12   // Configure RecoUtils with OADB objects
13   
14   printf("**** Configure AliEMCALRecoUtils ***\n");
15   
16   // Exotic cells removal
17   
18   if(bExotic)
19   {
20     printf("Remove exotics in EMCAL\n");
21     reco->SwitchOnRejectExoticCell() ;
22     reco->SwitchOnRejectExoticCluster(); 
23     
24     reco->SetExoticCellDiffTimeCut(10000);    // Open  
25     reco->SetExoticCellFractionCut(0.95);     // 1-Ecross/Ecell > 0.95 -> out
26     reco->SetExoticCellMinAmplitudeCut(0.75); // 750 MeV    
27   }  
28   
29   //Recalibration factors
30   
31   if(bRecalE && ! bMC)
32   {
33     reco->SwitchOnRecalibration();
34     reco->SwitchOnRunDepCorrection();    
35   } 
36
37   // Remove EMCAL hot channels 
38   
39   if(bBad)
40   {
41     reco->SwitchOnBadChannelsRemoval();
42     reco->SwitchOnDistToBadChannelRecalculation();
43   }
44  
45   // *** Time recalibration settings ***
46   
47   if(bRecalT && ! bMC)
48   {
49     reco->SwitchOnTimeRecalibration();
50   }
51     
52   // position
53     
54   reco->SetPositionAlgorithm(AliEMCALRecoUtils::kPosTowerGlobal);   
55
56   // Non linearity
57   
58   if( bNonLin ) 
59   { 
60     if(!kMC) reco->SetNonLinearityFunction(AliEMCALRecoUtils::kBeamTestCorrected);
61     else     reco->SetNonLinearityFunction(AliEMCALRecoUtils::kPi0MC);
62   }
63 }