From fb0f0a1d6b3025dc33a18da7f7ad11cf333477ef Mon Sep 17 00:00:00 2001
From: deserevi <deserevi@nptool>
Date: Thu, 17 Feb 2011 15:15:13 +0000
Subject: [PATCH] * Fix bug in scorers    + limit on deposited energy for each
 step is now 0.1 keV instead of 100 keV    + this produced double kinematical
 lines spaced by 100 keV

---
 NPSimulation/include/AnnularS1Scorers.hh     |  7 ++++++
 NPSimulation/include/GaspardScorers.hh       |  5 ++--
 NPSimulation/include/GeneralScorers.hh       |  2 +-
 NPSimulation/include/HydeScorers.hh          |  4 +++-
 NPSimulation/include/W1Scorers.hh            |  3 +++
 NPSimulation/src/AnnularS1.cc                |  2 ++
 NPSimulation/src/AnnularS1Scorers.cc         |  5 ++--
 NPSimulation/src/GaspardScorers.cc           | 24 +++++++++++---------
 NPSimulation/src/GaspardTrackerAnnular.cc    |  2 ++
 NPSimulation/src/GaspardTrackerDummyShape.cc |  2 ++
 NPSimulation/src/GaspardTrackerSquare.cc     |  3 +++
 NPSimulation/src/GaspardTrackerTrapezoid.cc  |  5 +++-
 NPSimulation/src/HydeScorers.cc              | 24 +++++++++++---------
 NPSimulation/src/HydeTrackerAnnular.cc       |  2 ++
 NPSimulation/src/HydeTrackerDummyShape.cc    |  1 +
 NPSimulation/src/HydeTrackerSquare.cc        |  1 +
 NPSimulation/src/HydeTrackerTrapezoid.cc     |  1 +
 NPSimulation/src/W1Scorers.cc                |  6 +++--
 18 files changed, 68 insertions(+), 31 deletions(-)

diff --git a/NPSimulation/include/AnnularS1Scorers.hh b/NPSimulation/include/AnnularS1Scorers.hh
index d689a2c86..bb8b11a0f 100644
--- a/NPSimulation/include/AnnularS1Scorers.hh
+++ b/NPSimulation/include/AnnularS1Scorers.hh
@@ -26,6 +26,12 @@
 #include "G4THitsMap.hh"
 
 
+namespace S1SCORERS
+{
+   // This Threshold is used in all scorers
+   // Any energy deposit under this threshold will not create an entry
+   const double TriggerThreshold = 0.1 * keV;
+
 class AnnularS1ScorerThetaStripNumber : public G4VPrimitiveScorer
 {
 public: // with description
@@ -74,4 +80,5 @@ private:
    G4THitsMap<G4double>* EvtMap;
 };
 
+}
 #endif
diff --git a/NPSimulation/include/GaspardScorers.hh b/NPSimulation/include/GaspardScorers.hh
index 00ea23df1..a21157605 100644
--- a/NPSimulation/include/GaspardScorers.hh
+++ b/NPSimulation/include/GaspardScorers.hh
@@ -27,6 +27,9 @@
 
 namespace GPDSCORERS
 {
+   // This Threshold is used in all scorers
+   // Any energy deposit under this threshold will not create an entry
+   const double TriggerThreshold = 0.1 * keV;
 
 class GPDScorerFirstStageEnergy : public G4VPrimitiveScorer
 {
@@ -294,6 +297,4 @@ private:
 };
 
 }
-
-using namespace GPDSCORERS;
 #endif
diff --git a/NPSimulation/include/GeneralScorers.hh b/NPSimulation/include/GeneralScorers.hh
index 59d77d7f0..57e01667f 100644
--- a/NPSimulation/include/GeneralScorers.hh
+++ b/NPSimulation/include/GeneralScorers.hh
@@ -31,7 +31,7 @@ namespace GENERALSCORERS
    {
          //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
          //   This Threshold is used in the above scorer. Any energy deposit under this threshold will not create an entry.
-         const double TriggerThreshold = 100*keV ;
+         const double TriggerThreshold = 0.1*keV ;
 
          //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
          //   The following function is used in many scorer. following the Detector Volume Nomenclature
diff --git a/NPSimulation/include/HydeScorers.hh b/NPSimulation/include/HydeScorers.hh
index 5246d3f6b..8535d2085 100644
--- a/NPSimulation/include/HydeScorers.hh
+++ b/NPSimulation/include/HydeScorers.hh
@@ -27,6 +27,9 @@
 
 namespace HYDSCORERS
 {
+   // This Threshold is used in all scorers
+   // Any energy deposit under this threshold will not create an entry
+   const double TriggerThreshold = 0.1 * keV;
 
 class HYDScorerFirstStageEnergy : public G4VPrimitiveScorer
 {
@@ -295,5 +298,4 @@ private:
 
 }
 
-using namespace HYDSCORERS;
 #endif
diff --git a/NPSimulation/include/W1Scorers.hh b/NPSimulation/include/W1Scorers.hh
index 564dc95ac..e5fb885c9 100644
--- a/NPSimulation/include/W1Scorers.hh
+++ b/NPSimulation/include/W1Scorers.hh
@@ -27,6 +27,9 @@
 
 namespace W1SCORERS
 {
+   // This Threshold is used in all scorers
+   // Any energy deposit under this threshold will not create an entry
+   const double TriggerThreshold = 0.1 * keV;
 
 class W1ScorerFrontStripNumber : public G4VPrimitiveScorer
 {
diff --git a/NPSimulation/src/AnnularS1.cc b/NPSimulation/src/AnnularS1.cc
index 40bf715b3..8438bba6e 100644
--- a/NPSimulation/src/AnnularS1.cc
+++ b/NPSimulation/src/AnnularS1.cc
@@ -56,7 +56,9 @@
 
 using namespace std;
 using namespace CLHEP;
+
 using namespace ANNULARS1;
+using namespace S1SCORERS;
 
 
 
diff --git a/NPSimulation/src/AnnularS1Scorers.cc b/NPSimulation/src/AnnularS1Scorers.cc
index c8a03e3b7..aaa7192c9 100644
--- a/NPSimulation/src/AnnularS1Scorers.cc
+++ b/NPSimulation/src/AnnularS1Scorers.cc
@@ -25,6 +25,7 @@
 #include "AnnularS1.hh"
 
 using namespace ANNULARS1;
+using namespace S1SCORERS;
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -84,7 +85,7 @@ G4bool AnnularS1ScorerThetaStripNumber::ProcessHits(G4Step* aStep, G4TouchableHi
    }
 
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index =  aStep->GetTrack()->GetTrackID();
    EvtMap->set(DetNbr + index, ThetaStripNumber);
    return TRUE;
@@ -156,7 +157,7 @@ G4bool AnnularS1ScorerPhiStripNumber::ProcessHits(G4Step* aStep, G4TouchableHist
 //   G4cout << "phi " << phi << " PhiWidth  " << PhiWidth << "  PhiStripNumber " << PhiStripNumber << G4endl;
 
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index =  aStep->GetTrack()->GetTrackID();
    EvtMap->set(DetNbr + index, PhiStripNumber);
    return TRUE;
diff --git a/NPSimulation/src/GaspardScorers.cc b/NPSimulation/src/GaspardScorers.cc
index cb5c4a575..4c999f0be 100644
--- a/NPSimulation/src/GaspardScorers.cc
+++ b/NPSimulation/src/GaspardScorers.cc
@@ -35,6 +35,8 @@ using namespace GPDTRAP;
 using namespace GPDANNULAR;
 using namespace GPDDUMMYSHAPE;
 
+using namespace GPDSCORERS;
+
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 // Added by Adrien MATTA:
@@ -65,7 +67,7 @@ G4bool GPDScorerFirstStageEnergy::ProcessHits(G4Step* aStep, G4TouchableHistory*
    POS = aStep->GetPreStepPoint()->GetTouchableHandle()->GetHistory()->GetTopTransform().TransformPoint(POS);
 
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index = aStep->GetTrack()->GetTrackID();
    EvtMap->add(DetNbr + index, edep);
    return TRUE;
@@ -130,7 +132,7 @@ G4bool GPDScorerSecondStageEnergy::ProcessHits(G4Step* aStep, G4TouchableHistory
    POS = aStep->GetPreStepPoint()->GetTouchableHandle()->GetHistory()->GetTopTransform().TransformPoint(POS);
 
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index = aStep->GetTrack()->GetTrackID();
    EvtMap->add(DetNbr + index, edep);
    return TRUE;
@@ -195,7 +197,7 @@ G4bool GPDScorerThirdStageEnergy::ProcessHits(G4Step* aStep, G4TouchableHistory*
    POS = aStep->GetPreStepPoint()->GetTouchableHandle()->GetHistory()->GetTopTransform().TransformPoint(POS);
 
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index = aStep->GetTrack()->GetTrackID();
    EvtMap->add(DetNbr + index, edep);
    return TRUE;
@@ -271,7 +273,7 @@ G4bool GPDScorerFirstStageFrontStripDummyShape::ProcessHits(G4Step* aStep, G4Tou
    //Rare case where particle is close to edge of silicon plan
    if (X == m_NumberOfStrip+1) X = m_NumberOfStrip;
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index =  aStep->GetTrack()->GetTrackID();
    EvtMap->set(DetNbr + index, X);
    return TRUE;
@@ -338,7 +340,7 @@ G4bool GPDScorerFirstStageBackStripDummyShape::ProcessHits(G4Step* aStep, G4Touc
    //Rare case where particle is close to edge of silicon plan
    if (X == m_NumberOfStrip+1) X = m_NumberOfStrip;
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index =  aStep->GetTrack()->GetTrackID();
    EvtMap->set(DetNbr + index, X);
    return TRUE;
@@ -403,7 +405,7 @@ G4bool GPDScorerFirstStageFrontStripSquare::ProcessHits(G4Step* aStep, G4Touchab
    //Rare case where particle is close to edge of silicon plan
    if (X == 129) X = 128;
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index =  aStep->GetTrack()->GetTrackID();
    EvtMap->set(DetNbr + index, X);
    return TRUE;
@@ -469,7 +471,7 @@ G4bool GPDScorerFirstStageBackStripSquare::ProcessHits(G4Step* aStep, G4Touchabl
    if (Y == 129) Y = 128;
 
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index =  aStep->GetTrack()->GetTrackID();
    EvtMap->set(DetNbr + index, Y);
    return TRUE;
@@ -533,7 +535,7 @@ G4bool GPDScorerFirstStageFrontStripTrapezoid::ProcessHits(G4Step* aStep, G4Touc
    //Rare case where particle is close to edge of silicon plan
    if (X == 129) X = 128;
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index =  aStep->GetTrack()->GetTrackID();
    EvtMap->set(DetNbr + index, X);
    return TRUE;
@@ -599,7 +601,7 @@ G4bool GPDScorerFirstStageBackStripTrapezoid::ProcessHits(G4Step* aStep, G4Touch
    if (Y == 129) Y = 128;
 
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index =  aStep->GetTrack()->GetTrackID();
    EvtMap->set(DetNbr + index, Y);
    return TRUE;
@@ -694,7 +696,7 @@ G4bool GPDScorerFirstStageFrontStripAnnular::ProcessHits(G4Step* aStep, G4Toucha
    }
 
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index =  aStep->GetTrack()->GetTrackID();
    EvtMap->set(DetNbr + index, ThetaStripNumber);
 
@@ -769,7 +771,7 @@ G4bool GPDScorerFirstStageBackStripAnnular::ProcessHits(G4Step* aStep, G4Touchab
 //   G4cout << "phi " << phi << " PhiWidth  " << PhiWidth << "  PhiStripNumber " << PhiStripNumber << G4endl;
 
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index =  aStep->GetTrack()->GetTrackID();
    EvtMap->set(DetNbr + index, PhiStripNumber);
 
diff --git a/NPSimulation/src/GaspardTrackerAnnular.cc b/NPSimulation/src/GaspardTrackerAnnular.cc
index 8b51e0d42..bfb9d1fd0 100644
--- a/NPSimulation/src/GaspardTrackerAnnular.cc
+++ b/NPSimulation/src/GaspardTrackerAnnular.cc
@@ -58,7 +58,9 @@
 
 using namespace std;
 using namespace CLHEP;
+
 using namespace GPDANNULAR;
+using namespace GPDSCORERS;
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 GaspardTrackerAnnular::GaspardTrackerAnnular()
diff --git a/NPSimulation/src/GaspardTrackerDummyShape.cc b/NPSimulation/src/GaspardTrackerDummyShape.cc
index 753c3f58c..0d23de36a 100644
--- a/NPSimulation/src/GaspardTrackerDummyShape.cc
+++ b/NPSimulation/src/GaspardTrackerDummyShape.cc
@@ -62,7 +62,9 @@
 
 using namespace std;
 using namespace CLHEP;
+
 using namespace GPDDUMMYSHAPE;
+using namespace GPDSCORERS;
 
 
 
diff --git a/NPSimulation/src/GaspardTrackerSquare.cc b/NPSimulation/src/GaspardTrackerSquare.cc
index c6b0e9f64..9c2dce6f1 100644
--- a/NPSimulation/src/GaspardTrackerSquare.cc
+++ b/NPSimulation/src/GaspardTrackerSquare.cc
@@ -61,7 +61,10 @@
 
 using namespace std;
 using namespace CLHEP;
+
 using namespace GPDSQUARE;
+using namespace GPDSCORERS;
+
 
 
 
diff --git a/NPSimulation/src/GaspardTrackerTrapezoid.cc b/NPSimulation/src/GaspardTrackerTrapezoid.cc
index 28b384ce2..5381eb2ab 100644
--- a/NPSimulation/src/GaspardTrackerTrapezoid.cc
+++ b/NPSimulation/src/GaspardTrackerTrapezoid.cc
@@ -57,7 +57,10 @@
 
 using namespace std;
 using namespace CLHEP;
-using namespace GPDTRAP ;
+
+using namespace GPDTRAP;
+using namespace GPDSCORERS;
+
 
 
 
diff --git a/NPSimulation/src/HydeScorers.cc b/NPSimulation/src/HydeScorers.cc
index 5d84ed438..d75809cb9 100644
--- a/NPSimulation/src/HydeScorers.cc
+++ b/NPSimulation/src/HydeScorers.cc
@@ -35,6 +35,8 @@ using namespace HYDTRAP;
 using namespace HYDANNULAR;
 using namespace HYDDUMMYSHAPE;
 
+using namespace HYDSCORERS;
+
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 // Added by Adrien MATTA:
@@ -65,7 +67,7 @@ G4bool HYDScorerFirstStageEnergy::ProcessHits(G4Step* aStep, G4TouchableHistory*
    POS = aStep->GetPreStepPoint()->GetTouchableHandle()->GetHistory()->GetTopTransform().TransformPoint(POS);
 
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index = aStep->GetTrack()->GetTrackID();
    EvtMap->add(DetNbr + index, edep);
    return TRUE;
@@ -130,7 +132,7 @@ G4bool HYDScorerSecondStageEnergy::ProcessHits(G4Step* aStep, G4TouchableHistory
    POS = aStep->GetPreStepPoint()->GetTouchableHandle()->GetHistory()->GetTopTransform().TransformPoint(POS);
 
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index = aStep->GetTrack()->GetTrackID();
    EvtMap->add(DetNbr + index, edep);
    return TRUE;
@@ -195,7 +197,7 @@ G4bool HYDScorerThirdStageEnergy::ProcessHits(G4Step* aStep, G4TouchableHistory*
    POS = aStep->GetPreStepPoint()->GetTouchableHandle()->GetHistory()->GetTopTransform().TransformPoint(POS);
 
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index = aStep->GetTrack()->GetTrackID();
    EvtMap->add(DetNbr + index, edep);
    return TRUE;
@@ -268,7 +270,7 @@ G4bool HYDScorerFirstStageFrontStripDummyShape::ProcessHits(G4Step* aStep, G4Tou
    //Rare case where particle is close to edge of silicon plan
    if (X == m_NumberOfStrip+1) X = m_NumberOfStrip;
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index =  aStep->GetTrack()->GetTrackID();
    EvtMap->set(DetNbr + index, X);
    return TRUE;
@@ -333,7 +335,7 @@ G4bool HYDScorerFirstStageBackStripDummyShape::ProcessHits(G4Step* aStep, G4Touc
    //Rare case where particle is close to edge of silicon plan
    if (X == m_NumberOfStrip+1) X = m_NumberOfStrip;
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index =  aStep->GetTrack()->GetTrackID();
    EvtMap->set(DetNbr + index, X);
    return TRUE;
@@ -398,7 +400,7 @@ G4bool HYDScorerFirstStageFrontStripSquare::ProcessHits(G4Step* aStep, G4Touchab
    //Rare case where particle is close to edge of silicon plan
    if (X == 129) X = 128;
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index =  aStep->GetTrack()->GetTrackID();
    EvtMap->set(DetNbr + index, X);
    return TRUE;
@@ -464,7 +466,7 @@ G4bool HYDScorerFirstStageBackStripSquare::ProcessHits(G4Step* aStep, G4Touchabl
    if (Y == 129) Y = 128;
 
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index =  aStep->GetTrack()->GetTrackID();
    EvtMap->set(DetNbr + index, Y);
    return TRUE;
@@ -528,7 +530,7 @@ G4bool HYDScorerFirstStageFrontStripTrapezoid::ProcessHits(G4Step* aStep, G4Touc
    //Rare case where particle is close to edge of silicon plan
    if (X == 129) X = 128;
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index =  aStep->GetTrack()->GetTrackID();
    EvtMap->set(DetNbr + index, X);
    return TRUE;
@@ -594,7 +596,7 @@ G4bool HYDScorerFirstStageBackStripTrapezoid::ProcessHits(G4Step* aStep, G4Touch
    if (Y == 129) Y = 128;
 
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index =  aStep->GetTrack()->GetTrackID();
    EvtMap->set(DetNbr + index, Y);
    return TRUE;
@@ -659,7 +661,7 @@ G4bool HYDScorerFirstStageFrontStripAnnular::ProcessHits(G4Step* aStep, G4Toucha
    //Rare case where particle is close to edge of silicon plan
    if (X == 129) X = 128;
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index =  aStep->GetTrack()->GetTrackID();
    EvtMap->set(DetNbr + index, X);
    return TRUE;
@@ -726,7 +728,7 @@ G4bool HYDScorerFirstStageBackStripAnnular::ProcessHits(G4Step* aStep, G4Touchab
    if (Y == 129) Y = 128;
 
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index =  aStep->GetTrack()->GetTrackID();
    EvtMap->set(DetNbr + index, Y);
    return TRUE;
diff --git a/NPSimulation/src/HydeTrackerAnnular.cc b/NPSimulation/src/HydeTrackerAnnular.cc
index 90e24deb8..6982d3439 100644
--- a/NPSimulation/src/HydeTrackerAnnular.cc
+++ b/NPSimulation/src/HydeTrackerAnnular.cc
@@ -58,6 +58,8 @@ using namespace std;
 using namespace CLHEP;
 using namespace HYDANNULAR;
 
+using namespace HYDSCORERS;
+
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 HydeTrackerAnnular::HydeTrackerAnnular()
 {
diff --git a/NPSimulation/src/HydeTrackerDummyShape.cc b/NPSimulation/src/HydeTrackerDummyShape.cc
index c7bc92367..23053cd95 100644
--- a/NPSimulation/src/HydeTrackerDummyShape.cc
+++ b/NPSimulation/src/HydeTrackerDummyShape.cc
@@ -62,6 +62,7 @@ using namespace std;
 using namespace CLHEP;
 using namespace HYDDUMMYSHAPE;
 
+using namespace HYDSCORERS;
 
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
diff --git a/NPSimulation/src/HydeTrackerSquare.cc b/NPSimulation/src/HydeTrackerSquare.cc
index 18a7ee81a..a544b1065 100644
--- a/NPSimulation/src/HydeTrackerSquare.cc
+++ b/NPSimulation/src/HydeTrackerSquare.cc
@@ -61,6 +61,7 @@ using namespace std;
 using namespace CLHEP;
 using namespace HYDSQUARE;
 
+using namespace HYDSCORERS;
 
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
diff --git a/NPSimulation/src/HydeTrackerTrapezoid.cc b/NPSimulation/src/HydeTrackerTrapezoid.cc
index 11a8f0363..6f2bb950d 100644
--- a/NPSimulation/src/HydeTrackerTrapezoid.cc
+++ b/NPSimulation/src/HydeTrackerTrapezoid.cc
@@ -57,6 +57,7 @@ using namespace std;
 using namespace CLHEP;
 using namespace HYDTRAP ;
 
+using namespace HYDSCORERS;
 
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
diff --git a/NPSimulation/src/W1Scorers.cc b/NPSimulation/src/W1Scorers.cc
index 5d4d0fd13..6dffec568 100644
--- a/NPSimulation/src/W1Scorers.cc
+++ b/NPSimulation/src/W1Scorers.cc
@@ -29,6 +29,8 @@
 #include "W1.hh"
 using namespace W1SQUARE;
 
+using namespace W1SCORERS;
+
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 // Added by Adrien MATTA:
@@ -69,7 +71,7 @@ G4bool W1ScorerFrontStripNumber::ProcessHits(G4Step* aStep, G4TouchableHistory*)
    //Rare case where particle is close to edge of silicon plan
    if (X == m_NumberOfStrip+1) X = m_NumberOfStrip;
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index =  aStep->GetTrack()->GetTrackID();
    EvtMap->set(DetNbr + index, X);
    return TRUE;
@@ -136,7 +138,7 @@ G4bool W1ScorerBackStripNumber::ProcessHits(G4Step* aStep, G4TouchableHistory*)
    //Rare case where particle is close to edge of silicon plan
    if (X == m_NumberOfStrip+1) X = m_NumberOfStrip;
    G4double edep = aStep->GetTotalEnergyDeposit();
-   if (edep < 100*keV) return FALSE;
+   if (edep < TriggerThreshold) return FALSE;
    G4int  index =  aStep->GetTrack()->GetTrackID();
    EvtMap->set(DetNbr + index, X);
    return TRUE;
-- 
GitLab