LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
G4EzVoxelParameterization Class Reference

#include "G4EzVoxelParameterization.hh"

Inheritance 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
 

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.

References ComputeTransformation().

57 {
58 }

Member Function Documentation

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

Definition at line 85 of file G4EzVoxelParameterization.cc.

Referenced by ComputeTransformation().

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

Definition at line 63 of file G4EzVoxelParameterization.cc.

References ComputeDimensions(), motherSize, nvoxels, and voxelSize.

Referenced by ~G4EzVoxelParameterization().

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 }

Member Data Documentation

G4ThreeVector G4EzVoxelParameterization::motherSize
protected

Definition at line 47 of file G4EzVoxelParameterization.hh.

Referenced by ComputeTransformation().

G4int G4EzVoxelParameterization::nvoxels[3]
protected

Definition at line 48 of file G4EzVoxelParameterization.hh.

Referenced by ComputeTransformation().

G4ThreeVector G4EzVoxelParameterization::voxelSize
protected

Definition at line 46 of file G4EzVoxelParameterization.hh.

Referenced by ComputeTransformation().


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