3 TFile *fin = TFile::Open(
"Gamma_Neutron_Energy_Graphs.root");
5 TCanvas *c1 =
new TCanvas();
7 TH2F *n2h2 =
new TH2F(
"Percentage of Energy Deposited by 2 GeV Particles vs Cone Size",
"Percentage of Energy Deposited by 2 GeV Particles vs Cone Size",1,0,1,1,0,1.1);
8 TGraph *n2gr = (TGraph *) fin->Get(
"neutron2GeV")->Clone();
9 n2h2->SetXTitle(
"Cone Size");
10 n2h2->SetYTitle(
"Percentage of Energy Deposited");
13 TGraph *g2gr = (TGraph *) fin->Get(
"gamma2GeV")->Clone();
17 TLine *
tl =
new TLine();
19 tl->DrawLine(0.1,0,0.1,1.1);
20 TLine *
t2 =
new TLine();
22 t2->DrawLine(0.024,0,0.024,1.1);
23 TLegend *legrda =
new TLegend(0.63,0.24,0.84,0.59,NULL,
"brNDC");
24 legrda->SetLineColor(1);
25 legrda->SetLineStyle(1);
26 legrda->SetLineWidth(1);
27 legrda->SetFillColor(10);
28 legrda->SetFillStyle(1001);
29 legrda->SetBorderSize(0);
32 legrda->AddEntry(gamma2GeV,
"2 GeV Gamma",
"p");
33 legrda->AddEntry(neutron2GeV,
"2 GeV Neutron",
"p");
34 legrda->AddEntry(tl,
"HCAL tower size",
"l");
35 legrda->AddEntry(t2,
"EMCAL tower size",
"l");
37 c1->Print(
"Gamma_vs_Neutron_2GeV.png");
39 TCanvas *
c2 =
new TCanvas();
40 gStyle->SetOptStat(0);
41 TH2F *n50h2 =
new TH2F(
"Percentage of Energy Deposited by 50 GeV Particles vs Cone Size",
"Percentage of Energy Deposited by 50 GeV Particles vs Cone Size",1,0,1,1,0,1.1);
42 TGraph *n50gr = (TGraph *) fin->Get(
"neutron50GeV")->Clone();
43 n50h2->SetXTitle(
"Cone Size");
44 n50h2->SetYTitle(
"Percentage of Energy Deposited");
47 TGraph *g50gr = (TGraph *) fin->Get(
"gamma50GeV")->Clone();
51 TLine *tl =
new TLine();
53 tl->DrawLine(0.1,0,0.1,1.1);
54 TLine *t2 =
new TLine();
56 t2->DrawLine(0.024,0,0.024,1.1);
57 TLegend *legrda2 =
new TLegend(0.63,0.24,0.84,0.59,NULL,
"brNDC");
58 legrda2->SetLineColor(1);
59 legrda2->SetLineStyle(1);
60 legrda2->SetLineWidth(1);
61 legrda2->SetFillColor(10);
62 legrda2->SetFillStyle(1001);
63 legrda2->SetBorderSize(0);
66 legrda2->AddEntry(gamma50GeV,
"50 GeV Gamma",
"p");
67 legrda2->AddEntry(neutron50GeV,
"50 GeV Neutron",
"p");
68 legrda2->AddEntry(tl,
"HCAL tower size",
"l");
69 legrda2->AddEntry(t2,
"EMCAL tower size",
"l");
71 c2->Print(
"Gamma_vs_Neutron_50GeV.png");
74 TCanvas *c3 =
new TCanvas();
75 gStyle->SetOptStat(0);
76 TH2F *ga2 =
new TH2F(
"Gamma Energy Deposition vs Cone Size",
"Gamma Energy Deposition vs Cone Size",1,0,0.5,1,0,1.1);
77 TGraph *gamma2GeV = (TGraph *) fin->Get(
"gamma2GeV")->Clone();
78 ga2->SetXTitle(
"Cone Size");
79 ga2->SetYTitle(
"Percentage of Energy Deposited");
81 gamma2GeV->SetMarkerSize(1);
82 gamma2GeV->SetMarkerStyle(4);
84 int pz[7] = {4,8,12,16,32,40,50};
85 int col[7] = {2,9,4,5,6,7,8};
86 int mark[7] = {24,25,26,27,28,35,36};
87 for (
int i=0;
i<7;
i++)
90 sprintf(hname,
"gamma%dGeV",pz[
i]);
92 TGraph *gamall = (TGraph *) fin->Get(hname);
94 gamall->SetMarkerColor(col[i]);
95 gamall->SetMarkerStyle(4);
96 gamall->SetMarkerSize(1);
100 TLine *tl =
new TLine();
102 tl->DrawLine(0.1,0,0.1,1.1);
103 TLine *t2 =
new TLine();
105 t2->DrawLine(0.024,0,0.024,1.1);
106 TLegend *legrda3 =
new TLegend(0.63,0.24,0.84,0.59,NULL,
"brNDC");
107 legrda3->SetLineColor(1);
108 legrda3->SetLineStyle(1);
109 legrda3->SetLineWidth(1);
110 legrda3->SetFillColor(10);
111 legrda3->SetFillStyle(1001);
112 legrda3->SetBorderSize(0);
115 legrda3->AddEntry(gamma2GeV,
"2 GeV Gamma",
"p");
116 legrda3->AddEntry(gamma4GeV,
"4 GeV Gamma",
"p");
117 legrda3->AddEntry(gamma8GeV,
"8 GeV Gamma",
"p");
118 legrda3->AddEntry(gamma12GeV,
"12 GeV Gamma",
"p");
119 legrda3->AddEntry(gamma16GeV,
"16 GeV Gamma",
"p");
120 legrda3->AddEntry(gamma32GeV,
"32 GeV Gamma",
"p");
121 legrda3->AddEntry(gamma40GeV,
"40 GeV Gamma",
"p");
122 legrda3->AddEntry(gamma50GeV,
"50 GeV Gamma",
"p");
123 legrda3->AddEntry(tl,
"HCAL tower size",
"l" );
124 legrda3->AddEntry(t2,
"EMCAL tower size",
"l");
126 c3->Print(
"Gamma_All.png");
128 TCanvas *c4 =
new TCanvas();
129 gStyle->SetOptStat(0);
130 TH2F *an2 =
new TH2F(
"Antineutron Energy Deposition vs Cone Size",
"Antineutron Energy Deposition vs Cone Size",1,0,0.5,1,0,1.1);
131 TGraph *anti_neutron2GeV = (TGraph *) fin->Get(
"anti_neutron2GeV")->Clone();
132 an2->SetXTitle(
"Cone Size");
133 an2->SetYTitle(
"Percentage of Energy Deposited");
135 anti_neutron2GeV->SetMarkerSize(1);
136 anti_neutron2GeV->SetMarkerStyle(4);
137 anti_neutron2GeV->Draw(
"P");
138 int pz[7] = {4,8,12,16,32,40,50};
139 int col[7] = {2,9,4,5,6,7,8};
140 int mark[7] = {24,25,26,27,28,35,36};
141 for (
int i=0;
i<7;
i++)
144 sprintf(hname,
"anti_neutron%dGeV",pz[
i]);
146 TGraph *anall = (TGraph *) fin->Get(hname);
148 anall->SetMarkerColor(col[i]);
149 anall->SetMarkerStyle(4);
150 anall->SetMarkerSize(1);
154 TLine *tl =
new TLine();
156 tl->DrawLine(0.1,0,0.1,1.1);
157 TLine *t2 =
new TLine();
159 t2->DrawLine(0.024,0,0.024,1.1);
160 TLegend *legrda4 =
new TLegend(0.63,0.24,0.84,0.59,NULL,
"brNDC");
161 legrda4->SetLineColor(1);
162 legrda4->SetLineStyle(1);
163 legrda4->SetLineWidth(1);
164 legrda4->SetFillColor(10);
165 legrda4->SetFillStyle(1001);
166 legrda4->SetBorderSize(0);
169 legrda4->AddEntry(anti_neutron2GeV,
"2 GeV Anti Neutron",
"p");
170 legrda4->AddEntry(anti_neutron4GeV,
"4 GeV Anti Neutron",
"p");
171 legrda4->AddEntry(anti_neutron8GeV,
"8 GeV Anti Neutron",
"p");
172 legrda4->AddEntry(anti_neutron12GeV,
"12 GeV Anti Neutron",
"p");
173 legrda4->AddEntry(anti_neutron16GeV,
"16 GeV Anti Neutron",
"p");
174 legrda4->AddEntry(anti_neutron32GeV,
"32 GeV Anti Neutron",
"p");
175 legrda4->AddEntry(anti_neutron40GeV,
"40 GeV Anti Neutron",
"p");
176 legrda4->AddEntry(anti_neutron50GeV,
"50 GeV Anti Neutron",
"p");
177 legrda4->AddEntry(tl,
"HCAL tower size",
"l");
178 legrda4->AddEntry(t2,
"EMCAL Tower size",
"l");
180 c4->Print(
"Antineutron_All.png");
182 TCanvas *c5 =
new TCanvas();
183 gStyle->SetOptStat(0);
184 TH2F *n2 =
new TH2F(
"Neutron Energy Deposition vs Cone Size",
"Neutron Energy Deposition vs Cone Size",1,0,0.5,1,0,1.1);
185 TGraph *neutron2GeV = (TGraph *) fin->Get(
"neutron2GeV")->Clone();
186 n2->SetXTitle(
"Cone Size");
187 n2->SetYTitle(
"Percentage of Energy Deposited");
189 neutron2GeV->SetMarkerSize(1);
190 neutron2GeV->SetMarkerStyle(4);
191 neutron2GeV->Draw(
"P");
192 int pz[7] = {4,8,12,16,32,40,50};
193 int col[7] = {2,9,4,5,6,7,8};
194 int mark[7] = {24,25,26,27,28,35,36};
195 for (
int i=0;
i<7;
i++)
198 sprintf(hname,
"neutron%dGeV",pz[
i]);
200 TGraph *nall = (TGraph *) fin->Get(hname);
202 nall->SetMarkerColor(col[i]);
203 nall->SetMarkerStyle(4);
204 nall->SetMarkerSize(1);
208 TLine *tl =
new TLine();
210 tl->DrawLine(0.1,0,0.1,1.1);
211 TLine *t2 =
new TLine();
213 t2->DrawLine(0.024,0,0.024,1.1);
214 TLegend *legrda5 =
new TLegend(0.63,0.24,0.84,0.59,NULL,
"brNDC");
215 legrda5->SetLineColor(1);
216 legrda5->SetLineStyle(1);
217 legrda5->SetLineWidth(1);
218 legrda5->SetFillColor(10);
219 legrda5->SetFillStyle(1001);
220 legrda5->SetBorderSize(0);
223 legrda5->AddEntry(neutron2GeV,
"2 GeV Neutron",
"p");
224 legrda5->AddEntry(neutron4GeV,
"4 GeV Neutron",
"p");
225 legrda5->AddEntry(neutron8GeV,
"8 GeV Neutron",
"p");
226 legrda5->AddEntry(neutron12GeV,
"12 GeV Neutron",
"p");
227 legrda5->AddEntry(neutron16GeV,
"16 GeV Neutron",
"p");
228 legrda5->AddEntry(neutron32GeV,
"32 GeV Neutron",
"p");
229 legrda5->AddEntry(neutron40GeV,
"40 GeV Neutron",
"p");
230 legrda5->AddEntry(neutron50GeV,
"50 GeV Neutron",
"p");
231 legrda5->AddEntry(tl,
"HCAL tower size",
"l");
232 legrda5->AddEntry(t2,
"EMCAL tower size",
"l");
234 c5->Print(
"Neutron_All.png");