-
Notifications
You must be signed in to change notification settings - Fork 0
/
plot1.C
613 lines (511 loc) · 18.7 KB
/
plot1.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
void plot1()
{
// opening files
TFile f("filtered.root");
TFile g("bethebloch.root");
TFile facc("accepted.root");
TFile feff("efficiency_purity.root");
TFile mttd("mTTD_cut.root");
// get histograms from the files
// filtered
TH1F *h_vz_before = (TH1F *)f.Get("h_vz_before");
TH1F *h_vz_after = (TH1F *)f.Get("h_vz_after");
TH1F *h_NPratio_before = (TH1F *)f.Get("h_NPratio_before");
TH1F *h_NPratio_after = (TH1F *)f.Get("h_NPratio_after");
TH2F *h_bxby_before = (TH2F *)f.Get("h_bxby_before");
TH2F *h_bxby_after = (TH2F *)f.Get("h_bxby_after");
TH2F *h_dEdxVSp_pos_before = (TH2F *)f.Get("h_dEdxVSp_pos_before");
TH2F *h_dEdxVSp_neg_before = (TH2F *)f.Get("h_dEdxVSp_neg_before");
TH2F *h_dEdxVSp_pos_after = (TH2F *)f.Get("h_dEdxVSp_pos_after");
TH2F *h_dEdxVSp_neg_after = (TH2F *)f.Get("h_dEdxVSp_neg_after");
TH2F *h_dEdxVSp_pos_final = (TH2F *)f.Get("h_dEdxVSp_pos_final");
TH2F *h_dEdxVSp_neg_final = (TH2F *)f.Get("h_dEdxVSp_neg_final");
TH2F *h_pxpy_before = (TH2F *)f.Get("h_pxpy_before");
TH2F *h_pxpy_after = (TH2F *)f.Get("h_pxpy_after");
TH1F *h_rapidityCM_before = (TH1F *)f.Get("h_rapidityCM_before");
TH1F *h_rapidityCM_after = (TH1F *)f.Get("h_rapidityCM_after");
// Bethe Bloch
TGraph *bethebloch_e = (TGraph *)g.Get("bethebloch_e");
TGraph *bethebloch_pion = (TGraph *)g.Get("bethebloch_pion");
TGraph *bethebloch_k = (TGraph *)g.Get("bethebloch_k");
TGraph *bethebloch_p = (TGraph *)g.Get("bethebloch_p");
// TGraph *bethebloch_d = (TGraph *)g.Get("bethebloch_d");
// accepted
TH2F *h_dEdxVSp_pos_acc = (TH2F *)facc.Get("h_dEdxVSp_pos_acc");
TH2F *h_pxpy = (TH2F *)facc.Get("h_pxpy");
TH2F *h_ptyCM = (TH2F *)facc.Get("h_ptyCM");
TH1F *h_px = (TH1F *)facc.Get("h_px");
TH1F *h_py = (TH1F *)facc.Get("h_py");
TH1F *h_pt = (TH1F *)facc.Get("h_pt");
TH1F *h_yCM = (TH1F *)facc.Get("h_yCM");
TH1F *h_np = (TH1F *)facc.Get("h_np");
// efficiency purity
TH2F *h_efficiency = (TH2F *)feff.Get("h_efficiency");
TH2F *h_purity = (TH2F *)feff.Get("h_purity");
// mTTD cuts
TH2F *h_dsxdsy_before = (TH2F *)mttd.Get("h_dsxdsy_before");
TH2F *h_dsxdrho_before = (TH2F *)mttd.Get("h_dsxdrho_before");
TH2F *h_dsydrho_before = (TH2F *)mttd.Get("h_dsydrho_before");
TH2F *h_dsxdsy_discarded = (TH2F *)mttd.Get("h_dsxdsy_discarded");
TH2F *h_dsxdrho_discarded = (TH2F *)mttd.Get("h_dsxdrho_discarded");
TH2F *h_dsydrho_discarded = (TH2F *)mttd.Get("h_dsydrho_discarded");
TH2F *h_dsxdsy_after = (TH2F *)mttd.Get("h_dsxdsy_after");
TH2F *h_dsxdrho_after = (TH2F *)mttd.Get("h_dsxdrho_after");
TH2F *h_dsydrho_after = (TH2F *)mttd.Get("h_dsydrho_after");
// h_vz_before
h_vz_before->GetXaxis()->SetTitle("VertexZ [cm]");
h_vz_before->GetXaxis()->SetTitleSize(0.05);
h_vz_before->GetYaxis()->SetTitle("nTracks");
h_vz_before->GetYaxis()->SetTitleSize(0.05);
// h_vz_after
h_vz_after->GetXaxis()->SetTitle("VertexZ [cm]");
h_vz_after->GetYaxis()->SetTitle("nTracks");
// h_NPratio_before
h_NPratio_before->GetXaxis()->SetTitle("NPratio");
h_NPratio_before->GetXaxis()->SetTitleSize(0.05);
h_NPratio_before->GetYaxis()->SetTitle("nTracks");
h_NPratio_before->GetYaxis()->SetTitleSize(0.05);
// h_NPratio_after
h_NPratio_after->GetXaxis()->SetTitle("NPratio");
h_NPratio_after->GetYaxis()->SetTitle("nTracks");
// h_bxby_before
h_bxby_before->GetXaxis()->SetTitle("bx [cm]");
h_bxby_before->GetXaxis()->SetTitleSize(0.05);
h_bxby_before->GetYaxis()->SetTitle("by [cm]");
h_bxby_before->GetYaxis()->SetTitleSize(0.05);
// h_bxby_after
h_bxby_after->GetXaxis()->SetTitle("bx [cm]");
h_bxby_after->GetYaxis()->SetTitle("by [cm]");
// h_dEdxVSp_pos_before
h_dEdxVSp_pos_before->GetXaxis()->SetTitle("log_{10}(p)");
h_dEdxVSp_pos_before->GetXaxis()->SetTitleSize(0.045);
h_dEdxVSp_pos_before->GetYaxis()->SetTitle("dE/dx)");
h_dEdxVSp_pos_before->GetYaxis()->SetTitleSize(0.045);
// h_dEdxVSp_neg_before
h_dEdxVSp_neg_before->GetYaxis()->SetTitle("log_{10}(p)");
h_dEdxVSp_neg_before->GetXaxis()->SetTitle("dE/dx");
// h_dEdxVSp_pos_after
h_dEdxVSp_pos_after->GetXaxis()->SetTitle("log_{10}(p)");
h_dEdxVSp_pos_after->GetXaxis()->SetTitleSize(0.045);
h_dEdxVSp_pos_after->GetYaxis()->SetTitle("dE/dx");
h_dEdxVSp_pos_after->GetYaxis()->SetTitleSize(0.045);
// h_dEdxVSp_neg_after
h_dEdxVSp_neg_after->GetYaxis()->SetTitle("log_{10}(p)");
h_dEdxVSp_neg_after->GetXaxis()->SetTitle("dE/dx");
// h_dEdxVSp_pos_final
h_dEdxVSp_pos_final->GetXaxis()->SetTitle("log_{10}(p)");
h_dEdxVSp_pos_final->GetXaxis()->SetTitleSize(0.045);
h_dEdxVSp_pos_final->GetYaxis()->SetTitle("dE/dx");
h_dEdxVSp_pos_final->GetYaxis()->SetTitleSize(0.045);
// h_dEdxVSp_neg_final
h_dEdxVSp_neg_final->GetYaxis()->SetTitle("log_{10}(p)");
h_dEdxVSp_neg_final->GetXaxis()->SetTitle("dE/dx");
// h_pxpy_before
h_pxpy_before->GetXaxis()->SetTitle("px");
h_pxpy_before->GetYaxis()->SetTitle("py");
// h_pxpy_after
h_pxpy_after->GetXaxis()->SetTitle("px");
h_pxpy_after->GetYaxis()->SetTitle("py");
// h_rapidityCM_before
h_rapidityCM_before->GetXaxis()->SetTitle("rapidityCM");
h_rapidityCM_before->GetYaxis()->SetTitle("nTracks");
// h_rapidityCM_after
h_rapidityCM_after->GetXaxis()->SetTitle("rapidityCM");
h_rapidityCM_after->GetYaxis()->SetTitle("nTracks");
// h_dEdxVSp_pos_acc
h_dEdxVSp_pos_acc->GetXaxis()->SetTitle("log_{10}(p)");
h_dEdxVSp_pos_acc->GetXaxis()->SetTitleSize(0.045);
h_dEdxVSp_pos_acc->GetYaxis()->SetTitle("dE/dx");
h_dEdxVSp_pos_acc->GetYaxis()->SetTitleSize(0.045);
// h_pxpy
h_pxpy->GetXaxis()->SetTitle("px");
h_pxpy->GetYaxis()->SetTitle("py");
// h_ptyCM
h_ptyCM->GetXaxis()->SetTitle("pt");
h_ptyCM->GetYaxis()->SetTitle("rapidityCM");
// h_px
h_px->GetXaxis()->SetTitle("px");
h_px->GetYaxis()->SetTitle("nTracks");
// h_py
h_py->GetXaxis()->SetTitle("py");
h_py->GetYaxis()->SetTitle("nTracks");
// h_pt
h_pt->GetXaxis()->SetTitle("pt");
h_pt->GetYaxis()->SetTitle("nTracks");
// h_yCM
h_yCM->GetXaxis()->SetTitle("rapidityCM");
h_yCM->GetYaxis()->SetTitle("nTracks");
// h_np
h_np->GetXaxis()->SetTitle("Np");
h_np->GetYaxis()->SetTitle("nTracks");
// h_efficiency
h_efficiency->GetXaxis()->SetTitle("ptot");
h_efficiency->GetYaxis()->SetTitle("pt");
// h_purity
h_purity->GetXaxis()->SetTitle("ptot");
h_purity->GetYaxis()->SetTitle("pt");
// h_dsxdsy_before
h_dsxdsy_before->GetXaxis()->SetTitle("dsx");
h_dsxdsy_before->GetYaxis()->SetTitle("dsy");
// h_dsxdrho_before
h_dsxdrho_before->GetXaxis()->SetTitle("dsx");
h_dsxdrho_before->GetYaxis()->SetTitle("dsrho");
// h_dsydrho_before
h_dsydrho_before->GetXaxis()->SetTitle("dsy");
h_dsydrho_before->GetYaxis()->SetTitle("dsrho");
// h_dsxdsy_discarded
h_dsxdsy_discarded->GetXaxis()->SetTitle("dsx");
h_dsxdsy_discarded->GetXaxis()->SetTitleSize(0.045);
h_dsxdsy_discarded->GetYaxis()->SetTitle("dsy");
h_dsxdsy_discarded->GetYaxis()->SetTitleSize(0.045);
h_dsxdsy_discarded->GetYaxis()->SetMaxDigits(3);
// h_dsxdrho_discarded
h_dsxdrho_discarded->GetXaxis()->SetTitle("dsx");
h_dsxdrho_discarded->GetXaxis()->SetTitleSize(0.045);
h_dsxdrho_discarded->GetYaxis()->SetTitle("dsrho");
h_dsxdrho_discarded->GetYaxis()->SetTitleSize(0.045);
h_dsxdrho_discarded->GetYaxis()->SetMaxDigits(3);
h_dsxdrho_discarded->SetTitle("dsx vs drho");
// h_dsydrho_discarded
h_dsydrho_discarded->GetXaxis()->SetTitle("dsy");
h_dsydrho_discarded->GetXaxis()->SetTitleSize(0.045);
h_dsydrho_discarded->GetYaxis()->SetTitle("dsrho");
h_dsydrho_discarded->GetYaxis()->SetTitleSize(0.045);
h_dsydrho_discarded->GetYaxis()->SetMaxDigits(3);
// h_dsxdsy_after
h_dsxdsy_after->GetXaxis()->SetTitle("dsx");
h_dsxdsy_after->GetYaxis()->SetTitle("dsy");
// h_dsxdrho_after
h_dsxdrho_after->GetXaxis()->SetTitle("dsx");
h_dsxdrho_after->GetYaxis()->SetTitle("dsrho");
// h_dsydrho_after
h_dsydrho_after->GetXaxis()->SetTitle("dsy");
h_dsydrho_after->GetYaxis()->SetTitle("dsrho");
// Remove stats box
h_vz_before->SetStats(0);
h_vz_after->SetStats(0);
h_NPratio_before->SetStats(0);
h_NPratio_after->SetStats(0);
h_bxby_before->SetStats(0);
h_bxby_after->SetStats(0);
h_dEdxVSp_pos_before->SetStats(0);
h_dEdxVSp_neg_before->SetStats(0);
h_dEdxVSp_pos_after->SetStats(0);
h_dEdxVSp_neg_after->SetStats(0);
h_dEdxVSp_pos_final->SetStats(0);
h_dEdxVSp_neg_final->SetStats(0);
h_pxpy_before->SetStats(0);
h_pxpy_after->SetStats(0);
h_rapidityCM_before->SetStats(0);
h_rapidityCM_after->SetStats(0);
h_dEdxVSp_pos_acc->SetStats(0);
h_px->SetStats(0);
h_py->SetStats(0);
h_pt->SetStats(0);
h_yCM->SetStats(0);
h_np->SetStats(0);
h_efficiency->SetStats(0);
h_purity->SetStats(0);
h_pxpy->SetStats(0);
h_ptyCM->SetStats(0);
h_dsxdsy_before->SetStats(0);
h_dsxdrho_before->SetStats(0);
h_dsydrho_before->SetStats(0);
h_dsxdsy_discarded->SetStats(0);
h_dsxdrho_discarded->SetStats(0);
h_dsydrho_discarded->SetStats(0);
h_dsxdsy_after->SetStats(0);
h_dsxdrho_after->SetStats(0);
h_dsydrho_after->SetStats(0);
// Color Bethe Bloch
bethebloch_e->SetLineColor(kRed);
bethebloch_pion->SetLineColor(kGreen);
bethebloch_k->SetLineColor(kViolet);
bethebloch_p->SetLineColor(kBlack);
// Legends
auto legend_bethe_bloch = new TLegend(0.7, 0.12, 0.88, 0.35);
legend_bethe_bloch->AddEntry(bethebloch_e, "Electron", "l");
legend_bethe_bloch->AddEntry(bethebloch_pion, "Pion", "l");
legend_bethe_bloch->AddEntry(bethebloch_k, "Kaon", "l");
legend_bethe_bloch->AddEntry(bethebloch_p, "Proton", "l");
TCanvas c;
// c.SaveAs("plots.png["); // opening pdf
// draw all histograms
c.SetLogy();
h_vz_before->Draw("hist");
TLine *l_left = new TLine(h_vz_after->GetXaxis()->GetXmin(), 0, h_vz_after->GetXaxis()->GetXmin(), h_vz_before->GetMaximum());
l_left->SetLineColor(kRed);
l_left->SetLineStyle(9);
l_left->Draw();
TLine *l_right = new TLine(h_vz_after->GetXaxis()->GetXmax(), 0, h_vz_after->GetXaxis()->GetXmax(), h_vz_before->GetMaximum());
l_right->SetLineColor(kRed);
l_right->SetLineStyle(9);
l_right->Draw();
TLatex *pvz = new TLatex();
pvz->SetTextSize(0.045);
pvz->DrawLatexNDC(0.11, 0.7, "Cut:-570 #leq VertexZ #leq -590");
h_vz_before->SetTitle("");
// TLatex *nvz= new TLatex();
// nvz->SetTextSize(0.025);
// nvz->SetTextFont(82);
// char entriesvz[25];
// int entries= h_vz_before->GetEntries();
// sprintf(entriesvz, "Entries: %d",entries);
// cout << entriesvz << endl;
// char hello[15] = "hello";
// nvz->DrawLatex(0.8, 0.8, hello);
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_vz_before.png"); // plot
// next plot
c.Clear();
h_vz_after->Draw("hist");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_vz_after.png");
// next plot
c.Clear();
h_NPratio_before->Draw("hist");
l_left = new TLine(h_NPratio_after->GetXaxis()->GetXmin(), 0, h_NPratio_after->GetXaxis()->GetXmin(), h_NPratio_before->GetMaximum());
l_left->SetLineColor(kRed);
l_left->SetLineStyle(9);
l_left->Draw();
l_right = new TLine(h_NPratio_after->GetXaxis()->GetXmax(), 0, h_NPratio_after->GetXaxis()->GetXmax(), h_NPratio_before->GetMaximum());
l_right->SetLineColor(kRed);
l_right->SetLineStyle(9);
l_right->Draw();
TLatex *pNPratio = new TLatex();
pNPratio->SetTextSize(0.045);
pNPratio->DrawLatexNDC(0.115, 0.865, "Cut: 0.5 #leq NPratio #leq 1.1");
h_NPratio_before->SetTitle("");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_NPratio_before.png");
// next plot
c.Clear();
h_NPratio_after->Draw("hist");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_NPratio_after.png");
// next plot
c.Clear();
c.SetLogy(0);
c.SetLogz();
h_bxby_before->Draw("colz");
TBox *box = new TBox(h_bxby_after->GetXaxis()->GetXmin(), h_bxby_after->GetYaxis()->GetXmin(), h_bxby_after->GetXaxis()->GetXmax(), h_bxby_after->GetYaxis()->GetXmax());
box->SetLineColor(kRed);
box->SetFillStyle(0);
box->Draw();
TLatex *pbxby = new TLatex();
pbxby->SetTextSize(0.03);
pbxby->DrawLatexNDC(0.4, 0.37, "#splitline{Cut:-4 #leq b_{x} #leq 4}{-2 #leq b_{y} #leq 2}");
h_bxby_before->SetTitle("");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_bxby_before.png");
// next plot
c.Clear();
h_bxby_after->Draw("colz");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_bxby_after.png");
// next plot
c.Clear();
h_dEdxVSp_pos_before->Draw("colz");
bethebloch_e->Draw("same");
bethebloch_pion->Draw("same");
bethebloch_k->Draw("same");
bethebloch_p->Draw("same");
legend_bethe_bloch->Draw("same");
// bethebloch_d->Draw("same");
h_dEdxVSp_pos_before->SetTitle("dE/dx vs p before cut");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_dEdxVSp_pos_before.png");
// next plot
c.Clear();
h_dEdxVSp_neg_before->Draw("colz");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_dEdxVSp_neg_before.png");
// next plot
c.Clear();
h_dEdxVSp_pos_after->Draw("colz");
bethebloch_e->Draw("same");
bethebloch_pion->Draw("same");
bethebloch_k->Draw("same");
bethebloch_p->Draw("same");
legend_bethe_bloch->Draw("same");
// bethebloch_d->Draw("same");
h_dEdxVSp_pos_after->SetTitle("dE/dx vs p after cut");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_dEdxVSp_pos_after.png");
// next plot
c.Clear();
h_dEdxVSp_neg_after->Draw("colz");
bethebloch_e->Draw("same");
bethebloch_pion->Draw("same");
bethebloch_k->Draw("same");
bethebloch_p->Draw("same");
// bethebloch_d->Draw("same");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_dEdxVSp_neg_after.png");
// next plot
c.Clear();
h_dEdxVSp_pos_final->Draw("colz");
bethebloch_e->Draw("same");
bethebloch_pion->Draw("same");
bethebloch_k->Draw("same");
bethebloch_p->Draw("same");
legend_bethe_bloch->Draw("same");
// bethebloch_d->Draw("same");
h_dEdxVSp_pos_final->SetTitle("dE/dx vs p after cut");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_dEdxVSp_pos_final.png");
// next plot
c.Clear();
h_dEdxVSp_neg_final->Draw("colz");
bethebloch_e->Draw("same");
bethebloch_pion->Draw("same");
bethebloch_k->Draw("same");
bethebloch_p->Draw("same");
// bethebloch_d->Draw("same");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_dEdxVSp_neg_final.png");
// next plot
c.Clear();
h_dEdxVSp_neg_final->Draw("colz");
bethebloch_e->Draw("same");
bethebloch_pion->Draw("same");
bethebloch_k->Draw("same");
bethebloch_p->Draw("same");
// bethebloch_d->Draw("same");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_dEdxVSp_neg_final.png");
// next plot
c.Clear();
h_pxpy_before->Draw("colz");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_pxpy_before.png");
// next plot
c.Clear();
h_pxpy_after->Draw("colz");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_pxpy_after.png");
// next plot
c.Clear();
h_rapidityCM_before->Draw("hist");
l_left = new TLine(h_rapidityCM_after->GetXaxis()->GetXmin(), 0, h_rapidityCM_after->GetXaxis()->GetXmin(), h_rapidityCM_before->GetMaximum());
l_left->SetLineColor(kRed);
l_left->SetLineStyle(9);
l_left->Draw();
l_right = new TLine(h_rapidityCM_after->GetXaxis()->GetXmax(), 0, h_rapidityCM_after->GetXaxis()->GetXmax(), h_rapidityCM_before->GetMaximum());
l_right->SetLineColor(kRed);
l_right->SetLineStyle(9);
l_right->Draw();
TLatex *prapidityCM = new TLatex();
prapidityCM->SetTextSize(0.03);
prapidityCM->SetTextFont(82);
prapidityCM->DrawLatexNDC(0.12, 0.87, "Cut:-0.75 #leq yCM #leq 0.75");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_rapidityCM_before.png");
// next plot
c.Clear();
h_rapidityCM_after->Draw("hist");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_rapidityCM_after.png");
// next plot
c.Clear();
h_dEdxVSp_pos_acc->Draw("colz");
bethebloch_e->Draw("same");
bethebloch_pion->Draw("same");
bethebloch_k->Draw("same");
bethebloch_p->Draw("same");
legend_bethe_bloch->Draw("same");
// bethebloch_d->Draw("same");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_dEdxVSp_pos_acc.png");
// next plot
c.Clear();
h_pxpy->Draw("colz");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_pxpy.png");
// next plot
c.Clear();
h_ptyCM->Draw("colz");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_ptyCM.png");
// next plot
c.Clear();
h_px->Draw("hist");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_px.png");
// next plot
c.Clear();
h_py->Draw("hist");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_py.png");
// next plot
c.Clear();
h_pt->Draw("hist");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_pt.png");
// next plot
c.Clear();
h_yCM->Draw("hist");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_yCM.png");
// next plot
c.Clear();
h_np->Draw("hist");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_np.png");
// next plot
c.Clear();
h_efficiency->Draw("colz");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_efficiency.png");
// next plot
c.Clear();
h_purity->Draw("colz");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_purity.png");
// next plot
c.Clear();
h_dsxdsy_before->Draw("colz");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_dsxdsy_before.png");
// next plot
c.Clear();
h_dsxdrho_before->Draw("colz");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_dsxdrho_before.png");
// next plot
c.Clear();
h_dsydrho_before->Draw("colz");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_dsydrho_before.png");
// next plot
c.Clear();
h_dsxdsy_discarded->Draw("colz");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_dsxdsy_discarded.png");
// next plot
c.Clear();
h_dsxdrho_discarded->Draw("colz");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_dsxdrho_discarded.png");
// next plot
c.Clear();
h_dsydrho_discarded->Draw("colz");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_dsydrho_discarded.png");
// next plot
c.Clear();
h_dsxdsy_after->Draw("colz");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_dsxdsy_after.png");
// next plot
c.Clear();
h_dsxdrho_after->Draw("colz");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_dsxdsy_after.png");
// next plot
c.Clear();
h_dsydrho_after->Draw("colz");
// c.SaveAs("plots.png");
c.SaveAs("./plots/h_dsydrho_after.png");
// c.SaveAs("plots.png]"); // closing pdf
}