]>
Commit | Line | Data |
---|---|---|
cf6522d1 | 1 | //Created by Christine Nattrass, Rebecca Scott, Irakli Martashvili |
020abff0 | 2 | //University of Tennessee at Knoxville |
cf6522d1 | 3 | // This is a container class for the correction factors for the hadronic |
4 | // component of transverse energy | |
5 | // It is filled by the output of AliAnalysisTaskHadEt from spinning over Monte | |
6 | // Carlo data (using AliAnalysisHadEtMonteCarlo) | |
7 | //It is used by AliAnalysisTaskHadEt while spinning over reconstructed data | |
8 | // (using AliAnalysisHadEtReconstructed) | |
020abff0 | 9 | //Please see https://twiki.cern.ch/twiki/bin/view/ALICE/ETCaloAnalysis |
10 | #include "AliAnalysisHadEtCorrections.h" | |
11 | #include "TMath.h" | |
12 | #include <iostream> | |
13 | #include "Rtypes.h" | |
cf6522d1 | 14 | #include "TNamed.h" |
020abff0 | 15 | |
16 | using namespace std; | |
17 | ||
18 | ClassImp(AliAnalysisHadEtCorrections); | |
19 | ||
20 | ||
21 | AliAnalysisHadEtCorrections::AliAnalysisHadEtCorrections() : TNamed(), | |
22 | fEtaCut(0) | |
23 | ,fAcceptanceCorrectionFull(0) | |
24 | ,fAcceptanceCorrectionEMCAL(0) | |
25 | ,fAcceptanceCorrectionPHOS(0) | |
26 | ,fNeutralCorrection(0) | |
27 | ,fNotHadronicCorrection(0) | |
28 | ,fpTcutCorrectionTPC(0) | |
29 | ,fpTcutCorrectionITS(0) | |
30 | ,fNeutralCorrectionLow(0) | |
31 | ,fNotHadronicCorrectionLow(0) | |
32 | ,ffpTcutCorrectionTPCLow(0) | |
33 | ,ffpTcutCorrectionITSLow(0) | |
34 | ,fNeutralCorrectionHigh(0) | |
35 | ,fNotHadronicCorrectionHigh(0) | |
36 | ,ffpTcutCorrectionTPCHigh(0) | |
37 | ,ffpTcutCorrectionITSHigh(0) | |
38 | ,fnotIDTPC(0) | |
39 | ,fnotIDITS(0) | |
40 | ,fnotIDNoID(0) | |
41 | ,fEfficiencyPionTPC(0) | |
42 | ,fEfficiencyKaonTPC(0) | |
43 | ,fEfficiencyProtonTPC(0) | |
44 | ,fEfficiencyHadronTPC(0) | |
45 | ,fEfficiencyPionITS(0) | |
46 | ,fEfficiencyKaonITS(0) | |
47 | ,fEfficiencyProtonITS(0) | |
48 | ,fEfficiencyHadronITS(0) | |
49 | ,fBackgroundTPC(0) | |
50 | ,fBackgroundITS(0) | |
51 | {//default constructor | |
52 | //This seems to solve a compiler error | |
53 | cout<<"Creating new AliAnalysisHadEtCorrections"<<endl; | |
54 | ||
55 | } | |
56 | AliAnalysisHadEtCorrections::~AliAnalysisHadEtCorrections() | |
57 | {//destructor | |
58 | //Clear(); | |
59 | delete fnotIDTPC; | |
60 | delete fnotIDITS; | |
61 | delete fnotIDNoID; | |
62 | delete fEfficiencyPionTPC; | |
63 | delete fEfficiencyKaonTPC; | |
64 | delete fEfficiencyProtonTPC; | |
65 | delete fEfficiencyHadronTPC; | |
66 | delete fEfficiencyPionITS; | |
67 | delete fEfficiencyKaonITS; | |
68 | delete fEfficiencyProtonITS; | |
69 | delete fEfficiencyHadronITS; | |
70 | delete fBackgroundTPC; | |
71 | delete fBackgroundITS; | |
72 | // fnotIDTPC->Clear(); | |
73 | // fnotIDITS->Clear(); | |
74 | // fnotIDNoID->Clear(); | |
75 | // fEfficiencyPionTPC->Clear(); | |
76 | // fEfficiencyKaonTPC->Clear(); | |
77 | // fEfficiencyProtonTPC->Clear(); | |
78 | // fEfficiencyHadronTPC->Clear(); | |
79 | // fEfficiencyPionITS->Clear(); | |
80 | // fEfficiencyKaonITS->Clear(); | |
81 | // fEfficiencyProtonITS->Clear(); | |
82 | // fEfficiencyHadronITS->Clear(); | |
83 | // fBackgroundTPC->Clear(); | |
84 | // fBackgroundITS->Clear(); | |
85 | } | |
86 | AliAnalysisHadEtCorrections::AliAnalysisHadEtCorrections(const AliAnalysisHadEtCorrections *g): TNamed(), | |
87 | fEtaCut(g->fEtaCut) | |
88 | ,fAcceptanceCorrectionFull(g->fAcceptanceCorrectionFull) | |
89 | ,fAcceptanceCorrectionEMCAL(g->fAcceptanceCorrectionEMCAL) | |
90 | ,fAcceptanceCorrectionPHOS(g->fAcceptanceCorrectionPHOS) | |
91 | ,fNeutralCorrection(g->fNeutralCorrection) | |
92 | ,fNotHadronicCorrection(g->fNotHadronicCorrection) | |
93 | ,fpTcutCorrectionTPC(g->fpTcutCorrectionTPC) | |
94 | ,fpTcutCorrectionITS(g->fpTcutCorrectionITS) | |
95 | ,fNeutralCorrectionLow(g->fNeutralCorrectionLow) | |
96 | ,fNotHadronicCorrectionLow(g->fNotHadronicCorrectionLow) | |
97 | ,ffpTcutCorrectionTPCLow(g->ffpTcutCorrectionTPCLow) | |
98 | ,ffpTcutCorrectionITSLow(g->ffpTcutCorrectionITSLow) | |
99 | ,fNeutralCorrectionHigh(g->fNeutralCorrectionHigh) | |
100 | ,fNotHadronicCorrectionHigh(g->fNotHadronicCorrectionHigh) | |
101 | ,ffpTcutCorrectionTPCHigh(g->ffpTcutCorrectionTPCHigh) | |
102 | ,ffpTcutCorrectionITSHigh(g->ffpTcutCorrectionITSHigh) | |
103 | ,fnotIDTPC(0) | |
104 | ,fnotIDITS(0) | |
105 | ,fnotIDNoID(0) | |
106 | ,fEfficiencyPionTPC(0) | |
107 | ,fEfficiencyKaonTPC(0) | |
108 | ,fEfficiencyProtonTPC(0) | |
109 | ,fEfficiencyHadronTPC(0) | |
110 | ,fEfficiencyPionITS(0) | |
111 | ,fEfficiencyKaonITS(0) | |
112 | ,fEfficiencyProtonITS(0) | |
113 | ,fEfficiencyHadronITS(0) | |
114 | ,fBackgroundTPC(0) | |
115 | ,fBackgroundITS(0) | |
116 | {//copy constructor | |
117 | //SetName(g->GetName()); | |
118 | fnotIDTPC = new TH1D(*(g->fnotIDTPC)); | |
119 | fnotIDITS = new TH1D(*(g->fnotIDITS)); | |
120 | fnotIDNoID = new TH1D(*(g->fnotIDNoID)); | |
121 | fEfficiencyPionTPC = new TH1D(*(g->fEfficiencyPionTPC)); | |
122 | fEfficiencyKaonTPC = new TH1D(*(g->fEfficiencyKaonTPC)); | |
123 | fEfficiencyProtonTPC = new TH1D(*(g->fEfficiencyProtonTPC)); | |
124 | fEfficiencyHadronTPC = new TH1D(*(g->fEfficiencyHadronTPC)); | |
125 | fEfficiencyPionITS = new TH1D(*(g->fEfficiencyPionITS)); | |
126 | fEfficiencyKaonITS = new TH1D(*(g->fEfficiencyKaonITS)); | |
127 | fEfficiencyProtonITS = new TH1D(*(g->fEfficiencyProtonITS)); | |
128 | fEfficiencyHadronITS = new TH1D(*(g->fEfficiencyHadronITS)); | |
129 | fBackgroundTPC = new TH1D(*(g->fBackgroundTPC)); | |
130 | fBackgroundITS = new TH1D(*(g->fBackgroundITS)); | |
131 | } | |
132 | ||
3ce6b879 | 133 | |
134 | Float_t AliAnalysisHadEtCorrections::GetConstantCorrections(Bool_t totEt, Float_t ptcut, TString type){ | |
135 | Float_t acceptance = 0.0; | |
136 | Float_t neutral = 0.0; | |
137 | Float_t ptcorr = 0.0; | |
138 | float correction = 0.0; | |
139 | ||
140 | //TString *type = new TString(mytype); | |
141 | ||
142 | if(type.Contains("Full")) acceptance = fAcceptanceCorrectionFull; | |
143 | if(type.Contains("EMCAL")) acceptance = fAcceptanceCorrectionEMCAL; | |
144 | if(type.Contains("PHOS")) acceptance = fAcceptanceCorrectionPHOS; | |
145 | ||
146 | if(type.Contains("High")){//high bound | |
147 | if(totEt) neutral = fNotHadronicCorrectionHigh; | |
148 | else{neutral = fNeutralCorrectionHigh;} | |
149 | if(ptcut>0.12){ptcorr = ffpTcutCorrectionTPCHigh;} | |
150 | else{ptcorr = ffpTcutCorrectionITSHigh;} | |
151 | cout<<"Setting correction factor to "<<correction<<endl; | |
152 | return correction; | |
153 | } | |
154 | if(type.Contains("Low")){//high bound | |
155 | if(totEt) neutral = fNotHadronicCorrectionLow; | |
156 | else{neutral = fNeutralCorrectionLow;} | |
157 | if(ptcut>0.12){ptcorr = ffpTcutCorrectionTPCLow;} | |
158 | else{ptcorr = ffpTcutCorrectionITSLow;} | |
159 | cout<<"Setting correction factor to "<<correction<<endl; | |
160 | return correction; | |
161 | } | |
162 | ||
163 | if(totEt) neutral = fNotHadronicCorrection; | |
164 | else{neutral = fNeutralCorrection;} | |
165 | if(ptcut>0.12){ptcorr = fpTcutCorrectionTPC;} | |
166 | else{ptcorr = fpTcutCorrectionITS;} | |
167 | ||
168 | correction = acceptance*neutral*ptcorr; | |
169 | cout<<"Setting correction factor for "; | |
170 | if(totEt) cout<<"total et"; | |
171 | else{cout<<"hadronic et";} | |
172 | cout<<" with the pt cut off "<<ptcut<<" for "<<type<<" acceptance to "<<correction<<endl; | |
173 | //cout<<"Acceptance "<<acceptance<<" neutral "<<neutral<<" ptcorr "<<ptcorr<<endl; | |
174 | return correction; | |
175 | ||
176 | } | |
020abff0 | 177 | // AliAnalysisHadEtCorrections & operator = (const AliAnalysisHadEtCorrections & g) { |
178 | ||
179 | // fEtaCut=g->fEtaCut; | |
180 | // fAcceptanceCorrectionFull=g->fAcceptanceCorrectionFull; | |
181 | // fAcceptanceCorrectionEMCAL=g->fAcceptanceCorrectionEMCAL; | |
182 | // fAcceptanceCorrectionPHOS=g->fAcceptanceCorrectionPHOS; | |
183 | // fNeutralCorrection=g->fNeutralCorrection; | |
184 | // fNotHadronicCorrection=g->fNotHadronicCorrection; | |
185 | // fpTcutCorrectionTPC=g->fpTcutCorrectionTPC; | |
186 | // fpTcutCorrectionITS=g->fpTcutCorrectionITS; | |
187 | // fNeutralCorrectionLow=g->fNeutralCorrectionLow; | |
188 | // fNotHadronicCorrectionLow=g->fNotHadronicCorrectionLow; | |
189 | // ffpTcutCorrectionTPCLow=g->ffpTcutCorrectionTPCLow; | |
190 | // ffpTcutCorrectionITSLow=g->ffpTcutCorrectionITSLow; | |
191 | // fNeutralCorrectionHigh=g->fNeutralCorrectionHigh; | |
192 | // fNotHadronicCorrectionHigh=g->fNotHadronicCorrectionHigh; | |
193 | // ffpTcutCorrectionTPCHigh=g->ffpTcutCorrectionTPCHigh; | |
194 | // ffpTcutCorrectionITSHigh=g->ffpTcutCorrectionITSHigh; | |
195 | ||
196 | // fnotIDTPC = g->fnotIDTPC; | |
197 | // fnotIDITS = g->fnotIDITS; | |
198 | // fnotIDNoID = g->fnotIDNoID; | |
199 | // fEfficiencyPionTPC = g->fEfficiencyPionTPC; | |
200 | // fEfficiencyKaonTPC = g->fEfficiencyKaonTPC; | |
201 | // fEfficiencyProtonTPC = g->fEfficiencyProtonTPC; | |
202 | // fEfficiencyHadronTPC = g->fEfficiencyHadronTPC; | |
203 | // fEfficiencyPionITS = g->fEfficiencyPionITS; | |
204 | // fEfficiencyKaonITS = g->fEfficiencyKaonITS; | |
205 | // fEfficiencyProtonITS = g->fEfficiencyProtonITS; | |
206 | // fEfficiencyHadronITS = g->fEfficiencyHadronITS; | |
207 | // fBackgroundTPC = g->fBackgroundTPC; | |
208 | // fBackgroundITS = g->fBackgroundITS; | |
209 | // } |