Geant4-11
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes
G4PartialPhantomParameterisation Class Reference

#include <G4PartialPhantomParameterisation.hh>

Inheritance diagram for G4PartialPhantomParameterisation:
G4PhantomParameterisation G4VPVParameterisation

Public Member Functions

void BuildContainerSolid (G4VPhysicalVolume *pPhysicalVol)
 
void BuildContainerSolid (G4VSolid *pMotherSolid)
 
void BuildContainerWalls ()
 
void CheckVoxelsFillContainer (G4double contX, G4double contY, G4double contZ) const
 
void ComputeDimensions (G4Box &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Cons &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Ellipsoid &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Hype &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Orb &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Para &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Polycone &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Polyhedra &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Sphere &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Torus &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Trap &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Trd &, const G4int, const G4VPhysicalVolume *) const
 
void ComputeDimensions (G4Tubs &, const G4int, const G4VPhysicalVolume *) const
 
G4MaterialComputeMaterial (const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=nullptr)
 
virtual G4VSolidComputeSolid (const G4int, G4VPhysicalVolume *)
 
void ComputeTransformation (const G4int, G4VPhysicalVolume *) const
 
 G4PartialPhantomParameterisation ()
 
G4VSolidGetContainerSolid () const
 
G4MaterialGetMaterial (size_t copyNo) const
 
G4MaterialGetMaterial (size_t nx, size_t ny, size_t nz) const
 
size_t GetMaterialIndex (size_t copyNo) const
 
size_t GetMaterialIndex (size_t nx, size_t ny, size_t nz) const
 
size_t * GetMaterialIndices () const
 
std::vector< G4Material * > GetMaterials () const
 
virtual G4VVolumeMaterialScannerGetMaterialScanner ()
 
size_t GetNoVoxels () const
 
size_t GetNoVoxelsX () const
 
size_t GetNoVoxelsY () const
 
size_t GetNoVoxelsZ () const
 
G4int GetReplicaNo (const G4ThreeVector &localPoint, const G4ThreeVector &localDir)
 
G4ThreeVector GetTranslation (const G4int copyNo) const
 
G4double GetVoxelHalfX () const
 
G4double GetVoxelHalfY () const
 
G4double GetVoxelHalfZ () const
 
virtual G4bool IsNested () const
 
void SetFilledIDs (std::multimap< G4int, G4int > fid)
 
void SetFilledMins (std::map< G4int, std::map< G4int, G4int > > fmins)
 
void SetMaterialIndices (size_t *matInd)
 
void SetMaterials (std::vector< G4Material * > &mates)
 
void SetNoVoxels (size_t nx, size_t ny, size_t nz)
 
void SetSkipEqualMaterials (G4bool skip)
 
void SetVoxelDimensions (G4double halfx, G4double halfy, G4double halfz)
 
G4bool SkipEqualMaterials () const
 
 ~G4PartialPhantomParameterisation ()
 

Protected Attributes

G4bool bSkipEqualMaterials = true
 
G4VSolidfContainerSolid = nullptr
 
G4double fContainerWallX =0.0
 
G4double fContainerWallY =0.0
 
G4double fContainerWallZ =0.0
 
size_t * fMaterialIndices = nullptr
 
std::vector< G4Material * > fMaterials
 
size_t fNoVoxels = 0
 
size_t fNoVoxelsX = 0
 
size_t fNoVoxelsXY = 0
 
size_t fNoVoxelsY = 0
 
size_t fNoVoxelsZ = 0
 
G4double fVoxelHalfX = 0.0
 
G4double fVoxelHalfY = 0.0
 
G4double fVoxelHalfZ = 0.0
 
G4double kCarTolerance
 

Private Member Functions

void CheckCopyNo (const G4int copyNo) const
 
void ComputeVoxelIndices (const G4int copyNo, size_t &nx, size_t &ny, size_t &nz) const
 

Private Attributes

std::multimap< G4int, G4intfFilledIDs
 
std::map< G4int, std::map< G4int, G4int > > fFilledMins
 

Detailed Description

Definition at line 52 of file G4PartialPhantomParameterisation.hh.

Constructor & Destructor Documentation

◆ G4PartialPhantomParameterisation()

G4PartialPhantomParameterisation::G4PartialPhantomParameterisation ( )

◆ ~G4PartialPhantomParameterisation()

G4PartialPhantomParameterisation::~G4PartialPhantomParameterisation ( )

Definition at line 51 of file G4PartialPhantomParameterisation.cc.

52{
53}

Member Function Documentation

◆ BuildContainerSolid() [1/2]

void G4PhantomParameterisation::BuildContainerSolid ( G4VPhysicalVolume pPhysicalVol)
inherited

Definition at line 55 of file G4PhantomParameterisation.cc.

References G4PhantomParameterisation::fContainerSolid, G4PhantomParameterisation::fContainerWallX, G4PhantomParameterisation::fContainerWallY, G4PhantomParameterisation::fContainerWallZ, G4PhantomParameterisation::fNoVoxelsX, G4PhantomParameterisation::fNoVoxelsY, G4PhantomParameterisation::fNoVoxelsZ, G4PhantomParameterisation::fVoxelHalfX, G4PhantomParameterisation::fVoxelHalfY, G4PhantomParameterisation::fVoxelHalfZ, G4VPhysicalVolume::GetLogicalVolume(), and G4LogicalVolume::GetSolid().

◆ BuildContainerSolid() [2/2]

void G4PhantomParameterisation::BuildContainerSolid ( G4VSolid pMotherSolid)
inherited

◆ BuildContainerWalls()

void G4PartialPhantomParameterisation::BuildContainerWalls ( )

◆ CheckCopyNo()

void G4PartialPhantomParameterisation::CheckCopyNo ( const G4int  copyNo) const
private

Definition at line 319 of file G4PartialPhantomParameterisation.cc.

320{
321 if( copyNo < 0 || copyNo >= G4int(fNoVoxels) )
322 {
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()",
328 "GeomNav0002", FatalErrorInArgument, message);
329 }
330}
@ FatalErrorInArgument
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57

References FatalErrorInArgument, G4PhantomParameterisation::fNoVoxels, G4endl, and G4Exception().

Referenced by ComputeMaterial(), ComputeVoxelIndices(), GetMaterialIndex(), and GetTranslation().

◆ CheckVoxelsFillContainer()

void G4PhantomParameterisation::CheckVoxelsFillContainer ( G4double  contX,
G4double  contY,
G4double  contZ 
) const
inherited

Definition at line 175 of file G4PhantomParameterisation.cc.

177{
178 G4double toleranceForWarning = 0.25*kCarTolerance;
179
180 // Any bigger value than 0.25*kCarTolerance will give a warning in
181 // G4NormalNavigation::ComputeStep(), because the Inverse of a container
182 // translation that is Z+epsilon gives -Z+epsilon (and the maximum tolerance
183 // in G4Box::Inside is 0.5*kCarTolerance
184 //
185 G4double toleranceForError = 1.*kCarTolerance;
186
187 // Any bigger value than kCarTolerance will give an error in GetReplicaNo()
188 //
189 if( std::fabs(contX-fNoVoxelsX*fVoxelHalfX) >= toleranceForError
190 || std::fabs(contY-fNoVoxelsY*fVoxelHalfY) >= toleranceForError
191 || std::fabs(contZ-fNoVoxelsZ*fVoxelHalfZ) >= toleranceForError )
192 {
193 std::ostringstream message;
194 message << "Voxels do not fully fill the container: "
196 << " DiffX= " << contX-fNoVoxelsX*fVoxelHalfX << G4endl
197 << " DiffY= " << contY-fNoVoxelsY*fVoxelHalfY << G4endl
198 << " DiffZ= " << contZ-fNoVoxelsZ*fVoxelHalfZ << G4endl
199 << " Maximum difference is: " << toleranceForError;
200 G4Exception("G4PhantomParameterisation::CheckVoxelsFillContainer()",
201 "GeomNav0002", FatalException, message);
202
203 }
204 else if( std::fabs(contX-fNoVoxelsX*fVoxelHalfX) >= toleranceForWarning
205 || std::fabs(contY-fNoVoxelsY*fVoxelHalfY) >= toleranceForWarning
206 || std::fabs(contZ-fNoVoxelsZ*fVoxelHalfZ) >= toleranceForWarning )
207 {
208 std::ostringstream message;
209 message << "Voxels do not fully fill the container: "
211 << " DiffX= " << contX-fNoVoxelsX*fVoxelHalfX << G4endl
212 << " DiffY= " << contY-fNoVoxelsY*fVoxelHalfY << G4endl
213 << " DiffZ= " << contZ-fNoVoxelsZ*fVoxelHalfZ << G4endl
214 << " Maximum difference is: " << toleranceForWarning;
215 G4Exception("G4PhantomParameterisation::CheckVoxelsFillContainer()",
216 "GeomNav1002", JustWarning, message);
217 }
218}
@ JustWarning
@ FatalException
double G4double
Definition: G4Types.hh:83
G4String GetName() const

References FatalException, G4PhantomParameterisation::fContainerSolid, G4PhantomParameterisation::fNoVoxelsX, G4PhantomParameterisation::fNoVoxelsY, G4PhantomParameterisation::fNoVoxelsZ, G4PhantomParameterisation::fVoxelHalfX, G4PhantomParameterisation::fVoxelHalfY, G4PhantomParameterisation::fVoxelHalfZ, G4endl, G4Exception(), G4VSolid::GetName(), JustWarning, and G4PhantomParameterisation::kCarTolerance.

◆ ComputeDimensions() [1/13]

void G4PhantomParameterisation::ComputeDimensions ( G4Box ,
const  G4int,
const G4VPhysicalVolume  
) const
inlinevirtualinherited

Reimplemented from G4VPVParameterisation.

Definition at line 84 of file G4PhantomParameterisation.hh.

85 {}

◆ ComputeDimensions() [2/13]

void G4PhantomParameterisation::ComputeDimensions ( G4Cons ,
const  G4int,
const G4VPhysicalVolume  
) const
inlinevirtualinherited

Reimplemented from G4VPVParameterisation.

Definition at line 92 of file G4PhantomParameterisation.hh.

93 {}

◆ ComputeDimensions() [3/13]

void G4PhantomParameterisation::ComputeDimensions ( G4Ellipsoid ,
const  G4int,
const G4VPhysicalVolume  
) const
inlinevirtualinherited

Reimplemented from G4VPVParameterisation.

Definition at line 98 of file G4PhantomParameterisation.hh.

99 {}

◆ ComputeDimensions() [4/13]

void G4PhantomParameterisation::ComputeDimensions ( G4Hype ,
const  G4int,
const G4VPhysicalVolume  
) const
inlinevirtualinherited

Reimplemented from G4VPVParameterisation.

Definition at line 104 of file G4PhantomParameterisation.hh.

105 {}

◆ ComputeDimensions() [5/13]

void G4PhantomParameterisation::ComputeDimensions ( G4Orb ,
const  G4int,
const G4VPhysicalVolume  
) const
inlinevirtualinherited

Reimplemented from G4VPVParameterisation.

Definition at line 94 of file G4PhantomParameterisation.hh.

95 {}

◆ ComputeDimensions() [6/13]

void G4PhantomParameterisation::ComputeDimensions ( G4Para ,
const  G4int,
const G4VPhysicalVolume  
) const
inlinevirtualinherited

Reimplemented from G4VPVParameterisation.

Definition at line 102 of file G4PhantomParameterisation.hh.

103 {}

◆ ComputeDimensions() [7/13]

void G4PhantomParameterisation::ComputeDimensions ( G4Polycone ,
const  G4int,
const G4VPhysicalVolume  
) const
inlinevirtualinherited

Reimplemented from G4VPVParameterisation.

Definition at line 106 of file G4PhantomParameterisation.hh.

107 {}

◆ ComputeDimensions() [8/13]

void G4PhantomParameterisation::ComputeDimensions ( G4Polyhedra ,
const  G4int,
const G4VPhysicalVolume  
) const
inlinevirtualinherited

Reimplemented from G4VPVParameterisation.

Definition at line 108 of file G4PhantomParameterisation.hh.

109 {}

◆ ComputeDimensions() [9/13]

void G4PhantomParameterisation::ComputeDimensions ( G4Sphere ,
const  G4int,
const G4VPhysicalVolume  
) const
inlinevirtualinherited

Reimplemented from G4VPVParameterisation.

Definition at line 96 of file G4PhantomParameterisation.hh.

97 {}

◆ ComputeDimensions() [10/13]

void G4PhantomParameterisation::ComputeDimensions ( G4Torus ,
const  G4int,
const G4VPhysicalVolume  
) const
inlinevirtualinherited

Reimplemented from G4VPVParameterisation.

Definition at line 100 of file G4PhantomParameterisation.hh.

101 {}

◆ ComputeDimensions() [11/13]

void G4PhantomParameterisation::ComputeDimensions ( G4Trap ,
const  G4int,
const G4VPhysicalVolume  
) const
inlinevirtualinherited

Reimplemented from G4VPVParameterisation.

Definition at line 90 of file G4PhantomParameterisation.hh.

91 {}

◆ ComputeDimensions() [12/13]

void G4PhantomParameterisation::ComputeDimensions ( G4Trd ,
const  G4int,
const G4VPhysicalVolume  
) const
inlinevirtualinherited

Reimplemented from G4VPVParameterisation.

Definition at line 88 of file G4PhantomParameterisation.hh.

89 {}

◆ ComputeDimensions() [13/13]

void G4PhantomParameterisation::ComputeDimensions ( G4Tubs ,
const  G4int,
const G4VPhysicalVolume  
) const
inlinevirtualinherited

Reimplemented from G4VPVParameterisation.

Definition at line 86 of file G4PhantomParameterisation.hh.

87 {}

◆ ComputeMaterial()

G4Material * G4PartialPhantomParameterisation::ComputeMaterial ( const G4int  repNo,
G4VPhysicalVolume currentVol,
const G4VTouchable parentTouch = nullptr 
)
virtual

Reimplemented from G4PhantomParameterisation.

Definition at line 83 of file G4PartialPhantomParameterisation.cc.

85{
86 CheckCopyNo( copyNo );
87 auto matIndex = GetMaterialIndex(copyNo);
88
89 return fMaterials[ matIndex ];
90}
size_t GetMaterialIndex(size_t nx, size_t ny, size_t nz) const
std::vector< G4Material * > fMaterials

References CheckCopyNo(), G4PhantomParameterisation::fMaterials, and GetMaterialIndex().

◆ ComputeSolid()

G4VSolid * G4PhantomParameterisation::ComputeSolid ( const  G4int,
G4VPhysicalVolume pPhysicalVol 
)
virtualinherited

Reimplemented from G4VPVParameterisation.

Definition at line 111 of file G4PhantomParameterisation.cc.

113{
114 return pPhysicalVol->GetLogicalVolume()->GetSolid();
115}
G4VSolid * GetSolid() const
G4LogicalVolume * GetLogicalVolume() const

References G4VPhysicalVolume::GetLogicalVolume(), and G4LogicalVolume::GetSolid().

◆ ComputeTransformation()

void G4PartialPhantomParameterisation::ComputeTransformation ( const G4int  copyNo,
G4VPhysicalVolume physVol 
) const
virtual

Reimplemented from G4PhantomParameterisation.

Definition at line 56 of file G4PartialPhantomParameterisation.cc.

58{
59 // Voxels cannot be rotated, return translation
60 //
61 G4ThreeVector trans = GetTranslation( copyNo );
62 physVol->SetTranslation( trans );
63}
G4ThreeVector GetTranslation(const G4int copyNo) const
void SetTranslation(const G4ThreeVector &v)

References GetTranslation(), and G4VPhysicalVolume::SetTranslation().

◆ ComputeVoxelIndices()

void G4PartialPhantomParameterisation::ComputeVoxelIndices ( const G4int  copyNo,
size_t &  nx,
size_t &  ny,
size_t &  nz 
) const
private

Definition at line 131 of file G4PartialPhantomParameterisation.cc.

134{
135 CheckCopyNo( copyNo );
136
137 auto ite = fFilledIDs.lower_bound(size_t(copyNo));
138 G4int dist = std::distance( fFilledIDs.cbegin(), ite );
139 nz = size_t( dist/fNoVoxelsY );
140 ny = size_t( dist%fNoVoxelsY );
141
142 G4int ifmin = (*ite).second;
143 G4int nvoxXprev;
144 if( dist != 0 )
145 {
146 ite--;
147 nvoxXprev = (*ite).first;
148 }
149 else
150 {
151 nvoxXprev = -1;
152 }
153
154 nx = ifmin+copyNo-nvoxXprev-1;
155}

References CheckCopyNo(), fFilledIDs, and G4PhantomParameterisation::fNoVoxelsY.

Referenced by GetTranslation().

◆ GetContainerSolid()

G4VSolid * G4PhantomParameterisation::GetContainerSolid ( ) const
inlineinherited

◆ GetMaterial() [1/2]

G4Material * G4PartialPhantomParameterisation::GetMaterial ( size_t  copyNo) const

Definition at line 123 of file G4PartialPhantomParameterisation.cc.

125{
126 return fMaterials[GetMaterialIndex(copyNo)];
127}

References G4PhantomParameterisation::fMaterials, and GetMaterialIndex().

◆ GetMaterial() [2/2]

G4Material * G4PartialPhantomParameterisation::GetMaterial ( size_t  nx,
size_t  ny,
size_t  nz 
) const

Definition at line 115 of file G4PartialPhantomParameterisation.cc.

117{
118 return fMaterials[GetMaterialIndex(nx,ny,nz)];
119}

References G4PhantomParameterisation::fMaterials, and GetMaterialIndex().

◆ GetMaterialIndex() [1/2]

size_t G4PartialPhantomParameterisation::GetMaterialIndex ( size_t  copyNo) const

Definition at line 94 of file G4PartialPhantomParameterisation.cc.

96{
97 CheckCopyNo( copyNo );
98
99 if( fMaterialIndices == nullptr ) { return 0; }
100
101 return *(fMaterialIndices+copyNo);
102}

References CheckCopyNo(), and G4PhantomParameterisation::fMaterialIndices.

◆ GetMaterialIndex() [2/2]

size_t G4PartialPhantomParameterisation::GetMaterialIndex ( size_t  nx,
size_t  ny,
size_t  nz 
) const

◆ GetMaterialIndices()

size_t * G4PhantomParameterisation::GetMaterialIndices ( ) const
inlineinherited

◆ GetMaterials()

std::vector< G4Material * > G4PhantomParameterisation::GetMaterials ( ) const
inlineinherited

◆ GetMaterialScanner()

G4VVolumeMaterialScanner * G4VPVParameterisation::GetMaterialScanner ( )
virtualinherited

Reimplemented in G4VNestedParameterisation.

Definition at line 62 of file G4VPVParameterisation.cc.

63{
64 return nullptr;
65}

Referenced by G4Region::ScanVolumeTree().

◆ GetNoVoxels()

size_t G4PhantomParameterisation::GetNoVoxels ( ) const
inlineinherited

◆ GetNoVoxelsX()

size_t G4PhantomParameterisation::GetNoVoxelsX ( ) const
inlineinherited

◆ GetNoVoxelsY()

size_t G4PhantomParameterisation::GetNoVoxelsY ( ) const
inlineinherited

◆ GetNoVoxelsZ()

size_t G4PhantomParameterisation::GetNoVoxelsZ ( ) const
inlineinherited

◆ GetReplicaNo()

G4int G4PartialPhantomParameterisation::GetReplicaNo ( const G4ThreeVector localPoint,
const G4ThreeVector localDir 
)
virtual

Reimplemented from G4PhantomParameterisation.

Definition at line 159 of file G4PartialPhantomParameterisation.cc.

161{
162 // Check the voxel numbers corresponding to localPoint
163 // When a particle is on a surface, it may be between -kCarTolerance and
164 // +kCartolerance. By a simple distance as:
165 // G4int nx = G4int( (localPoint.x()+)/fVoxelHalfX/2.);
166 // those between -kCartolerance and 0 will be placed on voxel N-1 and those
167 // between 0 and kCarTolerance on voxel N.
168 // To avoid precision problems place the tracks that are on the surface on
169 // voxel N-1 if they have negative direction and on voxel N if they have
170 // positive direction.
171 // Add +kCarTolerance so that they are first placed on voxel N, and then
172 // if the direction is negative substract 1
173
174 G4double fx = (localPoint.x()+fContainerWallX+kCarTolerance)/(fVoxelHalfX*2.);
175 G4int nx = G4int(fx);
176
177 G4double fy = (localPoint.y()+fContainerWallY+kCarTolerance)/(fVoxelHalfY*2.);
178 G4int ny = G4int(fy);
179
180 G4double fz = (localPoint.z()+fContainerWallZ+kCarTolerance)/(fVoxelHalfZ*2.);
181 G4int nz = G4int(fz);
182
183 // If it is on the surface side, check the direction: if direction is
184 // negative place it on the previous voxel (if direction is positive it is
185 // already in the next voxel...).
186 // Correct also cases where n = -1 or n = fNoVoxels. It is always traced to be
187 // due to multiple scattering: track is entering a voxel but multiple
188 // scattering changes the angle towards outside
189 //
190 if( fx - nx < kCarTolerance/fVoxelHalfX )
191 {
192 if( localDir.x() < 0 )
193 {
194 if( nx != 0 )
195 {
196 nx -= 1;
197 }
198 }
199 else
200 {
201 if( nx == G4int(fNoVoxelsX) )
202 {
203 nx -= 1;
204 }
205 }
206 }
207 if( fy - ny < kCarTolerance/fVoxelHalfY )
208 {
209 if( localDir.y() < 0 )
210 {
211 if( ny != 0 )
212 {
213 ny -= 1;
214 }
215 }
216 else
217 {
218 if( ny == G4int(fNoVoxelsY) )
219 {
220 ny -= 1;
221 }
222 }
223 }
224 if( fz - nz < kCarTolerance/fVoxelHalfZ )
225 {
226 if( localDir.z() < 0 )
227 {
228 if( nz != 0 )
229 {
230 nz -= 1;
231 }
232 }
233 else
234 {
235 if( nz == G4int(fNoVoxelsZ) )
236 {
237 nz -= 1;
238 }
239 }
240 }
241
242 // Check if there are still errors
243 //
244 G4bool isOK = true;
245 if( nx < 0 )
246 {
247 nx = 0;
248 isOK = false;
249 }
250 else if( nx >= G4int(fNoVoxelsX) )
251 {
252 nx = fNoVoxelsX-1;
253 isOK = false;
254 }
255 if( ny < 0 )
256 {
257 ny = 0;
258 isOK = false;
259 }
260 else if( ny >= G4int(fNoVoxelsY) )
261 {
262 ny = fNoVoxelsY-1;
263 isOK = false;
264 }
265 if( nz < 0 )
266 {
267 nz = 0;
268 isOK = false;
269 }
270 else if( nz >= G4int(fNoVoxelsZ) )
271 {
272 nz = fNoVoxelsZ-1;
273 isOK = false;
274 }
275 if( !isOK )
276 {
277 std::ostringstream message;
278 message << "Corrected the copy number! It was negative or too big."
279 << G4endl
280 << " LocalPoint: " << localPoint << G4endl
281 << " LocalDir: " << localDir << G4endl
282 << " Voxel container size: " << fContainerWallX
283 << " " << fContainerWallY << " " << fContainerWallZ << G4endl
284 << " LocalPoint - wall: "
285 << localPoint.x()-fContainerWallX << " "
286 << localPoint.y()-fContainerWallY << " "
287 << localPoint.z()-fContainerWallZ;
288 G4Exception("G4PartialPhantomParameterisation::GetReplicaNo()",
289 "GeomNav1002", JustWarning, message);
290 }
291
292 G4int nyz = nz*fNoVoxelsY+ny;
293 auto ite = fFilledIDs.cbegin();
294/*
295 for( ite = fFilledIDs.cbegin(); ite != fFilledIDs.cend(); ++ite )
296 {
297 G4cout << " G4PartialPhantomParameterisation::GetReplicaNo filled "
298 << (*ite).first << " , " << (*ite).second << std::endl;
299 }
300*/
301
302 advance(ite,nyz);
303 auto iteant = ite; iteant--;
304 G4int copyNo = (*iteant).first + 1 + ( nx - (*ite).second );
305/*
306 G4cout << " G4PartialPhantomParameterisation::GetReplicaNo getting copyNo "
307 << copyNo << " nyz " << nyz << " (*iteant).first "
308 << (*iteant).first << " (*ite).second " << (*ite).second << G4endl;
309
310 G4cout << " G4PartialPhantomParameterisation::GetReplicaNo " << copyNo
311 << " nx " << nx << " ny " << ny << " nz " << nz
312 << " localPoint " << localPoint << " localDir " << localDir << G4endl;
313*/
314 return copyNo;
315}
bool G4bool
Definition: G4Types.hh:86
double z() const
double x() const
double y() const

References G4PhantomParameterisation::fContainerWallX, G4PhantomParameterisation::fContainerWallY, G4PhantomParameterisation::fContainerWallZ, fFilledIDs, G4PhantomParameterisation::fNoVoxelsX, G4PhantomParameterisation::fNoVoxelsY, G4PhantomParameterisation::fNoVoxelsZ, G4PhantomParameterisation::fVoxelHalfX, G4PhantomParameterisation::fVoxelHalfY, G4PhantomParameterisation::fVoxelHalfZ, G4endl, G4Exception(), JustWarning, G4PhantomParameterisation::kCarTolerance, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

◆ GetTranslation()

G4ThreeVector G4PartialPhantomParameterisation::GetTranslation ( const G4int  copyNo) const

◆ GetVoxelHalfX()

G4double G4PhantomParameterisation::GetVoxelHalfX ( ) const
inlineinherited

◆ GetVoxelHalfY()

G4double G4PhantomParameterisation::GetVoxelHalfY ( ) const
inlineinherited

◆ GetVoxelHalfZ()

G4double G4PhantomParameterisation::GetVoxelHalfZ ( ) const
inlineinherited

◆ IsNested()

G4bool G4VPVParameterisation::IsNested ( ) const
virtualinherited

◆ SetFilledIDs()

void G4PartialPhantomParameterisation::SetFilledIDs ( std::multimap< G4int, G4int fid)
inline

Definition at line 78 of file G4PartialPhantomParameterisation.hh.

79 {
80 fFilledIDs = fid;
81 }

References fFilledIDs.

◆ SetFilledMins()

void G4PartialPhantomParameterisation::SetFilledMins ( std::map< G4int, std::map< G4int, G4int > >  fmins)
inline

Definition at line 83 of file G4PartialPhantomParameterisation.hh.

84 {
85 fFilledMins = fmins;
86 }
std::map< G4int, std::map< G4int, G4int > > fFilledMins

References fFilledMins.

◆ SetMaterialIndices()

void G4PhantomParameterisation::SetMaterialIndices ( size_t *  matInd)
inlineinherited

◆ SetMaterials()

void G4PhantomParameterisation::SetMaterials ( std::vector< G4Material * > &  mates)
inlineinherited

◆ SetNoVoxels()

void G4PhantomParameterisation::SetNoVoxels ( size_t  nx,
size_t  ny,
size_t  nz 
)
inherited

◆ SetSkipEqualMaterials()

void G4PhantomParameterisation::SetSkipEqualMaterials ( G4bool  skip)
inherited

◆ SetVoxelDimensions()

void G4PhantomParameterisation::SetVoxelDimensions ( G4double  halfx,
G4double  halfy,
G4double  halfz 
)
inherited

◆ SkipEqualMaterials()

G4bool G4PhantomParameterisation::SkipEqualMaterials ( ) const
inherited

Field Documentation

◆ bSkipEqualMaterials

G4bool G4PhantomParameterisation::bSkipEqualMaterials = true
protectedinherited

Definition at line 192 of file G4PhantomParameterisation.hh.

◆ fContainerSolid

G4VSolid* G4PhantomParameterisation::fContainerSolid = nullptr
protectedinherited

◆ fContainerWallX

G4double G4PhantomParameterisation::fContainerWallX =0.0
protectedinherited

◆ fContainerWallY

G4double G4PhantomParameterisation::fContainerWallY =0.0
protectedinherited

◆ fContainerWallZ

G4double G4PhantomParameterisation::fContainerWallZ =0.0
protectedinherited

◆ fFilledIDs

std::multimap<G4int,G4int> G4PartialPhantomParameterisation::fFilledIDs
private

◆ fFilledMins

std::map< G4int, std::map<G4int,G4int> > G4PartialPhantomParameterisation::fFilledMins
private

Definition at line 102 of file G4PartialPhantomParameterisation.hh.

Referenced by SetFilledMins().

◆ fMaterialIndices

size_t* G4PhantomParameterisation::fMaterialIndices = nullptr
protectedinherited

◆ fMaterials

std::vector<G4Material*> G4PhantomParameterisation::fMaterials
protectedinherited

◆ fNoVoxels

size_t G4PhantomParameterisation::fNoVoxels = 0
protectedinherited

◆ fNoVoxelsX

size_t G4PhantomParameterisation::fNoVoxelsX = 0
protectedinherited

◆ fNoVoxelsXY

size_t G4PhantomParameterisation::fNoVoxelsXY = 0
protectedinherited

◆ fNoVoxelsY

size_t G4PhantomParameterisation::fNoVoxelsY = 0
protectedinherited

◆ fNoVoxelsZ

size_t G4PhantomParameterisation::fNoVoxelsZ = 0
protectedinherited

◆ fVoxelHalfX

G4double G4PhantomParameterisation::fVoxelHalfX = 0.0
protectedinherited

◆ fVoxelHalfY

G4double G4PhantomParameterisation::fVoxelHalfY = 0.0
protectedinherited

◆ fVoxelHalfZ

G4double G4PhantomParameterisation::fVoxelHalfZ = 0.0
protectedinherited

◆ kCarTolerance

G4double G4PhantomParameterisation::kCarTolerance
protectedinherited

The documentation for this class was generated from the following files: