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