From 4b6e424bf66acc4c005aaa07aec2d72f207f78e7 Mon Sep 17 00:00:00 2001
From: Marshall Scott <mbscott@anl.gov>
Date: Mon, 3 May 2021 11:31:53 -0400
Subject: [PATCH] calculates sampling fraction and then uses that to correctly
 calculate the resolution 9

---
 .../barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/benchmarks/barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx b/benchmarks/barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx
index 355e41d1..0e619420 100644
--- a/benchmarks/barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx
+++ b/benchmarks/barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx
@@ -194,8 +194,8 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
   c5->SaveAs("results/emcal_barrel_pions_pid.pdf");
 
   //Energy Resolution Work
-  auto hdE          = d1.Histo1D({"hdE",      "dE; dE[GeV]; Events",              20, -7.5, 7.5}, "dE");//changed from 100
-  auto hdE_rel      = d1.Histo1D({"hdE_rel",  "dE Relative; dE Relative; Events", 20, -2, 2}, "dE_rel");//changed from 100
+  auto hdE          = d2.Histo1D({"hdE",      "dE; dE[GeV]; Events",              20, -7.5, 7.5}, "dE");//changed from 100
+  auto hdE_rel      = d2.Histo1D({"hdE_rel",  "dE Relative; dE Relative; Events", 20, -2, 2}, "dE_rel");//changed from 100
   hdE_rel->Fit("gaus", "", "", -2,  2);
   double* res       = hdE_rel->GetFunction("gaus")->GetParameters();
 
-- 
GitLab