]>
Commit | Line | Data |
---|---|---|
0852acd0 | 1 | /**************************************************************************\r |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r | |
3 | * *\r | |
4 | * Author: The ALICE Off-line Project. *\r | |
5 | * Contributors are mentioned in the code where appropriate. *\r | |
6 | * *\r | |
7 | * Permission to use, copy, modify and distribute this software and its *\r | |
8 | * documentation strictly for non-commercial purposes is hereby granted *\r | |
9 | * without fee, provided that the above copyright notice appears in all *\r | |
10 | * copies and that both the copyright notice and this permission notice *\r | |
11 | * appear in the supporting documentation. The authors make no claims *\r | |
12 | * about the suitability of this software for any purpose. It is *\r | |
13 | * provided "as is" without express or implied warranty. *\r | |
14 | **************************************************************************/\r | |
15 | /* $Id: $ */\r | |
16 | //_________________________________________________________________________\r | |
17 | // class to extract omega(782)->pi0+gamma->3gamma\r | |
18 | //\r | |
19 | //-- Author: Renzhuo Wan (IOPP-Wuhan, China)\r | |
20 | //_________________________________________________________________________\r | |
21 | \r | |
22 | // --- ROOT system\r | |
23 | class TROOT;\r | |
24 | \r | |
25 | // --- AliRoot system\r | |
26 | //class AliVEvent;\r | |
27 | // --- ROOT system ---\r | |
28 | #include "TH2F.h"\r | |
29 | #include "TLorentzVector.h"\r | |
30 | #include "TParticle.h"\r | |
31 | #include "TCanvas.h"\r | |
32 | #include "TFile.h"\r | |
33 | //---- AliRoot system ----\r | |
34 | #include "AliAnaOmegaToPi0Gamma.h"\r | |
35 | #include "AliCaloTrackReader.h"\r | |
36 | #include "AliCaloPID.h"\r | |
37 | #include "AliStack.h"\r | |
38 | #include "AliVEvent.h"\r | |
39 | #include "AliAODEvent.h"\r | |
40 | #include "AliAODMCParticle.h"\r | |
41 | ClassImp(AliAnaOmegaToPi0Gamma)\r | |
42 | \r | |
43 | //______________________________________________________________________________\r | |
44 | AliAnaOmegaToPi0Gamma::AliAnaOmegaToPi0Gamma() : AliAnaPartCorrBaseClass(),\r | |
45 | fInputAODGamma(0),fInputAODPi0(0), fInputAODGammaName(""),\r | |
46 | fEventsList(0), \r | |
47 | fVtxZCut(0), fCent(0), fRp(0), fBadChDist(0),\r | |
48 | fNVtxZBin(0), fNCentBin(0), fNRpBin(0), fNBadChDistBin(0), fNpid(0),\r | |
49 | fNmaxMixEv(0), fPi0Mass(0),\r | |
4007d0a2 | 50 | fPi0MassWindow(0),fPi0OverOmegaPtCut(0),fGammaOverOmegaPtCut(0),\r |
0852acd0 | 51 | fhEtalon(0),\r |
52 | fRealOmega(0), fMixAOmega(0),\r | |
53 | fMixBOmega(0), fMixCOmega(0),\r | |
54 | fRealOmega1(0), fMixAOmega1(0),\r | |
55 | fMixBOmega1(0), fMixCOmega1(0),\r | |
56 | fRealOmega2(0), fMixAOmega2(0),\r | |
57 | fMixBOmega2(0), fMixCOmega2(0),\r | |
58 | fhOmegaPriPt(0)\r | |
59 | {\r | |
60 | //Default Ctor\r | |
61 | InitParameters();\r | |
62 | }\r | |
63 | \r | |
64 | //______________________________________________________________________________\r | |
65 | AliAnaOmegaToPi0Gamma::AliAnaOmegaToPi0Gamma(const AliAnaOmegaToPi0Gamma & ex) : AliAnaPartCorrBaseClass(ex),\r | |
66 | fInputAODGamma(new TClonesArray (*ex.fInputAODGamma)), \r | |
67 | fInputAODPi0(new TClonesArray (*ex.fInputAODPi0)),\r | |
68 | fInputAODGammaName(ex.fInputAODGammaName),\r | |
69 | fEventsList(ex.fEventsList), \r | |
70 | fVtxZCut(ex.fVtxZCut), fCent(ex.fCent), fRp(ex.fRp), fBadChDist(ex.fBadChDist),\r | |
71 | fNVtxZBin(ex.fNVtxZBin), fNCentBin(ex.fNCentBin), fNRpBin(ex.fNRpBin),\r | |
72 | fNBadChDistBin(ex.fNBadChDistBin),fNpid(ex.fNpid),\r | |
73 | fNmaxMixEv(ex.fNmaxMixEv), fPi0Mass(ex.fPi0Mass),\r | |
74 | fPi0MassWindow(ex.fPi0MassWindow),\r | |
4007d0a2 | 75 | fPi0OverOmegaPtCut(ex.fPi0OverOmegaPtCut),fGammaOverOmegaPtCut(ex.fGammaOverOmegaPtCut),\r |
0852acd0 | 76 | fhEtalon(ex.fhEtalon),\r |
77 | fRealOmega(ex.fRealOmega), fMixAOmega(ex.fMixAOmega),\r | |
78 | fMixBOmega(ex.fMixBOmega), fMixCOmega(ex.fMixCOmega),\r | |
79 | fRealOmega1(ex.fRealOmega1), fMixAOmega1(ex.fMixAOmega1),\r | |
80 | fMixBOmega1(ex.fMixBOmega1), fMixCOmega1(ex.fMixCOmega1),\r | |
81 | fRealOmega2(ex.fRealOmega2), fMixAOmega2(ex.fMixAOmega2),\r | |
82 | fMixBOmega2(ex.fMixBOmega2), fMixCOmega2(ex.fMixCOmega2),\r | |
83 | fhOmegaPriPt(ex.fhOmegaPriPt)\r | |
84 | {\r | |
85 | // cpy ctor\r | |
86 | //Do not need it\r | |
87 | }\r | |
88 | \r | |
89 | //______________________________________________________________________________\r | |
90 | AliAnaOmegaToPi0Gamma & AliAnaOmegaToPi0Gamma::operator = (const AliAnaOmegaToPi0Gamma & ex)\r | |
91 | {\r | |
92 | // assignment operator\r | |
93 | \r | |
94 | if(this == &ex)return *this;\r | |
95 | ((AliAnaPartCorrBaseClass *)this)->operator=(ex);\r | |
96 | fInputAODGamma = new TClonesArray(*ex.fInputAODGamma);\r | |
97 | fInputAODPi0 = new TClonesArray(*ex.fInputAODPi0);\r | |
98 | // fInputAODGamma=ex.fInputAODGamma;\r | |
99 | // fInputAODPi0=ex.fInputAODPi0;\r | |
100 | fInputAODGammaName = ex.fInputAODGammaName;\r | |
101 | fEventsList = ex.fEventsList;\r | |
102 | \r | |
103 | fVtxZCut=ex.fVtxZCut;\r | |
104 | fCent=ex.fCent;\r | |
105 | fRp=ex.fRp;\r | |
106 | fBadChDist=ex.fBadChDist;\r | |
107 | fNVtxZBin=ex.fNVtxZBin; \r | |
108 | fNCentBin=ex.fNCentBin;\r | |
109 | fNRpBin=ex.fNRpBin;\r | |
110 | fNBadChDistBin=ex.fNBadChDistBin;\r | |
111 | fNpid=ex.fNpid;\r | |
112 | \r | |
113 | fNmaxMixEv =ex.fNmaxMixEv;\r | |
114 | fPi0Mass=ex.fPi0Mass;\r | |
115 | fPi0MassWindow=ex.fPi0MassWindow;\r | |
4007d0a2 | 116 | fPi0OverOmegaPtCut=ex.fPi0OverOmegaPtCut;\r |
117 | fGammaOverOmegaPtCut=ex.fGammaOverOmegaPtCut;\r | |
0852acd0 | 118 | \r |
0852acd0 | 119 | fhEtalon=ex.fhEtalon;\r |
120 | fRealOmega=ex.fRealOmega;\r | |
121 | fMixAOmega=ex.fMixAOmega;\r | |
122 | fMixBOmega=ex.fMixBOmega;\r | |
123 | fMixCOmega=ex.fMixCOmega;\r | |
124 | fRealOmega1=ex.fRealOmega1;\r | |
125 | fMixAOmega1=ex.fMixAOmega1;\r | |
126 | fMixBOmega1=ex.fMixBOmega1;\r | |
127 | fMixCOmega1=ex.fMixCOmega1;\r | |
128 | fRealOmega2=ex.fRealOmega2;\r | |
129 | fMixAOmega2=ex.fMixAOmega2;\r | |
130 | fMixBOmega2=ex.fMixBOmega2;\r | |
131 | fMixCOmega2=ex.fMixCOmega2;\r | |
132 | fhOmegaPriPt=ex.fhOmegaPriPt;\r | |
133 | return *this;\r | |
134 | \r | |
135 | }\r | |
136 | \r | |
137 | //______________________________________________________________________________\r | |
138 | AliAnaOmegaToPi0Gamma::~AliAnaOmegaToPi0Gamma() {\r | |
139 | \r | |
140 | //dtor\r | |
141 | if(fInputAODGamma){\r | |
142 | fInputAODGamma->Clear();\r | |
143 | delete fInputAODGamma;\r | |
144 | }\r | |
145 | \r | |
146 | if(fInputAODPi0){\r | |
147 | fInputAODPi0->Clear();\r | |
148 | delete fInputAODPi0;\r | |
149 | } \r | |
150 | \r | |
151 | if(fEventsList){\r | |
152 | for(Int_t i=0;i<fNVtxZBin;i++){\r | |
153 | for(Int_t j=0;j<fNCentBin;j++){\r | |
154 | for(Int_t k=0;k<fNRpBin;k++){\r | |
155 | fEventsList[i*fNCentBin*fNRpBin+j*fNRpBin+k]->Clear();\r | |
156 | delete fEventsList[i*fNCentBin*fNRpBin+j*fNRpBin+k];\r | |
157 | }\r | |
158 | }\r | |
159 | }\r | |
160 | }\r | |
161 | delete [] fEventsList;\r | |
162 | fEventsList=0;\r | |
163 | }\r | |
164 | \r | |
165 | //______________________________________________________________________________\r | |
166 | void AliAnaOmegaToPi0Gamma::InitParameters()\r | |
167 | {\r | |
168 | //Init parameters when first called the analysis\r | |
169 | //Set default parameters\r | |
170 | fInputAODGammaName = "PhotonsPHOS";\r | |
171 | fNmaxMixEv = 4;\r | |
172 | \r | |
173 | fPi0Mass=0.13498;\r | |
174 | fPi0MassWindow=0.015;\r | |
4007d0a2 | 175 | fPi0OverOmegaPtCut=0.8;\r |
176 | fGammaOverOmegaPtCut=0.3;\r | |
0852acd0 | 177 | fNVtxZBin=1;\r |
178 | fNCentBin=1;\r | |
179 | fNRpBin=1;\r | |
180 | fNBadChDistBin=1;\r | |
181 | fNpid=3;\r | |
182 | \r | |
183 | fVtxZCut = new Double_t [fNVtxZBin];\r | |
4007d0a2 | 184 | for(Int_t i=0;i<fNVtxZBin;i++) fVtxZCut[i]=10*(i+1);\r |
0852acd0 | 185 | \r |
186 | fCent=new Double_t[fNCentBin];\r | |
187 | fCent[0]=0;\r | |
188 | \r | |
189 | fRp=new Double_t[fNRpBin];\r | |
190 | fRp[0]=0;\r | |
191 | \r | |
192 | fBadChDist=new Int_t [fNBadChDistBin];\r | |
4007d0a2 | 193 | for(Int_t j=0;j<fNBadChDistBin;j++) fBadChDist[j] = j+2;\r |
194 | /* \r | |
195 | Int_t nptbins = GetHistoPtBins();\r | |
196 | Float_t ptmax = GetHistoPtMax();\r | |
197 | Float_t ptmin = GetHistoPtMin();\r | |
198 | \r | |
199 | Int_t nmassbins = GetHistoMassBins();\r | |
200 | Float_t massmin = GetHistoMassMin();\r | |
201 | Float_t massmax = GetHistoMassMax();\r | |
0852acd0 | 202 | \r |
4007d0a2 | 203 | fhEtalon = new TH2F("hEtalon","Histo with binning parameters", nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ;\r |
0852acd0 | 204 | fhEtalon->SetXTitle("P_{T} (GeV)") ;\r |
205 | fhEtalon->SetYTitle("m_{inv} (GeV)") ;\r | |
4007d0a2 | 206 | */\r |
0852acd0 | 207 | }\r |
208 | \r | |
209 | \r | |
210 | //______________________________________________________________________________\r | |
211 | TList * AliAnaOmegaToPi0Gamma::GetCreateOutputObjects()\r | |
4007d0a2 | 212 | { \r |
213 | \r | |
214 | Int_t nptbins = GetHistoPtBins();\r | |
215 | Float_t ptmax = GetHistoPtMax();\r | |
216 | Float_t ptmin = GetHistoPtMin();\r | |
217 | \r | |
218 | Int_t nmassbins = GetHistoMassBins();\r | |
219 | Float_t massmin = GetHistoMassMin();\r | |
220 | Float_t massmax = GetHistoMassMax();\r | |
221 | \r | |
222 | fhEtalon = new TH2F("hEtalon","Histo with binning parameters", nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ;\r | |
223 | fhEtalon->SetXTitle("P_{T} (GeV)") ;\r | |
224 | fhEtalon->SetYTitle("m_{inv} (GeV)") ;\r | |
225 | \r | |
0852acd0 | 226 | // store them in fOutputContainer\r |
227 | fEventsList = new TList*[fNVtxZBin*fNCentBin*fNRpBin];\r | |
228 | for(Int_t i=0;i<fNVtxZBin;i++){\r | |
229 | for(Int_t j=0;j<fNCentBin;j++){\r | |
230 | for(Int_t k=0;k<fNRpBin;k++){\r | |
231 | fEventsList[i*fNCentBin*fNRpBin+j*fNRpBin+k]=new TList();\r | |
232 | }\r | |
233 | }\r | |
234 | }\r | |
235 | \r | |
236 | \r | |
237 | TList * outputContainer = new TList() ; \r | |
238 | outputContainer->SetName(GetName());\r | |
239 | char key[255] ;\r | |
240 | char title[255] ;\r | |
241 | const char * detector= fInputAODGammaName.Data();\r | |
242 | Int_t ndim=fNVtxZBin*fNCentBin*fNRpBin*fNBadChDistBin*fNpid;\r | |
243 | \r | |
244 | fRealOmega =new TH2F*[ndim];\r | |
245 | fMixAOmega =new TH2F*[ndim];\r | |
246 | fMixBOmega =new TH2F*[ndim];\r | |
247 | fMixCOmega =new TH2F*[ndim];\r | |
248 | \r | |
249 | fRealOmega1 =new TH2F*[ndim];\r | |
250 | fMixAOmega1 =new TH2F*[ndim];\r | |
251 | fMixBOmega1 =new TH2F*[ndim];\r | |
252 | fMixCOmega1 =new TH2F*[ndim];\r | |
253 | \r | |
254 | fRealOmega2 =new TH2F*[ndim];\r | |
255 | fMixAOmega2 =new TH2F*[ndim];\r | |
256 | fMixBOmega2 =new TH2F*[ndim];\r | |
257 | fMixCOmega2 =new TH2F*[ndim];\r | |
258 | \r | |
259 | for(Int_t i=0;i<fNVtxZBin;i++){\r | |
260 | for(Int_t j=0;j<fNCentBin;j++){\r | |
261 | for(Int_t k=0;k<fNRpBin;k++){ //at event level\r | |
262 | Int_t idim=i*fNCentBin*fNRpBin+j*fNRpBin+k;\r | |
263 | for(Int_t ipid=0;ipid<fNpid;ipid++){\r | |
264 | for(Int_t idist=0;idist<fNBadChDistBin;idist++){ //at particle level\r | |
265 | \r | |
266 | Int_t index=idim*fNpid*fNBadChDistBin+ipid*fNBadChDistBin+idist;\r | |
267 | \r | |
268 | sprintf(key,"RPi0Gamma_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r | |
4007d0a2 | 269 | sprintf(title, "%s Real Pi0GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%dcm",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r |
0852acd0 | 270 | fhEtalon->Clone(key);\r |
271 | fRealOmega[index]=(TH2F*)fhEtalon->Clone(key) ;\r | |
272 | fRealOmega[index]->SetName(key) ;\r | |
273 | fRealOmega[index]->SetTitle(title);\r | |
274 | outputContainer->Add(fRealOmega[index]);\r | |
275 | \r | |
276 | sprintf(key,"MAPi0Gamma_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r | |
4007d0a2 | 277 | sprintf(title, "%s MixA Pi0GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%dcm",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r |
0852acd0 | 278 | fhEtalon->Clone(key);\r |
279 | fMixAOmega[index]=(TH2F*)fhEtalon->Clone(key) ;\r | |
280 | fMixAOmega[index]->SetName(key) ;\r | |
281 | fMixAOmega[index]->SetTitle(title);\r | |
282 | outputContainer->Add(fMixAOmega[index]);\r | |
283 | \r | |
284 | sprintf(key,"MBPi0Gamma_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r | |
4007d0a2 | 285 | sprintf(title, "%s MixB Pi0GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%dcm",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r |
0852acd0 | 286 | fhEtalon->Clone(key);\r |
287 | fMixBOmega[index]=(TH2F*)fhEtalon->Clone(key) ;\r | |
288 | fMixBOmega[index]->SetName(key) ;\r | |
289 | fMixBOmega[index]->SetTitle(title);\r | |
290 | outputContainer->Add(fMixBOmega[index]);\r | |
291 | \r | |
292 | sprintf(key,"MCPi0Gamma_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r | |
4007d0a2 | 293 | sprintf(title, "%s MixC Pi0GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%dcm",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r |
0852acd0 | 294 | fhEtalon->Clone(key);\r |
295 | fMixCOmega[index]=(TH2F*)fhEtalon->Clone(key) ;\r | |
296 | fMixCOmega[index]->SetName(key) ;\r | |
297 | fMixCOmega[index]->SetTitle(title);\r | |
298 | outputContainer->Add(fMixCOmega[index]);\r | |
299 | \r | |
300 | sprintf(key,"RPi0Gamma1_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r | |
4007d0a2 | 301 | sprintf(title, "%s Real Pi0(A<0.7)GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%dcm",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r |
0852acd0 | 302 | fhEtalon->Clone(key);\r |
303 | fRealOmega1[index]=(TH2F*)fhEtalon->Clone(key) ;\r | |
304 | fRealOmega1[index]->SetName(key) ;\r | |
305 | fRealOmega1[index]->SetTitle(title);\r | |
306 | outputContainer->Add(fRealOmega1[index]);\r | |
307 | \r | |
308 | sprintf(key,"MAPi0Gamma1_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r | |
4007d0a2 | 309 | sprintf(title, "%s MixA Pi0(A<0.7)GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%dcm",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r |
0852acd0 | 310 | fhEtalon->Clone(key);\r |
311 | fMixAOmega1[index]=(TH2F*)fhEtalon->Clone(key) ;\r | |
312 | fMixAOmega1[index]->SetName(key) ;\r | |
313 | fMixAOmega1[index]->SetTitle(title);\r | |
314 | outputContainer->Add(fMixAOmega1[index]);\r | |
315 | \r | |
316 | sprintf(key,"MBPi0Gamma1_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r | |
4007d0a2 | 317 | sprintf(title, "%s MixB Pi0(A<0.7)GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%dcm",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r |
0852acd0 | 318 | fhEtalon->Clone(key);\r |
319 | fMixBOmega1[index]=(TH2F*)fhEtalon->Clone(key) ;\r | |
320 | fMixBOmega1[index]->SetName(key) ;\r | |
321 | fMixBOmega1[index]->SetTitle(title);\r | |
322 | outputContainer->Add(fMixBOmega1[index]);\r | |
323 | \r | |
324 | sprintf(key,"MCPi0Gamma1_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r | |
4007d0a2 | 325 | sprintf(title, "%s MixC Pi0(A<0.7)GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%dcm",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r |
0852acd0 | 326 | fhEtalon->Clone(key);\r |
327 | fMixCOmega1[index]=(TH2F*)fhEtalon->Clone(key) ;\r | |
328 | fMixCOmega1[index]->SetName(key) ;\r | |
329 | fMixCOmega1[index]->SetTitle(title);\r | |
330 | outputContainer->Add(fMixCOmega1[index]);\r | |
331 | \r | |
332 | sprintf(key,"RPi0Gamma2_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r | |
4007d0a2 | 333 | sprintf(title, "%s Real Pi0(A<0.8)GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%dcm",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r |
0852acd0 | 334 | fhEtalon->Clone(key);\r |
335 | fRealOmega2[index]=(TH2F*)fhEtalon->Clone(key) ;\r | |
336 | fRealOmega2[index]->SetName(key) ;\r | |
337 | fRealOmega2[index]->SetTitle(title);\r | |
338 | outputContainer->Add(fRealOmega2[index]);\r | |
339 | \r | |
340 | sprintf(key,"MAPi0Gamma2_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r | |
4007d0a2 | 341 | sprintf(title, "%s MixA Pi0(A<0.8)GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%dcm",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r |
0852acd0 | 342 | fhEtalon->Clone(key);\r |
343 | fMixAOmega2[index]=(TH2F*)fhEtalon->Clone(key) ;\r | |
344 | fMixAOmega2[index]->SetName(key) ;\r | |
345 | fMixAOmega2[index]->SetTitle(title);\r | |
346 | outputContainer->Add(fMixAOmega2[index]);\r | |
347 | \r | |
348 | sprintf(key,"MBPi0Gamma2_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r | |
4007d0a2 | 349 | sprintf(title, "%s MixB Pi0(A<0.8)GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%dcm",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r |
0852acd0 | 350 | fhEtalon->Clone(key);\r |
351 | fMixBOmega2[index]=(TH2F*)fhEtalon->Clone(key) ;\r | |
352 | fMixBOmega2[index]->SetName(key) ;\r | |
353 | fMixBOmega2[index]->SetTitle(title);\r | |
354 | outputContainer->Add(fMixBOmega2[index]);\r | |
355 | \r | |
356 | sprintf(key,"MCPi0Gamma2_Vz%dC%dRp%dPid%dDist%d",i,j,k,ipid,idist);\r | |
4007d0a2 | 357 | sprintf(title, "%s MixC Pi0(A<0.8)GammaIVM vz_%2.1f_ct_%2.1f_Rp_%2.1f_pid_%d_dist_%dcm",detector,fVtxZCut[i],fCent[j],fRp[k],ipid,fBadChDist[idist]);\r |
0852acd0 | 358 | fhEtalon->Clone(key);\r |
359 | fMixCOmega2[index]=(TH2F*)fhEtalon->Clone(key) ;\r | |
360 | fMixCOmega2[index]->SetName(key) ;\r | |
361 | fMixCOmega2[index]->SetTitle(title);\r | |
362 | outputContainer->Add(fMixCOmega2[index]);\r | |
363 | }\r | |
364 | }\r | |
365 | }\r | |
366 | } \r | |
367 | }\r | |
368 | \r | |
369 | if(IsDataMC()){\r | |
370 | sprintf(key, "%sOmegaPri",detector);\r | |
371 | sprintf(title,"primary #omega in %s",detector);\r | |
4007d0a2 | 372 | fhOmegaPriPt=new TH1F(key, title,nptbins,ptmin,ptmax);\r |
0852acd0 | 373 | fhOmegaPriPt->GetXaxis()->SetTitle("P_{T}");\r |
374 | fhOmegaPriPt->GetYaxis()->SetTitle("dN/P_{T}");\r | |
375 | outputContainer->Add(fhOmegaPriPt);\r | |
376 | }\r | |
377 | \r | |
378 | delete fhEtalon;\r | |
379 | return outputContainer;\r | |
380 | }\r | |
381 | \r | |
382 | //______________________________________________________________________________\r | |
383 | void AliAnaOmegaToPi0Gamma::Print(const Option_t * /*opt*/) const\r | |
384 | {\r | |
385 | //Print some relevant parameters set in the analysis\r | |
386 | printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;\r | |
387 | AliAnaPartCorrBaseClass::Print(" ");\r | |
388 | printf("Omega->pi0+gamma->3gamma\n");\r | |
389 | printf("Cuts at event level: \n");\r | |
390 | printf("Bins of vertex Z: %d \n", fNVtxZBin);\r | |
391 | printf("Bins of centrality: %d \n",fNCentBin);\r | |
392 | printf("Bins of Reaction plane: %d\n",fNRpBin);\r | |
393 | printf("Cuts at AOD particle level:\n");\r | |
394 | printf("Number of PID: %d \n", fNpid);\r | |
395 | printf("Number of DistToBadChannel cuts: %d\n", fNBadChDistBin);\r | |
396 | printf("number of events buffer to be mixed: %d\n",fNmaxMixEv);\r | |
397 | } \r | |
398 | \r | |
399 | //______________________________________________________________________________\r | |
400 | void AliAnaOmegaToPi0Gamma::MakeAnalysisFillHistograms() \r | |
401 | {\r | |
402 | //fill the MC AOD if needed first\r | |
403 | //-----------\r | |
404 | //need to be further implemented\r | |
405 | AliStack * stack = 0x0;\r | |
406 | // TParticle * primary = 0x0;\r | |
407 | TClonesArray * mcparticles0 = 0x0;\r | |
408 | TClonesArray * mcparticles1 = 0x0;\r | |
409 | AliAODMCParticle * aodprimary = 0x0;\r | |
410 | Int_t pdg=0;\r | |
411 | Double_t pt=0;\r | |
412 | Double_t eta=0;\r | |
413 | \r | |
414 | if(IsDataMC()){\r | |
415 | if(GetReader()->ReadStack()){\r | |
416 | stack = GetMCStack() ;\r | |
417 | if(!stack)\r | |
418 | printf("AliAnaAcceptance::MakeAnalysisFillHistograms() - There is no stack!\n");\r | |
419 | for(Int_t i=0 ; i<stack->GetNtrack(); i++){\r | |
420 | TParticle * prim = stack->Particle(i) ;\r | |
421 | pdg = prim->GetPdgCode() ;\r | |
422 | eta=prim->Eta();\r | |
423 | pt=prim->Pt();\r | |
424 | if(TMath::Abs(eta)<0.5) {\r | |
425 | if(pdg==223) fhOmegaPriPt->Fill(pt);\r | |
426 | }\r | |
427 | }\r | |
428 | }\r | |
429 | else if(GetReader()->ReadAODMCParticles()){\r | |
430 | //Get the list of MC particles\r | |
431 | mcparticles0 = GetReader()->GetAODMCParticles(0);\r | |
432 | if(!mcparticles0 && GetDebug() > 0) {\r | |
433 | printf("AliAnaAcceptance::MakeAnalysisFillHistograms() - Standard MCParticles not available!\n");\r | |
434 | }\r | |
435 | if(GetReader()->GetSecondInputAODTree()){\r | |
436 | mcparticles1 = GetReader()->GetAODMCParticles(1);\r | |
437 | if(!mcparticles1 && GetDebug() > 0) {\r | |
438 | printf("AliAnaAcceptance::MakeAnalysisFillHistograms() - Second input MCParticles not available!\n");\r | |
439 | }\r | |
440 | }\r | |
441 | for(Int_t i=0;i<mcparticles0->GetEntries();i++){\r | |
442 | aodprimary =(AliAODMCParticle*)mcparticles0->At(i);\r | |
443 | pdg = aodprimary->GetPdgCode() ;\r | |
444 | eta=aodprimary->Eta();\r | |
445 | pt=aodprimary->Pt();\r | |
446 | if(TMath::Abs(eta)<0.5) {\r | |
447 | if(pdg==223) fhOmegaPriPt->Fill(pt);\r | |
448 | }\r | |
449 | \r | |
450 | }\r | |
451 | }\r | |
452 | }// is data and MC\r | |
453 | \r | |
454 | \r | |
455 | //process event from AOD brach \r | |
456 | //extract pi0, eta and omega analysis\r | |
457 | Int_t iRun=(GetReader()->GetInputEvent())->GetRunNumber() ;\r | |
458 | if(IsBadRun(iRun)) return ; \r | |
459 | \r | |
460 | //vertex z\r | |
461 | Double_t vert[]={0,0,0} ;\r | |
462 | GetReader()->GetVertex(vert);\r | |
463 | Int_t curEventBin =0;\r | |
4007d0a2 | 464 | \r |
465 | Int_t ivtxzbin=(Int_t)TMath::Abs(vert[2])/10;\r | |
466 | if(ivtxzbin>=fNVtxZBin)return;\r | |
467 | \r | |
0852acd0 | 468 | //centrality\r |
469 | Int_t icentbin=0;\r | |
470 | \r | |
471 | //reaction plane\r | |
472 | Int_t irpbin=0;\r | |
473 | \r | |
474 | if(ivtxzbin==-1) return; \r | |
475 | curEventBin = ivtxzbin*fNCentBin*fNRpBin + icentbin*fNRpBin + irpbin;\r | |
476 | \r | |
477 | fInputAODGamma = GetAODBranch(fInputAODGammaName); //photon array\r | |
478 | //fInputAODGamma = (TClonesArray *) GetReader()->GetOutputEvent()->FindListObject(fInputAODGammaName); //photon array\r | |
479 | Int_t nphotons = fInputAODGamma->GetEntries();\r | |
480 | \r | |
481 | fInputAODPi0 = (TClonesArray*)GetInputAODBranch(); //pi0 array\r | |
482 | Int_t npi0s = fInputAODPi0 ->GetEntries();\r | |
483 | \r | |
484 | if(nphotons<3)return; //for pi0, eta and omega->pi0+gamma->3gamma reconstruction\r | |
485 | \r | |
486 | //if((nphotons<3) || (npi0s<=0)) return;\r | |
487 | //reconstruction of omega(782)->pi0+gamma->3gamma\r | |
488 | //loop for pi0 and photon\r | |
489 | if(GetDebug() > 0) printf("omega->pi0+gamma->3gamma invariant mass analysis ! \n");\r | |
490 | for(Int_t i=0;i<npi0s;i++){\r | |
491 | AliAODPWG4Particle * pi0 = (AliAODPWG4Particle*) (fInputAODPi0->At(i)) ; //pi0\r | |
492 | TLorentzVector vpi0(pi0->Px(),pi0->Py(),pi0->Pz(),pi0->E());\r | |
493 | Int_t lab1=pi0->GetCaloLabel(0); // photon1 from pi0 decay\r | |
494 | Int_t lab2=pi0->GetCaloLabel(1); // photon2 from pi0 decay\r | |
495 | //for omega->pi0+gamma, it needs at least three photons per event\r | |
496 | \r | |
497 | //Get the two decay photons from pi0\r | |
498 | AliAODPWG4Particle * photon1 =0;\r | |
499 | AliAODPWG4Particle * photon2 =0;\r | |
500 | for(Int_t d1=0;d1<nphotons;d1++){\r | |
501 | for(Int_t d2=0;d2<nphotons;d2++){\r | |
502 | AliAODPWG4Particle * dp1 = (AliAODPWG4Particle*) (fInputAODGamma->At(d1));\r | |
503 | AliAODPWG4Particle * dp2 = (AliAODPWG4Particle*) (fInputAODGamma->At(d2));\r | |
504 | Int_t dlab1=dp1->GetCaloLabel(0);\r | |
505 | Int_t dlab2=dp2->GetCaloLabel(0);\r | |
506 | if(dlab1==lab1 && dlab2==lab2){\r | |
507 | photon1=dp1;\r | |
508 | photon2=dp2;\r | |
509 | }\r | |
510 | else continue;\r | |
511 | }\r | |
512 | }\r | |
513 | \r | |
514 | //caculate the asy and dist of the two photon from pi0 decay\r | |
515 | TLorentzVector dph1(photon1->Px(),photon1->Py(),photon1->Pz(),photon1->E());\r | |
516 | TLorentzVector dph2(photon2->Px(),photon2->Py(),photon2->Pz(),photon2->E());\r | |
517 | \r | |
518 | Double_t pi0asy= TMath::Abs(dph1.E()-dph2.E())/(dph1.E()+dph2.E());\r | |
519 | // Double_t phi1=dph1.Phi();\r | |
520 | // Double_t phi2=dph2.Phi();\r | |
521 | // Double_t eta1=dph1.Eta();\r | |
522 | // Double_t eta2=dph2.Eta();\r | |
523 | // Double_t pi0dist=TMath::Sqrt((phi1-phi2)*(phi1-phi2)+(eta1-eta2)*(eta1-eta2));\r | |
524 | \r | |
525 | \r | |
526 | if(pi0->GetPdg()==111 && nphotons>2 && npi0s\r | |
527 | && TMath::Abs(vpi0.M()-fPi0Mass)<fPi0MassWindow) { //pi0 candidates\r | |
528 | \r | |
529 | //avoid the double counting\r | |
530 | Int_t * dc1= new Int_t[nphotons];\r | |
531 | Int_t * dc2= new Int_t[nphotons];\r | |
532 | Int_t index1=0;\r | |
533 | Int_t index2=0;\r | |
534 | for(Int_t k=0;k<i;k++){\r | |
535 | AliAODPWG4Particle * p3=(AliAODPWG4Particle*)(fInputAODPi0->At(k));\r | |
536 | Int_t lab4=p3->GetCaloLabel(0);\r | |
537 | Int_t lab5=p3->GetCaloLabel(1);\r | |
538 | if(lab1==lab4){ dc1[index1]=lab5; index1++; }\r | |
539 | if(lab2==lab5){ dc2[index2]=lab4; index2++; }\r | |
540 | }\r | |
541 | \r | |
542 | \r | |
543 | //loop the pi0 with third gamma\r | |
544 | for(Int_t j=0;j<nphotons;j++){\r | |
545 | AliAODPWG4Particle *photon3 = (AliAODPWG4Particle*) (fInputAODGamma->At(j));\r | |
546 | TLorentzVector dph3(photon3->Px(),photon3->Py(),photon3->Pz(),photon3->E());\r | |
547 | Int_t lab3=photon3->GetCaloLabel(0);\r | |
4007d0a2 | 548 | Double_t pi0gammapt=(vpi0+dph3).Pt();\r |
549 | Double_t pi0gammamass=(vpi0+dph3).M();\r | |
550 | Double_t pi0OverOmegaPtRatio =vpi0.Pt()/pi0gammapt; \r | |
551 | Double_t gammaOverOmegaPtRatio= dph3.Pt()/pi0gammapt;\r | |
552 | \r | |
553 | //pi0, gamma pt cut \r | |
554 | if(pi0OverOmegaPtRatio>fPi0OverOmegaPtCut || \r | |
555 | gammaOverOmegaPtRatio<fGammaOverOmegaPtCut) continue;\r | |
0852acd0 | 556 | \r |
557 | for(Int_t l=0;l<index1;l++) if(lab3==dc1[l]) lab3=-1;\r | |
558 | for(Int_t l=0;l<index2;l++) if(lab3==dc2[l]) lab3=-1;\r | |
559 | \r | |
560 | if(lab3>0 && lab3!=lab1 && lab3!=lab2){\r | |
561 | for(Int_t ipid=0;ipid<fNpid;ipid++){\r | |
562 | for(Int_t idist=0;idist<fNBadChDistBin;idist++){\r | |
563 | Int_t index=curEventBin*fNpid*fNBadChDistBin+ipid*fNBadChDistBin+idist;\r | |
564 | if(photon1->IsPIDOK(ipid,AliCaloPID::kPhoton) &&\r | |
565 | photon2->IsPIDOK(ipid,AliCaloPID::kPhoton) && \r | |
566 | photon3->IsPIDOK(ipid,AliCaloPID::kPhoton) &&\r | |
567 | photon1->DistToBad()>=fBadChDist[idist] &&\r | |
568 | photon2->DistToBad()>=fBadChDist[idist] &&\r | |
569 | photon3->DistToBad()>=fBadChDist[idist] ){\r | |
570 | \r | |
0852acd0 | 571 | //fill the histograms\r |
572 | fRealOmega[index]->Fill(pi0gammapt,pi0gammamass); \r | |
573 | if(pi0asy<0.7) fRealOmega1[index]->Fill(pi0gammapt,pi0gammamass);\r | |
574 | if(pi0asy<0.8) fRealOmega2[index]->Fill(pi0gammapt,pi0gammamass);\r | |
575 | //printf("real omega %d %2.2f \n", index, pi0gammamass);\r | |
576 | }\r | |
577 | }\r | |
578 | }\r | |
579 | }\r | |
580 | } \r | |
581 | delete []dc1;\r | |
582 | delete []dc2;\r | |
583 | \r | |
584 | //-------------------------\r | |
585 | //background analysis\r | |
586 | //three background\r | |
587 | // --A (r1_event1+r2_event1)+r3_event2\r | |
588 | \r | |
589 | Int_t nMixed = fEventsList[curEventBin]->GetSize();\r | |
590 | for(Int_t im=0;im<nMixed;im++){\r | |
591 | TClonesArray* ev2= (TClonesArray*) (fEventsList[curEventBin]->At(im));\r | |
592 | for(Int_t mix1=0;mix1<ev2->GetEntries();mix1++){\r | |
593 | AliAODPWG4Particle *mix1ph = (AliAODPWG4Particle*) (ev2->At(mix1)); \r | |
594 | TLorentzVector vmixph(mix1ph->Px(),mix1ph->Py(),mix1ph->Pz(),mix1ph->E());\r | |
4007d0a2 | 595 | Double_t pi0gammapt=(vpi0+vmixph).Pt();\r |
596 | Double_t pi0gammamass=(vpi0+vmixph).M();\r | |
597 | Double_t pi0OverOmegaPtRatio =vpi0.Pt()/pi0gammapt;\r | |
598 | Double_t gammaOverOmegaPtRatio= vmixph.Pt()/pi0gammapt;\r | |
599 | \r | |
600 | //pi0, gamma pt cut \r | |
601 | if(pi0OverOmegaPtRatio>fPi0OverOmegaPtCut || \r | |
602 | gammaOverOmegaPtRatio<fGammaOverOmegaPtCut) continue;\r | |
603 | \r | |
0852acd0 | 604 | for(Int_t ipid=0;ipid<fNpid;ipid++){\r |
605 | for(Int_t idist=0;idist<fNBadChDistBin;idist++){\r | |
606 | Int_t index=curEventBin*fNpid*fNBadChDistBin+ipid*fNBadChDistBin+idist;\r | |
607 | if(photon1->IsPIDOK(ipid,AliCaloPID::kPhoton)&&\r | |
608 | photon2->IsPIDOK(ipid,AliCaloPID::kPhoton)&&\r | |
609 | mix1ph->IsPIDOK(ipid,AliCaloPID::kPhoton) &&\r | |
610 | photon1->DistToBad()>=fBadChDist[idist] &&\r | |
611 | photon2->DistToBad()>=fBadChDist[idist] &&\r | |
612 | mix1ph->DistToBad()>=fBadChDist[idist] ){\r | |
613 | \r | |
0852acd0 | 614 | //fill the histograms\r |
615 | fMixAOmega[index]->Fill(pi0gammapt,pi0gammamass);\r | |
616 | if(pi0asy<0.7)fMixAOmega1[index]->Fill(pi0gammapt,pi0gammamass);\r | |
617 | if(pi0asy<0.8)fMixAOmega2[index]->Fill(pi0gammapt,pi0gammamass);\r | |
618 | //printf("mix A %d %2.2f \n", index, pi0gammamass);\r | |
619 | \r | |
620 | }\r | |
621 | }\r | |
622 | }\r | |
623 | }\r | |
624 | }\r | |
625 | }\r | |
626 | }\r | |
627 | \r | |
628 | //\r | |
629 | // --B (r1_event1+r2_event2)+r3_event2\r | |
630 | //\r | |
631 | for(Int_t i=0;i<nphotons;i++){\r | |
632 | AliAODPWG4Particle *ph1 = (AliAODPWG4Particle*) (fInputAODGamma->At(i)); \r | |
633 | TLorentzVector vph1(ph1->Px(),ph1->Py(),ph1->Pz(),ph1->E());\r | |
634 | \r | |
635 | Int_t nMixed = fEventsList[curEventBin]->GetSize();\r | |
636 | for(Int_t ie=0;ie<nMixed;ie++){\r | |
637 | TClonesArray* ev2= (TClonesArray*) (fEventsList[curEventBin]->At(ie));\r | |
638 | for(Int_t mix1=0;mix1<ev2->GetEntries();mix1++){\r | |
639 | AliAODPWG4Particle *ph2 = (AliAODPWG4Particle*) (ev2->At(mix1));\r | |
640 | TLorentzVector vph2(ph2->Px(),ph2->Py(),ph2->Pz(),ph2->E());\r | |
641 | Double_t pi0asy = TMath::Abs(vph1.E()-vph2.E())/(vph1.E()+vph2.E()); \r | |
642 | Double_t pi0mass=(vph1+vph2).M();\r | |
643 | \r | |
644 | if(TMath::Abs(pi0mass-fPi0Mass)<fPi0MassWindow){//for pi0 selection\r | |
645 | for(Int_t mix2=(mix1+1);mix2<ev2->GetEntries();mix2++){\r | |
646 | AliAODPWG4Particle *ph3 = (AliAODPWG4Particle*) (ev2->At(mix2));\r | |
647 | TLorentzVector vph3(ph3->Px(),ph3->Py(),ph3->Pz(),ph3->E());\r | |
648 | \r | |
649 | Double_t pi0gammapt=(vph1+vph2+vph3).Pt();\r | |
650 | Double_t pi0gammamass=(vph1+vph2+vph3).M(); \r | |
4007d0a2 | 651 | Double_t pi0OverOmegaPtRatio =(vph1+vph2).Pt()/pi0gammapt;\r |
652 | Double_t gammaOverOmegaPtRatio= vph3.Pt()/pi0gammapt;\r | |
653 | \r | |
654 | //pi0, gamma pt cut \r | |
655 | if(pi0OverOmegaPtRatio>fPi0OverOmegaPtCut ||\r | |
656 | gammaOverOmegaPtRatio<fGammaOverOmegaPtCut) continue;\r | |
657 | \r | |
0852acd0 | 658 | for(Int_t ipid=0;ipid<fNpid;ipid++){\r |
659 | for(Int_t idist=0;idist<fNBadChDistBin;idist++){\r | |
660 | Int_t index=curEventBin*fNpid*fNBadChDistBin+ipid*fNBadChDistBin+idist;\r | |
661 | if(ph1->IsPIDOK(ipid,AliCaloPID::kPhoton) &&\r | |
662 | ph2->IsPIDOK(ipid,AliCaloPID::kPhoton) &&\r | |
663 | ph3->IsPIDOK(ipid,AliCaloPID::kPhoton) &&\r | |
664 | ph1->DistToBad()>=fBadChDist[idist] &&\r | |
665 | ph2->DistToBad()>=fBadChDist[idist] &&\r | |
666 | ph3->DistToBad()>=fBadChDist[idist] ){\r | |
667 | //fill histograms\r | |
668 | fMixBOmega[index]->Fill(pi0gammapt,pi0gammamass);\r | |
669 | if(pi0asy<0.7) fMixBOmega1[index]->Fill(pi0gammapt,pi0gammamass);\r | |
670 | if(pi0asy<0.8) fMixBOmega2[index]->Fill(pi0gammapt,pi0gammamass);\r | |
671 | //printf("mix B %d %2.2f \n", index, pi0gammamass);\r | |
672 | }\r | |
673 | } \r | |
674 | }\r | |
675 | }\r | |
676 | \r | |
677 | //\r | |
678 | // --C (r1_event1+r2_event2)+r3_event3\r | |
679 | //\r | |
680 | for(Int_t je=(ie+1);je<nMixed;je++){\r | |
681 | TClonesArray* ev3= (TClonesArray*) (fEventsList[curEventBin]->At(je));\r | |
682 | for(Int_t mix3=0;mix3<ev3->GetEntries();mix3++){\r | |
683 | AliAODPWG4Particle *ph3 = (AliAODPWG4Particle*) (ev3->At(mix3));\r | |
684 | TLorentzVector vph3(ph3->Px(),ph3->Py(),ph3->Pz(),ph3->E());\r | |
685 | \r | |
686 | Double_t pi0gammapt=(vph1+vph2+vph3).Pt();\r | |
687 | Double_t pi0gammamass=(vph1+vph2+vph3).M();\r | |
4007d0a2 | 688 | Double_t pi0OverOmegaPtRatio =(vph1+vph2).Pt()/pi0gammapt;\r |
689 | Double_t gammaOverOmegaPtRatio= vph3.Pt()/pi0gammapt;\r | |
690 | \r | |
691 | //pi0, gamma pt cut \r | |
692 | if(pi0OverOmegaPtRatio>fPi0OverOmegaPtCut ||\r | |
693 | gammaOverOmegaPtRatio<fGammaOverOmegaPtCut) continue;\r | |
694 | \r | |
0852acd0 | 695 | for(Int_t ipid=0;ipid<fNpid;ipid++){\r |
696 | for(Int_t idist=0;idist<fNBadChDistBin;idist++){\r | |
697 | Int_t index=curEventBin*fNpid*fNBadChDistBin+ipid*fNBadChDistBin+idist;\r | |
698 | if(ph1->IsPIDOK(ipid,AliCaloPID::kPhoton) &&\r | |
699 | ph2->IsPIDOK(ipid,AliCaloPID::kPhoton) &&\r | |
700 | ph3->IsPIDOK(ipid,AliCaloPID::kPhoton) &&\r | |
701 | ph1->DistToBad()>=fBadChDist[idist] &&\r | |
702 | ph2->DistToBad()>=fBadChDist[idist] &&\r | |
703 | ph3->DistToBad()>=fBadChDist[idist] ){\r | |
704 | //fill histograms\r | |
705 | fMixCOmega[index]->Fill(pi0gammapt,pi0gammamass);\r | |
706 | if(pi0asy<0.7) fMixCOmega1[index]->Fill(pi0gammapt,pi0gammamass);\r | |
707 | if(pi0asy<0.8) fMixCOmega2[index]->Fill(pi0gammapt,pi0gammamass);\r | |
708 | //printf("mix C %d %2.2f \n", index, pi0gammamass);\r | |
709 | }\r | |
710 | }\r | |
711 | }\r | |
712 | }\r | |
713 | }\r | |
714 | } //for pi0 selecton \r | |
715 | }\r | |
716 | }\r | |
717 | }\r | |
718 | \r | |
719 | //event buffer \r | |
720 | TClonesArray *currentEvent = new TClonesArray(*fInputAODGamma);\r | |
721 | if(currentEvent->GetEntriesFast()>0){\r | |
722 | fEventsList[curEventBin]->AddFirst(currentEvent) ;\r | |
723 | currentEvent=0 ; \r | |
724 | if(fEventsList[curEventBin]->GetSize()>=fNmaxMixEv) {\r | |
725 | TClonesArray * tmp = (TClonesArray*) (fEventsList[curEventBin]->Last()) ;\r | |
726 | fEventsList[curEventBin]->RemoveLast() ;\r | |
727 | delete tmp ;\r | |
728 | }\r | |
729 | }\r | |
730 | else{ \r | |
731 | delete currentEvent ;\r | |
732 | currentEvent=0 ;\r | |
733 | }\r | |
734 | \r | |
735 | }\r | |
736 | \r | |
737 | //______________________________________________________________________________\r | |
738 | void AliAnaOmegaToPi0Gamma::ReadHistograms(TList * outputList)\r | |
739 | {\r | |
740 | //read the histograms \r | |
741 | //for the finalization of the terminate analysis\r | |
742 | \r | |
743 | Int_t index = outputList->IndexOf(outputList->FindObject(GetAddedHistogramsStringToName()+"RPi0Gamma_Vz0C0Rp0Pid0Dist0"));\r | |
744 | \r | |
745 | Int_t ndim=fNVtxZBin*fNCentBin*fNRpBin*fNBadChDistBin*fNpid;\r | |
746 | \r | |
747 | if(!fRealOmega) fRealOmega =new TH2F*[ndim];\r | |
748 | if(!fMixAOmega) fMixAOmega =new TH2F*[ndim];\r | |
749 | if(!fMixBOmega) fMixBOmega =new TH2F*[ndim];\r | |
750 | if(!fMixCOmega) fMixCOmega =new TH2F*[ndim];\r | |
751 | \r | |
752 | if(!fRealOmega1) fRealOmega1 =new TH2F*[ndim];\r | |
753 | if(!fMixAOmega1) fMixAOmega1 =new TH2F*[ndim];\r | |
754 | if(!fMixBOmega1) fMixBOmega1 =new TH2F*[ndim];\r | |
755 | if(!fMixCOmega1) fMixCOmega1 =new TH2F*[ndim];\r | |
756 | \r | |
757 | if(!fRealOmega2) fRealOmega2 =new TH2F*[ndim];\r | |
758 | if(!fMixAOmega2) fMixAOmega2 =new TH2F*[ndim];\r | |
759 | if(!fMixBOmega2) fMixBOmega2 =new TH2F*[ndim];\r | |
760 | if(!fMixCOmega2) fMixCOmega2 =new TH2F*[ndim];\r | |
761 | \r | |
762 | for(Int_t i=0;i<fNVtxZBin;i++){\r | |
763 | for(Int_t j=0;j<fNCentBin;j++){\r | |
764 | for(Int_t k=0;k<fNRpBin;k++){ //at event level\r | |
765 | Int_t idim=i*fNCentBin*fNRpBin+j*fNRpBin+k;\r | |
766 | for(Int_t ipid=0;ipid<fNpid;ipid++){ \r | |
767 | for(Int_t idist=0;idist<fNBadChDistBin;idist++){ //at particle\r | |
768 | Int_t ind=idim*fNpid*fNBadChDistBin+ipid*fNBadChDistBin+idist;\r | |
769 | fRealOmega[ind]= (TH2F*) outputList->At(index++);\r | |
770 | fMixAOmega[ind]= (TH2F*) outputList->At(index++);\r | |
771 | fMixBOmega[ind]= (TH2F*) outputList->At(index++);\r | |
772 | fMixCOmega[ind]= (TH2F*) outputList->At(index++);\r | |
773 | \r | |
774 | fRealOmega1[ind]= (TH2F*) outputList->At(index++);\r | |
775 | fMixAOmega1[ind]= (TH2F*) outputList->At(index++);\r | |
776 | fMixBOmega1[ind]= (TH2F*) outputList->At(index++);\r | |
777 | fMixCOmega1[ind]= (TH2F*) outputList->At(index++);\r | |
778 | \r | |
779 | fRealOmega2[ind]= (TH2F*) outputList->At(index++);\r | |
780 | fMixAOmega2[ind]= (TH2F*) outputList->At(index++);\r | |
781 | fMixBOmega2[ind]= (TH2F*) outputList->At(index++);\r | |
782 | fMixCOmega2[ind]= (TH2F*) outputList->At(index++);\r | |
783 | \r | |
784 | \r | |
785 | }\r | |
786 | }\r | |
787 | }\r | |
788 | }\r | |
789 | }\r | |
790 | \r | |
791 | if(IsDataMC()){\r | |
792 | fhOmegaPriPt = (TH1F*) outputList->At(index++);\r | |
793 | }\r | |
794 | \r | |
795 | }\r | |
796 | \r | |
797 | //______________________________________________________________________________\r | |
798 | void AliAnaOmegaToPi0Gamma::Terminate(TList * outputList) \r | |
799 | {\r | |
800 | // //Do some calculations and plots from the final histograms.\r | |
801 | if(GetDebug() >= 0) printf("AliAnaOmegaToPi0Gamma::Terminate() \n");\r | |
802 | ReadHistograms(outputList);\r | |
803 | char cvs1[128]; \r | |
804 | sprintf(cvs1, "Neutral_%s_IVM",fInputAODGammaName.Data());\r | |
805 | \r | |
806 | TCanvas * cvsIVM = new TCanvas(cvs1, cvs1, 400, 10, 600, 700) ;\r | |
807 | cvsIVM->Divide(2, 2);\r | |
808 | \r | |
809 | cvsIVM->cd(1);\r | |
4007d0a2 | 810 | char dec[128];\r |
811 | sprintf(dec,"h2Real_%s",fInputAODGammaName.Data());\r | |
812 | TH2F * h2Real= (TH2F*)fRealOmega[0]->Clone(dec);\r | |
0852acd0 | 813 | h2Real->GetXaxis()->SetRangeUser(4,6);\r |
814 | TH1F * hRealOmega = (TH1F*) h2Real->ProjectionY();\r | |
815 | hRealOmega->SetTitle("RealPi0Gamma 4<pt<6");\r | |
816 | hRealOmega->SetLineColor(2);\r | |
817 | hRealOmega->Draw();\r | |
818 | \r | |
819 | cvsIVM->cd(2);\r | |
4007d0a2 | 820 | sprintf(dec,"hMixA_%s",fInputAODGammaName.Data());\r |
821 | TH2F *h2MixA= (TH2F*)fMixAOmega[0]->Clone(dec);\r | |
0852acd0 | 822 | h2MixA->GetXaxis()->SetRangeUser(4,6);\r |
823 | TH1F * hMixAOmega = (TH1F*) h2MixA->ProjectionY();\r | |
824 | hMixAOmega->SetTitle("MixA 4<pt<6");\r | |
825 | hMixAOmega->SetLineColor(2);\r | |
826 | hMixAOmega->Draw();\r | |
827 | \r | |
828 | cvsIVM->cd(3);\r | |
4007d0a2 | 829 | sprintf(dec,"hMixB_%s",fInputAODGammaName.Data());\r |
830 | TH2F * h2MixB= (TH2F*)fMixBOmega[0]->Clone(dec);\r | |
0852acd0 | 831 | h2MixB->GetXaxis()->SetRangeUser(4,6);\r |
832 | TH1F * hMixBOmega = (TH1F*) h2MixB->ProjectionY();\r | |
833 | hMixBOmega->SetTitle("MixB 4<pt<6");\r | |
834 | hMixBOmega->SetLineColor(2);\r | |
835 | hMixBOmega->Draw();\r | |
836 | \r | |
837 | cvsIVM->cd(4);\r | |
4007d0a2 | 838 | sprintf(dec,"hMixC_%s",fInputAODGammaName.Data());\r |
839 | TH2F *h2MixC= (TH2F*)fMixCOmega[0]->Clone(dec);\r | |
0852acd0 | 840 | h2MixC->GetXaxis()->SetRangeUser(4,6);\r |
841 | TH1F * hMixCOmega = (TH1F*) h2MixC->ProjectionY();\r | |
842 | hMixCOmega->SetTitle("MixC 4<pt<6");\r | |
843 | hMixCOmega->SetLineColor(2);\r | |
844 | hMixCOmega->Draw();\r | |
845 | \r | |
846 | char eps[128 ];\r | |
847 | sprintf(eps,"CVS_%s_IVM.eps",fInputAODGammaName.Data());\r | |
848 | cvsIVM->Print(eps);\r | |
849 | cvsIVM->Modified();\r | |
850 | \r | |
851 | }\r |