diff --git a/benchmarks/barrel_ecal/scripts/emcal_barrel_pi0_analysis.cxx b/benchmarks/barrel_ecal/scripts/emcal_barrel_pi0_analysis.cxx index ded4e93fdb44abf2ca20a63cc1366eadd3d8617e..8a308187ad0768cdd1c64c64554f6fe72feb4598 100644 --- a/benchmarks/barrel_ecal/scripts/emcal_barrel_pi0_analysis.cxx +++ b/benchmarks/barrel_ecal/scripts/emcal_barrel_pi0_analysis.cxx @@ -29,7 +29,7 @@ using namespace ROOT::VecOps; void emcal_barrel_pi0_analysis(const char* input_fname = "sim_output/sim_emcal_barrel_pi0.root") { - //input_fname = "../sim_output/sim_emcal_barrel_pi0.root"; + input_fname = "../sim_output/sim_emcal_barrel_pi0.root"; // Setting for graphs gROOT->SetStyle("Plain"); gStyle->SetOptFit(1); @@ -197,10 +197,11 @@ void emcal_barrel_pi0_analysis(const char* input_fname = "sim_output/sim_emcal_b }; // Histograms and Fitting - auto hdE = (d1.Histo1D({"hdE", "dE; dE[GeV]; Events", 100, -3.0, 3.0}, "dE"))->DrawCopy(); - auto hdE_rel = (d1.Histo1D({"hdE_rel", "dE Relative; dE Relative; Events", 100, -3.0, 3.0}, "dE_rel"))->DrawCopy(); - hdE->Fit("gaus", "", "", -3.0, 3.0); - double* res = hdE->GetFunction("gaus")->GetParameters(); + auto hdE = d1.Histo1D({"hdE", "dE; dE[GeV]; Events", 100, -3.0, 3.0}, "dE"); + auto hdE_rel = d1.Histo1D({"hdE_rel", "dE Relative; dE Relative; Events", 100, -3.0, 3.0}, "dE_rel"); + auto hdEcopy = hdE->DrawCopy(); + hdEcopy->Fit("gaus", "", "", -3.0, 3.0); + double* res = hdEcopy->GetFunction("gaus")->GetParameters(); double sigmaOverE = res[2] / meanE; // Pass/Fail @@ -213,8 +214,8 @@ void emcal_barrel_pi0_analysis(const char* input_fname = "sim_output/sim_emcal_b hdE->GetYaxis()->SetTitleOffset(1.4); hdE->SetLineWidth(2); hdE->SetLineColor(kBlue); - hdE->GetFunction("gaus")->SetLineWidth(2); - hdE->GetFunction("gaus")->SetLineColor(kRed); + //hdE->GetFunction("gaus")->SetLineWidth(2); + //hdE->GetFunction("gaus")->SetLineColor(kRed); hdE->DrawClone(); cdE->SaveAs("results/emcal_barrel_pi0_dE.png"); cdE->SaveAs("results/emcal_barrel_pi0_dE.pdf");