From e7ebde1a83b0d7149355f888a3c7e837e3cf186b Mon Sep 17 00:00:00 2001 From: Radia Oudihat Date: Tue, 27 Aug 2024 11:40:29 +0200 Subject: [PATCH 1/6] - Added a check based on the global positions of events to filter out invalid coincidences. - Implemented a new condition to check the difference in Z to reject coincidences. - Rejected coincidences if they do not meet the distance and angle criteria --- .../include/GateCoincidenceSorter.hh | 9 ++++- .../include/GateCoincidenceSorterMessenger.hh | 2 + .../digits_hits/src/GateCoincidenceSorter.cc | 39 ++++++++++++++++++- .../src/GateCoincidenceSorterMessenger.cc | 16 ++++++++ 4 files changed, 63 insertions(+), 3 deletions(-) diff --git a/source/digits_hits/include/GateCoincidenceSorter.hh b/source/digits_hits/include/GateCoincidenceSorter.hh index f6762c95e..abdc43027 100644 --- a/source/digits_hits/include/GateCoincidenceSorter.hh +++ b/source/digits_hits/include/GateCoincidenceSorter.hh @@ -170,6 +170,12 @@ public: void SetAcceptancePolicy4CC(const G4String& policy); + G4double GetMaxS() const {return m_maxS;} + G4double GetMaxDeltaZ() const {return m_maxDeltaZ;} + + //! Set the GeometrySelector + void SetMaxS(G4double val) { m_maxS = val;} + void SetMaxDeltaZ(G4double val) { m_maxDeltaZ = val;} @@ -190,7 +196,8 @@ protected: acceptance_policy_4CC_t m_acceptance_policy_4CC; //! refused\n"; return true; } + G4ThreeVector globalPos1 = digi1->GetGlobalPos(); + G4ThreeVector globalPos2 = digi2->GetGlobalPos(); - return false; - } + // Vérification de la différence en Z entre les deux positions + if ((m_maxDeltaZ > 0) && (fabs(globalPos2.z() - globalPos1.z()) > m_maxDeltaZ)) { + if (nVerboseLevel > 1) + G4cout << "[GateCoincidenceSorter::IsForbiddenCoincidence]: difference in Z too large --> refused\n"; + return true; + } + + // Calcul du dénominateur pour la distance 's' dans le plan XY + G4double denom = (globalPos1.y() - globalPos2.y()) * (globalPos1.y() - globalPos2.y()) + + (globalPos2.x() - globalPos1.x()) * (globalPos2.x() - globalPos1.x()); + + G4double s = 0.0; + if (denom != 0.0) { + denom = sqrt(denom); + s = (globalPos1.x() * (globalPos1.y() - globalPos2.y()) + + globalPos1.y() * (globalPos2.x() - globalPos1.x())) / denom; + } + // Calcul de l'angle theta dans le plan XY + G4double theta = atan2(globalPos1.x() - globalPos2.x(), globalPos1.y() - globalPos2.y()); + if (theta < 0.0) { + theta += pi; // Ajuste theta pour qu'il soit dans l'intervalle [0, pi] + s = -s; // Inverse la distance s si l'angle est ajusté + } + + // Vérification de la distance 's' par rapport au seuil maximal + if ((m_maxS > 0) && (fabs(s) > m_maxS)) { + if (nVerboseLevel > 1) + G4cout << "[GateCoincidenceSorter::IsForbiddenCoincidence]: distance s too large --> refused\n"; + return true; + } + + return false; + } } //------------------------------------------------------------------------------------------------------ diff --git a/source/digits_hits/src/GateCoincidenceSorterMessenger.cc b/source/digits_hits/src/GateCoincidenceSorterMessenger.cc index 0ce249a91..980b26399 100644 --- a/source/digits_hits/src/GateCoincidenceSorterMessenger.cc +++ b/source/digits_hits/src/GateCoincidenceSorterMessenger.cc @@ -53,6 +53,16 @@ GateCoincidenceSorterMessenger::GateCoincidenceSorterMessenger(GateCoincidenceSo minSectorDiffCmd->SetParameterName("diff",false); minSectorDiffCmd->SetRange("diff>=1"); + cmdName = GetDirectoryName() + "setSMax"; + maxSCmd= new G4UIcmdWithADoubleAndUnit(cmdName,this); + maxSCmd->SetGuidance("Set max S value accepted (<0 --> all is accepted)"); + maxSCmd->SetUnitCategory("Length"); + + cmdName = GetDirectoryName() + "setDeltaZMax"; + maxDeltaZCmd= new G4UIcmdWithADoubleAndUnit(cmdName,this); + maxDeltaZCmd->SetGuidance("Set max delta Z value accepted (<0 --> all is accepted)"); + maxDeltaZCmd->SetUnitCategory("Length"); + cmdName = GetDirectoryName()+"forceMinSecDifferenceToZero"; forceMinSectorDiffCmd = new G4UIcmdWithABool(cmdName,this); forceMinSectorDiffCmd->SetGuidance("Force the minimum sector difference for valid coincidences to 0: specsific case for prototype testbench simulations."); @@ -118,6 +128,8 @@ GateCoincidenceSorterMessenger::~GateCoincidenceSorterMessenger() delete SetAcceptancePolicy4CCCmd; delete SetEventIDCoincCmd; delete forceMinSectorDiffCmd; + delete maxSCmd; + delete maxDeltaZCmd; } @@ -135,6 +147,10 @@ void GateCoincidenceSorterMessenger::SetNewValue(G4UIcommand* aCommand, G4String { m_CoincidenceSorter->SetForcedTo0MinSectorDifference(forceMinSectorDiffCmd->GetNewBoolValue(newValue)); } else if( aCommand == minSectorDiffCmd ) { m_CoincidenceSorter->SetMinSectorDifference(minSectorDiffCmd->GetNewIntValue(newValue)); } + else if (aCommand==maxSCmd) + m_CoincidenceSorter->SetMaxS(maxSCmd->GetNewDoubleValue(newValue)); + else if (aCommand==maxDeltaZCmd) + m_CoincidenceSorter->SetMaxDeltaZ(maxDeltaZCmd->GetNewDoubleValue(newValue)); else if( aCommand == setDepthCmd ) { m_CoincidenceSorter->SetDepth(setDepthCmd->GetNewIntValue(newValue)); } else if( aCommand == setPresortBufferSizeCmd ) From 423f9e60643bffe9da96fab247d54b72707c62a6 Mon Sep 17 00:00:00 2001 From: Radia Oudihat Date: Tue, 27 Aug 2024 11:42:52 +0200 Subject: [PATCH 2/6] - Added a check based on the global positions of events to filter out invalid coincidences. - Implemented a new condition to check the difference in Z to reject coincidences. - Rejected coincidences if they do not meet the distance and angle criteria --- .../digits_hits/src/GateCoincidenceSorter.cc | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/source/digits_hits/src/GateCoincidenceSorter.cc b/source/digits_hits/src/GateCoincidenceSorter.cc index 164956dc0..adb2747e8 100644 --- a/source/digits_hits/src/GateCoincidenceSorter.cc +++ b/source/digits_hits/src/GateCoincidenceSorter.cc @@ -749,42 +749,42 @@ G4bool GateCoincidenceSorter::IsForbiddenCoincidence(const GateDigi* digi1, cons G4cout << "[GateCoincidenceSorter::IsForbiddenCoincidence]: coincidence between neighbour blocks --> refused\n"; return true; } - G4ThreeVector globalPos1 = digi1->GetGlobalPos(); - G4ThreeVector globalPos2 = digi2->GetGlobalPos(); + G4ThreeVector globalPos1 = digi1->GetGlobalPos(); + G4ThreeVector globalPos2 = digi2->GetGlobalPos(); - // Vérification de la différence en Z entre les deux positions - if ((m_maxDeltaZ > 0) && (fabs(globalPos2.z() - globalPos1.z()) > m_maxDeltaZ)) { - if (nVerboseLevel > 1) - G4cout << "[GateCoincidenceSorter::IsForbiddenCoincidence]: difference in Z too large --> refused\n"; - return true; - } + // Check the difference in Z between the two positions + if ((m_maxDeltaZ > 0) && (fabs(globalPos2.z() - globalPos1.z()) > m_maxDeltaZ)) { + if (nVerboseLevel > 1) + G4cout << "[GateCoincidenceSorter::IsForbiddenCoincidence]: difference in Z too large --> refused\n"; + return true; + } - // Calcul du dénominateur pour la distance 's' dans le plan XY - G4double denom = (globalPos1.y() - globalPos2.y()) * (globalPos1.y() - globalPos2.y()) + - (globalPos2.x() - globalPos1.x()) * (globalPos2.x() - globalPos1.x()); + // Calculate the denominator for distance 's' in the XY plane + G4double denom = (globalPos1.y() - globalPos2.y()) * (globalPos1.y() - globalPos2.y()) + + (globalPos2.x() - globalPos1.x()) * (globalPos2.x() - globalPos1.x()); - G4double s = 0.0; - if (denom != 0.0) { - denom = sqrt(denom); - s = (globalPos1.x() * (globalPos1.y() - globalPos2.y()) + - globalPos1.y() * (globalPos2.x() - globalPos1.x())) / denom; - } + G4double s = 0.0; + if (denom != 0.0) { + denom = sqrt(denom); + s = (globalPos1.x() * (globalPos1.y() - globalPos2.y()) + + globalPos1.y() * (globalPos2.x() - globalPos1.x())) / denom; + } - // Calcul de l'angle theta dans le plan XY - G4double theta = atan2(globalPos1.x() - globalPos2.x(), globalPos1.y() - globalPos2.y()); - if (theta < 0.0) { - theta += pi; // Ajuste theta pour qu'il soit dans l'intervalle [0, pi] - s = -s; // Inverse la distance s si l'angle est ajusté - } + // Calculate the angle theta in the XY plane + G4double theta = atan2(globalPos1.x() - globalPos2.x(), globalPos1.y() - globalPos2.y()); + if (theta < 0.0) { + theta += pi; // Adjust theta to be in the range [0, pi] + s = -s; // Invert the distance s if the angle is adjusted + } - // Vérification de la distance 's' par rapport au seuil maximal - if ((m_maxS > 0) && (fabs(s) > m_maxS)) { - if (nVerboseLevel > 1) - G4cout << "[GateCoincidenceSorter::IsForbiddenCoincidence]: distance s too large --> refused\n"; - return true; - } + // Check the distance 's' against the maximum threshold + if ((m_maxS > 0) && (fabs(s) > m_maxS)) { + if (nVerboseLevel > 1) + G4cout << "[GateCoincidenceSorter::IsForbiddenCoincidence]: distance s too large --> refused\n"; + return true; + } - return false; + return false; } } //------------------------------------------------------------------------------------------------------ From 59d3037222c3c65466c9b97cd08d90ee1ed4f0f5 Mon Sep 17 00:00:00 2001 From: Radia Oudihat Date: Tue, 3 Sep 2024 14:13:58 +0200 Subject: [PATCH 3/6] modification:delete GateCoincidenceGeometrySelector --- .../GateCoincidenceGeometrySelector.hh | 67 ------------- ...ateCoincidenceGeometrySelectorMessenger.hh | 35 ------- .../include/GateCoincidenceSorter.hh | 6 +- .../include/GateCoincidenceSorterMessenger.hh | 2 +- .../src/GateCoincidenceGeometrySelector.cc | 98 ------------------- ...ateCoincidenceGeometrySelectorMessenger.cc | 49 ---------- .../digits_hits/src/GateCoincidenceSorter.cc | 10 +- .../src/GateCoincidenceSorterMessenger.cc | 14 +-- 8 files changed, 13 insertions(+), 268 deletions(-) delete mode 100644 source/digits_hits/include/GateCoincidenceGeometrySelector.hh delete mode 100644 source/digits_hits/include/GateCoincidenceGeometrySelectorMessenger.hh delete mode 100644 source/digits_hits/src/GateCoincidenceGeometrySelector.cc delete mode 100644 source/digits_hits/src/GateCoincidenceGeometrySelectorMessenger.cc diff --git a/source/digits_hits/include/GateCoincidenceGeometrySelector.hh b/source/digits_hits/include/GateCoincidenceGeometrySelector.hh deleted file mode 100644 index 7b61b2cce..000000000 --- a/source/digits_hits/include/GateCoincidenceGeometrySelector.hh +++ /dev/null @@ -1,67 +0,0 @@ -/*---------------------- - Copyright (C): OpenGATE Collaboration - -This software is distributed under the terms -of the GNU Lesser General Public Licence (LGPL) -See LICENSE.md for further details -----------------------*/ - - -#ifndef GateCoincidenceGeometrySelector_h -#define GateCoincidenceGeometrySelector_h 1 - -#include "globals.hh" -#include -#include -#include "G4ThreeVector.hh" - -#include "GateVPulseProcessor.hh" -#include "GateObjectStore.hh" -#include "GateVCoincidencePulseProcessor.hh" - -class GateCoincidenceGeometrySelectorMessenger; - - -class GateCoincidenceGeometrySelector : public GateVCoincidencePulseProcessor -{ -public: - - - - //! Destructor - virtual ~GateCoincidenceGeometrySelector() ; - - - //! Constructs a new dead time attached to a GateDigitizer - GateCoincidenceGeometrySelector(GateCoincidencePulseProcessorChain* itsChain, - const G4String& itsName); - -public: - - //! Returns the GeometrySelector - G4double GetMaxS() const {return m_maxS;} - G4double GetMaxDeltaZ() const {return m_maxDeltaZ;} - - //! Set the GeometrySelector - void SetMaxS(G4double val) { m_maxS = val;} - void SetMaxDeltaZ(G4double val) { m_maxDeltaZ = val;} - - //! Implementation of the pure virtual method declared by the base class GateClockDependent - //! print-out the attributes specific of the GeometrySelector - virtual void DescribeMyself(size_t indent); - -protected: - - /*! Implementation of the pure virtual method declared by the base class GateVCoincidencePulseProcessor*/ - GateCoincidencePulse* ProcessPulse(GateCoincidencePulse* inputPulse,G4int iPulse); - - - -private: - G4double m_maxS; //!< contains the rebirth time. - G4double m_maxDeltaZ; //!< contains the rebirth time. - GateCoincidenceGeometrySelectorMessenger *m_messenger; //!< Messenger -}; - - -#endif diff --git a/source/digits_hits/include/GateCoincidenceGeometrySelectorMessenger.hh b/source/digits_hits/include/GateCoincidenceGeometrySelectorMessenger.hh deleted file mode 100644 index 1804af823..000000000 --- a/source/digits_hits/include/GateCoincidenceGeometrySelectorMessenger.hh +++ /dev/null @@ -1,35 +0,0 @@ -/*---------------------- - Copyright (C): OpenGATE Collaboration - -This software is distributed under the terms -of the GNU Lesser General Public Licence (LGPL) -See LICENSE.md for further details -----------------------*/ - - -#ifndef GateCoincidenceGeometrySelectorMessenger_h -#define GateCoincidenceGeometrySelectorMessenger_h 1 - -#include "GatePulseProcessorMessenger.hh" - -class G4UIdirectory; -class G4UIcmdWithADoubleAndUnit; - -class GateCoincidenceGeometrySelector; - -class GateCoincidenceGeometrySelectorMessenger: public GateClockDependentMessenger -{ -public: - GateCoincidenceGeometrySelectorMessenger(GateCoincidenceGeometrySelector* itsGeometrySelector); - virtual ~GateCoincidenceGeometrySelectorMessenger(); - - inline void SetNewValue(G4UIcommand* aCommand, G4String aString); - - inline GateCoincidenceGeometrySelector* GetGeometrySelector(){ return (GateCoincidenceGeometrySelector*) GetClockDependent(); } - -private: - G4UIcmdWithADoubleAndUnit *maxSCmd; //!< set the max time window - G4UIcmdWithADoubleAndUnit *maxDeltaZCmd; //!< set the max time window -}; - -#endif diff --git a/source/digits_hits/include/GateCoincidenceSorter.hh b/source/digits_hits/include/GateCoincidenceSorter.hh index abdc43027..be6a893c0 100644 --- a/source/digits_hits/include/GateCoincidenceSorter.hh +++ b/source/digits_hits/include/GateCoincidenceSorter.hh @@ -170,11 +170,11 @@ public: void SetAcceptancePolicy4CC(const G4String& policy); - G4double GetMaxS() const {return m_maxS;} + G4double GetMinS() const {return m_minS;} G4double GetMaxDeltaZ() const {return m_maxDeltaZ;} //! Set the GeometrySelector - void SetMaxS(G4double val) { m_maxS = val;} + void SetMinS(G4double val) { m_minS = val;} void SetMaxDeltaZ(G4double val) { m_maxDeltaZ = val;} @@ -196,7 +196,7 @@ protected: acceptance_policy_4CC_t m_acceptance_policy_4CC; //! 1) - G4cout << "[GateCoincidenceGeometrySelector::ProcessOnePulse]: input pulse was null -> nothing to do\n\n"; - return 0; - } - - G4double s; - if (inputPulse->size() != 2) { - if (nVerboseLevel>1) - G4cout << "[GateCoincidenceGeometrySelector::ProcessOnePulse]: input pulse has not 2 pulses -> nothing to do\n\n"; - return 0; - } - - G4ThreeVector globalPos1 = (*inputPulse)[0]->GetGlobalPos(); - G4ThreeVector globalPos2 = (*inputPulse)[1]->GetGlobalPos(); - - if ((m_maxDeltaZ>0) && (fabs(globalPos2.z()-globalPos1.z())>m_maxDeltaZ) ) - return 0; - - G4double denom = (globalPos1.y()-globalPos2.y()) * (globalPos1.y()-globalPos2.y()) + - (globalPos2.x()-globalPos1.x()) * (globalPos2.x()-globalPos1.x()); - - if (denom!=0.) { - denom = sqrt(denom); - - s = ( globalPos1.x() * (globalPos1.y()-globalPos2.y()) + - globalPos1.y() * (globalPos2.x()-globalPos1.x()) ) - / denom; - } else { - s = 0.; - } - - G4double theta; - theta = atan2(globalPos1.x()-globalPos2.x(), globalPos1.y()-globalPos2.y()); - if ( theta < 0.) { - theta = theta + pi; - s = -s; - } - if ((m_maxS>0) && (fabs(s)>m_maxS) ) return 0; - - return new GateCoincidencePulse(*inputPulse); -} - - -void GateCoincidenceGeometrySelector::DescribeMyself(size_t indent) -{ - G4cout << GateTools::Indent(indent) << "GeometrySelector: " - << "SMax : "<SetGuidance("Set max S value accepted (<0 --> all is accepted)"); - maxSCmd->SetUnitCategory("Length"); - - cmdName = GetDirectoryName() + "setDeltaZMax"; - maxDeltaZCmd= new G4UIcmdWithADoubleAndUnit(cmdName,this); - maxDeltaZCmd->SetGuidance("Set max delta Z value accepted (<0 --> all is accepted)"); - maxDeltaZCmd->SetUnitCategory("Length"); -} - - -GateCoincidenceGeometrySelectorMessenger::~GateCoincidenceGeometrySelectorMessenger() -{ - delete maxSCmd; - delete maxDeltaZCmd; -} - - -void GateCoincidenceGeometrySelectorMessenger::SetNewValue(G4UIcommand* command, G4String newValue) -{ - if (command==maxSCmd) - GetGeometrySelector()->SetMaxS(maxSCmd->GetNewDoubleValue(newValue)); - else if (command==maxDeltaZCmd) - GetGeometrySelector()->SetMaxDeltaZ(maxDeltaZCmd->GetNewDoubleValue(newValue)); - else - GateClockDependentMessenger::SetNewValue(command,newValue); -} diff --git a/source/digits_hits/src/GateCoincidenceSorter.cc b/source/digits_hits/src/GateCoincidenceSorter.cc index adb2747e8..42c9d02ff 100644 --- a/source/digits_hits/src/GateCoincidenceSorter.cc +++ b/source/digits_hits/src/GateCoincidenceSorter.cc @@ -40,7 +40,7 @@ GateCoincidenceSorter::GateCoincidenceSorter(GateDigitizerMgr* itsDigitizerMgr, m_offset(0.), m_offsetJitter(0.), m_minSectorDifference(2), - m_maxS (-1), + m_minS (-1), m_maxDeltaZ ( -1), m_forceMinSecDifferenceToZero(false), m_multiplesPolicy(kKeepIfAllAreGoods), @@ -770,15 +770,9 @@ G4bool GateCoincidenceSorter::IsForbiddenCoincidence(const GateDigi* digi1, cons globalPos1.y() * (globalPos2.x() - globalPos1.x())) / denom; } - // Calculate the angle theta in the XY plane - G4double theta = atan2(globalPos1.x() - globalPos2.x(), globalPos1.y() - globalPos2.y()); - if (theta < 0.0) { - theta += pi; // Adjust theta to be in the range [0, pi] - s = -s; // Invert the distance s if the angle is adjusted - } // Check the distance 's' against the maximum threshold - if ((m_maxS > 0) && (fabs(s) > m_maxS)) { + if ((m_minS > 0) && (fabs(s) > m_minS)) { if (nVerboseLevel > 1) G4cout << "[GateCoincidenceSorter::IsForbiddenCoincidence]: distance s too large --> refused\n"; return true; diff --git a/source/digits_hits/src/GateCoincidenceSorterMessenger.cc b/source/digits_hits/src/GateCoincidenceSorterMessenger.cc index 980b26399..a1bc90f2e 100644 --- a/source/digits_hits/src/GateCoincidenceSorterMessenger.cc +++ b/source/digits_hits/src/GateCoincidenceSorterMessenger.cc @@ -53,10 +53,10 @@ GateCoincidenceSorterMessenger::GateCoincidenceSorterMessenger(GateCoincidenceSo minSectorDiffCmd->SetParameterName("diff",false); minSectorDiffCmd->SetRange("diff>=1"); - cmdName = GetDirectoryName() + "setSMax"; - maxSCmd= new G4UIcmdWithADoubleAndUnit(cmdName,this); - maxSCmd->SetGuidance("Set max S value accepted (<0 --> all is accepted)"); - maxSCmd->SetUnitCategory("Length"); + cmdName = GetDirectoryName() + "SetMinS"; + minSCmd= new G4UIcmdWithADoubleAndUnit(cmdName,this); + minSCmd->SetGuidance("Set min S value accepted (<0 --> all is accepted)"); + minSCmd->SetUnitCategory("Length"); cmdName = GetDirectoryName() + "setDeltaZMax"; maxDeltaZCmd= new G4UIcmdWithADoubleAndUnit(cmdName,this); @@ -128,7 +128,7 @@ GateCoincidenceSorterMessenger::~GateCoincidenceSorterMessenger() delete SetAcceptancePolicy4CCCmd; delete SetEventIDCoincCmd; delete forceMinSectorDiffCmd; - delete maxSCmd; + delete minSCmd; delete maxDeltaZCmd; } @@ -147,8 +147,8 @@ void GateCoincidenceSorterMessenger::SetNewValue(G4UIcommand* aCommand, G4String { m_CoincidenceSorter->SetForcedTo0MinSectorDifference(forceMinSectorDiffCmd->GetNewBoolValue(newValue)); } else if( aCommand == minSectorDiffCmd ) { m_CoincidenceSorter->SetMinSectorDifference(minSectorDiffCmd->GetNewIntValue(newValue)); } - else if (aCommand==maxSCmd) - m_CoincidenceSorter->SetMaxS(maxSCmd->GetNewDoubleValue(newValue)); + else if (aCommand==minSCmd) + m_CoincidenceSorter->SetMinS(minSCmd->GetNewDoubleValue(newValue)); else if (aCommand==maxDeltaZCmd) m_CoincidenceSorter->SetMaxDeltaZ(maxDeltaZCmd->GetNewDoubleValue(newValue)); else if( aCommand == setDepthCmd ) From 45ef0576455be3485cc3c47020ad8c8b6b6587a6 Mon Sep 17 00:00:00 2001 From: Oudihat-Radia Date: Tue, 3 Sep 2024 15:43:12 +0200 Subject: [PATCH 4/6] Update GateCoincidenceSorter.cc --- source/digits_hits/src/GateCoincidenceSorter.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/digits_hits/src/GateCoincidenceSorter.cc b/source/digits_hits/src/GateCoincidenceSorter.cc index 560f16ac1..f77f905fd 100644 --- a/source/digits_hits/src/GateCoincidenceSorter.cc +++ b/source/digits_hits/src/GateCoincidenceSorter.cc @@ -762,7 +762,7 @@ G4bool GateCoincidenceSorter::IsForbiddenCoincidence(const GateDigi* digi1, cons // Check the distance 's' against the maximum threshold - if ((m_minS > 0) && (fabs(s) > m_minS)) { + if ((m_minS < 0) && (fabs(s) < m_minS)) { if (nVerboseLevel > 1) G4cout << "[GateCoincidenceSorter::IsForbiddenCoincidence]: distance s too large --> refused\n"; return true; From 742b3e31eb17d7f12fb93e29eec652a2da132047 Mon Sep 17 00:00:00 2001 From: Radia Oudihat Date: Tue, 3 Sep 2024 15:48:12 +0200 Subject: [PATCH 5/6] modification --- .../src/GateCoincidencePulseProcessorChainMessenger.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/physics/src/GateCoincidencePulseProcessorChainMessenger.cc b/source/physics/src/GateCoincidencePulseProcessorChainMessenger.cc index aad9787f5..9519c1e50 100644 --- a/source/physics/src/GateCoincidencePulseProcessorChainMessenger.cc +++ b/source/physics/src/GateCoincidencePulseProcessorChainMessenger.cc @@ -20,7 +20,7 @@ See LICENSE.md for further details #include "GateCoincidencePulseProcessorChain.hh" //#include "GateCoincidenceDeadTime.hh" -#include "GateCoincidenceGeometrySelector.hh" +//#include "GateCoincidenceGeometrySelector.hh" #include "GateTriCoincidenceSorter.hh" //mhadi_add #include "GateCCCoincidenceSequenceRecon.hh"//AE @@ -94,8 +94,8 @@ void GateCoincidencePulseProcessorChainMessenger::DoInsertion(const G4String& ch newProcessor = new GateCCCoincidenceSequenceRecon(GetProcessorChain(),newInsertionName); //else if (childTypeName=="timeDiffSelector") //newProcessor = new GateCoincidenceTimeDiffSelector(GetProcessorChain(),newInsertionName); - else if (childTypeName=="geometrySelector") - newProcessor = new GateCoincidenceGeometrySelector(GetProcessorChain(),newInsertionName); + //else if (childTypeName=="geometrySelector") + //newProcessor = new GateCoincidenceGeometrySelector(GetProcessorChain(),newInsertionName); // else if (childTypeName=="buffer") // newProcessor = new GateCoincidenceBuffer(GetProcessorChain(),newInsertionName); //else if (childTypeName=="multiplesKiller") From 9d12edd3b1e1a22c2a8c4358cd7d1aa9fbcdb2fc Mon Sep 17 00:00:00 2001 From: Oudihat-Radia Date: Wed, 4 Sep 2024 09:53:13 +0200 Subject: [PATCH 6/6] Update GateCoincidenceSorterMessenger.cc --- source/digits_hits/src/GateCoincidenceSorterMessenger.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/digits_hits/src/GateCoincidenceSorterMessenger.cc b/source/digits_hits/src/GateCoincidenceSorterMessenger.cc index 0bc0af8c4..0c7842d46 100644 --- a/source/digits_hits/src/GateCoincidenceSorterMessenger.cc +++ b/source/digits_hits/src/GateCoincidenceSorterMessenger.cc @@ -53,7 +53,7 @@ GateCoincidenceSorterMessenger::GateCoincidenceSorterMessenger(GateCoincidenceSo minSectorDiffCmd->SetParameterName("diff",false); minSectorDiffCmd->SetRange("diff>=1"); - cmdName = GetDirectoryName() + "SetMinS"; + cmdName = GetDirectoryName() + "setSMin"; minSCmd= new G4UIcmdWithADoubleAndUnit(cmdName,this); minSCmd->SetGuidance("Set min S value accepted (<0 --> all is accepted)"); minSCmd->SetUnitCategory("Length");