1 |
|
#if !defined(__CINT__) || defined(__MAKECINT__) |
2 |
|
|
3 |
|
#include <iostream> |
4 |
+ |
#include <string> |
5 |
|
#include "TCanvas.h" |
6 |
|
#include "TError.h" |
7 |
|
#include "TPad.h" |
18 |
|
#include "TLatex.h" |
19 |
|
#include "TString.h" |
20 |
|
|
21 |
+ |
using namespace std; |
22 |
+ |
|
23 |
|
#endif |
24 |
|
|
25 |
< |
#include "weightMix.C" |
25 |
> |
#include "CommonParameters.h" |
26 |
|
|
27 |
|
static int iPlot = -99; |
28 |
|
|
29 |
+ |
int centMode = 1; |
30 |
+ |
int entryMode = 0; |
31 |
|
|
32 |
|
//--------------------------------------------------------------------- |
33 |
|
void makeMultiPanelCanvas(TCanvas*& canv, const Int_t columns, |
41 |
|
TString infname = "file1.root", |
42 |
|
TString refname = "file2.root", |
43 |
|
TString mixname = "file3.root", |
39 |
– |
bool useWeight = true, |
44 |
|
bool drawXLabel = false, |
45 |
|
bool drawLeg = false); |
46 |
|
|
55 |
|
void drawPatch(float x1, float y1, float x2, float y2); |
56 |
|
//--------------------------------------------------------------------- |
57 |
|
|
58 |
< |
void plotFigure(int iplot = 3){ |
59 |
< |
TString infname = "/d101/yetkin/analysis/d0128/data_pPb.root"; |
60 |
< |
TString refname = "/d101/yetkin/analysis/d0128/data_PbPb.root"; |
61 |
< |
TString mixname = "/d101/yetkin/analysis/d0128/mix_hydjet.root"; |
58 |
> |
void plotFigure(int iplot = 9){ |
59 |
> |
TString infname = "/d101/yetkin/analysis/d0204/ntuple_data_pPb_akPu3PF_forest71_20130204_01.root"; |
60 |
> |
TString refname = "/d101/yetkin/analysis/d0204/ntuple_data_PbPb_akPu3PF_forest71_20130204_01.root"; |
61 |
> |
TString mixname = "/d101/yetkin/analysis/d0204/hijing.root"; |
62 |
> |
|
63 |
> |
string hfNames[] = { |
64 |
> |
"30<E_{T}^{HF[#eta > 4]}<70", |
65 |
> |
"20<E_{T}^{HF[#eta > 4]}<30", |
66 |
> |
"15<E_{T}^{HF[#eta > 4]}<20", |
67 |
> |
"10<E_{T}^{HF[#eta > 4]}<15", |
68 |
> |
"5<E_{T}^{HF[#eta > 4]}<10", |
69 |
> |
"0<E_{T}^{HF[#eta > 4]}<5" |
70 |
> |
}; |
71 |
> |
|
72 |
> |
|
73 |
> |
string ntrkNames[] = { |
74 |
> |
"180 #leq N_{trk}^{offline}", |
75 |
> |
"150 #leq N_{trk}^{offline} < 180", |
76 |
> |
"110 #leq N_{trk}^{offline} < 150", |
77 |
> |
"90 #leq N_{trk}^{offline} < 110", |
78 |
> |
"60 #leq N_{trk}^{offline} < 90", |
79 |
> |
"N_{trk}^{offline} < 60" |
80 |
> |
}; |
81 |
> |
|
82 |
> |
string *binNames = hfNames; |
83 |
> |
if(centMode == 0) binNames = ntrkNames; |
84 |
|
|
85 |
|
iPlot = iplot; |
86 |
|
|
90 |
|
makeMultiPanelCanvas(c1,3,2,0.0,0.0,0.2,0.2,0.02); |
91 |
|
TLatex *jetf_PbPb; |
92 |
|
|
93 |
< |
if(iplot == 3){ |
93 |
> |
if(iPlot == 3 || iPlot == 8 || iPlot == 11 || iPlot == 12){ |
94 |
|
for(int i = 0; i < 6; ++i){ |
95 |
|
c1->cd(i+1)->SetLogy(); |
96 |
|
} |
104 |
|
jetf_PbPb->SetTextSize(15); |
105 |
|
jetf_PbPb->Draw(); |
106 |
|
|
107 |
< |
double y1 = 0.07; |
108 |
< |
plotBalance(5,infname,refname,mixname,true,false,false); |
109 |
< |
drawText("N_{trk}^{offline} < 60",0.6,y1); |
107 |
> |
for(int i = 0; i < 6; ++i){ |
108 |
> |
c1->cd(6-i); |
109 |
> |
plotBalance(i,infname,refname,mixname,i==1,i==0); |
110 |
> |
double y1 = 0.07; |
111 |
> |
if(i < 3) y1 = 0.23; |
112 |
> |
y1= 0.9; |
113 |
> |
drawText(binNames[i].data(),0.3,y1); |
114 |
> |
// drawText("(d)",0.25,0.92); |
115 |
> |
} |
116 |
|
|
117 |
|
c1->cd(2); |
118 |
|
|
87 |
– |
plotBalance(4,infname,refname,mixname,0,false,false); |
88 |
– |
drawText("60 #leq N_{trk}^{offline} < 90",0.4,y1); |
89 |
– |
|
90 |
– |
|
91 |
– |
c1->cd(3); |
92 |
– |
|
93 |
– |
plotBalance(3,infname,refname,mixname,0,false,false); |
94 |
– |
drawText("90 #leq N_{trk}^{offline} < 110",0.4,y1); |
95 |
– |
// drawText("(c)",0.05,0.885); |
96 |
– |
|
97 |
– |
|
119 |
|
TLatex tsel; |
120 |
|
tsel.SetNDC(); |
121 |
|
tsel.SetTextFont(63); |
124 |
|
tsel.DrawLatex(0.15,0.65,Form("p_{T,2} > %d GeV/c",subleadCut)); |
125 |
|
tsel.DrawLatex(0.15,0.55,"#Delta#phi_{12} > #frac{2}{3}#pi"); |
126 |
|
|
106 |
– |
|
107 |
– |
double y2 = 0.23; |
108 |
– |
|
109 |
– |
c1->cd(4); |
110 |
– |
plotBalance(2,infname,refname,mixname,0,false,false); |
111 |
– |
drawText("110 #leq N_{trk}^{offline} < 150",0.45,y2); |
112 |
– |
// drawText("(d)",0.25,0.92); |
113 |
– |
|
114 |
– |
|
115 |
– |
|
116 |
– |
c1->cd(5); |
117 |
– |
plotBalance(1,infname,refname,mixname,0,true,false); |
118 |
– |
drawText("150 #leq N_{trk}^{offline} < 180",0.42,y2); |
119 |
– |
// drawText("(e)",0.05,0.92); |
120 |
– |
|
121 |
– |
if(sideCorrect == 0){ |
122 |
– |
jetf_PbPb = new TLatex(0.05,0.21,"Mismatched background not subtracted"); |
123 |
– |
// jetf_PbPb->Draw(); |
124 |
– |
} |
125 |
– |
|
126 |
– |
c1->cd(6); |
127 |
– |
plotBalance(0,infname,refname,mixname,0,false,1); |
128 |
– |
drawText("180 #leq N_{trk}^{offline}",0.45,y2); |
129 |
– |
// drawText("(f)",0.05,0.92); |
130 |
– |
|
127 |
|
c1->cd(1); |
128 |
|
|
129 |
|
TLatex *cms = new TLatex(0.03,0.28,"CMS Preliminary"); |
133 |
|
cms->Draw(); |
134 |
|
|
135 |
|
c1->cd(1); |
136 |
< |
TLatex *lumi = new TLatex(0.1,0.26,"pPb L=10.6 nb^{-1}"); |
137 |
< |
if(iPlot == 3) lumi = new TLatex(0.1,0.46,"pPb L=10.6 nb^{-1}"); |
136 |
> |
TLatex *lumi = new TLatex(0.1,0.26,"pPb L=17.3 nb^{-1}"); |
137 |
> |
if(iPlot == 3) lumi = new TLatex(0.1,0.46,"pPb L=17.3 nb^{-1}"); |
138 |
|
|
139 |
|
lumi->SetTextFont(63); |
140 |
|
lumi->SetTextSize(15); |
159 |
|
jetf_pp->Draw(); |
160 |
|
|
161 |
|
const char* date = "20130127"; |
162 |
< |
string figures[] = {"imbalance","","","dphi"}; |
162 |
> |
|
163 |
> |
string figures[150] = {"imbalance","etaDijet","", "dphi","", |
164 |
> |
"","", "", "pudifference", "ntrk", |
165 |
> |
"","pu1","pu2","","", |
166 |
> |
"","","","","", |
167 |
> |
"","eta1","eta2" |
168 |
> |
}; |
169 |
> |
|
170 |
|
string formats[] = {"gif","pdf","eps","C"}; |
171 |
|
|
172 |
|
for(int it = 0; it < 4; ++it){ |
179 |
|
TString infname, |
180 |
|
TString pythia, |
181 |
|
TString mix, |
179 |
– |
bool useWeight, |
182 |
|
bool drawXLabel, |
183 |
|
bool drawLeg) |
184 |
|
{ |
185 |
|
|
184 |
– |
useWeight = 1; |
185 |
– |
|
186 |
– |
bool refOldNtuple = 0; |
187 |
– |
TCut lead(Form("pt1>%d && abs(eta1) < 2",leadCut)); |
188 |
– |
TCut dijet(Form("pt1>%d && pt2>%d && abs(eta1) < 2 && abs(eta2) < 2",leadCut,subleadCut)); |
189 |
– |
|
190 |
– |
TCut deltaPhi("abs(dphi)>2.0944"); |
191 |
– |
|
186 |
|
if(iPlot != 3) dijet = dijet&&deltaPhi; |
187 |
|
|
194 |
– |
TCut side(Form("pt1>%d && pt2>%d && abs(dphi)>%f && abs(dphi)<%f && abs(eta1) < 2 && abs(eta2) < 2",leadCut,subleadCut, sideMin, sideMax)); |
195 |
– |
|
196 |
– |
TCut jetID("trkMax1 > 4 || trkMax2 > 4"); |
197 |
– |
// jetID = "trkMax1 > -99999"; |
198 |
– |
TCut noise("noise < 0"); |
199 |
– |
TCut weight("weight"); |
200 |
– |
|
201 |
– |
|
202 |
– |
double sideScale = sideCorrect*(3.1415926536-2.0944)/(sideMax-sideMin); |
203 |
– |
|
204 |
– |
TString cstring = ""; |
205 |
– |
|
188 |
|
TCut centHF(""); |
189 |
|
TCut centNtrk(""); |
190 |
|
|
191 |
< |
if(cbin==0) centHF = "bin>=20 && bin<26"; |
192 |
< |
if(cbin==1) centHF = "bin>=26 && bin<27"; |
193 |
< |
if(cbin==2) centHF = "bin>=27 && bin<28"; |
194 |
< |
if(cbin==3) centHF = "bin>=28 && bin<29"; |
195 |
< |
if(cbin==4) centHF = "bin>=29 && bin<31"; |
196 |
< |
if(cbin==5) centHF = "bin>=31"; |
197 |
< |
|
198 |
< |
if(cbin==0) centNtrk = "ntrk >= 180"; |
199 |
< |
if(cbin==1) centNtrk = "150 <= ntrk && ntrk < 180"; |
200 |
< |
if(cbin==2) centNtrk = "110 <= ntrk && ntrk < 150"; |
201 |
< |
if(cbin==3) centNtrk = "90 <= ntrk && ntrk < 150"; |
202 |
< |
if(cbin==4) centNtrk = "60 <= ntrk && ntrk < 90"; |
203 |
< |
if(cbin==5) centNtrk = "ntrk < 60"; |
204 |
< |
|
191 |
> |
if(centMode == 0){ |
192 |
> |
cout<<"Obsolete centrality usage."<<endl; |
193 |
> |
return; |
194 |
> |
if(cbin==0) centHF = "bin>=20 && bin<26"; |
195 |
> |
if(cbin==1) centHF = "bin>=26 && bin<27"; |
196 |
> |
if(cbin==2) centHF = "bin>=27 && bin<28"; |
197 |
> |
if(cbin==3) centHF = "bin>=28 && bin<29"; |
198 |
> |
if(cbin==4) centHF = "bin>=29 && bin<31"; |
199 |
> |
if(cbin==5) centHF = "bin>=31"; |
200 |
> |
|
201 |
> |
if(cbin==0) centNtrk = "ntrk >= 180"; |
202 |
> |
if(cbin==1) centNtrk = "150 <= ntrk && ntrk < 180"; |
203 |
> |
if(cbin==2) centNtrk = "110 <= ntrk && ntrk < 150"; |
204 |
> |
if(cbin==3) centNtrk = "90 <= ntrk && ntrk < 150"; |
205 |
> |
if(cbin==4) centNtrk = "60 <= ntrk && ntrk < 90"; |
206 |
> |
if(cbin==5) centNtrk = "ntrk < 60"; |
207 |
> |
} |
208 |
> |
|
209 |
> |
if(centMode == 1){ |
210 |
> |
centHF = hfPlusBins[cbin]; |
211 |
> |
centNtrk = centHF; |
212 |
> |
} |
213 |
|
|
214 |
|
cout<<"plotting ntrk bin : "<<cbin<<endl; |
215 |
|
|
216 |
|
// open the data file |
217 |
+ |
|
218 |
+ |
if(iPlot > 100) entryMode = 1; |
219 |
+ |
|
220 |
+ |
string treeName = "ntdijet"; |
221 |
+ |
string wName = "ntw"; |
222 |
+ |
if(entryMode == 1){ |
223 |
+ |
treeName = "ntjet"; |
224 |
+ |
wName = "ntjetw"; |
225 |
+ |
} |
226 |
+ |
|
227 |
+ |
if(entryMode == 2){ |
228 |
+ |
treeName = "nttrk"; |
229 |
+ |
wName = "nttrkw"; |
230 |
+ |
} |
231 |
+ |
|
232 |
|
TFile *inf = new TFile(infname.Data()); |
233 |
< |
TTree *nt =(TTree*)inf->FindObjectAny("ntdijet"); |
233 |
> |
TTree *nt =(TTree*)inf->FindObjectAny(treeName.data()); |
234 |
|
TTree *ntevt =(TTree*)inf->FindObjectAny("ntevt"); |
235 |
< |
nt->AddFriend(ntevt); |
235 |
> |
if(entryMode < 1) nt->AddFriend(ntevt); |
236 |
|
|
237 |
|
// open the pythia (MC) file |
238 |
< |
TFile *infPythia = new TFile(pythia.Data()); |
239 |
< |
TTree *ntPythia; |
240 |
< |
TTree *ntevtPythia; |
241 |
< |
if(!refOldNtuple){ |
242 |
< |
ntPythia = (TTree*) infPythia->FindObjectAny("ntdijet"); |
243 |
< |
ntevtPythia = (TTree*) infPythia->FindObjectAny("ntevt"); |
244 |
< |
ntPythia->AddFriend(ntevtPythia); |
245 |
< |
}else{ |
241 |
< |
ntPythia = (TTree*) infPythia->FindObjectAny("nt"); |
242 |
< |
} |
243 |
< |
|
238 |
> |
TFile *infReference = new TFile(pythia.Data()); |
239 |
> |
TTree *ntReference; |
240 |
> |
TTree *ntevtReference; |
241 |
> |
|
242 |
> |
ntReference = (TTree*) infReference->FindObjectAny(treeName.data()); |
243 |
> |
ntevtReference = (TTree*) infReference->FindObjectAny("ntevt"); |
244 |
> |
if(entryMode < 1) ntReference->AddFriend(ntevtReference); |
245 |
> |
|
246 |
|
// open the datamix file |
247 |
|
TFile *infMix = new TFile(mix.Data()); |
248 |
< |
TTree *ntMix =(TTree*)infMix->FindObjectAny("ntdijet"); |
248 |
> |
TTree *ntMix =(TTree*)infMix->FindObjectAny(treeName.data()); |
249 |
|
TTree *ntevtMix =(TTree*)infMix->FindObjectAny("ntevt"); |
250 |
|
// TFile *infW = new TFile("weights_hydjet.root"); |
251 |
|
// TTree *ntw =(TTree*)infW->FindObjectAny("ntw"); |
252 |
|
|
253 |
< |
TTree *ntw =(TTree*)infMix->FindObjectAny("ntw"); |
253 |
> |
TTree *ntw =(TTree*)infMix->FindObjectAny(wName.data()); |
254 |
|
ntMix->AddFriend(ntw); |
255 |
< |
ntMix->AddFriend(ntevtMix); |
255 |
> |
if(entryMode < 1) ntMix->AddFriend(ntevtMix); |
256 |
|
|
257 |
|
int Nbin = 10; |
258 |
|
double max = 1.; |
259 |
+ |
double min = 0; |
260 |
+ |
|
261 |
+ |
if(iPlot == 1 || iPlot == 21 || iPlot == 22){ |
262 |
+ |
Nbin = 20; |
263 |
+ |
max = 2; |
264 |
+ |
min = -2; |
265 |
+ |
}; |
266 |
|
|
267 |
|
if(iPlot == 3){ |
268 |
|
Nbin = 30; |
269 |
|
max = pi; |
270 |
|
}; |
271 |
|
|
272 |
+ |
if(iPlot == 8){ |
273 |
+ |
Nbin = 50; |
274 |
+ |
max = 25; |
275 |
+ |
min = -25; |
276 |
+ |
}; |
277 |
+ |
|
278 |
+ |
if(iPlot == 9){ |
279 |
+ |
Nbin = 50; |
280 |
+ |
max = 250; |
281 |
+ |
}; |
282 |
+ |
|
283 |
+ |
if(iPlot == 11 || iPlot == 12){ |
284 |
+ |
Nbin = 50; |
285 |
+ |
max = 25; |
286 |
+ |
}; |
287 |
+ |
|
288 |
+ |
if(iPlot == 101){ |
289 |
+ |
Nbin = 20; |
290 |
+ |
max = 2; |
291 |
+ |
min = -2; |
292 |
+ |
} |
293 |
|
|
294 |
|
// projection histogram |
295 |
< |
TH1D *h = new TH1D(Form("h",cbin),"",Nbin,0,max); |
296 |
< |
TH1D *hPythia = new TH1D(Form("hPythia",cbin),"",Nbin,0,max); |
297 |
< |
TH1D *hDataMix = new TH1D(Form("hDataMix",cbin),"",Nbin,0,max); |
298 |
< |
|
299 |
< |
TH1D *hB = new TH1D(Form("hB",cbin),"",Nbin,0,max); |
300 |
< |
TH1D *hPythiaB = new TH1D(Form("hPythiaB",cbin),"",Nbin,0,max); |
301 |
< |
TH1D *hDataMixB = new TH1D(Form("hDataMixB",cbin),"",Nbin,0,max); |
302 |
< |
|
303 |
< |
TH1D *hFull = new TH1D("hFull","",Nbin,0,max); |
304 |
< |
TH1D *hPythiaFull = new TH1D("hPythiaFull","",Nbin,0,max); |
305 |
< |
TH1D *hDataMixFull = new TH1D("hDataMixFull","",Nbin,0,max); |
295 |
> |
TH1D *h = new TH1D(Form("h",cbin),"",Nbin,min,max); |
296 |
> |
TH1D *hReference = new TH1D(Form("hReference",cbin),"",Nbin,min,max); |
297 |
> |
TH1D *hDataMix = new TH1D(Form("hDataMix",cbin),"",Nbin,min,max); |
298 |
> |
|
299 |
> |
TH1D *hB = new TH1D(Form("hB",cbin),"",Nbin,min,max); |
300 |
> |
TH1D *hReferenceB = new TH1D(Form("hReferenceB",cbin),"",Nbin,min,max); |
301 |
> |
TH1D *hDataMixB = new TH1D(Form("hDataMixB",cbin),"",Nbin,min,max); |
302 |
> |
|
303 |
> |
TH1D *hFull = new TH1D("hFull","",Nbin,min,max); |
304 |
> |
TH1D *hReferenceFull = new TH1D("hReferenceFull","",Nbin,min,max); |
305 |
> |
TH1D *hDataMixFull = new TH1D("hDataMixFull","",Nbin,min,max); |
306 |
|
|
307 |
|
TH1D* hNorm = new TH1D("hNorm","",1000,0,1000); |
308 |
< |
TH1D* hNormPythia = new TH1D("hNormPythia","",1000,0,1000); |
308 |
> |
TH1D* hNormReference = new TH1D("hNormReference","",1000,0,1000); |
309 |
|
TH1D* hNormDataMix = new TH1D("hNormDataMix","",1000,0,1000); |
310 |
|
|
311 |
|
hB->SetLineStyle(2); |
312 |
< |
hPythiaB->SetLineStyle(2); |
312 |
> |
hReferenceB->SetLineStyle(2); |
313 |
|
hDataMixB->SetLineStyle(2); |
314 |
|
|
315 |
< |
// ntPythia->SetAlias("pt1","et1"); |
316 |
< |
// ntPythia->SetAlias("pt2","et2"); |
315 |
> |
// ntReference->SetAlias("pt1","et1"); |
316 |
> |
// ntReference->SetAlias("pt2","et2"); |
317 |
|
|
318 |
|
nt->SetAlias("pt1","jtpt1"); |
319 |
|
nt->SetAlias("pt2","jtpt2"); |
321 |
|
nt->SetAlias("eta2","jteta2"); |
322 |
|
nt->SetAlias("phi1","jtphi1"); |
323 |
|
nt->SetAlias("phi2","jtphi2"); |
294 |
– |
|
324 |
|
ntMix->SetAlias("pt1","jtpt1"); |
325 |
|
ntMix->SetAlias("pt2","jtpt2"); |
326 |
|
ntMix->SetAlias("eta1","jteta1"); |
327 |
|
ntMix->SetAlias("eta2","jteta2"); |
328 |
|
ntMix->SetAlias("phi1","jtphi1"); |
329 |
|
ntMix->SetAlias("phi2","jtphi2"); |
330 |
< |
|
331 |
< |
|
332 |
< |
if(!refOldNtuple){ |
333 |
< |
ntPythia->SetAlias("pt1","jtpt1"); |
334 |
< |
ntPythia->SetAlias("pt2","jtpt2"); |
335 |
< |
ntPythia->SetAlias("eta1","jteta1"); |
336 |
< |
ntPythia->SetAlias("eta2","jteta2"); |
337 |
< |
ntPythia->SetAlias("phi1","jtphi1"); |
338 |
< |
ntPythia->SetAlias("phi2","jtphi2"); |
339 |
< |
} |
330 |
> |
ntReference->SetAlias("pt1","jtpt1"); |
331 |
> |
ntReference->SetAlias("pt2","jtpt2"); |
332 |
> |
ntReference->SetAlias("eta1","jteta1"); |
333 |
> |
ntReference->SetAlias("eta2","jteta2"); |
334 |
> |
ntReference->SetAlias("phi1","jtphi1"); |
335 |
> |
ntReference->SetAlias("phi2","jtphi2"); |
336 |
> |
|
337 |
> |
nt->SetAlias("cent","hfp"); |
338 |
> |
ntMix->SetAlias("cent","hfp"); |
339 |
> |
ntReference->SetAlias("cent","hfp"); |
340 |
|
|
341 |
|
nt->SetAlias("dphi","acos(cos(phi1-phi2))"); |
342 |
|
ntMix->SetAlias("dphi","acos(cos(phi1-phi2))"); |
343 |
< |
ntPythia->SetAlias("dphi","acos(cos(phi1-phi2))"); |
343 |
> |
ntReference->SetAlias("dphi","acos(cos(phi1-phi2))"); |
344 |
|
|
345 |
|
if(iPlot == 0){ |
346 |
|
nt->SetAlias("var","pt2/pt1"); |
347 |
< |
ntPythia->SetAlias("var","pt2/pt1"); |
347 |
> |
ntReference->SetAlias("var","pt2/pt1"); |
348 |
|
ntMix->SetAlias("var","pt2/pt1"); |
349 |
|
} |
350 |
|
|
351 |
+ |
if(iPlot == 1){ |
352 |
+ |
nt->SetAlias("var","(eta1+eta2)/2"); |
353 |
+ |
ntReference->SetAlias("var","(eta1+eta2)/2"); |
354 |
+ |
ntMix->SetAlias("var","(eta1+eta2)/2"); |
355 |
+ |
} |
356 |
+ |
|
357 |
|
if(iPlot == 3){ |
358 |
|
nt->SetAlias("var","acos(cos(phi1-phi2))"); |
359 |
< |
ntPythia->SetAlias("var","acos(cos(phi1-phi2))"); |
359 |
> |
ntReference->SetAlias("var","acos(cos(phi1-phi2))"); |
360 |
|
ntMix->SetAlias("var","acos(cos(phi1-phi2))"); |
361 |
|
} |
362 |
|
|
363 |
|
if(iPlot == 8){ |
364 |
< |
nt->SetAlias("var","pu2/pu1"); |
365 |
< |
ntPythia->SetAlias("var","pu2/pu1"); |
366 |
< |
ntMix->SetAlias("var","pu2/pu1"); |
364 |
> |
nt->SetAlias("var","pu1-pu2"); |
365 |
> |
ntReference->SetAlias("var","pu1-pu2"); |
366 |
> |
ntMix->SetAlias("var","pu1-pu2"); |
367 |
|
} |
368 |
|
|
369 |
< |
nt->Draw("var>>hFull",dijet&&noise&&jetID&¢Ntrk); |
370 |
< |
nt->Draw("var>>hB",side&&noise&&jetID&¢Ntrk); |
371 |
< |
nt->Draw("pt1>>hNorm",lead&&noise&&jetID&¢Ntrk); |
369 |
> |
if(iPlot == 11){ |
370 |
> |
nt->SetAlias("var","pu1"); |
371 |
> |
ntReference->SetAlias("var","pu1"); |
372 |
> |
ntMix->SetAlias("var","pu1"); |
373 |
> |
} |
374 |
> |
|
375 |
> |
if(iPlot == 12){ |
376 |
> |
nt->SetAlias("var","pu2"); |
377 |
> |
ntReference->SetAlias("var","pu2"); |
378 |
> |
ntMix->SetAlias("var","pu2"); |
379 |
> |
} |
380 |
> |
|
381 |
> |
if(iPlot == 9){ |
382 |
> |
nt->SetAlias("var","ntrk"); |
383 |
> |
ntReference->SetAlias("var","ntrk"); |
384 |
> |
ntMix->SetAlias("var","ntrk"); |
385 |
> |
} |
386 |
> |
|
387 |
> |
if(iPlot == 21){ |
388 |
> |
nt->SetAlias("var","eta1"); |
389 |
> |
ntReference->SetAlias("var","eta1"); |
390 |
> |
ntMix->SetAlias("var","eta1"); |
391 |
> |
} |
392 |
> |
|
393 |
> |
if(iPlot == 22){ |
394 |
> |
nt->SetAlias("var","eta2"); |
395 |
> |
ntReference->SetAlias("var","eta2"); |
396 |
> |
ntMix->SetAlias("var","eta2"); |
397 |
> |
} |
398 |
> |
|
399 |
> |
|
400 |
> |
|
401 |
> |
if(iPlot == 101){ |
402 |
> |
nt->SetAlias("var","eta"); |
403 |
> |
ntReference->SetAlias("var","eta"); |
404 |
> |
ntMix->SetAlias("var","eta"); |
405 |
> |
} |
406 |
> |
|
407 |
> |
if(iPlot == 51){ |
408 |
> |
nt->SetAlias("var","matchPt1/pt1"); |
409 |
> |
ntReference->SetAlias("var","matchPt1/pt1"); |
410 |
> |
ntMix->SetAlias("var","matchPt1/pt1"); |
411 |
> |
} |
412 |
> |
|
413 |
> |
if(iPlot == 52){ |
414 |
> |
nt->SetAlias("var","matchPt2/pt2"); |
415 |
> |
ntReference->SetAlias("var","matchPt2/pt2"); |
416 |
> |
ntMix->SetAlias("var","matchPt2/pt2"); |
417 |
> |
} |
418 |
> |
|
419 |
> |
|
420 |
> |
nt->Draw("var>>hFull",dijet&&noise&&jetID&¢HF&&vtx); |
421 |
> |
nt->Draw("var>>hB",side&&noise&&jetID&¢HF&&vtx); |
422 |
> |
nt->Draw("pt1>>hNorm",lead&&noise&&jetID&¢HF&&vtx); |
423 |
|
|
424 |
< |
ntMix->Draw("var>>hDataMixFull",weight*(dijet&&jetID&¢HF)); |
425 |
< |
ntMix->Draw("var>>hDataMixB",weight*(side&&jetID&¢HF)); |
426 |
< |
ntMix->Draw("pt1>>hNormDataMix",weight*(lead&&jetID&¢HF)); |
424 |
> |
ntMix->Draw("var>>hDataMixFull",weight*(dijet&&jetID&¢HF&&vtx)); |
425 |
> |
ntMix->Draw("var>>hDataMixB",weight*(side&&jetID&¢HF&&vtx)); |
426 |
> |
ntMix->Draw("pt1>>hNormDataMix",weight*(lead&&jetID&¢HF&&vtx)); |
427 |
|
|
428 |
< |
ntPythia->Draw("var>>hPythiaFull",dijet&&noise&&jetID&¢HF); |
429 |
< |
ntPythia->Draw("var>>hPythiaB",side&&noise&&jetID&¢HF); |
430 |
< |
ntPythia->Draw("pt1>>hNormPythia",lead&&noise&&jetID&¢HF); |
345 |
< |
|
346 |
< |
hDataMixB->Scale(sideScale); |
347 |
< |
hB->Scale(sideScale); |
348 |
< |
hPythiaB->Scale(sideScale); |
428 |
> |
ntReference->Draw("var>>hReferenceFull",dijet&&noise&&jetID&¢HF&&vtx); |
429 |
> |
ntReference->Draw("var>>hReferenceB",side&&noise&&jetID&¢HF&&vtx); |
430 |
> |
ntReference->Draw("pt1>>hNormReference",lead&&noise&&jetID&¢HF&&vtx); |
431 |
|
|
432 |
|
hDataMix->Add(hDataMixFull); |
433 |
|
h->Add(hFull); |
434 |
< |
hPythia->Add(hPythiaFull); |
434 |
> |
hReference->Add(hReferenceFull); |
435 |
|
|
436 |
|
if(subtract){ |
437 |
|
hDataMix->Add(hDataMixB,-1); |
438 |
|
h->Add(hB,-1); |
439 |
< |
hPythia->Add(hPythiaB,-1); |
439 |
> |
hReference->Add(hReferenceB,-1); |
440 |
|
} |
441 |
|
|
442 |
|
hB->SetFillStyle(3005); |
455 |
|
} |
456 |
|
h->SetMarkerStyle(20); |
457 |
|
|
458 |
< |
if(hPythia->Integral() > 0){ |
459 |
< |
hPythia->Scale(1./hNormPythia->Integral()); |
458 |
> |
if(hReference->Integral() > 0){ |
459 |
> |
hReference->Scale(1./hNormReference->Integral()); |
460 |
|
} |
461 |
|
|
462 |
< |
hPythia->SetLineColor(kBlue); |
463 |
< |
hPythia->SetFillColor(kAzure-8); |
464 |
< |
hPythia->SetFillStyle(3005); |
462 |
> |
hReference->SetLineColor(kBlue); |
463 |
> |
hReference->SetFillColor(kAzure-8); |
464 |
> |
hReference->SetFillStyle(3005); |
465 |
|
|
466 |
|
if(normLead){ |
467 |
|
hDataMixB->Scale(1./hNormDataMix->Integral()); |
495 |
|
if(drawXLabel) hDataMix->SetXTitle("A_{J} = (p_{T,1}-p_{T,2})/(p_{T,1}+p_{T,2})"); |
496 |
|
hDataMix->SetYTitle("Event Fraction"); |
497 |
|
|
498 |
< |
if(iPlot==9)hDataMix->SetXTitle("p_{T,2}^{background}/p_{T,1}^{background}"); |
498 |
> |
if(iPlot==1) hDataMix->SetXTitle("#eta_{dijet} = (#eta_{1}+#eta_{2})/2"); |
499 |
> |
if(iPlot==21) hDataMix->SetXTitle("#eta_{1}"); |
500 |
> |
if(iPlot==22) hDataMix->SetXTitle("#eta_{2}"); |
501 |
> |
|
502 |
> |
if(iPlot==8) hDataMix->SetXTitle("p_{T,1}^{background}-p_{T,2}^{background}"); |
503 |
> |
if(iPlot==9) hDataMix->SetXTitle("N_{trk}^{offline}"); |
504 |
> |
|
505 |
> |
if(iPlot==11) hDataMix->SetXTitle("p_{T,1}^{background}"); |
506 |
> |
if(iPlot==12) hDataMix->SetXTitle("p_{T,2}^{background}"); |
507 |
|
|
508 |
|
if(drawXLabel){ |
509 |
|
if(iPlot==0) hDataMix->SetXTitle("p_{T,2}/p_{T,1}"); |
511 |
|
} |
512 |
|
|
513 |
|
if(iPlot==0) hDataMix->SetMaximum(0.32); |
514 |
+ |
|
515 |
+ |
if(iPlot == 1 || iPlot==21 || iPlot==22){ |
516 |
+ |
hDataMix->SetMaximum(0.3); |
517 |
+ |
hDataMix->SetMinimum(0); |
518 |
+ |
} |
519 |
+ |
|
520 |
+ |
|
521 |
|
if(iPlot==3){ |
522 |
|
hDataMix->SetMaximum(2.52); |
523 |
|
hDataMix->SetMinimum(0.00004); |
524 |
|
} |
525 |
|
|
526 |
+ |
if(iPlot==8){ |
527 |
+ |
hDataMix->SetMaximum(10); |
528 |
+ |
hDataMix->SetMinimum(0.00004); |
529 |
+ |
} |
530 |
+ |
|
531 |
+ |
if(iPlot==9){ |
532 |
+ |
hDataMix->SetMaximum(0.15); |
533 |
+ |
hDataMix->SetMinimum(0.); |
534 |
+ |
} |
535 |
+ |
|
536 |
+ |
if(iPlot==11 || iPlot == 12){ |
537 |
+ |
hDataMix->SetMaximum(10); |
538 |
+ |
hDataMix->SetMinimum(0.00004); |
539 |
+ |
} |
540 |
+ |
|
541 |
+ |
|
542 |
+ |
|
543 |
|
//hDataMix->GetXaxis()->SetNdivisions(905,true); |
544 |
|
hDataMix->GetYaxis()->SetNdivisions(505,true); |
545 |
|
|
546 |
< |
hPythia->SetMarkerColor(ppColor); |
547 |
< |
hPythia->SetLineColor(ppColor); |
548 |
< |
hPythia->SetMarkerStyle(24); |
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 |
> |
// 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; |
578 |
|
|
579 |
|
// t3->AddEntry(h,Form("%s #mub^{-1}",LUM),""); |
580 |
|
t3->AddEntry(h,"pPb #sqrt{s}=5.02 TeV","p"); |
581 |
< |
t3->AddEntry(hPythia,"PbPb #sqrt{s}=2.76 TeV","p"); |
581 |
> |
t3->AddEntry(hReference,"PbPb #sqrt{s}=2.76 TeV","p"); |
582 |
|
t3->AddEntry(hDataMix,"PYTHIA+HYDJET 1.8","lf"); |
583 |
|
|
584 |
|
t3->SetFillColor(0); |