Skip to content
Snippets Groups Projects
Commit c7754e2f authored by Marshall Scott's avatar Marshall Scott
Browse files

Fixed naming

parent 1ab462cf
No related branches found
No related tags found
1 merge request!24Resolve "pi0 resolution for ECal barrel"
This commit is part of merge request !24. Comments created here will be created in the context of that merge request.
......@@ -97,7 +97,6 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
auto hEsim = d1.Histo1D({"hEsim", "Energy Deposit; Energy Deposit [GeV]; Events", 100, 0.0, 1.0}, "Esim");
auto hfsam = d1.Histo1D({"hfsam", "Sampling Fraction; Sampling Fraction; Events", 100, 0.0, 0.1}, "fsam");
// Event Counts
auto nevents_thrown = d1.Count();
std::cout << "Number of Thrown Events: " << (*nevents_thrown) << "\n";
......@@ -147,12 +146,15 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
auto hdE_rel = d1.Histo1D({"hdE_rel", "dE Relative; dE Relative; Events", 100, -7.5, 7.5}, "dE_rel");
auto f1 = hdE_rel->Fit("gaus", "S");
const double* res = f1->GetParams();
//Pass/Fail
if (res[2] <= resolutionTarget) {
pion0_energy_resolution.pass(res[2]);
} else {
pion0_energy_resolution.fail(res[2]);
}
//Energy Resolution Histogram Plotting
auto *cdE = new TCanvas("cdE", "cdE", 700, 500);
cDE->SetLogy(1);
hdE->GetYaxis()->SetTitleOffset(1.4);
......@@ -163,7 +165,6 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
cdE->SaveAs("results/emcal_barrel_pi0_dE.pdf");
auto *cdE_rel = new TCanvas("cdE_rel", "cdE_rel", 700, 500);
cdE_rel->SetLogy(1);
hdE_rel->GetYaxis()->SetTitleOffset(1.4);
hdE_rel->SetLineWidth(2);
hdE_rel->SetLineColor(kBlue);
......@@ -174,7 +175,7 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
cdE_rel->SaveAs("results/emcal_barrel_pi0_dE_rel.png");
cdE_rel->SaveAs("results/emcal_barrel_pi0_dE_rel.pdf");
eic::util::write_test({pion0_Energy_resolution}, fmt::format("{}_pions.json", detector));
eic::util::write_test({pion0_energy_resolution}, fmt::format("{}_pions.json", detector));
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment