STIR 6.4.0
InputStreamFromROOTFileForCylindricalPET.inl
Go to the documentation of this file.
1/*
2 Copyright (C) 2016, 2020, UCL
3 Copyright (C) 2018 University of Hull
4 This file is part of STIR.
5
6 SPDX-License-Identifier: Apache-2.0
7
8 See STIR/LICENSE.txt for details
9*/
19#include "stir/error.h"
20
21START_NAMESPACE_STIR
22
23int
25{
26 return static_cast<int>(this->crystal_repeater_z * this->module_repeater_z * this->submodule_repeater_z);
27}
28
29int
31{
32 return static_cast<int>(this->rsector_repeater * this->module_repeater_y * this->submodule_repeater_y
33 * this->crystal_repeater_y);
34}
35
36int
41
42int
44{
45 return this->submodule_repeater_z;
46}
47
48int
50{
51 if (this->singles_readout_depth == 1) // One PMT per Rsector
52 return static_cast<int>(this->crystal_repeater_z * this->module_repeater_z * this->submodule_repeater_z);
53 else if (this->singles_readout_depth == 2) // One PMT per module
54 return static_cast<int>(this->crystal_repeater_z * this->submodule_repeater_z);
55 else if (this->singles_readout_depth == 3) // One PMT per submodule
56 return this->crystal_repeater_z;
57 else if (this->singles_readout_depth == 4) // One PMT per crystal
58 return 1;
59 else
60 error("Singles readout depth (" + std::to_string(this->singles_readout_depth) + ") is invalid");
61
62 return 0;
63}
64
65int
67{
68 if (this->singles_readout_depth == 1) // One PMT per Rsector
69 return static_cast<int>(this->module_repeater_y * this->submodule_repeater_y * this->crystal_repeater_y);
70 else if (this->singles_readout_depth == 2) // One PMT per module
71 return static_cast<int>(this->submodule_repeater_y * this->crystal_repeater_y);
72 else if (this->singles_readout_depth == 3) // One PMT per submodule
73 return this->crystal_repeater_y;
74 else if (this->singles_readout_depth == 4) // One PMT per crystal
75 return 1;
76 else
77 error("Singles readout depth (" + std::to_string(this->singles_readout_depth) + ") is invalid");
78
79 return 0;
80}
81
82void
83InputStreamFromROOTFileForCylindricalPET::set_submodule_repeater_x(int val)
84{
85 submodule_repeater_x = val;
86}
87
88void
89InputStreamFromROOTFileForCylindricalPET::set_submodule_repeater_y(int val)
90{
91 submodule_repeater_y = val;
92}
93
94void
95InputStreamFromROOTFileForCylindricalPET::set_submodule_repeater_z(int val)
96{
97 submodule_repeater_z = val;
98}
99
100void
101InputStreamFromROOTFileForCylindricalPET::set_module_repeater_x(int val)
102{
103 module_repeater_x = val;
104}
105
106void
107InputStreamFromROOTFileForCylindricalPET::set_module_repeater_y(int val)
108{
109 module_repeater_y = val;
110}
111
112void
113InputStreamFromROOTFileForCylindricalPET::set_module_repeater_z(int val)
114{
115 module_repeater_z = val;
116}
117
118void
119InputStreamFromROOTFileForCylindricalPET::set_rsector_repeater(int val)
120{
121 rsector_repeater = val;
122}
123
124END_NAMESPACE_STIR
int get_num_dets_per_ring() const override
Calculate the number of detectors per ring based on the crystal, module, submodule repeaters.
Definition InputStreamFromROOTFileForCylindricalPET.inl:30
int get_num_transaxial_blocks_per_bucket_v() const override
Get the number of transaxial modules.
Definition InputStreamFromROOTFileForCylindricalPET.inl:37
int get_num_trans_crystals_per_singles_unit() const override
Calculate the number of trans crystals per singles unit based on the repeaters numbers and the readou...
Definition InputStreamFromROOTFileForCylindricalPET.inl:66
int get_num_axial_blocks_per_bucket_v() const override
Get the number of axial modules.
Definition InputStreamFromROOTFileForCylindricalPET.inl:43
int get_num_axial_crystals_per_singles_unit() const override
Calculate the number of axial crystals per singles unit based on the repeaters numbers and the readou...
Definition InputStreamFromROOTFileForCylindricalPET.inl:49
int get_num_rings() const override
Calculate the number of rings based on the crystal, module, submodule repeaters.
Definition InputStreamFromROOTFileForCylindricalPET.inl:24
int singles_readout_depth
For the singles_readout_depth from GATE's online documentation: (here )
Definition InputStreamFromROOTFile.h:274
Declaration of stir::error()
void error(const char *const s,...)
Print error with format string a la printf and throw exception.
Definition error.cxx:42