Dear Thibaut,
I’m encountering an issue when converting GATE simulation data to CASToR format for a pixelated SPECT system. Here are the details:
System Configuration (GATE Macro Highlights)
- Pixelated detector with explicit attachment:
/gate/systems/SPECThead/pixel/attach pixel
- Crystal array: 9 (trans) × 40 (axial) BGO pixels
- Digitizer setup:
text
- /gate/digitizer/Singles/readout/setDepth 2 # for pixels
- /gate/digitizer/Singles/readout/setDepth 1 # for crystal
- Output: ROOT file (benchSPECT.root) with Singles data
Steps & Results
- Geometry Conversion (successful):
castor-GATEMacToGeom -m /home/gate/cam11/SPECT.mac -o pixelated
Output .geom file correctly lists:
- 2 detector heads
- 9 transaxial / 40 axial pixels
- Collimator parameters
- ROOT Data Conversion (issue):
castor-GATERootToCastor -i /home/gate/cam11/benchSPECT.root -o /home/gate/cam11/cam11 -m /home/gate/cam11/SPECT.mac -s pixelated
3.Problem*: Output CDH file is empty (no data).
Request
Could you help troubleshoot:
- Why the CDH file remains empty despite valid inputs?
- Whether the GATE macro structure (crystal/pixel hierarchy) aligns with CASToR’s pixelated SPECT requirements?
- Any required adjustments to the digitizer or system attachment?
Attached: Full [SPECT.mac] & [.geom file] for reference.
Thank you!
Sharareh
Full [SPECT.mac]:
/gate/geometry/setMaterialDatabase data/GateMaterials.db
/gate/world/geometry/setXLength 100 cm
/gate/world/geometry/setYLength 100 cm
/gate/world/geometry/setZLength 100 cm
/gate/world/daughters/name SPECThead
/gate/world/daughters/insert box
/gate/SPECThead/geometry/setXLength 8. cm
/gate/SPECThead/geometry/setYLength 9.1 cm
/gate/SPECThead/geometry/setZLength 40.1 cm
/gate/SPECThead/placement/setTranslation 7.9 0. 0.0 cm
/gate/SPECThead/setMaterial Air
/gate/SPECThead/repeaters/insert ring
/gate/SPECThead/ring/setRepeatNumber 2
/gate/SPECThead/moves/insert orbiting
/gate/SPECThead/orbiting/setSpeed 5.625 deg/s
/gate/SPECThead/orbiting/setPoint1 0 0 0 cm
/gate/SPECThead/orbiting/setPoint2 0 0 1 cm
/gate/SPECThead/vis/forceWireframe
/gate/SPECThead/daughters/name shielding
/gate/SPECThead/daughters/insert box
/gate/shielding/geometry/setXLength 5. cm
/gate/shielding/geometry/setYLength 9.1 cm
/gate/shielding/geometry/setZLength 40.1 cm
/gate/shielding/placement/setTranslation -1.5 0. 0. cm
/gate/shielding/setMaterial Lead
/gate/shielding/vis/setColor red
/gate/shielding/vis/forceWireframe
/gate/SPECThead/daughters/name collimator
/gate/SPECThead/daughters/insert box
/gate/collimator/geometry/setXLength 5. cm
/gate/collimator/geometry/setYLength 9.1 cm
/gate/collimator/geometry/setZLength 40.1 cm
/gate/collimator/placement/setTranslation -1.5 0. 0. cm
/gate/collimator/setMaterial Lead
/gate/collimator/vis/setColor red
/gate/collimator/vis/forceWireframe
Insert the first hole of air in the collimator
/gate/collimator/daughters/name hole
/gate/collimator/daughters/insert box
/gate/hole/geometry/setXLength 5. cm
/gate/hole/geometry/setYLength 0.9 cm
/gate/hole/geometry/setZLength 0.9 cm
/gate/hole/placement/setTranslation 0. 0. 0. cm
/gate/hole/setMaterial Air
/gate/hole/repeaters/insert cubicArray
/gate/hole/cubicArray/setRepeatNumberX 1
/gate/hole/cubicArray/setRepeatNumberY 9
/gate/hole/cubicArray/setRepeatNumberZ 40
/gate/hole/cubicArray/setRepeatVector 0.0 1.0111 1.0025 cm
/gate/SPECThead/daughters/name crystal
/gate/SPECThead/daughters/insert box
/gate/crystal/geometry/setXLength 3. cm
/gate/crystal/geometry/setYLength 9.1 cm
/gate/crystal/geometry/setZLength 40.1 cm
/gate/crystal/placement/setTranslation 2.5 0. 0. cm
/gate/crystal/setMaterial Lead
/gate/crystal/daughters/name pixel
/gate/crystal/daughters/insert box
/gate/pixel/geometry/setXLength 3. cm
/gate/pixel/geometry/setYLength 0.9 cm
/gate/pixel/geometry/setZLength 0.9 cm
/gate/pixel/placement/setTranslation 0 0. 0. cm
/gate/pixel/setMaterial BGO
/gate/pixel/vis/setColor yellow
/gate/pixel/vis/forceSolid
/gate/pixel/repeaters/insert cubicArray
/gate/pixel/cubicArray/setRepeatNumberX 1
/gate/pixel/cubicArray/setRepeatNumberY 9
/gate/pixel/cubicArray/setRepeatNumberZ 40
/gate/pixel/cubicArray/setRepeatVector 0.0 1.0111 1.0025 cm
/gate/world/daughters/name Phantom
/gate/world/daughters/insert cylinder
/gate/Phantom/geometry/setRmax 1.9 cm
/gate/Phantom/geometry/setRmin 0. cm
/gate/Phantom/geometry/setHeight 29 cm
/gate/Phantom/placement/setTranslation 0. 0. 0. cm
/gate/Phantom/setMaterial PMMA
/gate/Phantom/vis/setColor blue
/gate/Phantom/vis/forceSolid
/gate/systems/SPECThead/crystal/attach crystal
/gate/systems/SPECThead/describe
/gate/Phantom/attachPhantomSD
/gate/shielding/attachPhantomSD
/gate/SPECThead/attachPhantomSD
/gate/collimator/attachPhantomSD
/gate/crystal/attachCrystalSD
/gate/pixel/attachCrystalSD
/gate/systems/SPECThead/pixel/attach pixel
P H Y S I C S
/gate/physics/addProcess PhotoElectric
/gate/physics/processes/PhotoElectric/setModel StandardModel
/gate/physics/addProcess Compton
/gate/physics/processes/Compton/setModel PenelopeModel
/gate/physics/addProcess RayleighScattering
/gate/physics/processes/RayleighScattering/setModel PenelopeModel
/gate/physics/addProcess ElectronIonisation
/gate/physics/processes/ElectronIonisation/setModel StandardModel e-
/gate/physics/addProcess Bremsstrahlung
/gate/physics/processes/Bremsstrahlung/setModel StandardModel e-
/gate/physics/addProcess MultipleScattering e-
/gate/physics/processList Enabled
/gate/physics/processList Initialized
C U T S
Cuts for particle in WORLD
/gate/physics/Gamma/SetCutInRegion SPECThead 0.1 cm
/gate/physics/Electron/SetCutInRegion SPECThead 1.0 cm
I N I T I A L I Z A T I O N
/gate/run/initialize
Show how the geometry moves with time
! After the initialization !
/control/execute MoveVisu.mac
D E F I N E T H E S O U R C E
/gate/source/addSource SourceConfinement
/gate/source/SourceConfinement/gps/type Volume
/gate/source/SourceConfinement/gps/shape Cylinder
/gate/source/SourceConfinement/gps/radius 1.5 cm
/gate/source/SourceConfinement/gps/halfz 14 cm
/gate/source/SourceConfinement/gps/centre 0. 0. 0. cm
/gate/source/SourceConfinement/gps/particle gamma
/gate/source/SourceConfinement/gps/energy 5 MeV
/gate/source/SourceConfinement/setActivity 30000. Bq
/gate/source/SourceConfinement/gps/angtype iso
D I G I T I Z E R
/gate/digitizer/Singles/insert adder
/gate/digitizer/Singles/insert blurring
/gate/digitizer/Singles/blurring/setResolution 0.10
/gate/digitizer/Singles/blurring/setEnergyOfReference 5 MeV
/gate/digitizer/Singles/insert spblurring
/gate/digitizer/Singles/spblurring/setSpresolution 2.0 mm
/gate/digitizer/Singles/spblurring/verbose 0
/gate/digitizer/Singles/insert thresholder
/gate/digitizer/Singles/thresholder/setThreshold 4 MeV
/gate/digitizer/Singles/insert upholder
/gate/digitizer/Singles/upholder/setUphold 6 MeV
#/gate/digitizer/Singles/insert opticaladder
/gate/digitizer/Singles/insert readout
for pixels:
/gate/digitizer/Singles/readout/setDepth 2
for crystal:
/gate/digitizer/Singles/readout/setDepth 1
O U T P U T
/gate/output/root/enable
/gate/output/root/setFileName benchSPECT
/gate/output/root/setRootSinglesAdderFlag 1
/gate/output/root/setRootSinglesBlurringFlag 1
/gate/output/root/setRootSinglesSpblurringFlag 1
/gate/output/root/setRootSinglesThresholderFlag 1
/gate/output/root/setRootSinglesUpholderFlag 1
/gate/output/root//setRootHitFlag 1
/gate/output/root/setRootSinglesFlag 1
/gate/output/root/setRootNtupleFlag 1
#/gate/output/ascii/setOutFileSinglesAdderFlag 0
#/gate/output/ascii/setOutFileSinglesSpblurringFlag 0
#/gate/output/ascii/setOutFileSinglesBlurringFlag 0
#/gate/output/ascii/setOutFileSinglesThresholderFlag 0
#/gate/output/ascii/setOutFileSinglesUpholderFlag 0
R A N D O M
JamesRandom Ranlux64 MersenneTwister
/gate/random/setEngineName Ranlux64
#/gate/random/setEngineSeed default
#/gate/random/setEngineSeed auto
/gate/random/setEngineSeed 123456789
#/gate/random/resetEngineFrom fileName
/gate/random/verbose 1
P R O J E C T I O N
/gate/output/projection/enable
/gate/output/projection/setFileName YourProjection
/gate/output/projection/pixelSizeX 1 mm
/gate/output/projection/pixelSizeY 1 mm
/gate/output/projection/pixelNumberX 38
/gate/output/projection/pixelNumberY 290
Specify the projection plane (XY, YZ or ZX)
/gate/output/projection/projectionPlane YZ
E X P E R I M E N T
/gate/application/setTimeSlice 1 s
/gate/application/setTimeStart 0. s
/gate/application/setTimeStop 32. s
/gate/application/startDAQ
Full [.geom]:
modality : SPECT_CONVERGENT
scanner name : h
number of detector heads : 2
trans number of pixels : 9
trans pixel size : 9
trans gap size : 1.111
axial number of pixels : 40
axial pixel size : 9
axial gap size : 1.025
detector depth : 30
scanner radius : 79,79
Collimator configuration :
head1:
trans focal model: constant
trans number of coef model: 1
trans parameters: 0
axial focal model: constant
axial number of coef model: 1
axial parameters: 0
head2:
trans focal model: constant
trans number of coef model: 1
trans parameters: 0
axial focal model: constant
axial number of coef model: 1
axial parameters: 0
default reconstruction parameters
voxels number transaxial : 20
voxels number axial : 101
field of view transaxial : 39.5
field of view axial : 401
description
description : SPECT camera extracted from GATE macro: /home/gate/cam11/SPECT.mac