47 : fVoxelHalfX(0.), fVoxelHalfY(0.), fVoxelHalfZ(0.),
48 fNoVoxelX(0), fNoVoxelY(0), fNoVoxelZ(0), fNoVoxelXY(0), fNoVoxel(0),
49 fMaterialIndices(0), fContainerSolid(0),
50 fContainerWallX(0.), fContainerWallY(0.), fContainerWallZ(0.),
51 bSkipEqualMaterials(true)
104 CheckCopyNo( copyNo );
110 ComputeVoxelIndices( copyNo, nx, ny, nz );
131 CheckCopyNo( copyNo );
142 CheckCopyNo( copyNo );
171void G4PhantomParameterisation::
172ComputeVoxelIndices(
const G4int copyNo,
size_t& nx,
173 size_t& ny,
size_t& nz )
const
175 CheckCopyNo( copyNo );
201 std::ostringstream message;
202 message <<
"Voxels do not fully fill the container: "
207 <<
" Maximum difference is: " << toleranceForError;
208 G4Exception(
"G4PhantomParameterisation::CheckVoxelsFillContainer()",
216 std::ostringstream message;
217 message <<
"Voxels do not fully fill the container: "
222 <<
" Maximum difference is: " << toleranceForWarning;
223 G4Exception(
"G4PhantomParameterisation::CheckVoxelsFillContainer()",
238 std::ostringstream message;
239 message <<
"Point outside voxels!" <<
G4endl
240 <<
" localPoint - " << localPoint
241 <<
" - is outside container solid: "
243 G4Exception(
"G4PhantomParameterisation::GetReplicaNo()",
"GeomNav0003",
277 if( localDir.
x() < 0 )
294 if( localDir.
y() < 0 )
311 if( localDir.
z() < 0 )
364 std::ostringstream message;
365 message <<
"Corrected the copy number! It was negative or too big" <<
G4endl
366 <<
" LocalPoint: " << localPoint <<
G4endl
367 <<
" LocalDir: " << localDir <<
G4endl
370 <<
" LocalPoint - wall: "
374 G4Exception(
"G4PhantomParameterisation::GetReplicaNo()",
386void G4PhantomParameterisation::CheckCopyNo(
const G4int copyNo )
const
390 std::ostringstream message;
391 message <<
"Copy number is negative or too big!" <<
G4endl
392 <<
" Copy number: " << copyNo <<
G4endl
393 <<
" Total number of voxels: " <<
fNoVoxel;
394 G4Exception(
"G4PhantomParameterisation::CheckCopyNo()",
G4double GetSurfaceTolerance() const
static G4GeometryTolerance * GetInstance()
G4VSolid * GetSolid() const
size_t * fMaterialIndices
virtual G4int GetReplicaNo(const G4ThreeVector &localPoint, const G4ThreeVector &localDir)
void BuildContainerSolid(G4VPhysicalVolume *pPhysicalVol)
void CheckVoxelsFillContainer(G4double contX, G4double contY, G4double contZ) const
~G4PhantomParameterisation()
G4Material * GetMaterial(size_t nx, size_t ny, size_t nz) const
virtual G4VSolid * ComputeSolid(const G4int, G4VPhysicalVolume *)
G4ThreeVector GetTranslation(const G4int copyNo) const
virtual G4Material * ComputeMaterial(const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=0)
size_t GetMaterialIndex(size_t nx, size_t ny, size_t nz) const
virtual void ComputeTransformation(const G4int, G4VPhysicalVolume *) const
std::vector< G4Material * > fMaterials
G4PhantomParameterisation()
G4VSolid * fContainerSolid
G4LogicalVolume * GetLogicalVolume() const
void SetTranslation(const G4ThreeVector &v)
virtual EInside Inside(const G4ThreeVector &p) const =0
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)