35 #ifndef HadrontherapyDetectorConstruction_H
36 #define HadrontherapyDetectorConstruction_H 1
62 void ConstructPhantom();
63 void ConstructDetector();
64 void ConstructSensitiveDetector(
G4ThreeVector positionToWORLD);
65 void ParametersCheck();
71 return phantomPosition + detectorPosition;
78 phantomSizeY/2 - detectorSizeY/2 + detectorPosition.
getY(),
79 phantomSizeZ/2 - detectorSizeZ/2 + detectorPosition.
getZ()
88 detectorPosition.
setX(detectorToPhantomPosition.
getX() - phantomSizeX/2 + detectorSizeX/2);
89 detectorPosition.
setY(detectorToPhantomPosition.
getY() - phantomSizeY/2 + detectorSizeY/2);
90 detectorPosition.
setZ(detectorToPhantomPosition.
getZ() - phantomSizeZ/2 + detectorSizeZ/2);
108 if (detectorX > phantomX)
110 G4cout <<
"Error: Detector X dimension must be smaller or equal to the corrispondent of the phantom" <<
G4endl;
113 if ( (phantomX - detectorX) < pos.
getX())
115 G4cout <<
"Error: X dimension doesn't fit with detector to phantom relative position" <<
G4endl;
121 if (detectorY > phantomY)
123 G4cout <<
"Error: Detector Y dimension must be smaller or equal to the corrispondent of the phantom" <<
G4endl;
126 if ( (phantomY - detectorY) < pos.
getY())
128 G4cout <<
"Error: Y dimension doesn't fit with detector to phantom relative position" <<
G4endl;
134 if (detectorZ > phantomZ)
136 G4cout <<
"Error: Detector Z dimension must be smaller or equal to the corrispondent of the phantom" <<
G4endl;
139 if ( (phantomZ - detectorZ) < pos.
getZ())
141 G4cout <<
"Error: Z dimension doesn't fit with detector to phantom relative position" <<
G4endl;
174 G4Box *phantom , *detector;
186 G4ThreeVector phantomPosition, detectorPosition, detectorToPhantomPosition;
192 G4int numberOfVoxelsAlongX;
193 G4int numberOfVoxelsAlongY;
194 G4int numberOfVoxelsAlongZ;
196 G4double volumeOfVoxel, massOfVoxel;
198 G4Material *phantomMaterial, *detectorMaterial;