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