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