From bb32ac8a04df714906233ed9009c94b72fa5904d Mon Sep 17 00:00:00 2001
From: adrien matta <matta@lpccaen.in2p3.fr>
Date: Fri, 3 May 2019 17:36:48 +0200
Subject: [PATCH] * Fixing another bug in interstrip managing in MUST2

---
 NPSimulation/Detectors/MUST2/MUST2Array.cc | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/NPSimulation/Detectors/MUST2/MUST2Array.cc b/NPSimulation/Detectors/MUST2/MUST2Array.cc
index 044fc7cfe..4ed625db8 100644
--- a/NPSimulation/Detectors/MUST2/MUST2Array.cc
+++ b/NPSimulation/Detectors/MUST2/MUST2Array.cc
@@ -845,24 +845,17 @@ void MUST2Array::ReadSensitive(const G4Event*) {
       double rand = G4UniformRand();
       if (rand > 0.5) {
         double energyX = rand * energy;
-        if (energyX > ThresholdSi) {
-          trig.insert(detectorNbr);
-
           mapFront[b+detectorNbr*1e6].first+=energyX;
           mapFront[b+detectorNbr*1e6].second=time;
         }
-      } 
 
       else {
-        double energyX = (1 - rand) * energy;
-        if (energyX > ThresholdSi) {
-          trig.insert(detectorNbr);
-          mapFront[b+detectorNbr*1e6].first+=energyX;
-          mapFront[b+detectorNbr*1e6].second=time;
+          double energyX = (1 - rand) * energy;
+          mapFront[g+detectorNbr*1e6].first+=energyX;
+          mapFront[g+detectorNbr*1e6].second=time;
         }
       }
     }
-  }
 
   for(it=mapFront.begin();it!=mapFront.end();it++){
     double energyX = RandGauss::shoot(it->second.first, ResoStrip);
@@ -907,8 +900,8 @@ void MUST2Array::ReadSensitive(const G4Event*) {
           mapBack[b+detectorNbr*1e6].second=time;
 
         double energyY2 = (1 - rand) * energy;
-        mapBack[b+detectorNbr*1e6].first+=energyY2;
-        mapBack[b+detectorNbr*1e6].second=time;
+        mapBack[g+detectorNbr*1e6].first+=energyY2;
+        mapBack[g+detectorNbr*1e6].second=time;
         }
       }
 
-- 
GitLab