Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Position resolution #727

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
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
@@ -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;
}

@@ -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();