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

---
 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 dc7fe0fb..a49ca514 100644
--- a/benchmarks/barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx
+++ b/benchmarks/barrel_ecal/scripts/emcal_barrel_pions_analysis.cxx
@@ -127,7 +127,7 @@ void emcal_barrel_pions_analysis(const char* input_fname = "sim_output/sim_emcal
               ;
   // Set sampling Fraction, ideally this will be taken from a json file 
   auto svec = d1.Mean<double>("fsam");
-  for (auto ele : svec){cout << ele << endl;}
+  for (auto &ele : svec){cout << ele << endl;}
 
   auto d2 = d1.Define("dE",     eResol,     {"Esim","Ethr"})
               .Define("dE_rel", eResol_rel, {"Esim","Ethr"})
-- 
GitLab