Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4EzVoxelParameterization Class Reference

#include <G4EzVoxelParameterization.hh>

Inheritance diagram for G4EzVoxelParameterization:
Collaboration diagram for G4EzVoxelParameterization:

Public Member Functions

 G4EzVoxelParameterization (G4double ddx, G4double ddy, G4double ddz, G4int nx, G4int ny, G4int nz)
 
 ~G4EzVoxelParameterization ()
 
virtual void ComputeTransformation (const G4int copyNo, G4VPhysicalVolume *physVol) const
 
virtual void ComputeDimensions (G4Box &aBox, const G4int copyNo, const G4VPhysicalVolume *physVol) const
 
- Public Member Functions inherited from G4VPVParameterisation
 G4VPVParameterisation ()
 
virtual ~G4VPVParameterisation ()
 
virtual G4VSolidComputeSolid (const G4int, G4VPhysicalVolume *)
 
virtual G4MaterialComputeMaterial (const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=0)
 
virtual G4bool IsNested () const
 
virtual G4VVolumeMaterialScannerGetMaterialScanner ()
 
virtual void ComputeDimensions (G4Tubs &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Trd &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Trap &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Cons &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Sphere &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Orb &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Ellipsoid &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Torus &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Para &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Polycone &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Polyhedra &, const G4int, const G4VPhysicalVolume *) const
 
virtual void ComputeDimensions (G4Hype &, const G4int, const G4VPhysicalVolume *) const
 

Protected Attributes

G4ThreeVector voxelSize
 
G4ThreeVector motherSize
 
G4int nvoxels [3]
 

Detailed Description

Definition at line 44 of file G4EzVoxelParameterization.hh.

Constructor & Destructor Documentation

G4EzVoxelParameterization::G4EzVoxelParameterization ( G4double  ddx,
G4double  ddy,
G4double  ddz,
G4int  nx,
G4int  ny,
G4int  nz 
)

Definition at line 44 of file G4EzVoxelParameterization.cc.

45  : voxelSize(ddx, ddy, ddz), motherSize(ddx*nx, ddy*ny, ddz*nz)
47 {
48  nvoxels[0]= nx;
49  nvoxels[1]= ny;
50  nvoxels[2]= nz;
51 }
G4EzVoxelParameterization::~G4EzVoxelParameterization ( )

Definition at line 55 of file G4EzVoxelParameterization.cc.

57 {
58 }

Member Function Documentation

void G4EzVoxelParameterization::ComputeDimensions ( G4Box aBox,
const G4int  copyNo,
const G4VPhysicalVolume physVol 
) const
virtual

Reimplemented from G4VPVParameterisation.

Definition at line 85 of file G4EzVoxelParameterization.cc.

87 {
88  return;
89 }
void G4EzVoxelParameterization::ComputeTransformation ( const G4int  copyNo,
G4VPhysicalVolume physVol 
) const
virtual

Implements G4VPVParameterisation.

Definition at line 63 of file G4EzVoxelParameterization.cc.

65 {
66  // copyNo-> index
67  G4int nxy= nvoxels[0]*nvoxels[1];
68  G4int iz= copyNo/nxy;
69  G4int ixy= copyNo - iz*nxy;
70  G4int iy= ixy/nvoxels[0];
71  G4int ix= ixy-iy*nvoxels[0];
72 
73  // voxel position
74  G4double px= voxelSize[0]*(ix+0.5) - motherSize[0]/2.;
75  G4double py= voxelSize[1]*(iy+0.5) - motherSize[1]/2.;
76  G4double pz= voxelSize[2]*(iz+0.5) - motherSize[2]/2.;
77 
78  physVol-> SetTranslation(G4ThreeVector(px, py, pz));
79 
80 }
CLHEP::Hep3Vector G4ThreeVector
int G4int
Definition: G4Types.hh:78
double G4double
Definition: G4Types.hh:76

Member Data Documentation

G4ThreeVector G4EzVoxelParameterization::motherSize
protected

Definition at line 47 of file G4EzVoxelParameterization.hh.

G4int G4EzVoxelParameterization::nvoxels[3]
protected

Definition at line 48 of file G4EzVoxelParameterization.hh.

G4ThreeVector G4EzVoxelParameterization::voxelSize
protected

Definition at line 46 of file G4EzVoxelParameterization.hh.


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