75 CheckCopyNo( copyNo );
80 ComputeVoxelIndices( copyNo, nx, ny, nz );
93 CheckCopyNo( copyNo );
104 CheckCopyNo( copyNo );
138 void G4PartialPhantomParameterisation::
139 ComputeVoxelIndices(
const G4int copyNo,
size_t& nx,
140 size_t& ny,
size_t& nz )
const
142 CheckCopyNo( copyNo );
144 std::multimap<G4int,G4int>::const_iterator ite =
145 fFilledIDs.lower_bound(
size_t(copyNo));
146 G4int dist = std::distance( fFilledIDs.begin(), ite );
150 G4int ifmin = (*ite).second;
154 nvoxXprev = (*ite).first;
159 nx = ifmin+copyNo-nvoxXprev-1;
197 if( localDir.
x() < 0 )
214 if( localDir.
y() < 0 )
231 if( localDir.
z() < 0 )
282 std::ostringstream message;
283 message <<
"Corrected the copy number! It was negative or too big."
285 <<
" LocalPoint: " << localPoint <<
G4endl
286 <<
" LocalDir: " << localDir <<
G4endl
289 <<
" LocalPoint - wall: "
293 G4Exception(
"G4PartialPhantomParameterisation::GetReplicaNo()",
298 std::multimap<G4int,G4int>::iterator ite = fFilledIDs.begin();
306 ite = fFilledIDs.begin();
309 std::multimap<G4int,G4int>::iterator iteant = ite; iteant--;
310 G4int copyNo = (*iteant).first + 1 + ( nx - (*ite).second );
325 void G4PartialPhantomParameterisation::CheckCopyNo(
const G4int copyNo )
const
329 std::ostringstream message;
330 message <<
"Copy number is negative or too big!" <<
G4endl
331 <<
" Copy number: " << copyNo <<
G4endl
332 <<
" Total number of voxels: " <<
fNoVoxel;
333 G4Exception(
"G4PartialPhantomParameterisation::CheckCopyNo()",
void ComputeTransformation(const G4int, G4VPhysicalVolume *) const
size_t * fMaterialIndices
G4int GetReplicaNo(const G4ThreeVector &localPoint, const G4ThreeVector &localDir)
void SetTranslation(const G4ThreeVector &v)
G4PartialPhantomParameterisation()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
size_t GetMaterialIndex(size_t nx, size_t ny, size_t nz) const
G4Material * GetMaterial(size_t nx, size_t ny, size_t nz) const
void BuildContainerWalls()
~G4PartialPhantomParameterisation()
G4ThreeVector GetTranslation(const G4int copyNo) const
std::vector< G4Material * > fMaterials
G4Material * ComputeMaterial(const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=0)