Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions source/digits_hits/src/GateSpatialResolution.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,18 @@ void GateSpatialResolution::SetSpatialResolutionParameters() {


void GateSpatialResolution::Digitize(){

GateVSystem* m_system = ((GateSinglesDigitizer*)this->GetDigitizer())->GetSystem();

if (m_IsFirstEntrance) {
SetSpatialResolutionParameters();
if (!m_system->CheckIfEnoughLevelsAreDefined())
{
GateError( " *** ERROR*** GateSpatialResolution::Digitize. Not all defined geometry levels has their mother levels defined."
"(Ex.: for cylindricalPET, the levels are: rsector, module, submodule, crystal). If you have defined submodule, you have to have resector and module defined as well."
"Please, add them to your geometry macro in /gate/systems/cylindricalPET/XXX/attach YYY. Abort.\n");
}

m_IsFirstEntrance = false;
}

Expand All @@ -149,17 +159,10 @@ void GateSpatialResolution::Digitize(){



GateVSystem* m_system = ((GateSinglesDigitizer*)this->GetDigitizer())->GetSystem();

if (m_system==NULL) G4Exception( "GateSpatialResolution::Digitize", "Digitize", FatalException,
"Failed to get the system corresponding to that digitizer. Abort.\n");

if (!m_system->CheckIfEnoughLevelsAreDefined())
{
GateError( " *** ERROR*** GateSpatialResolution::Digitize. Not all defined geometry levels has their mother levels defined."
"(Ex.: for cylindricalPET, the levels are: rsector, module, submodule, crystal). If you have defined submodule, you have to have resector and module defined as well."
"Please, add them to your geometry macro in /gate/systems/cylindricalPET/XXX/attach YYY. Abort.\n");
}

m_systemDepth = m_system->GetTreeDepth();

Expand Down
Loading