multihough_production_validation.C
Go to the documentation of this file.
2 
3  // Define initial parameters:
4  std::string det = "FarDet";
5  std::string rel1 = "S14-03-06";
6  std::string rel2 = "FA14-10-03";
7  std::string cat = "genie_rhc_swap";
8  char name[256];
9  double max = 0.0;
10  bool print = true;
11 
12  // Old MC
13  // TFile *f1 = new TFile("/nova/prod/mc/S14-03-06/reco/validation/hadd/fardet_cosmics_S14-03-06.sim.daq.reco.hist.root");
14  TFile *f1 = new TFile("/nova/prod/mc/S14-03-06/reco/validation/hadd/fardet_genie_rhc_swap_S14-03-06.sim.daq.reco.hist.root");
15  gDirectory->cd("multihoughana");
16  TTree *nt1 = (TTree*)gDirectory->Get("hough");
17  nt1->SetMarkerStyle(2);
18 
19 
20  // New MC
21  // TFile *f2 = new TFile("/nova/ana/users/raddatz/FA14-10-03_Reco_Val/FA14-10-03_files/fd_cry.root");
22  TFile *f2 = new TFile("/nova/ana/users/raddatz/FA14-10-03_Reco_Val/FA14-10-03_files/fd_genie_rhc_swap.root");
23  gDirectory->cd("multihoughana");
24  TTree *nt2 = (TTree*)gDirectory->Get("hough");
25  nt2->SetMarkerStyle(2);
26 
27 
28 
29 
30 
31  TH1F *hNHLX_1 = new TH1F("hNHLX_1","Num HL x-view;# of lines;fraction",11,-0.5,10.5);
32  TH1F *hNHLY_1 = new TH1F("hNHLY_1","Num HL y-view;# of lines;fraction",11,-0.5,10.5);
33  TH1F *hNHLX_2 = new TH1F("hNHLX_2","Num HL x-view;# of lines;fraction",11,-0.5,10.5);
34  TH1F *hNHLY_2 = new TH1F("hNHLY_2","Num HL y-view;# of lines;fraction",11,-0.5,10.5);
35 
36  TH1F *hTHX_1 = new TH1F("hTHX_1","Threshold value for Hough Space map (x-view);threshold (arbitrary units);fraction",100,0.0,5.0);
37  TH1F *hTHY_1 = new TH1F("hTHY_1","Threshold value for Hough Space map (y-view);threshold (arbitrary units);fraction",100,0.0,5.0);
38  TH1F *hTHX_2 = new TH1F("hTHX_2","Threshold value for Hough Space map (x-view);threshold (arbitrary units);fraction",100,0.0,5.0);
39  TH1F *hTHY_2 = new TH1F("hTHY_2","Threshold value for Hough Space map (y-view);threshold (arbitrary units);fraction",100,0.0,5.0);
40 
41  TH1F *h1x_1 = new TH1F("h1x_1","rho1x; rho; fraction",200,-400.0,400.0);
42  TH1F *h1y_1 = new TH1F("h1y_1","rho1y; rho; fraction",200,-400.0,400.0);
43  TH1F *h2x_1 = new TH1F("h2x_1","rho2x; rho; fraction",200,-400.0,400.0);
44  TH1F *h2y_1 = new TH1F("h2y_1","rho2y; rho; fraction",200,-400.0,400.0);
45  TH1F *h1x_2 = new TH1F("h1x_2","rho1x; rho; fraction",200,-400.0,400.0);
46  TH1F *h1y_2 = new TH1F("h1y_2","rho1y; rho; fraction",200,-400.0,400.0);
47  TH1F *h2x_2 = new TH1F("h2x_2","rho2x; rho; fraction",200,-400.0,400.0);
48  TH1F *h2y_2 = new TH1F("h2y_2","rho2y; rho; fraction",200,-400.0,400.0);
49 
50  TH1F *hT1x_1 = new TH1F("hT1x_1","#theta 1^{st} line x-view;#theta [rad];fraction",40,0.0,4.0);
51  TH1F *hT2x_1 = new TH1F("hT2x_1","#theta 2^{nd} line x-view;#theta [rad];fraction",40,0.0,4.0);
52  TH1F *hT1y_1 = new TH1F("hT1y_1","#theta 1^{st} line y-view;#theta [rad];fraction",40,0.0,4.0);
53  TH1F *hT2y_1 = new TH1F("hT2y_1","#theta 2^{nd} line y-view;#theta [rad];fraction",40,0.0,4.0);
54  TH1F *hT1x_2 = new TH1F("hT1x_2","#theta 1^{st} line x-view;#theta [rad];fraction",40,0.0,4.0);
55  TH1F *hT2x_2 = new TH1F("hT2x_2","#theta 2^{nd} line x-view;#theta [rad];fraction",40,0.0,4.0);
56  TH1F *hT1y_2 = new TH1F("hT1y_2","#theta 1^{st} line y-view;#theta [rad];fraction",40,0.0,4.0);
57  TH1F *hT2y_2 = new TH1F("hT2y_2","#theta 2^{nd} line y-view;#theta [rad];fraction",40,0.0,4.0);
58 
59  TH1F *hPoT1x_1 = new TH1F("hPoT1x_1","Peak/Threshold 1^{st} line x-view;peak/threshold;fraction",200,0.0,10000.0);
60  TH1F *hPoT2x_1 = new TH1F("hPoT2x_1","Peak/Threshold 2^{nd} line x-view;peak/threshold;fraction",200,0.0,10000.0);
61  TH1F *hPoT1y_1 = new TH1F("hPoT1y_1","Peak/Threshold 1^{st} line y-view;peak/threshold;fraction",200,0.0,10000.0);
62  TH1F *hPoT2y_1 = new TH1F("hPoT2y_1","Peak/Threshold 2^{nd} line y-view;peak/threshold;fraction",200,0.0,10000.0);
63  TH1F *hPoT1x_2 = new TH1F("hPoT1x_2","Peak/Threshold 1^{st} line x-view;peak/threshold;fraction",200,0.0,10000.0);
64  TH1F *hPoT2x_2 = new TH1F("hPoT2x_2","Peak/Threshold 2^{nd} line x-view;peak/threshold;fraction",200,0.0,10000.0);
65  TH1F *hPoT1y_2 = new TH1F("hPoT1y_2","Peak/Threshold 1^{st} line y-view;peak/threshold;fraction",200,0.0,10000.0);
66  TH1F *hPoT2y_2 = new TH1F("hPoT2y_2","Peak/Threshold 2^{nd} line y-view;peak/threshold;fraction",200,0.0,10000.0);
67 
68 
69 
70  TCanvas *cNHLX = new TCanvas("cNHLX","num HLX",1000,700);
71  cNHLX->cd();
72  cNHLX->SetLogy();
73  nt1->Draw("numHLX >> hNHLX_1");
74  nt2->Draw("numHLX >> hNHLX_2");
75  gStyle->SetOptStat(111111);
76  hNHLX_1->SetLineColor(kBlue);
77  hNHLX_1->SetLineWidth(2);
78  hNHLX_1->Scale(1.0/hNHLX_1->Integral());
79  hNHLX_1->Draw();
80  cNHLX->Update();
81  TPaveStats *s01a = hNHLX_1->FindObject("stats");
82  s01a->SetX1NDC(0.7);
83  s01a->SetX2NDC(0.9);
84  s01a->SetY1NDC(0.7);
85  s01a->SetY2NDC(0.9);
86  s01a->Draw();
87  hNHLX_2->SetLineColor(kRed);
88  hNHLX_2->SetLineWidth(2);
89  hNHLX_2->Scale(1.0/hNHLX_2->Integral());
90  hNHLX_2->Draw("sames");
91  cNHLX->Update();
92  TPaveStats *s01b = hNHLX_2->FindObject("stats");
93  s01b->SetX1NDC(0.7);
94  s01b->SetX2NDC(0.9);
95  s01b->SetY1NDC(0.5);
96  s01b->SetY2NDC(0.7);
97  s01b->Draw();
98  sprintf(name,"NumHLX_%s_%s_%s_%s.png",det.c_str(),cat.c_str(),rel1.c_str(),rel2.c_str());
99  if(print) cNHLX->Print(name);
100 
101  TCanvas *cNHLY = new TCanvas("cNHLY","num HLY",1000,700);
102  cNHLY->cd();
103  cNHLY->SetLogy();
104  nt1->Draw("numHLY >> hNHLY_1");
105  nt2->Draw("numHLY >> hNHLY_2");
106  gStyle->SetOptStat(111111);
107  hNHLY_1->SetLineColor(kBlue);
108  hNHLY_1->SetLineWidth(2);
109  hNHLY_1->Scale(1.0/hNHLY_1->Integral());
110  hNHLY_1->Draw();
111  cNHLY->Update();
112  TPaveStats *s02a = hNHLY_1->FindObject("stats");
113  s02a->SetX1NDC(0.7);
114  s02a->SetX2NDC(0.9);
115  s02a->SetY1NDC(0.7);
116  s02a->SetY2NDC(0.9);
117  s02a->Draw();
118  hNHLY_2->SetLineColor(kRed);
119  hNHLY_2->SetLineWidth(2);
120  hNHLY_2->Scale(1.0/hNHLY_2->Integral());
121  hNHLY_2->Draw("sames");
122  cNHLY->Update();
123  TPaveStats *s02b = hNHLY_2->FindObject("stats");
124  s02b->SetX1NDC(0.7);
125  s02b->SetX2NDC(0.9);
126  s02b->SetY1NDC(0.5);
127  s02b->SetY2NDC(0.7);
128  s02b->Draw();
129  sprintf(name,"NumHLY_%s_%s_%s_%s.png",det.c_str(),cat.c_str(),rel1.c_str(),rel2.c_str());
130  if(print) cNHLY->Print(name);
131 
132 
133  TCanvas *cTHX = new TCanvas("cTHX","THX",1000,700);
134  cTHX->cd();
135  cTHX->SetLogy();
136  nt1->Draw("threshx >> hTHX_1");
137  nt2->Draw("threshx >> hTHX_2");
138  gStyle->SetOptStat(111111);
139  hTHX_1->SetLineColor(kBlue);
140  hTHX_1->SetLineWidth(2);
141  hTHX_1->Scale(1.0/hTHX_1->Integral());
142  hTHX_1->Draw();
143  cTHX->Update();
144  TPaveStats *s03a = hTHX_1->FindObject("stats");
145  s03a->SetX1NDC(0.7);
146  s03a->SetX2NDC(0.9);
147  s03a->SetY1NDC(0.7);
148  s03a->SetY2NDC(0.9);
149  s03a->Draw();
150  hTHX_2->SetLineColor(kRed);
151  hTHX_2->SetLineWidth(2);
152  hTHX_2->Scale(1.0/hTHX_2->Integral());
153  hTHX_2->Draw("sames");
154  cTHX->Update();
155  TPaveStats *s03b = hTHX_2->FindObject("stats");
156  s03b->SetX1NDC(0.7);
157  s03b->SetX2NDC(0.9);
158  s03b->SetY1NDC(0.5);
159  s03b->SetY2NDC(0.7);
160  s03b->Draw();
161  sprintf(name,"ThreshX_%s_%s_%s_%s.png",det.c_str(),cat.c_str(),rel1.c_str(),rel2.c_str());
162  if(print) cTHX->Print(name);
163 
164 
165  TCanvas *cTHY = new TCanvas("cTHY","THY",1000,700);
166  cTHY->cd();
167  cTHY->SetLogy();
168  nt1->Draw("threshy >> hTHY_1");
169  nt2->Draw("threshy >> hTHY_2");
170  gStyle->SetOptStat(111111);
171  hTHY_1->SetLineColor(kBlue);
172  hTHY_1->SetLineWidth(2);
173  hTHY_1->Scale(1.0/hTHY_1->Integral());
174  hTHY_1->Draw();
175  cTHY->Update();
176  TPaveStats *s04a = hTHY_1->FindObject("stats");
177  s04a->SetX1NDC(0.7);
178  s04a->SetX2NDC(0.9);
179  s04a->SetY1NDC(0.7);
180  s04a->SetY2NDC(0.9);
181  s04a->Draw();
182  hTHY_2->SetLineColor(kRed);
183  hTHY_2->SetLineWidth(2);
184  hTHY_2->Scale(1.0/hTHY_2->Integral());
185  hTHY_2->Draw("sames");
186  cTHY->Update();
187  TPaveStats *s04b = hTHY_2->FindObject("stats");
188  s04b->SetX1NDC(0.7);
189  s04b->SetX2NDC(0.9);
190  s04b->SetY1NDC(0.5);
191  s04b->SetY2NDC(0.7);
192  s04b->Draw();
193  sprintf(name,"ThreshY_%s_%s_%s_%s.png",det.c_str(),cat.c_str(),rel1.c_str(),rel2.c_str());
194  if(print) cTHY->Print(name);
195 
196 
197 
198  TCanvas *cR1x = new TCanvas("cR1x", "rho1x",1000,700);
199  cR1x->cd();
200  nt1->Draw("rho1x >> h1x_1");
201  nt2->Draw("rho1x >> h1x_2");
202  gStyle->SetOptStat(111111);
203  cR1x->SetLogy();
204  h1x_1->SetLineColor(kBlue);
205  h1x_1->SetLineWidth(2);
206  h1x_1->Scale(1.0/h1x_1->Integral());
207  h1x_1->Draw();
208  cR1x->Update();
209  TPaveStats *s05a = h1x_1->FindObject("stats");
210  s05a->SetX1NDC(0.7);
211  s05a->SetX2NDC(0.9);
212  s05a->SetY1NDC(0.7);
213  s05a->SetY2NDC(0.9);
214  s05a->Draw();
215  h1x_2->SetLineColor(kRed);
216  h1x_2->SetLineWidth(2);
217  h1x_2->Scale(1.0/h1x_2->Integral());
218  h1x_2->Draw("sames");
219  cR1x->Update();
220  TPaveStats *s05b = h1x_2->FindObject("stats");
221  s05b->SetX1NDC(0.7);
222  s05b->SetX2NDC(0.9);
223  s05b->SetY1NDC(0.5);
224  s05b->SetY2NDC(0.7);
225  s05b->Draw();
226  sprintf(name,"rho1x_%s_%s_%s_%s.png",det.c_str(),cat.c_str(),rel1.c_str(),rel2.c_str());
227  if(print) cR1x->Print(name);
228 
229  TCanvas *cR1y = new TCanvas("cR1y", "rho1y",1000,700);
230  cR1y->cd();
231  nt1->Draw("rho1y >> h1y_1");
232  nt2->Draw("rho1y >> h1y_2");
233  gStyle->SetOptStat(111111);
234  cR1y->SetLogy();
235  h1y_1->SetLineColor(kBlue);
236  h1y_1->SetLineWidth(2);
237  h1y_1->Scale(1.0/h1y_1->Integral());
238  h1y_1->Draw();
239  cR1y->Update();
240  TPaveStats *s06a = h1y_1->FindObject("stats");
241  s06a->SetX1NDC(0.7);
242  s06a->SetX2NDC(0.9);
243  s06a->SetY1NDC(0.7);
244  s06a->SetY2NDC(0.9);
245  s06a->Draw();
246  h1y_2->SetLineColor(kRed);
247  h1y_2->SetLineWidth(2);
248  h1y_2->Scale(1.0/h1y_2->Integral());
249  h1y_2->Draw("sames");
250  cR1y->Update();
251  TPaveStats *s06b = h1y_2->FindObject("stats");
252  s06b->SetX1NDC(0.7);
253  s06b->SetX2NDC(0.9);
254  s06b->SetY1NDC(0.5);
255  s06b->SetY2NDC(0.7);
256  s06b->Draw();
257  sprintf(name,"rho1y_%s_%s_%s_%s.png",det.c_str(),cat.c_str(),rel1.c_str(),rel2.c_str());
258  if(print) cR1y->Print(name);
259 
260 
261  TCanvas *cR2x = new TCanvas("cR2x", "rho2x",1000,700);
262  cR2x->cd();
263  nt1->Draw("rho2x >> h2x_1");
264  nt2->Draw("rho2x >> h2x_2");
265  gStyle->SetOptStat(111111);
266  cR2x->SetLogy();
267  h2x_1->SetLineColor(kBlue);
268  h2x_1->SetLineWidth(2);
269  h2x_1->Scale(1.0/h2x_1->Integral());
270  h2x_1->Draw();
271  cR2x->Update();
272  TPaveStats *s07a = h2x_1->FindObject("stats");
273  s07a->SetX1NDC(0.7);
274  s07a->SetX2NDC(0.9);
275  s07a->SetY1NDC(0.7);
276  s07a->SetY2NDC(0.9);
277  s07a->Draw();
278  h2x_2->SetLineColor(kRed);
279  h2x_2->SetLineWidth(2);
280  h2x_2->Scale(1.0/h2x_2->Integral());
281  h2x_2->Draw("sames");
282  cR2x->Update();
283  TPaveStats *s07b = h2x_2->FindObject("stats");
284  s07b->SetX1NDC(0.7);
285  s07b->SetX2NDC(0.9);
286  s07b->SetY1NDC(0.5);
287  s07b->SetY2NDC(0.7);
288  s07b->Draw();
289  sprintf(name,"rho2x_%s_%s_%s_%s.png",det.c_str(),cat.c_str(),rel1.c_str(),rel2.c_str());
290  if(print) cR2x->Print(name);
291 
292 
293  TCanvas *cR2y = new TCanvas("cR2y", "rho2y",1000,700);
294  cR2y->cd();
295  nt1->Draw("rho2y >> h2y_1");
296  nt2->Draw("rho2y >> h2y_2");
297  gStyle->SetOptStat(111111);
298  cR2y->SetLogy();
299  h2y_1->SetLineColor(kBlue);
300  h2y_1->SetLineWidth(2);
301  h2y_1->Scale(1.0/h2y_1->Integral());
302  h2y_1->Draw();
303  cR2y->Update();
304  TPaveStats *s08a = h2y_1->FindObject("stats");
305  s08a->SetX1NDC(0.7);
306  s08a->SetX2NDC(0.9);
307  s08a->SetY1NDC(0.7);
308  s08a->SetY2NDC(0.9);
309  s08a->Draw();
310  h2y_2->SetLineColor(kRed);
311  h2y_2->SetLineWidth(2);
312  h2y_2->Scale(1.0/h2y_2->Integral());
313  h2y_2->Draw("sames");
314  cR2y->Update();
315  TPaveStats *s08b = h2y_2->FindObject("stats");
316  s08b->SetX1NDC(0.7);
317  s08b->SetX2NDC(0.9);
318  s08b->SetY1NDC(0.5);
319  s08b->SetY2NDC(0.7);
320  s08b->Draw();
321  sprintf(name,"rho2y_%s_%s_%s_%s.png",det.c_str(),cat.c_str(),rel1.c_str(),rel2.c_str());
322  if(print) cR2y->Print(name);
323 
324 
325  TCanvas *cT1x = new TCanvas("cT1x","theta 1x",1000,700);
326  cT1x->cd();
327  nt1->Draw("theta1x >> hT1x_1");
328  nt2->Draw("theta1x >> hT1x_2");
329  gStyle->SetOptStat(111111);
330  hT1x_1->SetLineColor(kBlue);
331  hT1x_1->SetLineWidth(2);
332  hT1x_1->Scale(1.0/hT1x_1->Integral());
333  hT1x_1->Draw();
334  cT1x->Update();
335  TPaveStats *s09a = hT1x_1->FindObject("stats");
336  s09a->SetX1NDC(0.7);
337  s09a->SetX2NDC(0.9);
338  s09a->SetY1NDC(0.7);
339  s09a->SetY2NDC(0.9);
340  s09a->Draw();
341  hT1x_2->SetLineColor(kRed);
342  hT1x_2->SetLineWidth(2);
343  hT1x_2->Scale(1.0/hT1x_2->Integral());
344  hT1x_2->Draw("sames");
345  cT1x->Update();
346  TPaveStats *s09b = hT1x_2->FindObject("stats");
347  s09b->SetX1NDC(0.7);
348  s09b->SetX2NDC(0.9);
349  s09b->SetY1NDC(0.5);
350  s09b->SetY2NDC(0.7);
351  s09b->Draw();
352  sprintf(name,"theta1x_%s_%s_%s_%s.png",det.c_str(),cat.c_str(),rel1.c_str(),rel2.c_str());
353  if(print) cT1x->Print(name);
354 
355  TCanvas *cT2x = new TCanvas("cT2x","theta 2x",1000,700);
356  cT2x->cd();
357  nt1->Draw("theta2x >> hT2x_1");
358  nt2->Draw("theta2x >> hT2x_2");
359  gStyle->SetOptStat(111111);
360  hT2x_1->SetLineColor(kBlue);
361  hT2x_1->SetLineWidth(2);
362  hT2x_1->Scale(1.0/hT2x_1->Integral());
363  hT2x_1->Draw();
364  cT2x->Update();
365  TPaveStats *s10a = hT2x_1->FindObject("stats");
366  s10a->SetX1NDC(0.7);
367  s10a->SetX2NDC(0.9);
368  s10a->SetY1NDC(0.7);
369  s10a->SetY2NDC(0.9);
370  s10a->Draw();
371  hT2x_2->SetLineColor(kRed);
372  hT2x_2->SetLineWidth(2);
373  hT2x_2->Scale(1.0/hT2x_2->Integral());
374  hT2x_2->Draw("sames");
375  cT2x->Update();
376  TPaveStats *s10b = hT2x_2->FindObject("stats");
377  s10b->SetX1NDC(0.7);
378  s10b->SetX2NDC(0.9);
379  s10b->SetY1NDC(0.5);
380  s10b->SetY2NDC(0.7);
381  s10b->Draw();
382  sprintf(name,"theta2x_%s_%s_%s_%s.png",det.c_str(),cat.c_str(),rel1.c_str(),rel2.c_str());
383  if(print) cT2x->Print(name);
384 
385  TCanvas *cT1y = new TCanvas("cT1y","theta 1y",1000,700);
386  cT1y->cd();
387  nt1->Draw("theta1y >> hT1y_1");
388  nt2->Draw("theta1y >> hT1y_2");
389  gStyle->SetOptStat(111111);
390  hT1y_1->SetLineColor(kBlue);
391  hT1y_1->SetLineWidth(2);
392  hT1y_1->Scale(1.0/hT1y_1->Integral());
393  hT1y_1->Draw();
394  cT1y->Update();
395  TPaveStats *s11a = hT1y_1->FindObject("stats");
396  s11a->SetX1NDC(0.7);
397  s11a->SetX2NDC(0.9);
398  s11a->SetY1NDC(0.7);
399  s11a->SetY2NDC(0.9);
400  s11a->Draw();
401  hT1y_2->SetLineColor(kRed);
402  hT1y_2->SetLineWidth(2);
403  hT1y_2->Scale(1.0/hT1y_2->Integral());
404  hT1y_2->Draw("sames");
405  cT1y->Update();
406  TPaveStats *s11b = hT1y_2->FindObject("stats");
407  s11b->SetX1NDC(0.7);
408  s11b->SetX2NDC(0.9);
409  s11b->SetY1NDC(0.5);
410  s11b->SetY2NDC(0.7);
411  s11b->Draw();
412  sprintf(name,"theta1y_%s_%s_%s_%s.png",det.c_str(),cat.c_str(),rel1.c_str(),rel2.c_str());
413  if(print) cT1y->Print(name);
414 
415  TCanvas *cT2y = new TCanvas("cT2y","theta 2y",1000,700);
416  cT2y->cd();
417  nt1->Draw("theta2y >> hT2y_1");
418  nt2->Draw("theta2y >> hT2y_2");
419  gStyle->SetOptStat(111111);
420  hT2y_1->SetLineColor(kBlue);
421  hT2y_1->SetLineWidth(2);
422  hT2y_1->Scale(1.0/hT2y_1->Integral());
423  hT2y_1->Draw();
424  cT2y->Update();
425  TPaveStats *s12a = hT2y_1->FindObject("stats");
426  s12a->SetX1NDC(0.7);
427  s12a->SetX2NDC(0.9);
428  s12a->SetY1NDC(0.7);
429  s12a->SetY2NDC(0.9);
430  s12a->Draw();
431  hT2y_2->SetLineColor(kRed);
432  hT2y_2->SetLineWidth(2);
433  hT2y_2->Scale(1.0/hT2y_2->Integral());
434  hT2y_2->Draw("sames");
435  cT2y->Update();
436  TPaveStats *s12b = hT2y_2->FindObject("stats");
437  s12b->SetX1NDC(0.7);
438  s12b->SetX2NDC(0.9);
439  s12b->SetY1NDC(0.5);
440  s12b->SetY2NDC(0.7);
441  s12b->Draw();
442  sprintf(name,"theta2y_%s_%s_%s_%s.png",det.c_str(),cat.c_str(),rel1.c_str(),rel2.c_str());
443  if(print) cT2y->Print(name);
444 
445 
446  TCanvas *cPoT1x = new TCanvas("cPoT1x","peak over threshold 1x",1000,700);
447  cPoT1x->cd();
448  cPoT1x->SetLogy();
449  nt1->Draw("peak1x/threshx >> hPoT1x_1");
450  nt2->Draw("peak1x/threshx >> hPoT1x_2");
451  gStyle->SetOptStat(111111);
452  hPoT1x_1->SetLineColor(kBlue);
453  hPoT1x_1->SetLineWidth(2);
454  hPoT1x_1->Scale(1.0/hPoT1x_1->Integral());
455  hPoT1x_1->Draw();
456  cPoT1x->Update();
457  TPaveStats *s13a = hPoT1x_1->FindObject("stats");
458  s13a->SetX1NDC(0.7);
459  s13a->SetX2NDC(0.9);
460  s13a->SetY1NDC(0.7);
461  s13a->SetY2NDC(0.9);
462  s13a->Draw();
463  hPoT1x_2->SetLineColor(kRed);
464  hPoT1x_2->SetLineWidth(2);
465  hPoT1x_2->Scale(1.0/hPoT1x_2->Integral());
466  hPoT1x_2->Draw("sames");
467  cPoT1x->Update();
468  TPaveStats *s13b = hPoT1x_2->FindObject("stats");
469  s13b->SetX1NDC(0.7);
470  s13b->SetX2NDC(0.9);
471  s13b->SetY1NDC(0.5);
472  s13b->SetY2NDC(0.7);
473  s13b->Draw();
474  sprintf(name,"PoT1x_%s_%s_%s_%s.png",det.c_str(),cat.c_str(),rel1.c_str(),rel2.c_str());
475  if(print) cPoT1x->Print(name);
476 
477  TCanvas *cPoT2x = new TCanvas("cPoT2x","peak over threshold 2x",1000,700);
478  cPoT2x->cd();
479  cPoT2x->SetLogy();
480  nt1->Draw("peak2x/threshx >> hPoT2x_1");
481  nt2->Draw("peak2x/threshx >> hPoT2x_2");
482  gStyle->SetOptStat(111111);
483  hPoT2x_1->SetLineColor(kBlue);
484  hPoT2x_1->SetLineWidth(2);
485  hPoT2x_1->Scale(1.0/hPoT2x_1->Integral());
486  hPoT2x_1->Draw();
487  cPoT2x->Update();
488  TPaveStats *s14a = hPoT2x_1->FindObject("stats");
489  s14a->SetX1NDC(0.7);
490  s14a->SetX2NDC(0.9);
491  s14a->SetY1NDC(0.7);
492  s14a->SetY2NDC(0.9);
493  s14a->Draw();
494  hPoT2x_2->SetLineColor(kRed);
495  hPoT2x_2->SetLineWidth(2);
496  hPoT2x_2->Scale(1.0/hPoT2x_2->Integral());
497  hPoT2x_2->Draw("sames");
498  cPoT2x->Update();
499  TPaveStats *s14b = hPoT2x_2->FindObject("stats");
500  s14b->SetX1NDC(0.7);
501  s14b->SetX2NDC(0.9);
502  s14b->SetY1NDC(0.5);
503  s14b->SetY2NDC(0.7);
504  s14b->Draw();
505  sprintf(name,"PoT2x_%s_%s_%s_%s.png",det.c_str(),cat.c_str(),rel1.c_str(),rel2.c_str());
506  if(print) cPoT2x->Print(name);
507 
508  TCanvas *cPoT1y = new TCanvas("cPoT1y","peak over threshold 1y",1000,700);
509  cPoT1y->cd();
510  cPoT1y->SetLogy();
511  nt1->Draw("peak1y/threshy >> hPoT1y_1");
512  nt2->Draw("peak1y/threshy >> hPoT1y_2");
513  gStyle->SetOptStat(111111);
514  hPoT1y_1->SetLineColor(kBlue);
515  hPoT1y_1->SetLineWidth(2);
516  hPoT1y_1->Scale(1.0/hPoT1y_1->Integral());
517  hPoT1y_1->Draw();
518  cPoT1y->Update();
519  TPaveStats *s15a = hPoT1y_1->FindObject("stats");
520  s15a->SetX1NDC(0.7);
521  s15a->SetX2NDC(0.9);
522  s15a->SetY1NDC(0.7);
523  s15a->SetY2NDC(0.9);
524  s15a->Draw();
525  hPoT1y_2->SetLineColor(kRed);
526  hPoT1y_2->SetLineWidth(2);
527  hPoT1y_2->Scale(1.0/hPoT1y_2->Integral());
528  hPoT1y_2->Draw("sames");
529  cPoT1y->Update();
530  TPaveStats *s15b = hPoT1y_2->FindObject("stats");
531  s15b->SetX1NDC(0.7);
532  s15b->SetX2NDC(0.9);
533  s15b->SetY1NDC(0.5);
534  s15b->SetY2NDC(0.7);
535  s15b->Draw();
536  sprintf(name,"PoT1y_%s_%s_%s_%s.png",det.c_str(),cat.c_str(),rel1.c_str(),rel2.c_str());
537  if(print) cPoT1y->Print(name);
538 
539  TCanvas *cPoT2y = new TCanvas("cPoT2y","peak over threshold 2y",1000,700);
540  cPoT2y->cd();
541  cPoT2y->SetLogy();
542  nt1->Draw("peak2y/threshy >> hPoT2y_1");
543  nt2->Draw("peak2y/threshy >> hPoT2y_2");
544  gStyle->SetOptStat(111111);
545  hPoT2y_1->SetLineColor(kBlue);
546  hPoT2y_1->SetLineWidth(2);
547  hPoT2y_1->Scale(1.0/hPoT2y_1->Integral());
548  hPoT2y_1->Draw();
549  cPoT2y->Update();
550  TPaveStats *s16a = hPoT2y_1->FindObject("stats");
551  s16a->SetX1NDC(0.7);
552  s16a->SetX2NDC(0.9);
553  s16a->SetY1NDC(0.7);
554  s16a->SetY2NDC(0.9);
555  s16a->Draw();
556  hPoT2y_2->SetLineColor(kRed);
557  hPoT2y_2->SetLineWidth(2);
558  hPoT2y_2->Scale(1.0/hPoT2y_2->Integral());
559  hPoT2y_2->Draw("sames");
560  cPoT2y->Update();
561  TPaveStats *s16b = hPoT2y_2->FindObject("stats");
562  s16b->SetX1NDC(0.7);
563  s16b->SetX2NDC(0.9);
564  s16b->SetY1NDC(0.5);
565  s16b->SetY2NDC(0.7);
566  s16b->Draw();
567  sprintf(name,"PoT2y_%s_%s_%s_%s.png",det.c_str(),cat.c_str(),rel1.c_str(),rel2.c_str());
568  if(print) cPoT2y->Print(name);
569 
570 }
const XML_Char * name
Definition: expat.h:151
enum BeamMode kRed
Float_t f2
void multihough_production_validation()
bool print
Float_t f1
T max(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:66
enum BeamMode kBlue
enum BeamMode string