6 gROOT->SetStyle(
"Pub");
30 Int_t
plateArray[13]={10,12,14,16,18,20,23,26,29,32,35,40,45};
34 Double_t E[12] = {0.5,1.0,2.0, 4.0, 0.75, 1.5, 3.0, 6.0, 8.0, 16.0, 32.0 ,64.0};
35 Int_t E_ASCEND[12] = {0,4,1,5,2,6,3,7,8,9,10,11};
36 Int_t NPL[13]= {10,12,14,16,18,20,23,26,29,32,35,40,45};
39 Int_t N_NPL=13; N_NPL=13;
41 TGraph* graph_MeanEnergy__vs__Energy[13];
42 TGraph* graph_MeanEnergy__vs__Npl[12];
43 TGraph* graph_RMSEnergy__vs__Energy[13];
44 TGraph* graph_RMSEnergy__vs__Npl[12];
46 TGraph* graph_MeanEnergyOverE__vs__Energy[13];
47 TGraph* graph_MeanEnergyOverE__vs__Npl[12];
48 TGraph* graph_RMSEnergyOverE__vs__Energy[13];
49 TGraph* graph_RMSEnergyOverE__vs__Npl[12];
51 TGraph* graph_MeanEnergyRelativeOverE__vs__Energy[13];
52 TGraph* graph_MeanEnergyRelativeOverE__vs__Npl[12];
53 TGraph* graph_RMSEnergyRelativeOverE__vs__Energy[13];
54 TGraph* graph_RMSEnergyRelativeOverE__vs__Npl[12];
56 TGraph* graph_MeanEnergyMinusNominalE__vs__Energy[13];
57 TGraph* graph_MeanEnergyMinusNominalE__vs__Npl[12];
59 for (
int loop_E=0; loop_E<N_E; loop_E++) {
60 graph_MeanEnergy__vs__Npl[loop_E] =
new TGraph(N_NPL);
61 graph_RMSEnergy__vs__Npl[loop_E] =
new TGraph(N_NPL);
62 graph_MeanEnergyOverE__vs__Npl[loop_E] =
new TGraph(N_NPL);
63 graph_RMSEnergyOverE__vs__Npl[loop_E] =
new TGraph(N_NPL);
64 graph_MeanEnergyRelativeOverE__vs__Npl[loop_E] =
new TGraph(N_NPL);
65 graph_RMSEnergyRelativeOverE__vs__Npl[loop_E] =
new TGraph(N_NPL);
66 graph_MeanEnergyMinusNominalE__vs__Npl[loop_E] =
new TGraph(N_NPL);
68 for (
int loop_NPL=0; loop_NPL<N_NPL; loop_NPL++) {
69 graph_MeanEnergy__vs__Energy[loop_NPL] =
new TGraph(N_E);
70 graph_RMSEnergy__vs__Energy[loop_NPL] =
new TGraph(N_E);
71 graph_MeanEnergyOverE__vs__Energy[loop_NPL] =
new TGraph(N_E);
72 graph_RMSEnergyOverE__vs__Energy[loop_NPL] =
new TGraph(N_E);
73 graph_MeanEnergyRelativeOverE__vs__Energy[loop_NPL] =
new TGraph(N_E);
74 graph_RMSEnergyRelativeOverE__vs__Energy[loop_NPL] =
new TGraph(N_E);
75 graph_MeanEnergyMinusNominalE__vs__Energy[loop_NPL] =
new TGraph(N_E);
78 for (
int loop_NPL=0; loop_NPL<N_NPL; loop_NPL++) {
79 graph_MeanEnergy__vs__Energy[loop_NPL]->SetTitle(
"MeanEnergy__vs__Energy");
80 graph_RMSEnergy__vs__Energy[loop_NPL]->SetTitle(
"RMSEnergy__vs__Energy");
82 graph_MeanEnergyOverE__vs__Energy[loop_NPL]->SetTitle(
"graph_MeanEnergyOverE__vs__Energy");
83 graph_RMSEnergyOverE__vs__Energy[loop_NPL]->SetTitle(
"graph_RMSEnergyOverE__vs__Energy");
85 graph_MeanEnergyRelativeOverE__vs__Energy[loop_NPL]->SetTitle(
"graph_MeanEnergyRelativeOverE__vs__Energy");
86 graph_RMSEnergyRelativeOverE__vs__Energy[loop_NPL]->SetTitle(
"graph_RMSEnergyRelativeOverE__vs__Energy");
88 graph_MeanEnergyMinusNominalE__vs__Energy[loop_NPL]->SetTitle(
"graph_MeanEnergyMinusNominalE__vs__Energy");
95 const char*
name =
"libShower_Energy_Systematics_Electron.txt";
97 for (
int i=0;i<13;i++) {
99 cout << loop_NPL <<
"---------------------------------" << endl;
101 for (
int j=0;j<12;j++) {
104 graph_RMSEnergy__vs__Energy[loop_NPL]->SetPoint(j,E[E_ASCEND[j]],
dummyf);
105 graph_RMSEnergyRelativeOverE__vs__Energy[loop_NPL]->SetPoint(j,E[E_ASCEND[j]],
dummyf/E[E_ASCEND[j]]);
119 TCanvas* Canv_RMSEnergyOverE__vs__Energy =
new TCanvas(
"Canv_RMSEnergyOverE__vs__Energy_SYSTEMATICS_ALLCOMBINED",
"Canv_RMSEnergyOverE__vs__Energy_SYSTEMATICS_ALLCOMBINED",1050,750);
122 graph_RMSEnergyRelativeOverE__vs__Energy[5]->Draw(
"APLS");
123 graph_RMSEnergyRelativeOverE__vs__Energy[5]->SetTitle(
"Electron");
124 graph_RMSEnergyRelativeOverE__vs__Energy[5]->GetXaxis()->SetTitle(
"Energy [GeV]");
125 graph_RMSEnergyRelativeOverE__vs__Energy[5]->GetYaxis()->SetTitle(
"#sigma (E) / E (\% /100) Syst. Result");
126 graph_RMSEnergyRelativeOverE__vs__Energy[5]->GetYaxis()->SetTitleOffset(1.2);
127 graph_RMSEnergyRelativeOverE__vs__Energy[5]->GetXaxis()->SetTitleColor(1);
128 graph_RMSEnergyRelativeOverE__vs__Energy[5]->GetYaxis()->SetTitleColor(1);
129 graph_RMSEnergyRelativeOverE__vs__Energy[5]->GetXaxis()->CenterTitle();
130 graph_RMSEnergyRelativeOverE__vs__Energy[5]->GetYaxis()->CenterTitle();
132 graph_RMSEnergyRelativeOverE__vs__Energy[5]->GetXaxis()->SetRangeUser(0,17);
136 graph_RMSEnergyRelativeOverE__vs__Energy[0]->Draw(
"LSsame");
137 graph_RMSEnergyRelativeOverE__vs__Energy[0]->SetLineStyle(2);
140 graph_RMSEnergyRelativeOverE__vs__Energy[9]->Draw(
"LSsame");
141 graph_RMSEnergyRelativeOverE__vs__Energy[9]->SetLineStyle(5);
144 graph_RMSEnergyRelativeOverE__vs__Energy[11]->Draw(
"LSsame");
145 graph_RMSEnergyRelativeOverE__vs__Energy[11]->SetLineStyle(3);
148 TLegend* leg_selected=
new TLegend(0.65,0.55,0.95,0.85,
NULL,
"brNDC");
149 leg_selected->AddEntry(graph_RMSEnergyRelativeOverE__vs__Energy[0],
"NPl=10",
"L");
150 leg_selected->AddEntry(graph_RMSEnergyRelativeOverE__vs__Energy[5],
"NPl=20",
"L");
151 leg_selected->AddEntry(graph_RMSEnergyRelativeOverE__vs__Energy[9],
"NPl=32",
"L");
152 leg_selected->AddEntry(graph_RMSEnergyRelativeOverE__vs__Energy[11],
"NPl=40",
"L");
153 leg_selected->SetFillStyle(0);
154 leg_selected->SetBorderSize(0);
155 leg_selected->Draw();
157 TPaveText*
pt =
new TPaveText(0.8,0.93,0.98,0.98,
"brNDC");
162 pt->SetBorderSize(0);
167 if (
PARTICLE_TYPE==0) canvname=TString(Form(
"Canv_SYSTEMATICS_ALLCOMBINED__RMSEnergyOverE__vs__Energy__ELECTRON",0));
168 if (
PARTICLE_TYPE==1) canvname=TString(Form(
"Canv_SYSTEMATICS_ALLCOMBINED__RMSEnergyOverE__vs__Energy__GAMMA",0));
169 Canv_RMSEnergyOverE__vs__Energy->Print(canvname+
".C");
170 Canv_RMSEnergyOverE__vs__Energy->Print(canvname+
".pdf");
171 Canv_RMSEnergyOverE__vs__Energy->Print(canvname+
".eps");
172 Canv_RMSEnergyOverE__vs__Energy->Print(canvname+
".png");
176 TCanvas* Canv_RMSEnergy__vs__Energy =
new TCanvas(
"Canv_RMSEnergy__vs__Energy",
"Canv_RMSEnergy__vs__Energy",1050,750);
179 graph_RMSEnergy__vs__Energy[5]->Draw(
"APLS");
180 graph_RMSEnergy__vs__Energy[5]->SetTitle(
"Electron");
181 graph_RMSEnergy__vs__Energy[5]->GetXaxis()->SetTitle(
"Energy [GeV]");
182 graph_RMSEnergy__vs__Energy[5]->GetYaxis()->SetTitle(
"#sigma (E) [GeV] Syst. Result");
183 graph_RMSEnergy__vs__Energy[5]->GetYaxis()->SetTitleOffset(1.2);
184 graph_RMSEnergy__vs__Energy[5]->GetXaxis()->SetTitleColor(1);
185 graph_RMSEnergy__vs__Energy[5]->GetYaxis()->SetTitleColor(1);
186 graph_RMSEnergy__vs__Energy[5]->GetXaxis()->CenterTitle();
187 graph_RMSEnergy__vs__Energy[5]->GetYaxis()->CenterTitle();
189 graph_RMSEnergy__vs__Energy[5]->GetXaxis()->SetRangeUser(0,17);
192 graph_RMSEnergy__vs__Energy[0]->Draw(
"LSsame");
193 graph_RMSEnergy__vs__Energy[0]->SetLineStyle(2);
196 graph_RMSEnergy__vs__Energy[9]->Draw(
"LSsame");
197 graph_RMSEnergy__vs__Energy[9]->SetLineStyle(5);
200 graph_RMSEnergy__vs__Energy[11]->Draw(
"LSsame");
201 graph_RMSEnergy__vs__Energy[11]->SetLineStyle(3);
204 TLegend* leg_selected=
new TLegend(0.18,0.55,0.5,0.85,
NULL,
"brNDC");
205 leg_selected->AddEntry(graph_RMSEnergy__vs__Energy[0],
"NPl=10",
"L");
206 leg_selected->AddEntry(graph_RMSEnergy__vs__Energy[5],
"NPl=20",
"L");
207 leg_selected->AddEntry(graph_RMSEnergy__vs__Energy[9],
"NPl=32",
"L");
208 leg_selected->AddEntry(graph_RMSEnergy__vs__Energy[11],
"NPl=40",
"L");
209 leg_selected->SetFillStyle(0);
210 leg_selected->SetBorderSize(0);
211 leg_selected->Draw();
215 if (
PARTICLE_TYPE==0) canvname=TString(Form(
"Canv_SYSTEMATICS_ALLCOMBINED__RMSEnergy__vs__Energy__ELECTRON",0));
216 if (
PARTICLE_TYPE==1) canvname=TString(Form(
"Canv_SYSTEMATICS_ALLCOMBINED__RMSEnergy__vs__Energy__GAMMA",0));
217 Canv_RMSEnergy__vs__Energy->Print(canvname+
".C");
218 Canv_RMSEnergy__vs__Energy->Print(canvname+
".pdf");
219 Canv_RMSEnergy__vs__Energy->Print(canvname+
".eps");
220 Canv_RMSEnergy__vs__Energy->Print(canvname+
".png");
241 if (
PARTICLE_TYPE==0) latexname=TString(Form(
"table__SYSTEMATICS_ALLCOMBINED__RMSEnergyRelativeOverE__vs__Energy__ELECTRON_ALLPLATES.tex",
NULL));
242 if (
PARTICLE_TYPE==1) latexname=TString(Form(
"table__SYSTEMATICS_ALLCOMBINED__RMSEnergyRelativeOverE__vs__Energy__GAMMA_ALLPLATES.tex",
NULL));
243 cout << endl << endl << latexname << endl << endl;
248 for (
int p=0;
p<80;
p++) cout <<
"-";
250 for (
int p=0;
p<80;
p++) cout <<
"-";
252 cout << setw(6) << setprecision(2) <<
" E\Npl ";
253 for (
int p=0;
p<N_E;
p++) cout << setw(6) << setprecision(2) << E[E_ASCEND[
p]] <<
" ";
255 for (
int o=0;
o<N_NPL;
o++) {
256 cout << setw(6) << setprecision(2) << NPL[
o];
257 for (
int p=0;
p<N_E;
p++) {
258 graph_RMSEnergyRelativeOverE__vs__Energy[
o]->GetPoint(
p,x,y);
259 cout << setw(6) << setprecision(2) << y <<
" ";
263 for (
int p=0;
p<80;
p++) cout <<
"-";
265 for (
int p=0;
p<80;
p++) cout <<
"-";
268 cout <<
"\\begin{tabular}{c c c c c c c c c c c c c}" << endl;
269 cout <<
"\\hline" << endl;
270 cout <<
"\\hline" << endl;
271 cout <<
" Energy/NPl & ";
272 for (
int p=0;
p<N_E-1;
p++) cout << setw(6) << setprecision(2) << E[E_ASCEND[
p]] <<
" & ";
273 cout << setw(6) << setprecision(2) << E[E_ASCEND[N_E-1]] <<
" ";
274 cout <<
"\\\\ " << endl;
275 cout <<
"\\hline" << endl;
276 for (
int o=0;
o<N_NPL;
o++) {
277 cout << setw(6) << setprecision(2) << NPL[
o] <<
" ";
278 for (
int p=0;
p<N_E;
p++) {
280 graph_RMSEnergyRelativeOverE__vs__Energy[
o]->GetPoint(
p,x,y);
281 cout << setw(6) << setprecision(2) << y <<
" ";
283 cout <<
" \\\\" << endl;
285 cout <<
"\\hline" << endl;
286 cout <<
"\\hline" << endl;
287 cout <<
"\\end{tabular}" << endl;
290 stream <<
"\\begin{tabular}{c c c c c c c c c c c c c}" << endl;
291 stream <<
"\\hline" << endl;
292 stream <<
"\\hline" << endl;
293 stream <<
" Energy/NPl & ";
294 for (
int p=0;
p<N_E-1;
p++) stream << setw(6) << setprecision(2) << E[E_ASCEND[
p]] <<
" & ";
295 stream << setw(6) << setprecision(2) << E[E_ASCEND[N_E-1]] <<
" ";
296 stream <<
"\\\\ " << endl;
297 stream <<
"\\hline" << endl;
298 for (
int o=0;
o<N_NPL;
o++) {
299 stream << setw(6) << setprecision(2) << NPL[
o] <<
" ";
300 for (
int p=0;
p<N_E;
p++) {
302 graph_RMSEnergyRelativeOverE__vs__Energy[
o]->GetPoint(
p,x,y);
303 stream << setw(6) << setprecision(2) << y <<
" ";
305 stream <<
" \\\\" << endl;
307 stream <<
"\\hline" << endl;
308 stream <<
"\\hline" << endl;
309 stream <<
"\\end{tabular}" << endl;
313 graph_RMSEnergyRelativeOverE__vs__Energy[0]->Print();
319 if (
PARTICLE_TYPE==0) latexname=TString(Form(
"table__SYSTEMATICS_ALLCOMBINED__RMSEnergy__vs__Energy__ELECTRON_ALLPLATES.tex",
NULL));
320 if (
PARTICLE_TYPE==1) latexname=TString(Form(
"table__SYSTEMATICS_ALLCOMBINED__RMSEnergy__vs__Energy__GAMMA_ALLPLATES.tex",
NULL));
321 cout << endl << endl << latexname << endl << endl;
325 for (
int p=0;
p<80;
p++) cout <<
"-";
327 for (
int p=0;
p<80;
p++) cout <<
"-";
329 cout << setw(6) << setprecision(2) <<
" E\Npl ";
330 for (
int p=0;
p<N_E;
p++) cout << setw(6) << setprecision(2) << E[E_ASCEND[
p]] <<
" ";
332 for (
int o=0;
o<N_NPL;
o++) {
333 cout << setw(6) << setprecision(2) << NPL[
o];
334 for (
int p=0;
p<N_E;
p++) {
335 graph_RMSEnergy__vs__Energy[
o]->GetPoint(
p,x,y);
336 cout << setw(6) << setprecision(2) << y <<
" ";
340 for (
int p=0;
p<80;
p++) cout <<
"-";
342 for (
int p=0;
p<80;
p++) cout <<
"-";
345 cout <<
"\\begin{tabular}{c c c c c c c c c c c c c}" << endl;
346 cout <<
"\\hline" << endl;
347 cout <<
"\\hline" << endl;
348 cout <<
" Energy/NPl & ";
349 for (
int p=0;
p<N_E-1;
p++) cout << setw(6) << setprecision(2) << E[E_ASCEND[
p]] <<
" & ";
350 cout << setw(6) << setprecision(2) << E[E_ASCEND[N_E-1]] <<
" ";
351 cout <<
"\\\\ " << endl;
352 cout <<
"\\hline" << endl;
353 for (
int o=0;
o<N_NPL;
o++) {
354 cout << setw(6) << setprecision(2) << NPL[
o] <<
" ";
355 for (
int p=0;
p<N_E;
p++) {
357 graph_RMSEnergy__vs__Energy[
o]->GetPoint(
p,x,y);
358 cout << setw(6) << setprecision(2) << y <<
" ";
360 cout <<
" \\\\" << endl;
362 cout <<
"\\hline" << endl;
363 cout <<
"\\hline" << endl;
364 cout <<
"\\end{tabular}" << endl;
367 stream <<
"\\begin{tabular}{c c c c c c c c c c c c c}" << endl;
368 stream <<
"\\hline" << endl;
369 stream <<
"\\hline" << endl;
370 stream <<
" Energy/NPl & ";
371 for (
int p=0;
p<N_E-1;
p++) stream << setw(6) << setprecision(2) << E[E_ASCEND[
p]] <<
" & ";
372 stream << setw(6) << setprecision(2) << E[E_ASCEND[N_E-1]] <<
" ";
373 stream <<
"\\\\ " << endl;
374 stream <<
"\\hline" << endl;
375 for (
int o=0;
o<N_NPL;
o++) {
376 stream << setw(6) << setprecision(2) << NPL[
o] <<
" ";
377 for (
int p=0;
p<N_E;
p++) {
379 graph_RMSEnergy__vs__Energy[
o]->GetPoint(
p,x,y);
380 stream << setw(6) << setprecision(2) << y <<
" ";
382 stream <<
" \\\\" << endl;
384 stream <<
"\\hline" << endl;
385 stream <<
"\\hline" << endl;
386 stream <<
"\\end{tabular}" << endl;
390 gSystem->Exec(
"cp -v table__SYSTEMATICS_ALLCOMBINED__RMSEnergyRelativeOverE__vs__Energy__ELECTRON_ALLPLATES.tex /home/meisel/opus/tables/.");
391 gSystem->Exec(
"cp -v table__SYSTEMATICS_ALLCOMBINED__RMSEnergy__vs__Energy__ELECTRON_ALLPLATES.tex /home/meisel/opus/tables/.");
394 gSystem->Exec(
"cp -v Canv_SYSTEMATICS_ALLCOMBINED__*.png /home/meisel/opus/plotsHIGHRES_png/.");
395 gSystem->Exec(
"cp -v Canv_SYSTEMATICS_ALLCOMBINED__*.eps /home/meisel/opus/plotsHIGHRES_eps/.");
TPaveText * pt
Definition: Canv_SYSTEMATICS_ALLCOMBINED__RMSEnergy__vs__Energy__ELECTRON.C:160
Int_t PARTICLE_TYPE
Definition: Draw__SYSTEMATICS_ALLCOMBINED_Electron.C:2
string filename
Definition: emthickness.cpp:34
AcqOdyssey * o
Definition: hwinit.C:2
Int_t dummy
Definition: merge_Energy_SytematicSources_Electron.C:7
pFile
Definition: merge_Energy_SytematicSources_Electron.C:25
Int_t plateArray[13]
Definition: merge_Energy_SytematicSources_Electron.C:8
Float_t dummyf
Definition: merge_Energy_SytematicSources_Electron.C:9
const char * name
Definition: merge_Energy_SytematicSources_Electron.C:24
#define NULL
Definition: nidaqmx.h:84
p
Definition: testBGReduction_AllMethods.C:8