-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplot_LQGENEP_etaDist_tau_energyCombos.C
84 lines (66 loc) · 2.89 KB
/
plot_LQGENEP_etaDist_tau_energyCombos.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
int plot_LQGENEP_etaDist_tau_energyCombos()
{
gStyle->SetOptStat(0);
int vsize = 0;
std::string title = "#eta distribution for #tau^{-} produced in LQ Events";
TCanvas *c1 = new TCanvas();
double xmin = -2.5;
double xmax = 7.5;
//----------------------------------------------------------------------------------------------------------
std::string inputFile3 = "./outdir/tau_dist_comparison_10000events/e5_p275_LQ.root";
TFile *f3 = TFile::Open(inputFile3.c_str());
TTree *t3 = (TTree*)f3->Get("EICTree");
vsize = t3->Draw("particles.eta:particles.phi:particles.pt","(particles.id==15)*(particles.orig==8)","goff");
TH1F *h3 = new TH1F("h3",title.c_str(),100,xmin,xmax);
for(int i = 0; i < vsize; i++)
{
h3->Fill(t3->GetV1()[i]);
}
h3->Draw("colz");
h3->GetXaxis()->SetTitle("#eta");
h3->GetYaxis()->SetTitle("Number of Particles");
h3->GetYaxis()->SetTitleOffset(1.6);
h3->SetLineColor(kGreen);
h3->SetFillColor(kGreen);
h3->SetFillStyle(3003);
c1->Update();
//----------------------------------------------------------------------------------------------------------
std::string inputFile2 = "./outdir/tau_dist_comparison_10000events/e30_p50_LQ.root";
TFile *f2 = TFile::Open(inputFile2.c_str());
TTree *t2 = (TTree*)f2->Get("EICTree");
vsize = t2->Draw("particles.eta:particles.phi:particles.pt","(particles.id==15)*(particles.orig==8)","goff");
TH1F *h2 = new TH1F("h2",title.c_str(),100,xmin,xmax);
for(int i = 0; i < vsize; i++)
{
h2->Fill(t2->GetV1()[i]);
}
h2->Draw("colz same");
h2->SetLineColor(kBlue);
h2->SetFillColor(kBlue);
h2->SetFillStyle(3003);
c1->Update();
//----------------------------------------------------------------------------------------------------------
std::string inputFile = "./outdir/tau_dist_comparison_10000events/e20_p250_LQ.root";
TFile *f = TFile::Open(inputFile.c_str());
TTree *t = (TTree*)f->Get("EICTree");
vsize = t->Draw("particles.eta:particles.phi:particles.pt","(particles.id==15)*(particles.orig==8)","goff");
TH1F *h1 = new TH1F("h1",title.c_str(),100,xmin,xmax);
for(int i = 0; i < vsize; i++)
{
h1->Fill(t->GetV1()[i]);
}
h1->Draw("colz same");
h1->SetLineColor(kRed);
h1->SetFillColor(kRed);
h1->SetFillStyle(3003);
c1->Update();
//----------------------------------------------------------------------------------------------------------
leg = new TLegend(0.55,0.9,0.9,0.75);
leg->SetBorderSize(1);
leg->AddEntry(h1,"20 Gev x 250 Gev","l");
leg->AddEntry(h2,"30 Gev x 50 Gev","l");
leg->AddEntry(h3,"5 Gev x 275 Gev","l");
leg->Draw("same");
c1->Update();
return 0;
}