From 2695629c11eaf8a3bfd3f33d12aad0107cb82582 Mon Sep 17 00:00:00 2001 From: Radia Oudihat Date: Thu, 11 Jul 2024 15:47:42 +0200 Subject: [PATCH] added units for spatial resolution --- .../include/GateSpatialResolutionMessenger.hh | 9 ++++--- .../src/GateSpatialResolutionMessenger.cc | 24 ++++++++++--------- 2 files changed, 17 insertions(+), 16 deletions(-) mode change 100755 => 100644 source/digits_hits/include/GateSpatialResolutionMessenger.hh mode change 100755 => 100644 source/digits_hits/src/GateSpatialResolutionMessenger.cc diff --git a/source/digits_hits/include/GateSpatialResolutionMessenger.hh b/source/digits_hits/include/GateSpatialResolutionMessenger.hh old mode 100755 new mode 100644 index a140b97cd..7d3a5ebd7 --- a/source/digits_hits/include/GateSpatialResolutionMessenger.hh +++ b/source/digits_hits/include/GateSpatialResolutionMessenger.hh @@ -40,14 +40,13 @@ public: private: GateSpatialResolution* m_SpatialResolution; - G4UIcmdWithADouble* spresolutionCmd; - G4UIcmdWithADouble* spresolutionXCmd; + G4UIcmdWithADoubleAndUnit* spresolutionCmd; + G4UIcmdWithADoubleAndUnit* spresolutionXCmd; + G4UIcmdWithADoubleAndUnit* spresolutionYCmd; + G4UIcmdWithADoubleAndUnit* spresolutionZCmd; G4UIcmdWithAString *spresolutionXdistribCmd;// Command declaration for 1D X-resolution distribution G4UIcmdWithAString *spresolutionYdistribCmd;// Command declaration for 1D Y-resolution distribution G4UIcmdWithAString *spresolutionXYdistrib2DCmd; // Command declaration for 2D XY-resolution distribution - - G4UIcmdWithADouble* spresolutionYCmd; - G4UIcmdWithADouble* spresolutionZCmd; G4UIcmdWithABool* confineCmd; diff --git a/source/digits_hits/src/GateSpatialResolutionMessenger.cc b/source/digits_hits/src/GateSpatialResolutionMessenger.cc old mode 100755 new mode 100644 index 0f3dd7f69..24ab69f5d --- a/source/digits_hits/src/GateSpatialResolutionMessenger.cc +++ b/source/digits_hits/src/GateSpatialResolutionMessenger.cc @@ -11,10 +11,9 @@ See LICENSE.md for further details #include "GateSpatialResolutionMessenger.hh" #include "GateSpatialResolution.hh" #include "GateDigitizerMgr.hh" - #include "G4SystemOfUnits.hh" #include "G4UIcmdWithADouble.hh" - +#include "G4UIcmdWithADoubleAndUnit.hh" #include "G4UIcmdWithABool.hh" #include "G4UIcmdWithAString.hh" #include "G4UIdirectory.hh" @@ -31,18 +30,21 @@ GateSpatialResolutionMessenger::GateSpatialResolutionMessenger (GateSpatialResol G4String cmdName; cmdName = GetDirectoryName() + "fwhm"; - spresolutionCmd = new G4UIcmdWithADouble(cmdName,this); - spresolutionCmd->SetGuidance("Set the resolution in position for gaussian spblurring"); + spresolutionCmd = new G4UIcmdWithADoubleAndUnit(cmdName,this); + spresolutionCmd->SetGuidance("Set the resolution (in mm) in position for gaussian spblurring"); + spresolutionCmd->SetUnitCategory("Length"); cmdName = GetDirectoryName() + "fwhmX"; - spresolutionXCmd= new G4UIcmdWithADouble(cmdName,this); - spresolutionXCmd->SetGuidance("Set the resolution "); + spresolutionXCmd= new G4UIcmdWithADoubleAndUnit(cmdName,this); + spresolutionXCmd->SetGuidance("Set the resolution (in mm) in position for gaussian spblurring"); + spresolutionXCmd->SetUnitCategory("Length"); cmdName = GetDirectoryName() + "fwhmY"; - spresolutionYCmd = new G4UIcmdWithADouble(cmdName,this); + spresolutionYCmd = new G4UIcmdWithADoubleAndUnit(cmdName,this); spresolutionYCmd->SetGuidance("Set the resolution in position for gaussian spblurring"); - + spresolutionYCmd->SetUnitCategory("Length"); cmdName = GetDirectoryName() + "fwhmZ"; - spresolutionZCmd = new G4UIcmdWithADouble(cmdName,this); + spresolutionZCmd = new G4UIcmdWithADoubleAndUnit(cmdName,this); spresolutionZCmd->SetGuidance("Set the resolution in position for gaussian spblurring"); + spresolutionZCmd->SetUnitCategory("Length"); cmdName = GetDirectoryName() + "fwhmXdistrib"; spresolutionXdistribCmd = new G4UIcmdWithAString(cmdName,this); spresolutionXdistribCmd->SetGuidance("Set the distribution resolution in position for gaussian spblurring"); @@ -54,8 +56,8 @@ GateSpatialResolutionMessenger::GateSpatialResolutionMessenger (GateSpatialResol spresolutionXYdistrib2DCmd->SetGuidance("Set the distribution 2D of spatial resolution in position for gaussian spblurring"); cmdName = GetDirectoryName() + "confineInsideOfSmallestElement"; - confineCmd = new G4UIcmdWithABool(cmdName,this); - confineCmd->SetGuidance("To be set true, if you want to moves the outsiders of the crystal after spblurring inside the same crystal"); + confineCmd = new G4UIcmdWithABool(cmdName,this); + confineCmd->SetGuidance("To be set true, if you want to moves the outsiders of the crystal after spblurring inside the same crystal"); }