67 : motherPhys(physicalTreatmentRoom),
68 detectorSD(0), detectorROGeometry(0), matrix(0),
69 phantom(0), detector(0),
70 phantomLogicalVolume(0), detectorLogicalVolume(0),
71 phantomPhysicalVolume(0), detectorPhysicalVolume(0),
137 "phantomLog", 0, 0, 0);
150 red -> SetVisibility(
true);
151 red -> SetForceSolid(
true);
152 red -> SetForceWireframe(
true);
204 skyBlue -> SetVisibility(
true);
205 skyBlue -> SetForceSolid(
true);
227 detectorToWorldPosition)
250 G4Exception(
"HadrontherapyDetectorConstruction::ParametersCheck()",
"Hadrontherapy0001",
FatalException,
"Error: Detector is not fully inside Phantom!");
255 G4Exception(
"HadrontherapyDetectorConstruction::ParametersCheck()",
"Hadrontherapy0002",
FatalException,
"Error: Detector X size must be bigger or equal than that of Voxel X!");
258 G4Exception(
" HadrontherapyDetectorConstruction::ParametersCheck()",
"Hadrontherapy0003",
FatalException,
"Error: Detector Y size must be bigger or equal than that of Voxel Y!");
261 G4Exception(
" HadrontherapyDetectorConstruction::ParametersCheck()",
"Hadrontherapy0004",
FatalException,
"Error: Detector Z size must be bigger or equal than that of Voxel Z!");
280 G4cout <<
"The material of Phantom/Detector has been changed to " << material <<
G4endl;
285 G4cout <<
"WARNING: material \"" << material <<
"\" doesn't exist in NIST elements/materials"
286 " table [located in $G4INSTALL/source/materials/src/G4NistMaterialBuilder.cc]" <<
G4endl;
287 G4cout <<
"Use command \"/parameter/nist\" to see full materials list!" <<
G4endl;
419 G4cout << thePVStore->size() <<
" physical volumes are defined" <<
G4endl;
420 G4bool overlapFlag =
false;
423 for (
size_t i=0;i<thePVStore->size();i++)
426 overlapFlag = (*thePVStore)[i]->CheckOverlaps(res,tol,
true) | overlapFlag; }
428 G4cout <<
"Check: there are overlapping volumes" <<
G4endl;
435 G4cout <<
"The (X,Y,Z) dimensions of the phantom are : (" <<
440 G4cout <<
"The (X,Y,Z) dimensions of the detector are : (" <<
445 G4cout <<
"Displacement between Phantom and World is: ";
450 G4cout <<
"The (X,Y,Z) sizes of the Voxels are: (" <<
455 G4cout <<
"The number of Voxels along (X,Y,Z) is: (" <<
void SetDetectorPosition()
void AddRootLogicalVolume(G4LogicalVolume *lv)
static G4RunManager * GetRunManager()
G4int numberOfVoxelsAlongX
G4VUserParallelWorld * GetParallelWorld(G4int i) const
G4Material * phantomMaterial
void SetPhantomPosition(G4ThreeVector)
CLHEP::Hep3Vector G4ThreeVector
G4double sizeOfVoxelAlongX
G4bool SetPhantomMaterial(G4String material)
static const G4double pos
static HadrontherapyMatrix * GetInstance()
void SetVoxelSize(G4double sizeX, G4double sizeY, G4double sizeZ)
HadrontherapyDetectorConstruction(G4VPhysicalVolume *)
G4ThreeVector GetDetectorToWorldPosition()
G4Material * detectorMaterial
G4LogicalVolume * phantomLogicalVolume
~HadrontherapyDetectorConstruction()
G4ThreeVector detectorPosition
HadrontherapyDetectorMessenger * detectorMessenger
bool IsInside(G4double detectorX, G4double detectorY, G4double detectorZ, G4double phantomX, G4double phantomY, G4double phantomZ, G4ThreeVector pos)
void InitializeDetectorROGeometry(HadrontherapyDetectorROGeometry *, G4ThreeVector detectorToWorldPosition)
G4LogicalVolume * detectorLogicalVolume
static HadrontherapyLet * GetInstance()
G4ThreeVector phantomPosition
static constexpr double um
HadrontherapyDetectorROGeometry * detectorROGeometry
static HadrontherapyDetectorConstruction * GetInstance()
static HadrontherapyDetectorConstruction * instance
static G4GeometryManager * GetInstance()
G4int numberOfVoxelsAlongY
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
static G4PhysicalVolumeStore * GetInstance()
G4VisAttributes * skyBlue
G4VPhysicalVolume * detectorPhysicalVolume
void SetDetectorToPhantomPosition(G4ThreeVector DetectorToPhantomPosition)
G4GLOB_DLL std::ostream G4cout
static constexpr double cm
G4VPhysicalVolume * motherPhys
G4int numberOfVoxelsAlongZ
void SetPhantomSize(G4double sizeX, G4double sizeY, G4double sizeZ)
void SetDetectorSize(G4double sizeX, G4double sizeY, G4double sizeZ)
G4double sizeOfVoxelAlongZ
G4double sizeOfVoxelAlongY
static HadrontherapyAnalysisManager * GetInstance()
const G4VUserDetectorConstruction * GetUserDetectorConstruction() const
G4VPhysicalVolume * phantomPhysicalVolume
G4ThreeVector detectorToPhantomPosition
static G4NistManager * Instance()
HadrontherapyMatrix * matrix
void Initialize(G4ThreeVector detectorPos, G4double detectorDimX, G4double detectorDimY, G4double detectorDimZ, G4int numberOfVoxelsX, G4int numberOfVoxelsY, G4int numberOfVoxelsZ)