3 cout <<
"TEST VII" << endl;
5 int pz[9] = {1,2,4,8,12,16,32,40,50};
13 double intnum[1000] = {0};
14 double varnum[1000] = {0};
15 char *part[] = {
"gamma",
"neutron",
"anti_neutron"};
18 TCanvas *c3 =
new TCanvas(
"TresGraphitos",
"stupid graph",1);
19 TH1F *h4 =
new TH1F(
"histo",
"histo",1000,0,.5);
21 TMarker *grmark =
new TMarker();
24 for (
int q=0; q<3; q++)
26 for (
int w=0; w<9;w++)
28 cout <<
"TEST VI" << endl;
30 sprintf(ffile,
"%s_ThinBins.root", part[q]);
31 TFile *
f = TFile::Open(ffile);
33 sprintf(hname,
"%s%dd",part[q],pz[w]);
34 TH1F *
h1 = (TH1F *)f->Get(hname);
43 intnum[
i] = (h1->Integral(1,var))/(h1->Integral());
51 sprintf(fname,
"PosterHistos.root");
52 TFile *
fout = TFile::Open(fname,
"UPDATE");
57 TH2 *
h2 =
new TH2F(
"meanvals",
"anti_neutron",1,0,5,1,0,1.2);
58 gStyle->SetOptStat(0);
61 TMarker *
mean =
new TMarker();
62 mean->SetMarkerStyle(20);
63 mean->SetMarkerColor(3);
65 sprintf(canvname,
"%s%d",part[q],pz[w]);
68 cout <<
"TEST V" << endl;
69 TGraph *
gr =
new TGraph((i-2),varnum,intnum);
71 sprintf(gtitle,
"%s%dGeV;ConeSize;Percentage of Energy Deposited",part[q],pz[w]);
73 sprintf(gname,
"%s%dGeV",part[q],pz[w]);
74 cout << intnum[50] <<
" " << varnum[50] << endl;
77 gr->SetMarkerStyle(20);
78 if (part[q] ==
"anti_neutron")
80 gr->SetMarkerColor(4);
82 else if (part[q] ==
"neutron")
84 gr->SetMarkerColor(2);
86 else if (part[q] ==
"gamma")
88 gr->SetMarkerColor(3);
92 cout <<
"idiot" << endl;
103 cout <<
"TEST 1" << endl;
105 cout <<
"TEST II" << endl;
107 cout <<
"TEST III" << endl;
109 cout <<
"TEST IV" << endl;
117 for (
int a=0;
a<1000;
a++)
125 for (
int j=0;
j<9;
j++)
127 cout <<
"TEST VIII" << endl;
128 TFile *fhist = TFile::Open(
"PosterHistos.root");
129 cout <<
"TEST IX" << endl;
130 char anhtotname[300];
131 sprintf(anhtotname,
"anti_neutron%dGeV;ConeSize;Percentage of Energy Deposited",pz[
j]);
132 auto h32 = (TH2F*)fhist->Get(anhtotname);
134 sprintf(nhtotname,
"neutron%dGeV;ConeSize;Percentage of Energy Deposited",pz[j]);
135 auto h12 = (TH2F*)fhist->Get(nhtotname);
136 cout <<
"TEST X" << endl;
138 sprintf(ghtotname,
"gamma%dGeV;ConeSize;Percentage of Energy Deposited",pz[j]);
139 auto h22 = (TH2F*)fhist->Get(ghtotname);
140 cout <<
"TEST XI" << endl;
141 TCanvas *c12 =
new TCanvas();
142 cout <<
"TEST XII" << endl;
144 cout <<
"TEST XIII" << endl;
145 h12->Draw(
"PMC same");
146 h22->Draw(
"PMC same");
147 cout <<
"TEST XIV" << endl;
149 cout <<
"DONE" << endl;
151 TCanvas *c123 =
new TCanvas();
152 TFile *
ff = TFile::Open(
"PosterHistos.root");
153 auto h101 = (TH2F*)ff->Get(
"anti_neutron1GeV;ConeSize;Percentage of Energy Deposited");
156 for (
int o=0;o<8;o++)
158 TFile *f_all = TFile::Open(
"PosterHistos.root");
160 sprintf(aname,
"anti_neutron%dGeV;ConeSize;Percentage of Energy Deposited",pz[(o+1)]);
161 auto h100 = (TH2F*)f_all->Get(aname);
162 h100->Draw(
"PMC same");
172 int pz[9] = {1,2,4,8,12,16,32,40,50};
174 double means[9] = {0};
178 bool lastbin =
false;
180 double intnum[1000] = {0};
181 double varnum[1000] = {0};
182 char *part[] = {
"gamma",
"neutron",
"anti_neutron"};
184 TGraph *
gr =
new TGraph();
186 for (
int q=0; q<3; q++)
191 sprintf(ffile,
"%s_ThinBins.root", part[q]);
192 TFile *
f = TFile::Open(ffile);
194 sprintf(hname,
"%s12d",part[q]);
195 TH1F *
h1 = (TH1F *)f->Get(hname);
203 varnum[
i] = .005*(i+1);
204 intnum[
i] = (h1->Integral(1,var))/(h1->Integral());
218 sprintf(fname,
"PosterHistos.root");
219 y TFile *
fout = TFile::Open(fname,
"UPDATE");
228 TH2 *
h2 =
new TH2F(
"meanvals",
"anti_neutron",1,0,4,1,0,50);
229 gStyle->SetOptStat(0);
230 TMarker *
mean =
new TMarker();
231 mean->SetMarkerStyle(20);
232 mean->SetMarkerColor(3);
235 gr->TGraph((i-1),varnum,intnum);
237 sprintf(gname,
"12GeV;xtitle;ytitle");
247 for (
int a=0;
a<1000;
a++)
265 TFile *fin = TFile::Open(
"PosterHistos.root");
267 TH2 *
h2 =
new TH2F(
"DumbGraph",
"TresLines",1,0,10,1,0,50);
268 gStyle->SetOptStat(0);
269 TMarker *spf =
new TMarker();
270 spf->SetMarkerStyle(20);
271 spf->SetMarkerColor(4);
272 TCanvas *c1 =
new TCanvas();
278 sprintf(hname,
"meanvals");
279 TH2 *
gr = (TH2F *) fin->Get(hname);
280 cout <<
"herro" << endl;
281 cout <<
gr()->GetPoint(1,x,y) << endl;