63 : motherPhys(physicalTreatmentRoom),
64 detectorSD(0), detectorROGeometry(0), matrix(0),
65 phantom(0), detector(0),
66 phantomLogicalVolume(0), detectorLogicalVolume(0),
67 phantomPhysicalVolume(0), detectorPhysicalVolume(0),
130 "phantomLog", 0, 0, 0);
143 red -> SetVisibility(
true);
144 red -> SetForceSolid(
true);
145 red -> SetForceWireframe(
true);
193 skyBlue -> SetVisibility(
true);
194 skyBlue -> SetForceSolid(
true);
216 detectorToWorldPosition)
239 G4Exception(
"HadrontherapyDetectorConstruction::ParametersCheck()",
"Hadrontherapy0001",
FatalException,
"Error: Detector is not fully inside Phantom!");
244 G4Exception(
"HadrontherapyDetectorConstruction::ParametersCheck()",
"Hadrontherapy0002",
FatalException,
"Error: Detector X size must be bigger or equal than that of Voxel X!");
247 G4Exception(
" HadrontherapyDetectorConstruction::ParametersCheck()",
"Hadrontherapy0003",
FatalException,
"Error: Detector Y size must be bigger or equal than that of Voxel Y!");
250 G4Exception(
" HadrontherapyDetectorConstruction::ParametersCheck()",
"Hadrontherapy0004",
FatalException,
"Error: Detector Z size must be bigger or equal than that of Voxel Z!");
269 G4cout <<
"The material of Phantom/Detector has been changed to " << material <<
G4endl;
274 G4cout <<
"WARNING: material \"" << material <<
"\" doesn't exist in NIST elements/materials"
275 " table [located in $G4INSTALL/source/materials/src/G4NistMaterialBuilder.cc]" <<
G4endl;
276 G4cout <<
"Use command \"/parameter/nist\" to see full materials list!" <<
G4endl;
394 #ifdef G4ANALYSIS_USE_ROOT
413 G4cout << thePVStore->size() <<
" physical volumes are defined" <<
G4endl;
414 G4bool overlapFlag =
false;
417 for (
size_t i=0;i<thePVStore->size();i++)
420 overlapFlag = (*thePVStore)[i]->CheckOverlaps(res,tol,
true) | overlapFlag; }
422 G4cout <<
"Check: there are overlapping volumes" <<
G4endl;
429 G4cout <<
"The (X,Y,Z) dimensions of the phantom are : (" <<
434 G4cout <<
"The (X,Y,Z) dimensions of the detector are : (" <<
439 G4cout <<
"Displacement between Phantom and World is: ";
444 G4cout <<
"The (X,Y,Z) sizes of the Voxels are: (" <<
449 G4cout <<
"The number of Voxels along (X,Y,Z) is: (" <<
G4double sizeOfVoxelAlongZ
static HadrontherapyAnalysisManager * GetInstance()
Get the pointer to the analysis manager.
void SetPhantomSize(G4double sizeX, G4double sizeY, G4double sizeZ)
G4VPhysicalVolume * motherPhys
static HadrontherapyDetectorConstruction * instance
HadrontherapyDetectorMessenger * detectorMessenger
CLHEP::Hep3Vector G4ThreeVector
static HadrontherapyLet * GetInstance()
const G4VUserDetectorConstruction * GetUserDetectorConstruction() const
G4int numberOfVoxelsAlongX
HadrontherapyMatrix * matrix
G4double sizeOfVoxelAlongX
void Initialize(G4ThreeVector detectorPos, G4double detectorDimX, G4double detectorDimY, G4double detectorDimZ, G4int numberOfVoxelsX, G4int numberOfVoxelsY, G4int numberOfVoxelsZ)
HadrontherapyDetectorConstruction(G4VPhysicalVolume *)
static HadrontherapyDetectorConstruction * GetInstance()
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4int numberOfVoxelsAlongZ
void SetDetectorSize(G4double sizeX, G4double sizeY, G4double sizeZ)
static G4NistManager * Instance()
static G4PhysicalVolumeStore * GetInstance()
static HadrontherapyMatrix * GetInstance()
G4GLOB_DLL std::ostream G4cout
G4LogicalVolume * detectorLogicalVolume
G4Material * detectorMaterial
void SetPhantomPosition(G4ThreeVector)
G4double sizeOfVoxelAlongY
G4ThreeVector detectorPosition
G4ThreeVector detectorToPhantomPosition
void SetDetectorToPhantomPosition(G4ThreeVector DetectorToPhantomPosition)
bool IsInside(G4double detectorX, G4double detectorY, G4double detectorZ, G4double phantomX, G4double phantomY, G4double phantomZ, G4ThreeVector pos)
G4VisAttributes * skyBlue
G4VPhysicalVolume * phantomPhysicalVolume
HadrontherapyDetectorROGeometry * detectorROGeometry
G4bool SetPhantomMaterial(G4String material)
G4VPhysicalVolume * detectorPhysicalVolume
G4VUserParallelWorld * GetParallelWorld(G4int i) const
static G4GeometryManager * GetInstance()
G4Material * phantomMaterial
G4LogicalVolume * phantomLogicalVolume
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
void SetDetectorPosition()
static G4RunManager * GetRunManager()
A class for connecting the simulation to an analysis package.
void InitializeDetectorROGeometry(HadrontherapyDetectorROGeometry *, G4ThreeVector detectorToWorldPosition)
G4ThreeVector phantomPosition
void SetVoxelSize(G4double sizeX, G4double sizeY, G4double sizeZ)
G4ThreeVector GetDetectorToWorldPosition()
G4int numberOfVoxelsAlongY
~HadrontherapyDetectorConstruction()
static const G4double pos