41 gStyle->SetOptStat(
" ");
44 char*
c1 =
"/nova/ana/users/prabhjot/gridjob/Work_with_Adam_and_Brian/nd/NDPCHitData_S150224/mainbody_and_muoncatcher/mainboby/ConsolidateViewsMode_false/Fromgrid_aftercosmiccalib/histofiles/calibNDPCHitData_hist_mainbody_ConsolidateViewsMode_false_S150224.root";
45 char*
c2 =
"/nova/ana/users/prabhjot/AttenuationCalibration_2ndAnalysis/nddata/Period2_DDActivity/mainbody/calib_hist_2ndAna_fulldetector_nddata_mainbody_period2ddactivity.root";
51 char* cthreshold1 =
"";
52 char* cthreshold2 =
"";
55 char* cattenuation1 =
"/nova/app/users/prabhjot/nova_test_S150224/AttenuationCalibration/nd/pchitdata/fromgrid/mainbody_and_muoncatcher/mainboby/ConsolidateViewsMode_false/Atten_Fit_Results.root";
56 char* cattenuation2 =
"/nova/ana/users/prabhjot/AttenuationCalibration_2ndAnalysis/nddata/Period2_DDActivity/mainbody/FitAttenuation/Atten_Fit_Results.root";
59 char* cattenuation_muoncatcher1 =
"/nova/ana/users/prabhjot/AttenuationCalibration_2ndAnalysis/nddata/Period2_DDActivity/muoncatcher/FitAttenuation/Atten_Fit_Results.root";
60 char* cattenuation_muoncatcher2 =
"/nova/ana/users/prabhjot/AttenuationCalibration_2ndAnalysis/nddata/Epoch3b_DDActivity/muoncatcher/FitAttenuation/Atten_Fit_Results.root";
63 char* cconstants1 =
"/nova/ana/users/prabhjot/AttenuationCalibration_2ndAnalysis/nddata/comparison_plots/calib_atten_consts_uniq_sort_1st_ana.txt";
64 char* cconstants2 =
"/nova/ana/users/prabhjot/AttenuationCalibration_2ndAnalysis/nddata/comparison_plots/calib_atten_consts_uniq_sort_period2.txt";
78 analysis1 =
"2nd_analysis_period2";
79 analysis2 =
"2nd_analysis_epoch3b";
81 hist1 =
"h_WPE_corr_xy";
82 hist2 =
"h_WPE_corr_xy";
92 if(
data) mcdata =
"data";
108 if(
mc) mcdata =
"mc";
109 if(
data) mcdata =
"data";
125 TFile*
f1 =
new TFile(c1,
"read");
126 TFile*
f2 =
new TFile(c2,
"read");
136 if(f1->GetListOfKeys()->Contains(
"calib"))
137 TH2F* h2D_1 = (TH2F*)f1->Get(
"calib/"+hist1+
"_in"+viewStr);
138 if(f1->GetListOfKeys()->Contains(
"make"))
139 TH2F* h2D_1 = (TH2F*)f1->Get(
"make/"+hist1+
"_in"+viewStr);
140 TProfile* ProfileX_1 = h2D_1->ProfileX();
141 if(det==
"nd" && mcdata==
"data") ProfileX_1->Rebin();
144 if(f2->GetListOfKeys()->Contains(
"calib"))
145 TH2F* h2D_2 = (TH2F*)f2->Get(
"calib/"+hist2+
"_in"+viewStr);
146 else if(f2->GetListOfKeys()->Contains(
"make"))
147 TH2F* h2D_2 = (TH2F*)f2->Get(
"make/"+hist2+
"_in"+viewStr);
148 TProfile* ProfileX_2 = h2D_2->ProfileX();
149 if(det==
"nd" && mcdata==
"data") ProfileX_2->Rebin();
153 HistogramAttr1D(ProfileX_1,
"W (cm)",
"Uncorrected PE/cm", ProfileX_1->GetXaxis()->GetBinCenter(1), ProfileX_1->GetXaxis()->GetBinCenter(ProfileX_1->GetXaxis()->GetNbins()), 15, 80,
kBlue);
155 ProfileX_1->SetLineColor(
kBlue);
156 ProfileX_2->SetLineColor(
kRed);
157 ProfileX_2->Draw(
"same");
159 TLegend *
legend =
new TLegend(.12,.62,.64,.90);
160 legend->SetBorderSize(0);
161 legend->SetFillStyle(0);
162 legend->AddEntry((TObject*)0, det+
" "+mcdata,
" ");
163 legend->AddEntry(ProfileX_1, analysis1+
" "+viewStr+
" view");
164 legend->AddEntry(ProfileX_2, analysis2+
" "+viewStr+
" view");
167 gPad->Print(
"Images/uncorrected_PEcm_vs_w_"+det+
"_"+mcdata+
"_"+analysis1+
"_vs_"+analysis2+
"_"+viewstr+
"view.pdf");
172 const TString hrationame = Form(
"hratio%s_%s_%s", det.Data(), mcdata.Data(), viewstr.Data());
173 TH1D* hratio =
new TH1D(hrationame,
"",ProfileX_1->GetXaxis()->GetNbins(), ProfileX_1->GetBinCenter(0), ProfileX_1->GetBinCenter(ProfileX_1->GetXaxis()->GetNbins()));
174 Ratiohist(ProfileX_1, ProfileX_2, hratio,
kRed, 24,
"W (cm)",
"Ratio", 0.85, 1.10);
176 TLegend *legend =
new TLegend(.12,.62,.64,.90);
177 legend->SetBorderSize(0);
178 legend->SetFillStyle(0);
179 legend->SetTextSize(0.04);
180 legend->AddEntry((TObject*)0, det+
" "+mcdata,
" ");
181 legend->AddEntry(hratio,analysis2+
" to "+analysis1+
" "+viewStr+
" view");
183 gPad->Print(
"Images/uncorrected_PEcm_vs_w_ratio_"+det+
"_"+mcdata+
"_"+analysis1+
"_vs_"+analysis2+
"_"+viewstr+
"view.pdf");
188 uncorrected_PE(c1, c1, det, mcdata, analysis1, analysis2, hist1, hist2);
192 TFile*
f1 =
new TFile(c1,
"read");
193 TFile*
f2 =
new TFile(c2,
"read");
195 const TString viewstr =
view ?
"y" :
"x";
196 const TString viewStr =
view ?
"Y" :
"X";
199 TH1D* correction_1 = (TH1D*)f1->Get(
"a"+viewstr+
"view");
200 correction_1->SetLineColor(kBlack);
203 TH1D* correction_2 = (TH1D*)f2->Get(
"a"+viewstr+
"view");
204 correction_2->SetLineColor(
kRed);
208 if(correction_1->FindObject(
"stats")){
209 TPaveStats* pave1 = (TPaveStats*)correction_1->FindObject(
"stats");
212 if(correction_2->FindObject(
"stats")){
213 TPaveStats* pave2 = (TPaveStats*)correction_2->FindObject(
"stats");
216 correction_1->Draw();
217 correction_2->Draw(
"same");
218 if(var==
"W") TString labelx =
"W (cm)";
219 HistogramAttr1D(correction_1, labelx.Data(),
"correction factor", correction_1->GetXaxis()->GetBinCenter(1), correction_1->GetXaxis()->GetBinCenter(correction_1->GetXaxis()->GetNbins()), 0.5, 2.0, kBlack);
221 TLegend *
legend =
new TLegend(.12,.62,.64,.90);
222 legend->SetBorderSize(0);
223 legend->SetFillStyle(0);
224 legend->AddEntry((TObject*)0, det+
" "+mcdata,
" ");
225 legend->AddEntry(correction_1, analysis1+
" "+viewStr+
" view");
226 legend->AddEntry(correction_2, analysis2+
" "+viewStr+
" view");
228 gPad->Print(
"Images/thresholdshadowing_vs_"+var+
"_"+det+
"_"+mcdata+
"_"+analysis1+
"_vs_"+analysis2+
"_"+viewstr+
"view.pdf");
233 const TString hrationame = Form(
"hratio%s_%s_%s_%s", det.Data(), mcdata.Data(), viewstr.Data(), var.Data());
234 TH1D* hratio =
new TH1D(hrationame,
"",correction_1->GetXaxis()->GetNbins(), correction_1->GetBinCenter(0), correction_1->GetBinCenter(correction_1->GetXaxis()->GetNbins()));
235 Ratiohist(correction_1, correction_2, hratio,
kRed, 24, labelx.Data(),
"Correction factor ratio", 1.8, 1.2);
237 TLegend *legend =
new TLegend(.12,.62,.64,.90);
238 legend->SetBorderSize(0);
239 legend->SetFillStyle(0);
240 legend->SetTextSize(0.04);
241 legend->AddEntry((TObject*)0, det+
" "+mcdata,
" ");
242 legend->AddEntry(hratio,analysis2+
" to "+analysis1+
" "+viewStr+
" view");
244 gPad->Print(
"Images/thresholdshadowinge_vs_"+var+
"_ratio_"+det+
"_"+mcdata+
"_"+analysis1+
"_vs_"+analysis2+
"_"+viewstr+
"view.pdf");
251 if(plane.Atoi() > 3 || plane.Atoi() < 2){
252 std::cout <<
"It is a ND muon catcher data file and has only 002, 003 planes. Plane " << plane <<
" is out of range. " <<
std::endl;
255 if(cell.Atoi() > 95 || cell.Atoi() < 0){
260 if(det.Data()==
"nd"){
261 if(mcdata.Data()==
"mc"){
262 if(plane.Atoi() > 3 || plane.Atoi() < 0){
263 std::cout <<
"It is a Monte Carlo file. Plane " << plane <<
" out of range. " <<
std::endl;
266 if(cell.Atoi() > 95 || cell.Atoi() < 0){
267 std::cout <<
"It is a Monte Carlo file. Cell " << cell <<
" out of range. " <<
std::endl;
271 if(mcdata.Data()==
"data"){
272 if(plane.Atoi() > 191 || plane.Atoi() < 0){
273 std::cout <<
"It is a ND data file and has only 191 main body planes. Plane " << plane <<
" out of range. " <<
std::endl;
276 if(cell.Atoi() > 95 || cell.Atoi() < 0){
283 if(det.Data()==
"fd"){
284 if(mcdata.Data()==
"mc"){
285 if(plane.Atoi() > 1 || plane.Atoi() < 0){
286 std::cout <<
"It is a Monte Carlo file. Plane " << plane <<
" out of range. " <<
std::endl;
289 if(cell.Atoi() > 383 || cell.Atoi() < 0){
290 std::cout <<
"It is a Monte Carlo file. Cell " << cell <<
" out of range. " <<
std::endl;
294 else if(mcdata.Data()==
"data"){
295 if(plane.Atoi() > 895 || plane.Atoi() < 0){
299 if(cell.Atoi() > 383 || cell.Atoi() < 0){
306 TFile*
f1 =
new TFile(c1,
"read");
307 TFile*
f2 =
new TFile(c2,
"read");
313 TH1F*
h1 = (TH1F*)f1->Get(
"plane_"+plane+
"/Atten_Fit_"+plane+
"_"+cell);
314 Color_t color1 = kBlack;
316 if(plane.Atoi()==0) fit1 = (TF1*)h1->FindObject(
"fitX");
317 else if(plane.Atoi()==1) fit1 = (TF1*)h1->FindObject(
"fitY");
318 else if(plane.Atoi()==2) fit1 = (TF1*)h1->FindObject(
"fitMuX");
319 else if(plane.Atoi()==3) fit1 = (TF1*)h1->FindObject(
"fitMuY");
320 if(fit1) fit1->SetLineColor(color1);
322 else if(mcdata==
"data"){
324 if(plane.Atoi()==2) fit1 = (TF1*)h1->FindObject(
"fitMuX");
325 else if(plane.Atoi()==3) fit1 = (TF1*)h1->FindObject(
"fitMuY");
326 if(fit1) fit1->SetLineColor(color1);
328 else if(plane.Atoi()%2==0) fit1 = (TF1*)h1->FindObject(
"fitY");
329 else if(plane.Atoi()%2!=0) fit1 = (TF1*)h1->FindObject(
"fitX");
330 if(fit1) fit1->SetLineColor(color1);
334 TH1F*
h2 = (TH1F*)f2->Get(
"plane_"+plane+
"/Atten_Fit_"+plane+
"_"+cell);
335 Color_t color2 =
kRed;
337 if(plane.Atoi()==0) fit2 = (TF1*)h2->FindObject(
"fitX");
338 else if(plane.Atoi()==1) fit2 = (TF1*)h2->FindObject(
"fitY");
339 else if(plane.Atoi()==2) fit2 = (TF1*)h2->FindObject(
"fitMuX");
340 else if(plane.Atoi()==3) fit2 = (TF1*)h2->FindObject(
"fitMuY");
341 if(fit2) fit2->SetLineColor(color2);
343 else if(mcdata==
"data"){
345 if(plane.Atoi()==2) fit2 = (TF1*)h2->FindObject(
"fitMuX");
346 else if(plane.Atoi()==3) fit2 = (TF1*)h2->FindObject(
"fitMuY");
347 if(fit2) fit2->SetLineColor(color2);
349 else if(plane.Atoi()%2==0) fit2 = (TF1*)h2->FindObject(
"fitY");
350 else if(plane.Atoi()%2!=0) fit2 = (TF1*)h2->FindObject(
"fitX");
351 if(fit2) fit2->SetLineColor(color2);
357 HistogramAttr1D(h1,
"W (cm)",
"Mean PE/cm", h1->GetXaxis()->GetBinCenter(1), h1->GetXaxis()->GetBinCenter(h1->GetXaxis()->GetNbins()), 0., 150., color1);
358 h1->SetLineColor(color1);
359 h1->SetMarkerColor(color1);
360 h1->SetMarkerStyle(24);
362 h2->SetLineColor(color2);
363 h2->SetMarkerColor(color2);
364 h2->SetMarkerStyle(24);
366 TLegend *
legend =
new TLegend(.12,.62,.64,.90);
367 legend->SetBorderSize(0);
368 legend->SetFillStyle(0);
369 legend->SetTextSize(0.04);
370 legend->AddEntry((TObject*)0, det+
" "+mcdata,
" ");
371 legend->AddEntry(h1, analysis1);
372 legend->AddEntry(h2, analysis2);
374 gPad->Print(
"Images/Atten_Fit_"+det+
"_"+mcdata+
"_"+analysis1+
"_vs_"+analysis2+
"_"+plane+
"_"+cell+
".pdf");
379 const TString hrationame = Form(
"hratio%s_%s_%s_%s", det.Data(), mcdata.Data(), plane.Data(), cell.Data());
380 TH1D* hratio =
new TH1D(hrationame,
"",h1->GetXaxis()->GetNbins(), h1->GetBinCenter(0), h1->GetBinCenter(h1->GetXaxis()->GetNbins()));
381 Ratiohist(h1, h2, hratio,
kRed, 24,
"W (cm)",
"Ratio of Mean PE/cm data points", 0.3, 1.0);
383 TLegend *legend =
new TLegend(.12,.62,.64,.90);
384 legend->SetBorderSize(0);
385 legend->SetFillStyle(0);
386 legend->SetTextSize(0.04);
387 legend->AddEntry((TObject*)0, det+
" "+mcdata+
" : Plane "+plane+
" Cell "+cell,
" ");
388 legend->AddEntry(hratio,analysis2+
" to "+analysis1);
390 gPad->Print(
"Images/Atten_Fit_ratio_"+det+
"_"+mcdata+
"_"+analysis1+
"_vs_"+analysis2+
"_plane"+plane+
"_cell"+cell+
".pdf");
395 const TString hratiofitname = Form(
"hratiofit%s_%s_%s_%s", det.Data(), mcdata.Data(), plane.Data(), cell.Data());
397 float x_limit = 250.;
398 int x_bins = 2*x_limit;
401 float x_limit = 800.;
402 int x_bins = 2*x_limit;
404 TH1D* hfit =
new TH1D(
"hfit",
"", x_bins, -x_limit, +x_limit);
405 HistogramAttr1D(hfit,
"W (cm)",
"Ratio of Mean PE/cm fitting curves", -x_limit, +x_limit, 0.55, 0.68, kWhite);
407 TH1D* hratiofit =
new TH1D(hratiofitname,
"", x_bins, -x_limit, +x_limit);
408 Ratiofit(fit1, fit2, hratiofit, plane.Data(), cell.Data(), color2, 24,
"W (cm)",
"Ratio of Mean PE/cm fitting curves", 0.55, 0.68);
409 TLegend *legend =
new TLegend(.12,.62,.64,.90);
410 legend->SetBorderSize(0);
411 legend->SetFillStyle(0);
412 legend->SetTextSize(0.04);
413 legend->AddEntry((TObject*)0, det+
" "+mcdata+
" : Plane "+plane+
" Cell "+cell,
" ");
414 legend->AddEntry(hratiofit,analysis2+
" to "+analysis1);
416 gPad->Print(
"Images/Atten_Fit_fitratio_"+det+
"_"+mcdata+
"_"+analysis1+
"_vs_"+analysis2+
"_plane"+plane+
"_cell"+cell+
".pdf");
425 FILE*
fout = fopen(
"uncalibrated_channels_"+det+
"_"+mcdata+
"_"+analysis1+
"_vs_"+analysis2+
".csv",
"w");
426 fprintf(fout,
"%s%50s%s\n", analysis1.Data(),
" ", analysis2.Data());
427 fprintf(fout,
"channel,coeff_exp,atten_length,background,chisq, %9s, channel,coeff_exp,atten_length,background,chisq\n",
" ");
434 Float_t x_1, y_1, z_1, a_1, b_1, c_1, d_1, e_1, g_1;
435 Float_t x_2, y_2, z_2, a_2, b_2,
c_2, d_2, e_2, g_2;
439 Int_t totalchannels1 = 0;
440 Int_t totalchannels2 = 0;
441 Int_t calibratedchannels1 = 0;
442 Int_t calibratedchannels2 = 0;
447 Double_t limit1D = 3.;
448 Double_t limit2D = 1000.;
450 if(det==
"nd" && mcdata==
"mc" ) { channels = 3063; }
451 if(det==
"nd" && mcdata==
"data" ) { channels = 1003063; }
452 if(det==
"fd" && mcdata==
"mc" ) { channels = 1383; }
453 if(det==
"fd" && mcdata==
"data" ) { channels = 895383; }
456 TH1F* hcoeffexp =
new TH1F(
"hcoeffexp",
"coeffexp difference distribution", 120, -limit1D, +limit1D );
457 TH1F* hattenlength =
new TH1F(
"hattenlength",
"attenlength difference distribution", 600, -limit1D, +limit1D );
458 TH1F* hbackground =
new TH1F(
"hbackground",
"background difference distribution", 120, -limit1D, +limit1D );
459 TH1F* hchisq =
new TH1F(
"hchisq",
"chisq difference distribution", 600, -limit1D, +limit1D );
461 TH2F* h2coeffexp =
new TH2F(
"h2coeffexp",
" " , 2*(Int_t)limit2D, -limit2D, limit2D, 2*(Int_t)limit2D, -limit2D, limit2D );
462 TH2F* h2attenlength =
new TH2F(
"h2attenlength",
" " , 2*(Int_t)limit2D, -limit2D, limit2D, 2*(Int_t)limit2D, -limit2D, limit2D );
463 TH2F* h2background =
new TH2F(
"h2background",
" " , 2*(Int_t)limit2D, -limit2D, limit2D, 2*(Int_t)limit2D, -limit2D, limit2D );
464 TH2F* h2chisq =
new TH2F(
"h2chisq",
" ", 200,0.,2., 200,0.,2. );
467 in_1 >> x_1 >> y_1 >> z_1 >> a_1 >> b_1 >> c_1 >> d_1 >> e_1 >> f_1 >> g_1;
468 in_2 >> x_2 >> y_2 >> z_2 >> a_2 >> b_2 >> c_2 >> d_2 >> e_2 >> f_2 >> g_2;
469 if(!in_1.good())
break;
470 if(!in_2.good())
break;
472 if(f_1<=channels && e_1 < chisq && e_2 < chisq){
473 hcoeffexp->Fill((x_1 - x_2)/x_1);
474 hattenlength->Fill((y_1 - y_2)/y_1);
475 hbackground->Fill((z_1 - z_2)/z_1);
477 h2coeffexp->Fill(x_2, x_1);
478 h2attenlength->Fill(y_2, y_1);
479 h2background->Fill(z_2, z_1);
484 if(e_1<chisq) calibratedchannels1++;
485 if(e_2<chisq) calibratedchannels2++;
487 hchisq->Fill((e_1 - e_2)/e_1);
488 h2chisq->Fill(e_2, e_1);
490 if(e_1>=chisq || e_2>=chisq){
491 fprintf(fout,
"%i,%g,%g,%g,%g,%20s,%i,%g,%g,%g,%g\n",f_1,x_1,y_1,z_1,e_1,
" ", f_2,x_2,y_2,z_2,e_2);
492 out << f_1 << setw(22) << x_1 << setw(22) << y_1 << setw(22) << z_1 << setw(22) << e_1 << f_2 << setw(22) << x_2 << setw(22) << y_2 << setw(22) << z_2 << setw(22) << e_2 <<
endl;
498 cout <<
"Total channels in "+analysis1+
" = " << totalchannels1 <<
" and calibrated channels = " << calibratedchannels1 <<
" = " << ((
float)calibratedchannels1/(
float)totalchannels1)*100. <<
" %." << endl;
499 cout <<
"Total channels in "+analysis2+
" = " << totalchannels2 <<
" and calibrated channels = " << calibratedchannels2 <<
" = " << ((
float)calibratedchannels2/(
float)totalchannels2)*100. <<
" %." << endl;
505 HistogramAttr1D(hcoeffexp,
"#Deltacoeffexp/coeffexp",
"# of channels", 0.5*hcoeffexp->GetXaxis()->GetBinCenter(1), 0.5*hcoeffexp->GetXaxis()->GetBinCenter(hcoeffexp->GetXaxis()->GetNbins()), 0., 7e5, kBlack);
507 TLegend *
legend =
new TLegend(0.00, 0.60, 0.47, 0.93);
508 legend->SetBorderSize(0);
509 legend->SetFillStyle(0);
510 legend->SetTextSize(0.05);
511 legend->AddEntry((TObject*)0, det+
" "+mcdata,
" ");
512 legend->AddEntry(hcoeffexp,
"#splitline{"+analysis1+
"}{vs "+analysis2+
"}",
"P");
514 gPad->Print(
"Images/Delta_coeffexp_"+analysis1+
"_vs_"+analysis2+
"_"+det+
"_"+mcdata+
".pdf");
519 HistogramAttr2D(h2coeffexp,
"coeffexp_{"+analysis2+
"}",
"coeffexp_{"+analysis1+
"}",
" ", 0, 100, 0, 100);
520 h2coeffexp->Draw(
"colz");
521 gPad->Print(
"Images/coeffexp2D_"+analysis1+
"_vs_"+analysis2+
"_"+det+
"_"+mcdata+
".pdf");
526 HistogramAttr1D(hattenlength,
"#Deltaattenlength/attenlength",
"# of channels", 0.5*hattenlength->GetXaxis()->GetBinCenter(1), 0.5*hattenlength->GetXaxis()->GetBinCenter(hattenlength->GetXaxis()->GetNbins()), 0., 166500, kBlack);
527 hattenlength->Draw();
528 TLegend *legend =
new TLegend(0.00, 0.60, 0.47, 0.93);
529 legend->SetBorderSize(0);
530 legend->SetFillStyle(0);
531 legend->SetTextSize(0.05);
532 legend->AddEntry((TObject*)0, det+
" "+mcdata,
" ");
533 legend->AddEntry(hattenlength,
"#splitline{"+analysis1+
"}{vs "+analysis2+
"}",
"P");
535 gPad->Print(
"Images/Delta_attenlength_"+analysis1+
"_vs_"+analysis2+
"_"+det+
"_"+mcdata+
".pdf");
540 HistogramAttr2D(h2attenlength,
"attenlength_{"+analysis2+
"} (cm)",
"attenlength_{"+analysis1+
"} (cm)",
" ", 0, 1000, 0, 1000);
541 h2attenlength->Draw(
"colz");
542 gPad->Print(
"Images/attenlength2D_"+analysis1+
"_vs_"+analysis2+
"_"+det+
"_"+mcdata+
".pdf");
547 HistogramAttr1D(hbackground,
"#Deltabackground/background",
"# of channels", 0.5*hbackground->GetXaxis()->GetBinCenter(1), 0.5*hbackground->GetXaxis()->GetBinCenter(hbackground->GetXaxis()->GetNbins()), 0., 3e4, kBlack);
549 TLegend *legend =
new TLegend(0.00, 0.60, 0.47, 0.93);
550 legend->SetBorderSize(0);
551 legend->SetFillStyle(0);
552 legend->SetTextSize(0.05);
553 legend->AddEntry((TObject*)0, det+
" "+mcdata,
" ");
554 legend->AddEntry(hbackground,
"#splitline{"+analysis1+
"}{vs "+analysis2+
"}",
"P");
556 gPad->Print(
"Images/Delta_background_"+analysis1+
"_vs_"+analysis2+
"_"+det+
"_"+mcdata+
".pdf");
561 HistogramAttr2D(h2background,
"background_{"+analysis2+
"}",
"background_{"+analysis1+
"}",
" ", -50, 50, -50, 50);
562 h2background->Draw(
"colz");
563 gPad->Print(
"Images/background2D_"+analysis1+
"_vs_"+analysis2+
"_"+det+
"_"+mcdata+
".pdf");
568 HistogramAttr1D(hchisq,
"#Deltachisq/chisq",
"# of channels", 0.5*hchisq->GetXaxis()->GetBinCenter(1), 0.5*hchisq->GetXaxis()->GetBinCenter(hchisq->GetXaxis()->GetNbins()), 0., 4200., kBlack);
570 TLegend *legend =
new TLegend(0.00, 0.60, 0.47, 0.93);
571 legend->SetBorderSize(0);
572 legend->SetFillStyle(0);
573 legend->SetTextSize(0.05);
574 legend->AddEntry((TObject*)0, det+
" "+mcdata,
" ");
575 legend->AddEntry(hchisq,
"#splitline{"+analysis1+
"}{vs "+analysis2+
"}",
"P");
577 gPad->Print(
"Images/Delta_chisq_"+analysis1+
"_vs_"+analysis2+
"_"+det+
"_"+mcdata+
".pdf");
582 HistogramAttr2D(h2chisq,
"#chi^{2}_{"+analysis2+
"}",
"#chi^{2}_{"+analysis1+
"}",
" ", 0, 0.5, 0, 0.5);
583 h2chisq->Draw(
"colz");
584 gPad->Print(
"Images/chisq2D_"+analysis1+
"_vs_"+analysis2+
"_"+det+
"_"+mcdata+
".pdf");
void Ratiohist(TH1 *h1, TH1 *h2, TH1 *hratio, Color_t color, Style_t mstyle, TString labelx, TString labely, Double_t lowy, Double_t highy)
static constexpr Double_t c_2
void corrected_PE(char *c1, char *c2, TString det, TString mcdata, TString analysis1, TString analysis2, TString plane, TString cell)
const XML_Char const XML_Char * data
std::map< ToFCounter, std::vector< unsigned int > > channels
void HistogramAttr2D(TH2 *h, char *titlx_x, char *titlx_y, char *titlx_z, Double_t binlowx, Double_t binhighx, Double_t binlowy, Double_t binhighy)
uncorrected_PE(char *c1, char *c2, TString det, TString mcdata, TString analysis1, TString analysis2, TString hist1, TString hist2)
void Ratiofit(TF1 *f1, TF1 *f2, TH1 *hratio, TString plane, TString cell, Color_t color, Style_t mstyle, TString labelx, TString labely, Double_t lowy, Double_t highy)
void thresholdshadowing(char *c1, char *c2, TString det, TString mcdata, TString analysis1, TString analysis2, TString var)
void uncorrected_PE_tricellvstrajectory(char *c1, TString det, TString mcdata, TString analysis1, TString analysis2, TString hist1, TString hist2)
HistogramAttr1D(TH1 *h, char *title_x, char *title_y, Double_t binlowx, Double_t binhighx, Double_t binlowy, Double_t binhighy, Color_t lcolor)
void calibrationconstants(char *c1, char *c2, TString det, TString mcdata, TString analysis1, TString analysis2)
bool calibrationconstantsplots
bool thresholdshadowingplots
attenuation_calibration_comparisons()