ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/CmsHi/JetAnalysis/macros/plotFigure.C
(Generate patch)

Comparing UserCode/CmsHi/JetAnalysis/macros/plotFigure.C (file contents):
Revision 1.2 by yilmaz, Sat Feb 2 14:00:34 2013 UTC vs.
Revision 1.6 by yilmaz, Wed Feb 13 12:47:54 2013 UTC

# Line 22 | Line 22 | using namespace std;
22  
23   #endif
24  
25 < #include "weightMix.C"
25 > #include "CommonParameters.h"
26  
27   static int iPlot = -99;
28  
# Line 41 | Line 41 | void plotBalance(int cbin = 0,
41                   TString infname = "file1.root",
42                   TString refname = "file2.root",
43                   TString mixname = "file3.root",
44                 bool useWeight = true,
44                   bool drawXLabel = false,
45                   bool drawLeg = false);
46  
47  
48 < void drawText(const char *text, float xp, float yp);
48 > void drawText(const char *text, float xp, float yp, int size = 22);
49 > //void drawText(const char *text, float xp1, float yp1, float xp2, float yp2, int size);
50  
51   //--------------------------------------------------------------
52   // drawPatch() is a crazy way of removing 0 in the second and third
# Line 56 | Line 56 | void drawText(const char *text, float xp
56   void drawPatch(float x1, float y1, float x2, float y2);
57   //---------------------------------------------------------------------
58  
59 < void plotFigure(int iplot = 9){
60 <  TString infname = "/d101/yetkin/analysis/d0131/ntuple_data_akPu3PF_forest68_20130201_01.root";
61 <  TString refname = "/d101/yetkin/analysis/d0128/data_PbPb.root";
62 <  //  TString mixname = "/d101/yetkin/analysis/d0128/mix_hydjet.root";
63 <  TString mixname = "/d101/yetkin/analysis/d0201/hijing.root";
59 > void plotFigure(int iplot = 0){
60 >  TString infname = "/d101/yetkin/analysis/d0204/ntuple_data_pPb_akPu3PF_forest71_20130204_01.root";
61 >  TString refname = "/d101/yetkin/analysis/d0205/ntuple_data_PbPb_akPu3PF_forest71_20130205_01.root";
62 >  TString mixname = "/d101/yetkin/analysis/d0204/hijing.root";
63 >
64 >  infname = "ntuple_data_pPb_akPu3PF_forest71_20130204_01.root";
65 >  refname = "ntuple_data_PbPb_akPu3PF_forest71_20130205_01.root";
66 >  mixname = "hijing.root";
67  
68    string hfNames[] = {
69      "30<E_{T}^{HF[#eta > 4]}<70",
# Line 92 | Line 95 | void plotFigure(int iplot = 9){
95     makeMultiPanelCanvas(c1,3,2,0.0,0.0,0.2,0.2,0.02);
96     TLatex *jetf_PbPb;
97  
98 <   if(iPlot == 3 || iPlot == 8 || iPlot == 11 || iPlot == 12){
98 >   if(iPlot == 3 || iPlot == 8 || iPlot == 11 || iPlot == 12 || iPlot == 13 || iPlot == 14){
99       for(int i = 0; i < 6; ++i){
100         c1->cd(i+1)->SetLogy();
101       }
# Line 101 | Line 104 | void plotFigure(int iplot = 9){
104  
105    c1->cd(1);
106  
104  jetf_PbPb = new TLatex(0.477,0.54,"Anti-k_{T} (PFlow), R=0.3");
105  jetf_PbPb->SetTextFont(63);
106  jetf_PbPb->SetTextSize(15);
107  jetf_PbPb->Draw();
108
107    for(int i = 0; i < 6; ++i){
108      c1->cd(6-i);
109 <    plotBalance(i,infname,refname,mixname,true,false,false);
110 <    double y1 = 0.07;
111 <    if(i < 3) y1 = 0.23;
114 <    y1=  0.9;
115 <    drawText(binNames[i].data(),0.3,y1);
116 <    //  drawText("(d)",0.25,0.92);
117 <  }
109 >    plotBalance(i,infname,refname,mixname,i==1,i==0);
110 >    double y1 = 0.85;
111 >    double x1 = 0.5;
112  
113 <  c1->cd(2);
113 >    if(i == 2 || i == 5) x1 = 0.6;
114 >    drawText(binNames[i].data(),x1,y1);
115 >  }
116  
121  TLatex tsel;
122  tsel.SetNDC();
123  tsel.SetTextFont(63);
124  tsel.SetTextSize(15);
125  tsel.DrawLatex(0.15,0.75,Form("p_{T,1} > %d GeV/c",leadCut));
126  tsel.DrawLatex(0.15,0.65,Form("p_{T,2} > %d GeV/c",subleadCut));
127  tsel.DrawLatex(0.15,0.55,"#Delta#phi_{12} > #frac{2}{3}#pi");
117  
129  c1->cd(1);
130        
131  TLatex *cms = new TLatex(0.03,0.28,"CMS Preliminary");
132  if(iPlot == 3) cms = new TLatex(0.04,1.,"CMS Preliminary");
133  cms->SetTextFont(63);
134  cms->SetTextSize(17);
135  cms->Draw();
118  
119    c1->cd(1);
138  TLatex *lumi = new TLatex(0.1,0.26,"pPb L=10.6 nb^{-1}");
139  if(iPlot == 3) lumi = new TLatex(0.1,0.46,"pPb L=10.6 nb^{-1}");
140
141  lumi->SetTextFont(63);
142  lumi->SetTextSize(15);
143  lumi->Draw();
144
145  lumi = new TLatex(0.1,0.24,"PbPb L=150 #mub^{-1}");
146  if(iPlot == 3) lumi = new TLatex(0.1,0.14,"PbPb L=150 #mub^{-1}");
147
148  lumi->SetTextFont(63);
149  lumi->SetTextSize(15);
150  lumi->Draw();
120  
121 +  drawText("CMS Preliminary",0.22,0.9,18);  
122 +  drawText(Form("pPb %s",LUM_pPb),0.22,0.8,18);
123 +  if(iPlot == 0 || iPlot == 3) drawText(Form("PbPb %s",LUM_PbPb),0.22,0.7,18);
124  
125  
126    c1->cd(2);
127 <  TLatex *jetf_pp;
128 <
129 <  jetf_pp = new TLatex(0.12,0.24,"anti-k_{T}, (R=0.3) PF jets PU");
127 >  drawText("anti-k_{T} (R=0.3)",0.02,0.9,18);
128 >  drawText("PU subt. PF jets",0.02,0.8,18);
129 >  drawText("|#eta|<2",0.02,0.7,18);
130 >
131 >  c1->cd(3);
132 >  drawText(Form("p_{T,1} > %d GeV/c",leadCut),0.02,0.9,18);
133 >  drawText(Form("p_{T,2} > %d GeV/c",subleadCut),0.02,0.8,18);
134 >  drawText("#Delta#phi_{12} > #frac{2}{3}#pi",0.02,0.7,18);
135  
159  jetf_pp->SetTextFont(63);
160  jetf_pp->SetTextSize(15);
161  jetf_pp->Draw();
136  
137    const char* date = "20130127";
138  
139    string figures[150] = {"imbalance","etaDijet","",    "dphi","",
140                        "","",        "", "pudifference", "ntrk",
141 <                      "","pu1","pu2","","",
141 >                      "","pu1","pu2","trkMax1","trkMax2",
142                        "","","","","",
143                        "","eta1","eta2"
144    };
# Line 181 | Line 155 | void plotBalance(int cbin,
155                   TString infname,
156                   TString pythia,
157                   TString mix,
184                 bool useWeight,
158                   bool drawXLabel,
159                   bool drawLeg)
160   {
161  
162 <  useWeight = 1;
163 <
191 <  bool refOldNtuple = 0;
192 <  TCut lead(Form("pt1>%d && abs(eta1) < 2",leadCut));
193 <  TCut dijet(Form("pt1>%d && pt2>%d && abs(eta1) < 2 && abs(eta2) < 2",leadCut,subleadCut));
194 <
195 <  TCut deltaPhi("abs(dphi)>2.0944");
162 >  bool showPbPb = 0;
163 >  if(iPlot == 0 || iPlot == 3) showPbPb = 1;
164  
165    if(iPlot != 3) dijet = dijet&&deltaPhi;
166  
199  TCut side(Form("pt1>%d && pt2>%d && abs(dphi)>%f && abs(dphi)<%f && abs(eta1) < 2 && abs(eta2) < 2",leadCut,subleadCut, sideMin, sideMax));
200
201  TCut jetID("trkMax1 > 4 || trkMax2 > 4");
202  //  jetID = "trkMax1 > -99999";
203  TCut noise("noise < 0");
204  TCut weight("weight*(pthat > 50)");
205
206
207  double sideScale = sideCorrect*(3.1415926536-2.0944)/(sideMax-sideMin);
208
209  TString cstring = "";
210
167    TCut centHF("");
168    TCut centNtrk("");
169  
170    if(centMode == 0){
171 +    cout<<"Obsolete centrality usage."<<endl;
172 +    return;
173      if(cbin==0) centHF = "bin>=20 && bin<26";
174      if(cbin==1) centHF = "bin>=26 && bin<27";
175      if(cbin==2) centHF = "bin>=27 && bin<28";
# Line 228 | Line 186 | void plotBalance(int cbin,
186    }
187  
188    if(centMode == 1){
189 <    if(cbin==0) centHF = "hf>=30 && hf<70";
232 <    if(cbin==1) centHF = "hf>=20 && hf<30";
233 <    if(cbin==2) centHF = "hf>=15 && hf<20";
234 <    if(cbin==3) centHF = "hf>=10 && hf<15";
235 <    if(cbin==4) centHF = "hf>=5 && hf<10";
236 <    if(cbin==5) centHF = "hf<5";
237 <
238 <    if(cbin==0) centHF = "cent>=30 && cent<70";
239 <    if(cbin==1) centHF = "cent>=20 && cent<30";
240 <    if(cbin==2) centHF = "cent>=15 && cent<20";
241 <    if(cbin==3) centHF = "cent>=10 && cent<15";
242 <    if(cbin==4) centHF = "cent>=5 && cent<10";
243 <    if(cbin==5) centHF = "cent<5";
244 <
189 >    centHF = hfPlusBins[cbin];
190      centNtrk = centHF;
191    }
192  
248
249
250
251
193    cout<<"plotting ntrk bin : "<<cbin<<endl;
194  
195    // open the data file
# Line 273 | Line 214 | void plotBalance(int cbin,
214    if(entryMode < 1) nt->AddFriend(ntevt);
215  
216    // open the pythia (MC) file
217 <  TFile *infPythia = new TFile(pythia.Data());
218 <  TTree *ntPythia;
219 <  TTree *ntevtPythia;
220 <  if(!refOldNtuple){
221 <    ntPythia = (TTree*) infPythia->FindObjectAny(treeName.data());
222 <    ntevtPythia = (TTree*) infPythia->FindObjectAny("ntevt");
223 <    if(entryMode < 1) ntPythia->AddFriend(ntevtPythia);
224 <  }else{
284 <    ntPythia = (TTree*) infPythia->FindObjectAny("nt");
285 <  }
286 <
217 >  TFile *infReference = new TFile(pythia.Data());
218 >  TTree *ntReference;
219 >  TTree *ntevtReference;
220 >
221 >  ntReference = (TTree*) infReference->FindObjectAny(treeName.data());
222 >  ntevtReference = (TTree*) infReference->FindObjectAny("ntevt");
223 >  if(entryMode < 1) ntReference->AddFriend(ntevtReference);
224 >  
225    // open the datamix file
226    TFile *infMix = new TFile(mix.Data());
227    TTree *ntMix =(TTree*)infMix->FindObjectAny(treeName.data());
# Line 326 | Line 264 | void plotBalance(int cbin,
264      max = 25;
265    };
266  
267 +  if(iPlot == 13 || iPlot == 14){
268 +    Nbin = 75;
269 +    max = 150;
270 +  }
271 +
272    if(iPlot == 101){
273      Nbin = 20;
274      max = 2;
# Line 334 | Line 277 | void plotBalance(int cbin,
277  
278    // projection histogram
279    TH1D *h = new TH1D(Form("h",cbin),"",Nbin,min,max);
280 <  TH1D *hPythia = new TH1D(Form("hPythia",cbin),"",Nbin,min,max);
280 >  TH1D *hReference = new TH1D(Form("hReference",cbin),"",Nbin,min,max);
281    TH1D *hDataMix = new TH1D(Form("hDataMix",cbin),"",Nbin,min,max);
282  
283    TH1D *hB = new TH1D(Form("hB",cbin),"",Nbin,min,max);
284 <  TH1D *hPythiaB = new TH1D(Form("hPythiaB",cbin),"",Nbin,min,max);
284 >  TH1D *hReferenceB = new TH1D(Form("hReferenceB",cbin),"",Nbin,min,max);
285    TH1D *hDataMixB = new TH1D(Form("hDataMixB",cbin),"",Nbin,min,max);
286  
287    TH1D *hFull = new TH1D("hFull","",Nbin,min,max);
288 <  TH1D *hPythiaFull = new TH1D("hPythiaFull","",Nbin,min,max);
288 >  TH1D *hReferenceFull = new TH1D("hReferenceFull","",Nbin,min,max);
289    TH1D *hDataMixFull = new TH1D("hDataMixFull","",Nbin,min,max);
290  
291    TH1D* hNorm = new TH1D("hNorm","",1000,0,1000);
292 <  TH1D* hNormPythia = new TH1D("hNormPythia","",1000,0,1000);
292 >  TH1D* hNormReference = new TH1D("hNormReference","",1000,0,1000);
293    TH1D* hNormDataMix = new TH1D("hNormDataMix","",1000,0,1000);
294  
295    hB->SetLineStyle(2);
296 <  hPythiaB->SetLineStyle(2);
296 >  hReferenceB->SetLineStyle(2);
297    hDataMixB->SetLineStyle(2);
298  
299 <  //  ntPythia->SetAlias("pt1","et1");
300 <  //  ntPythia->SetAlias("pt2","et2");
299 >  //  ntReference->SetAlias("pt1","et1");
300 >  //  ntReference->SetAlias("pt2","et2");
301  
302    nt->SetAlias("pt1","jtpt1");
303    nt->SetAlias("pt2","jtpt2");
# Line 362 | Line 305 | void plotBalance(int cbin,
305    nt->SetAlias("eta2","jteta2");
306    nt->SetAlias("phi1","jtphi1");
307    nt->SetAlias("phi2","jtphi2");
365
308    ntMix->SetAlias("pt1","jtpt1");
309    ntMix->SetAlias("pt2","jtpt2");
310    ntMix->SetAlias("eta1","jteta1");
311    ntMix->SetAlias("eta2","jteta2");
312    ntMix->SetAlias("phi1","jtphi1");
313    ntMix->SetAlias("phi2","jtphi2");
314 <
315 <
316 <  if(!refOldNtuple){
317 <    ntPythia->SetAlias("pt1","jtpt1");
318 <    ntPythia->SetAlias("pt2","jtpt2");
319 <    ntPythia->SetAlias("eta1","jteta1");
320 <    ntPythia->SetAlias("eta2","jteta2");
321 <    ntPythia->SetAlias("phi1","jtphi1");
322 <    ntPythia->SetAlias("phi2","jtphi2");
323 <  }
382 <
383 <  nt->SetAlias("cent","hf");
384 <  ntMix->SetAlias("cent","hf");
385 <  ntPythia->SetAlias("cent","hf");
314 >  ntReference->SetAlias("pt1","jtpt1");
315 >  ntReference->SetAlias("pt2","jtpt2");
316 >  ntReference->SetAlias("eta1","jteta1");
317 >  ntReference->SetAlias("eta2","jteta2");
318 >  ntReference->SetAlias("phi1","jtphi1");
319 >  ntReference->SetAlias("phi2","jtphi2");
320 >
321 >  nt->SetAlias("cent","hfp");
322 >  ntMix->SetAlias("cent","hfp");
323 >  ntReference->SetAlias("cent","hfp");
324  
325    nt->SetAlias("dphi","acos(cos(phi1-phi2))");
326    ntMix->SetAlias("dphi","acos(cos(phi1-phi2))");
327 <  ntPythia->SetAlias("dphi","acos(cos(phi1-phi2))");
327 >  ntReference->SetAlias("dphi","acos(cos(phi1-phi2))");
328  
329    if(iPlot == 0){
330      nt->SetAlias("var","pt2/pt1");
331 <    ntPythia->SetAlias("var","pt2/pt1");
331 >    ntReference->SetAlias("var","pt2/pt1");
332      ntMix->SetAlias("var","pt2/pt1");
333    }
334  
335    if(iPlot == 1){
336      nt->SetAlias("var","(eta1+eta2)/2");
337 <    ntPythia->SetAlias("var","(eta1+eta2)/2");
337 >    ntReference->SetAlias("var","(eta1+eta2)/2");
338      ntMix->SetAlias("var","(eta1+eta2)/2");
339    }
340  
341    if(iPlot == 3){
342      nt->SetAlias("var","acos(cos(phi1-phi2))");
343 <    ntPythia->SetAlias("var","acos(cos(phi1-phi2))");
343 >    ntReference->SetAlias("var","acos(cos(phi1-phi2))");
344      ntMix->SetAlias("var","acos(cos(phi1-phi2))");
345    }
346  
347    if(iPlot == 8){
348      nt->SetAlias("var","pu1-pu2");
349 <    ntPythia->SetAlias("var","pu1-pu2");
349 >    ntReference->SetAlias("var","pu1-pu2");
350      ntMix->SetAlias("var","pu1-pu2");
351    }
352  
353    if(iPlot == 11){
354      nt->SetAlias("var","pu1");
355 <    ntPythia->SetAlias("var","pu1");
355 >    ntReference->SetAlias("var","pu1");
356      ntMix->SetAlias("var","pu1");
357    }
358  
359    if(iPlot == 12){
360      nt->SetAlias("var","pu2");
361 <    ntPythia->SetAlias("var","pu2");
361 >    ntReference->SetAlias("var","pu2");
362      ntMix->SetAlias("var","pu2");
363    }
364  
365 +  if(iPlot == 13){
366 +    nt->SetAlias("var","trkMax1");
367 +    ntReference->SetAlias("var","trkMax1");
368 +    ntMix->SetAlias("var","trkMax1");
369 +  }
370 +
371 +  if(iPlot == 14){
372 +    nt->SetAlias("var","trkMax2");
373 +    ntReference->SetAlias("var","trkMax2");
374 +    ntMix->SetAlias("var","trkMax2");
375 +  }
376 +
377    if(iPlot == 9){
378      nt->SetAlias("var","ntrk");
379 <    ntPythia->SetAlias("var","ntrk");
379 >    ntReference->SetAlias("var","ntrk");
380      ntMix->SetAlias("var","ntrk");
381    }
382  
383    if(iPlot == 21){
384      nt->SetAlias("var","eta1");
385 <    ntPythia->SetAlias("var","eta1");
385 >    ntReference->SetAlias("var","eta1");
386      ntMix->SetAlias("var","eta1");
387    }
388  
389    if(iPlot == 22){
390      nt->SetAlias("var","eta2");
391 <    ntPythia->SetAlias("var","eta2");
391 >    ntReference->SetAlias("var","eta2");
392      ntMix->SetAlias("var","eta2");
393    }
394  
# Line 446 | Line 396 | void plotBalance(int cbin,
396  
397    if(iPlot == 101){
398      nt->SetAlias("var","eta");
399 <    ntPythia->SetAlias("var","eta");
399 >    ntReference->SetAlias("var","eta");
400      ntMix->SetAlias("var","eta");
401    }
402  
403    if(iPlot == 51){
404      nt->SetAlias("var","matchPt1/pt1");
405 <    ntPythia->SetAlias("var","matchPt1/pt1");
405 >    ntReference->SetAlias("var","matchPt1/pt1");
406      ntMix->SetAlias("var","matchPt1/pt1");
407    }
408  
409    if(iPlot == 52){
410      nt->SetAlias("var","matchPt2/pt2");
411 <    ntPythia->SetAlias("var","matchPt2/pt2");
411 >    ntReference->SetAlias("var","matchPt2/pt2");
412      ntMix->SetAlias("var","matchPt2/pt2");
413    }
414  
415  
416 <  nt->Draw("var>>hFull",dijet&&noise&&jetID&&centNtrk);
417 <  nt->Draw("var>>hB",side&&noise&&jetID&&centNtrk);
418 <  nt->Draw("pt1>>hNorm",lead&&noise&&jetID&&centNtrk);
416 >  nt->Draw("var>>hFull",dijet&&noise&&jetID&&centHF&&vtx);
417 >  nt->Draw("var>>hB",side&&noise&&jetID&&centHF&&vtx);
418 >  nt->Draw("pt1>>hNorm",lead&&noise&&jetID&&centHF&&vtx);
419    
420 <  ntMix->Draw("var>>hDataMixFull",weight*(dijet&&jetID&&centHF));
421 <  ntMix->Draw("var>>hDataMixB",weight*(side&&jetID&&centHF));
422 <  ntMix->Draw("pt1>>hNormDataMix",weight*(lead&&jetID&&centHF));
420 >  ntMix->Draw("var>>hDataMixFull",weight*(dijet&&jetID&&centHF&&vtx));
421 >  ntMix->Draw("var>>hDataMixB",weight*(side&&jetID&&centHF&&vtx));
422 >  ntMix->Draw("pt1>>hNormDataMix",weight*(lead&&jetID&&centHF&&vtx));
423    
424 <  ntPythia->Draw("var>>hPythiaFull",dijet&&noise&&jetID&&centHF);
425 <  ntPythia->Draw("var>>hPythiaB",side&&noise&&jetID&&centHF);
426 <  ntPythia->Draw("pt1>>hNormPythia",lead&&noise&&jetID&&centHF);
477 <
478 <  hDataMixB->Scale(sideScale);
479 <  hB->Scale(sideScale);
480 <  hPythiaB->Scale(sideScale);
424 >  ntReference->Draw("var>>hReferenceFull",dijet&&noise&&jetID&&centHF&&vtx);
425 >  ntReference->Draw("var>>hReferenceB",side&&noise&&jetID&&centHF&&vtx);
426 >  ntReference->Draw("pt1>>hNormReference",lead&&noise&&jetID&&centHF&&vtx);
427  
428    hDataMix->Add(hDataMixFull);
429    h->Add(hFull);
430 <  hPythia->Add(hPythiaFull);
430 >  hReference->Add(hReferenceFull);
431  
432    if(subtract){
433      hDataMix->Add(hDataMixB,-1);
434      h->Add(hB,-1);
435 <    hPythia->Add(hPythiaB,-1);
435 >    hReference->Add(hReferenceB,-1);
436    }
437  
438    hB->SetFillStyle(3005);
# Line 505 | Line 451 | void plotBalance(int cbin,
451    }
452    h->SetMarkerStyle(20);
453  
454 <  if(hPythia->Integral() > 0){
455 <    hPythia->Scale(1./hNormPythia->Integral());
454 >  if(hReference->Integral() > 0){
455 >    hReference->Scale(1./hNormReference->Integral());
456    }
457  
458 <  hPythia->SetLineColor(kBlue);
459 <  hPythia->SetFillColor(kAzure-8);
460 <  hPythia->SetFillStyle(3005);
458 >  hReference->SetLineColor(kBlue);
459 >  hReference->SetFillColor(kAzure-8);
460 >  hReference->SetFillStyle(3005);
461  
462    if(normLead){
463      hDataMixB->Scale(1./hNormDataMix->Integral());
# Line 555 | Line 501 | void plotBalance(int cbin,
501    if(iPlot==11) hDataMix->SetXTitle("p_{T,1}^{background}");
502    if(iPlot==12) hDataMix->SetXTitle("p_{T,2}^{background}");
503  
504 +  if(iPlot==13) hDataMix->SetXTitle("p_{T} leading track in leading jet");
505 +  if(iPlot==14) hDataMix->SetXTitle("p_{T} leading track in subleading jet");
506 +
507 +
508    if(drawXLabel){
509      if(iPlot==0) hDataMix->SetXTitle("p_{T,2}/p_{T,1}");
510      if(iPlot==3) hDataMix->SetXTitle("#Delta #phi_{1,2}");
# Line 593 | Line 543 | void plotBalance(int cbin,
543    //hDataMix->GetXaxis()->SetNdivisions(905,true);
544    hDataMix->GetYaxis()->SetNdivisions(505,true);
545  
546 <  hPythia->SetMarkerColor(ppColor);
547 <  hPythia->SetLineColor(ppColor);
548 <  hPythia->SetMarkerStyle(25);
546 >  hReference->SetMarkerColor(ppColor);
547 >  hReference->SetLineColor(ppColor);
548 >  hReference->SetMarkerStyle(25);
549  
550          hDataMix->Draw();//"hist");
551          hDataMix->Draw("hist same");
552 <        //      hPythia->Draw("same");
552 >        if(showPbPb) hReference->Draw("same");
553  
554          cout<<"PbPb ENTRIES : "<<endl;
555 <        cout<<hPythia->GetEntries()<<endl;
555 >        cout<<hReference->GetEntries()<<endl;
556  
557          cout<<"PbPb integral : "<<endl;
558 <        cout<<hPythia->Integral()<<endl;
558 >        cout<<hReference->Integral()<<endl;
559  
560          cout<<"pPb integral : "<<endl;
561          cout<<h->Integral()<<endl;
# Line 624 | Line 574 | void plotBalance(int cbin,
574           cout<<" mean value of data "<<h->GetMean()<<endl;
575  
576    if(drawLeg){
577 <    TLegend *t3=new TLegend(0.06,0.6,0.53,0.95);
628 <
629 <    //   t3->AddEntry(h,Form("%s #mub^{-1}",LUM),"");
577 >    TLegend *t3=new TLegend(0.01,0.7,0.3,0.95);
578      t3->AddEntry(h,"pPb #sqrt{s}=5.02 TeV","p");
579 <    t3->AddEntry(hPythia,"PbPb #sqrt{s}=2.76 TeV","p");
580 <    t3->AddEntry(hDataMix,"PYTHIA+HYDJET 1.8","lf");
579 >    if(showPbPb) t3->AddEntry(hReference,"PbPb #sqrt{s}=2.76 TeV","p");
580 >    t3->AddEntry(hDataMix,"PYTHIA+HIJING","lf");
581  
582      t3->SetFillColor(0);
583      t3->SetBorderSize(0);
# Line 649 | Line 597 | void drawPatch(float x1, float y1, float
597    t1->Draw("");
598   }
599  
600 < void drawText(const char *text, float xp, float yp){
600 > void drawText(const char *text, float xp, float yp, int size){
601    TLatex *tex = new TLatex(xp,yp,text);
602    tex->SetTextFont(63);
603 <  tex->SetTextSize(22);
656 <  //tex->SetTextSize(0.05);
603 >  tex->SetTextSize(size);
604    tex->SetTextColor(kBlack);
605    tex->SetLineWidth(1);
606    tex->SetNDC();
# Line 661 | Line 608 | void drawText(const char *text, float xp
608   }
609  
610  
611 +
612 +
613 +
614   void makeMultiPanelCanvas(TCanvas*& canv,
615                            const Int_t columns,
616                            const Int_t rows,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines