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

---
 benchmarks/barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/benchmarks/barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx b/benchmarks/barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx
index 1f8c1a9e..ad9d6dee 100644
--- a/benchmarks/barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx
+++ b/benchmarks/barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx
@@ -126,7 +126,7 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
               .Define("pid",    getpid,     {"mcparticles"})
               ;
   // Set sampling Fraction, ideally this will be taken from a json file 
-  samp_frac = &d1.Mean<double>("fsam");
+  samp_frac = *d1.Mean<double>("fsam");
 
   auto d2 = d1.Define("dE",     eResol,     {"Esim","Ethr"})
               .Define("dE_rel", eResol_rel, {"Esim","Ethr"})
-- 
GitLab