]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/totEt/AliAnalysisEtReconstructedEmcal.cxx
Fixing issues with the reconstruction efficiency, adding histograms to do a simultane...
[u/mrichter/AliRoot.git] / PWGLF / totEt / AliAnalysisEtReconstructedEmcal.cxx
1 //_________________________________________________________________________
2 //  Utility Class for transverse energy studies
3 //  Base class for ESD analysis, for EMCAL
4 //  - reconstruction output
5 //  implementation file 
6 //
7 //*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
8 //_________________________________________________________________________
9 #include "AliAnalysisEtReconstructedEmcal.h"
10 #include "AliAnalysisEtCuts.h"
11 #include "AliAnalysisEtSelectorEmcal.h"
12 #include "AliESDtrack.h"
13 #include "AliAnalysisEtRecEffCorrection.h"
14
15 using namespace std;
16
17 ClassImp(AliAnalysisEtReconstructedEmcal);
18
19
20 AliAnalysisEtReconstructedEmcal::AliAnalysisEtReconstructedEmcal() :
21 AliAnalysisEtReconstructed()
22 {
23    fHistogramNameSuffix = TString("EmcalRec");    
24 }
25
26 AliAnalysisEtReconstructedEmcal::~AliAnalysisEtReconstructedEmcal() 
27 {
28 }
29
30
31 void AliAnalysisEtReconstructedEmcal::Init()
32 { // Init
33   AliAnalysisEtReconstructed::Init();
34     
35   fDetectorRadius = fCuts->GetGeometryEmcalDetectorRadius();
36   fSingleCellEnergyCut = fCuts->GetReconstructedEmcalSingleCellEnergyCut();
37
38   fSelector = new AliAnalysisEtSelectorEmcal(fCuts);
39 }
40
41 bool AliAnalysisEtReconstructedEmcal::TrackHitsCalorimeter(AliVParticle* track, Double_t magField)
42 {
43   return  AliAnalysisEtReconstructed::TrackHitsCalorimeter(track, magField);
44 }
45
46 void AliAnalysisEtReconstructedEmcal::CreateHistograms()
47 { // add some extra histograms & objects to the ones from base class
48   if(!fSelector){
49     cout<<__FILE__<<" "<<"Creating new fSelector"<<endl;
50     fSelector = new AliAnalysisEtSelectorEmcal(fCuts);
51   }
52   AliAnalysisEtReconstructed::CreateHistograms();
53 }
54
55
56 Double_t AliAnalysisEtReconstructedEmcal::GetCorrectionModification(const AliESDCaloCluster& cluster,Int_t nonLinCorr, Int_t effCorr, Int_t cent){//nonLinCorr 0 = nominal 1 = high -1 = low, effCorr  0 = nominal 1 = high -1 = low
57   Double_t factor = 1.0;
58   Double_t E = fReCorrections->CorrectedEnergy(cluster.E(),cent);
59   if(nonLinCorr!=0){
60     Double_t p0 = 9.90780e-01;
61     Double_t p1 = 1.61503e-01;
62     Double_t p2 = 6.55150e-01;
63     Double_t p3 = 1.34100e-01;
64     Double_t p4 = 1.63282e+02;
65     Double_t p5 = 2.36902e+01;
66     Double_t nominal = p0*(1./(1.+p1*TMath::Exp(-E/p2))*1./(1.+p3*TMath::Exp((E-p4)/p5)));
67     Double_t alt = 1;
68     if(nonLinCorr==1){//high bound on nonlinearity
69       p0 = .984;
70       p1 = 0.42;
71       p2 = 0.35;
72       alt = (p0)*1./(1.+p1*TMath::Exp(-E/p2));
73     }
74     else{//nonLinCorr==-1
75       p0 = .992;
76       p1 =0.115;
77       p2 = 0.68;
78       alt = (p0)*1./(1.+p1*TMath::Exp(-E/p2));
79     }
80     factor *=alt/nominal;
81   }
82   if(effCorr!=0){
83     if(effCorr==1){//high bound
84       factor *=1.02;
85     }
86     else{//low bound
87       factor *=0.98;
88     }
89   }
90   //cout<<"Factor:  "<<factor<<endl;
91   return factor;
92 }