]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGGA/EMCALTasks/macros/ConfigureEMCALRecoUtils.C
wrong variable name
[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(50);     // If |t cell max - t cell in cross| > 50 do not add its energy 
25     reco->SetExoticCellFractionCut(0.97);   // 1-Ecross/Ecell > 0.97 -> out
26     reco->SetExoticCellMinAmplitudeCut(4.); // 4 GeV    
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(!bMC)
61     {
62       printf("xxx SET Non linearity correction kBeamTestCorrected xxx\n");
63       reco->SetNonLinearityFunction(AliEMCALRecoUtils::kBeamTestCorrectedv2);
64     }
65     else
66     {       
67       printf("xxx SET Non linearity correction kPi0MCv3 xxx\n");
68       reco->SetNonLinearityFunction(AliEMCALRecoUtils::kPi0MCv3);
69     }
70   }
71   else 
72   {
73     printf("xxx DON'T SET Non linearity correction xxx\n");
74     reco->SetNonLinearityFunction(AliEMCALRecoUtils::kNoCorrection);
75   }
76   
77 }