1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
17 //_________________________________________________________________________
18 // Class to collect two-photon invariant mass distributions for
19 // extractin raw pi0 yield.
21 //-- Author: Dmitri Peressounko (RRC "KI")
22 //-- Adapted to PartCorr frame by Lamia Benhabib (SUBATECH)
23 //-- and Gustavo Conesa (INFN-Frascati)
24 //_________________________________________________________________________
27 // --- ROOT system ---
29 //#include "Riostream.h"
34 //---- AliRoot system ----
35 #include "AliAnaPi0.h"
36 #include "AliCaloTrackReader.h"
37 #include "AliCaloPID.h"
41 #include "AliPHOSGeoUtils.h"
46 //________________________________________________________________________________________________________________________________________________
47 AliAnaPi0::AliAnaPi0() : AliAnaPartCorrBaseClass(),
48 fNCentrBin(0),fNZvertBin(0),fNrpBin(0),
49 fNPID(0),fNmaxMixEv(0), fZvtxCut(0.),fCalorimeter(""),
50 fEventsList(0x0), fhEtalon(0x0),
51 fhRe1(0x0),fhMi1(0x0),fhRe2(0x0),fhMi2(0x0),fhRe3(0x0),fhMi3(0x0),fhEvents(0x0),
52 fhPrimPt(0x0), fhPrimAccPt(0x0), fhPrimY(0x0), fhPrimAccY(0x0), fhPrimPhi(0x0), fhPrimAccPhi(0x0)
59 //________________________________________________________________________________________________________________________________________________
60 AliAnaPi0::AliAnaPi0(const AliAnaPi0 & ex) : AliAnaPartCorrBaseClass(ex),
61 fNCentrBin(ex.fNCentrBin),fNZvertBin(ex.fNZvertBin),fNrpBin(ex.fNrpBin),
62 fNPID(ex.fNPID),fNmaxMixEv(ex.fNmaxMixEv),fZvtxCut(ex.fZvtxCut), fCalorimeter(ex.fCalorimeter),
63 fEventsList(ex.fEventsList), fhEtalon(ex.fhEtalon),
64 fhRe1(ex.fhRe1),fhMi1(ex.fhMi1),fhRe2(ex.fhRe2),fhMi2(ex.fhMi2),fhRe3(ex.fhRe3),fhMi3(ex.fhMi3),fhEvents(ex.fhEvents),
65 fhPrimPt(ex.fhPrimPt), fhPrimAccPt(ex.fhPrimAccPt), fhPrimY(ex.fhPrimY),
66 fhPrimAccY(ex.fhPrimAccY), fhPrimPhi(ex.fhPrimPhi), fhPrimAccPhi(ex.fhPrimAccPhi)
72 //________________________________________________________________________________________________________________________________________________
73 AliAnaPi0 & AliAnaPi0::operator = (const AliAnaPi0 & ex)
75 // assignment operator
77 if(this == &ex)return *this;
78 ((AliAnaPartCorrBaseClass *)this)->operator=(ex);
80 fNCentrBin = ex.fNCentrBin ; fNZvertBin = ex.fNZvertBin ; fNrpBin = ex.fNrpBin ;
81 fNPID = ex.fNPID ; fNmaxMixEv = ex.fNmaxMixEv ; fZvtxCut = ex.fZvtxCut ; fCalorimeter = ex.fCalorimeter ;
82 fEventsList = ex.fEventsList ; fhEtalon = ex.fhEtalon ;
83 fhRe1 = ex.fhRe1 ; fhMi1 = ex.fhMi1 ; fhRe2 = ex.fhRe2 ; fhMi2 = ex.fhMi2 ;
84 fhRe3 = ex.fhRe3 ; fhMi3 = ex.fhMi3 ; fhEvents = ex.fhEvents ;
85 fhPrimPt = ex.fhPrimPt ; fhPrimAccPt = ex.fhPrimAccPt ; fhPrimY = ex.fhPrimY ;
86 fhPrimAccY = ex.fhPrimAccY ; fhPrimPhi = ex.fhPrimPhi ; fhPrimAccPhi = ex.fhPrimAccPhi ;
92 //________________________________________________________________________________________________________________________________________________
93 AliAnaPi0::~AliAnaPi0() {
94 // Remove event containers
96 for(Int_t ic=0; ic<fNCentrBin; ic++){
97 for(Int_t iz=0; iz<fNZvertBin; iz++){
98 for(Int_t irp=0; irp<fNrpBin; irp++){
99 fEventsList[ic*fNZvertBin*fNrpBin+iz*fNrpBin+irp]->Delete() ;
100 delete fEventsList[ic*fNZvertBin*fNrpBin+iz*fNrpBin+irp] ;
104 delete[] fEventsList;
109 if(fPHOSGeo) delete fPHOSGeo ;
113 //________________________________________________________________________________________________________________________________________________
114 void AliAnaPi0::InitParameters()
116 //Init parameters when first called the analysis
117 //Set default parameters
118 SetInputAODName("photons");
125 fCalorimeter = "PHOS";
127 //________________________________________________________________________________________________________________________________________________
128 void AliAnaPi0::Init()
130 //Init some data members needed in analysis
132 //Histograms binning and range
133 if(!fhEtalon){ // p_T alpha d m_gg
134 fhEtalon = new TH3D("hEtalon","Histo with binning parameters",50,0.,25.,10,0.,1.,200,0.,1.) ;
135 fhEtalon->SetXTitle("P_{T} (GeV)") ;
136 fhEtalon->SetYTitle("#alpha") ;
137 fhEtalon->SetZTitle("m_{#gamma#gamma} (GeV)") ;
141 //create event containers
142 fEventsList = new TList*[fNCentrBin*fNZvertBin*fNrpBin] ;
144 for(Int_t ic=0; ic<fNCentrBin; ic++){
145 for(Int_t iz=0; iz<fNZvertBin; iz++){
146 for(Int_t irp=0; irp<fNrpBin; irp++){
147 fEventsList[ic*fNZvertBin*fNrpBin+iz*fNrpBin+irp] = new TList() ;
152 //If Geometry library loaded, do geometry selection during analysis.
154 printf("PHOS geometry initialized!\n");
155 fPHOSGeo = new AliPHOSGeoUtils("PHOSgeo") ;
160 //________________________________________________________________________________________________________________________________________________
161 TList * AliAnaPi0::GetCreateOutputObjects()
163 // Create histograms to be saved in output file and
164 // store them in fOutputContainer
167 TList * outputContainer = new TList() ;
168 outputContainer->SetName(GetName());
170 fhRe1=new TH3D*[fNCentrBin*fNPID] ;
171 fhRe2=new TH3D*[fNCentrBin*fNPID] ;
172 fhRe3=new TH3D*[fNCentrBin*fNPID] ;
173 fhMi1=new TH3D*[fNCentrBin*fNPID] ;
174 fhMi2=new TH3D*[fNCentrBin*fNPID] ;
175 fhMi3=new TH3D*[fNCentrBin*fNPID] ;
180 for(Int_t ic=0; ic<fNCentrBin; ic++){
181 for(Int_t ipid=0; ipid<fNPID; ipid++){
183 //Distance to bad module 1
184 sprintf(key,"hRe_cen%d_pid%d_dist1",ic,ipid) ;
185 sprintf(title,"Real m_{#gamma#gamma} distr. for centrality=%d and PID=%d",ic,ipid) ;
187 fhEtalon->Clone(key);
188 fhRe1[ic*fNPID+ipid]=(TH3D*)fhEtalon->Clone(key) ;
189 fhRe1[ic*fNPID+ipid]->SetName(key) ;
190 fhRe1[ic*fNPID+ipid]->SetTitle(title) ;
191 outputContainer->Add(fhRe1[ic*fNPID+ipid]) ;
193 sprintf(key,"hMi_cen%d_pid%d_dist1",ic,ipid) ;
194 sprintf(title,"Mixed m_{#gamma#gamma} distr. for centrality=%d and PID=%d",ic,ipid) ;
195 fhMi1[ic*fNPID+ipid]=(TH3D*)fhEtalon->Clone(key) ;
196 fhMi1[ic*fNPID+ipid]->SetName(key) ;
197 fhMi1[ic*fNPID+ipid]->SetTitle(title) ;
198 outputContainer->Add(fhMi1[ic*fNPID+ipid]) ;
200 //Distance to bad module 2
201 sprintf(key,"hRe_cen%d_pid%d_dist2",ic,ipid) ;
202 sprintf(title,"Real m_{#gamma#gamma} distr. for centrality=%d and PID=%d",ic,ipid) ;
203 fhRe2[ic*fNPID+ipid]=(TH3D*)fhEtalon->Clone(key) ;
204 fhRe2[ic*fNPID+ipid]->SetName(key) ;
205 fhRe2[ic*fNPID+ipid]->SetTitle(title) ;
206 outputContainer->Add(fhRe2[ic*fNPID+ipid]) ;
208 sprintf(key,"hMi_cen%d_pid%d_dist2",ic,ipid) ;
209 sprintf(title,"Mixed m_{#gamma#gamma} distr. for centrality=%d and PID=%d",ic,ipid) ;
210 fhMi2[ic*fNPID+ipid]=(TH3D*)fhEtalon->Clone(key) ;
211 fhMi2[ic*fNPID+ipid]->SetName(key) ;
212 fhMi2[ic*fNPID+ipid]->SetTitle(title) ;
213 outputContainer->Add(fhMi2[ic*fNPID+ipid]) ;
215 //Distance to bad module 3
216 sprintf(key,"hRe_cen%d_pid%d_dist3",ic,ipid) ;
217 sprintf(title,"Real m_{#gamma#gamma} distr. for centrality=%d and PID=%d",ic,ipid) ;
218 fhRe3[ic*fNPID+ipid]=(TH3D*)fhEtalon->Clone(key) ;
219 fhRe3[ic*fNPID+ipid]->SetName(key) ;
220 fhRe3[ic*fNPID+ipid]->SetTitle(title) ;
221 outputContainer->Add(fhRe3[ic*fNPID+ipid]) ;
223 sprintf(key,"hMi_cen%d_pid%d_dist3",ic,ipid) ;
224 sprintf(title,"Mixed m_{#gamma#gamma} distr. for centrality=%d and PID=%d",ic,ipid) ;
225 fhMi3[ic*fNPID+ipid]=(TH3D*)fhEtalon->Clone(key) ;
226 fhMi3[ic*fNPID+ipid]->SetName(key) ;
227 fhMi3[ic*fNPID+ipid]->SetTitle(title) ;
228 outputContainer->Add(fhMi3[ic*fNPID+ipid]) ;
233 fhEvents=new TH3D("hEvents","Number of events",fNCentrBin,0.,1.*fNCentrBin,
234 fNZvertBin,0.,1.*fNZvertBin,fNrpBin,0.,1.*fNrpBin) ;
235 outputContainer->Add(fhEvents) ;
237 //Histograms filled only if MC data is requested
238 if(IsDataMC() || (GetReader()->GetDataType() == AliCaloTrackReader::kMC) ){
239 if(fhEtalon->GetXaxis()->GetXbins() && fhEtalon->GetXaxis()->GetXbins()->GetSize()){ //Variable bin size
240 fhPrimPt = new TH1D("hPrimPt","Primary pi0 pt",fhEtalon->GetXaxis()->GetNbins(),fhEtalon->GetXaxis()->GetXbins()->GetArray()) ;
241 fhPrimAccPt = new TH1D("hPrimAccPt","Primary pi0 pt with both photons in acceptance",fhEtalon->GetXaxis()->GetNbins(),
242 fhEtalon->GetXaxis()->GetXbins()->GetArray()) ;
245 fhPrimPt = new TH1D("hPrimPt","Primary pi0 pt",fhEtalon->GetXaxis()->GetNbins(),fhEtalon->GetXaxis()->GetXmin(),fhEtalon->GetXaxis()->GetXmax()) ;
246 fhPrimAccPt = new TH1D("hPrimAccPt","Primary pi0 pt with both photons in acceptance",
247 fhEtalon->GetXaxis()->GetNbins(),fhEtalon->GetXaxis()->GetXmin(),fhEtalon->GetXaxis()->GetXmax()) ;
249 outputContainer->Add(fhPrimPt) ;
250 outputContainer->Add(fhPrimAccPt) ;
252 fhPrimY = new TH1D("hPrimaryRapidity","Rapidity of primary pi0",100,-5.,5.) ;
253 outputContainer->Add(fhPrimY) ;
255 fhPrimAccY = new TH1D("hPrimAccRapidity","Rapidity of primary pi0",100,-5.,5.) ;
256 outputContainer->Add(fhPrimAccY) ;
258 fhPrimPhi = new TH1D("hPrimaryPhi","Azimithal of primary pi0",180,0.,360.) ;
259 outputContainer->Add(fhPrimPhi) ;
261 fhPrimAccPhi = new TH1D("hPrimAccPhi","Azimithal of primary pi0 with accepted daughters",180,-0.,360.) ;
262 outputContainer->Add(fhPrimAccPhi) ;
265 //Save parameters used for analysis
266 TString parList ; //this will be list of parameters used for this analysis.
268 sprintf(onePar,"--- AliAnaPi0 ---\n") ;
270 sprintf(onePar,"Number of bins in Centrality: %d \n",fNCentrBin) ;
272 sprintf(onePar,"Number of bins in Z vert. pos: %d \n",fNZvertBin) ;
274 sprintf(onePar,"Number of bins in Reac. Plain: %d \n",fNrpBin) ;
276 sprintf(onePar,"Depth of event buffer: %d \n",fNmaxMixEv) ;
278 sprintf(onePar,"Number of different PID used: %d \n",fNPID) ;
280 sprintf(onePar,"Cuts: \n") ;
282 sprintf(onePar,"Z vertex position: -%f < z < %f \n",fZvtxCut,fZvtxCut) ;
284 sprintf(onePar,"Calorimeter: %s \n",fCalorimeter.Data()) ;
287 TObjString *oString= new TObjString(parList) ;
288 outputContainer->Add(oString);
290 return outputContainer;
293 //_________________________________________________________________________________________________________________________________________________
294 void AliAnaPi0::Print(const Option_t * /*opt*/) const
296 //Print some relevant parameters set for the analysis
297 AliAnaPartCorrBaseClass::Print(" ");
298 printf("Class AliAnaPi0 for gamma-gamma inv.mass construction \n") ;
299 printf("Number of bins in Centrality: %d \n",fNCentrBin) ;
300 printf("Number of bins in Z vert. pos: %d \n",fNZvertBin) ;
301 printf("Number of bins in Reac. Plain: %d \n",fNrpBin) ;
302 printf("Depth of event buffer: %d \n",fNmaxMixEv) ;
303 printf("Number of different PID used: %d \n",fNPID) ;
305 printf("Z vertex position: -%2.3f < z < %2.3f \n",fZvtxCut,fZvtxCut) ;
306 printf("------------------------------------------------------\n") ;
310 //____________________________________________________________________________________________________________________________________________________
311 void AliAnaPi0::MakeAnalysisFillHistograms()
313 //Process one event and extract photons from AOD branch
314 // filled with AliAnaPhoton and fill histos with invariant mass
316 //Apply some cuts on event: vertex position and centrality range
317 Int_t iRun=(GetReader()->GetInputEvent())->GetRunNumber() ;
318 if(IsBadRun(iRun)) return ;
320 Double_t vert[]={0,0,0} ; //vertex ;
321 GetReader()->GetVertex(vert);
322 if(vert[2]<-fZvtxCut || vert[2]> fZvtxCut) return ; //Event can not be used (vertex, centrality,... cuts not fulfilled)
324 //Get Centrality and calculate centrality bin
325 //Does not exist in ESD yet???????
326 Int_t curCentrBin=0 ;
328 //Get Reaction Plain position and calculate RP bin
329 //does not exist in ESD yet????
332 Int_t curZvertBin=(Int_t)(0.5*fNZvertBin*(vert[2]+fZvtxCut)/fZvtxCut) ;
334 fhEvents->Fill(curCentrBin+0.5,curZvertBin+0.5,curRPBin+0.5) ;
336 Int_t nPhot = GetInputAODBranch()->GetEntriesFast() ;
337 if(GetDebug() > 1) printf("AliAnaPi0::FillHistos: photon entries %d\n", nPhot);
339 for(Int_t i1=0; i1<nPhot-1; i1++){
340 AliAODPWG4Particle * p1 = (AliAODPWG4Particle*) (GetInputAODBranch()->At(i1)) ;
341 TLorentzVector photon1(p1->Px(),p1->Py(),p1->Pz(),p1->E());
342 for(Int_t i2=i1+1; i2<nPhot; i2++){
343 AliAODPWG4Particle * p2 = (AliAODPWG4Particle*) (GetInputAODBranch()->At(i2)) ;
344 TLorentzVector photon2(p2->Px(),p2->Py(),p2->Pz(),p2->E());
345 Double_t m = (photon1 + photon2).M() ;
346 Double_t pt = (photon1 + photon2).Pt();
347 Double_t a = TMath::Abs(p1->E()-p2->E())/(p1->E()+p2->E()) ;
349 printf("AliAnaPi0::FillHistos: Current Event: pT: photon1 %2.2f, photon2 %2.2f; Pair: pT %2.2f, mass %2.3f, a %f2.3\n",
350 p1->Pt(), p2->Pt(), pt,m,a);
351 for(Int_t ipid=0; ipid<fNPID; ipid++)
353 if((p1->IsPIDOK(ipid,AliCaloPID::kPhoton)) && (p2->IsPIDOK(ipid,AliCaloPID::kPhoton))){
354 fhRe1[curCentrBin*fNPID+ipid]->Fill(pt,a,m) ;
355 if(p1->DistToBad()>0 && p2->DistToBad()>0){
356 fhRe2[curCentrBin*fNPID+ipid]->Fill(pt,a,m) ;
357 if(p1->DistToBad()>1 && p2->DistToBad()>1){
358 fhRe3[curCentrBin*fNPID+ipid]->Fill(pt,a,m) ;
368 TList * evMixList=fEventsList[curCentrBin*fNZvertBin*fNrpBin+curZvertBin*fNrpBin+curRPBin] ;
369 Int_t nMixed = evMixList->GetSize() ;
370 for(Int_t ii=0; ii<nMixed; ii++){
371 TClonesArray* ev2= (TClonesArray*) (evMixList->At(ii));
372 Int_t nPhot2=ev2->GetEntriesFast() ;
374 if(GetDebug() > 1) printf("AliAnaPi0::FillHistos: Mixed event %d photon entries %d\n", ii, nPhot);
376 for(Int_t i1=0; i1<nPhot; i1++){
377 AliAODPWG4Particle * p1 = (AliAODPWG4Particle*) (GetInputAODBranch()->At(i1)) ;
378 TLorentzVector photon1(p1->Px(),p1->Py(),p1->Pz(),p1->E());
379 for(Int_t i2=0; i2<nPhot2; i2++){
380 AliAODPWG4Particle * p2 = (AliAODPWG4Particle*) (ev2->At(i2)) ;
382 TLorentzVector photon2(p2->Px(),p2->Py(),p2->Pz(),p2->E());
383 m = (photon1+photon2).M() ;
384 Double_t pt = (photon1 + photon2).Pt();
385 Double_t a = TMath::Abs(p1->E()-p2->E())/(p1->E()+p2->E()) ;
387 printf("AliAnaPi0::FillHistos: Mixed Event: pT: photon1 %2.2f, photon2 %2.2f; Pair: pT %2.2f, mass %2.3f, a %f2.3\n",
388 p1->Pt(), p2->Pt(), pt,m,a);
389 for(Int_t ipid=0; ipid<fNPID; ipid++){
390 if((p1->IsPIDOK(ipid,AliCaloPID::kPhoton)) && (p2->IsPIDOK(ipid,AliCaloPID::kPhoton))){
391 fhMi1[curCentrBin*fNPID+ipid]->Fill(pt,a,m) ;
392 if(p1->DistToBad()>0 && p2->DistToBad()>0){
393 fhMi2[curCentrBin*fNPID+ipid]->Fill(pt,a,m) ;
394 if(p1->DistToBad()>1 && p2->DistToBad()>1){
395 fhMi3[curCentrBin*fNPID+ipid]->Fill(pt,a,m) ;
405 TClonesArray *currentEvent = new TClonesArray(*GetInputAODBranch());
406 //Add current event to buffer and Remove redandant events
407 if(currentEvent->GetEntriesFast()>0){
408 evMixList->AddFirst(currentEvent) ;
409 currentEvent=0 ; //Now list of particles belongs to buffer and it will be deleted with buffer
410 if(evMixList->GetSize()>=fNmaxMixEv)
412 TClonesArray * tmp = (TClonesArray*) (evMixList->Last()) ;
413 evMixList->RemoveLast() ;
418 delete currentEvent ;
423 AliStack * stack = GetMCStack();
424 if(stack && (IsDataMC() || (GetReader()->GetDataType() == AliCaloTrackReader::kMC)) ){
425 for(Int_t i=0 ; i<stack->GetNprimary(); i++){
426 TParticle * prim = stack->Particle(i) ;
427 if(prim->GetPdgCode() == 111){
428 Double_t pi0Pt = prim->Pt() ;
429 //printf("pi0, pt %2.2f\n",pi0Pt);
430 Double_t pi0Y = 0.5*TMath::Log((prim->Energy()-prim->Pz())/(prim->Energy()+prim->Pz())) ;
431 Double_t phi = TMath::RadToDeg()*prim->Phi() ;
432 if(TMath::Abs(pi0Y) < 0.5){
433 fhPrimPt->Fill(pi0Pt) ;
435 fhPrimY ->Fill(pi0Y) ;
436 fhPrimPhi->Fill(phi) ;
438 //Check if both photons hit Calorimeter
439 Int_t iphot1=prim->GetFirstDaughter() ;
440 Int_t iphot2=prim->GetLastDaughter() ;
441 if(iphot1>-1 && iphot1<stack->GetNtrack() && iphot2>-1 && iphot2<stack->GetNtrack()){
442 TParticle * phot1 = stack->Particle(iphot1) ;
443 TParticle * phot2 = stack->Particle(iphot2) ;
444 if(phot1 && phot2 && phot1->GetPdgCode()==22 && phot2->GetPdgCode()==22){
445 //printf("2 photons: photon 1: pt %2.2f, phi %3.2f, eta %1.2f; photon 2: pt %2.2f, phi %3.2f, eta %1.2f\n",
446 // phot1->Pt(), phot1->Phi()*180./3.1415, phot1->Eta(), phot2->Pt(), phot2->Phi()*180./3.1415, phot2->Eta());
447 Bool_t inacceptance = kFALSE;
451 if(fCalorimeter == "PHOS" && fPHOSGeo->ImpactOnEmc(phot1,mod,z,x) && fPHOSGeo->ImpactOnEmc(phot1,mod,z,x))
452 inacceptance = kTRUE;
453 //printf("In REAL PHOS acceptance? %d\n",inacceptance);
455 TLorentzVector lv1, lv2;
456 phot1->Momentum(lv1);
457 phot2->Momentum(lv2);
458 if(GetFidutialCut()->IsInFidutialCut(lv1,fCalorimeter) && GetFidutialCut()->IsInFidutialCut(lv2,fCalorimeter))
459 inacceptance = kTRUE ;
460 //printf("In %s fidutial cut acceptance? %d\n",fCalorimeter.Data(),inacceptance);
463 fhPrimAccPt->Fill(pi0Pt) ;
464 fhPrimAccPhi->Fill(phi) ;
465 fhPrimAccY->Fill(pi0Y) ;
468 }//Check daughters exist
471 }//stack exists and data is MC
478 //____________________________________________________________________________________________________________________________________________________
479 void AliAnaPi0::Terminate()
481 //Do some calculations and plots from the final histograms.
483 printf(" *** %s Terminate:", GetName()) ;
484 printf(" Mgg Real : %5.3f , RMS : %5.3f \n", fhRe1[0]->GetMean(), fhRe1[0]->GetRMS() ) ;
486 TCanvas * cIM = new TCanvas("cIM", "", 400, 10, 600, 700) ;
491 TH1D * hIMAllPt = (TH1D*) fhRe1[0]->ProjectionZ();
492 hIMAllPt->SetLineColor(2);
493 hIMAllPt->SetTitle("No cut on p_{T, #gamma#gamma} ");
497 TH3F * hRe1Pt5 = (TH3F*)fhRe1[0]->Clone("IMPt5");
498 hRe1Pt5->GetXaxis()->SetRangeUser(0,5);
499 TH1D * hIMPt5 = (TH1D*) hRe1Pt5->Project3D("z");
500 hIMPt5->SetLineColor(2);
501 hIMPt5->SetTitle("0 < p_{T, #gamma#gamma} < 5 GeV/c");
505 TH3F * hRe1Pt10 = (TH3F*)fhRe1[0]->Clone("IMPt10");
506 hRe1Pt10->GetXaxis()->SetRangeUser(5,10);
507 TH1D * hIMPt10 = (TH1D*) hRe1Pt10->Project3D("z");
508 hIMPt10->SetLineColor(2);
509 hIMPt10->SetTitle("5 < p_{T, #gamma#gamma} < 10 GeV/c");
513 TH3F * hRe1Pt20 = (TH3F*)fhRe1[0]->Clone("IMPt20");
514 hRe1Pt20->GetXaxis()->SetRangeUser(10,20);
515 TH1D * hIMPt20 = (TH1D*) hRe1Pt20->Project3D("z");
516 hIMPt20->SetLineColor(2);
517 hIMPt20->SetTitle("10 < p_{T, #gamma#gamma} < 20 GeV/c");
520 cIM->Print("Mgg.eps");
523 TCanvas * cPt = new TCanvas("cPt", "", 400, 10, 600, 700) ;
528 TH1D * hPt = (TH1D*) fhRe1[0]->Project3D("x");
529 hPt->SetLineColor(2);
530 hPt->SetTitle("No cut on M_{#gamma#gamma} ");
534 TH3F * hRe1IM1 = (TH3F*)fhRe1[0]->Clone("PtIM1");
535 hRe1IM1->GetZaxis()->SetRangeUser(0.05,0.21);
536 TH1D * hPtIM1 = (TH1D*) hRe1IM1->Project3D("x");
537 hPtIM1->SetLineColor(2);
538 hPtIM1->SetTitle("0.05 < M_{#gamma#gamma} < 0.21 GeV/c^{2}");
542 TH3F * hRe1IM2 = (TH3F*)fhRe1[0]->Clone("PtIM2");
543 hRe1IM2->GetZaxis()->SetRangeUser(0.09,0.17);
544 TH1D * hPtIM2 = (TH1D*) hRe1IM2->Project3D("x");
545 hPtIM2->SetLineColor(2);
546 hPtIM2->SetTitle("0.09 < M_{#gamma#gamma} < 0.17 GeV/c^{2}");
550 TH3F * hRe1IM3 = (TH3F*)fhRe1[0]->Clone("PtIM3");
551 hRe1IM3->GetZaxis()->SetRangeUser(0.11,0.15);
552 TH1D * hPtIM3 = (TH1D*) hRe1IM1->Project3D("x");
553 hPtIM3->SetLineColor(2);
554 hPtIM3->SetTitle("0.11 < M_{#gamma#gamma} < 0.15 GeV/c^{2}");
557 cPt->Print("Pt.eps");
561 sprintf(line, ".!tar -zcf %s.tar.gz *.eps", GetName()) ;
562 gROOT->ProcessLine(line);
563 sprintf(line, ".!rm -fR *.eps");
564 gROOT->ProcessLine(line);
566 printf("!! All the eps files are in %s.tar.gz !!!", GetName());