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 );
171 void G4PhantomParameterisation::
172 ComputeVoxelIndices(
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()",
212 else if( std::fabs(contX-
fNoVoxelX*fVoxelHalfX) >= toleranceForWarning
213 || std::fabs(contY-
fNoVoxelY*fVoxelHalfY) >= toleranceForWarning
214 || std::fabs(contZ-
fNoVoxelZ*fVoxelHalfZ) >= toleranceForWarning )
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()",
386 void 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()",