Skip to content
Snippets Groups Projects

Resolve "Fix Pi0 benchmark"

Merged Marshall Scott requested to merge 37-fix-pi0-benchmark into master
1 file
+ 8
7
Compare changes
  • Side-by-side
  • Inline
@@ -29,7 +29,7 @@ using namespace ROOT::VecOps;
@@ -29,7 +29,7 @@ using namespace ROOT::VecOps;
void emcal_barrel_pi0_analysis(const char* input_fname = "sim_output/sim_emcal_barrel_pi0.root")
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
// Setting for graphs
gROOT->SetStyle("Plain");
gROOT->SetStyle("Plain");
gStyle->SetOptFit(1);
gStyle->SetOptFit(1);
@@ -197,10 +197,11 @@ void emcal_barrel_pi0_analysis(const char* input_fname = "sim_output/sim_emcal_b
@@ -197,10 +197,11 @@ void emcal_barrel_pi0_analysis(const char* input_fname = "sim_output/sim_emcal_b
};
};
// Histograms and Fitting
// Histograms and Fitting
auto hdE = (d1.Histo1D({"hdE", "dE; dE[GeV]; Events", 100, -3.0, 3.0}, "dE"))->DrawCopy();
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"))->DrawCopy();
auto hdE_rel = d1.Histo1D({"hdE_rel", "dE Relative; dE Relative; Events", 100, -3.0, 3.0}, "dE_rel");
hdE->Fit("gaus", "", "", -3.0, 3.0);
auto hdEcopy = hdE->DrawCopy();
double* res = hdE->GetFunction("gaus")->GetParameters();
hdEcopy->Fit("gaus", "", "", -3.0, 3.0);
 
double* res = hdEcopy->GetFunction("gaus")->GetParameters();
double sigmaOverE = res[2] / meanE;
double sigmaOverE = res[2] / meanE;
// Pass/Fail
// Pass/Fail
@@ -213,8 +214,8 @@ void emcal_barrel_pi0_analysis(const char* input_fname = "sim_output/sim_emcal_b
@@ -213,8 +214,8 @@ void emcal_barrel_pi0_analysis(const char* input_fname = "sim_output/sim_emcal_b
hdE->GetYaxis()->SetTitleOffset(1.4);
hdE->GetYaxis()->SetTitleOffset(1.4);
hdE->SetLineWidth(2);
hdE->SetLineWidth(2);
hdE->SetLineColor(kBlue);
hdE->SetLineColor(kBlue);
hdE->GetFunction("gaus")->SetLineWidth(2);
//hdE->GetFunction("gaus")->SetLineWidth(2);
hdE->GetFunction("gaus")->SetLineColor(kRed);
//hdE->GetFunction("gaus")->SetLineColor(kRed);
hdE->DrawClone();
hdE->DrawClone();
cdE->SaveAs("results/emcal_barrel_pi0_dE.png");
cdE->SaveAs("results/emcal_barrel_pi0_dE.png");
cdE->SaveAs("results/emcal_barrel_pi0_dE.pdf");
cdE->SaveAs("results/emcal_barrel_pi0_dE.pdf");
Loading