72 RODetectorYDivision(0),RODetectorZDivision(0),worldLogical(0),RODetectorLog(0),
73 RODetectorXDivisionLog(0),RODetectorYDivisionLog(0),RODetectorZDivisionLog(0),
74 sensitiveLogicalVolume(0)
77 isInitialized =
false;
86 G4int numberOfVoxelsX,
87 G4int numberOfVoxelsY,
88 G4int numberOfVoxelsZ)
90 detectorToWorldPosition = pos;
91 detectorSizeX = detectorDimX;
92 detectorSizeY= detectorDimY;
93 detectorSizeZ=detectorDimZ;
94 numberOfVoxelsAlongX=numberOfVoxelsX;
95 numberOfVoxelsAlongY=numberOfVoxelsY;
96 numberOfVoxelsAlongZ=numberOfVoxelsZ;
115 G4double halfDetectorSizeX = detectorSizeX;
116 G4double halfDetectorSizeY = detectorSizeY;
117 G4double halfDetectorSizeZ = detectorSizeZ;
123 G4double halfXVoxelSizeX = halfDetectorSizeX/numberOfVoxelsAlongX;
124 G4double halfXVoxelSizeY = halfDetectorSizeY;
125 G4double halfXVoxelSizeZ = halfDetectorSizeZ;
126 G4double voxelXThickness = 2*halfXVoxelSizeX;
132 G4double halfYVoxelSizeX = halfXVoxelSizeX;
133 G4double halfYVoxelSizeY = halfDetectorSizeY/numberOfVoxelsAlongY;
134 G4double halfYVoxelSizeZ = halfDetectorSizeZ;
135 G4double voxelYThickness = 2*halfYVoxelSizeY;
141 G4double halfZVoxelSizeX = halfXVoxelSizeX;
142 G4double halfZVoxelSizeY = halfYVoxelSizeY;
143 G4double halfZVoxelSizeZ = halfDetectorSizeZ/numberOfVoxelsAlongZ;
144 G4double voxelZThickness = 2*halfZVoxelSizeZ;
159 detectorToWorldPosition,
165 myVol = store->
GetVolume(
"RODetectorXDivisionPhys");
168 RODetectorXDivisionLog,
171 numberOfVoxelsAlongX,
173 myVol = store->
GetVolume(
"RODetectorYDivisionPhys");
176 RODetectorYDivisionLog,
177 RODetectorXDivisionPhys,
179 numberOfVoxelsAlongY,
182 myVol = store->
GetVolume(
"RODetectorZDivisionPhys");
185 RODetectorZDivisionLog,
186 RODetectorYDivisionPhys,
188 numberOfVoxelsAlongZ,
215 G4Exception(
"HadrontherapyDetectorROGeometry::Construct",
"had001",
216 FatalException,
"Parameters of the RO geometry are not initialized");
221 G4double halfDetectorSizeX = detectorSizeX;
222 G4double halfDetectorSizeY = detectorSizeY;
223 G4double halfDetectorSizeZ = detectorSizeZ;
228 RODetector =
new G4Box(
"RODetector",
241 detectorToWorldPosition,RODetectorLog,
251 G4double halfXVoxelSizeX = halfDetectorSizeX/numberOfVoxelsAlongX;
252 G4double halfXVoxelSizeY = halfDetectorSizeY;
253 G4double halfXVoxelSizeZ = halfDetectorSizeZ;
254 G4double voxelXThickness = 2*halfXVoxelSizeX;
257 RODetectorXDivision =
new G4Box(
"RODetectorXDivision",
264 "RODetectorXDivisionLog",
268 RODetectorXDivisionLog,
271 numberOfVoxelsAlongX,
276 G4double halfYVoxelSizeX = halfXVoxelSizeX;
277 G4double halfYVoxelSizeY = halfDetectorSizeY/numberOfVoxelsAlongY;
278 G4double halfYVoxelSizeZ = halfDetectorSizeZ;
279 G4double voxelYThickness = 2*halfYVoxelSizeY;
281 RODetectorYDivision =
new G4Box(
"RODetectorYDivision",
288 "RODetectorYDivisionLog",
292 RODetectorYDivisionLog,
293 RODetectorXDivisionPhys,
295 numberOfVoxelsAlongY,
300 G4double halfZVoxelSizeX = halfXVoxelSizeX;
301 G4double halfZVoxelSizeY = halfYVoxelSizeY;
302 G4double halfZVoxelSizeZ = halfDetectorSizeZ/numberOfVoxelsAlongZ;
303 G4double voxelZThickness = 2*halfZVoxelSizeZ;
305 RODetectorZDivision =
new G4Box(
"RODetectorZDivision",
312 "RODetectorZDivisionLog",
316 RODetectorZDivisionLog,
317 RODetectorYDivisionPhys,
319 numberOfVoxelsAlongZ,
322 sensitiveLogicalVolume = RODetectorZDivisionLog;
329 G4String sensitiveDetectorName =
"RODetector";
HadrontherapyDetectorROGeometry(G4String)
void SetZHalfLength(G4double dz)
G4VPhysicalVolume * GetWorld()
void Initialize(G4ThreeVector detectorPos, G4double detectorDimX, G4double detectorDimY, G4double detectorDimZ, G4int numberOfVoxelsX, G4int numberOfVoxelsY, G4int numberOfVoxelsZ)
~HadrontherapyDetectorROGeometry()
static void DeRegister(G4VPhysicalVolume *pSolid)
static G4PhysicalVolumeStore * GetInstance()
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
virtual void ConstructSD()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4LogicalVolume * GetLogicalVolume() const
void SetYHalfLength(G4double dy)
void SetXHalfLength(G4double dx)
G4VPhysicalVolume * GetVolume(const G4String &name, G4bool verbose=true) const