From 205e63acbf2d94c621e210f9d07b1a7da94425af Mon Sep 17 00:00:00 2001
From: Efe Yigitbasi <eyigitba@cern.ch>
Date: Mon, 4 Sep 2017 16:17:26 +0200
Subject: [PATCH] Fixed a bug in FastCaloSimParamAction which prevented us from
 using values for maxRadiusLAr threshold other than 1mm.

---
 .../ISF_Geant4UserActions/src/FastCaloSimParamAction.cxx    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/FastCaloSimParamAction.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/FastCaloSimParamAction.cxx
index 3a45fbae591..1137d8a76de 100755
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/FastCaloSimParamAction.cxx
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/FastCaloSimParamAction.cxx
@@ -710,8 +710,8 @@ void FastCaloSimParamAction::update_map(const CLHEP::Hep3Vector & l_vec, const I
 
       // Overall merging scheme
       if (layer >= CaloCell_ID::PreSamplerB && layer <= CaloCell_ID::EME3){
-        // Customized merging scheme for LAr barrel and endcap, use only if we're not doing 1mm merging
-        if(m_config.m_maxRadiusLAr != 1){
+        // Customized merging scheme for LAr barrel and endcap, use only if we're not changing maxRadiusLAr value
+        if(m_config.m_maxRadiusLAr == 25){
           if (layer==CaloCell_ID::PreSamplerB || layer==CaloCell_ID::PreSamplerE){
             // PS default is 1mm in eta, 5mm in phi, no cut in r
             if (delta_r >= m_config.m_maxrPS) continue;
@@ -733,7 +733,7 @@ void FastCaloSimParamAction::update_map(const CLHEP::Hep3Vector & l_vec, const I
             if (delta_eta >= m_config.m_maxEtaEM3) continue;
             if (delta_phi >= m_config.m_maxPhiEM3) continue;
           }
-        } else{ // 1mm merging scheme
+        } else{ // Merging schemes done by changing maxRadiusLAr
             if ( hit_diff2 >= m_config.m_maxRadiusLAr ) continue;
         }
       } else if (layer >= CaloCell_ID::HEC0  && layer <= CaloCell_ID::HEC3){
-- 
GitLab