35 #ifndef HadrontherapyDetectorConstruction_H
36 #define HadrontherapyDetectorConstruction_H 1
69 void ConstructPhantom();
70 void ConstructDetector();
71 void ParametersCheck();
77 return phantomPosition + detectorPosition;
84 phantomSizeY/2 - detectorSizeY/2 + detectorPosition.
getY(),
85 phantomSizeZ/2 - detectorSizeZ/2 + detectorPosition.
getZ()
94 detectorPosition.
setX(detectorToPhantomPosition.
getX() - phantomSizeX/2 + detectorSizeX/2);
95 detectorPosition.
setY(detectorToPhantomPosition.
getY() - phantomSizeY/2 + detectorSizeY/2);
96 detectorPosition.
setZ(detectorToPhantomPosition.
getZ() - phantomSizeZ/2 + detectorSizeZ/2);
113 if (detectorX > phantomX)
115 G4cout <<
"Error: Detector X dimension must be smaller or equal to the corrispondent of the phantom" <<
G4endl;
118 if ( (phantomX - detectorX) < pos.
getX())
120 G4cout <<
"Error: X dimension doesn't fit with detector to phantom relative position" <<
G4endl;
126 if (detectorY > phantomY)
128 G4cout <<
"Error: Detector Y dimension must be smaller or equal to the corrispondent of the phantom" <<
G4endl;
131 if ( (phantomY - detectorY) < pos.
getY())
133 G4cout <<
"Error: Y dimension doesn't fit with detector to phantom relative position" <<
G4endl;
139 if (detectorZ > phantomZ)
141 G4cout <<
"Error: Detector Z dimension must be smaller or equal to the corrispondent of the phantom" <<
G4endl;
144 if ( (phantomZ - detectorZ) < pos.
getZ())
146 G4cout <<
"Error: Z dimension doesn't fit with detector to phantom relative position" <<
G4endl;
177 G4Box *phantom , *detector;
189 G4ThreeVector phantomPosition, detectorPosition, detectorToPhantomPosition;
195 G4int numberOfVoxelsAlongX;
196 G4int numberOfVoxelsAlongY;
197 G4int numberOfVoxelsAlongZ;
199 G4double volumeOfVoxel, massOfVoxel;
201 G4Material *phantomMaterial, *detectorMaterial;
void SetPhantomSize(G4double sizeX, G4double sizeY, G4double sizeZ)
G4VPhysicalVolume * motherPhys
CLHEP::Hep3Vector G4ThreeVector
HadrontherapyDetectorConstruction(G4VPhysicalVolume *)
static HadrontherapyDetectorConstruction * GetInstance()
G4LogicalVolume * GetDetectorLogicalVolume()
void SetDetectorSize(G4double sizeX, G4double sizeY, G4double sizeZ)
G4GLOB_DLL std::ostream G4cout
void SetPhantomPosition(G4ThreeVector)
void SetDetectorToPhantomPosition(G4ThreeVector DetectorToPhantomPosition)
HadrontherapyDetectorSD * detectorSD
bool IsInside(G4double detectorX, G4double detectorY, G4double detectorZ, G4double phantomX, G4double phantomY, G4double phantomZ, G4ThreeVector pos)
G4bool SetPhantomMaterial(G4String material)
void SetDetectorPosition()
G4ThreeVector GetDetectorToPhantomPosition()
void InitializeDetectorROGeometry(HadrontherapyDetectorROGeometry *, G4ThreeVector detectorToWorldPosition)
void SetVoxelSize(G4double sizeX, G4double sizeY, G4double sizeZ)
G4ThreeVector GetDetectorToWorldPosition()
~HadrontherapyDetectorConstruction()