29#ifndef RadiobiologyVoxelizedSensitiveDetector_h
30#define RadiobiologyVoxelizedSensitiveDetector_h 1
32#include "G4ThreeVector.hh"
42class DetectorConstruction;
43class VoxelizedSensitiveDetectorMessenger;
69class VoxelizedSensitiveDetector
94 double yWidth,
double zWidth);
Mandatory class for the construction of geometry.
Singleton class performing the voxelization of the world volume and tracking of a voxel index given t...
void InitializeWorldPtr(G4VPhysicalVolume *pWorld)
Method to properly initialize the pointer to the World physical volume.
G4VPhysicalVolume * fVoxelizedDetectorXDivisionPhys
G4VPhysicalVolume * fVoxelizedDetectorZDivisionPhys
G4double GetVoxelWidthZ() const
Method to get Z width of the voxel.
static VoxelizedSensitiveDetector * GetInstance()
Static method to retrieve a pointer to the only object existing in the simulation.
G4double GetVoxelNumberAlongZ() const
Method to get the voxel number along Z axis.
G4bool ConstructVoxelizedDetector()
Private method to construct the voxelized detector.
G4int GetTotalVoxelNumber() const
Method to get the total voxel number.
G4LogicalVolume * fSensitiveLogicalVolume
void UpdateVoxelVolume()
Private method to calculate the total volume of a voxel given the parameters saved inside the object.
G4Box * fVoxelizedDetectorZDivision
G4Box * fVoxelizedDetectorYDivision
G4double GetVoxelWidthX() const
Method to get X width of the voxel.
VoxelizedSensitiveDetectorMessenger * fVoxelizedSensitiveDetectorMessenger
void ConstructSD()
Method to make the proper volume sensitive to allow scoring.
DetectorConstruction * fDetector
G4double GetVoxelNumberAlongX() const
Method to get the voxel number along X axis.
G4int GetThisVoxelNumber(G4int x, G4int j, G4int k) const
Method to get the absolute voxel index given its indexes in the three dimensions.
G4double GetVoxelMass() const
Method to get the mass of a voxel.
void SetVoxelWidthY(G4double voxWidthY)
Method to set the voxel Y width.
static VoxelizedSensitiveDetector * fInstance
void CalculateVoxelNumber()
Private method to calculate the total voxel number given the parameters saved inside the object.
static VoxelizedSensitiveDetector * CreateInstance(DetectorConstruction *det, double xWidth, double yWidth, double zWidth)
Static method to create the pointer to the only object existing in the simulation.
void ConstructZDivision()
Private method to further slice the Y columns along the Z axis, creating some boxes of material.
G4double GetVoxelNumberAlongY() const
Method to get the voxel number along Y axis.
VoxelizedSensitiveDetector(DetectorConstruction *det, double xWidth, double yWidth, double zWidth)
Private constructor using a pointer to DetectorConstruction and the three dimensions for one voxel.
~VoxelizedSensitiveDetector()
Destructor.
G4LogicalVolume * fWorldLogical
void ConstructYDivision()
Private method to further slice the X slices along the Y axis, creating some "columns" of material.
G4LogicalVolume * fVoxelizedDetectorXDivisionLog
void Construct()
Method to construct all the volumes for the voxelization of the geometry.
G4Box * fVoxelizedDetectorXDivision
G4double GetVoxelVolume() const
Method to get total voxel volume.
G4VPhysicalVolume * fVoxelizedDetectorYDivisionPhys
void SetVoxelWidth(G4ThreeVector voxWidth)
Method to set the voxel shape to be a box with given sides.
void UpdateVoxelizedGeometry()
Method to update voxelized geometry.
void SetVoxelWidthX(G4double voxWidthX)
Method to set the voxel X width.
G4double GetVoxelWidthY() const
Method to get Y width of the voxel.
void SetVoxelWidthZ(G4double voxWidthZ)
Method to set the voxel Z width.
G4double GetVoxelDensity() const
Method to get the density of a voxel.
void ConstructXDivision()
Private method to slice the world volume along the X axis.
G4LogicalVolume * fVoxelizedDetectorYDivisionLog
G4ThreeVector GetVoxelWidth() const
Method to get the three vector containing the dimensions for the voxel.
G4LogicalVolume * fVoxelizedDetectorZDivisionLog