67 RODetectorYDivision(0),RODetectorZDivision(0),worldLogical(0),RODetectorLog(0),
68 RODetectorXDivisionLog(0),RODetectorYDivisionLog(0),RODetectorZDivisionLog(0),
69 sensitiveLogicalVolume(0)
72 isInitialized =
false;
81 G4int numberOfVoxelsX,
82 G4int numberOfVoxelsY,
83 G4int numberOfVoxelsZ)
85 detectorToWorldPosition =
pos;
86 detectorSizeX = detectorDimX;
87 detectorSizeY= detectorDimY;
88 detectorSizeZ=detectorDimZ;
89 numberOfVoxelsAlongX=numberOfVoxelsX;
90 numberOfVoxelsAlongY=numberOfVoxelsY;
91 numberOfVoxelsAlongZ=numberOfVoxelsZ;
110 G4double halfDetectorSizeX = detectorSizeX;
111 G4double halfDetectorSizeY = detectorSizeY;
112 G4double halfDetectorSizeZ = detectorSizeZ;
118 G4double halfXVoxelSizeX = halfDetectorSizeX/numberOfVoxelsAlongX;
119 G4double halfXVoxelSizeY = halfDetectorSizeY;
120 G4double halfXVoxelSizeZ = halfDetectorSizeZ;
121 G4double voxelXThickness = 2*halfXVoxelSizeX;
127 G4double halfYVoxelSizeX = halfXVoxelSizeX;
128 G4double halfYVoxelSizeY = halfDetectorSizeY/numberOfVoxelsAlongY;
129 G4double halfYVoxelSizeZ = halfDetectorSizeZ;
130 G4double voxelYThickness = 2*halfYVoxelSizeY;
136 G4double halfZVoxelSizeX = halfXVoxelSizeX;
137 G4double halfZVoxelSizeY = halfYVoxelSizeY;
138 G4double halfZVoxelSizeZ = halfDetectorSizeZ/numberOfVoxelsAlongZ;
139 G4double voxelZThickness = 2*halfZVoxelSizeZ;
154 detectorToWorldPosition,
160 myVol = store->
GetVolume(
"RODetectorXDivisionPhys");
163 RODetectorXDivisionLog,
166 numberOfVoxelsAlongX,
168 myVol = store->
GetVolume(
"RODetectorYDivisionPhys");
171 RODetectorYDivisionLog,
172 RODetectorXDivisionPhys,
174 numberOfVoxelsAlongY,
177 myVol = store->
GetVolume(
"RODetectorZDivisionPhys");
180 RODetectorZDivisionLog,
181 RODetectorYDivisionPhys,
183 numberOfVoxelsAlongZ,
210 G4Exception(
"HadrontherapyDetectorROGeometry::Construct",
"had001",
211 FatalException,
"Parameters of the RO geometry are not initialized");
216 G4double halfDetectorSizeX = detectorSizeX;
217 G4double halfDetectorSizeY = detectorSizeY;
218 G4double halfDetectorSizeZ = detectorSizeZ;
223 RODetector =
new G4Box(
"RODetector",
236 detectorToWorldPosition,RODetectorLog,
246 G4double halfXVoxelSizeX = halfDetectorSizeX/numberOfVoxelsAlongX;
247 G4double halfXVoxelSizeY = halfDetectorSizeY;
248 G4double halfXVoxelSizeZ = halfDetectorSizeZ;
249 G4double voxelXThickness = 2*halfXVoxelSizeX;
252 RODetectorXDivision =
new G4Box(
"RODetectorXDivision",
259 "RODetectorXDivisionLog",
263 RODetectorXDivisionLog,
266 numberOfVoxelsAlongX,
271 G4double halfYVoxelSizeX = halfXVoxelSizeX;
272 G4double halfYVoxelSizeY = halfDetectorSizeY/numberOfVoxelsAlongY;
273 G4double halfYVoxelSizeZ = halfDetectorSizeZ;
274 G4double voxelYThickness = 2*halfYVoxelSizeY;
276 RODetectorYDivision =
new G4Box(
"RODetectorYDivision",
283 "RODetectorYDivisionLog",
287 RODetectorYDivisionLog,
288 RODetectorXDivisionPhys,
290 numberOfVoxelsAlongY,
295 G4double halfZVoxelSizeX = halfXVoxelSizeX;
296 G4double halfZVoxelSizeY = halfYVoxelSizeY;
297 G4double halfZVoxelSizeZ = halfDetectorSizeZ/numberOfVoxelsAlongZ;
298 G4double voxelZThickness = 2*halfZVoxelSizeZ;
300 RODetectorZDivision =
new G4Box(
"RODetectorZDivision",
307 "RODetectorZDivisionLog",
311 RODetectorZDivisionLog,
312 RODetectorYDivisionPhys,
314 numberOfVoxelsAlongZ,
317 sensitiveLogicalVolume = RODetectorZDivisionLog;
324 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)
void AddNewDetector(G4VSensitiveDetector *aSD)
G4LogicalVolume * GetLogicalVolume() const
static G4SDManager * GetSDMpointer()
void SetYHalfLength(G4double dy)
void SetXHalfLength(G4double dx)
G4VPhysicalVolume * GetVolume(const G4String &name, G4bool verbose=true) const
static const G4double pos