133 size_t& ny,
size_t& nz )
const
137 auto ite =
fFilledIDs.lower_bound(
size_t(copyNo));
142 G4int ifmin = (*ite).second;
147 nvoxXprev = (*ite).first;
154 nx = ifmin+copyNo-nvoxXprev-1;
192 if( localDir.
x() < 0 )
209 if( localDir.
y() < 0 )
226 if( localDir.
z() < 0 )
277 std::ostringstream message;
278 message <<
"Corrected the copy number! It was negative or too big."
280 <<
" LocalPoint: " << localPoint <<
G4endl
281 <<
" LocalDir: " << localDir <<
G4endl
284 <<
" LocalPoint - wall: "
288 G4Exception(
"G4PartialPhantomParameterisation::GetReplicaNo()",
303 auto iteant = ite; iteant--;
304 G4int copyNo = (*iteant).first + 1 + ( nx - (*ite).second );
323 std::ostringstream message;
324 message <<
"Copy number is negative or too big!" <<
G4endl
325 <<
" Copy number: " << copyNo <<
G4endl
326 <<
" Total number of voxels: " <<
fNoVoxels;
327 G4Exception(
"G4PartialPhantomParameterisation::CheckCopyNo()",
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4Material * ComputeMaterial(const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=nullptr)
G4PartialPhantomParameterisation()
void ComputeVoxelIndices(const G4int copyNo, size_t &nx, size_t &ny, size_t &nz) const
void ComputeTransformation(const G4int, G4VPhysicalVolume *) const
std::multimap< G4int, G4int > fFilledIDs
size_t GetMaterialIndex(size_t nx, size_t ny, size_t nz) const
void CheckCopyNo(const G4int copyNo) const
G4int GetReplicaNo(const G4ThreeVector &localPoint, const G4ThreeVector &localDir)
void BuildContainerWalls()
G4ThreeVector GetTranslation(const G4int copyNo) const
G4Material * GetMaterial(size_t nx, size_t ny, size_t nz) const
~G4PartialPhantomParameterisation()
size_t * fMaterialIndices
std::vector< G4Material * > fMaterials
void SetTranslation(const G4ThreeVector &v)