5 int pz[10] = {1,2,4,8,12,16,32,40,50,90};
14 sprintf(infile,
"e1out.root");
16 sprintf(hname,
"e1d");
17 TH1F *
h1 =
new TH1F(hname,
"e1d", 100, 0, 1);
18 TFile *
f = TFile::Open(infile);
20 TNtuple *nt = (TNtuple *)f->Get(
"ed");
21 nt->Project(hname,
"(EA+ES)/(EA+ES+HOA+HOS+HIA+HIS+BH+MAG)");
24 TFile *
fout = TFile::Open(
"epercent.root",
"UPDATE");
27 cout << h1->Integral() <<
" " << hname << endl;
31 sprintf(infile,
"e2out.root");
33 sprintf(hname,
"e2d");
34 TH1F *h1 =
new TH1F(hname,
"e2d", 100, 0, 1);
35 TFile *f = TFile::Open(infile);
37 TNtuple *nt = (TNtuple *)f->Get(
"ed");
38 nt->Project(hname,
"(EA+ES)/(EA+ES+HOA+HOS+HIA+HIS+BH+MAG)");
41 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
44 cout << h1->Integral() <<
" " << hname << endl;
48 sprintf(infile,
"e4out.root");
50 sprintf(hname,
"e4d");
51 TH1F *h1 =
new TH1F(hname,
"e4d", 100, 0, 1);
52 TFile *f = TFile::Open(infile);
54 TNtuple *nt = (TNtuple *)f->Get(
"ed");
55 nt->Project(hname,
"(EA+ES)/(EA+ES+HOA+HOS+HIA+HIS+BH+MAG");
58 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
61 cout << h1->Integral() <<
" " << hname << endl;
65 sprintf(infile,
"e8out.root");
67 sprintf(hname,
"e8d");
68 TH1F *h1 =
new TH1F(hname,
"e8d", 100, 0, 1);
69 TFile *f = TFile::Open(infile);
71 TNtuple *nt = (TNtuple *)f->Get(
"ed");
72 nt->Project(hname,
"(EA+ES)/(EA+ES+HOA+HOS+HIA+HIS+BH+MAG)");
75 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
78 cout << h1->Integral() <<
" " << hname << endl;
82 sprintf(infile,
"e12out.root");
84 sprintf(hname,
"e12d");
85 TH1F *h1 =
new TH1F(hname,
"e12d", 100, 0, 1);
86 TFile *f = TFile::Open(infile);
88 TNtuple *nt = (TNtuple *)f->Get(
"ed");
89 nt->Project(hname,
"(EA+ES)/(EA+ES+HOA+HOS+HIA+HIS+BH+MAG)");
92 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
95 cout << h1->Integral() <<
" " << hname << endl;
99 sprintf(infile,
"e16out.root");
101 sprintf(hname,
"e16d");
102 TH1F *h1 =
new TH1F(hname,
"e16d", 100, 0, 1);
103 TFile *f = TFile::Open(infile);
105 TNtuple *nt = (TNtuple *)f->Get(
"ed");
106 nt->Project(hname,
"(EA+ES)/(EA+ES+HOA+HOS+HIA+HIS+BH+MAG)");
109 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
112 cout << h1->Integral() <<
" " << hname << endl;
116 sprintf(infile,
"e32out.root");
118 sprintf(hname,
"e32d");
119 TH1F *h1 =
new TH1F(hname,
"e32d", 100, 0, 1);
120 TFile *f = TFile::Open(infile);
122 TNtuple *nt = (TNtuple *)f->Get(
"ed");
123 nt->Project(hname,
"(EA+ES)/(EA+ES+HOA+HOS+HIA+HIS+BH+MAG)");
126 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
129 cout << h1->Integral() <<
" " << hname << endl;
133 sprintf(infile,
"e40out.root");
135 sprintf(hname,
"e40d");
136 TH1F *h1 =
new TH1F(hname,
"e40d", 100, 0, 1);
137 TFile *f = TFile::Open(infile);
139 TNtuple *nt = (TNtuple *)f->Get(
"ed");
140 nt->Project(hname,
"(EA+ES)/(EA+ES+HOA+HOS+HIA+HIS+BH+MAG)");
143 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
146 cout << h1->Integral() <<
" " << hname << endl;
150 sprintf(infile,
"e50out.root");
152 sprintf(hname,
"e50d");
153 TH1F *h1 =
new TH1F(hname,
"e50d", 100, 0, 1);
154 TFile *f = TFile::Open(infile);
156 TNtuple *nt = (TNtuple *)f->Get(
"ed");
157 nt->Project(hname,
"(EA+ES)/(EA+ES+HOA+HOS+HIA+HIS+BH+MAG)");
160 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
163 cout << h1->Integral() <<
" " << hname << endl;
202 TFile *fin = TFile::Open(
"epercent.root");
204 TH2 *
h2 =
new TH2F(
"htot",
"EMCAL",1,0,50,1,0,1);
205 gStyle->SetOptStat(0);
206 TMarker *spf =
new TMarker();
207 spf->SetMarkerStyle(20);
208 spf->SetMarkerColor(4);
209 TCanvas *c1 =
new TCanvas();
213 sprintf(hname,
"e1d");
214 TH1 *
h1 = (TH1F *) fin->Get(hname);
215 spf->DrawMarker(1, h1->GetMean(1));
218 sprintf(hname,
"e2d");
219 TH1 *h1 = (TH1F *) fin->Get(hname);
220 spf->DrawMarker(2, h1->GetMean(1));
223 sprintf(hname,
"e4d");
224 TH1 *h1 = (TH1F *) fin->Get(hname);
226 spf->DrawMarker(4, h1->GetMean(1));
229 sprintf(hname,
"e8d");
230 TH1 *h1 = (TH1F *) fin->Get(hname);
232 spf->DrawMarker(8, h1->GetMean(1));
235 sprintf(hname,
"e12d");
236 TH1 *h1 = (TH1F *) fin->Get(hname);
238 spf->DrawMarker(12, h1->GetMean(1));
241 sprintf(hname,
"e16d");
242 TH1 *h1 = (TH1F *) fin->Get(hname);
244 spf->DrawMarker(16, h1->GetMean(1));
247 sprintf(hname,
"e32d");
248 TH1 *h1 = (TH1F *) fin->Get(hname);
250 spf->DrawMarker(32, h1->GetMean(1));
253 sprintf(hname,
"e40d");
254 TH1 *h1 = (TH1F *) fin->Get(hname);
256 spf->DrawMarker(40, h1->GetMean(1));
259 sprintf(hname,
"e50d");
260 TH1 *h1 = (TH1F *) fin->Get(hname);
262 spf->DrawMarker(50, h1->GetMean(1));
331 int pz[10] = {1,2,4,8,12,16,32,40,50,90};
340 sprintf(infile,
"e1out.root");
342 sprintf(hname,
"HIe1d");
343 TH1F *
h1 =
new TH1F(hname,
"HIe1d", 100, 0, 1);
344 TFile *
f = TFile::Open(infile);
346 TNtuple *nt = (TNtuple *)f->Get(
"ed");
347 nt->Project(hname,
"(HIA+HIS)/(EA+ES+HIA+HIS+HOA+HOS+BH+MAG)");
350 TFile *
fout = TFile::Open(
"epercent.root",
"UPDATE");
353 cout << h1->Integral() <<
" " << hname << endl;
357 sprintf(infile,
"e2out.root");
359 sprintf(hname,
"HIe2d");
360 TH1F *h1 =
new TH1F(hname,
"HIe2d", 100, 0, 1);
361 TFile *f = TFile::Open(infile);
363 TNtuple *nt = (TNtuple *)f->Get(
"ed");
364 nt->Project(hname,
"(HIA+HIS)/(EA+ES+HIA+HIS+HOA+HOS+BH+MAG)");
367 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
370 cout << h1->Integral() <<
" " << hname << endl;
374 sprintf(infile,
"e4out.root");
376 sprintf(hname,
"HIe4d");
377 TH1F *h1 =
new TH1F(hname,
"HIe4d", 100, 0, 1);
378 TFile *f = TFile::Open(infile);
380 TNtuple *nt = (TNtuple *)f->Get(
"ed");
381 nt->Project(hname,
"(HIA+HIS)/(EA+ES+HIA+HIS+HOA+HOS+BH+MAG)");
384 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
387 cout << h1->Integral() <<
" " << hname << endl;
391 sprintf(infile,
"e8out.root");
393 sprintf(hname,
"HIe8d");
394 TH1F *h1 =
new TH1F(hname,
"HIe8d", 100, 0, 1);
395 TFile *f = TFile::Open(infile);
397 TNtuple *nt = (TNtuple *)f->Get(
"ed");
398 nt->Project(hname,
"(HIA+HIS)/(EA+ES+HIA+HIS+HOA+HOS+BH+MAG)");
401 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
404 cout << h1->Integral() <<
" " << hname << endl;
408 sprintf(infile,
"e12out.root");
410 sprintf(hname,
"HIe12d");
411 TH1F *h1 =
new TH1F(hname,
"HIe12d", 100, 0, 1);
412 TFile *f = TFile::Open(infile);
414 TNtuple *nt = (TNtuple *)f->Get(
"ed");
415 nt->Project(hname,
"(HIA+HIS)/(EA+ES+HIA+HIS+HOA+HOS+BH+MAG)");
418 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
421 cout << h1->Integral() <<
" " << hname << endl;
425 sprintf(infile,
"e16out.root");
427 sprintf(hname,
"HIe16d");
428 TH1F *h1 =
new TH1F(hname,
"HIe16d", 100, 0, 1);
429 TFile *f = TFile::Open(infile);
431 TNtuple *nt = (TNtuple *)f->Get(
"ed");
432 nt->Project(hname,
"(HIA+HIS)/(EA+ES+HIA+HIS+HOA+HOS+BH+MAG)");
435 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
438 cout << h1->Integral() <<
" " << hname << endl;
442 sprintf(infile,
"e32out.root");
444 sprintf(hname,
"HIe32d");
445 TH1F *h1 =
new TH1F(hname,
"HIe32d", 100, 0, 1);
446 TFile *f = TFile::Open(infile);
448 TNtuple *nt = (TNtuple *)f->Get(
"ed");
449 nt->Project(hname,
"(HIA+HIS)/(EA+ES+HIA+HIS+HOA+HOS+BH+MAG)");
452 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
455 cout << h1->Integral() <<
" " << hname << endl;
459 sprintf(infile,
"e40out.root");
461 sprintf(hname,
"HIe40d");
462 TH1F *h1 =
new TH1F(hname,
"HIe40d", 100, 0, 1);
463 TFile *f = TFile::Open(infile);
465 TNtuple *nt = (TNtuple *)f->Get(
"ed");
466 nt->Project(hname,
"(HIA+HIS)/(EA+ES+HIA+HIS+HOA+HOS+BH+MAG)");
469 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
472 cout << h1->Integral() <<
" " << hname << endl;
476 sprintf(infile,
"e50out.root");
478 sprintf(hname,
"HIe50d");
479 TH1F *h1 =
new TH1F(hname,
"HIe50d", 100, 0, 1);
480 TFile *f = TFile::Open(infile);
482 TNtuple *nt = (TNtuple *)f->Get(
"ed");
483 nt->Project(hname,
"(HIA+HIS)/(EA+ES+HIA+HIS+HOA+HOS+BH+MAG)");
486 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
489 cout << h1->Integral() <<
" " << hname << endl;
528 TFile *fin = TFile::Open(
"epercent.root");
530 TH2 *
h2 =
new TH2F(
"htot",
"Inner_HCAL",1,0,50,1,0,.1);
531 gStyle->SetOptStat(0);
532 TMarker *spf =
new TMarker();
533 spf->SetMarkerStyle(20);
534 spf->SetMarkerColor(8);
535 TLine *rlin =
new TLine();
536 rlin->SetLineColor(8);
537 rlin->SetLineStyle(1);
538 rlin->SetLineWidth(1);
539 TCanvas *
c2 =
new TCanvas();
543 sprintf(hname,
"HIe1d");
544 TH1 *
h1 = (TH1F *) fin->Get(hname);
545 spf->DrawMarker(1, h1->GetMean(1));
546 rlin->DrawLine(1,(h1->GetMean(1)-h1->GetRMS(1)),1,(h1->GetMean(1) + h1->GetRMS(1)));
548 sprintf(hname,
"HIe2d");
549 TH1 *h1 = (TH1F *) fin->Get(hname);
550 spf->DrawMarker(2, h1->GetMean(1));
551 rlin->DrawLine(2,(h1->GetMean(1)-h1->GetRMS(1)),2,(h1->GetMean(1) + h1->GetRMS(1)));
553 sprintf(hname,
"HIe4d");
554 TH1 *h1 = (TH1F *) fin->Get(hname);
556 spf->DrawMarker(4, h1->GetMean(1));
557 rlin->DrawLine(4,(h1->GetMean(1)-h1->GetRMS(1)),4,(h1->GetMean(1) + h1->GetRMS(1)));
559 sprintf(hname,
"HIe8d");
560 TH1 *h1 = (TH1F *) fin->Get(hname);
562 spf->DrawMarker(8, h1->GetMean(1));
563 rlin->DrawLine(8,(h1->GetMean(1)-h1->GetRMS(1)),8,(h1->GetMean(1) + h1->GetRMS(1)));
565 sprintf(hname,
"HIe12d");
566 TH1 *h1 = (TH1F *) fin->Get(hname);
568 spf->DrawMarker(12, h1->GetMean(1));
569 rlin->DrawLine(12,(h1->GetMean(1)-h1->GetRMS(1)),12,(h1->GetMean(1) + h1->GetRMS(1)));
571 sprintf(hname,
"HIe16d");
572 TH1 *h1 = (TH1F *) fin->Get(hname);
574 spf->DrawMarker(16, h1->GetMean(1));
575 rlin->DrawLine(16,(h1->GetMean(1)-h1->GetRMS(1)),16,(h1->GetMean(1) + h1->GetRMS(1)));
578 sprintf(hname,
"HIe32d");
579 TH1 *h1 = (TH1F *) fin->Get(hname);
581 spf->DrawMarker(32, h1->GetMean(1));
582 rlin->DrawLine(32,(h1->GetMean(1)-h1->GetRMS(1)),32,(h1->GetMean(1) + h1->GetRMS(1)));
584 sprintf(hname,
"HIe40d");
585 TH1 *h1 = (TH1F *) fin->Get(hname);
587 spf->DrawMarker(40, h1->GetMean(1));
588 rlin->DrawLine(40,(h1->GetMean(1)-h1->GetRMS(1)),40,(h1->GetMean(1) + h1->GetRMS(1)));
591 sprintf(hname,
"HIe50d");
592 TH1 *h1 = (TH1F *) fin->Get(hname);
594 spf->DrawMarker(50, h1->GetMean(1));
595 rlin->DrawLine(50,(h1->GetMean(1)-h1->GetRMS(1)),50,(h1->GetMean(1) + h1->GetRMS(1)));
663 int pz[10] = {1,2,4,8,12,16,32,40,50,90};
672 sprintf(infile,
"e1out.root");
674 sprintf(hname,
"HOe1d");
675 TH1F *
h1 =
new TH1F(hname,
"HOe1d", 100, 0, 1);
676 TFile *
f = TFile::Open(infile);
678 TNtuple *nt = (TNtuple *)f->Get(
"ed");
679 nt->Project(hname,
"(HOA+HOS)/(EA+ES+HIA+HIS+HOA+HOS+BH+MAG)");
682 TFile *
fout = TFile::Open(
"epercent.root",
"UPDATE");
685 cout << h1->Integral() <<
" " << hname << endl;
689 sprintf(infile,
"e2out.root");
691 sprintf(hname,
"HOe2d");
692 TH1F *h1 =
new TH1F(hname,
"HOe2d", 100, 0, 1);
693 TFile *f = TFile::Open(infile);
695 TNtuple *nt = (TNtuple *)f->Get(
"ed");
696 nt->Project(hname,
"(HOA+HOS)/(EA+ES+HIA+HIS+HOA+HOS+BH+MAG)");
699 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
702 cout << h1->Integral() <<
" " << hname << endl;
706 sprintf(infile,
"e4out.root");
708 sprintf(hname,
"HOe4d");
709 TH1F *h1 =
new TH1F(hname,
"HOe4d", 100, 0, 1);
710 TFile *f = TFile::Open(infile);
712 TNtuple *nt = (TNtuple *)f->Get(
"ed");
713 nt->Project(hname,
"(HOA+HOS)/(EA+ES+HIA+HIS+HOA+HOS+BH+MAG)");
716 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
719 cout << h1->Integral() <<
" " << hname << endl;
723 sprintf(infile,
"e8out.root");
725 sprintf(hname,
"HOe8d");
726 TH1F *h1 =
new TH1F(hname,
"HOe8d", 100, 0, 1);
727 TFile *f = TFile::Open(infile);
729 TNtuple *nt = (TNtuple *)f->Get(
"ed");
730 nt->Project(hname,
"(HOA+HOS)/(EA+ES+HIA+HIS+HOA+HOS+BH+MAG)");
733 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
736 cout << h1->Integral() <<
" " << hname << endl;
740 sprintf(infile,
"e12out.root");
742 sprintf(hname,
"HOe12d");
743 TH1F *h1 =
new TH1F(hname,
"HOe12d", 100, 0, 1);
744 TFile *f = TFile::Open(infile);
746 TNtuple *nt = (TNtuple *)f->Get(
"ed");
747 nt->Project(hname,
"(HOA+HOS)/(EA+ES+HIA+HIS+HOA+HOS+BH+MAG)");
750 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
753 cout << h1->Integral() <<
" " << hname << endl;
757 sprintf(infile,
"e16out.root");
759 sprintf(hname,
"HOe16d");
760 TH1F *h1 =
new TH1F(hname,
"HOe16d", 100, 0, 1);
761 TFile *f = TFile::Open(infile);
763 TNtuple *nt = (TNtuple *)f->Get(
"ed");
764 nt->Project(hname,
"(HOA+HOS)/(EA+ES+HIA+HIS+HOA+HOS+BH+MAG)");
767 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
770 cout << h1->Integral() <<
" " << hname << endl;
774 sprintf(infile,
"e32out.root");
776 sprintf(hname,
"HOe32d");
777 TH1F *h1 =
new TH1F(hname,
"HOe32d", 100, 0, 1);
778 TFile *f = TFile::Open(infile);
780 TNtuple *nt = (TNtuple *)f->Get(
"ed");
781 nt->Project(hname,
"(HOA+HOS)/(EA+ES+HIA+HIS+HOA+HOS+BH+MAG)");
784 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
787 cout << h1->Integral() <<
" " << hname << endl;
791 sprintf(infile,
"e40out.root");
793 sprintf(hname,
"HOe40d");
794 TH1F *h1 =
new TH1F(hname,
"HOe40d", 100, 0, 1);
795 TFile *f = TFile::Open(infile);
797 TNtuple *nt = (TNtuple *)f->Get(
"ed");
798 nt->Project(hname,
"(HOA+HOS)/(EA+ES+HIA+HIS+HOA+HOS+BH+MAG)");
801 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
804 cout << h1->Integral() <<
" " << hname << endl;
808 sprintf(infile,
"e50out.root");
810 sprintf(hname,
"HOe50d");
811 TH1F *h1 =
new TH1F(hname,
"HOe50d", 100, 0, 1);
812 TFile *f = TFile::Open(infile);
814 TNtuple *nt = (TNtuple *)f->Get(
"ed");
815 nt->Project(hname,
"(HOA+HOS)/(EA+ES+HIA+HIS+HOA+HOS+BH+MAG)");
818 TFile *fout = TFile::Open(
"epercent.root",
"UPDATE");
821 cout << h1->Integral() <<
" " << hname << endl;
857 TFile *fin = TFile::Open(
"epercent.root");
859 TH2 *
h2 =
new TH2F(
"htot",
"Outer_HCAL",1,0,50,1,0,.1);
860 gStyle->SetOptStat(0);
861 TMarker *spf =
new TMarker();
862 spf->SetMarkerStyle(20);
863 spf->SetMarkerColor(11);
864 TLine *rlin =
new TLine();
865 rlin->SetLineColor(3);
866 rlin->SetLineStyle(1);
867 rlin->SetLineWidth(1);
868 TCanvas *c3 =
new TCanvas();
872 sprintf(hname,
"HOe1d");
873 TH1 *
h1 = (TH1F *) fin->Get(hname);
874 spf->DrawMarker(1, h1->GetMean(1));
875 rlin->DrawLine(1,(h1->GetMean(1)-h1->GetRMS(1)),1,(h1->GetMean(1) + h1->GetRMS(1)));
876 double hom1 = h1->GetMean(1);
877 double hor1 = h1->GetRMS(1);
880 sprintf(hname,
"HOe2d");
881 TH1 *h1 = (TH1F *) fin->Get(hname);
882 spf->DrawMarker(2, h1->GetMean(1));
883 rlin->DrawLine(2,(h1->GetMean(1)-h1->GetRMS(1)),2,(h1->GetMean(1) + h1->GetRMS(1)));
884 double hom2 = h1->GetMean(1);
885 double hor2 = h1->GetRMS(1);
888 sprintf(hname,
"HOe4d");
889 TH1 *h1 = (TH1F *) fin->Get(hname);
891 spf->DrawMarker(4, h1->GetMean(1));
892 rlin->DrawLine(4,(h1->GetMean(1)-h1->GetRMS(1)),4,(h1->GetMean(1) + h1->GetRMS(1)));
893 double hom4 = h1->GetMean(1);
894 double hor4 = h1->GetRMS(1);
898 sprintf(hname,
"HOe8d");
899 TH1 *h1 = (TH1F *) fin->Get(hname);
901 spf->DrawMarker(8, h1->GetMean(1));
902 rlin->DrawLine(8,(h1->GetMean(1)-h1->GetRMS(1)),8,(h1->GetMean(1) + h1->GetRMS(1)));
903 double hom8 = h1->GetMean(1);
904 double hor8 = h1->GetRMS(1);
908 sprintf(hname,
"HOe12d");
909 TH1 *h1 = (TH1F *) fin->Get(hname);
911 spf->DrawMarker(12, h1->GetMean(1));
912 rlin->DrawLine(12,(h1->GetMean(1)-h1->GetRMS(1)),12,(h1->GetMean(1) + h1->GetRMS(1)));
913 double hom12 = h1->GetMean(1);
914 double hor12 = h1->GetRMS(1);
918 sprintf(hname,
"HOe16d");
919 TH1 *h1 = (TH1F *) fin->Get(hname);
921 spf->DrawMarker(16, h1->GetMean(1));
922 rlin->DrawLine(16,(h1->GetMean(1)-h1->GetRMS(1)),16,(h1->GetMean(1) + h1->GetRMS(1)));
923 double hom16 = h1->GetMean(1);
924 double hor16 = h1->GetRMS(1);
928 sprintf(hname,
"HOe32d");
929 TH1 *h1 = (TH1F *) fin->Get(hname);
931 spf->DrawMarker(32, h1->GetMean(1));
932 rlin->DrawLine(32,(h1->GetMean(1)-h1->GetRMS(1)),32,(h1->GetMean(1) + h1->GetRMS(1)));
933 double hom32 = h1->GetMean(1);
934 double hor32 = h1->GetRMS(1);
938 sprintf(hname,
"HOe40d");
939 TH1 *h1 = (TH1F *) fin->Get(hname);
941 spf->DrawMarker(40, h1->GetMean(1));
942 rlin->DrawLine(40,(h1->GetMean(1)-h1->GetRMS(1)),40,(h1->GetMean(1) + h1->GetRMS(1)));
943 double hom40 = h1->GetMean(1);
944 double hor40 = h1->GetRMS(1);
948 sprintf(hname,
"%s50d",calo);
949 TH1 *h1 = (TH1F *) fin->Get(hname);
951 spf->DrawMarker(50, h1->GetMean(1));
952 rlin->DrawLine(50,(h1->GetMean(1)-h1->GetRMS(1)),50,(h1->GetMean(1) + h1->GetRMS(1)));
953 double hom50 = h1->GetMean(1);
954 double hor50 = h1->GetRMS(1);
957 double x[9] = {1,2,4,8,12,16,32,40,50};
958 double y[9] = {hom1,hom2,hom4,hom8,hom12,hom16,hom32,hom40,hom50};
960 double yer[9] = {hor1,hor2,hor4,hor8,hor12,hor16,hor32,hor40,hor50};
961 gr =
new TGraphErrors(9,x,y,xer,yer);
963 gr->SetMarkerStyle(20);
964 gr->SetMarkerColor(2);
1033 int pz[9] = {1,2,4,8,12,16,32,40,50};
1036 for (
int i=0;
i<9;
i++)
1039 sprintf(infile,
"%s%dout.root",part, pz[
i]);
1041 sprintf(hname,
"%s%s%dd",calo,part,pz[i]);
1042 TH1F *
h1 =
new TH1F(hname,
"", 100, 0, 1);
1043 TFile *
f = TFile::Open(infile);
1045 TNtuple *nt = (TNtuple *)f->Get(
"ed");
1050 nt->Project(hname,
"(EA+HOS)/(EA+ES+HIA+HIS+HOA+HOS+BH+MAG)");
1052 else if(calo ==
"HI")
1054 nt->Project(hname,
"(EA+HOS)/(EA+ES+HIA+HIS+HOA+HOS+BH+MAG)");
1056 else if(calo ==
"E")
1058 nt->Project(hname,
"(EA+ES)/(EA+ES+HIA+HIS+HOA+HOS+BH+MAG)");
1060 else if (calo ==
"MAG")
1062 nt->Project(hname,
"(MAG)/(EA+ES+HIA+HIS+HOA+HOS+BH+MAG)");
1064 else if (calo ==
"BH")
1066 nt->Project(hname,
"(MAG)/(EA+ES+HIA+HIS+HOA+HOS+BH+MAG)");
1070 cout <<
"ERROR" << endl;
1075 sprintf(fname,
"%spercent.root",part);
1076 TFile *
fout = TFile::Open(fname,
"UPDATE");
1079 cout << h1->Integral() <<
" " << hname <<
" " << pz[
i] << endl;
1095 int pz[9] = {1,2,4,8,12,16,32,40,50};
1098 double xer[9] = {0};
1101 TFile *fin = TFile::Open(
"epercent.root");
1103 for (
int i=0;
i<9;
i++)
1106 sprintf(hname,
"%s%dd",calo,pz[
i]);
1107 TH1 *
h1 = (TH1F *) fin->Get(hname);
1108 y[
i] = h1->GetMean(1);
1109 yer[
i] = h1->GetRMS(1);
1111 gr =
new TGraphErrors(9,x,y,xer,yer);
1113 gr->SetMarkerStyle(20);
1114 gr->SetMarkerColor(2);