]>
Commit | Line | Data |
---|---|---|
cf6522d1 | 1 | //_________________________________________________________________________ |
2 | // Utility Class for transverse energy studies, charged hadrons | |
3 | // Base class for MC analysis | |
4 | // - MC output | |
5 | // implementation file | |
6 | // | |
7 | //Created by Christine Nattrass, Rebecca Scott, Irakli Martashvili | |
641e1e0c | 8 | //University of Tennessee at Knoxville |
cf6522d1 | 9 | //_________________________________________________________________________ |
641e1e0c | 10 | #include "AliAnalysisHadEtMonteCarlo.h" |
11 | #include "AliAnalysisEtCuts.h" | |
12 | ||
13 | #include "AliStack.h" | |
14 | #include "AliMCEvent.h" | |
15 | #include "AliESDEvent.h" | |
16 | #include "AliESDtrackCuts.h" | |
17 | #include "AliESDpid.h" | |
4b40b2b1 | 18 | #include "AliPID.h" |
19 | #include "AliESDtrack.h" | |
20 | #include "AliVParticle.h" | |
21 | #include "AliAnalysisTask.h" | |
22 | #include "AliAnalysisManager.h" | |
23 | #include "AliAnalysisHadEtReconstructed.h" | |
49b25059 | 24 | #include "AliAnalysisHadEtCorrections.h" |
4b40b2b1 | 25 | #include "AliAnalysisEtCuts.h" |
641e1e0c | 26 | #include <iostream> |
4b40b2b1 | 27 | #include "TRandom.h" |
7d2d1773 | 28 | #include "AliAnalysisEtCommon.h" |
52503ae7 | 29 | #include "AliCentrality.h" |
0f6416f3 | 30 | #include "AliLog.h" |
2c0680a5 | 31 | #include "AliPWG0Helper.h" |
9a365626 | 32 | #include "AliPIDResponse.h" |
33 | #include "AliTPCPIDResponse.h" | |
34 | #include "AliInputEventHandler.h" | |
35 | #include "AliAnalysisManager.h" | |
2c0680a5 | 36 | //class AliPWG0Helper; |
37 | //#include "$ALICE_ROOT/PWG0/AliPWG0Helper.h" | |
16abb579 | 38 | |
641e1e0c | 39 | using namespace std; |
40 | ||
16abb579 | 41 | ClassImp(AliAnalysisHadEtMonteCarlo); |
42 | ||
4b40b2b1 | 43 | |
0e866ddc | 44 | Int_t AliAnalysisHadEtMonteCarlo::fgNumSmearWidths = 4; |
45 | Float_t AliAnalysisHadEtMonteCarlo::fgSmearWidths[4] = {0.005,0.006,0.007,0.008}; | |
4b40b2b1 | 46 | |
d6214a64 | 47 | AliAnalysisHadEtMonteCarlo::AliAnalysisHadEtMonteCarlo():AliAnalysisHadEt() |
0e866ddc | 48 | ,fSimPiKPEt(0) |
1826590b | 49 | ,fSimRawEtTPC(0) |
50 | ,fSimRawEtITS(0) | |
4b40b2b1 | 51 | ,fSimHadEt(0) |
52 | ,fSimTotEt(0) | |
49b25059 | 53 | ,fSimPiKPEtShouldBeReco(0) |
54 | ,fSimPiKPEtShouldBeRecoPi(0) | |
55 | ,fSimPiKPEtShouldBeRecoK(0) | |
56 | ,fSimPiKPEtShouldBeRecoP(0) | |
f6acf3ad | 57 | ,fRunLightweight(0) |
7d2d1773 | 58 | ,fInvestigateSmearing(0) |
59 | ,fInvestigateFull(0) | |
60 | ,fInvestigateEMCal(0) | |
61 | ,fInvestigatePHOS(0) | |
62 | ,fInvestigatePiKP(0) | |
63 | ,fRequireITSHits(0) | |
f43fc416 | 64 | ,fBaryonEnhancement(0) |
61e3f555 | 65 | ,fUseRecoPt(0) |
d35312c9 | 66 | ,kIsOfflineV0AND(0) |
ba222433 | 67 | ,kIsOfflineMB(0) |
d35312c9 | 68 | ,kDoTriggerChecks(0) |
69 | ,kDoTriggerChecksOnly(0) | |
0e866ddc | 70 | ,fPtSmearer(0) |
49b25059 | 71 | ,fHadEtReco(0) |
d6214a64 | 72 | { |
4b40b2b1 | 73 | } |
74 | AliAnalysisHadEtMonteCarlo::~AliAnalysisHadEtMonteCarlo(){//destructor | |
0e866ddc | 75 | if(fPtSmearer) delete fPtSmearer; |
d6214a64 | 76 | } |
4b40b2b1 | 77 | |
78 | void AliAnalysisHadEtMonteCarlo::ResetEventValues(){//resetting event variables | |
d6214a64 | 79 | AliAnalysisHadEt::ResetEventValues(); |
80 | fSimHadEt=0.0; | |
81 | fSimTotEt=0.0; | |
0e866ddc | 82 | fSimPiKPEt=0.0; |
1826590b | 83 | fSimRawEtTPC=0.0; |
84 | fSimRawEtITS=0.0; | |
d6214a64 | 85 | } |
cf6522d1 | 86 | Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2) |
87 | { // analyse MC and real event info | |
641e1e0c | 88 | FillHisto1D("NEvents",0.5,1); |
6a0df78a | 89 | if(!ev || !ev2){ |
0f6416f3 | 90 | AliFatal("ERROR: Event does not exist"); |
6a0df78a | 91 | return 0; |
92 | } | |
641e1e0c | 93 | AliMCEvent *mcEvent = dynamic_cast<AliMCEvent*>(ev); |
94 | AliESDEvent *realEvent = dynamic_cast<AliESDEvent*>(ev2); | |
ec956c46 | 95 | if(!mcEvent || !realEvent){ |
96 | AliFatal("ERROR: mcEvent or realEvent does not exist"); | |
97 | return 0; | |
98 | } | |
641e1e0c | 99 | AliStack *stack = mcEvent->Stack(); |
bf205f52 | 100 | fCentBin= -1; |
61e3f555 | 101 | fGoodEvent = kTRUE;//for p+p collisions if we made it this far we have a good event |
52503ae7 | 102 | if(fDataSet==20100){//If this is Pb+Pb |
103 | AliCentrality *centrality = realEvent->GetCentrality(); | |
61e3f555 | 104 | if(fNCentBins<21) fCentBin= centrality->GetCentralityClass10(fCentralityMethod); |
bf205f52 | 105 | else{ fCentBin= centrality->GetCentralityClass5(fCentralityMethod);} |
61e3f555 | 106 | if(fCentBin ==-1) fGoodEvent = kFALSE;//but for Pb+Pb events we don't want to count events where we did not find a centrality |
52503ae7 | 107 | } |
108 | AnalyseEvent(ev); | |
d35312c9 | 109 | if(kDoTriggerChecksOnly) return 1;//If we are only doing trigger checks, don't bother with all of the reconstructed stuff |
641e1e0c | 110 | //for PID |
ba222433 | 111 | if(kDoTriggerChecks && (!kIsOfflineV0AND ||!kIsOfflineMB ) ){return 1;}//In this case we are just after trigger efficiencies and don't care about the ET reconstructed. |
ea331c5d | 112 | AliESDpid *pID = new AliESDpid();//This is identified as a memory leak in valgrind but I delete this object so I think it may be a problem with AliESDpid. |
641e1e0c | 113 | |
641e1e0c | 114 | //============================================= |
115 | ||
116 | //Roughly following $ALICE_ROOT/PWG0/dNdEta/AlidNdEtaCorrectionTask | |
117 | ||
118 | //=============================================TPC&&ITS============================================= | |
49b25059 | 119 | //for investigating momentum smearing |
120 | Float_t pTtotalReco = 0.0; | |
121 | Float_t pTtotalSim = 0.0; | |
122 | Float_t eTtotalSimAll = 0.0; | |
123 | Float_t eTtotalReco = 0.0; | |
124 | Float_t eTtotalRecoEffCorr = 0.0; | |
125 | Float_t eTtotalRecoEffBkgdCorr = 0.0; | |
126 | Float_t eTtotalRecoBkgdCorr = 0.0; | |
127 | Float_t eTtotalRecoUncorr = 0.0; | |
128 | Float_t eTtotalRecoTotalUncorr = 0.0; | |
129 | Float_t eTtotalRecoEffCorrPi = 0.0; | |
130 | Float_t eTtotalRecoEffCorrK = 0.0; | |
131 | Float_t eTtotalRecoEffCorrP = 0.0; | |
132 | Float_t eTtotalRecoBkgd = 0.0; | |
133 | Float_t eTtotalRecoPIDSmeared = 0.0; | |
134 | Float_t eTtotalAsReconstructed = 0.0; | |
135 | Float_t eTBkgdAsReconstructed = 0.0; | |
136 | Float_t eTtotalAsReconstructedPi = 0.0; | |
137 | Float_t eTtotalAsReconstructedP = 0.0; | |
138 | Float_t eTtotalAsReconstructedK = 0.0; | |
139 | Float_t eTtotalSim = 0.0; | |
140 | Int_t nReco = 0; | |
cf6522d1 | 141 | TString *strTPC = new TString("TPC"); |
142 | TString *strITS = new TString("ITS"); | |
143 | TString *strTPCITS = new TString("TPCITS"); | |
7d2d1773 | 144 | Int_t lastcutset = 1; |
145 | if(fRequireITSHits) lastcutset = 2; | |
146 | for(Int_t cutset=0;cutset<=lastcutset;cutset++){ | |
ea331c5d | 147 | TString *cutName = NULL; |
148 | TObjArray* list = NULL; | |
641e1e0c | 149 | switch(cutset){ |
150 | case 0: | |
cf6522d1 | 151 | cutName = strTPC; |
152 | list = fEsdtrackCutsTPC->GetAcceptedTracks(realEvent); | |
641e1e0c | 153 | break; |
154 | case 1: | |
cf6522d1 | 155 | cutName = strITS; |
156 | list = fEsdtrackCutsITS->GetAcceptedTracks(realEvent); | |
641e1e0c | 157 | break; |
158 | case 2: | |
cf6522d1 | 159 | cutName = strTPCITS; |
160 | list = fEsdtrackCutsITSTPC->GetAcceptedTracks(realEvent); | |
641e1e0c | 161 | break; |
162 | default: | |
163 | cerr<<"Error: cannot fill histograms!"<<endl; | |
164 | return -1; | |
165 | } | |
166 | Int_t nGoodTracks = list->GetEntries(); | |
167 | for (Int_t iTrack = 0; iTrack < nGoodTracks; iTrack++) | |
168 | { | |
169 | AliESDtrack *track = dynamic_cast<AliESDtrack*> (list->At(iTrack)); | |
170 | if (!track) | |
171 | { | |
172 | Printf("ERROR: Could not get track %d", iTrack); | |
173 | continue; | |
174 | } | |
175 | else{ | |
641e1e0c | 176 | Float_t nSigmaPion,nSigmaProton,nSigmaKaon,nSigmaElectron; |
9a365626 | 177 | // pID->MakeTPCPID(track); |
178 | // pID->MakeITSPID(track); | |
641e1e0c | 179 | if(cutset!=1){ |
9a365626 | 180 | nSigmaPion = TMath::Abs(fPIDResponse->NumberOfSigmasTPC(track, AliPID::kPion)); |
181 | nSigmaProton = TMath::Abs(fPIDResponse->NumberOfSigmasTPC(track, AliPID::kProton)); | |
182 | nSigmaKaon =TMath::Abs( fPIDResponse->NumberOfSigmasTPC(track, AliPID::kKaon)); | |
183 | nSigmaElectron =TMath::Abs( fPIDResponse->NumberOfSigmasTPC(track, AliPID::kElectron)); | |
184 | // nSigmaPion = TMath::Abs(pID->NumberOfSigmasTPC(track,AliPID::kPion)); | |
185 | // nSigmaProton = TMath::Abs(pID->NumberOfSigmasTPC(track,AliPID::kProton)); | |
186 | // nSigmaKaon = TMath::Abs(pID->NumberOfSigmasTPC(track,AliPID::kKaon)); | |
187 | // nSigmaElectron = TMath::Abs(pID->NumberOfSigmasTPC(track,AliPID::kElectron)); | |
641e1e0c | 188 | } |
189 | else{ | |
9a365626 | 190 | nSigmaPion = TMath::Abs(fPIDResponse->NumberOfSigmasITS(track, AliPID::kPion)); |
191 | nSigmaProton = TMath::Abs(fPIDResponse->NumberOfSigmasITS(track, AliPID::kProton)); | |
192 | nSigmaKaon = TMath::Abs(fPIDResponse->NumberOfSigmasITS(track, AliPID::kKaon)); | |
193 | nSigmaElectron = TMath::Abs(fPIDResponse->NumberOfSigmasITS(track, AliPID::kElectron)); | |
194 | // nSigmaPion = TMath::Abs(pID->NumberOfSigmasITS(track,AliPID::kPion)); | |
195 | // nSigmaProton = TMath::Abs(pID->NumberOfSigmasITS(track,AliPID::kProton)); | |
196 | // nSigmaKaon = TMath::Abs(pID->NumberOfSigmasITS(track,AliPID::kKaon)); | |
197 | // nSigmaElectron = TMath::Abs(pID->NumberOfSigmasITS(track,AliPID::kElectron)); | |
641e1e0c | 198 | } |
6a0df78a | 199 | // bool isPion = (nSigmaPion<3.0 && nSigmaProton>2.0 && nSigmaKaon>2.0); |
200 | // bool isElectron = (nSigmaElectron<2.0 && nSigmaPion>4.0 && nSigmaProton>3.0 && nSigmaKaon>3.0); | |
201 | // bool isKaon = (nSigmaPion>3.0 && nSigmaProton>2.0 && nSigmaKaon<2.0); | |
202 | // bool isProton = (nSigmaPion>3.0 && nSigmaProton<2.0 && nSigmaKaon>2.0); | |
cf6522d1 | 203 | bool isPion = (nSigmaPion<3.0 && nSigmaProton>2.0 && nSigmaKaon>2.0); |
204 | bool isElectron = (nSigmaElectron<2.0 && nSigmaPion>4.0 && nSigmaProton>3.0 && nSigmaKaon>3.0); | |
701b4621 | 205 | bool isKaon = (nSigmaPion>3.0 && nSigmaProton>3.0 && nSigmaKaon<3.0 && track->Pt()<0.45); |
206 | bool isProton = (nSigmaPion>3.0 && nSigmaProton<3.0 && nSigmaKaon>3.0 && track->Pt()<0.9); | |
641e1e0c | 207 | |
49b25059 | 208 | bool unidentified = (!isProton && !isKaon && !isElectron && !isPion); |
209 | if(cutset==1){//ITS dE/dx identification requires tighter cuts on the tracks and we don't gain much from that so we won't do it | |
210 | unidentified = true; | |
211 | isPion=false; | |
212 | isElectron=false; | |
213 | isKaon=false; | |
214 | isProton=false; | |
215 | } | |
641e1e0c | 216 | Float_t dEdx = track->GetTPCsignal(); |
217 | if(cutset==1) dEdx = track->GetITSsignal(); | |
218 | ||
cf6522d1 | 219 | FillHisto2D(Form("dEdxAll%s",cutName->Data()),track->P(),dEdx,1.0); |
641e1e0c | 220 | |
221 | UInt_t label = (UInt_t)TMath::Abs(track->GetLabel()); | |
d7605578 | 222 | TParticle *simPart = stack->Particle(label); |
641e1e0c | 223 | if(!simPart) { |
224 | Printf("no MC particle\n"); | |
225 | continue; | |
226 | } | |
227 | else{//analysis | |
49b25059 | 228 | if(fInvestigateSmearing && cutset==2){ |
229 | //calculates what we would measure for the pi/k/p et with background | |
230 | eTtotalRecoTotalUncorr += Et(simPart); | |
231 | if(isPion){ | |
232 | eTtotalRecoEffBkgdCorr += Et(simPart) *fHadEtReco->GetCorrections()->GetTPCEfficiencyCorrectionPion(track->Pt(),fCentBin) * fHadEtReco->GetCorrections()->GetBackgroundCorrectionTPC(track->Pt()); | |
233 | eTtotalRecoBkgdCorr += Et(simPart) * fHadEtReco->GetCorrections()->GetBackgroundCorrectionTPC(track->Pt()); | |
234 | eTtotalRecoTotalUncorr += Et(simPart); | |
235 | } | |
236 | if(isProton){ | |
237 | eTtotalRecoEffBkgdCorr += Et(simPart) *fHadEtReco->GetCorrections()->GetTPCEfficiencyCorrectionProton(track->Pt(),fCentBin) * fHadEtReco->GetCorrections()->GetBackgroundCorrectionTPC(track->Pt()); | |
238 | eTtotalRecoBkgdCorr += Et(simPart) * fHadEtReco->GetCorrections()->GetBackgroundCorrectionTPC(track->Pt()); | |
239 | } | |
240 | if(isKaon){ | |
241 | eTtotalRecoEffBkgdCorr += Et(simPart) *fHadEtReco->GetCorrections()->GetTPCEfficiencyCorrectionKaon(track->Pt(),fCentBin) * fHadEtReco->GetCorrections()->GetBackgroundCorrectionTPC(track->Pt()); | |
242 | eTtotalRecoBkgdCorr += Et(simPart) * fHadEtReco->GetCorrections()->GetBackgroundCorrectionTPC(track->Pt()); | |
243 | } | |
244 | if(unidentified){ | |
245 | eTtotalRecoEffBkgdCorr += Et(simPart) *fHadEtReco->GetCorrections()->GetTPCEfficiencyCorrectionHadron(track->Pt(),fCentBin) * fHadEtReco->GetCorrections()->GetBackgroundCorrectionTPC(track->Pt()); | |
246 | eTtotalRecoBkgdCorr += Et(simPart) * fHadEtReco->GetCorrections()->GetBackgroundCorrectionTPC(track->Pt()); | |
247 | } | |
248 | //for calculating et as it's done in the reconstructed data | |
249 | Float_t corrBkgd=0.0; | |
250 | Float_t corrNotID=0.0; | |
9a365626 | 251 | //Float_t corrNoID=0.0;// = fHadEtReco->GetCorrections()->GetNotIDCorrectionNoPID(track->Pt()); |
49b25059 | 252 | Float_t corrEff = 0.0; |
9a365626 | 253 | //Float_t corrEffNoID = 0.0; |
49b25059 | 254 | Float_t et = 0.0; |
255 | if(cutset==2){//TPC | |
256 | corrBkgd = fHadEtReco->GetCorrections()->GetBackgroundCorrectionTPC(track->Pt()); | |
9a365626 | 257 | //corrEffNoID = fHadEtReco->GetCorrections()->GetTPCEfficiencyCorrectionHadron(track->Pt(),fCentBin); |
49b25059 | 258 | corrNotID = fHadEtReco->GetCorrections()->GetNotIDConstCorrectionTPC(); |
9a365626 | 259 | //corrNoID = fHadEtReco->GetCorrections()->GetNotIDConstCorrectionTPCNoID(); |
49b25059 | 260 | } |
261 | if(cutset==1){//ITS | |
262 | corrBkgd = fHadEtReco->GetCorrections()->GetBackgroundCorrectionITS(track->Pt()); | |
9a365626 | 263 | //corrEffNoID = fHadEtReco->GetCorrections()->GetITSEfficiencyCorrectionHadron(track->Pt(),fCentBin); |
49b25059 | 264 | corrNotID = fHadEtReco->GetCorrections()->GetNotIDConstCorrectionITS(); |
9a365626 | 265 | //corrNoID = fHadEtReco->GetCorrections()->GetNotIDConstCorrectionITSNoID(); |
49b25059 | 266 | } |
267 | ||
f6b36c54 | 268 | |
49b25059 | 269 | bool isprimary = stack->IsPhysicalPrimary(label); |
270 | if (TMath::Abs(track->Eta()) < fHadEtReco->GetCorrections()->GetEtaCut()){ | |
271 | if(isPion){ | |
272 | et = Et(track->P(),track->Theta(),fgPiPlusCode,track->Charge()); | |
273 | corrEff = fHadEtReco->GetCorrections()->GetTPCEfficiencyCorrectionPion(track->Pt(),fCentBin); | |
274 | if(isprimary){ | |
275 | eTtotalAsReconstructed += et*corrBkgd*corrEff*corrNotID; | |
276 | } | |
277 | else{ | |
278 | eTBkgdAsReconstructed += et*corrBkgd*corrEff*corrNotID; | |
279 | } | |
280 | } | |
281 | if(isKaon){ | |
282 | et = Et(track->P(),track->Theta(),fgKPlusCode,track->Charge()); | |
283 | corrEff = fHadEtReco->GetCorrections()->GetTPCEfficiencyCorrectionKaon(track->Pt(),fCentBin); | |
284 | if(isprimary){ | |
285 | eTtotalAsReconstructed += et*corrBkgd*corrEff*corrNotID; | |
286 | } | |
287 | else{ | |
288 | eTBkgdAsReconstructed += et*corrBkgd*corrEff*corrNotID; | |
289 | } | |
290 | } | |
291 | if(isProton){ | |
292 | et = Et(track->P(),track->Theta(),fgProtonCode,track->Charge()); | |
293 | corrEff = fHadEtReco->GetCorrections()->GetTPCEfficiencyCorrectionProton(track->Pt(),fCentBin); | |
294 | if(isprimary){ | |
295 | eTtotalAsReconstructed += et*corrBkgd*corrEff*corrNotID; | |
296 | } | |
297 | else{ | |
298 | eTBkgdAsReconstructed += et*corrBkgd*corrEff*corrNotID; | |
299 | } | |
300 | } | |
301 | if(unidentified){ | |
302 | et = Et(track->P(),track->Theta(),fgPiPlusCode,track->Charge()); | |
303 | corrEff = fHadEtReco->GetCorrections()->GetTPCEfficiencyCorrectionHadron(track->Pt(),fCentBin); | |
304 | if(isprimary){ | |
305 | eTtotalAsReconstructed += et*corrBkgd*corrEff*corrNotID; | |
306 | } | |
307 | else{ | |
308 | eTBkgdAsReconstructed += et*corrBkgd*corrEff*corrNotID; | |
309 | } | |
310 | } | |
311 | if(!isPion && !isProton && !isKaon && !unidentified){ | |
312 | eTBkgdAsReconstructed += et*corrBkgd*corrEff*corrNotID; | |
313 | } | |
ccd12409 | 314 | TParticlePDG *pdg = simPart->GetPDG(0); |
315 | if(pdg){ | |
316 | Int_t pdgCode = simPart->GetPDG(0)->PdgCode(); | |
317 | if(pdgCode==fgPiPlusCode ||pdgCode==fgPiMinusCode){eTtotalAsReconstructedPi+=et*corrBkgd*corrEff*corrNotID;} | |
318 | if(pdgCode==fgKPlusCode ||pdgCode==fgKMinusCode){eTtotalAsReconstructedK+=et*corrBkgd*corrEff*corrNotID;} | |
319 | if(pdgCode==fgProtonCode ||pdgCode==fgAntiProtonCode){eTtotalAsReconstructedP+=et*corrBkgd*corrEff*corrNotID;} | |
320 | } | |
49b25059 | 321 | } |
322 | } | |
323 | ||
324 | if(cutset==2) eTtotalSimAll += Et(simPart); | |
641e1e0c | 325 | if(stack->IsPhysicalPrimary(label)){ |
49b25059 | 326 | if (TMath::Abs(simPart->Eta()) < fHadEtReco->GetCorrections()->GetEtaCut()){ |
ccd12409 | 327 | TParticlePDG *pdg = simPart->GetPDG(0); |
328 | if(!pdg) continue; | |
641e1e0c | 329 | Int_t pdgCode = simPart->GetPDG(0)->PdgCode(); |
330 | Int_t mypid = 0; | |
7d2d1773 | 331 | if(pdgCode==AliAnalysisHadEt::fgPiPlusCode) mypid = 1; |
4b40b2b1 | 332 | if(pdgCode==fgProtonCode) mypid = 2; |
333 | if(pdgCode==fgKPlusCode) mypid = 3; | |
334 | if(pdgCode==fgEPlusCode) mypid = 4; | |
335 | if(pdgCode==fgPiMinusCode) mypid = 1; | |
336 | if(pdgCode==fgAntiProtonCode) mypid = 2; | |
337 | if(pdgCode==fgKMinusCode) mypid = 3; | |
338 | if(pdgCode==fgEMinusCode) mypid = 4; | |
9a365626 | 339 | //bool filled = false; |
49b25059 | 340 | //for smearing investigations |
341 | if(fInvestigateSmearing && cutset==2){ | |
342 | pTtotalReco += simPart->Pt(); | |
343 | pTtotalSim += track->Pt(); | |
344 | eTtotalReco += Et(track->P(),track->Theta(),pdgCode,track->Charge()); | |
345 | eTtotalSim += Et(simPart); | |
346 | nReco++; | |
347 | } | |
641e1e0c | 348 | //============Charged hadrons=================================== |
49b25059 | 349 | float myefficiencyCorrEt = 0.0; |
641e1e0c | 350 | //identified... |
cf6522d1 | 351 | if(isPion){ |
4b40b2b1 | 352 | if(pdgCode!=fgPiPlusCode && pdgCode!=fgPiMinusCode){ |
cf6522d1 | 353 | FillHisto2D(Form("MisidentifiedPIDs%s",cutName->Data()),1,mypid,1); |
641e1e0c | 354 | } |
355 | float myEt = Et(simPart); | |
49b25059 | 356 | if(fInvestigateSmearing && cutset==2){ |
357 | eTtotalRecoPIDSmeared +=myEt; | |
358 | eTtotalRecoEffCorr += myEt *fHadEtReco->GetCorrections()->GetTPCEfficiencyCorrectionPion(track->Pt(),fCentBin); | |
359 | myefficiencyCorrEt = myEt * fHadEtReco->GetCorrections()->GetTPCEfficiencyCorrectionPion(track->Pt(),fCentBin) ; | |
360 | } | |
f6acf3ad | 361 | if( !fRunLightweight){ |
362 | if(track->Charge()>0){ FillHisto2D(Form("EtReconstructed%sIdentifiedPiPlus",cutName->Data()),track->Pt(),track->Eta(),myEt);} | |
363 | else{ FillHisto2D(Form("EtReconstructed%sIdentifiedPiMinus",cutName->Data()),track->Pt(),track->Eta(),myEt);} | |
364 | } | |
cf6522d1 | 365 | FillHisto2D(Form("dEdxPion%s",cutName->Data()),track->P(),dEdx,1.0); |
641e1e0c | 366 | } |
cf6522d1 | 367 | if(isProton){ |
4b40b2b1 | 368 | if(pdgCode!=fgProtonCode && pdgCode!=fgAntiProtonCode){ |
cf6522d1 | 369 | FillHisto2D(Form("MisidentifiedPIDs%s",cutName->Data()),2,mypid,1); |
641e1e0c | 370 | } |
371 | float myEt = Et(simPart); | |
49b25059 | 372 | if(fInvestigateSmearing && cutset==2){ |
373 | eTtotalRecoPIDSmeared +=myEt; | |
374 | eTtotalRecoEffCorr += myEt *fHadEtReco->GetCorrections()->GetTPCEfficiencyCorrectionProton(track->Pt(),fCentBin); | |
375 | myefficiencyCorrEt = myEt * fHadEtReco->GetCorrections()->GetTPCEfficiencyCorrectionProton(track->Pt(),fCentBin); | |
376 | } | |
f6acf3ad | 377 | if( !fRunLightweight){ |
378 | if(track->Charge()>0){ FillHisto2D(Form("EtReconstructed%sIdentifiedProton",cutName->Data()),track->Pt(),track->Eta(),myEt);} | |
379 | else{ FillHisto2D(Form("EtReconstructed%sIdentifiedAntiProton",cutName->Data()),track->Pt(),track->Eta(),myEt);} | |
380 | if(fBaryonEnhancement){ | |
381 | myEt = myEt*ProtonBaryonEnhancement(track->Pt()); | |
382 | if(track->Charge()>0){ FillHisto2D(Form("EtReconstructed%sIdentifiedProtonEnhanced",cutName->Data()),track->Pt(),track->Eta(),myEt);} | |
383 | else{ FillHisto2D(Form("EtReconstructed%sIdentifiedAntiProtonEnhanced",cutName->Data()),track->Pt(),track->Eta(),myEt);} | |
384 | } | |
f43fc416 | 385 | } |
cf6522d1 | 386 | FillHisto2D(Form("dEdxProton%s",cutName->Data()),track->P(),dEdx,1.0); |
641e1e0c | 387 | } |
cf6522d1 | 388 | if(isKaon){ |
4b40b2b1 | 389 | if(pdgCode!=fgKMinusCode && pdgCode!=fgKPlusCode){ |
cf6522d1 | 390 | FillHisto2D(Form("MisidentifiedPIDs%s",cutName->Data()),3,mypid,1); |
641e1e0c | 391 | } |
392 | float myEt = Et(simPart); | |
49b25059 | 393 | if(fInvestigateSmearing && cutset==2){ |
394 | eTtotalRecoPIDSmeared +=myEt; | |
395 | eTtotalRecoEffCorr += myEt *fHadEtReco->GetCorrections()->GetTPCEfficiencyCorrectionKaon(track->Pt(),fCentBin); | |
396 | myefficiencyCorrEt = myEt * fHadEtReco->GetCorrections()->GetTPCEfficiencyCorrectionKaon(track->Pt(),fCentBin); | |
397 | } | |
f6acf3ad | 398 | if( !fRunLightweight){ |
399 | if(track->Charge()>0){ FillHisto2D(Form("EtReconstructed%sIdentifiedKPlus",cutName->Data()),track->Pt(),track->Eta(),myEt);} | |
400 | else{ FillHisto2D(Form("EtReconstructed%sIdentifiedKMinus",cutName->Data()),track->Pt(),track->Eta(),myEt);} | |
401 | } | |
cf6522d1 | 402 | FillHisto2D(Form("dEdxKaon%s",cutName->Data()),track->P(),dEdx,1.0); |
641e1e0c | 403 | } |
cf6522d1 | 404 | if(isElectron){ |
4b40b2b1 | 405 | if(pdgCode!=fgEMinusCode && pdgCode!=fgEPlusCode){ |
cf6522d1 | 406 | FillHisto2D(Form("MisidentifiedPIDs%s",cutName->Data()),4,mypid,1); |
641e1e0c | 407 | } |
f6acf3ad | 408 | if( !fRunLightweight){ |
409 | float myEt = Et(simPart); | |
410 | if(track->Charge()>0){ FillHisto2D(Form("EtReconstructed%sIdentifiedEPlus",cutName->Data()),track->Pt(),track->Eta(),myEt);} | |
411 | else{ FillHisto2D(Form("EtReconstructed%sIdentifiedEMinus",cutName->Data()),track->Pt(),track->Eta(),myEt);} | |
412 | } | |
cf6522d1 | 413 | FillHisto2D(Form("dEdxElectron%s",cutName->Data()),track->P(),dEdx,1.0); |
641e1e0c | 414 | } |
cf6522d1 | 415 | if(unidentified){ |
4b40b2b1 | 416 | if(pdgCode!=fgEMinusCode && pdgCode!=fgEPlusCode){ |
417 | float myEtPi = Et(simPart,fgPionMass); | |
86d9d0dc | 418 | float myEtP = Et(simPart,fgProtonMass); |
419 | float myEtK = Et(simPart,fgKaonMass); | |
641e1e0c | 420 | float myEt = Et(simPart); |
49b25059 | 421 | if(fInvestigateSmearing && cutset==2){ |
422 | eTtotalRecoPIDSmeared +=myEtPi; | |
423 | eTtotalRecoEffCorr += myEt *fHadEtReco->GetCorrections()->GetTPCEfficiencyCorrectionHadron(track->Pt(),fCentBin); | |
424 | myefficiencyCorrEt = myEt * fHadEtReco->GetCorrections()->GetTPCEfficiencyCorrectionHadron(track->Pt(),fCentBin); | |
425 | } | |
f6acf3ad | 426 | if( !fRunLightweight){ |
427 | FillHisto2D(Form("EtReconstructed%sUnidentifiedAssumingPion",cutName->Data()),track->Pt(),track->Eta(),myEtPi); | |
428 | FillHisto2D(Form("EtReconstructed%sUnidentifiedAssumingProton",cutName->Data()),track->Pt(),track->Eta(),myEtP); | |
429 | FillHisto2D(Form("EtReconstructed%sUnidentifiedAssumingKaon",cutName->Data()),track->Pt(),track->Eta(),myEtK); | |
430 | FillHisto2D(Form("EtReconstructed%sUnidentified",cutName->Data()),track->Pt(),track->Eta(),myEt); | |
431 | FillHisto2D(Form("EtNReconstructed%sUnidentified",cutName->Data()),track->Pt(),track->Eta(),1.0); | |
432 | if(pdgCode == fgPiPlusCode||pdgCode == fgPiMinusCode){ | |
433 | FillHisto2D(Form("EtReconstructed%sUnidentifiedPionAssumingPion",cutName->Data()),track->Pt(),track->Eta(),myEtPi); | |
434 | FillHisto2D(Form("EtReconstructed%sUnidentifiedPionAssumingProton",cutName->Data()),track->Pt(),track->Eta(),myEtP); | |
435 | FillHisto2D(Form("EtReconstructed%sUnidentifiedPionAssumingKaon",cutName->Data()),track->Pt(),track->Eta(),myEtK); | |
436 | FillHisto2D(Form("EtReconstructed%sUnidentifiedPion",cutName->Data()),track->Pt(),track->Eta(),myEt); | |
437 | FillHisto2D(Form("EtNReconstructed%sUnidentifiedPion",cutName->Data()),track->Pt(),track->Eta(),1.0); | |
438 | } | |
439 | if(pdgCode == fgKPlusCode||pdgCode == fgKMinusCode){ | |
440 | FillHisto2D(Form("EtReconstructed%sUnidentifiedKaonAssumingPion",cutName->Data()),track->Pt(),track->Eta(),myEtPi); | |
441 | FillHisto2D(Form("EtReconstructed%sUnidentifiedKaonAssumingProton",cutName->Data()),track->Pt(),track->Eta(),myEtP); | |
442 | FillHisto2D(Form("EtReconstructed%sUnidentifiedKaonAssumingKaon",cutName->Data()),track->Pt(),track->Eta(),myEtK); | |
443 | FillHisto2D(Form("EtReconstructed%sUnidentifiedKaon",cutName->Data()),track->Pt(),track->Eta(),myEt); | |
444 | FillHisto2D(Form("EtNReconstructed%sUnidentifiedKaon",cutName->Data()),track->Pt(),track->Eta(),1.0); | |
445 | } | |
446 | if(pdgCode == fgProtonCode||pdgCode == fgAntiProtonCode){ | |
447 | FillHisto2D(Form("EtReconstructed%sUnidentifiedProtonAssumingPion",cutName->Data()),track->Pt(),track->Eta(),myEtPi); | |
448 | FillHisto2D(Form("EtReconstructed%sUnidentifiedProtonAssumingProton",cutName->Data()),track->Pt(),track->Eta(),myEtP); | |
449 | FillHisto2D(Form("EtReconstructed%sUnidentifiedProtonAssumingKaon",cutName->Data()),track->Pt(),track->Eta(),myEtK); | |
450 | FillHisto2D(Form("EtReconstructed%sUnidentifiedProton",cutName->Data()),track->Pt(),track->Eta(),myEt); | |
451 | FillHisto2D(Form("EtNReconstructed%sUnidentifiedProton",cutName->Data()),track->Pt(),track->Eta(),1.0); | |
452 | if(fBaryonEnhancement){ | |
453 | myEt = myEt*ProtonBaryonEnhancement(track->Pt()); | |
454 | FillHisto2D(Form("EtReconstructed%sUnidentifiedProtonAssumingPionEnhanced",cutName->Data()),track->Pt(),track->Eta(),myEtPi); | |
455 | FillHisto2D(Form("EtReconstructed%sUnidentifiedProtonEnhanced",cutName->Data()),track->Pt(),track->Eta(),myEt); | |
456 | FillHisto2D(Form("EtNReconstructed%sUnidentifiedProtonEnhanced",cutName->Data()),track->Pt(),track->Eta(),1.0); | |
457 | } | |
f43fc416 | 458 | } |
459 | } | |
641e1e0c | 460 | } |
cf6522d1 | 461 | FillHisto2D(Form("dEdxUnidentified%s",cutName->Data()),track->P(),dEdx,1.0); |
cf6522d1 | 462 | FillHisto1D(Form("UnidentifiedPIDs%s",cutName->Data()),mypid,1); |
641e1e0c | 463 | } |
464 | //...simulated | |
61e3f555 | 465 | float myEtSim = Et(simPart); |
466 | float myEtReco = 0.0; | |
7d2d1773 | 467 | if(pdgCode == fgPiPlusCode){ |
641e1e0c | 468 | float myEt = Et(simPart); |
86d9d0dc | 469 | float myEtP = Et(simPart,fgProtonMass); |
470 | float myEtK = Et(simPart,fgKaonMass); | |
61e3f555 | 471 | myEtReco = Et(track->P(),track->Theta(),fgPiPlusCode,track->Charge()); |
472 | float pT = simPart->Pt(); | |
473 | float eta = simPart->Eta(); | |
49b25059 | 474 | if(fInvestigateSmearing && cutset==2){ |
475 | eTtotalRecoEffCorrPi+=myefficiencyCorrEt; | |
476 | eTtotalRecoUncorr +=myEt; | |
477 | } | |
61e3f555 | 478 | if(fUseRecoPt){//Then we switch the pT and the Et |
479 | myEt = myEtReco; | |
480 | pT = track->Pt(); | |
481 | eta = track->Eta(); | |
482 | } | |
f6acf3ad | 483 | if( !fRunLightweight){ |
484 | FillHisto2D(Form("EtReconstructed%sPiPlus",cutName->Data()),pT,eta,myEt); | |
485 | FillHisto2D(Form("EtReconstructed%sChargedHadron",cutName->Data()),pT,eta,myEt); | |
486 | FillHisto2D(Form("EtNReconstructed%sPiPlus",cutName->Data()),pT,eta,myEt); | |
487 | FillHisto2D(Form("EtNReconstructed%sChargedHadron",cutName->Data()),pT,eta,myEt); | |
488 | if(fCentBin>=0){//if a centrality bin was defined | |
489 | FillHisto2D(Form("EtNReconstructed%sPiPlusCB%i",cutName->Data(),fCentBin),pT,eta,myEt); | |
490 | FillHisto2D(Form("EtNReconstructed%sChargedHadronCB%i",cutName->Data(),fCentBin),pT,eta,myEt); | |
491 | } | |
492 | FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingPion",cutName->Data()),pT,eta,myEt); | |
493 | FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingProton",cutName->Data()),pT,eta,myEtP); | |
494 | FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingKaon",cutName->Data()),pT,eta,myEtK); | |
495 | FillHisto2D(Form("EtReconstructed%sPiPlusAssumingKaon",cutName->Data()),pT,eta,myEtK); | |
496 | FillHisto2D(Form("EtReconstructed%sPiPlusAssumingProton",cutName->Data()),pT,eta,myEtP); | |
52503ae7 | 497 | } |
9a365626 | 498 | //filled = true; |
641e1e0c | 499 | } |
4b40b2b1 | 500 | if(pdgCode == fgPiMinusCode){ |
641e1e0c | 501 | float myEt = Et(simPart); |
86d9d0dc | 502 | float myEtP = Et(simPart,fgProtonMass); |
503 | float myEtK = Et(simPart,fgKaonMass); | |
61e3f555 | 504 | myEtReco = Et(track->P(),track->Theta(),fgPiMinusCode,track->Charge()); |
505 | float pT = simPart->Pt(); | |
506 | float eta = simPart->Eta(); | |
49b25059 | 507 | if(fInvestigateSmearing && cutset==2){ |
508 | eTtotalRecoEffCorrPi+=myefficiencyCorrEt; | |
509 | eTtotalRecoUncorr +=myEt; | |
510 | } | |
61e3f555 | 511 | if(fUseRecoPt){//Then we switch the pT and the Et |
512 | myEt = myEtReco; | |
513 | pT = track->Pt(); | |
514 | eta = track->Eta(); | |
515 | } | |
f6acf3ad | 516 | if( !fRunLightweight){ |
517 | FillHisto2D(Form("EtReconstructed%sPiMinus",cutName->Data()),pT,eta,myEt); | |
518 | FillHisto2D(Form("EtReconstructed%sChargedHadron",cutName->Data()),pT,eta,myEt); | |
519 | FillHisto2D(Form("EtNReconstructed%sPiMinus",cutName->Data()),pT,eta,myEt); | |
520 | FillHisto2D(Form("EtNReconstructed%sChargedHadron",cutName->Data()),pT,eta,myEt); | |
521 | if(fCentBin>=0){//if a centrality bin was defined | |
522 | FillHisto2D(Form("EtNReconstructed%sPiMinusCB%i",cutName->Data(),fCentBin),pT,eta,myEt); | |
523 | FillHisto2D(Form("EtNReconstructed%sChargedHadronCB%i",cutName->Data(),fCentBin),pT,eta,myEt); | |
524 | } | |
525 | FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingPion",cutName->Data()),pT,eta,myEt); | |
526 | FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingProton",cutName->Data()),pT,eta,myEtP); | |
527 | FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingKaon",cutName->Data()),pT,eta,myEtK); | |
528 | FillHisto2D(Form("EtReconstructed%sPiMinusAssumingKaon",cutName->Data()),pT,eta,myEtK); | |
529 | FillHisto2D(Form("EtReconstructed%sPiMinusAssumingProton",cutName->Data()),pT,eta,myEtP); | |
52503ae7 | 530 | } |
9a365626 | 531 | //filled = true; |
641e1e0c | 532 | } |
4b40b2b1 | 533 | if(pdgCode == fgKPlusCode){ |
641e1e0c | 534 | float myEt = Et(simPart); |
4b40b2b1 | 535 | float myEtPi = Et(simPart,fgPionMass); |
86d9d0dc | 536 | float myEtP = Et(simPart,fgProtonMass); |
61e3f555 | 537 | myEtReco = Et(track->P(),track->Theta(),fgKPlusCode,track->Charge()); |
538 | float pT = simPart->Pt(); | |
539 | float eta = simPart->Eta(); | |
540 | if(fUseRecoPt){//Then we switch the pT and the Et | |
541 | myEt = myEtReco; | |
542 | pT = track->Pt(); | |
543 | eta = track->Eta(); | |
544 | } | |
49b25059 | 545 | if(fInvestigateSmearing && cutset==2){ |
546 | eTtotalRecoEffCorrK+=myefficiencyCorrEt; | |
547 | eTtotalRecoUncorr +=myEt; | |
548 | } | |
f6acf3ad | 549 | if( !fRunLightweight){ |
550 | FillHisto2D(Form("EtReconstructed%sKPlus",cutName->Data()),pT,eta,myEt); | |
551 | FillHisto2D(Form("EtReconstructed%sChargedHadron",cutName->Data()),pT,eta,myEt); | |
552 | FillHisto2D(Form("EtNReconstructed%sKPlus",cutName->Data()),pT,eta,myEt); | |
553 | FillHisto2D(Form("EtNReconstructed%sChargedHadron",cutName->Data()),pT,eta,myEt); | |
554 | if(fCentBin>=0){//if a centrality bin was defined | |
555 | FillHisto2D(Form("EtNReconstructed%sKPlusCB%i",cutName->Data(),fCentBin),pT,eta,myEt); | |
556 | FillHisto2D(Form("EtNReconstructed%sChargedHadronCB%i",cutName->Data(),fCentBin),pT,eta,myEt); | |
557 | } | |
558 | FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingPion",cutName->Data()),pT,eta,myEtPi); | |
559 | FillHisto2D(Form("EtReconstructed%sKPlusAssumingPion",cutName->Data()),pT,eta,myEtPi); | |
560 | FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingKaon",cutName->Data()),pT,eta,myEt); | |
561 | FillHisto2D(Form("EtReconstructed%sKPlusAssumingKaon",cutName->Data()),pT,eta,myEt); | |
562 | FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingProton",cutName->Data()),pT,eta,myEtP); | |
563 | FillHisto2D(Form("EtReconstructed%sKPlusAssumingProton",cutName->Data()),pT,eta,myEtP); | |
52503ae7 | 564 | } |
9a365626 | 565 | //filled = true; |
641e1e0c | 566 | } |
4b40b2b1 | 567 | if(pdgCode == fgKMinusCode){ |
641e1e0c | 568 | float myEt = Et(simPart); |
4b40b2b1 | 569 | float myEtPi = Et(simPart,fgPionMass); |
86d9d0dc | 570 | float myEtP = Et(simPart,fgProtonMass); |
61e3f555 | 571 | myEtReco = Et(track->P(),track->Theta(),fgKMinusCode,track->Charge()); |
572 | float pT = simPart->Pt(); | |
573 | float eta = simPart->Eta(); | |
574 | if(fUseRecoPt){//Then we switch the pT and the Et | |
575 | myEt = myEtReco; | |
576 | pT = track->Pt(); | |
577 | eta = track->Eta(); | |
578 | } | |
49b25059 | 579 | if(fInvestigateSmearing && cutset==2){ |
580 | eTtotalRecoEffCorrK+=myefficiencyCorrEt; | |
581 | eTtotalRecoUncorr +=myEt; | |
582 | } | |
f6acf3ad | 583 | if( !fRunLightweight){ |
584 | FillHisto2D(Form("EtReconstructed%sKMinus",cutName->Data()),pT,eta,myEt); | |
585 | FillHisto2D(Form("EtReconstructed%sChargedHadron",cutName->Data()),pT,eta,myEt); | |
586 | FillHisto2D(Form("EtNReconstructed%sKMinus",cutName->Data()),pT,eta,myEt); | |
587 | FillHisto2D(Form("EtNReconstructed%sChargedHadron",cutName->Data()),pT,eta,myEt); | |
588 | if(fCentBin>=0){//if a centrality bin was defined | |
589 | FillHisto2D(Form("EtNReconstructed%sKMinusCB%i",cutName->Data(),fCentBin),pT,eta,myEt); | |
590 | FillHisto2D(Form("EtNReconstructed%sChargedHadronCB%i",cutName->Data(),fCentBin),pT,eta,myEt); | |
591 | } | |
592 | FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingPion",cutName->Data()),pT,eta,myEtPi); | |
593 | FillHisto2D(Form("EtReconstructed%sKMinusAssumingPion",cutName->Data()),pT,eta,myEtPi); | |
594 | FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingKaon",cutName->Data()),pT,eta,myEt); | |
595 | FillHisto2D(Form("EtReconstructed%sKMinusAssumingKaon",cutName->Data()),pT,eta,myEt); | |
596 | FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingProton",cutName->Data()),pT,eta,myEtP); | |
597 | FillHisto2D(Form("EtReconstructed%sKMinusAssumingProton",cutName->Data()),pT,eta,myEtP); | |
52503ae7 | 598 | } |
9a365626 | 599 | //filled = true; |
641e1e0c | 600 | } |
4b40b2b1 | 601 | if(pdgCode == fgProtonCode){ |
641e1e0c | 602 | float myEt = Et(simPart); |
4b40b2b1 | 603 | float myEtPi = Et(simPart,fgPionMass); |
86d9d0dc | 604 | float myEtK = Et(simPart,fgKaonMass); |
61e3f555 | 605 | myEtReco = Et(track->P(),track->Theta(),fgProtonCode,track->Charge()); |
606 | float pT = simPart->Pt(); | |
607 | float eta = simPart->Eta(); | |
608 | if(fUseRecoPt){//Then we switch the pT and the Et | |
609 | myEt = myEtReco; | |
610 | pT = track->Pt(); | |
611 | eta = track->Eta(); | |
612 | } | |
49b25059 | 613 | if(fInvestigateSmearing && cutset==2){ |
614 | eTtotalRecoEffCorrP+=myefficiencyCorrEt; | |
615 | eTtotalRecoUncorr +=myEt; | |
616 | } | |
f6acf3ad | 617 | if( !fRunLightweight){ |
618 | FillHisto2D(Form("EtReconstructed%sProton",cutName->Data()),pT,eta,myEt); | |
619 | FillHisto2D(Form("EtReconstructed%sChargedHadron",cutName->Data()),pT,eta,myEt); | |
620 | FillHisto2D(Form("EtNReconstructed%sProton",cutName->Data()),pT,eta,myEt); | |
621 | FillHisto2D(Form("EtNReconstructed%sChargedHadron",cutName->Data()),pT,eta,myEt); | |
622 | if(fCentBin>=0){//if a centrality bin was defined | |
623 | FillHisto2D(Form("EtNReconstructed%sProtonCB%i",cutName->Data(),fCentBin),pT,eta,myEt); | |
624 | FillHisto2D(Form("EtNReconstructed%sChargedHadronCB%i",cutName->Data(),fCentBin),pT,eta,myEt); | |
625 | } | |
626 | FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingPion",cutName->Data()),pT,eta,myEtPi); | |
627 | FillHisto2D(Form("EtReconstructed%sProtonAssumingPion",cutName->Data()),pT,eta,myEtPi); | |
628 | FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingKaon",cutName->Data()),pT,eta,myEtK); | |
629 | FillHisto2D(Form("EtReconstructed%sProtonAssumingKaon",cutName->Data()),pT,eta,myEtK); | |
630 | FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingProton",cutName->Data()),pT,eta,myEt); | |
631 | FillHisto2D(Form("EtReconstructed%sProtonAssumingProton",cutName->Data()),pT,eta,myEt); | |
52503ae7 | 632 | } |
9a365626 | 633 | //filled = true; |
f43fc416 | 634 | |
f6acf3ad | 635 | if( !fRunLightweight){ |
636 | if(fBaryonEnhancement){ | |
637 | float enhancement = ProtonBaryonEnhancement(track->Pt()); | |
638 | FillHisto2D(Form("EtReconstructed%sProtonEnhanced",cutName->Data()),pT,eta,myEt*enhancement); | |
639 | FillHisto2D(Form("EtNReconstructed%sProtonEnhanced",cutName->Data()),pT,eta,myEt*enhancement); | |
640 | FillHisto2D(Form("EtReconstructed%sProtonAssumingPionEnhanced",cutName->Data()),pT,eta,myEtPi*enhancement); | |
641 | } | |
61e3f555 | 642 | } |
f43fc416 | 643 | |
641e1e0c | 644 | } |
4b40b2b1 | 645 | if(pdgCode == fgAntiProtonCode){ |
641e1e0c | 646 | float myEt = Et(simPart); |
4b40b2b1 | 647 | float myEtPi = Et(simPart,fgPionMass); |
86d9d0dc | 648 | float myEtK = Et(simPart,fgKaonMass); |
61e3f555 | 649 | myEtReco = Et(track->P(),track->Theta(),fgAntiProtonCode,track->Charge()); |
650 | float pT = simPart->Pt(); | |
651 | float eta = simPart->Eta(); | |
652 | if(fUseRecoPt){//Then we switch the pT and the Et | |
653 | myEt = myEtReco; | |
654 | pT = track->Pt(); | |
655 | eta = track->Eta(); | |
656 | } | |
49b25059 | 657 | if(fInvestigateSmearing && cutset==2){ |
658 | eTtotalRecoEffCorrP+=myefficiencyCorrEt; | |
659 | eTtotalRecoUncorr +=myEt; | |
660 | } | |
f6acf3ad | 661 | if( !fRunLightweight){ |
662 | FillHisto2D(Form("EtReconstructed%sAntiProton",cutName->Data()),pT,eta,myEt); | |
663 | FillHisto2D(Form("EtReconstructed%sChargedHadron",cutName->Data()),pT,eta,myEt); | |
664 | FillHisto2D(Form("EtNReconstructed%sAntiProton",cutName->Data()),pT,eta,myEt); | |
665 | FillHisto2D(Form("EtNReconstructed%sChargedHadron",cutName->Data()),pT,eta,myEt); | |
666 | if(fCentBin>=0){//if a centrality bin was defined | |
667 | FillHisto2D(Form("EtNReconstructed%sAntiProtonCB%i",cutName->Data(),fCentBin),pT,eta,myEt); | |
668 | FillHisto2D(Form("EtNReconstructed%sChargedHadronCB%i",cutName->Data(),fCentBin),pT,eta,myEt); | |
669 | } | |
670 | FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingPion",cutName->Data()),pT,eta,myEtPi); | |
671 | FillHisto2D(Form("EtReconstructed%sAntiProtonAssumingPion",cutName->Data()),pT,eta,myEtPi); | |
672 | FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingKaon",cutName->Data()),pT,eta,myEtK); | |
673 | FillHisto2D(Form("EtReconstructed%sAntiProtonAssumingKaon",cutName->Data()),pT,eta,myEtK); | |
674 | FillHisto2D(Form("EtReconstructed%sChargedHadronAssumingProton",cutName->Data()),pT,eta,myEt); | |
675 | FillHisto2D(Form("EtReconstructed%sAntiProtonAssumingProton",cutName->Data()),pT,eta,myEt); | |
52503ae7 | 676 | } |
9a365626 | 677 | //filled = true; |
f6acf3ad | 678 | if( !fRunLightweight){ |
679 | if(fBaryonEnhancement){ | |
680 | float enhancement = ProtonBaryonEnhancement(track->Pt()); | |
681 | FillHisto2D(Form("EtReconstructed%sAntiProtonEnhanced",cutName->Data()),pT,eta,myEt*enhancement); | |
682 | FillHisto2D(Form("EtNReconstructed%sAntiProtonEnhanced",cutName->Data()),pT,eta,myEt*enhancement); | |
683 | FillHisto2D(Form("EtReconstructed%sAntiProtonAssumingPionEnhanced",cutName->Data()),pT,eta,myEtPi*enhancement); | |
684 | } | |
f43fc416 | 685 | } |
641e1e0c | 686 | } |
4b40b2b1 | 687 | if(pdgCode == fgEPlusCode){ |
f6acf3ad | 688 | if( !fRunLightweight){ |
689 | float myEt = Et(simPart); | |
690 | FillHisto2D(Form("EtReconstructed%sEPlus",cutName->Data()),simPart->Pt(),simPart->Eta(),myEt); | |
691 | if(!isElectron || unidentified){ | |
692 | float myEtPi = Et(simPart,fgPionMass); | |
693 | FillHisto2D(Form("EtReconstructed%sMisidentifiedElectrons",cutName->Data()),track->Pt(),track->Eta(),myEtPi); | |
694 | } | |
641e1e0c | 695 | } |
9a365626 | 696 | //filled = true; |
641e1e0c | 697 | } |
4b40b2b1 | 698 | if(pdgCode == fgEMinusCode){ |
f6acf3ad | 699 | if( !fRunLightweight){ |
700 | if(!isElectron || unidentified){ | |
701 | float myEtPi = Et(simPart,fgPionMass); | |
702 | FillHisto2D(Form("EtReconstructed%sMisidentifiedElectrons",cutName->Data()),track->Pt(),track->Eta(),myEtPi); | |
703 | } | |
704 | float myEt = Et(simPart); | |
705 | FillHisto2D(Form("EtReconstructed%sEMinus",cutName->Data()),simPart->Pt(),simPart->Eta(),myEt); | |
641e1e0c | 706 | } |
9a365626 | 707 | //filled = true; |
641e1e0c | 708 | } |
f6acf3ad | 709 | if( !fRunLightweight){ |
710 | if(myEtReco>0.0){FillHisto2D(Form("ETresolution%s",cutName->Data()),myEtReco,(myEtSim-myEtReco)/myEtReco,1.0);} | |
711 | if(track->Pt()>0.0){FillHisto2D(Form("pTresolution%s",cutName->Data()),track->Pt(),(simPart->Pt() - track->Pt())/track->Pt(),1.0);} | |
712 | if(track->P()>0.0){FillHisto2D(Form("presolution%s",cutName->Data()),track->P(),(simPart->P() - track->P())/track->P(),1.0);} | |
713 | FillHisto1D(Form("pTsim%s",cutName->Data()),simPart->Pt(),1.0); | |
714 | FillHisto1D(Form("pTrec%s",cutName->Data()),track->Pt(),1.0); | |
715 | if(fCentBin!=-1){ | |
716 | FillHisto1D(Form("pTsim%sCB%i",cutName->Data(),fCentBin),simPart->Pt(),1.0); | |
717 | FillHisto1D(Form("pTrec%sCB%i",cutName->Data(),fCentBin),track->Pt(),1.0); | |
718 | } | |
61e3f555 | 719 | } |
641e1e0c | 720 | } |
641e1e0c | 721 | } |
722 | else{//not a primary - we're after V0 daughters! | |
49b25059 | 723 | bool written = false; |
724 | //now, what is the et we would measure for this? Since this is the relevant et. | |
725 | float myrecoEt = 0; | |
726 | if(isPion || unidentified) myrecoEt = Et(track->P(),track->Theta(),fgPiPlusCode,track->Charge()); | |
727 | if(isProton) myrecoEt = Et(track->P(),track->Theta(),fgProtonCode,track->Charge()); | |
728 | if(isKaon) myrecoEt = Et(track->P(),track->Theta(),fgKPlusCode,track->Charge()); | |
729 | if (TMath::Abs(simPart->Eta()) < fHadEtReco->GetCorrections()->GetEtaCut()){ | |
d7605578 | 730 | TParticle *mom = NULL; |
731 | if(simPart->GetFirstMother()>=0) mom= stack->Particle(simPart->GetFirstMother()); | |
0e866ddc | 732 | if(mom){ |
733 | TParticlePDG *pc = mom->GetPDG(0); | |
734 | if(pc){ | |
735 | Int_t pdgCode = mom->GetPDG(0)->PdgCode(); | |
736 | if(pdgCode == fgLambdaCode){ | |
49b25059 | 737 | written = true; |
0e866ddc | 738 | float myEt = Et(simPart); |
61e3f555 | 739 | float pT = simPart->Pt(); |
740 | float eta = simPart->Eta(); | |
ccd12409 | 741 | TParticlePDG *simpdg = simPart->GetPDG(0); |
742 | if(!simpdg) continue; | |
49b25059 | 743 | eTtotalRecoBkgd+=myEt; |
61e3f555 | 744 | if(fUseRecoPt){//Then we switch the pT and the Et |
745 | myEt = Et(track->P(),track->Theta(),simPart->GetPDG(0)->PdgCode(),track->Charge()); | |
746 | pT = track->Pt(); | |
747 | eta = track->Eta(); | |
748 | } | |
f6acf3ad | 749 | if( !fRunLightweight){ |
750 | FillHisto2D(Form("EtReconstructed%sLambdaDaughters",cutName->Data()),pT,eta,myrecoEt); | |
751 | Float_t weight = LambdaWeight(mom->Pt()); | |
752 | if(fBaryonEnhancement){ | |
753 | float enhancement = ProtonBaryonEnhancement(track->Pt()); | |
754 | weight = weight*enhancement; | |
755 | } | |
756 | FillHisto2D(Form("EtReconstructed%sLambdaDaughtersReweighted",cutName->Data()),pT,eta,myrecoEt*weight); | |
f43fc416 | 757 | } |
0e866ddc | 758 | } |
759 | if(pdgCode == fgAntiLambdaCode){ | |
49b25059 | 760 | written = true; |
0e866ddc | 761 | float myEt = Et(simPart); |
61e3f555 | 762 | float pT = simPart->Pt(); |
763 | float eta = simPart->Eta(); | |
49b25059 | 764 | eTtotalRecoBkgd+=myEt; |
ccd12409 | 765 | TParticlePDG *simpdg = simPart->GetPDG(0); |
766 | if(!simpdg) continue; | |
61e3f555 | 767 | if(fUseRecoPt){//Then we switch the pT and the Et |
768 | myEt = Et(track->P(),track->Theta(),simPart->GetPDG(0)->PdgCode(),track->Charge()); | |
769 | pT = track->Pt(); | |
770 | eta = track->Eta(); | |
771 | } | |
f6acf3ad | 772 | if( !fRunLightweight){ |
773 | FillHisto2D(Form("EtReconstructed%sAntiLambdaDaughters",cutName->Data()),pT,eta,myrecoEt); | |
774 | Float_t weight = AntiLambdaWeight(mom->Pt()); | |
775 | if(fBaryonEnhancement){ | |
776 | float enhancement = ProtonBaryonEnhancement(track->Pt()); | |
777 | weight = weight*enhancement; | |
778 | } | |
779 | FillHisto2D(Form("EtReconstructed%sAntiLambdaDaughtersReweighted",cutName->Data()),pT,eta,myrecoEt*weight); | |
f43fc416 | 780 | } |
0e866ddc | 781 | } |
49b25059 | 782 | if(pdgCode == fgK0SCode || pdgCode == fgK0LCode || pdgCode == fgKPlusCode || pdgCode == fgKMinusCode){//actually get all kaon daughters |
783 | written = true; | |
0e866ddc | 784 | float myEt = Et(simPart); |
61e3f555 | 785 | float pT = simPart->Pt(); |
786 | float eta = simPart->Eta(); | |
49b25059 | 787 | eTtotalRecoBkgd+=myEt; |
ccd12409 | 788 | TParticlePDG *simpdg = simPart->GetPDG(0); |
789 | if(!simpdg) continue; | |
61e3f555 | 790 | if(fUseRecoPt){//Then we switch the pT and the Et |
791 | myEt = Et(track->P(),track->Theta(),simPart->GetPDG(0)->PdgCode(),track->Charge()); | |
792 | pT = track->Pt(); | |
793 | eta = track->Eta(); | |
794 | } | |
f6acf3ad | 795 | if( !fRunLightweight){ |
796 | FillHisto2D(Form("EtReconstructed%sK0SDaughters",cutName->Data()),pT,eta,myEt); | |
797 | Float_t weight = K0Weight(mom->Pt()); | |
798 | FillHisto2D(Form("EtReconstructed%sK0SDaughtersReweighted",cutName->Data()),pT,eta,myrecoEt*weight); | |
799 | } | |
0e866ddc | 800 | } |
801 | if(pdgCode == fgXiCode){ | |
49b25059 | 802 | written = true; |
0e866ddc | 803 | float myEt = Et(simPart); |
61e3f555 | 804 | float pT = simPart->Pt(); |
805 | float eta = simPart->Eta(); | |
49b25059 | 806 | eTtotalRecoBkgd+=myEt; |
ccd12409 | 807 | TParticlePDG *simpdg = simPart->GetPDG(0); |
808 | if(!simpdg) continue; | |
61e3f555 | 809 | if(fUseRecoPt){//Then we switch the pT and the Et |
810 | myEt = Et(track->P(),track->Theta(),simPart->GetPDG(0)->PdgCode(),track->Charge()); | |
811 | pT = track->Pt(); | |
812 | eta = track->Eta(); | |
813 | } | |
f6acf3ad | 814 | if( !fRunLightweight){ |
815 | FillHisto2D(Form("EtReconstructed%sXiDaughters",cutName->Data()),pT,eta,myrecoEt); | |
816 | } | |
0e866ddc | 817 | } |
818 | if(pdgCode == fgAntiXiCode){ | |
49b25059 | 819 | written = true; |
0e866ddc | 820 | float myEt = Et(simPart); |
61e3f555 | 821 | float pT = simPart->Pt(); |
822 | float eta = simPart->Eta(); | |
49b25059 | 823 | eTtotalRecoBkgd+=myEt; |
ccd12409 | 824 | TParticlePDG *simpdg = simPart->GetPDG(0); |
825 | if(!simpdg) continue; | |
61e3f555 | 826 | if(fUseRecoPt){//Then we switch the pT and the Et |
827 | myEt = Et(track->P(),track->Theta(),simPart->GetPDG(0)->PdgCode(),track->Charge()); | |
828 | pT = track->Pt(); | |
829 | eta = track->Eta(); | |
830 | } | |
f6acf3ad | 831 | if( !fRunLightweight){ |
832 | FillHisto2D(Form("EtReconstructed%sAntiXiDaughters",cutName->Data()),pT,eta,myrecoEt); | |
833 | } | |
0e866ddc | 834 | } |
835 | if(pdgCode == fgOmegaCode){ | |
49b25059 | 836 | written = true; |
0e866ddc | 837 | float myEt = Et(simPart); |
61e3f555 | 838 | float pT = simPart->Pt(); |
839 | float eta = simPart->Eta(); | |
49b25059 | 840 | eTtotalRecoBkgd+=myEt; |
ccd12409 | 841 | TParticlePDG *simpdg = simPart->GetPDG(0); |
842 | if(!simpdg) continue; | |
61e3f555 | 843 | if(fUseRecoPt){//Then we switch the pT and the Et |
844 | myEt = Et(track->P(),track->Theta(),simPart->GetPDG(0)->PdgCode(),track->Charge()); | |
845 | pT = track->Pt(); | |
846 | eta = track->Eta(); | |
847 | } | |
f6acf3ad | 848 | if( !fRunLightweight){ |
849 | FillHisto2D(Form("EtReconstructed%sOmegaDaughters",cutName->Data()),pT,eta,myrecoEt); | |
850 | } | |
0e866ddc | 851 | } |
852 | if(pdgCode == fgXiCode){ | |
49b25059 | 853 | written = true; |
0e866ddc | 854 | float myEt = Et(simPart); |
61e3f555 | 855 | float pT = simPart->Pt(); |
856 | float eta = simPart->Eta(); | |
49b25059 | 857 | eTtotalRecoBkgd+=myEt; |
ccd12409 | 858 | TParticlePDG *simpdg = simPart->GetPDG(0); |
859 | if(!simpdg) continue; | |
61e3f555 | 860 | if(fUseRecoPt){//Then we switch the pT and the Et |
861 | myEt = Et(track->P(),track->Theta(),simPart->GetPDG(0)->PdgCode(),track->Charge()); | |
862 | pT = track->Pt(); | |
863 | eta = track->Eta(); | |
864 | } | |
f6acf3ad | 865 | if( !fRunLightweight){ |
866 | FillHisto2D(Form("EtReconstructed%sAntiOmegaDaughters",cutName->Data()),pT,eta,myrecoEt); | |
867 | } | |
0e866ddc | 868 | } |
641e1e0c | 869 | |
0e866ddc | 870 | if(mom->GetFirstMother()>0){ |
d7605578 | 871 | TParticle *grandma = NULL; |
872 | if(mom->GetFirstMother()>=0) stack->Particle(mom->GetFirstMother()); | |
0e866ddc | 873 | if(grandma){ |
ccd12409 | 874 | TParticlePDG *mompdg = mom->GetPDG(0); |
875 | if(!mompdg) continue; | |
0e866ddc | 876 | Int_t pdgCodeMom = mom->GetPDG(0)->PdgCode(); |
877 | if(pdgCodeMom==fgPiPlusCode || pdgCodeMom==fgPiMinusCode || pdgCodeMom==fgProtonCode ||pdgCodeMom==fgAntiProtonCode || pdgCodeMom==fgKPlusCode || pdgCode==fgKMinusCode){ | |
ccd12409 | 878 | TParticlePDG *grandmapdg = grandma->GetPDG(0); |
879 | if(!grandmapdg) continue; | |
0e866ddc | 880 | Int_t pdgCodeGrandma = grandma->GetPDG(0)->PdgCode(); |
641e1e0c | 881 | |
0e866ddc | 882 | if(pdgCodeGrandma == fgXiCode){ |
49b25059 | 883 | written = true; |
0e866ddc | 884 | float myEt = Et(simPart); |
61e3f555 | 885 | float pT = simPart->Pt(); |
886 | float eta = simPart->Eta(); | |
49b25059 | 887 | eTtotalRecoBkgd+=myEt; |
61e3f555 | 888 | if(fUseRecoPt){//Then we switch the pT and the Et |
889 | myEt = Et(track->P(),track->Theta(),simPart->GetPDG(0)->PdgCode(),track->Charge()); | |
890 | pT = track->Pt(); | |
891 | eta = track->Eta(); | |
892 | } | |
f6acf3ad | 893 | if( !fRunLightweight){ |
894 | FillHisto2D(Form("EtReconstructed%sXiDaughters",cutName->Data()),pT,eta,myrecoEt); | |
895 | } | |
0e866ddc | 896 | } |
897 | if(pdgCodeGrandma == fgAntiXiCode){ | |
49b25059 | 898 | written = true; |
0e866ddc | 899 | float myEt = Et(simPart); |
61e3f555 | 900 | float pT = simPart->Pt(); |
901 | float eta = simPart->Eta(); | |
49b25059 | 902 | eTtotalRecoBkgd+=myEt; |
61e3f555 | 903 | if(fUseRecoPt){//Then we switch the pT and the Et |
904 | myEt = Et(track->P(),track->Theta(),simPart->GetPDG(0)->PdgCode(),track->Charge()); | |
905 | pT = track->Pt(); | |
906 | eta = track->Eta(); | |
907 | } | |
f6acf3ad | 908 | if( !fRunLightweight){ |
909 | FillHisto2D(Form("EtReconstructed%sAntiXiDaughters",cutName->Data()),pT,eta,myrecoEt); | |
910 | } | |
0e866ddc | 911 | } |
912 | if(pdgCodeGrandma == fgOmegaCode){ | |
49b25059 | 913 | written = true; |
0e866ddc | 914 | float myEt = Et(simPart); |
61e3f555 | 915 | float pT = simPart->Pt(); |
916 | float eta = simPart->Eta(); | |
49b25059 | 917 | eTtotalRecoBkgd+=myEt; |
61e3f555 | 918 | if(fUseRecoPt){//Then we switch the pT and the Et |
919 | myEt = Et(track->P(),track->Theta(),simPart->GetPDG(0)->PdgCode(),track->Charge()); | |
920 | pT = track->Pt(); | |
921 | eta = track->Eta(); | |
922 | } | |
f6acf3ad | 923 | if( !fRunLightweight){ |
924 | FillHisto2D(Form("EtReconstructed%sOmegaDaughters",cutName->Data()),pT,eta,myrecoEt); | |
925 | } | |
0e866ddc | 926 | } |
927 | if(pdgCodeGrandma == fgXiCode){ | |
49b25059 | 928 | written = true; |
0e866ddc | 929 | float myEt = Et(simPart); |
61e3f555 | 930 | float pT = simPart->Pt(); |
931 | float eta = simPart->Eta(); | |
49b25059 | 932 | eTtotalRecoBkgd+=myEt; |
61e3f555 | 933 | if(fUseRecoPt){//Then we switch the pT and the Et |
934 | myEt = Et(track->P(),track->Theta(),simPart->GetPDG(0)->PdgCode(),track->Charge()); | |
935 | pT = track->Pt(); | |
936 | eta = track->Eta(); | |
937 | } | |
f6acf3ad | 938 | if( !fRunLightweight){ |
939 | FillHisto2D(Form("EtReconstructed%sAntiOmegaDaughters",cutName->Data()),pT,eta,myrecoEt); | |
940 | } | |
0e866ddc | 941 | } |
641e1e0c | 942 | |
0e866ddc | 943 | } |
641e1e0c | 944 | } |
945 | } | |
49b25059 | 946 | if(!written){ |
947 | int mycode = simPart->GetPDG(0)->PdgCode(); | |
ccd12409 | 948 | if(!mycode) continue; |
49b25059 | 949 | if( (pdgCode == fgGammaCode || pdgCode == fgPi0Code) && (mycode==fgEPlusCode||mycode==fgEMinusCode)){ |
950 | written = true; | |
951 | float myEt = Et(simPart); | |
952 | float pT = simPart->Pt(); | |
953 | float eta = simPart->Eta(); | |
954 | eTtotalRecoBkgd+=myEt; | |
955 | if(fUseRecoPt){//Then we switch the pT and the Et | |
956 | myEt = Et(track->P(),track->Theta(),simPart->GetPDG(0)->PdgCode(),track->Charge()); | |
957 | pT = track->Pt(); | |
958 | eta = track->Eta(); | |
959 | } | |
f6acf3ad | 960 | if( !fRunLightweight){ |
961 | FillHisto2D(Form("EtReconstructed%sConversionElectrons",cutName->Data()),pT,eta,myrecoEt); | |
962 | } | |
49b25059 | 963 | } |
964 | if(mycode==fgMuPlusCode || mycode==fgMuMinusCode){ | |
965 | written = true; | |
966 | float myEt = Et(simPart); | |
967 | float pT = simPart->Pt(); | |
968 | float eta = simPart->Eta(); | |
969 | eTtotalRecoBkgd+=myEt; | |
970 | if(fUseRecoPt){//Then we switch the pT and the Et | |
971 | myEt = Et(track->P(),track->Theta(),simPart->GetPDG(0)->PdgCode(),track->Charge()); | |
972 | pT = track->Pt(); | |
973 | eta = track->Eta(); | |
974 | } | |
f6acf3ad | 975 | if( !fRunLightweight){ |
976 | FillHisto2D(Form("EtReconstructed%sSecondaryMuons",cutName->Data()),pT,eta,myrecoEt); | |
977 | } | |
49b25059 | 978 | } |
979 | if(mycode==fgPiPlusCode || mycode==fgPiMinusCode){ | |
980 | written = true; | |
981 | float myEt = Et(simPart); | |
982 | float pT = simPart->Pt(); | |
983 | float eta = simPart->Eta(); | |
984 | eTtotalRecoBkgd+=myEt; | |
985 | if(fUseRecoPt){//Then we switch the pT and the Et | |
986 | myEt = Et(track->P(),track->Theta(),simPart->GetPDG(0)->PdgCode(),track->Charge()); | |
987 | pT = track->Pt(); | |
988 | eta = track->Eta(); | |
989 | } | |
f6acf3ad | 990 | if( !fRunLightweight){ |
991 | FillHisto2D(Form("EtReconstructed%sSecondaryPions",cutName->Data()),pT,eta,myrecoEt); | |
992 | } | |
49b25059 | 993 | } |
994 | if(mycode==fgAntiProtonCode || mycode==fgProtonCode){ | |
995 | written = true; | |
996 | float myEt = Et(simPart); | |
997 | float pT = simPart->Pt(); | |
998 | float eta = simPart->Eta(); | |
999 | eTtotalRecoBkgd+=myEt; | |
1000 | if(fUseRecoPt){//Then we switch the pT and the Et | |
1001 | myEt = Et(track->P(),track->Theta(),simPart->GetPDG(0)->PdgCode(),track->Charge()); | |
1002 | pT = track->Pt(); | |
1003 | eta = track->Eta(); | |
1004 | } | |
f6acf3ad | 1005 | if( !fRunLightweight){ |
1006 | FillHisto2D(Form("EtReconstructed%sSecondaryProtons",cutName->Data()),pT,eta,myrecoEt); | |
1007 | } | |
49b25059 | 1008 | } |
1009 | //if(!written) cout<<"I was not counted in the background and I am a "<<simPart->GetName()<<" and my mother is a "<<mom->GetName()<<endl; | |
1010 | } | |
641e1e0c | 1011 | } |
49b25059 | 1012 | else{cout<<"No particle code!! 657"<<endl;} |
641e1e0c | 1013 | } |
49b25059 | 1014 | else{cout<<"No mother particle!! 658"<<endl;} |
641e1e0c | 1015 | } |
1016 | } | |
1017 | } | |
1018 | ||
1019 | } | |
1020 | } | |
1021 | delete list; | |
1022 | } | |
f6acf3ad | 1023 | if(fInvestigateSmearing && !fRunLightweight){ |
49b25059 | 1024 | if(fSimPiKPEtShouldBeReco>0.0) FillHisto2D("SimPiKPEtMinusSimEffCorrRecoOnly",fSimPiKPEtShouldBeReco,(fSimPiKPEtShouldBeReco-eTtotalRecoEffCorr)/fSimPiKPEtShouldBeReco,1.0); |
1025 | if(fSimPiKPEtShouldBeReco>0.0) FillHisto2D("SimPiKPEtMinusSimEffBkgdCorrRecoOnly",fSimPiKPEtShouldBeReco,(fSimPiKPEtShouldBeReco-eTtotalRecoEffBkgdCorr)/fSimPiKPEtShouldBeReco,1.0); | |
1026 | if(fSimPiKPEtShouldBeRecoPi>0.0) FillHisto2D("SimPiKPEtMinusSimEffCorrRecoPiOnly",fSimPiKPEtShouldBeRecoPi,(fSimPiKPEtShouldBeRecoPi-eTtotalRecoEffCorrPi)/fSimPiKPEtShouldBeRecoPi,1.0); | |
1027 | if(fSimPiKPEtShouldBeRecoP>0.0) FillHisto2D("SimPiKPEtMinusSimEffCorrRecoPOnly",fSimPiKPEtShouldBeRecoP,(fSimPiKPEtShouldBeRecoP-eTtotalRecoEffCorrP)/fSimPiKPEtShouldBeRecoP,1.0); | |
1028 | if(fSimPiKPEtShouldBeRecoK>0.0) FillHisto2D("SimPiKPEtMinusSimEffCorrRecoKOnly",fSimPiKPEtShouldBeRecoK,(fSimPiKPEtShouldBeRecoK-eTtotalRecoEffCorrK)/fSimPiKPEtShouldBeRecoK,1.0); | |
1029 | if(eTtotalSim>0.0) FillHisto2D("SimPiKPEtMinusSimAllCorrSmearedRecoOnly",eTtotalSim,(eTtotalSim-eTtotalSimAll+eTtotalRecoBkgd)/eTtotalSim,1.0); | |
1030 | if(eTtotalRecoTotalUncorr>0.0) FillHisto2D("SimPiKPEtMeasMinusEtRealPiKP",eTtotalRecoTotalUncorr,(eTtotalRecoTotalUncorr-eTtotalRecoUncorr)/eTtotalRecoTotalUncorr,1.0); | |
1031 | if(eTtotalSim>0.0) FillHisto2D("SimPiKPEtMinusSimAllSmearedRecoOnly",eTtotalSim,(eTtotalSim-eTtotalSimAll)/eTtotalSim,1.0); | |
1032 | if(eTtotalSim>0.0) FillHisto2D("SimPiKPEtMinusSimPIDSmearedRecoOnly",eTtotalSim,(eTtotalSim-eTtotalRecoPIDSmeared*1.01)/eTtotalSim,1.0); | |
1033 | if(eTtotalSim>0.0) FillHisto2D("SimPiKPEtMinusSimSmearedRecoOnly",eTtotalSim,(eTtotalSim-eTtotalReco)/eTtotalSim,1.0); | |
1034 | if(pTtotalSim>0.0) FillHisto2D("SimPiKPPtMinusSimSmearedRecoOnly",pTtotalSim,(pTtotalSim-pTtotalReco)/pTtotalSim,1.0); | |
1035 | if(eTtotalSim>0.0) FillHisto2D("SimPiKPEtMinusSimSmearedMultRecoOnly",nReco,(eTtotalSim-eTtotalReco)/eTtotalSim,1.0); | |
1036 | if(pTtotalSim>0.0) FillHisto2D("SimPiKPPtMinusSimSmearedMultRecoOnly",nReco,(pTtotalSim-pTtotalReco)/pTtotalSim,1.0); | |
1037 | } | |
464aa50c | 1038 | delete pID; |
1039 | delete strTPC; | |
1040 | delete strITS; | |
1041 | delete strTPCITS; | |
641e1e0c | 1042 | return 1; |
1043 | } | |
1044 | Int_t AliAnalysisHadEtMonteCarlo::AnalyseEvent(AliVEvent* ev) | |
cf6522d1 | 1045 | { // analyse MC event |
641e1e0c | 1046 | ResetEventValues(); |
6a0df78a | 1047 | if(!ev){ |
0f6416f3 | 1048 | AliFatal("ERROR: Event does not exist"); |
6a0df78a | 1049 | return 0; |
1050 | } | |
641e1e0c | 1051 | |
1052 | // Get us an mc event | |
1053 | AliMCEvent *mcEvent = dynamic_cast<AliMCEvent*>(ev); | |
ec956c46 | 1054 | if(!mcEvent){ |
1055 | AliFatal("ERROR: MC Event does not exist"); | |
1056 | return 0; | |
1057 | } | |
2c0680a5 | 1058 | |
641e1e0c | 1059 | // Let's play with the stack! |
1060 | AliStack *stack = mcEvent->Stack(); | |
1061 | ||
1062 | Int_t nPrim = stack->GetNtrack(); | |
1063 | ||
0e866ddc | 1064 | Float_t fSimPiKPEtPtSmeared = 0; |
1065 | Float_t fSimPiKPEtEfficiencySmeared = 0; | |
1066 | Float_t fSimPiKPEtPtCutSmearedTPC = 0; | |
1067 | Float_t fSimPiKPEtPtCutSmearedITS = 0; | |
1068 | Float_t fSimPiKPEtPIDSmeared = 0; | |
1069 | Float_t fSimPiKPEtPIDSmearedNoID = 0; | |
49b25059 | 1070 | fSimPiKPEtShouldBeReco = 0; |
1071 | fSimPiKPEtShouldBeRecoPi = 0; | |
1072 | fSimPiKPEtShouldBeRecoK = 0; | |
1073 | fSimPiKPEtShouldBeRecoP = 0; | |
641e1e0c | 1074 | //=================Tracks which may or may not have been reconstructed================= |
1075 | ||
1076 | for (Int_t iPart = 0; iPart < nPrim; iPart++) | |
1077 | { | |
1078 | ||
ea331c5d | 1079 | TParticle *part = stack->Particle(iPart);//This line is identified as a loss of memory by valgrind, however, the pointer still belongs to the stack, so it's the stack's problem |
641e1e0c | 1080 | |
1081 | if (!part) | |
1082 | { | |
1083 | Printf("ERROR: Could not get particle %d", iPart); | |
1084 | continue; | |
1085 | } | |
641e1e0c | 1086 | // Check if it is a primary particle |
f427cbed | 1087 | if (stack->IsPhysicalPrimary(iPart)){//primaries |
641e1e0c | 1088 | |
49b25059 | 1089 | if (TMath::Abs(part->Eta()) < fHadEtReco->GetCorrections()->GetEtaCut()) { |
ccd12409 | 1090 | TParticlePDG *pdg = part->GetPDG(0); |
1091 | if(!pdg) continue; | |
641e1e0c | 1092 | Int_t pdgCode = part->GetPDG(0)->PdgCode(); |
641e1e0c | 1093 | bool filled = false; |
0e866ddc | 1094 | //Investigating smearing... |
1095 | //Numbers are realistic correction factors from previous studies | |
7d2d1773 | 1096 | if(fInvestigateSmearing){ |
1097 | if(pdgCode==fgPiPlusCode ||pdgCode==fgPiMinusCode ||pdgCode==fgKPlusCode ||pdgCode==fgKMinusCode ||pdgCode==fgProtonCode ||pdgCode==fgAntiProtonCode){ | |
1098 | //To investigate Smearing... | |
1099 | Float_t myet = Et(part); | |
1100 | fSimPiKPEt += myet; | |
1826590b | 1101 | if(part->Pt()>0.150) fSimRawEtTPC += myet; |
1102 | if(part->Pt()>0.100) fSimRawEtITS += myet; | |
7d2d1773 | 1103 | Float_t theta = part->Theta(); |
1104 | Short_t charge = 1; | |
1105 | Float_t momentum = part->P(); | |
1106 | //pt smearing | |
1107 | Float_t pSmeared = momentum * fPtSmearer->Gaus(1,0.005);//Gaussian centered around 1 | |
1108 | fSimPiKPEtPtSmeared += Et(pSmeared,theta,pdgCode,charge); | |
1109 | //Efficiency smearing | |
61e3f555 | 1110 | //to mock up the difference between TPC only tracks in p+p (~90% efficiency at high pT) and TPC+ITS tracks in Pb+Pb (about 70% efficiency at high pT) a factor of 7/9 was added in front |
1111 | float efficiency = 7.0/9.0*2.26545*TMath::Exp(-TMath::Power(9.99977e-01/part->Pt(),7.85488e-02));//simple rough efficiency from fitting curve | |
7d2d1773 | 1112 | if(fPtSmearer->Binomial(1,efficiency) ==1){ |
1113 | fSimPiKPEtEfficiencySmeared += (1.0/efficiency)*myet; | |
1114 | } | |
1115 | //pT cut smeared | |
61e3f555 | 1116 | if(part->Pt()>0.10){fSimPiKPEtPtCutSmearedITS +=1.00988*myet;} |
1117 | if(part->Pt()>0.15){fSimPiKPEtPtCutSmearedTPC +=1.02994*myet;} | |
7d2d1773 | 1118 | //PID smearing |
61e3f555 | 1119 | fSimPiKPEtPIDSmearedNoID += 1.03018015790601458*Et(momentum,theta,fgPiPlusCode,charge); |
7d2d1773 | 1120 | if(part->P()<1.0){//then the particle would have been ID'd |
61e3f555 | 1121 | fSimPiKPEtPIDSmeared += 1.00918051514628582*myet; |
7d2d1773 | 1122 | } |
1123 | else{//Then it would have been assumed to be a pion | |
61e3f555 | 1124 | fSimPiKPEtPIDSmeared += 1.00918051514628582*Et(momentum,theta,fgPiPlusCode,charge); |
7d2d1773 | 1125 | } |
0e866ddc | 1126 | } |
1127 | } | |
1128 | ||
641e1e0c | 1129 | //============Charged hadrons=================================== |
4b40b2b1 | 1130 | if(pdgCode == fgPiPlusCode){ |
641e1e0c | 1131 | float myEt = Et(part); |
86d9d0dc | 1132 | float myEtP = Et(part,fgProtonMass); |
1133 | float myEtK = Et(part,fgKaonMass); | |
49b25059 | 1134 | if(part->Pt()>0.15) fSimPiKPEtShouldBeReco += myEt; |
1135 | if(part->Pt()>0.15) fSimPiKPEtShouldBeRecoPi += myEt; | |
0e866ddc | 1136 | |
d6214a64 | 1137 | fSimHadEt += myEt; |
1138 | fSimTotEt += myEt; | |
0e866ddc | 1139 | |
f6acf3ad | 1140 | |
1141 | if( !fRunLightweight){ | |
1142 | FillHisto2D("EtSimulatedPiPlus",part->Pt(),part->Eta(),myEt); | |
1143 | FillHisto2D("EtNSimulatedPiPlus",part->Pt(),part->Eta(),1.0); | |
1144 | FillHisto2D("EtSimulatedChargedHadron",part->Pt(),part->Eta(),myEt); | |
1145 | FillHisto2D("EtNSimulatedChargedHadron",part->Pt(),part->Eta(),1.0); | |
1146 | if(fCentBin>=0){//if a centrality bin was defined | |
1147 | FillHisto2D(Form("EtNSimulatedPiPlusCB%i",fCentBin),part->Pt(),part->Eta(),1.0); | |
1148 | FillHisto2D(Form("EtNSimulatedChargedHadronCB%i",fCentBin),part->Pt(),part->Eta(),1.0); | |
1149 | } | |
1150 | FillHisto2D("EtSimulatedChargedHadronAssumingPion",part->Pt(),part->Eta(),myEt); | |
1151 | FillHisto2D("EtSimulatedChargedHadronAssumingProton",part->Pt(),part->Eta(),myEtP); | |
1152 | FillHisto2D("EtSimulatedPiPlusAssumingProton",part->Pt(),part->Eta(),myEtP); | |
1153 | FillHisto2D("EtSimulatedChargedHadronAssumingKaon",part->Pt(),part->Eta(),myEtK); | |
1154 | FillHisto2D("EtSimulatedPiPlusAssumingKaon",part->Pt(),part->Eta(),myEtK); | |
1155 | FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt); | |
1156 | Short_t charge = 1; | |
1157 | Float_t myEtLow = Et(0.0,part->Theta(),pdgCode,charge); | |
1158 | Float_t myEtITS = Et(0.10/TMath::Sin(part->Theta()),part->Theta(),pdgCode,charge); | |
1159 | Float_t myEtTPC = Et(0.15/TMath::Sin(part->Theta()),part->Theta(),pdgCode,charge); | |
1160 | FillHisto2D("EtSimulatedChargedHadronAssumingNoPt",part->Pt(),part->Eta(),myEtLow); | |
1161 | FillHisto2D("EtSimulatedChargedHadronAssumingPtTPCCut",part->Pt(),part->Eta(),myEtTPC); | |
1162 | FillHisto2D("EtSimulatedChargedHadronAssumingPtITSCut",part->Pt(),part->Eta(),myEtITS); | |
52503ae7 | 1163 | } |
641e1e0c | 1164 | filled = true; |
1165 | } | |
4b40b2b1 | 1166 | if(pdgCode == fgPiMinusCode){ |
641e1e0c | 1167 | float myEt = Et(part); |
86d9d0dc | 1168 | float myEtP = Et(part,fgProtonMass); |
1169 | float myEtK = Et(part,fgKaonMass); | |
49b25059 | 1170 | if(part->Pt()>0.15) fSimPiKPEtShouldBeReco += myEt; |
1171 | if(part->Pt()>0.15) fSimPiKPEtShouldBeRecoPi += myEt; | |
d6214a64 | 1172 | fSimHadEt += myEt; |
1173 | fSimTotEt += myEt; | |
f6acf3ad | 1174 | if( !fRunLightweight){ |
1175 | FillHisto2D("EtSimulatedPiMinus",part->Pt(),part->Eta(),myEt); | |
1176 | FillHisto2D("EtNSimulatedPiMinus",part->Pt(),part->Eta(),1.0); | |
1177 | FillHisto2D("EtSimulatedChargedHadron",part->Pt(),part->Eta(),myEt); | |
1178 | FillHisto2D("EtNSimulatedChargedHadron",part->Pt(),part->Eta(),1.0); | |
1179 | if(fCentBin>=0){//if a centrality bin was defined | |
1180 | FillHisto2D(Form("EtNSimulatedPiMinusCB%i",fCentBin),part->Pt(),part->Eta(),1.0); | |
1181 | FillHisto2D(Form("EtNSimulatedChargedHadronCB%i",fCentBin),part->Pt(),part->Eta(),1.0); | |
1182 | } | |
1183 | FillHisto2D("EtSimulatedChargedHadronAssumingPion",part->Pt(),part->Eta(),myEt); | |
1184 | FillHisto2D("EtSimulatedChargedHadronAssumingProton",part->Pt(),part->Eta(),myEtP); | |
1185 | FillHisto2D("EtSimulatedPiMinusAssumingProton",part->Pt(),part->Eta(),myEtP); | |
1186 | FillHisto2D("EtSimulatedChargedHadronAssumingKaon",part->Pt(),part->Eta(),myEtK); | |
1187 | FillHisto2D("EtSimulatedPiMinusAssumingKaon",part->Pt(),part->Eta(),myEtK); | |
1188 | FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt); | |
1189 | Short_t charge = -1; | |
1190 | Float_t myEtLow = Et(0.0,part->Theta(),pdgCode,charge); | |
1191 | Float_t myEtITS = Et(0.10/TMath::Sin(part->Theta()),part->Theta(),pdgCode,charge); | |
1192 | Float_t myEtTPC = Et(0.15/TMath::Sin(part->Theta()),part->Theta(),pdgCode,charge); | |
1193 | FillHisto2D("EtSimulatedChargedHadronAssumingNoPt",part->Pt(),part->Eta(),myEtLow); | |
1194 | FillHisto2D("EtSimulatedChargedHadronAssumingPtTPCCut",part->Pt(),part->Eta(),myEtTPC); | |
1195 | FillHisto2D("EtSimulatedChargedHadronAssumingPtITSCut",part->Pt(),part->Eta(),myEtITS); | |
52503ae7 | 1196 | } |
641e1e0c | 1197 | filled = true; |
1198 | } | |
4b40b2b1 | 1199 | if(pdgCode == fgKPlusCode){ |
641e1e0c | 1200 | float myEt = Et(part); |
4b40b2b1 | 1201 | float myEtPi = Et(part,fgPionMass); |
86d9d0dc | 1202 | float myEtP = Et(part,fgProtonMass); |
49b25059 | 1203 | if(part->Pt()>0.15) fSimPiKPEtShouldBeReco += myEt; |
1204 | if(part->Pt()>0.15) fSimPiKPEtShouldBeRecoK += myEt; | |
d6214a64 | 1205 | fSimHadEt += myEt; |
1206 | fSimTotEt += myEt; | |
f6acf3ad | 1207 | if( !fRunLightweight){ |
1208 | FillHisto2D("EtSimulatedKPlus",part->Pt(),part->Eta(),myEt); | |
1209 | FillHisto2D("EtNSimulatedKPlus",part->Pt(),part->Eta(),1.0); | |
1210 | FillHisto2D("EtSimulatedChargedHadron",part->Pt(),part->Eta(),myEt); | |
1211 | FillHisto2D("EtNSimulatedChargedHadron",part->Pt(),part->Eta(),1.0); | |
1212 | if(fCentBin>=0){//if a centrality bin was defined | |
1213 | FillHisto2D(Form("EtNSimulatedKPlusCB%i",fCentBin),part->Pt(),part->Eta(),1.0); | |
1214 | FillHisto2D(Form("EtNSimulatedChargedHadronCB%i",fCentBin),part->Pt(),part->Eta(),1.0); | |
1215 | } | |
1216 | FillHisto2D("EtSimulatedChargedHadronAssumingPion",part->Pt(),part->Eta(),myEtPi); | |
1217 | FillHisto2D("EtSimulatedKPlusAssumingPion",part->Pt(),part->Eta(),myEtPi); | |
1218 | FillHisto2D("EtSimulatedChargedHadronAssumingProton",part->Pt(),part->Eta(),myEtP); | |
1219 | FillHisto2D("EtSimulatedKPlusAssumingProton",part->Pt(),part->Eta(),myEtP); | |
1220 | FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt); | |
1221 | Short_t charge = 1; | |
1222 | Float_t myEtLow = Et(0.0,part->Theta(),pdgCode,charge); | |
1223 | Float_t myEtITS = Et(0.10/TMath::Sin(part->Theta()),part->Theta(),pdgCode,charge); | |
1224 | Float_t myEtTPC = Et(0.15/TMath::Sin(part->Theta()),part->Theta(),pdgCode,charge); | |
1225 | FillHisto2D("EtSimulatedChargedHadronAssumingNoPt",part->Pt(),part->Eta(),myEtLow); | |
1226 | FillHisto2D("EtSimulatedChargedHadronAssumingPtTPCCut",part->Pt(),part->Eta(),myEtTPC); | |
1227 | FillHisto2D("EtSimulatedChargedHadronAssumingPtITSCut",part->Pt(),part->Eta(),myEtITS); | |
52503ae7 | 1228 | } |
641e1e0c | 1229 | filled = true; |
1230 | } | |
4b40b2b1 | 1231 | if(pdgCode == fgKMinusCode){ |
641e1e0c | 1232 | float myEt = Et(part); |
4b40b2b1 | 1233 | float myEtPi = Et(part,fgPionMass); |
86d9d0dc | 1234 | float myEtP = Et(part,fgProtonMass); |
49b25059 | 1235 | if(part->Pt()>0.15) fSimPiKPEtShouldBeReco += myEt; |
1236 | if(part->Pt()>0.15) fSimPiKPEtShouldBeRecoK += myEt; | |
d6214a64 | 1237 | fSimHadEt += myEt; |
1238 | fSimTotEt += myEt; | |
f6acf3ad | 1239 | if( !fRunLightweight){ |
1240 | FillHisto2D("EtSimulatedKMinus",part->Pt(),part->Eta(),myEt); | |
1241 | FillHisto2D("EtNSimulatedKMinus",part->Pt(),part->Eta(),1.0); | |
1242 | FillHisto2D("EtSimulatedChargedHadron",part->Pt(),part->Eta(),myEt); | |
1243 | FillHisto2D("EtNSimulatedChargedHadron",part->Pt(),part->Eta(),1.0); | |
1244 | if(fCentBin>=0){//if a centrality bin was defined | |
1245 | FillHisto2D(Form("EtNSimulatedKMinusCB%i",fCentBin),part->Pt(),part->Eta(),1.0); | |
1246 | FillHisto2D(Form("EtNSimulatedChargedHadronCB%i",fCentBin),part->Pt(),part->Eta(),1.0); | |
1247 | } | |
1248 | FillHisto2D("EtSimulatedChargedHadronAssumingPion",part->Pt(),part->Eta(),myEtPi); | |
1249 | FillHisto2D("EtSimulatedKMinusAssumingPion",part->Pt(),part->Eta(),myEtPi); | |
1250 | FillHisto2D("EtSimulatedChargedHadronAssumingProton",part->Pt(),part->Eta(),myEtP); | |
1251 | FillHisto2D("EtSimulatedKMinusAssumingProton",part->Pt(),part->Eta(),myEtP); | |
1252 | FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt); | |
1253 | Short_t charge = -1; | |
1254 | Float_t myEtLow = Et(0.0,part->Theta(),pdgCode,charge); | |
1255 | Float_t myEtITS = Et(0.10/TMath::Sin(part->Theta()),part->Theta(),pdgCode,charge); | |
1256 | Float_t myEtTPC = Et(0.15/TMath::Sin(part->Theta()),part->Theta(),pdgCode,charge); | |
1257 | FillHisto2D("EtSimulatedChargedHadronAssumingNoPt",part->Pt(),part->Eta(),myEtLow); | |
1258 | FillHisto2D("EtSimulatedChargedHadronAssumingPtTPCCut",part->Pt(),part->Eta(),myEtTPC); | |
1259 | FillHisto2D("EtSimulatedChargedHadronAssumingPtITSCut",part->Pt(),part->Eta(),myEtITS); | |
52503ae7 | 1260 | } |
641e1e0c | 1261 | filled = true; |
1262 | } | |
4b40b2b1 | 1263 | if(pdgCode == fgProtonCode){ |
641e1e0c | 1264 | float myEt = Et(part); |
4b40b2b1 | 1265 | float myEtPi = Et(part,fgPionMass); |
86d9d0dc | 1266 | float myEtK = Et(part,fgKaonMass); |
49b25059 | 1267 | if(part->Pt()>0.15) fSimPiKPEtShouldBeReco += myEt; |
1268 | if(part->Pt()>0.15) fSimPiKPEtShouldBeRecoP += myEt; | |
d6214a64 | 1269 | fSimHadEt += myEt; |
1270 | fSimTotEt += myEt; | |
f6acf3ad | 1271 | if( !fRunLightweight){ |
1272 | FillHisto2D("EtSimulatedProton",part->Pt(),part->Eta(),myEt); | |
1273 | FillHisto2D("EtNSimulatedProton",part->Pt(),part->Eta(),1.0); | |
1274 | FillHisto2D("EtSimulatedChargedHadron",part->Pt(),part->Eta(),myEt); | |
1275 | FillHisto2D("EtNSimulatedChargedHadron",part->Pt(),part->Eta(),1.0); | |
1276 | if(fCentBin>=0){//if a centrality bin was defined | |
1277 | FillHisto2D(Form("EtNSimulatedProtonCB%i",fCentBin),part->Pt(),part->Eta(),1.0); | |
1278 | FillHisto2D(Form("EtNSimulatedChargedHadronCB%i",fCentBin),part->Pt(),part->Eta(),1.0); | |
1279 | } | |
1280 | FillHisto2D("EtSimulatedChargedHadronAssumingPion",part->Pt(),part->Eta(),myEtPi); | |
1281 | FillHisto2D("EtSimulatedProtonAssumingPion",part->Pt(),part->Eta(),myEtPi); | |
1282 | FillHisto2D("EtSimulatedChargedHadronAssumingKaon",part->Pt(),part->Eta(),myEtK); | |
1283 | FillHisto2D("EtSimulatedProtonAssumingKaon",part->Pt(),part->Eta(),myEtK); | |
1284 | FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt); | |
1285 | Short_t charge = 1; | |
1286 | Float_t myEtLow = Et(0.0,part->Theta(),pdgCode,charge); | |
1287 | Float_t myEtITS = Et(0.10/TMath::Sin(part->Theta()),part->Theta(),pdgCode,charge); | |
1288 | Float_t myEtTPC = Et(0.15/TMath::Sin(part->Theta()),part->Theta(),pdgCode,charge); | |
1289 | FillHisto2D("EtSimulatedChargedHadronAssumingNoPt",part->Pt(),part->Eta(),myEtLow); | |
1290 | FillHisto2D("EtSimulatedChargedHadronAssumingPtTPCCut",part->Pt(),part->Eta(),myEtTPC); | |
1291 | FillHisto2D("EtSimulatedChargedHadronAssumingPtITSCut",part->Pt(),part->Eta(),myEtITS); | |
52503ae7 | 1292 | } |
641e1e0c | 1293 | filled = true; |
f6acf3ad | 1294 | if( !fRunLightweight){ |
1295 | if(fBaryonEnhancement){ | |
1296 | float enhancement = ProtonBaryonEnhancement(part->Pt()); | |
1297 | FillHisto2D("EtSimulatedProtonEnhanced",part->Pt(),part->Eta(),myEt*enhancement); | |
1298 | FillHisto2D("EtNSimulatedProtonEnhanced",part->Pt(),part->Eta(),1.0*enhancement); | |
1299 | FillHisto2D("EtSimulatedProtonAssumingPionEnhanced",part->Pt(),part->Eta(),myEtPi*enhancement); | |
1300 | } | |
f43fc416 | 1301 | } |
641e1e0c | 1302 | } |
4b40b2b1 | 1303 | if(pdgCode == fgAntiProtonCode){ |
641e1e0c | 1304 | float myEt = Et(part); |
4b40b2b1 | 1305 | float myEtPi = Et(part,fgPionMass); |
86d9d0dc | 1306 | float myEtK = Et(part,fgKaonMass); |
49b25059 | 1307 | if(part->Pt()>0.15) fSimPiKPEtShouldBeReco += myEt; |
1308 | if(part->Pt()>0.15) fSimPiKPEtShouldBeRecoP += myEt; | |
d6214a64 | 1309 | fSimHadEt += myEt; |
1310 | fSimTotEt += myEt; | |
f6acf3ad | 1311 | if( !fRunLightweight){ |
1312 | FillHisto2D("EtSimulatedAntiProton",part->Pt(),part->Eta(),myEt); | |
1313 | FillHisto2D("EtNSimulatedAntiProton",part->Pt(),part->Eta(),1.0); | |
1314 | FillHisto2D("EtSimulatedChargedHadron",part->Pt(),part->Eta(),myEt); | |
1315 | FillHisto2D("EtNSimulatedChargedHadron",part->Pt(),part->Eta(),1.0); | |
1316 | if(fCentBin>=0){//if a centrality bin was defined | |
1317 | FillHisto2D(Form("EtNSimulatedAntiProtonCB%i",fCentBin),part->Pt(),part->Eta(),1.0); | |
1318 | FillHisto2D(Form("EtNSimulatedChargedHadronCB%i",fCentBin),part->Pt(),part->Eta(),1.0); | |
1319 | } | |
1320 | FillHisto2D("EtSimulatedChargedHadronAssumingPion",part->Pt(),part->Eta(),myEtPi); | |
1321 | FillHisto2D("EtSimulatedAntiProtonAssumingPion",part->Pt(),part->Eta(),myEtPi); | |
1322 | FillHisto2D("EtSimulatedChargedHadronAssumingKaon",part->Pt(),part->Eta(),myEtK); | |
1323 | FillHisto2D("EtSimulatedAntiProtonAssumingKaon",part->Pt(),part->Eta(),myEtK); | |
1324 | FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt); | |
1325 | Short_t charge = -1; | |
1326 | Float_t myEtLow = Et(0.0,part->Theta(),pdgCode,charge); | |
1327 | Float_t myEtITS = Et(0.10/TMath::Sin(part->Theta()),part->Theta(),pdgCode,charge); | |
1328 | Float_t myEtTPC = Et(0.15/TMath::Sin(part->Theta()),part->Theta(),pdgCode,charge); | |
1329 | FillHisto2D("EtSimulatedChargedHadronAssumingNoPt",part->Pt(),part->Eta(),myEtLow); | |
1330 | FillHisto2D("EtSimulatedChargedHadronAssumingPtTPCCut",part->Pt(),part->Eta(),myEtTPC); | |
1331 | FillHisto2D("EtSimulatedChargedHadronAssumingPtITSCut",part->Pt(),part->Eta(),myEtITS); | |
52503ae7 | 1332 | } |
641e1e0c | 1333 | filled = true; |
f6acf3ad | 1334 | if( !fRunLightweight){ |
1335 | if(fBaryonEnhancement){ | |
1336 | float enhancement = ProtonBaryonEnhancement(part->Pt()); | |
1337 | FillHisto2D("EtSimulatedAntiProtonEnhanced",part->Pt(),part->Eta(),myEt*enhancement); | |
1338 | FillHisto2D("EtNSimulatedAntiProtonEnhanced",part->Pt(),part->Eta(),1.0*enhancement); | |
1339 | FillHisto2D("EtSimulatedAntiProtonAssumingPionEnhanced",part->Pt(),part->Eta(),myEtPi*enhancement); | |
1340 | } | |
f43fc416 | 1341 | } |
641e1e0c | 1342 | } |
1343 | //============Other hadrons=================================== | |
1344 | ||
4b40b2b1 | 1345 | if(pdgCode == fgNeutronCode){ |
641e1e0c | 1346 | float myEt = Et(part); |
d6214a64 | 1347 | fSimHadEt += myEt; |
1348 | fSimTotEt += myEt; | |
f6acf3ad | 1349 | if( !fRunLightweight){ |
1350 | FillHisto2D("EtSimulatedNeutron",part->Pt(),part->Eta(),myEt); | |
1351 | FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt); | |
1352 | } | |
641e1e0c | 1353 | filled = true; |
1354 | } | |
4b40b2b1 | 1355 | if(pdgCode == fgAntiNeutronCode){ |
641e1e0c | 1356 | float myEt = Et(part); |
d6214a64 | 1357 | fSimHadEt += myEt; |
1358 | fSimTotEt += myEt; | |
f6acf3ad | 1359 | if( !fRunLightweight){ |
1360 | FillHisto2D("EtSimulatedAntiNeutron",part->Pt(),part->Eta(),myEt); | |
1361 | FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt); | |
1362 | } | |
641e1e0c | 1363 | filled = true; |
1364 | } | |
4b40b2b1 | 1365 | if(pdgCode == fgLambdaCode){ |
641e1e0c | 1366 | float myEt = Et(part); |
d6214a64 | 1367 | fSimHadEt += myEt; |
1368 | fSimTotEt += myEt; | |
f6acf3ad | 1369 | if( !fRunLightweight){ |
1370 | FillHisto2D("EtSimulatedLambda",part->Pt(),part->Eta(),myEt); | |
1371 | FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt); | |
1372 | Float_t weight = LambdaWeight(part->Pt()); | |
1373 | if(fBaryonEnhancement){ | |
1374 | float enhancement = ProtonBaryonEnhancement(part->Pt()); | |
1375 | weight = weight*enhancement; | |
1376 | } | |
1377 | FillHisto2D("EtSimulatedLambdaReweighted",part->Pt(),part->Eta(),myEt*weight); | |
1378 | Int_t ndaughters = part->GetNDaughters(); | |
1379 | for(Int_t idaughter = 0;idaughter<ndaughters;idaughter++){ | |
1380 | Int_t daughterindex = part->GetDaughter(idaughter); | |
1381 | if(daughterindex<0 || daughterindex>1e5) continue; | |
1382 | TParticle *daughter = stack->ParticleFromTreeK(daughterindex); | |
1383 | if(daughter){ | |
1384 | if(daughter->GetPDG(0)){ | |
1385 | Int_t daughtercode = daughter->GetPDG(0)->PdgCode(); | |
1386 | if(daughtercode==fgPiMinusCode || daughtercode==fgProtonCode){ | |
1387 | myEt = Et(daughter); | |
1388 | FillHisto2D("EtSimulatedLambdaDaughters",daughter->Pt(),daughter->Eta(),myEt); | |
1389 | FillHisto2D("EtSimulatedLambdaDaughtersReweighted",daughter->Pt(),daughter->Eta(),myEt*weight); | |
1390 | } | |
1391 | } | |
1392 | else{ | |
641e1e0c | 1393 | } |
641e1e0c | 1394 | } |
1395 | } | |
1396 | } | |
1397 | filled = true; | |
1398 | } | |
4b40b2b1 | 1399 | if(pdgCode == fgAntiLambdaCode){ |
641e1e0c | 1400 | float myEt = Et(part); |
d6214a64 | 1401 | fSimHadEt += myEt; |
1402 | fSimTotEt += myEt; | |
f6acf3ad | 1403 | if( !fRunLightweight){ |
1404 | FillHisto2D("EtSimulatedAntiLambda",part->Pt(),part->Eta(),myEt); | |
1405 | FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt); | |
1406 | Float_t weight = AntiLambdaWeight(part->Pt()); | |
1407 | if(fBaryonEnhancement){ | |
1408 | float enhancement = ProtonBaryonEnhancement(part->Pt()); | |
1409 | weight = weight*enhancement; | |
1410 | } | |
1411 | FillHisto2D("EtSimulatedAntiLambdaReweighted",part->Pt(),part->Eta(),myEt*weight); | |
1412 | Int_t ndaughters = part->GetNDaughters(); | |
1413 | for(Int_t idaughter = 0;idaughter<ndaughters;idaughter++){ | |
1414 | Int_t daughterindex = part->GetDaughter(idaughter); | |
1415 | if(daughterindex<0 || daughterindex>1e5) continue; | |
1416 | TParticle *daughter = stack->ParticleFromTreeK(daughterindex); | |
1417 | if(daughter){ | |
1418 | if(daughter->GetPDG(0)){ | |
1419 | Int_t daughtercode = daughter->GetPDG(0)->PdgCode(); | |
1420 | if(daughtercode==fgPiPlusCode || daughtercode==fgAntiProtonCode){ | |
1421 | myEt = Et(daughter); | |
1422 | FillHisto2D("EtSimulatedAntiLambdaDaughters",daughter->Pt(),daughter->Eta(),myEt); | |
1423 | FillHisto2D("EtSimulatedAntiLambdaDaughtersReweighted",daughter->Pt(),daughter->Eta(),myEt*weight); | |
1424 | } | |
641e1e0c | 1425 | } |
1426 | } | |
641e1e0c | 1427 | } |
1428 | } | |
1429 | filled = true; | |
1430 | } | |
4b40b2b1 | 1431 | if(pdgCode == fgK0SCode){ |
641e1e0c | 1432 | float myEt = Et(part); |
d6214a64 | 1433 | fSimHadEt += myEt; |
1434 | fSimTotEt += myEt; | |
f6acf3ad | 1435 | if( !fRunLightweight){ |
1436 | FillHisto2D("EtSimulatedK0S",part->Pt(),part->Eta(),myEt); | |
1437 | FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt); | |
1438 | Float_t weight = K0Weight(part->Pt()); | |
1439 | FillHisto2D("EtSimulatedK0SReweighted",part->Pt(),part->Eta(),myEt*weight); | |
1440 | Int_t ndaughters = part->GetNDaughters(); | |
1441 | for(Int_t idaughter = 0;idaughter<ndaughters;idaughter++){ | |
1442 | Int_t daughterindex = part->GetDaughter(idaughter); | |
1443 | if(daughterindex<0 || daughterindex>1e5) continue; | |
1444 | TParticle *daughter = stack->ParticleFromTreeK(daughterindex); | |
1445 | if(daughter){ | |
1446 | if(daughter->GetPDG(0)){ | |
1447 | ||
1448 | Int_t daughtercode = daughter->GetPDG(0)->PdgCode(); | |
1449 | if(daughtercode==fgPiMinusCode || daughtercode==fgPiPlusCode){ | |
1450 | myEt = Et(daughter); | |
1451 | FillHisto2D("EtSimulatedK0SDaughters",daughter->Pt(),daughter->Eta(),myEt); | |
1452 | FillHisto2D("EtSimulatedK0SDaughtersReweighted",daughter->Pt(),daughter->Eta(),myEt*weight); | |
1453 | } | |
641e1e0c | 1454 | } |
1455 | } | |
641e1e0c | 1456 | } |
1457 | } | |
1458 | filled = true; | |
1459 | } | |
4b40b2b1 | 1460 | if(pdgCode == fgK0LCode){ |
641e1e0c | 1461 | float myEt = Et(part); |
d6214a64 | 1462 | fSimHadEt += myEt; |
1463 | fSimTotEt += myEt; | |
f6acf3ad | 1464 | if( !fRunLightweight){ |
1465 | FillHisto2D("EtSimulatedK0L",part->Pt(),part->Eta(),myEt); | |
1466 | FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt); | |
1467 | Float_t weight = K0Weight(part->Pt()); | |
1468 | FillHisto2D("EtSimulatedK0LReweighted",part->Pt(),part->Eta(),myEt*weight); | |
1469 | } | |
641e1e0c | 1470 | filled = true; |
1471 | } | |
4b40b2b1 | 1472 | if(pdgCode == fgOmegaCode){ |
641e1e0c | 1473 | float myEt = Et(part); |
d6214a64 | 1474 | fSimHadEt += myEt; |
1475 | fSimTotEt += myEt; | |
f6acf3ad | 1476 | if( !fRunLightweight){ |
1477 | FillHisto2D("EtSimulatedOmega",part->Pt(),part->Eta(),myEt); | |
1478 | FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt); | |
1479 | Int_t ndaughters = part->GetNDaughters(); | |
1480 | for(Int_t idaughter = 0;idaughter<ndaughters;idaughter++){ | |
1481 | Int_t daughterindex = part->GetDaughter(idaughter); | |
1482 | if(daughterindex<0 || daughterindex>1e5) continue; | |
1483 | TParticle *daughter = stack->Particle(daughterindex); | |
1484 | if(daughter){ | |
1485 | if(daughter->GetPDG(0)){ | |
1486 | ||
1487 | Int_t daughtercode = daughter->GetPDG(0)->PdgCode(); | |
1488 | if(daughtercode==fgPiPlusCode || daughtercode==fgProtonCode || daughtercode==fgKMinusCode){ | |
1489 | myEt = Et(daughter); | |
1490 | FillHisto2D("EtSimulatedOmegaDaughters",daughter->Pt(),daughter->Eta(),myEt); | |
1491 | } | |
641e1e0c | 1492 | } |
1493 | } | |
641e1e0c | 1494 | } |
1495 | } | |
1496 | filled = true; | |
1497 | } | |
4b40b2b1 | 1498 | if(pdgCode == fgAntiOmegaCode){ |
641e1e0c | 1499 | float myEt = Et(part); |
d6214a64 | 1500 | fSimHadEt += myEt; |
1501 | fSimTotEt += myEt; | |
f6acf3ad | 1502 | if( !fRunLightweight){ |
1503 | FillHisto2D("EtSimulatedOmega",part->Pt(),part->Eta(),myEt); | |
1504 | FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt); | |
1505 | Int_t ndaughters = part->GetNDaughters(); | |
1506 | for(Int_t idaughter = 0;idaughter<ndaughters;idaughter++){ | |
1507 | Int_t daughterindex = part->GetDaughter(idaughter); | |
1508 | if(daughterindex<0 || daughterindex>1e5) continue; | |
1509 | TParticle *daughter = stack->ParticleFromTreeK(daughterindex); | |
1510 | if(daughter){ | |
1511 | if(daughter->GetPDG(0)){ | |
1512 | Int_t daughtercode = daughter->GetPDG(0)->PdgCode(); | |
1513 | if(daughtercode==fgPiMinusCode || daughtercode==fgAntiProtonCode || daughtercode==fgKPlusCode){ | |
1514 | myEt = Et(daughter); | |
1515 | FillHisto2D("EtSimulatedAntiOmegaDaughters",daughter->Pt(),daughter->Eta(),myEt); | |
1516 | } | |
641e1e0c | 1517 | } |
1518 | } | |
641e1e0c | 1519 | } |
1520 | } | |
1521 | filled = true; | |
1522 | } | |
1523 | //There are two codes for Sigmas | |
4b40b2b1 | 1524 | if(pdgCode == fgSigmaCode || pdgCode == -3222){ |
641e1e0c | 1525 | float myEt = Et(part); |
d6214a64 | 1526 | fSimHadEt += myEt; |
1527 | fSimTotEt += myEt; | |
f6acf3ad | 1528 | if( !fRunLightweight){ |
1529 | FillHisto2D("EtSimulatedSigma",part->Pt(),part->Eta(),myEt); | |
1530 | FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt); | |
1531 | } | |
641e1e0c | 1532 | filled = true; |
1533 | } | |
4b40b2b1 | 1534 | if(pdgCode == fgAntiSigmaCode || pdgCode == 3222){ |
641e1e0c | 1535 | float myEt = Et(part); |
d6214a64 | 1536 | fSimHadEt += myEt; |
1537 | fSimTotEt += myEt; | |
f6acf3ad | 1538 | if( !fRunLightweight){ |
1539 | FillHisto2D("EtSimulatedAntiSigma",part->Pt(),part->Eta(),myEt); | |
1540 | FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt); | |
1541 | } | |
641e1e0c | 1542 | filled = true; |
1543 | } | |
4b40b2b1 | 1544 | if(pdgCode == fgXiCode){ |
641e1e0c | 1545 | float myEt = Et(part); |
d6214a64 | 1546 | fSimHadEt += myEt; |
1547 | fSimTotEt += myEt; | |
f6acf3ad | 1548 | if( !fRunLightweight){ |
1549 | FillHisto2D("EtSimulatedXi",part->Pt(),part->Eta(),myEt); | |
1550 | FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt); | |
1551 | Int_t ndaughters = part->GetNDaughters(); | |
1552 | for(Int_t idaughter = 0;idaughter<ndaughters;idaughter++){ | |
1553 | Int_t daughterindex = part->GetDaughter(idaughter); | |
1554 | if(daughterindex<0 || daughterindex>1e5 || daughterindex>1e5) continue; | |
1555 | TParticle *daughter = stack->ParticleFromTreeK(daughterindex); | |
1556 | if(daughter){ | |
1557 | if(daughter->GetPDG(0)){ | |
1558 | ||
1559 | Int_t daughtercode = daughter->GetPDG(0)->PdgCode(); | |
1560 | if(daughtercode==fgPiPlusCode || daughtercode==fgProtonCode || daughtercode==fgPiMinusCode){ | |
1561 | myEt = Et(daughter); | |
1562 | FillHisto2D("EtSimulatedXiDaughters",daughter->Pt(),daughter->Eta(),myEt); | |
1563 | } | |
641e1e0c | 1564 | } |
1565 | } | |
641e1e0c | 1566 | } |
1567 | } | |
1568 | filled = true; | |
1569 | } | |
4b40b2b1 | 1570 | if(pdgCode == fgAntiXiCode){ |
641e1e0c | 1571 | float myEt = Et(part); |
d6214a64 | 1572 | fSimHadEt += myEt; |
1573 | fSimTotEt += myEt; | |
f6acf3ad | 1574 | if( !fRunLightweight){ |
1575 | FillHisto2D("EtSimulatedAntiXi",part->Pt(),part->Eta(),myEt); | |
1576 | FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt); | |
1577 | Int_t ndaughters = part->GetNDaughters(); | |
1578 | for(Int_t idaughter = 0;idaughter<ndaughters;idaughter++){ | |
1579 | Int_t daughterindex = part->GetDaughter(idaughter); | |
1580 | if(daughterindex<0 || daughterindex>1e5) continue; | |
1581 | TParticle *daughter = stack->ParticleFromTreeK(daughterindex); | |
1582 | if(daughter){ | |
1583 | if(daughter->GetPDG(0)){ | |
1584 | Int_t daughtercode = daughter->GetPDG(0)->PdgCode(); | |
1585 | if(daughtercode==fgPiPlusCode || daughtercode==fgAntiProtonCode || daughtercode==fgPiMinusCode){ | |
1586 | myEt = Et(daughter); | |
1587 | FillHisto2D("EtSimulatedAntiXiDaughters",daughter->Pt(),daughter->Eta(),myEt); | |
1588 | } | |
641e1e0c | 1589 | } |
1590 | } | |
641e1e0c | 1591 | } |
1592 | } | |
1593 | filled = true; | |
1594 | } | |
4b40b2b1 | 1595 | if(pdgCode == fgXi0Code){ |
641e1e0c | 1596 | float myEt = Et(part); |
d6214a64 | 1597 | fSimHadEt += myEt; |
1598 | fSimTotEt += myEt; | |
f6acf3ad | 1599 | if( !fRunLightweight){ |
1600 | FillHisto2D("EtSimulatedXi0",part->Pt(),part->Eta(),myEt); | |
1601 | FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt); | |
1602 | } | |
641e1e0c | 1603 | filled = true; |
1604 | } | |
4b40b2b1 | 1605 | if(pdgCode == fgAntiXi0Code){ |
641e1e0c | 1606 | float myEt = Et(part); |
d6214a64 | 1607 | fSimHadEt += myEt; |
1608 | fSimTotEt += myEt; | |
f6acf3ad | 1609 | if( !fRunLightweight){ |
1610 | FillHisto2D("EtSimulatedAntiXi0",part->Pt(),part->Eta(),myEt); | |
1611 | FillHisto2D("EtSimulatedAllHadron",part->Pt(),part->Eta(),myEt); | |
1612 | } | |
641e1e0c | 1613 | filled = true; |
1614 | } | |
1615 | //============electrons=================================== | |
1616 | ||
4b40b2b1 | 1617 | if(pdgCode == fgEPlusCode){ |
641e1e0c | 1618 | float myEt = Et(part); |
d6214a64 | 1619 | fSimTotEt += myEt; |
f6acf3ad | 1620 | if( !fRunLightweight){ |
1621 | FillHisto2D("EtSimulatedEPlus",part->Pt(),part->Eta(),myEt); | |
1622 | } | |
641e1e0c | 1623 | filled = true; |
1624 | } | |
4b40b2b1 | 1625 | if(pdgCode == fgEMinusCode){ |
641e1e0c | 1626 | float myEt = Et(part); |
d6214a64 | 1627 | fSimTotEt += myEt; |
f6acf3ad | 1628 | if( !fRunLightweight){ |
1629 | FillHisto2D("EtSimulatedEMinus",part->Pt(),part->Eta(),myEt); | |
1630 | } | |
641e1e0c | 1631 | filled = true; |
1632 | } | |
f427cbed | 1633 | //============neutrals=================================== |
4b40b2b1 | 1634 | if(pdgCode == fgGammaCode){ |
61e3f555 | 1635 | TParticle *mom = NULL; |
1636 | Int_t pdgCodeMom = -99999999; | |
1637 | float momEta = -30; | |
1638 | float mompT = -5; | |
d7605578 | 1639 | if(part->GetFirstMother()>=0){ |
61e3f555 | 1640 | mom = stack->Particle(part->GetFirstMother()); |
ccd12409 | 1641 | if(mom->GetPDG(0)){ |
1642 | pdgCodeMom = mom->GetPDG(0)->PdgCode(); | |
1643 | momEta = mom->Eta(); | |
1644 | mompT = mom->Pt(); | |
1645 | } | |
61e3f555 | 1646 | } |
4e0c0fe1 | 1647 | //We want to separate the gammas by pi0, eta, omega0 but we don't want to double count energy so we get the et from the gamma daughter |
4b40b2b1 | 1648 | if(pdgCodeMom == fgEtaCode){ |
4e0c0fe1 | 1649 | float myEt = Et(part); |
1650 | fSimTotEt += myEt; | |
f6acf3ad | 1651 | if( !fRunLightweight){ |
1652 | FillHisto2D("EtSimulatedEta",mompT,momEta,myEt); | |
1653 | } | |
b64de20c | 1654 | filled = true; |
1655 | } | |
4b40b2b1 | 1656 | if(pdgCodeMom == fgPi0Code){ |
4e0c0fe1 | 1657 | float myEt = Et(part); |
1658 | fSimTotEt += myEt; | |
f6acf3ad | 1659 | if( !fRunLightweight){ |
1660 | FillHisto2D("EtSimulatedPi0",mompT,momEta,myEt); | |
1661 | } | |
b64de20c | 1662 | filled = true; |
1663 | } | |
4b40b2b1 | 1664 | if(pdgCodeMom == fgOmega0Code){ |
4e0c0fe1 | 1665 | float myEt = Et(part); |
1666 | fSimTotEt += myEt; | |
f6acf3ad | 1667 | if( !fRunLightweight){ |
1668 | FillHisto2D("EtSimulatedOmega0",mompT,momEta,myEt); | |
1669 | } | |
b64de20c | 1670 | filled = true; |
1671 | } | |
1672 | if(!filled){ | |
1673 | float myEt = Et(part); | |
4e0c0fe1 | 1674 | fSimTotEt += myEt; |
f6acf3ad | 1675 | if( !fRunLightweight){ |
1676 | FillHisto2D("EtSimulatedGamma",part->Pt(),part->Eta(),myEt); | |
1677 | } | |
b64de20c | 1678 | filled = true; |
1679 | } | |
f427cbed | 1680 | } |
4b40b2b1 | 1681 | if(pdgCode == fgEtaCode){ |
f427cbed | 1682 | float myEt = Et(part); |
d6214a64 | 1683 | fSimTotEt += myEt; |
f6acf3ad | 1684 | if( !fRunLightweight){ |
1685 | FillHisto2D("EtSimulatedEta",part->Pt(),part->Eta(),myEt); | |
1686 | } | |
f427cbed | 1687 | filled = true; |
1688 | } | |
4b40b2b1 | 1689 | if(pdgCode == fgPi0Code){ |
f427cbed | 1690 | float myEt = Et(part); |
d6214a64 | 1691 | fSimTotEt += myEt; |
f6acf3ad | 1692 | if( !fRunLightweight){ |
1693 | FillHisto2D("EtSimulatedPi0",part->Pt(),part->Eta(),myEt); | |
1694 | } | |
f427cbed | 1695 | filled = true; |
1696 | } | |
4b40b2b1 | 1697 | if(pdgCode == fgOmega0Code){ |
b64de20c | 1698 | float myEt = Et(part); |
d6214a64 | 1699 | fSimTotEt += myEt; |
f6acf3ad | 1700 | if( !fRunLightweight){ |
1701 | FillHisto2D("EtSimulatedOmega0",part->Pt(),part->Eta(),myEt); | |
1702 | } | |
b64de20c | 1703 | filled = true; |
1704 | } | |
641e1e0c | 1705 | } |
1706 | } | |
1707 | } | |
1708 | ||
f6acf3ad | 1709 | FillHisto1D("SimTotEt",fSimTotEt,1.0); |
1710 | FillHisto1D("SimHadEt",fSimHadEt,1.0); | |
1711 | FillHisto1D("SimPiKPEt",fSimPiKPEt,1.0); | |
1826590b | 1712 | FillHisto1D("SimRawEtTPC",fSimRawEtTPC,1.0); |
1713 | FillHisto1D("SimRawEtITS",fSimRawEtITS,1.0); | |
55d73438 | 1714 | if(fDataSet!=20100 && AliPWG0Helper::GetEventProcessType(mcEvent->Header()) == AliPWG0Helper::kND){ |
2c0680a5 | 1715 | FillHisto1D("SimHadEtND",fSimHadEt,1.0); |
9b792c30 | 1716 | FillHisto1D("SimTotEtND",fSimTotEt,1.0); |
2c0680a5 | 1717 | FillHisto1D("NEventsND",0.5,1); |
f6acf3ad | 1718 | FillHisto1D("SimPiKPEtND",fSimPiKPEt,1.0); |
1826590b | 1719 | FillHisto1D("SimRawEtNDTPC",fSimRawEtTPC,1.0); |
1720 | FillHisto1D("SimRawEtNDITS",fSimRawEtITS,1.0); | |
d35312c9 | 1721 | if(kIsOfflineV0AND){ |
1722 | FillHisto1D("SimHadEtNDV0AND",fSimHadEt,1.0); | |
9b792c30 | 1723 | FillHisto1D("SimTotEtNDV0AND",fSimTotEt,1.0); |
d35312c9 | 1724 | FillHisto1D("NEventsNDV0AND",0.5,1); |
1725 | FillHisto1D("SimPiKPEtNDV0AND",fSimPiKPEt,1.0); | |
1826590b | 1726 | FillHisto1D("SimRawEtNDV0ANDTPC",fSimRawEtTPC,1.0); |
1727 | FillHisto1D("SimRawEtNDV0ANDITS",fSimRawEtITS,1.0); | |
d35312c9 | 1728 | } |
ba222433 | 1729 | if(kIsOfflineMB){ |
1730 | FillHisto1D("SimHadEtNDMB",fSimHadEt,1.0); | |
9b792c30 | 1731 | FillHisto1D("SimTotEtNDMB",fSimTotEt,1.0); |
ba222433 | 1732 | FillHisto1D("NEventsNDMB",0.5,1); |
1733 | FillHisto1D("SimPiKPEtNDMB",fSimPiKPEt,1.0); | |
1826590b | 1734 | FillHisto1D("SimRawEtNDMBTPC",fSimRawEtTPC,1.0); |
1735 | FillHisto1D("SimRawEtNDMBITS",fSimRawEtITS,1.0); | |
ba222433 | 1736 | } |
2c0680a5 | 1737 | } |
55d73438 | 1738 | if(fDataSet!=20100 && AliPWG0Helper::GetEventProcessType(mcEvent->Header()) == AliPWG0Helper::kSD){ |
2c0680a5 | 1739 | FillHisto1D("SimHadEtSD",fSimHadEt,1.0); |
9b792c30 | 1740 | FillHisto1D("SimTotEtSD",fSimTotEt,1.0); |
2c0680a5 | 1741 | FillHisto1D("NEventsSD",0.5,1); |
f6acf3ad | 1742 | FillHisto1D("SimPiKPEtSD",fSimPiKPEt,1.0); |
1826590b | 1743 | FillHisto1D("SimRawEtSDTPC",fSimRawEtTPC,1.0); |
1744 | FillHisto1D("SimRawEtSDITS",fSimRawEtITS,1.0); | |
d35312c9 | 1745 | if(kIsOfflineV0AND){ |
1746 | FillHisto1D("SimHadEtSDV0AND",fSimHadEt,1.0); | |
9b792c30 | 1747 | FillHisto1D("SimTotEtSDV0AND",fSimTotEt,1.0); |
d35312c9 | 1748 | FillHisto1D("NEventsSDV0AND",0.5,1); |
1749 | FillHisto1D("SimPiKPEtSDV0AND",fSimPiKPEt,1.0); | |
1826590b | 1750 | FillHisto1D("SimRawEtSDV0ANDTPC",fSimRawEtTPC,1.0); |
1751 | FillHisto1D("SimRawEtSDV0ANDITS",fSimRawEtITS,1.0); | |
d35312c9 | 1752 | } |
ba222433 | 1753 | if(kIsOfflineMB){ |
1754 | FillHisto1D("SimHadEtSDMB",fSimHadEt,1.0); | |
9b792c30 | 1755 | FillHisto1D("SimTotEtSDMB",fSimTotEt,1.0); |
ba222433 | 1756 | FillHisto1D("NEventsSDMB",0.5,1); |
1757 | FillHisto1D("SimPiKPEtSDMB",fSimPiKPEt,1.0); | |
1826590b | 1758 | FillHisto1D("SimRawEtSDMBTPC",fSimRawEtTPC,1.0); |
1759 | FillHisto1D("SimRawEtSDMBITS",fSimRawEtITS,1.0); | |
ba222433 | 1760 | } |
2c0680a5 | 1761 | } |
55d73438 | 1762 | if(fDataSet!=20100 && AliPWG0Helper::GetEventProcessType(mcEvent->Header()) == AliPWG0Helper::kDD){ |
2c0680a5 | 1763 | FillHisto1D("SimHadEtDD",fSimHadEt,1.0); |
9b792c30 | 1764 | FillHisto1D("SimTotEtDD",fSimTotEt,1.0); |
2c0680a5 | 1765 | FillHisto1D("NEventsDD",0.5,1); |
d35312c9 | 1766 | FillHisto1D("SimPiKPEtDD",fSimPiKPEt,1.0); |
1826590b | 1767 | FillHisto1D("SimRawEtDDTPC",fSimRawEtTPC,1.0); |
d35312c9 | 1768 | if(kIsOfflineV0AND){ |
1769 | FillHisto1D("SimHadEtDDV0AND",fSimHadEt,1.0); | |
9b792c30 | 1770 | FillHisto1D("SimTotEtDDV0AND",fSimTotEt,1.0); |
d35312c9 | 1771 | FillHisto1D("NEventsDDV0AND",0.5,1); |
1772 | FillHisto1D("SimPiKPEtDDV0AND",fSimPiKPEt,1.0); | |
1826590b | 1773 | FillHisto1D("SimRawEtDDV0ANDTPC",fSimRawEtTPC,1.0); |
1774 | FillHisto1D("SimRawEtDDV0ANDITS",fSimRawEtITS,1.0); | |
d35312c9 | 1775 | } |
ba222433 | 1776 | if(kIsOfflineMB){ |
1777 | FillHisto1D("SimHadEtDDMB",fSimHadEt,1.0); | |
9b792c30 | 1778 | FillHisto1D("SimTotEtDDMB",fSimTotEt,1.0); |
ba222433 | 1779 | FillHisto1D("NEventsDDMB",0.5,1); |
1780 | FillHisto1D("SimPiKPEtDDMB",fSimPiKPEt,1.0); | |
1826590b | 1781 | FillHisto1D("SimRawEtDDMBTPC",fSimRawEtTPC,1.0); |
1782 | FillHisto1D("SimRawEtDDMBITS",fSimRawEtITS,1.0); | |
ba222433 | 1783 | } |
2c0680a5 | 1784 | } |
02710991 | 1785 | if(fCentBin != -1){//if we have Pb+Pb and a centrality bin was found |
1786 | if(fSimTotEt>0.0) FillHisto1D(Form("SimTotEtCB%i",fCentBin),fSimTotEt,1.0); | |
1787 | if(fSimHadEt>0.0) FillHisto1D(Form("SimHadEtCB%i",fCentBin),fSimHadEt,1.0); | |
1788 | if(fSimPiKPEt>0.0)FillHisto1D(Form("SimPiKPEtCB%i",fCentBin),fSimPiKPEt,1.0); | |
1789 | } | |
0e866ddc | 1790 | |
f6acf3ad | 1791 | if(fInvestigateSmearing && !fRunLightweight){ |
7d2d1773 | 1792 | //Smearing histograms |
1793 | if(fSimPiKPEt>0.0) FillHisto2D("SimPiKPEtMinusSimPtSmeared",fSimPiKPEt,(fSimPiKPEt-fSimPiKPEtPtSmeared)/fSimPiKPEt,1.0); | |
1794 | FillHisto1D("SimPiKPEtPtSmeared",fSimPiKPEtPtSmeared,1.0); | |
1795 | if(fSimPiKPEt>0.0) FillHisto2D("SimPiKPEtMinusSimEfficiencySmeared",fSimPiKPEt,(fSimPiKPEt-fSimPiKPEtEfficiencySmeared)/fSimPiKPEt,1.0); | |
1796 | FillHisto1D("SimPiKPEtEfficiencySmeared",fSimPiKPEtEfficiencySmeared,1.0); | |
1797 | if(fSimPiKPEt>0.0) FillHisto2D("SimPiKPEtMinusSimPtCutSmearedTPC",fSimPiKPEt,(fSimPiKPEt-fSimPiKPEtPtCutSmearedTPC)/fSimPiKPEt,1.0); | |
1798 | FillHisto1D("SimPiKPEtPtCutSmearedTPC",fSimPiKPEtPtCutSmearedTPC,1.0); | |
1799 | if(fSimPiKPEt>0.0) FillHisto2D("SimPiKPEtMinusSimPtCutSmearedITS",fSimPiKPEt,(fSimPiKPEt-fSimPiKPEtPtCutSmearedITS)/fSimPiKPEt,1.0); | |
1800 | FillHisto1D("SimPiKPEtPtCutSmearedITS",fSimPiKPEtPtCutSmearedTPC,1.0); | |
1801 | if(fSimPiKPEt>0.0) FillHisto2D("SimPiKPEtMinusSimPIDSmeared",fSimPiKPEt,(fSimPiKPEt-fSimPiKPEtPIDSmeared)/fSimPiKPEt,1.0); | |
1802 | FillHisto1D("SimPiKPEtPIDSmeared",fSimPiKPEtPIDSmeared,1.0); | |
1803 | if(fSimPiKPEt>0.0) FillHisto2D("SimPiKPEtMinusSimPIDSmearedNoID",fSimPiKPEt,(fSimPiKPEt-fSimPiKPEtPIDSmearedNoID)/fSimPiKPEt,1.0); | |
1804 | FillHisto1D("SimPiKPEtPIDSmearedNoID",fSimPiKPEtPIDSmearedNoID,1.0); | |
1805 | } | |
641e1e0c | 1806 | return 1; |
1807 | ||
1808 | } | |
1809 | ||
1810 | void AliAnalysisHadEtMonteCarlo::Init() | |
cf6522d1 | 1811 | { // Init |
641e1e0c | 1812 | AliAnalysisHadEt::Init(); |
0e866ddc | 1813 | if(!fPtSmearer) fPtSmearer = new TRandom(); |
641e1e0c | 1814 | } |
1815 | void AliAnalysisHadEtMonteCarlo::CreateHistograms(){ | |
1816 | //for simulated Et only (no reconstruction) | |
9a365626 | 1817 | |
1818 | AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager(); | |
beb92504 | 1819 | if (!man) { |
1820 | AliFatal("Analysis manager needed"); | |
1821 | return; | |
1822 | } | |
9a365626 | 1823 | AliInputEventHandler *inputHandler=dynamic_cast<AliInputEventHandler*>(man->GetInputEventHandler()); |
beb92504 | 1824 | if (!inputHandler) { |
1825 | AliFatal("Input handler needed"); | |
1826 | return; | |
1827 | } | |
1828 | ||
9a365626 | 1829 | //pid response object |
1830 | fPIDResponse=inputHandler->GetPIDResponse(); | |
1831 | if (!fPIDResponse) AliError("PIDResponse object was not created"); | |
1832 | ||
f6acf3ad | 1833 | if( !fRunLightweight){ |
1834 | CreateEtaPtHisto2D(TString("EtSimulatedPiPlus"),TString("Simulated E_{T} from #pi^{+}")); | |
1835 | CreateEtaPtHisto2D("EtSimulatedPiMinus","Simulated E_{T} from #pi^{-}"); | |
1836 | CreateEtaPtHisto2D("EtSimulatedKPlus","Simulated E_{T} from K^{+}"); | |
1837 | CreateEtaPtHisto2D("EtSimulatedKMinus","Simulated E_{T} from K^{-}"); | |
1838 | CreateEtaPtHisto2D("EtSimulatedProton","Simulated E_{T} from p"); | |
1839 | CreateEtaPtHisto2D("EtSimulatedAntiProton","Simulated E_{T} from #bar{p}");//Both baryon enhancement and strangeness rescaling | |
1840 | if(fBaryonEnhancement){ | |
1841 | CreateEtaPtHisto2D("EtSimulatedProtonEnhanced","Simulated E_{T} from p"); | |
1842 | CreateEtaPtHisto2D("EtSimulatedAntiProtonEnhanced","Simulated E_{T} from #bar{p}"); | |
1843 | } | |
1844 | CreateEtaPtHisto2D("EtSimulatedChargedHadron","Simulated E_{T} from charged hadrons"); | |
1845 | CreateEtaPtHisto2D("EtNSimulatedPiPlus","Number of Simulated #pi^{+}"); | |
1846 | CreateEtaPtHisto2D("EtNSimulatedPiMinus","Number of simulated #pi^{-}"); | |
1847 | CreateEtaPtHisto2D("EtNSimulatedKPlus","Number of simulated K^{+}"); | |
1848 | CreateEtaPtHisto2D("EtNSimulatedKMinus","Number of simulated K^{-}"); | |
1849 | CreateEtaPtHisto2D("EtNSimulatedProton","Number of simulated p"); | |
1850 | CreateEtaPtHisto2D("EtNSimulatedAntiProton","Number of simulated #bar{p}"); | |
1851 | if(fBaryonEnhancement){ | |
1852 | CreateEtaPtHisto2D("EtNSimulatedProtonEnhanced","Number of simulated p"); | |
1853 | CreateEtaPtHisto2D("EtNSimulatedAntiProtonEnhanced","Number of simulated #bar{p}"); | |
1854 | } | |
1855 | CreateEtaPtHisto2D("EtNSimulatedChargedHadron","Number of simulated charged hadrons"); | |
1856 | if(fDataSet==20100){//If this is Pb+Pb | |
1857 | Int_t width = 5; | |
1858 | if(fNCentBins<21) width = 10; | |
1859 | for(Int_t i=0;i<fNCentBins;i++){ | |
1860 | CreateEtaPtHisto2D(Form("EtNSimulatedPiPlusCB%i",i),Form("Number of Simulated #pi^{+} for %i-%i central",i*width,(i+1)*width)); | |
1861 | CreateEtaPtHisto2D(Form("EtNSimulatedPiMinusCB%i",i),Form("Number of simulated #pi^{-} for %i-%i central",i*width,(i+1)*width)); | |
1862 | CreateEtaPtHisto2D(Form("EtNSimulatedKPlusCB%i",i),Form("Number of simulated K^{+} for %i-%i central",i*width,(i+1)*width)); | |
1863 | CreateEtaPtHisto2D(Form("EtNSimulatedKMinusCB%i",i),Form("Number of simulated K^{-} for %i-%i central",i*width,(i+1)*width)); | |
1864 | CreateEtaPtHisto2D(Form("EtNSimulatedProtonCB%i",i),Form("Number of simulated p for %i-%i central",i*width,(i+1)*width)); | |
1865 | CreateEtaPtHisto2D(Form("EtNSimulatedAntiProtonCB%i",i),Form("Number of simulated #bar{p} for %i-%i central",i*width,(i+1)*width)); | |
1866 | CreateEtaPtHisto2D(Form("EtNSimulatedChargedHadronCB%i",i),Form("Number of simulated charged hadrons for %i-%i central",i*width,(i+1)*width)); | |
1867 | } | |
1868 | } | |
1869 | CreateEtaPtHisto2D("EtSimulatedChargedHadronAssumingNoPt","Simulated E_{T} from charged hadrons assuming p_{T}=0"); | |
1870 | CreateEtaPtHisto2D("EtSimulatedChargedHadronAssumingPtTPCCut","Simulated E_{T} from charged hadrons assuming p_{T}=0.15"); | |
1871 | CreateEtaPtHisto2D("EtSimulatedChargedHadronAssumingPtITSCut","Simulated E_{T} from charged hadrons assuming p_{T}=0.10"); | |
1872 | ||
1873 | CreateEtaPtHisto2D("EtSimulatedChargedHadronAssumingPion","Simulated E_{T} from charged hadrons assuming they are all pions"); | |
1874 | CreateEtaPtHisto2D("EtSimulatedChargedHadronAssumingProton","Simulated E_{T} from charged hadrons assuming they are all pions"); | |
1875 | CreateEtaPtHisto2D("EtSimulatedChargedHadronAssumingKaon","Simulated E_{T} from charged hadrons assuming they are all pions"); | |
1876 | CreateEtaPtHisto2D("EtSimulatedKPlusAssumingPion","Simulated E_{T} from K^{+} assuming #pi mass"); | |
1877 | CreateEtaPtHisto2D("EtSimulatedKMinusAssumingPion","Simulated E_{T} from K^{-} assuming #pi mass"); | |
1878 | CreateEtaPtHisto2D("EtSimulatedProtonAssumingPion","Simulated E_{T} from p assuming #pi mass"); | |
1879 | CreateEtaPtHisto2D("EtSimulatedAntiProtonAssumingPion","Simulated E_{T} from #bar{p} assuming #pi mass"); | |
1880 | CreateEtaPtHisto2D("EtSimulatedKPlusAssumingProton","Simulated E_{T} from K^{+} assuming #pi mass"); | |
1881 | CreateEtaPtHisto2D("EtSimulatedKMinusAssumingProton","Simulated E_{T} from K^{-} assuming #pi mass"); | |
1882 | CreateEtaPtHisto2D("EtSimulatedPiPlusAssumingProton","Simulated E_{T} from p assuming #pi mass"); | |
1883 | CreateEtaPtHisto2D("EtSimulatedPiMinusAssumingProton","Simulated E_{T} from #bar{p} assuming #pi mass"); | |
1884 | CreateEtaPtHisto2D("EtSimulatedPiPlusAssumingKaon","Simulated E_{T} from K^{+} assuming #pi mass"); | |
1885 | CreateEtaPtHisto2D("EtSimulatedPiMinusAssumingKaon","Simulated E_{T} from K^{-} assuming #pi mass"); | |
1886 | CreateEtaPtHisto2D("EtSimulatedProtonAssumingKaon","Simulated E_{T} from p assuming #pi mass"); | |
1887 | CreateEtaPtHisto2D("EtSimulatedAntiProtonAssumingKaon","Simulated E_{T} from #bar{p} assuming #pi mass"); | |
1888 | if(fBaryonEnhancement){ | |
1889 | CreateEtaPtHisto2D("EtSimulatedProtonAssumingPionEnhanced","Simulated E_{T} from p assuming #pi mass"); | |
1890 | CreateEtaPtHisto2D("EtSimulatedAntiProtonAssumingPionEnhanced","Simulated E_{T} from #bar{p} assuming #pi mass"); | |
52503ae7 | 1891 | } |
f427cbed | 1892 | |
f6acf3ad | 1893 | CreateEtaPtHisto2D("EtSimulatedLambda","Simulated E_{T} from #Lambda"); |
1894 | CreateEtaPtHisto2D("EtSimulatedAntiLambda","Simulated E_{T} from #bar{#Lambda}"); | |
1895 | CreateEtaPtHisto2D("EtSimulatedK0S","Simulated E_{T} from K^{0}_{S}"); | |
1896 | CreateEtaPtHisto2D("EtSimulatedK0L","Simulated E_{T} from K^{0}_{L}"); | |
1897 | CreateEtaPtHisto2D("EtSimulatedLambdaReweighted","Simulated E_{T} from #Lambda");//These will also be used for baryon enhancement | |
1898 | CreateEtaPtHisto2D("EtSimulatedAntiLambdaReweighted","Simulated E_{T} from #bar{#Lambda}"); | |
1899 | CreateEtaPtHisto2D("EtSimulatedK0SReweighted","Simulated E_{T} from K^{0}_{S}"); | |
1900 | CreateEtaPtHisto2D("EtSimulatedK0LReweighted","Simulated E_{T} from K^{0}_{L}"); | |
1901 | CreateEtaPtHisto2D("EtSimulatedNeutron","Simulated E_{T} from neutrons"); | |
1902 | CreateEtaPtHisto2D("EtSimulatedAntiNeutron","Simulated E_{T} from #bar{n}"); | |
1903 | CreateEtaPtHisto2D("EtSimulatedEPlus","Simulated E_{T} from e^{+}"); | |
1904 | CreateEtaPtHisto2D("EtSimulatedEMinus","Simulated E_{T} from e^{-}"); | |
1905 | CreateEtaPtHisto2D("EtSimulatedOmega","Simulated E_{T} from #Omega^{-}"); | |
1906 | CreateEtaPtHisto2D("EtSimulatedAntiOmega","Simulated E_{T} from #Omega^{+}"); | |
1907 | CreateEtaPtHisto2D("EtSimulatedXi","Simulated E_{T} from #Xi^{-}"); | |
1908 | CreateEtaPtHisto2D("EtSimulatedAntiXi","Simulated E_{T} from #Xi^{+}"); | |
1909 | CreateEtaPtHisto2D("EtSimulatedSigma","Simulated E_{T} from #Xi^{-}"); | |
1910 | CreateEtaPtHisto2D("EtSimulatedAntiSigma","Simulated E_{T} from #Xi^{+}"); | |
1911 | CreateEtaPtHisto2D("EtSimulatedXi0","Simulated E_{T} from #Xi^{0}"); | |
1912 | CreateEtaPtHisto2D("EtSimulatedAntiXi0","Simulated E_{T} from #Xi^{0}"); | |
1913 | CreateEtaPtHisto2D("EtSimulatedAllHadron","Simulated E_{T} from all hadrons"); | |
1914 | ||
1915 | ||
1916 | CreateEtaPtHisto2D("EtSimulatedLambdaDaughters","Simulated E_{T} from #Lambda Daughters"); | |
1917 | CreateEtaPtHisto2D("EtSimulatedAntiLambdaDaughters","Simulated E_{T} from #bar{#Lambda} Daughters"); | |
1918 | CreateEtaPtHisto2D("EtSimulatedK0SDaughters","Simulated E_{T} from K^{0}_{S} Daughters"); | |
1919 | CreateEtaPtHisto2D("EtSimulatedLambdaDaughtersReweighted","Simulated E_{T} from #Lambda Daughters"); | |
1920 | CreateEtaPtHisto2D("EtSimulatedAntiLambdaDaughtersReweighted","Simulated E_{T} from #bar{#Lambda} Daughters"); | |
1921 | CreateEtaPtHisto2D("EtSimulatedK0SDaughtersReweighted","Simulated E_{T} from K^{0}_{S} Daughters"); | |
1922 | CreateEtaPtHisto2D("EtSimulatedOmegaDaughters","Simulated E_{T} from #Omega^{-} Daughters"); | |
1923 | CreateEtaPtHisto2D("EtSimulatedAntiOmegaDaughters","Simulated E_{T} from #Omega^{+} Daughters"); | |
1924 | CreateEtaPtHisto2D("EtSimulatedXiDaughters","Simulated E_{T} from #Xi^{-} Daughters"); | |
1925 | CreateEtaPtHisto2D("EtSimulatedAntiXiDaughters","Simulated E_{T} from #Xi^{+} Daughters"); | |
1926 | ||
1927 | ||
1928 | CreateEtaPtHisto2D("EtSimulatedGamma","Simulated E_{T} from #gamma"); | |
1929 | CreateEtaPtHisto2D("EtSimulatedEta","Simulated E_{T} from #eta"); | |
1930 | CreateEtaPtHisto2D("EtSimulatedPi0","Simulated E_{T} from #pi^{0}"); | |
1931 | CreateEtaPtHisto2D("EtSimulatedOmega0","Simulated E_{T} from #omega"); | |
1932 | } | |
cf6522d1 | 1933 | TString *strTPC = new TString("TPC"); |
1934 | TString *strITS = new TString("ITS"); | |
1935 | TString *strTPCITS = new TString("TPCITS"); | |
7d2d1773 | 1936 | Int_t lastcutset = 1; |
1937 | if(fRequireITSHits) lastcutset = 2; | |
1938 | for(Int_t i=0;i<=lastcutset;i++){ | |
ea331c5d | 1939 | TString *cutName = NULL; |
641e1e0c | 1940 | Float_t maxPtdEdx = 10; |
1941 | Float_t mindEdx = 35; | |
1942 | Float_t maxdEdx = 150.0; | |
1943 | switch(i){ | |
1944 | case 0: | |
cf6522d1 | 1945 | cutName = strTPC; |
641e1e0c | 1946 | break; |
1947 | case 1: | |
cf6522d1 | 1948 | cutName = strITS; |
641e1e0c | 1949 | maxPtdEdx = 5; |
1950 | maxdEdx = 500.0; | |
1951 | break; | |
1952 | case 2: | |
cf6522d1 | 1953 | cutName = strTPCITS; |
641e1e0c | 1954 | break; |
1955 | default: | |
1956 | cerr<<"Error: cannot make histograms!"<<endl; | |
1957 | return; | |
1958 | } | |
1959 | ||
f6acf3ad | 1960 | if( !fRunLightweight){ |
1961 | CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedPiPlus",cutName->Data()),"Reconstructed E_{T} from identified #pi^{+}"); | |
1962 | CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedPiMinus",cutName->Data()),"Reconstructed E_{T} from identified #pi^{-}"); | |
1963 | CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedKPlus",cutName->Data()),"Reconstructed E_{T} from identified K^{+}"); | |
1964 | CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedEMinus",cutName->Data()),"Reconstructed E_{T} from identified e^{-}"); | |
1965 | CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedEPlus",cutName->Data()),"Reconstructed E_{T} from identified e^{+}"); | |
1966 | CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedKMinus",cutName->Data()),"Reconstructed E_{T} from identified K^{-}"); | |
1967 | CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedProton",cutName->Data()),"Reconstructed E_{T} from identified p"); | |
1968 | CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedAntiProton",cutName->Data()),"Reconstructed E_{T} from identified #bar{p}"); | |
1969 | if(fBaryonEnhancement){ | |
1970 | CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedProtonEnhanced",cutName->Data()),"Reconstructed E_{T} from identified p"); | |
1971 | CreateEtaPtHisto2D(Form("EtReconstructed%sIdentifiedAntiProtonEnhanced",cutName->Data()),"Reconstructed E_{T} from identified #bar{p}"); | |
1972 | } | |
1973 | CreateEtaPtHisto2D(Form("EtNReconstructed%sUnidentified",cutName->Data()),"Number of Reconstructed unidentified particles"); | |
1974 | CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentifiedAssumingPion",cutName->Data()),"Reconstructed E_{T} from unidentified particles assuming pion mass"); | |
1975 | CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentifiedAssumingProton",cutName->Data()),"Reconstructed E_{T} from unidentified particles assuming pion mass"); | |
1976 | CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentifiedAssumingKaon",cutName->Data()),"Reconstructed E_{T} from unidentified particles assuming pion mass"); | |
1977 | ||
1978 | CreateEtaPtHisto2D(Form("EtNReconstructed%sUnidentifiedKaon",cutName->Data()),"Number of Reconstructed unidentified kaons particles"); | |
1979 | CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentifiedKaonAssumingPion",cutName->Data()),"Reconstructed E_{T} from unidentified kaons particles assuming pion mass"); | |
1980 | CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentifiedKaonAssumingProton",cutName->Data()),"Reconstructed E_{T} from unidentified kaons particles assuming pion mass"); | |
1981 | CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentifiedKaonAssumingKaon",cutName->Data()),"Reconstructed E_{T} from unidentified kaons particles assuming pion mass"); | |
1982 | CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentifiedKaon",cutName->Data()),"Reconstructed E_{T} from unidentified kaons particles assuming kaon mass"); | |
1983 | CreateEtaPtHisto2D(Form("EtNReconstructed%sUnidentifiedProton",cutName->Data()),"Number of Reconstructed unidentified proton particles"); | |
1984 | CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentifiedProtonAssumingPion",cutName->Data()),"Reconstructed E_{T} from unidentified proton particles assuming pion mass"); | |
1985 | CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentifiedProtonAssumingKaon",cutName->Data()),"Reconstructed E_{T} from unidentified proton particles assuming pion mass"); | |
1986 | CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentifiedPionAssumingKaon",cutName->Data()),"Reconstructed E_{T} from unidentified kaons particles assuming pion mass"); | |
1987 | CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentifiedProtonAssumingKaon",cutName->Data()),"Reconstructed E_{T} from unidentified proton particles assuming pion mass"); | |
1988 | CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentifiedPionAssumingProton",cutName->Data()),"Reconstructed E_{T} from unidentified kaons particles assuming pion mass"); | |
1989 | CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentifiedProtonAssumingProton",cutName->Data()),"Reconstructed E_{T} from unidentified proton particles assuming pion mass"); | |
1990 | CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentifiedProton",cutName->Data()),"Reconstructed E_{T} from unidentified proton particles assuming proton mass"); | |
1991 | if(fBaryonEnhancement){ | |
1992 | CreateEtaPtHisto2D(Form("EtNReconstructed%sUnidentifiedProtonEnhanced",cutName->Data()),"Number of Reconstructed unidentified proton particles"); | |
1993 | CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentifiedProtonAssumingPionEnhanced",cutName->Data()),"Reconstructed E_{T} from unidentified proton particles assuming pion mass"); | |
1994 | CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentifiedProtonEnhanced",cutName->Data()),"Reconstructed E_{T} from unidentified proton particles assuming proton mass"); | |
1995 | } | |
1996 | CreateEtaPtHisto2D(Form("EtNReconstructed%sUnidentifiedPion",cutName->Data()),"Number of Reconstructed unidentified pions particles"); | |
1997 | CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentifiedPionAssumingPion",cutName->Data()),"Reconstructed E_{T} from unidentified pions particles assuming pion mass"); | |
1998 | CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentifiedPionAssumingKaon",cutName->Data()),"Reconstructed E_{T} from unidentified pions particles assuming pion mass"); | |
1999 | CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentifiedPionAssumingProton",cutName->Data()),"Reconstructed E_{T} from unidentified pions particles assuming pion mass"); | |
2000 | CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentifiedPion",cutName->Data()),"Reconstructed E_{T} from unidentified pions particles assuming pion mass"); | |
2001 | ||
2002 | CreateEtaPtHisto2D(Form("EtReconstructed%sUnidentified",cutName->Data()),"Reconstructed E_{T} from unidentified particles using real mass"); | |
2003 | CreateEtaPtHisto2D(Form("EtReconstructed%sMisidentifiedElectrons",cutName->Data()),"Reconstructed E_{T} from misidentified electrons"); | |
2004 | ||
2005 | ||
2006 | CreateEtaPtHisto2D(Form("EtReconstructed%sPiPlus",cutName->Data()),"Reconstructed E_{T} from #pi^{+}"); | |
2007 | CreateEtaPtHisto2D(Form("EtReconstructed%sPiMinus",cutName->Data()),"Reconstructed E_{T} from #pi^{-}"); | |
2008 | CreateEtaPtHisto2D(Form("EtReconstructed%sKPlus",cutName->Data()),"Reconstructed E_{T} from K^{+}"); | |
2009 | CreateEtaPtHisto2D(Form("EtReconstructed%sKMinus",cutName->Data()),"Reconstructed E_{T} from K^{-}"); | |
2010 | CreateEtaPtHisto2D(Form("EtReconstructed%sProton",cutName->Data()),"Reconstructed E_{T} from p"); | |
2011 | CreateEtaPtHisto2D(Form("EtReconstructed%sAntiProton",cutName->Data()),"Reconstructed E_{T} from #bar{p}"); | |
2012 | if(fBaryonEnhancement){ | |
2013 | CreateEtaPtHisto2D(Form("EtReconstructed%sProtonEnhanced",cutName->Data()),"Reconstructed E_{T} from p"); | |
2014 | CreateEtaPtHisto2D(Form("EtReconstructed%sAntiProtonEnhanced",cutName->Data()),"Reconstructed E_{T} from #bar{p}"); | |
2015 | } | |
2016 | CreateEtaPtHisto2D(Form("EtReconstructed%sChargedHadron",cutName->Data()),"Reconstructed E_{T} from charged hadrons"); | |
2017 | CreateEtaPtHisto2D(Form("EtNReconstructed%sPiPlus",cutName->Data()),"Reconstructed E_{T} from #pi^{+}"); | |
2018 | CreateEtaPtHisto2D(Form("EtNReconstructed%sPiMinus",cutName->Data()),"Reconstructed E_{T} from #pi^{-}"); | |
2019 | CreateEtaPtHisto2D(Form("EtNReconstructed%sKPlus",cutName->Data()),"Reconstructed E_{T} from K^{+}"); | |
2020 | CreateEtaPtHisto2D(Form("EtNReconstructed%sKMinus",cutName->Data()),"Reconstructed E_{T} from K^{-}"); | |
2021 | CreateEtaPtHisto2D(Form("EtNReconstructed%sProton",cutName->Data()),"Reconstructed E_{T} from p"); | |
2022 | CreateEtaPtHisto2D(Form("EtNReconstructed%sAntiProton",cutName->Data()),"Reconstructed E_{T} from #bar{p}"); | |
2023 | if(fBaryonEnhancement){ | |
2024 | CreateEtaPtHisto2D(Form("EtNReconstructed%sProtonEnhanced",cutName->Data()),"Reconstructed E_{T} from p"); | |
2025 | CreateEtaPtHisto2D(Form("EtNReconstructed%sAntiProtonEnhanced",cutName->Data()),"Reconstructed E_{T} from #bar{p}"); | |
2026 | } | |
2027 | CreateEtaPtHisto2D(Form("EtNReconstructed%sChargedHadron",cutName->Data()),"Reconstructed E_{T} from charged hadrons"); | |
2028 | if(fDataSet==20100){//If this is Pb+Pb | |
2029 | Int_t width = 5; | |
2030 | if(fNCentBins<21) width = 10; | |
2031 | for(Int_t j=0;j<fNCentBins;j++){ | |
2032 | CreateEtaPtHisto2D(Form("EtNReconstructed%sPiPlusCB%i",cutName->Data(),j),Form("Reconstructed E_{T} from #pi^{+} for %i-%i central",j*width,(j+1)*width)); | |
2033 | CreateEtaPtHisto2D(Form("EtNReconstructed%sPiMinusCB%i",cutName->Data(),j),Form("Reconstructed E_{T} from #pi^{-} for %i-%i central",j*width,(j+1)*width)); | |
2034 | CreateEtaPtHisto2D(Form("EtNReconstructed%sKPlusCB%i",cutName->Data(),j),Form("Reconstructed E_{T} from K^{+} for %i-%i central",j*width,(j+1)*width)); | |
2035 | CreateEtaPtHisto2D(Form("EtNReconstructed%sKMinusCB%i",cutName->Data(),j),Form("Reconstructed E_{T} from K^{-} for %i-%i central",j*width,(j+1)*width)); | |
2036 | CreateEtaPtHisto2D(Form("EtNReconstructed%sProtonCB%i",cutName->Data(),j),Form("Reconstructed E_{T} from p for %i-%i central",j*width,(j+1)*width)); | |
2037 | CreateEtaPtHisto2D(Form("EtNReconstructed%sAntiProtonCB%i",cutName->Data(),j),Form("Reconstructed E_{T} from #bar{p} for %i-%i central",j*width,(j+1)*width)); | |
2038 | CreateEtaPtHisto2D(Form("EtNReconstructed%sChargedHadronCB%i",cutName->Data(),j),Form("Reconstructed E_{T} from charged hadrons for %i-%i central",j*width,(j+1)*width)); | |
2039 | } | |
52503ae7 | 2040 | } |
cf6522d1 | 2041 | |
f6acf3ad | 2042 | CreateEtaPtHisto2D(Form("EtReconstructed%sChargedHadronAssumingPion",cutName->Data()),"Reconstructed E_{T} from charged hadrons assuming they are all pions"); |
2043 | CreateEtaPtHisto2D(Form("EtReconstructed%sChargedHadronAssumingProton",cutName->Data()),"Reconstructed E_{T} from charged hadrons assuming they are all pions"); | |
2044 | CreateEtaPtHisto2D(Form("EtReconstructed%sChargedHadronAssumingKaon",cutName->Data()),"Reconstructed E_{T} from charged hadrons assuming they are all pions"); | |
2045 | CreateEtaPtHisto2D(Form("EtReconstructed%sKPlusAssumingPion",cutName->Data()),"Reconstructed E_{T} from K^{+} assuming #pi mass"); | |
2046 | CreateEtaPtHisto2D(Form("EtReconstructed%sKMinusAssumingPion",cutName->Data()),"Reconstructed E_{T} from K^{-} assuming #pi mass"); | |
2047 | CreateEtaPtHisto2D(Form("EtReconstructed%sProtonAssumingPion",cutName->Data()),"Reconstructed E_{T} from p assuming #pi mass"); | |
2048 | CreateEtaPtHisto2D(Form("EtReconstructed%sAntiProtonAssumingPion",cutName->Data()),"Reconstructed E_{T} from #bar{p} assuming #pi mass"); | |
2049 | CreateEtaPtHisto2D(Form("EtReconstructed%sPiPlusAssumingKaon",cutName->Data()),"Reconstructed E_{T} from K^{+} assuming #pi mass"); | |
2050 | CreateEtaPtHisto2D(Form("EtReconstructed%sPiMinusAssumingKaon",cutName->Data()),"Reconstructed E_{T} from K^{-} assuming #pi mass"); | |
2051 | CreateEtaPtHisto2D(Form("EtReconstructed%sKPlusAssumingKaon",cutName->Data()),"Reconstructed E_{T} from K^{+} assuming #pi mass"); | |
2052 | CreateEtaPtHisto2D(Form("EtReconstructed%sKMinusAssumingKaon",cutName->Data()),"Reconstructed E_{T} from K^{-} assuming #pi mass"); | |
2053 | CreateEtaPtHisto2D(Form("EtReconstructed%sProtonAssumingKaon",cutName->Data()),"Reconstructed E_{T} from p assuming #pi mass"); | |
2054 | CreateEtaPtHisto2D(Form("EtReconstructed%sAntiProtonAssumingKaon",cutName->Data()),"Reconstructed E_{T} from #bar{p} assuming #pi mass"); | |
2055 | ||
2056 | CreateEtaPtHisto2D(Form("EtReconstructed%sKPlusAssumingProton",cutName->Data()),"Reconstructed E_{T} from K^{+} assuming #pi mass"); | |
2057 | CreateEtaPtHisto2D(Form("EtReconstructed%sKMinusAssumingProton",cutName->Data()),"Reconstructed E_{T} from K^{-} assuming #pi mass"); | |
2058 | CreateEtaPtHisto2D(Form("EtReconstructed%sPiMinusAssumingProton",cutName->Data()),"Reconstructed E_{T} from p assuming #pi mass"); | |
2059 | CreateEtaPtHisto2D(Form("EtReconstructed%sPiPlusAssumingProton",cutName->Data()),"Reconstructed E_{T} from #bar{p} assuming #pi mass"); | |
2060 | CreateEtaPtHisto2D(Form("EtReconstructed%sProtonAssumingProton",cutName->Data()),"Reconstructed E_{T} from p assuming #pi mass"); | |
2061 | CreateEtaPtHisto2D(Form("EtReconstructed%sAntiProtonAssumingProton",cutName->Data()),"Reconstructed E_{T} from #bar{p} assuming #pi mass"); | |
2062 | ||
2063 | if(fBaryonEnhancement){ | |
2064 | CreateEtaPtHisto2D(Form("EtReconstructed%sProtonAssumingPionEnhanced",cutName->Data()),"Reconstructed E_{T} from p assuming #pi mass"); | |
2065 | CreateEtaPtHisto2D(Form("EtReconstructed%sAntiProtonAssumingPionEnhanced",cutName->Data()),"Reconstructed E_{T} from #bar{p} assuming #pi mass"); | |
2066 | } | |
86d9d0dc | 2067 | |
f6acf3ad | 2068 | CreateEtaPtHisto2D(Form("EtReconstructed%sEPlus",cutName->Data()),"Reconstructed E_{T} from e^{+}"); |
2069 | CreateEtaPtHisto2D(Form("EtReconstructed%sEMinus",cutName->Data()),"Reconstructed E_{T} from e^{-}"); | |
2070 | ||
2071 | ||
2072 | ||
2073 | CreateEtaPtHisto2D(Form("EtReconstructed%sLambdaDaughters",cutName->Data()),"Reconstructed E_{T} from #Lambda Daughters"); | |
2074 | CreateEtaPtHisto2D(Form("EtReconstructed%sAntiLambdaDaughters",cutName->Data()),"Reconstructed E_{T} from #bar{#Lambda} Daughters"); | |
2075 | CreateEtaPtHisto2D(Form("EtReconstructed%sK0SDaughters",cutName->Data()),"Reconstructed E_{T} from K^{0}_{S} Daughters"); | |
2076 | CreateEtaPtHisto2D(Form("EtReconstructed%sLambdaDaughtersReweighted",cutName->Data()),"Reconstructed E_{T} from #Lambda Daughters"); | |
2077 | CreateEtaPtHisto2D(Form("EtReconstructed%sAntiLambdaDaughtersReweighted",cutName->Data()),"Reconstructed E_{T} from #bar{#Lambda} Daughters"); | |
2078 | CreateEtaPtHisto2D(Form("EtReconstructed%sK0SDaughtersReweighted",cutName->Data()),"Reconstructed E_{T} from K^{0}_{S} Daughters"); | |
2079 | CreateEtaPtHisto2D(Form("EtReconstructed%sOmegaDaughters",cutName->Data()),"Reconstructed E_{T} from #Omega^{-} Daughters"); | |
2080 | CreateEtaPtHisto2D(Form("EtReconstructed%sAntiOmegaDaughters",cutName->Data()),"Reconstructed E_{T} from #Omega^{+} Daughters"); | |
2081 | CreateEtaPtHisto2D(Form("EtReconstructed%sXiDaughters",cutName->Data()),"Reconstructed E_{T} from #Xi^{-} Daughters"); | |
2082 | CreateEtaPtHisto2D(Form("EtReconstructed%sAntiXiDaughters",cutName->Data()),"Reconstructed E_{T} from #Xi^{+} Daughters"); | |
2083 | CreateEtaPtHisto2D(Form("EtReconstructed%sConversionElectrons",cutName->Data()),"Reconstructed E_{T} from conversion electrons"); | |
2084 | CreateEtaPtHisto2D(Form("EtReconstructed%sSecondaryMuons",cutName->Data()),"Reconstructed E_{T} from secondary muons");//from pions | |
2085 | CreateEtaPtHisto2D(Form("EtReconstructed%sSecondaryPions",cutName->Data()),"Reconstructed E_{T} from secondary pions");//from rescattering and sigma+- | |
2086 | CreateEtaPtHisto2D(Form("EtReconstructed%sSecondaryProtons",cutName->Data()),"Reconstructed E_{T} from secondary protons");//from rescattering and sigma+- | |
f43fc416 | 2087 | } |
cf6522d1 | 2088 | CreateIntHisto1D(Form("UnidentifiedPIDs%s",cutName->Data()),"PIDs of unidentified particles", "PID", "Number of particles",9, -4,4); |
2089 | CreateHisto2D(Form("MisidentifiedPIDs%s",cutName->Data()),"PIDs of misidentified particles", "PID real","PID identified",5, -.5,4.5,5, -.5,4.5); | |
2090 | CreateHisto2D(Form("dEdxAll%s",cutName->Data()),"dE/dx for all particles","momentum (GeV/c)","dE/dx",400,0.0,maxPtdEdx,200,mindEdx,maxdEdx); | |
2091 | CreateHisto2D(Form("dEdxPion%s",cutName->Data()),"dE/dx for #pi^{#pm}","momentum (GeV/c)","dE/dx",400,0.0,maxPtdEdx,200,mindEdx,maxdEdx); | |
2092 | CreateHisto2D(Form("dEdxKaon%s",cutName->Data()),"dE/dx for K^{#pm}","momentum (GeV/c)","dE/dx",400,0.0,maxPtdEdx,200,mindEdx,maxdEdx); | |
2093 | CreateHisto2D(Form("dEdxProton%s",cutName->Data()),"dE/dx for p(#bar{p})","momentum (GeV/c)","dE/dx",400,0.0,maxPtdEdx,200,mindEdx,maxdEdx); | |
2094 | CreateHisto2D(Form("dEdxElectron%s",cutName->Data()),"dE/dx for e^{#pm}","momentum (GeV/c)","dE/dx",400,0.0,maxPtdEdx,200,mindEdx,maxdEdx); | |
2095 | CreateHisto2D(Form("dEdxUnidentified%s",cutName->Data()),"dE/dx for unidentified particles","momentum (GeV/c)","dE/dx",400,0.0,maxPtdEdx,200,mindEdx,maxdEdx); | |
641e1e0c | 2096 | } |
464aa50c | 2097 | delete strTPC; |
2098 | delete strITS; | |
2099 | delete strTPCITS; | |
4e0c0fe1 | 2100 | |
2101 | Float_t minEt = 0.0; | |
2102 | Float_t maxEt = 100.0; | |
c98582cc | 2103 | Float_t minEtPiKP = 0.0; |
9f0216e3 | 2104 | Float_t maxEtPiKP = 100.0; |
900a0a41 | 2105 | if(fDataSet==20100){ |
2106 | maxEt=4000.0; | |
2107 | maxEtPiKP = 2500; | |
2108 | } | |
2109 | if(fDataSet==2013){ | |
2110 | maxEt=100.0; | |
2111 | maxEtPiKP = 100.0; | |
2112 | } | |
4b40b2b1 | 2113 | Int_t nbinsEt = 100; |
4e0c0fe1 | 2114 | char histoname[200]; |
2115 | char histotitle[200]; | |
2116 | char xtitle[50]; | |
2117 | char ytitle[50]; | |
464aa50c | 2118 | TString *sTPC = new TString("TPC"); |
2119 | TString *sITS = new TString("ITS"); | |
2120 | TString *sTPCpt = new TString("0.15"); | |
2121 | TString *sITSpt = new TString("0.10"); | |
2122 | TString *sPID = new TString(""); | |
2123 | TString *sNoPID = new TString("NoPID"); | |
2124 | TString *sNoPIDString = new TString(", No PID"); | |
2125 | TString *sHadEt = new TString("HadEt"); | |
2126 | TString *sTotEt = new TString("TotEt"); | |
f6acf3ad | 2127 | TString *sPiKPEt = new TString("PiKPEt"); |
1826590b | 2128 | TString *sRawEt = new TString("RawEt"); |
464aa50c | 2129 | TString *sTotEtString = new TString("total E_{T}"); |
2130 | TString *sHadEtString = new TString("hadronic E_{T}"); | |
f6acf3ad | 2131 | TString *sPiKPEtString = new TString("E_{T}^{#pi,K,p}"); |
1826590b | 2132 | TString *sRawEtString = new TString("E_{T}^{raw}"); |
464aa50c | 2133 | TString *sFull = new TString("Full"); |
2134 | TString *sEMCAL = new TString("EMCAL"); | |
2135 | TString *sPHOS = new TString("PHOS"); | |
4b40b2b1 | 2136 | float etDiff = 1.5; |
6b246af1 | 2137 | float etDiffLow = etDiff; |
2138 | if(fDataSet!=20100){//If this is p+p | |
2139 | etDiffLow = 2.5; | |
2140 | } | |
7d2d1773 | 2141 | |
2142 | for(int tpc = 0;tpc<lastcutset;tpc++){ | |
ea331c5d | 2143 | TString *detector = NULL; |
2144 | TString *ptstring = NULL; | |
4b40b2b1 | 2145 | if(tpc==1) {detector = sTPC; ptstring = sTPCpt;} |
2146 | else{detector = sITS; ptstring = sITSpt;} | |
4e0c0fe1 | 2147 | for(int hadet = 0;hadet<2;hadet++){ |
ea331c5d | 2148 | TString *et = NULL; |
2149 | TString *etstring = NULL; | |
4b40b2b1 | 2150 | if(hadet==1) {et = sHadEt; etstring = sHadEtString;} |
2151 | else{et = sTotEt; etstring = sTotEtString;} | |
7d2d1773 | 2152 | for(int type = 0;type<3;type++){ |
2153 | if(type==0 && !fInvestigateFull) continue; | |
2154 | if(type==1 && !fInvestigateEMCal) continue; | |
2155 | if(type==2 && !fInvestigatePHOS) continue; | |
ea331c5d | 2156 | TString *acceptance = NULL; |
4b40b2b1 | 2157 | switch(type){ |
2158 | case 0: | |
2159 | acceptance = sFull; | |
7d2d1773 | 2160 | etDiff = 1.5; |
4b40b2b1 | 2161 | break; |
2162 | case 1: | |
2163 | acceptance = sEMCAL; | |
7d2d1773 | 2164 | etDiff = 5; |
4b40b2b1 | 2165 | break; |
2166 | case 2: | |
2167 | acceptance = sPHOS; | |
7d2d1773 | 2168 | etDiff = 5; |
4b40b2b1 | 2169 | break; |
2170 | default: | |
2171 | acceptance = sFull; | |
2172 | } | |
4e0c0fe1 | 2173 | for(int pid = 0;pid<2;pid++){ |
ea331c5d | 2174 | TString *partid = NULL; |
2175 | TString *partidstring = NULL; | |
464aa50c | 2176 | if(pid==1){partid = sPID; partidstring = sPID;} |
2177 | else{partid = sNoPID; partidstring = sNoPIDString;} | |
6b246af1 | 2178 | |
6a0df78a | 2179 | snprintf(histoname,200,"Sim%sMinusReco%s%sAcceptance%s%s",et->Data(),et->Data(),acceptance->Data(),detector->Data(),partid->Data()); |
2180 | snprintf(histotitle,200,"(Simulated %s - reconstructed %s)/(Simulated %s) with %s acceptance for p_{T}>%s GeV/c%s",etstring->Data(),etstring->Data(),etstring->Data(),acceptance->Data(),ptstring->Data(),partidstring->Data()); | |
2181 | snprintf(ytitle,50,"(Simulated %s - reconstructed %s)/(Simulated %s)",etstring->Data(),etstring->Data(),etstring->Data()); | |
2182 | snprintf(xtitle,50,"Simulated %s",etstring->Data()); | |
6b246af1 | 2183 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt,nbinsEt,-etDiffLow,etDiff); |
2184 | ||
f6acf3ad | 2185 | if(type==0){//only fill for full acceptance |
6b246af1 | 2186 | snprintf(histoname,200,"Sim%sVsReco%s%sAcceptance%s%s",et->Data(),et->Data(),acceptance->Data(),detector->Data(),partid->Data()); |
2187 | snprintf(histotitle,200,"Simulated %s vs reconstructed %s with %s acceptance for p_{T}>%s GeV/c%s",etstring->Data(),etstring->Data(),acceptance->Data(),ptstring->Data(),partidstring->Data()); | |
f6acf3ad | 2188 | snprintf(ytitle,50,"Reconstructed %s",etstring->Data()); |
6b246af1 | 2189 | snprintf(xtitle,50,"Simulated %s",etstring->Data()); |
2190 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt*4,minEt,maxEt,nbinsEt*4,minEt,maxEt); | |
f6acf3ad | 2191 | if(hadet==1){//on top of that we want to create pikp histograms without adding a full option parallel to had and tot et - therefore we will just create these histos when we create the hadet histos |
2192 | snprintf(histoname,200,"Sim%sVsReco%s%sAcceptance%s%s",sPiKPEt->Data(),sPiKPEt->Data(),acceptance->Data(),detector->Data(),partid->Data()); | |
2193 | snprintf(histotitle,200,"Simulated %s vs reconstructed %s with %s acceptance for p_{T}>%s GeV/c%s",sPiKPEtString->Data(),sPiKPEtString->Data(),acceptance->Data(),ptstring->Data(),partidstring->Data()); | |
2194 | snprintf(ytitle,50,"Reconstructed %s",sPiKPEtString->Data()); | |
2195 | snprintf(xtitle,50,"Simulated %s",sPiKPEtString->Data()); | |
c98582cc | 2196 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt*4,minEtPiKP,maxEtPiKP,nbinsEt*4,minEtPiKP,maxEtPiKP); |
1826590b | 2197 | |
2198 | //And for the raw ET | |
2199 | snprintf(histoname,200,"Sim%sVsReco%s%sAcceptance%s%s",sRawEt->Data(),sRawEt->Data(),acceptance->Data(),detector->Data(),partid->Data()); | |
2200 | snprintf(histotitle,200,"Simulated %s vs reconstructed %s with %s acceptance for p_{T}>%s GeV/c%s",sRawEtString->Data(),sRawEtString->Data(),acceptance->Data(),ptstring->Data(),partidstring->Data()); | |
2201 | snprintf(ytitle,50,"Reconstructed %s",sRawEtString->Data()); | |
2202 | snprintf(xtitle,50,"Simulated %s",sRawEtString->Data()); | |
2203 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt*4,minEtPiKP,maxEtPiKP,nbinsEt*4,minEtPiKP,maxEtPiKP); | |
f6acf3ad | 2204 | } |
6b246af1 | 2205 | } |
2206 | ||
7d2d1773 | 2207 | if(hadet==0 && type==0 && fInvestigatePiKP){//we only want to do this once... not the most elegant way of coding but hey... |
6a0df78a | 2208 | snprintf(histoname,200,"SimPiKPMinusRecoPiKP%sAcceptance%s%s",acceptance->Data(),detector->Data(),partid->Data()); |
2209 | snprintf(histotitle,200,"(Sim PiKP - reco PiKP)/(Sim PiKP) with %s acceptance for p_{T}>%s GeV/c%s",acceptance->Data(),ptstring->Data(),partidstring->Data()); | |
2210 | snprintf(ytitle,50,"(Sim PiKP - reco PiKP)/(Sim PiKP)"); | |
2211 | snprintf(xtitle,50,"Simulated E_{T}^{#pi,K,p}"); | |
6b246af1 | 2212 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt,nbinsEt,-etDiffLow,etDiff); |
0e866ddc | 2213 | } |
4e0c0fe1 | 2214 | } |
2215 | } | |
2216 | } | |
2217 | } | |
c98582cc | 2218 | CreateHisto1D("SimPiKPEt","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); |
2219 | CreateHisto1D("SimPiKPEtND","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
2220 | CreateHisto1D("SimPiKPEtDD","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
2221 | CreateHisto1D("SimPiKPEtSD","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
d35312c9 | 2222 | CreateHisto1D("SimPiKPEtNDV0AND","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); |
2223 | CreateHisto1D("SimPiKPEtDDV0AND","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
2224 | CreateHisto1D("SimPiKPEtSDV0AND","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
ba222433 | 2225 | CreateHisto1D("SimPiKPEtNDMB","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); |
2226 | CreateHisto1D("SimPiKPEtDDMB","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
2227 | CreateHisto1D("SimPiKPEtSDMB","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
1826590b | 2228 | CreateHisto1D("SimRawEtTPC","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); |
2229 | CreateHisto1D("SimRawEtNDTPC","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
2230 | CreateHisto1D("SimRawEtDDTPC","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
2231 | CreateHisto1D("SimRawEtSDTPC","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
2232 | CreateHisto1D("SimRawEtNDV0ANDTPC","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
2233 | CreateHisto1D("SimRawEtDDV0ANDTPC","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
2234 | CreateHisto1D("SimRawEtSDV0ANDTPC","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
2235 | CreateHisto1D("SimRawEtNDMBTPC","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
2236 | CreateHisto1D("SimRawEtDDMBTPC","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
2237 | CreateHisto1D("SimRawEtSDMBTPC","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
2238 | CreateHisto1D("SimRawEtITS","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
2239 | CreateHisto1D("SimRawEtNDITS","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
2240 | CreateHisto1D("SimRawEtDDITS","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
2241 | CreateHisto1D("SimRawEtSDITS","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
2242 | CreateHisto1D("SimRawEtNDV0ANDITS","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
2243 | CreateHisto1D("SimRawEtDDV0ANDITS","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
2244 | CreateHisto1D("SimRawEtSDV0ANDITS","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
2245 | CreateHisto1D("SimRawEtNDMBITS","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
2246 | CreateHisto1D("SimRawEtDDMBITS","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
2247 | CreateHisto1D("SimRawEtSDMBITS","Simulated #pi,K,p E_{T}","Simulated #pi,K,p E_{T}","Number of events",nbinsEt*4,minEtPiKP,maxEtPiKP); | |
0e866ddc | 2248 | CreateHisto1D("SimTotEt","Simulated Total E_{T}","Simulated Total E_{T}","Number of events",nbinsEt*4,minEt,maxEt); |
2249 | CreateHisto1D("SimHadEt","Simulated Hadronic E_{T}","Simulated Hadronic E_{T}","Number of events",nbinsEt*4,minEt,maxEt); | |
2c0680a5 | 2250 | CreateHisto1D("SimTotEtND","Simulated Total E_{T}","Simulated Total E_{T} for non-diffractive events","Number of events",nbinsEt*4,minEt,maxEt); |
2251 | CreateHisto1D("SimHadEtND","Simulated Hadronic E_{T}","Simulated Hadronic E_{T} for non-diffractive events","Number of events",nbinsEt*4,minEt,maxEt); | |
d35312c9 | 2252 | CreateHisto1D("SimTotEtNDV0AND","Simulated Total E_{T}","Simulated Total E_{T} for non-diffractive events","Number of events",nbinsEt*4,minEt,maxEt); |
2253 | CreateHisto1D("SimHadEtNDV0AND","Simulated Hadronic E_{T}","Simulated Hadronic E_{T} for non-diffractive events","Number of events",nbinsEt*4,minEt,maxEt); | |
ba222433 | 2254 | CreateHisto1D("SimTotEtNDMB","Simulated Total E_{T}","Simulated Total E_{T} for non-diffractive events","Number of events",nbinsEt*4,minEt,maxEt); |
2255 | CreateHisto1D("SimHadEtNDMB","Simulated Hadronic E_{T}","Simulated Hadronic E_{T} for non-diffractive events","Number of events",nbinsEt*4,minEt,maxEt); | |
2c0680a5 | 2256 | CreateHisto1D("SimTotEtSD","Simulated Total E_{T}","Simulated Total E_{T} for singly diffractive events","Number of events",nbinsEt*4,minEt,maxEt); |
2257 | CreateHisto1D("SimHadEtSD","Simulated Hadronic E_{T}","Simulated Hadronic E_{T} for singly diffractive events","Number of events",nbinsEt*4,minEt,maxEt); | |
d35312c9 | 2258 | CreateHisto1D("SimTotEtSDV0AND","Simulated Total E_{T}","Simulated Total E_{T} for singly diffractive events","Number of events",nbinsEt*4,minEt,maxEt); |
2259 | CreateHisto1D("SimHadEtSDV0AND","Simulated Hadronic E_{T}","Simulated Hadronic E_{T} for singly diffractive events","Number of events",nbinsEt*4,minEt,maxEt); | |
ba222433 | 2260 | CreateHisto1D("SimTotEtSDMB","Simulated Total E_{T}","Simulated Total E_{T} for singly diffractive events","Number of events",nbinsEt*4,minEt,maxEt); |
2261 | CreateHisto1D("SimHadEtSDMB","Simulated Hadronic E_{T}","Simulated Hadronic E_{T} for singly diffractive events","Number of events",nbinsEt*4,minEt,maxEt); | |
2c0680a5 | 2262 | CreateHisto1D("SimTotEtDD","Simulated Total E_{T}","Simulated Total E_{T} for doubly diffractive events","Number of events",nbinsEt*4,minEt,maxEt); |
2263 | CreateHisto1D("SimHadEtDD","Simulated Hadronic E_{T}","Simulated Hadronic E_{T} for doubly diffractive events","Number of events",nbinsEt*4,minEt,maxEt); | |
d35312c9 | 2264 | CreateHisto1D("SimTotEtDDV0AND","Simulated Total E_{T}","Simulated Total E_{T} for doubly diffractive events","Number of events",nbinsEt*4,minEt,maxEt); |
2265 | CreateHisto1D("SimHadEtDDV0AND","Simulated Hadronic E_{T}","Simulated Hadronic E_{T} for doubly diffractive events","Number of events",nbinsEt*4,minEt,maxEt); | |
ba222433 | 2266 | CreateHisto1D("SimTotEtDDMB","Simulated Total E_{T}","Simulated Total E_{T} for doubly diffractive events","Number of events",nbinsEt*4,minEt,maxEt); |
2267 | CreateHisto1D("SimHadEtDDMB","Simulated Hadronic E_{T}","Simulated Hadronic E_{T} for doubly diffractive events","Number of events",nbinsEt*4,minEt,maxEt); | |
02710991 | 2268 | if(fDataSet==20100){ |
2269 | Int_t width = 5; | |
61e3f555 | 2270 | if(fNCentBins<21) width = 10; |
02710991 | 2271 | for(Int_t j=0;j<fNCentBins;j++){ |
2272 | CreateHisto1D(Form("SimTotEtCB%i",j),Form("Simulated Total E_{T} for %i-%i central",j*width,(j+1)*width),"Simulated Total E_{T}","Number of events",nbinsEt*4,minEt,maxEt); | |
2273 | CreateHisto1D(Form("SimHadEtCB%i",j),Form("Simulated Hadronic E_{T} for %i-%i central",j*width,(j+1)*width),"Simulated Hadronic E_{T}","Number of events",nbinsEt*4,minEt,maxEt); | |
61e3f555 | 2274 | CreateHisto1D(Form("SimPiKPEtCB%i",j),Form("Simulated #pi,K,p E_{T} for %i-%i central",j*width,(j+1)*width),"Simulated #pi,K,p E_{T}","Number of events",nbinsEt,minEt,maxEt); |
02710991 | 2275 | } |
2276 | } | |
0e866ddc | 2277 | |
2278 | etDiff = 0.15; | |
2279 | ||
f6acf3ad | 2280 | if(fInvestigateSmearing && !fRunLightweight){ |
49b25059 | 2281 | //====================================================================== |
2282 | ||
2283 | snprintf(histoname,200,"SimPiKPEtMeasMinusEtRealPiKP"); | |
2284 | snprintf(histotitle,200,"Simulated (all reconstructed - primaries)/all reconstructed for reconstructed tracks only"); | |
2285 | snprintf(ytitle,50,"(primary-all)/primary"); | |
2286 | snprintf(xtitle,50,"true p, K, p E_{T} for primary tracks"); | |
2287 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt,nbinsEt,-etDiff*5,etDiff*5); | |
2288 | ||
2289 | snprintf(histoname,200,"SimPiKPEtMinusSimAllCorrSmearedRecoOnly"); | |
2290 | snprintf(histotitle,200,"Simulated (primary-all)/primary for reconstructed tracks only"); | |
2291 | snprintf(ytitle,50,"(primary-all)/primary"); | |
2292 | snprintf(xtitle,50,"true p, K, p E_{T} for primary tracks"); | |
2293 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt,nbinsEt,-etDiff*5,etDiff*5); | |
2294 | ||
2295 | snprintf(histoname,200,"SimPiKPEtMinusSimEffCorrRecoOnly"); | |
2296 | snprintf(histotitle,200,"(sim-reco)/sim primary #pi,k,p for p_{T}>0.15"); | |
2297 | snprintf(ytitle,50,"(sim-reco)/sim"); | |
2298 | snprintf(xtitle,50,"true p, K, p E_{T} for primary tracks"); | |
2299 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt,nbinsEt,-etDiff*5,etDiff*5); | |
2300 | ||
2301 | snprintf(histoname,200,"SimPiKPEtMinusSimEffBkgdCorrRecoOnly"); | |
2302 | snprintf(histotitle,200,"(sim-reco)/sim primary #pi,k,p for p_{T}>0.15 with background subtraction"); | |
2303 | snprintf(ytitle,50,"(sim-reco)/sim"); | |
2304 | snprintf(xtitle,50,"true p, K, p E_{T} for primary tracks"); | |
2305 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt,nbinsEt,-etDiff*5,etDiff*5); | |
2306 | ||
2307 | snprintf(histoname,200,"SimPiKPEtMinusSimEffCorrRecoPiOnly"); | |
2308 | snprintf(histotitle,200,"(sim-reco)/sim primary #pi for p_{T}>0.15"); | |
2309 | snprintf(ytitle,50,"(sim-reco)/sim"); | |
2310 | snprintf(xtitle,50,"true #pi E_{T} for primary tracks"); | |
2311 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt/2,nbinsEt,-etDiff*5,etDiff*5); | |
2312 | ||
2313 | snprintf(histoname,200,"SimPiKPEtMinusSimEffCorrRecoKOnly"); | |
2314 | snprintf(histotitle,200,"(sim-reco)/sim primary K for p_{T}>0.15"); | |
2315 | snprintf(ytitle,50,"(sim-reco)/sim"); | |
2316 | snprintf(xtitle,50,"true K E_{T} for primary tracks"); | |
2317 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt/6,nbinsEt,-etDiff*5,etDiff*5); | |
2318 | ||
2319 | snprintf(histoname,200,"SimPiKPEtMinusSimEffCorrRecoPOnly"); | |
2320 | snprintf(histotitle,200,"(sim-reco)/sim primary p for p_{T}>0.15"); | |
2321 | snprintf(ytitle,50,"(sim-reco)/sim"); | |
2322 | snprintf(xtitle,50,"true p E_{T} for primary tracks"); | |
2323 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt/6,nbinsEt,-etDiff*5,etDiff*5); | |
2324 | ||
2325 | snprintf(histoname,200,"SimPiKPEtMinusSimAllSmearedRecoOnly"); | |
2326 | snprintf(histotitle,200,"Simulated (primary-all)/primary for reconstructed tracks only"); | |
2327 | snprintf(ytitle,50,"(primary-all)/primary"); | |
2328 | snprintf(xtitle,50,"true p, K, p E_{T} for primary tracks"); | |
2329 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt,nbinsEt,-etDiff*5,0.0); | |
2330 | ||
2331 | snprintf(histoname,200,"SimPiKPEtMinusSimPIDSmearedRecoOnly"); | |
2332 | snprintf(histotitle,200,"Simulated (true-smeared)/true for reconstructed tracks only with PID smearing"); | |
2333 | snprintf(ytitle,50,"(true-smeared)/true"); | |
2334 | snprintf(xtitle,50,"true p, K, p E_{T}"); | |
2335 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt,nbinsEt,-etDiff,etDiff); | |
2336 | ||
2337 | snprintf(histoname,200,"SimPiKPEtMinusSimSmearedRecoOnly"); | |
2338 | snprintf(histotitle,200,"Simulated (true-smeared)/true for reconstructed tracks only"); | |
2339 | snprintf(ytitle,50,"(true-smeared)/true"); | |
2340 | snprintf(xtitle,50,"true p, K, p E_{T}"); | |
2341 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt,nbinsEt,-etDiff/15,etDiff/15); | |
2342 | ||
2343 | snprintf(histoname,200,"SimPiKPPtMinusSimSmearedRecoOnly"); | |
2344 | snprintf(histotitle,200,"Simulated (true-smeared)/true for reconstructed tracks only"); | |
2345 | snprintf(ytitle,50,"(true-smeared)/true"); | |
2346 | snprintf(xtitle,50,"true p, K, p p_{T}"); | |
2347 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt,nbinsEt,-etDiff/15,etDiff/15); | |
2348 | ||
2349 | snprintf(histoname,200,"SimPiKPEtMinusSimSmearedMultRecoOnly"); | |
2350 | snprintf(histotitle,200,"Simulated (true-smeared)/true for reconstructed tracks only"); | |
2351 | snprintf(ytitle,50,"(true-smeared)/true"); | |
2352 | snprintf(xtitle,50,"number of reconstructed particles"); | |
2353 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt,nbinsEt,-etDiff/15,etDiff/15); | |
2354 | ||
2355 | snprintf(histoname,200,"SimPiKPPtMinusSimSmearedMultRecoOnly"); | |
2356 | snprintf(histotitle,200,"Simulated (true-smeared)/true for reconstructed tracks only"); | |
2357 | snprintf(ytitle,50,"(true-smeared)/true"); | |
2358 | snprintf(xtitle,50,"number of reconstructed particles"); | |
2359 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt,nbinsEt,-etDiff/15,etDiff/15); | |
7d2d1773 | 2360 | |
2361 | //====================================================================== | |
2362 | ||
6a0df78a | 2363 | snprintf(histoname,200,"SimPiKPEtMinusSimPtSmeared"); |
2364 | snprintf(histotitle,200,"Simulated (true-smeared)/true for 0.5 percent momentum smearing"); | |
2365 | snprintf(ytitle,50,"(true-smeared)/true"); | |
2366 | snprintf(xtitle,50,"true p, K, p E_{T}"); | |
61e3f555 | 2367 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt,nbinsEt,-etDiff,etDiff); |
6a0df78a | 2368 | snprintf(histoname,200,"SimPiKPEtPtSmeared"); |
2369 | snprintf(histotitle,200,"Simulated E_{T} for 0.5 percent momentum smearing"); | |
2370 | snprintf(ytitle,50,"Number of events"); | |
2371 | snprintf(xtitle,50,"p, K, p E_{T}"); | |
7d2d1773 | 2372 | CreateHisto1D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt); |
2373 | ||
2374 | //====================================================================== | |
2375 | ||
6a0df78a | 2376 | snprintf(histoname,200,"SimPiKPEtMinusSimEfficiencySmeared"); |
2377 | snprintf(histotitle,200,"Simulated (true-smeared)/true for efficiency smearing"); | |
2378 | snprintf(ytitle,50,"(true-smeared)/true"); | |
2379 | snprintf(xtitle,50,"true p, K, p E_{T}"); | |
6b246af1 | 2380 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt,nbinsEt,-etDiff*7,etDiff*7); |
6a0df78a | 2381 | snprintf(histoname,200,"SimPiKPEtEfficiencySmeared"); |
2382 | snprintf(histotitle,200,"Simulated E_{T} for efficiency smearing"); | |
2383 | snprintf(ytitle,50,"Number of events"); | |
2384 | snprintf(xtitle,50,"p, K, p E_{T}"); | |
7d2d1773 | 2385 | CreateHisto1D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt); |
2386 | ||
2387 | //====================================================================== | |
2388 | ||
6a0df78a | 2389 | snprintf(histoname,200,"SimPiKPEtMinusSimPtCutSmearedTPC"); |
2390 | snprintf(histotitle,200,"Simulated (true-smeared)/true for p_{T}>0.15 GeV/c smearing"); | |
2391 | snprintf(ytitle,50,"(true-smeared)/true"); | |
2392 | snprintf(xtitle,50,"true p, K, p E_{T}"); | |
7d2d1773 | 2393 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt,nbinsEt,-etDiff,etDiff); |
6a0df78a | 2394 | snprintf(histoname,200,"SimPiKPEtPtCutSmearedTPC"); |
2395 | snprintf(histotitle,200,"Simulated E_{T} for p_{T}>0.15 GeV/c smearing"); | |
2396 | snprintf(ytitle,50,"Number of events"); | |
2397 | snprintf(xtitle,50,"p, K, p E_{T}"); | |
7d2d1773 | 2398 | CreateHisto1D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt); |
2399 | ||
2400 | ||
2401 | //====================================================================== | |
2402 | ||
6a0df78a | 2403 | snprintf(histoname,200,"SimPiKPEtMinusSimPtCutSmearedITS"); |
2404 | snprintf(histotitle,200,"Simulated (true-smeared)/true for p_{T}>0.10 GeV/c smearing"); | |
2405 | snprintf(ytitle,50,"(true-smeared)/true"); | |
2406 | snprintf(xtitle,50,"true p, K, p E_{T}"); | |
7d2d1773 | 2407 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt,nbinsEt,-etDiff,etDiff); |
6a0df78a | 2408 | snprintf(histoname,200,"SimPiKPEtPtCutSmearedITS"); |
2409 | snprintf(histotitle,200,"Simulated E_{T} for p_{T}>0.10 GeV/c smearing"); | |
2410 | snprintf(ytitle,50,"Number of events"); | |
2411 | snprintf(xtitle,50,"p, K, p E_{T}"); | |
7d2d1773 | 2412 | CreateHisto1D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt); |
2413 | ||
2414 | //====================================================================== | |
2415 | ||
6a0df78a | 2416 | snprintf(histoname,200,"SimPiKPEtMinusSimPIDSmeared"); |
2417 | snprintf(histotitle,200,"Simulated (true-smeared)/true for PID smearing"); | |
2418 | snprintf(ytitle,50,"(true-smeared)/true"); | |
2419 | snprintf(xtitle,50,"true p, K, p E_{T}"); | |
7d2d1773 | 2420 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt,nbinsEt,-etDiff,etDiff); |
6a0df78a | 2421 | snprintf(histoname,200,"SimPiKPEtPIDSmeared"); |
2422 | snprintf(histotitle,200,"Simulated E_{T} for PID smearing"); | |
2423 | snprintf(ytitle,50,"Number of events"); | |
2424 | snprintf(xtitle,50,"p, K, p E_{T}"); | |
7d2d1773 | 2425 | CreateHisto1D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt); |
2426 | ||
2427 | //====================================================================== | |
2428 | ||
6a0df78a | 2429 | snprintf(histoname,200,"SimPiKPEtMinusSimPIDSmearedNoID"); |
2430 | snprintf(histotitle,200,"Simulated (true-smeared)/true for PID smearing No ID"); | |
2431 | snprintf(ytitle,50,"(true-smeared)/true"); | |
2432 | snprintf(xtitle,50,"true p, K, p E_{T}"); | |
7d2d1773 | 2433 | CreateHisto2D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt,nbinsEt,-etDiff,etDiff); |
6a0df78a | 2434 | snprintf(histoname,200,"SimPiKPEtPIDSmearedNoID"); |
2435 | snprintf(histotitle,200,"Simulated E_{T} for PID smearing No ID"); | |
2436 | snprintf(ytitle,50,"Number of events"); | |
2437 | snprintf(xtitle,50,"p, K, p E_{T}"); | |
7d2d1773 | 2438 | CreateHisto1D(histoname,histotitle,xtitle,ytitle,nbinsEt,minEt,maxEt); |
2439 | } | |
464aa50c | 2440 | delete sTPC; |
2441 | delete sITS; | |
2442 | delete sTPCpt; | |
2443 | delete sITSpt; | |
2444 | delete sPID; | |
2445 | delete sNoPID; | |
2446 | delete sNoPIDString; | |
2447 | delete sHadEt; | |
2448 | delete sTotEt; | |
f6acf3ad | 2449 | delete sPiKPEt; |
464aa50c | 2450 | delete sTotEtString; |
2451 | delete sHadEtString; | |
f6acf3ad | 2452 | delete sPiKPEtString; |
464aa50c | 2453 | delete sFull; |
2454 | delete sEMCAL; | |
2455 | delete sPHOS; | |
641e1e0c | 2456 | CreateIntHisto1D("NEvents","Number of events","number of events","Number of events",1,0,1); |
2c0680a5 | 2457 | CreateIntHisto1D("NEventsSD","Number of events","number of singly diffractive events","Number of events",1,0,1); |
2458 | CreateIntHisto1D("NEventsDD","Number of events","number of doubly diffractive events","Number of events",1,0,1); | |
2459 | CreateIntHisto1D("NEventsND","Number of events","number of non-diffractive events","Number of events",1,0,1); | |
d35312c9 | 2460 | CreateIntHisto1D("NEventsSDV0AND","Number of events","number of singly diffractive events","Number of events",1,0,1); |
2461 | CreateIntHisto1D("NEventsDDV0AND","Number of events","number of doubly diffractive events","Number of events",1,0,1); | |
2462 | CreateIntHisto1D("NEventsNDV0AND","Number of events","number of non-diffractive events","Number of events",1,0,1); | |
ba222433 | 2463 | CreateIntHisto1D("NEventsSDMB","Number of events","number of singly diffractive events","Number of events",1,0,1); |
2464 | CreateIntHisto1D("NEventsDDMB","Number of events","number of doubly diffractive events","Number of events",1,0,1); | |
2465 | CreateIntHisto1D("NEventsNDMB","Number of events","number of non-diffractive events","Number of events",1,0,1); | |
f6acf3ad | 2466 | if( !fRunLightweight){ |
2467 | CreateResolutionPtHisto2D("presolutionTPC","p resolution","p^{rec}","(p^{sim}-p^{rec})/p^{rec}"); | |
2468 | CreateResolutionPtHisto2D("pTresolutionTPC","p_{T} resolution","p_{T}^{rec}","(p_{T}^{sim}-p_{T}^{rec})/p_{T}^{rec}"); | |
2469 | CreateResolutionPtHisto2D("ETresolutionTPC","E_{T} resolution","E_{T}^{rec}","(E_{T}^{sim}-E_{T}^{rec})/E_{T}^{rec}"); | |
2470 | CreateResolutionPtHisto2D("pTresolutionTPCITS","p_{T} resolution","p_{T}^{rec}","(p_{T}^{sim}-p_{T}^{rec})/p_{T}^{rec}"); | |
2471 | CreateResolutionPtHisto2D("ETresolutionTPCITS","E_{T} resolution","E_{T}^{rec}","(E_{T}^{sim}-E_{T}^{rec})/E_{T}^{rec}"); | |
2472 | CreateResolutionPtHisto2D("presolutionTPCITS","p resolution","p^{rec}","(p^{sim}-p^{rec})/p^{rec}"); | |
2473 | CreateResolutionPtHisto2D("pTresolutionITS","p_{T} resolution","p_{T}^{rec}","(p_{T}^{sim}-p_{T}^{rec})/p_{T}^{rec}"); | |
2474 | CreateResolutionPtHisto2D("ETresolutionITS","E_{T} resolution","E_{T}^{rec}","(E_{T}^{sim}-E_{T}^{rec})/E_{T}^{rec}"); | |
2475 | CreateResolutionPtHisto2D("presolutionITS","p resolution","p^{rec}","(p^{sim}-p^{rec})/p^{rec}"); | |
2476 | CreatePtHisto1D("pTsimITS","p_{T}^{sim}","p_{T}^{sim}","Number of particles"); | |
2477 | CreatePtHisto1D("pTsimTPC","p_{T}^{sim}","p_{T}^{sim}","Number of particles"); | |
2478 | CreatePtHisto1D("pTsimTPCITS","p_{T}^{sim}","p_{T}^{sim}","Number of particles"); | |
2479 | CreatePtHisto1D("pTrecITS","p_{T}^{rec}","p_{T}^{rec}","Number of particles"); | |
2480 | CreatePtHisto1D("pTrecTPC","p_{T}^{rec}","p_{T}^{rec}","Number of particles"); | |
2481 | CreatePtHisto1D("pTrecTPCITS","p_{T}^{rec}","p_{T}^{rec}","Number of particles"); | |
2482 | if(fDataSet==20100){ | |
2483 | Int_t width = 5; | |
2484 | if(fNCentBins<21) width = 10; | |
2485 | for(Int_t j=0;j<fNCentBins;j++){ | |
2486 | CreatePtHisto1D(Form("pTsimITSCB%i",j),Form("p_{T}^{sim} for %i-%i central",j*width,(j+1)*width),"p_{T}^{sim}","Number of particles"); | |
2487 | CreatePtHisto1D(Form("pTsimTPCITSCB%i",j),Form("p_{T}^{sim} for %i-%i central",j*width,(j+1)*width),"p_{T}^{sim}","Number of particles"); | |
2488 | CreatePtHisto1D(Form("pTsimTPCCB%i",j),Form("p_{T}^{sim} for %i-%i central",j*width,(j+1)*width),"p_{T}^{sim}","Number of particles"); | |
2489 | CreatePtHisto1D(Form("pTrecITSCB%i",j),Form("p_{T}^{rec} for %i-%i central",j*width,(j+1)*width),"p_{T}^{rec}","Number of particles"); | |
2490 | CreatePtHisto1D(Form("pTrecTPCITSCB%i",j),Form("p_{T}^{rec} for %i-%i central",j*width,(j+1)*width),"p_{T}^{rec}","Number of particles"); | |
2491 | CreatePtHisto1D(Form("pTrecTPCCB%i",j),Form("p_{T}^{rec} for %i-%i central",j*width,(j+1)*width),"p_{T}^{rec}","Number of particles"); | |
2492 | } | |
61e3f555 | 2493 | } |
2494 | } | |
641e1e0c | 2495 | |
641e1e0c | 2496 | } |
2497 |