]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGGA/EMCALTasks/macros/ConfigureEMCALRecoUtils.C
SHUTTLE module
[u/mrichter/AliRoot.git] / PWGGA / EMCALTasks / macros / ConfigureEMCALRecoUtils.C
CommitLineData
6452a015 1// $Id$
193828fd 2
531f682d 3void 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,
023e6936 9 Bool_t bRecalT= kTRUE)
193828fd 10{
11
12 // Configure RecoUtils with OADB objects
13
531f682d 14 printf("**** Configure AliEMCALRecoUtils ***\n");
5eef1db1 15
193828fd 16 // Exotic cells removal
5eef1db1 17
531f682d 18 if(bExotic)
19 {
20 printf("Remove exotics in EMCAL\n");
21 reco->SwitchOnRejectExoticCell() ;
22 reco->SwitchOnRejectExoticCluster();
23
4bc4aa5c 24 reco->SetExoticCellDiffTimeCut(50); // If |t cell max - t cell in cross| > 50 do not add its energy
4f42812e 25 reco->SetExoticCellFractionCut(0.97); // 1-Ecross/Ecell > 0.97 -> out
26 reco->SetExoticCellMinAmplitudeCut(4.); // 4 GeV
531f682d 27 }
5eef1db1 28
531f682d 29 //Recalibration factors
193828fd 30
531f682d 31 if(bRecalE && ! bMC)
32 {
33 reco->SwitchOnRecalibration();
7bf608c9 34 reco->SwitchOnRunDepCorrection();
531f682d 35 }
193828fd 36
531f682d 37 // Remove EMCAL hot channels
193828fd 38
531f682d 39 if(bBad)
40 {
41 reco->SwitchOnBadChannelsRemoval();
42 reco->SwitchOnDistToBadChannelRecalculation();
193828fd 43 }
193828fd 44
5eef1db1 45 // *** Time recalibration settings ***
193828fd 46
023e6936 47 if(bRecalT && ! bMC)
531f682d 48 {
5eef1db1 49 reco->SwitchOnTimeRecalibration();
531f682d 50 }
5eef1db1 51
531f682d 52 // position
5eef1db1 53
531f682d 54 reco->SetPositionAlgorithm(AliEMCALRecoUtils::kPosTowerGlobal);
193828fd 55
531f682d 56 // Non linearity
57
73d0c410 58 if( bNonLin )
531f682d 59 {
673f39c3 60 if(!bMC)
ed8b2ee0 61 {
62 printf("xxx SET Non linearity correction kBeamTestCorrected xxx\n");
e215b4b4 63 reco->SetNonLinearityFunction(AliEMCALRecoUtils::kBeamTestCorrectedv2);
ed8b2ee0 64 }
65 else
66 {
67 printf("xxx SET Non linearity correction kPi0MCv3 xxx\n");
68 reco->SetNonLinearityFunction(AliEMCALRecoUtils::kPi0MCv3);
69 }
531f682d 70 }
afc22931 71 else
72 {
ed8b2ee0 73 printf("xxx DON'T SET Non linearity correction xxx\n");
afc22931 74 reco->SetNonLinearityFunction(AliEMCALRecoUtils::kNoCorrection);
75 }
76
193828fd 77}