24 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
25 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
26 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
27 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
28 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
29 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1528717.0, 1407544.0,
30 1528588.0, 1504324.0, 983111.0, 0.0, 1441092.0, 1480053.0, 1460954.0, 1392584.0, 1394014.0, 1336290.0,
31 0.0, 1346085.0, 1316119.0, 1285210.0, 1295065.0, 1250674.0, 1158590.0, 1126330.0, 0.0, 1146744.0,
32 1081900.0, 1086177.0, 0.0, 1068194.0, 1011269.0, 1012426.0, 1025018.0, 0.0, 951980.0, 939222.0,
33 927711.0, 917307.0, 901588.0, 919701.0, 0.0, 849302.0, 834149.0, 869406.0, 797246.0, 830177.0,
34 809832.0, 0.0, 790587.0, 749255.0, 760424.0, 720303.0, 761106.0, 724676.0, 704258.0, 0.0,
35 647908.0, 693104.0, 675661.0, 652931.0, 643327.0, 631906.0, 604586.0, 0.0, 612618.0, 603558.0,
36 613414.0, 582071.0, 569040.0, 559067.0, 0.0, 733722.0, 695395.0, 887978.0, 663665.0, 862062.0,
37 645243.0, 665747.0, 0.0, 784282.0, 800891.0, 761655.0, 746507.0, 729282.0, 716918.0, 0.0,
38 594731.0, 593412.0, 526234.0, 571098.0, 428117.0, 0.0, 816084.0, 542575.0, 544460.0, 523923.0,
39 487473.0, 508549.0, 703798.0, 1116513.0, 967680.0, 1285424.0, 1127003.0, 779033.0, 562754.0, 415374.0,
40 525636.0, 496556.0, 407793.0, 497061.0, 451473.0, 444332.0, 475791.0, 445463.0, 454212.0, 431271.0,
41 434089.0, 426533.0, 509816.0, 414168.0, 394648.0, 476410.0, 377050.0, 489869.0, 1281880.0, 750548.0,
42 755848.0, 891975.0, 821319.0, 533191.0, 929009.0, 600947.0, 918157.0, 977240.0, 949614.0, 925346.0,
43 577657.0, 896363.0, 1145221.0, 843711.0, 691364.0, 838236.0, 810891.0, 1209237.0, 790023.0, 741811.0,
44 711976.0, 690316.0, 1177627.0, 738936.0, 792484.0, 777937.0, 746319.0, 703869.0, 697973.0, 1025455.0,
45 639500.0, 908115.0, 581026.0, 899918.0, 786252.0, 809173.0, 732216.0, 699967.0, 1006938.0, 604373.0,
46 828893.0, 582538.0, 910984.0, 756836.0, 670650.0, 545766.0, 606404.0, 495667.0, 0.0, 0.0,
47 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
56 TDirectory *
locDirectory = (TDirectory*)gDirectory->FindObjectAny(
"highlevel");
67 if(TVirtualPad::Pad() == NULL)
68 locCanvas =
new TCanvas(
"Beam",
"Beam", 1200, 600);
70 locCanvas = gPad->GetCanvas();
71 locCanvas->Divide(2, 1);
74 latex.SetTextSize(0.04);
81 if( (locHist_RFBeamBunchPeriod_DFT != NULL) && (locHist_RFBeamBunchPeriod != NULL))
83 double max = locHist_RFBeamBunchPeriod_DFT->GetMaximum()*2.0;
84 locHist_RFBeamBunchPeriod_DFT->GetXaxis()->SetTitleSize(0.05);
85 locHist_RFBeamBunchPeriod_DFT->GetXaxis()->SetLabelSize(0.05);
86 locHist_RFBeamBunchPeriod_DFT->GetYaxis()->SetLabelSize(0.03);
87 locHist_RFBeamBunchPeriod_DFT->SetFillStyle(3001);
88 locHist_RFBeamBunchPeriod_DFT->SetFillColor(kGreen);
89 locHist_RFBeamBunchPeriod_DFT->SetLineColor(kGreen-2);
90 locHist_RFBeamBunchPeriod_DFT->SetLineWidth(2);
91 locHist_RFBeamBunchPeriod_DFT->SetStats(0);
92 locHist_RFBeamBunchPeriod_DFT->GetYaxis()->SetRangeUser(0.0, max);
93 locHist_RFBeamBunchPeriod_DFT->Draw();
95 sprintf(str,
"%g entries", (
double)locHist_RFBeamBunchPeriod->GetEntries());
96 latex.DrawLatex(300.0, 1.02*max, str);
99 TPad *p = (TPad*)gDirectory->FindObjectAny(
"RF_DFT");
100 if(!p) p =
new TPad(
"RF_DFT",
"insert", 0.16, 0.6, 0.89, 0.9);
104 locHist_RFBeamBunchPeriod->GetXaxis()->SetRangeUser(30.0, 90.0);
105 locHist_RFBeamBunchPeriod->GetXaxis()->SetTitleSize(0.05);
106 locHist_RFBeamBunchPeriod->GetXaxis()->SetLabelSize(0.05);
107 locHist_RFBeamBunchPeriod->GetYaxis()->SetLabelSize(0.03);
108 locHist_RFBeamBunchPeriod->SetFillStyle(3001);
109 locHist_RFBeamBunchPeriod->SetFillColor(kMagenta);
110 locHist_RFBeamBunchPeriod->SetStats(0);
111 locHist_RFBeamBunchPeriod->Draw();
118 if(locHist_BeamEnergy != NULL)
121 TH1D* locHist_BeamEnergy_norm = (TH1D*)gDirectory->Get(
"BeamEnergy_norm");
122 if(!locHist_BeamEnergy_norm){
123 locHist_BeamEnergy_norm =
new TH1D(
"BeamEnergy_norm",
"Reconstructed Photon Beam Energy;Beam #gamma energy (GeV)", 240, 0.0, 12.0);
125 if(locHist_BeamEnergy_norm){
127 locHist_BeamEnergy_norm->Reset();
131 for(
int ibin=1; ibin<=locHist_BeamEnergy_norm->GetNbinsX(); ibin++){
132 Double_t norm = amorphous_data[ibin-1];
133 if( norm < 10000.0)
continue;
135 Double_t v = (Double_t)locHist_BeamEnergy->GetBinContent(ibin);
137 locHist_BeamEnergy_norm->SetBinContent(ibin, v);
138 if(v > scale) scale = v;
142 if(scale != 0.0) locHist_BeamEnergy_norm->Scale(1.0/scale);
145 double left_scale = 0.0;
146 for(
int ibin=1; ibin<=locHist_BeamEnergy_norm->GetNbinsX(); ibin++){
147 if( amorphous_data[ibin-1] < 10000.0)
continue;
148 Double_t v = (Double_t)locHist_BeamEnergy_norm->GetBinContent(ibin);
156 double diff = 1.0 - left_scale;
157 double min = left_scale - diff*0.1;
158 double max = left_scale + diff*1.2;
159 if( (max-min) < 0.4 ){
161 if(max<1.50) max =1.50;
167 locHist_BeamEnergy_norm->GetXaxis()->SetTitleSize(0.05);
168 locHist_BeamEnergy_norm->GetXaxis()->SetLabelSize(0.05);
169 locHist_BeamEnergy_norm->GetYaxis()->SetLabelSize(0.03);
170 locHist_BeamEnergy_norm->SetFillStyle(3001);
171 locHist_BeamEnergy_norm->SetFillColor(kOrange);
172 locHist_BeamEnergy_norm->SetLineColor(kRed-2);
173 locHist_BeamEnergy_norm->SetLineWidth(2);
174 locHist_BeamEnergy_norm->SetStats(0);
175 locHist_BeamEnergy_norm->GetYaxis()->SetRangeUser(min, max);
176 locHist_BeamEnergy_norm->Draw(
"HIST");
181 double Epeak = locHist_BeamEnergy_norm->GetBinCenter(locHist_BeamEnergy_norm->GetMaximumBin());
182 sprintf(str,
"Epeak: %3.2f GeV", Epeak);
183 latex.SetTextAlign(12);
184 latex.DrawLatex(1.0, (min+max)/2.0, str);
187 sprintf(str,
"%g entries", (
double)locHist_BeamEnergy->GetEntries());
188 latex.SetTextAlign(22);
189 latex.DrawLatex(6.0, 1.035*(max-min)+min, str);
191 latex.SetTextAngle(270);
192 latex.DrawLatex(12.5, (min+max)/2.0, amorphous_label.c_str());
195 TPad *beamenergypad = (TPad*)gDirectory->FindObjectAny(
"beamenergypad");
196 if(!beamenergypad) beamenergypad =
new TPad(
"beamenergypad",
"", 0.105, 0.65, 0.5, 0.895);
197 beamenergypad->SetTicks();
198 beamenergypad->Draw();
202 locHist_BeamEnergy->GetXaxis()->SetTitleSize(0.05);
203 locHist_BeamEnergy->GetXaxis()->SetLabelSize(0.05);
204 locHist_BeamEnergy->GetYaxis()->SetLabelSize(0.03);
205 locHist_BeamEnergy->SetFillStyle(3001);
206 locHist_BeamEnergy->SetFillColor(kCyan);
207 locHist_BeamEnergy->SetLineColor(kBlue);
208 locHist_BeamEnergy->SetLineWidth(2);
209 locHist_BeamEnergy->SetStats(0);
210 locHist_BeamEnergy->Draw();
sprintf(text,"Post KinFit Cut")
TH1 * locHist_RFBeamBunchPeriod_DFT
TDirectory * locTopDirectory
TDirectory * locDirectory
Double_t amorphous_data[]
TH1 * locHist_RFBeamBunchPeriod