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 |
|
|
186 |
< |
useWeight = 1; |
186 |
> |
if(iPlot != 3) dijet = dijet&&deltaPhi; |
187 |
|
|
188 |
< |
bool refOldNtuple = 0; |
189 |
< |
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)); |
188 |
> |
TCut centHF(""); |
189 |
> |
TCut centNtrk(""); |
190 |
|
|
191 |
< |
TCut deltaPhi("abs(dphi)>2.0944"); |
191 |
> |
if(centMode == 0){ |
192 |
> |
if(cbin==0) centHF = "bin>=20 && bin<26"; |
193 |
> |
if(cbin==1) centHF = "bin>=26 && bin<27"; |
194 |
> |
if(cbin==2) centHF = "bin>=27 && bin<28"; |
195 |
> |
if(cbin==3) centHF = "bin>=28 && bin<29"; |
196 |
> |
if(cbin==4) centHF = "bin>=29 && bin<31"; |
197 |
> |
if(cbin==5) centHF = "bin>=31"; |
198 |
> |
|
199 |
> |
if(cbin==0) centNtrk = "ntrk >= 180"; |
200 |
> |
if(cbin==1) centNtrk = "150 <= ntrk && ntrk < 180"; |
201 |
> |
if(cbin==2) centNtrk = "110 <= ntrk && ntrk < 150"; |
202 |
> |
if(cbin==3) centNtrk = "90 <= ntrk && ntrk < 150"; |
203 |
> |
if(cbin==4) centNtrk = "60 <= ntrk && ntrk < 90"; |
204 |
> |
if(cbin==5) centNtrk = "ntrk < 60"; |
205 |
> |
} |
206 |
> |
|
207 |
> |
if(centMode == 1){ |
208 |
> |
if(cbin==0) centHF = "cent>=30 && cent<70"; |
209 |
> |
if(cbin==1) centHF = "cent>=20 && cent<30"; |
210 |
> |
if(cbin==2) centHF = "cent>=15 && cent<20"; |
211 |
> |
if(cbin==3) centHF = "cent>=10 && cent<15"; |
212 |
> |
if(cbin==4) centHF = "cent>=5 && cent<10"; |
213 |
> |
if(cbin==5) centHF = "cent<5"; |
214 |
|
|
215 |
< |
if(iPlot != 3) dijet = dijet&&deltaPhi; |
215 |
> |
centNtrk = centHF; |
216 |
> |
} |
217 |
|
|
194 |
– |
TCut side(Form("pt1>%d && pt2>%d && abs(dphi)>%f && abs(dphi)<%f && abs(eta1) < 2 && abs(eta2) < 2",leadCut,subleadCut, sideMin, sideMax)); |
218 |
|
|
196 |
– |
TCut jetID("trkMax1 > 4 || trkMax2 > 4"); |
197 |
– |
// jetID = "trkMax1 > -99999"; |
198 |
– |
TCut noise("noise < 0"); |
199 |
– |
TCut weight("weight"); |
219 |
|
|
220 |
|
|
202 |
– |
double sideScale = sideCorrect*(3.1415926536-2.0944)/(sideMax-sideMin); |
221 |
|
|
222 |
< |
TString cstring = ""; |
222 |
> |
cout<<"plotting ntrk bin : "<<cbin<<endl; |
223 |
|
|
224 |
< |
TCut centHF(""); |
207 |
< |
TCut centNtrk(""); |
224 |
> |
// open the data file |
225 |
|
|
226 |
< |
if(cbin==0) centHF = "bin>=20 && bin<26"; |
210 |
< |
if(cbin==1) centHF = "bin>=26 && bin<27"; |
211 |
< |
if(cbin==2) centHF = "bin>=27 && bin<28"; |
212 |
< |
if(cbin==3) centHF = "bin>=28 && bin<29"; |
213 |
< |
if(cbin==4) centHF = "bin>=29 && bin<31"; |
214 |
< |
if(cbin==5) centHF = "bin>=31"; |
215 |
< |
|
216 |
< |
if(cbin==0) centNtrk = "ntrk >= 180"; |
217 |
< |
if(cbin==1) centNtrk = "150 <= ntrk && ntrk < 180"; |
218 |
< |
if(cbin==2) centNtrk = "110 <= ntrk && ntrk < 150"; |
219 |
< |
if(cbin==3) centNtrk = "90 <= ntrk && ntrk < 150"; |
220 |
< |
if(cbin==4) centNtrk = "60 <= ntrk && ntrk < 90"; |
221 |
< |
if(cbin==5) centNtrk = "ntrk < 60"; |
226 |
> |
if(iPlot > 100) entryMode = 1; |
227 |
|
|
228 |
+ |
string treeName = "ntdijet"; |
229 |
+ |
string wName = "ntw"; |
230 |
+ |
if(entryMode == 1){ |
231 |
+ |
treeName = "ntjet"; |
232 |
+ |
wName = "ntjetw"; |
233 |
+ |
} |
234 |
|
|
235 |
< |
cout<<"plotting ntrk bin : "<<cbin<<endl; |
235 |
> |
if(entryMode == 2){ |
236 |
> |
treeName = "nttrk"; |
237 |
> |
wName = "nttrkw"; |
238 |
> |
} |
239 |
|
|
226 |
– |
// open the data file |
240 |
|
TFile *inf = new TFile(infname.Data()); |
241 |
< |
TTree *nt =(TTree*)inf->FindObjectAny("ntdijet"); |
241 |
> |
TTree *nt =(TTree*)inf->FindObjectAny(treeName.data()); |
242 |
|
TTree *ntevt =(TTree*)inf->FindObjectAny("ntevt"); |
243 |
< |
nt->AddFriend(ntevt); |
243 |
> |
if(entryMode < 1) nt->AddFriend(ntevt); |
244 |
|
|
245 |
|
// open the pythia (MC) file |
246 |
< |
TFile *infPythia = new TFile(pythia.Data()); |
247 |
< |
TTree *ntPythia; |
248 |
< |
TTree *ntevtPythia; |
249 |
< |
if(!refOldNtuple){ |
250 |
< |
ntPythia = (TTree*) infPythia->FindObjectAny("ntdijet"); |
251 |
< |
ntevtPythia = (TTree*) infPythia->FindObjectAny("ntevt"); |
252 |
< |
ntPythia->AddFriend(ntevtPythia); |
253 |
< |
}else{ |
241 |
< |
ntPythia = (TTree*) infPythia->FindObjectAny("nt"); |
242 |
< |
} |
243 |
< |
|
246 |
> |
TFile *infReference = new TFile(pythia.Data()); |
247 |
> |
TTree *ntReference; |
248 |
> |
TTree *ntevtReference; |
249 |
> |
|
250 |
> |
ntReference = (TTree*) infReference->FindObjectAny(treeName.data()); |
251 |
> |
ntevtReference = (TTree*) infReference->FindObjectAny("ntevt"); |
252 |
> |
if(entryMode < 1) ntReference->AddFriend(ntevtReference); |
253 |
> |
|
254 |
|
// open the datamix file |
255 |
|
TFile *infMix = new TFile(mix.Data()); |
256 |
< |
TTree *ntMix =(TTree*)infMix->FindObjectAny("ntdijet"); |
256 |
> |
TTree *ntMix =(TTree*)infMix->FindObjectAny(treeName.data()); |
257 |
|
TTree *ntevtMix =(TTree*)infMix->FindObjectAny("ntevt"); |
258 |
|
// TFile *infW = new TFile("weights_hydjet.root"); |
259 |
|
// TTree *ntw =(TTree*)infW->FindObjectAny("ntw"); |
260 |
|
|
261 |
< |
TTree *ntw =(TTree*)infMix->FindObjectAny("ntw"); |
261 |
> |
TTree *ntw =(TTree*)infMix->FindObjectAny(wName.data()); |
262 |
|
ntMix->AddFriend(ntw); |
263 |
< |
ntMix->AddFriend(ntevtMix); |
263 |
> |
if(entryMode < 1) ntMix->AddFriend(ntevtMix); |
264 |
|
|
265 |
|
int Nbin = 10; |
266 |
|
double max = 1.; |
267 |
+ |
double min = 0; |
268 |
+ |
|
269 |
+ |
if(iPlot == 1 || iPlot == 21 || iPlot == 22){ |
270 |
+ |
Nbin = 20; |
271 |
+ |
max = 2; |
272 |
+ |
min = -2; |
273 |
+ |
}; |
274 |
|
|
275 |
|
if(iPlot == 3){ |
276 |
|
Nbin = 30; |
277 |
|
max = pi; |
278 |
|
}; |
279 |
|
|
280 |
+ |
if(iPlot == 8){ |
281 |
+ |
Nbin = 50; |
282 |
+ |
max = 25; |
283 |
+ |
min = -25; |
284 |
+ |
}; |
285 |
+ |
|
286 |
+ |
if(iPlot == 9){ |
287 |
+ |
Nbin = 50; |
288 |
+ |
max = 250; |
289 |
+ |
}; |
290 |
+ |
|
291 |
+ |
if(iPlot == 11 || iPlot == 12){ |
292 |
+ |
Nbin = 50; |
293 |
+ |
max = 25; |
294 |
+ |
}; |
295 |
+ |
|
296 |
+ |
if(iPlot == 101){ |
297 |
+ |
Nbin = 20; |
298 |
+ |
max = 2; |
299 |
+ |
min = -2; |
300 |
+ |
} |
301 |
|
|
302 |
|
// projection histogram |
303 |
< |
TH1D *h = new TH1D(Form("h",cbin),"",Nbin,0,max); |
304 |
< |
TH1D *hPythia = new TH1D(Form("hPythia",cbin),"",Nbin,0,max); |
305 |
< |
TH1D *hDataMix = new TH1D(Form("hDataMix",cbin),"",Nbin,0,max); |
306 |
< |
|
307 |
< |
TH1D *hB = new TH1D(Form("hB",cbin),"",Nbin,0,max); |
308 |
< |
TH1D *hPythiaB = new TH1D(Form("hPythiaB",cbin),"",Nbin,0,max); |
309 |
< |
TH1D *hDataMixB = new TH1D(Form("hDataMixB",cbin),"",Nbin,0,max); |
310 |
< |
|
311 |
< |
TH1D *hFull = new TH1D("hFull","",Nbin,0,max); |
312 |
< |
TH1D *hPythiaFull = new TH1D("hPythiaFull","",Nbin,0,max); |
313 |
< |
TH1D *hDataMixFull = new TH1D("hDataMixFull","",Nbin,0,max); |
303 |
> |
TH1D *h = new TH1D(Form("h",cbin),"",Nbin,min,max); |
304 |
> |
TH1D *hReference = new TH1D(Form("hReference",cbin),"",Nbin,min,max); |
305 |
> |
TH1D *hDataMix = new TH1D(Form("hDataMix",cbin),"",Nbin,min,max); |
306 |
> |
|
307 |
> |
TH1D *hB = new TH1D(Form("hB",cbin),"",Nbin,min,max); |
308 |
> |
TH1D *hReferenceB = new TH1D(Form("hReferenceB",cbin),"",Nbin,min,max); |
309 |
> |
TH1D *hDataMixB = new TH1D(Form("hDataMixB",cbin),"",Nbin,min,max); |
310 |
> |
|
311 |
> |
TH1D *hFull = new TH1D("hFull","",Nbin,min,max); |
312 |
> |
TH1D *hReferenceFull = new TH1D("hReferenceFull","",Nbin,min,max); |
313 |
> |
TH1D *hDataMixFull = new TH1D("hDataMixFull","",Nbin,min,max); |
314 |
|
|
315 |
|
TH1D* hNorm = new TH1D("hNorm","",1000,0,1000); |
316 |
< |
TH1D* hNormPythia = new TH1D("hNormPythia","",1000,0,1000); |
316 |
> |
TH1D* hNormReference = new TH1D("hNormReference","",1000,0,1000); |
317 |
|
TH1D* hNormDataMix = new TH1D("hNormDataMix","",1000,0,1000); |
318 |
|
|
319 |
|
hB->SetLineStyle(2); |
320 |
< |
hPythiaB->SetLineStyle(2); |
320 |
> |
hReferenceB->SetLineStyle(2); |
321 |
|
hDataMixB->SetLineStyle(2); |
322 |
|
|
323 |
< |
// ntPythia->SetAlias("pt1","et1"); |
324 |
< |
// ntPythia->SetAlias("pt2","et2"); |
323 |
> |
// ntReference->SetAlias("pt1","et1"); |
324 |
> |
// ntReference->SetAlias("pt2","et2"); |
325 |
|
|
326 |
|
nt->SetAlias("pt1","jtpt1"); |
327 |
|
nt->SetAlias("pt2","jtpt2"); |
329 |
|
nt->SetAlias("eta2","jteta2"); |
330 |
|
nt->SetAlias("phi1","jtphi1"); |
331 |
|
nt->SetAlias("phi2","jtphi2"); |
294 |
– |
|
332 |
|
ntMix->SetAlias("pt1","jtpt1"); |
333 |
|
ntMix->SetAlias("pt2","jtpt2"); |
334 |
|
ntMix->SetAlias("eta1","jteta1"); |
335 |
|
ntMix->SetAlias("eta2","jteta2"); |
336 |
|
ntMix->SetAlias("phi1","jtphi1"); |
337 |
|
ntMix->SetAlias("phi2","jtphi2"); |
338 |
< |
|
339 |
< |
|
340 |
< |
if(!refOldNtuple){ |
341 |
< |
ntPythia->SetAlias("pt1","jtpt1"); |
342 |
< |
ntPythia->SetAlias("pt2","jtpt2"); |
343 |
< |
ntPythia->SetAlias("eta1","jteta1"); |
344 |
< |
ntPythia->SetAlias("eta2","jteta2"); |
345 |
< |
ntPythia->SetAlias("phi1","jtphi1"); |
346 |
< |
ntPythia->SetAlias("phi2","jtphi2"); |
347 |
< |
} |
338 |
> |
ntReference->SetAlias("pt1","jtpt1"); |
339 |
> |
ntReference->SetAlias("pt2","jtpt2"); |
340 |
> |
ntReference->SetAlias("eta1","jteta1"); |
341 |
> |
ntReference->SetAlias("eta2","jteta2"); |
342 |
> |
ntReference->SetAlias("phi1","jtphi1"); |
343 |
> |
ntReference->SetAlias("phi2","jtphi2"); |
344 |
> |
|
345 |
> |
nt->SetAlias("cent","hfp"); |
346 |
> |
ntMix->SetAlias("cent","hfp"); |
347 |
> |
ntReference->SetAlias("cent","hfp"); |
348 |
|
|
349 |
|
nt->SetAlias("dphi","acos(cos(phi1-phi2))"); |
350 |
|
ntMix->SetAlias("dphi","acos(cos(phi1-phi2))"); |
351 |
< |
ntPythia->SetAlias("dphi","acos(cos(phi1-phi2))"); |
351 |
> |
ntReference->SetAlias("dphi","acos(cos(phi1-phi2))"); |
352 |
|
|
353 |
|
if(iPlot == 0){ |
354 |
|
nt->SetAlias("var","pt2/pt1"); |
355 |
< |
ntPythia->SetAlias("var","pt2/pt1"); |
355 |
> |
ntReference->SetAlias("var","pt2/pt1"); |
356 |
|
ntMix->SetAlias("var","pt2/pt1"); |
357 |
|
} |
358 |
|
|
359 |
+ |
if(iPlot == 1){ |
360 |
+ |
nt->SetAlias("var","(eta1+eta2)/2"); |
361 |
+ |
ntReference->SetAlias("var","(eta1+eta2)/2"); |
362 |
+ |
ntMix->SetAlias("var","(eta1+eta2)/2"); |
363 |
+ |
} |
364 |
+ |
|
365 |
|
if(iPlot == 3){ |
366 |
|
nt->SetAlias("var","acos(cos(phi1-phi2))"); |
367 |
< |
ntPythia->SetAlias("var","acos(cos(phi1-phi2))"); |
367 |
> |
ntReference->SetAlias("var","acos(cos(phi1-phi2))"); |
368 |
|
ntMix->SetAlias("var","acos(cos(phi1-phi2))"); |
369 |
|
} |
370 |
|
|
371 |
|
if(iPlot == 8){ |
372 |
< |
nt->SetAlias("var","pu2/pu1"); |
373 |
< |
ntPythia->SetAlias("var","pu2/pu1"); |
374 |
< |
ntMix->SetAlias("var","pu2/pu1"); |
372 |
> |
nt->SetAlias("var","pu1-pu2"); |
373 |
> |
ntReference->SetAlias("var","pu1-pu2"); |
374 |
> |
ntMix->SetAlias("var","pu1-pu2"); |
375 |
> |
} |
376 |
> |
|
377 |
> |
if(iPlot == 11){ |
378 |
> |
nt->SetAlias("var","pu1"); |
379 |
> |
ntReference->SetAlias("var","pu1"); |
380 |
> |
ntMix->SetAlias("var","pu1"); |
381 |
|
} |
382 |
|
|
383 |
< |
nt->Draw("var>>hFull",dijet&&noise&&jetID&¢Ntrk); |
384 |
< |
nt->Draw("var>>hB",side&&noise&&jetID&¢Ntrk); |
385 |
< |
nt->Draw("pt1>>hNorm",lead&&noise&&jetID&¢Ntrk); |
383 |
> |
if(iPlot == 12){ |
384 |
> |
nt->SetAlias("var","pu2"); |
385 |
> |
ntReference->SetAlias("var","pu2"); |
386 |
> |
ntMix->SetAlias("var","pu2"); |
387 |
> |
} |
388 |
> |
|
389 |
> |
if(iPlot == 9){ |
390 |
> |
nt->SetAlias("var","ntrk"); |
391 |
> |
ntReference->SetAlias("var","ntrk"); |
392 |
> |
ntMix->SetAlias("var","ntrk"); |
393 |
> |
} |
394 |
> |
|
395 |
> |
if(iPlot == 21){ |
396 |
> |
nt->SetAlias("var","eta1"); |
397 |
> |
ntReference->SetAlias("var","eta1"); |
398 |
> |
ntMix->SetAlias("var","eta1"); |
399 |
> |
} |
400 |
> |
|
401 |
> |
if(iPlot == 22){ |
402 |
> |
nt->SetAlias("var","eta2"); |
403 |
> |
ntReference->SetAlias("var","eta2"); |
404 |
> |
ntMix->SetAlias("var","eta2"); |
405 |
> |
} |
406 |
> |
|
407 |
> |
|
408 |
> |
|
409 |
> |
if(iPlot == 101){ |
410 |
> |
nt->SetAlias("var","eta"); |
411 |
> |
ntReference->SetAlias("var","eta"); |
412 |
> |
ntMix->SetAlias("var","eta"); |
413 |
> |
} |
414 |
> |
|
415 |
> |
if(iPlot == 51){ |
416 |
> |
nt->SetAlias("var","matchPt1/pt1"); |
417 |
> |
ntReference->SetAlias("var","matchPt1/pt1"); |
418 |
> |
ntMix->SetAlias("var","matchPt1/pt1"); |
419 |
> |
} |
420 |
> |
|
421 |
> |
if(iPlot == 52){ |
422 |
> |
nt->SetAlias("var","matchPt2/pt2"); |
423 |
> |
ntReference->SetAlias("var","matchPt2/pt2"); |
424 |
> |
ntMix->SetAlias("var","matchPt2/pt2"); |
425 |
> |
} |
426 |
> |
|
427 |
> |
|
428 |
> |
nt->Draw("var>>hFull",dijet&&noise&&jetID&¢HF&&vtx); |
429 |
> |
nt->Draw("var>>hB",side&&noise&&jetID&¢HF&&vtx); |
430 |
> |
nt->Draw("pt1>>hNorm",lead&&noise&&jetID&¢HF&&vtx); |
431 |
|
|
432 |
< |
ntMix->Draw("var>>hDataMixFull",weight*(dijet&&jetID&¢HF)); |
433 |
< |
ntMix->Draw("var>>hDataMixB",weight*(side&&jetID&¢HF)); |
434 |
< |
ntMix->Draw("pt1>>hNormDataMix",weight*(lead&&jetID&¢HF)); |
432 |
> |
ntMix->Draw("var>>hDataMixFull",weight*(dijet&&jetID&¢HF&&vtx)); |
433 |
> |
ntMix->Draw("var>>hDataMixB",weight*(side&&jetID&¢HF&&vtx)); |
434 |
> |
ntMix->Draw("pt1>>hNormDataMix",weight*(lead&&jetID&¢HF&&vtx)); |
435 |
|
|
436 |
< |
ntPythia->Draw("var>>hPythiaFull",dijet&&noise&&jetID&¢HF); |
437 |
< |
ntPythia->Draw("var>>hPythiaB",side&&noise&&jetID&¢HF); |
438 |
< |
ntPythia->Draw("pt1>>hNormPythia",lead&&noise&&jetID&¢HF); |
345 |
< |
|
346 |
< |
hDataMixB->Scale(sideScale); |
347 |
< |
hB->Scale(sideScale); |
348 |
< |
hPythiaB->Scale(sideScale); |
436 |
> |
ntReference->Draw("var>>hReferenceFull",dijet&&noise&&jetID&¢HF&&vtx); |
437 |
> |
ntReference->Draw("var>>hReferenceB",side&&noise&&jetID&¢HF&&vtx); |
438 |
> |
ntReference->Draw("pt1>>hNormReference",lead&&noise&&jetID&¢HF&&vtx); |
439 |
|
|
440 |
|
hDataMix->Add(hDataMixFull); |
441 |
|
h->Add(hFull); |
442 |
< |
hPythia->Add(hPythiaFull); |
442 |
> |
hReference->Add(hReferenceFull); |
443 |
|
|
444 |
|
if(subtract){ |
445 |
|
hDataMix->Add(hDataMixB,-1); |
446 |
|
h->Add(hB,-1); |
447 |
< |
hPythia->Add(hPythiaB,-1); |
447 |
> |
hReference->Add(hReferenceB,-1); |
448 |
|
} |
449 |
|
|
450 |
|
hB->SetFillStyle(3005); |
463 |
|
} |
464 |
|
h->SetMarkerStyle(20); |
465 |
|
|
466 |
< |
if(hPythia->Integral() > 0){ |
467 |
< |
hPythia->Scale(1./hNormPythia->Integral()); |
466 |
> |
if(hReference->Integral() > 0){ |
467 |
> |
hReference->Scale(1./hNormReference->Integral()); |
468 |
|
} |
469 |
|
|
470 |
< |
hPythia->SetLineColor(kBlue); |
471 |
< |
hPythia->SetFillColor(kAzure-8); |
472 |
< |
hPythia->SetFillStyle(3005); |
470 |
> |
hReference->SetLineColor(kBlue); |
471 |
> |
hReference->SetFillColor(kAzure-8); |
472 |
> |
hReference->SetFillStyle(3005); |
473 |
|
|
474 |
|
if(normLead){ |
475 |
|
hDataMixB->Scale(1./hNormDataMix->Integral()); |
503 |
|
if(drawXLabel) hDataMix->SetXTitle("A_{J} = (p_{T,1}-p_{T,2})/(p_{T,1}+p_{T,2})"); |
504 |
|
hDataMix->SetYTitle("Event Fraction"); |
505 |
|
|
506 |
< |
if(iPlot==9)hDataMix->SetXTitle("p_{T,2}^{background}/p_{T,1}^{background}"); |
506 |
> |
if(iPlot==1) hDataMix->SetXTitle("#eta_{dijet} = (#eta_{1}+#eta_{2})/2"); |
507 |
> |
if(iPlot==21) hDataMix->SetXTitle("#eta_{1}"); |
508 |
> |
if(iPlot==22) hDataMix->SetXTitle("#eta_{2}"); |
509 |
> |
|
510 |
> |
if(iPlot==8) hDataMix->SetXTitle("p_{T,1}^{background}-p_{T,2}^{background}"); |
511 |
> |
if(iPlot==9) hDataMix->SetXTitle("N_{trk}^{offline}"); |
512 |
> |
|
513 |
> |
if(iPlot==11) hDataMix->SetXTitle("p_{T,1}^{background}"); |
514 |
> |
if(iPlot==12) hDataMix->SetXTitle("p_{T,2}^{background}"); |
515 |
|
|
516 |
|
if(drawXLabel){ |
517 |
|
if(iPlot==0) hDataMix->SetXTitle("p_{T,2}/p_{T,1}"); |
519 |
|
} |
520 |
|
|
521 |
|
if(iPlot==0) hDataMix->SetMaximum(0.32); |
522 |
+ |
|
523 |
+ |
if(iPlot == 1 || iPlot==21 || iPlot==22){ |
524 |
+ |
hDataMix->SetMaximum(0.3); |
525 |
+ |
hDataMix->SetMinimum(0); |
526 |
+ |
} |
527 |
+ |
|
528 |
+ |
|
529 |
|
if(iPlot==3){ |
530 |
|
hDataMix->SetMaximum(2.52); |
531 |
|
hDataMix->SetMinimum(0.00004); |
532 |
|
} |
533 |
|
|
534 |
+ |
if(iPlot==8){ |
535 |
+ |
hDataMix->SetMaximum(10); |
536 |
+ |
hDataMix->SetMinimum(0.00004); |
537 |
+ |
} |
538 |
+ |
|
539 |
+ |
if(iPlot==9){ |
540 |
+ |
hDataMix->SetMaximum(0.15); |
541 |
+ |
hDataMix->SetMinimum(0.); |
542 |
+ |
} |
543 |
+ |
|
544 |
+ |
if(iPlot==11 || iPlot == 12){ |
545 |
+ |
hDataMix->SetMaximum(10); |
546 |
+ |
hDataMix->SetMinimum(0.00004); |
547 |
+ |
} |
548 |
+ |
|
549 |
+ |
|
550 |
+ |
|
551 |
|
//hDataMix->GetXaxis()->SetNdivisions(905,true); |
552 |
|
hDataMix->GetYaxis()->SetNdivisions(505,true); |
553 |
|
|
554 |
< |
hPythia->SetMarkerColor(ppColor); |
555 |
< |
hPythia->SetLineColor(ppColor); |
556 |
< |
hPythia->SetMarkerStyle(24); |
554 |
> |
hReference->SetMarkerColor(ppColor); |
555 |
> |
hReference->SetLineColor(ppColor); |
556 |
> |
hReference->SetMarkerStyle(25); |
557 |
|
|
558 |
|
hDataMix->Draw();//"hist"); |
559 |
|
hDataMix->Draw("hist same"); |
560 |
< |
hPythia->Draw("same"); |
560 |
> |
// hReference->Draw("same"); |
561 |
|
|
562 |
|
cout<<"PbPb ENTRIES : "<<endl; |
563 |
< |
cout<<hPythia->GetEntries()<<endl; |
563 |
> |
cout<<hReference->GetEntries()<<endl; |
564 |
|
|
565 |
|
cout<<"PbPb integral : "<<endl; |
566 |
< |
cout<<hPythia->Integral()<<endl; |
566 |
> |
cout<<hReference->Integral()<<endl; |
567 |
|
|
568 |
|
cout<<"pPb integral : "<<endl; |
569 |
|
cout<<h->Integral()<<endl; |
586 |
|
|
587 |
|
// t3->AddEntry(h,Form("%s #mub^{-1}",LUM),""); |
588 |
|
t3->AddEntry(h,"pPb #sqrt{s}=5.02 TeV","p"); |
589 |
< |
t3->AddEntry(hPythia,"PbPb #sqrt{s}=2.76 TeV","p"); |
589 |
> |
t3->AddEntry(hReference,"PbPb #sqrt{s}=2.76 TeV","p"); |
590 |
|
t3->AddEntry(hDataMix,"PYTHIA+HYDJET 1.8","lf"); |
591 |
|
|
592 |
|
t3->SetFillColor(0); |