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"};
24 for (
int q=0; q<3; q++)
26 for (
int w=0; w<9;w++)
28 cout <<
"TEST VI" << endl;
30 sprintf(ffile,
"/phenix/u/jpinkenburg/sPHENIX/analysis/AntiSigma/macros/HistoBaseFiles/%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(var-10,var))/10000.;
51 sprintf(fname,
"Gamma_Neutron_Hijing_Energy_Graphs.root");
52 TFile *
fout = TFile::Open(fname,
"UPDATE");
60 gStyle->SetOptStat(0);
63 TMarker *
mean =
new TMarker();
64 mean->SetMarkerStyle(20);
65 mean->SetMarkerColor(3);
67 sprintf(canvname,
"%s%d",part[q],pz[w]);
70 cout <<
"TEST V" << endl;
71 TGraph *
gr =
new TGraph((i-2),varnum,intnum);
73 sprintf(gtitle,
"%s%dGeV;ConeSize;Percentage of Energy Deposited",part[q],pz[w]);
75 sprintf(gname,
"%s%dGeV",part[q],pz[w]);
76 cout << intnum[50] <<
" " << varnum[50] << endl;
79 gr->SetMarkerStyle(20);
80 if (part[q] ==
"anti_neutron")
82 gr->SetMarkerColor(4);
84 else if (part[q] ==
"neutron")
86 gr->SetMarkerColor(2);
88 else if (part[q] ==
"gamma")
90 gr->SetMarkerColor(3);
94 cout <<
"idiot" << endl;
105 cout <<
"TEST 1" << endl;
107 cout <<
"TEST II" << endl;
109 cout <<
"TEST III" << endl;
111 cout <<
"TEST IV" << endl;
119 for (
int a=0;
a<1000;
a++)
131 TFile *fin = TFile::Open(
"/sphenix/user/pinkenbu/jade/hijingdat2.root");
133 TH1 *hjbkg =
new TH1F(
"hjbkg",
"Hijing Background",100,0.,0.5);
134 TNtuple *de = (TNtuple *) fin->Get(
"de");
135 de->Project(
"hjbkg",
"dtotal",
"(ID<=2)*edep/250.");
138 sprintf(fname,
"Gamma_Neutron_Hijing_Energy_Graphs.root");
139 TFile *
fout = TFile::Open(fname,
"UPDATE");
148 TCanvas *c1 =
new TCanvas();
149 TFile *fin = TFile::Open(
"Gamma_Neutron_Hijing_Energy_Graphs.root");
151 TH1 *h1lim =
new TH1F(
"h1lim",
"",1,0,0.1);
152 TH1 *hjbkg = (TH1 *) fin->Get(
"hjbkg")->Clone();
153 TGraph *anti_neutron2GeV = (TGraph *) fin->Get(
"anti_neutron2GeV")->Clone();
154 TGraph *neutron2GeV = (TGraph *) fin->Get(
"neutron2GeV")->Clone();
156 h1lim->SetMaximum(0.3);
157 h1lim->SetTitle(
"2 GeV Hadronic Showers with HIJING background");
158 h1lim->GetYaxis()->SetTitle(
"Deposited Energey [GeV]");
159 h1lim->GetYaxis()->SetTitleOffset(1.2);
160 h1lim->GetXaxis()->SetTitle(
"cone size (#sqrt{#Delta#Phi^{2}+#Delta#Theta^{2}})");
161 h1lim->GetXaxis()->SetTitleOffset(1.2);
164 hjbkg->SetLineColor(6);
165 hjbkg->SetMaximum(5.5);
166 hjbkg->SetLineWidth(2);
168 anti_neutron2GeV->SetLineColor(4);
169 anti_neutron2GeV->SetLineWidth(2);
170 anti_neutron2GeV->Draw(
"same");
171 neutron2GeV->SetLineColor(2);
172 neutron2GeV->SetLineWidth(2);
173 neutron2GeV->Draw(
"same");
174 TLine *
tl =
new TLine();
176 tl->DrawLine(0.024,0,0.024,0.3);
177 TLegend *legrda =
new TLegend(0.67,0.34,0.87,0.54,NULL,
"brNDC");
178 legrda->SetLineColor(1);
179 legrda->SetLineStyle(1);
180 legrda->SetLineWidth(1);
181 legrda->SetFillColor(10);
182 legrda->SetFillStyle(1001);
183 legrda->SetBorderSize(0);
185 legrda->AddEntry(hjbkg,
"HIJING bkg");
186 legrda->AddEntry(anti_neutron2GeV,
"2 GeV Anti Neutron",
"l");
187 legrda->AddEntry(neutron2GeV,
"2 GeV Neutron",
"l");
188 legrda->AddEntry(tl,
"EMCal tower size",
"l");
192 c1->Print(
"Hijing2GeV.png");
197 TCanvas *c1 =
new TCanvas();
198 TFile *fin = TFile::Open(
"Gamma_Neutron_Hijing_Energy_Graphs.root");
200 TH1 *hjbkg = (TH1 *) fin->Get(
"hjbkg")->Clone();
201 TGraph *anti_neutron50GeV = (TGraph *) fin->Get(
"anti_neutron50GeV")->Clone();
202 TGraph *neutron50GeV = (TGraph *) fin->Get(
"neutron50GeV")->Clone();
204 hjbkg->SetLineColor(6);
205 hjbkg->SetMaximum(5.5);
206 hjbkg->SetLineWidth(2);
207 hjbkg->SetTitle(
"50 GeV Hadronic Showers with HIJING background");
208 hjbkg->GetYaxis()->SetTitle(
"Deposited Energey [GeV]");
209 hjbkg->GetYaxis()->SetTitleOffset(0.8);
210 hjbkg->GetXaxis()->SetTitle(
"cone size (#sqrt{#Delta#Phi^{2}+#Delta#Theta^{2}})");
211 hjbkg->GetXaxis()->SetTitleOffset(1.2);
213 anti_neutron50GeV->SetLineColor(4);
214 anti_neutron50GeV->SetLineWidth(2);
215 anti_neutron50GeV->Draw(
"same");
216 neutron50GeV->SetLineColor(2);
217 neutron50GeV->SetLineWidth(2);
218 neutron50GeV->Draw(
"same");
219 TLine *
tl =
new TLine();
221 tl->DrawLine(0.1,0,0.1,5.5);
222 TLegend *legrda =
new TLegend(0.67,0.54,0.87,0.74,NULL,
"brNDC");
223 legrda->SetLineColor(1);
224 legrda->SetLineStyle(1);
225 legrda->SetLineWidth(1);
226 legrda->SetFillColor(10);
227 legrda->SetFillStyle(1001);
228 legrda->SetBorderSize(0);
230 legrda->AddEntry(hjbkg,
"HIJING bkg");
231 legrda->AddEntry(anti_neutron50GeV,
"50 GeV Anti Neutron",
"l");
232 legrda->AddEntry(neutron50GeV,
"50 GeV Neutron",
"l");
233 legrda->AddEntry(tl,
"HCal tower size",
"l");
236 c1->Print(
"Hijing50GeV.png");