Thanks to visit codestin.com
Credit goes to github.com

Skip to content

enable use of virtual crystals in ROOT processing #357

@KrisThielemans

Description

@KrisThielemans

The mMR and other scanners use "virtual" crystals. In GATE you have to simulate the true crystal block, but when reading the ROOT file, it would make sense to insert the virtual crystal to be able to reproduce sinograms like the scanner does.

This was implemented on the GATE_ROOT branch. In particular, in the lines

crystal1 = rsectorID1 * N_MOD_xy * N_SMOD_xy * N_CRY_xy
+ (moduleID1%N_MOD_xy) * N_SMOD_xy * N_CRY_xy
+ (submoduleID1%N_SMOD_xy) * N_CRY_xy
+ (crystalID1%8);

N_CRY_xy was set to 9, above while the crystal is computed modulo 8 (also using 8 for the ring.

Equivalent lines are in

int ring1 = static_cast<int>(crystalID1/crystal_repeater_y)
+ static_cast<int>(submoduleID1/submodule_repeater_y)*crystal_repeater_z
+ static_cast<int>(moduleID1/module_repeater_y)*submodule_repeater_z*crystal_repeater_z;
int ring2 = static_cast<int>(crystalID2/crystal_repeater_y)
+ static_cast<int>(submoduleID2/submodule_repeater_y)*crystal_repeater_z
+ static_cast<int>(moduleID2/module_repeater_y)*submodule_repeater_z*crystal_repeater_z;
int crystal1 = rsectorID1 * module_repeater_y * submodule_repeater_y * crystal_repeater_y
+ (moduleID1%module_repeater_y) * submodule_repeater_y * crystal_repeater_y
+ (submoduleID1%submodule_repeater_y) * crystal_repeater_y
+ (crystalID1%crystal_repeater_y);
int crystal2 = rsectorID2 * module_repeater_y * submodule_repeater_y * crystal_repeater_y
+ (moduleID2%module_repeater_y) * submodule_repeater_y * crystal_repeater_y
+ (submoduleID2% submodule_repeater_y) * crystal_repeater_y
+ (crystalID2%crystal_repeater_y);
and
int ring1 = static_cast<Int_t>(crystalID1/crystal_repeater_z)
+ static_cast<Int_t>(blockID1/ block_repeater)*crystal_repeater_z;
int ring2 = static_cast<Int_t>(crystalID2/crystal_repeater_z)
+ static_cast<Int_t>(blockID2/block_repeater)*crystal_repeater_z;
int crystal1 = (blockID1%block_repeater) * crystal_repeater_y
+ (crystalID1%crystal_repeater_z);
int crystal2 = (blockID2%block_repeater) * crystal_repeater_y
+ (crystalID2%crystal_repeater_z);

#352 introduces Scanner::get_num_virtual_axial_crystals_per_block() and Scanner::get_num_virtual_transaxial_crystals_per_block(). It seems that we could use these.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions