Geant4  10.02.p03
IORTDetectorROGeometry Class Reference

#include <IORTDetectorROGeometry.hh>

Inheritance diagram for IORTDetectorROGeometry:
Collaboration diagram for IORTDetectorROGeometry:

Public Member Functions

 IORTDetectorROGeometry (G4String aString, G4ThreeVector detectorPos, G4double detectorDimX, G4double detectorDimY, G4double detectorDimZ, G4int numberOfVoxelsX, G4int numberOfVoxelsY, G4int numberOfVoxelsZ)
 
 ~IORTDetectorROGeometry ()
 
- Public Member Functions inherited from G4VReadOutGeometry
 G4VReadOutGeometry ()
 
 G4VReadOutGeometry (G4String)
 
virtual ~G4VReadOutGeometry ()
 
G4int operator== (const G4VReadOutGeometry &right) const
 
G4int operator!= (const G4VReadOutGeometry &right) const
 
void BuildROGeometry ()
 
virtual G4bool CheckROVolume (G4Step *, G4TouchableHistory *&)
 
const G4SensitiveVolumeList * GetIncludeList () const
 
void SetIncludeList (G4SensitiveVolumeList *value)
 
const G4SensitiveVolumeList * GetExcludeList () const
 
void SetExcludeList (G4SensitiveVolumeList *value)
 
G4String GetName () const
 
void SetName (G4String value)
 
G4VPhysicalVolume * GetROWorld () const
 

Private Member Functions

G4VPhysicalVolume * Build ()
 

Private Attributes

const G4ThreeVector detectorToWorldPosition
 
const G4double detectorSizeX
 
const G4double detectorSizeY
 
const G4double detectorSizeZ
 
const G4int numberOfVoxelsAlongX
 
const G4int numberOfVoxelsAlongY
 
const G4int numberOfVoxelsAlongZ
 
G4VPhysicalVolume * RODetectorZDivisionPhys
 

Additional Inherited Members

- Protected Member Functions inherited from G4VReadOutGeometry
 G4VReadOutGeometry (const G4VReadOutGeometry &right)
 
G4VReadOutGeometry & operator= (const G4VReadOutGeometry &right)
 
virtual G4bool FindROTouchable (G4Step *)
 
- Protected Attributes inherited from G4VReadOutGeometry
G4VPhysicalVolume * ROworld
 
G4SensitiveVolumeList * fincludeList
 
G4SensitiveVolumeList * fexcludeList
 
G4String name
 
G4Navigator * ROnavigator
 
G4TouchableHistory * touchableHistory
 

Detailed Description

Definition at line 48 of file IORTDetectorROGeometry.hh.

Constructor & Destructor Documentation

◆ IORTDetectorROGeometry()

IORTDetectorROGeometry::IORTDetectorROGeometry ( G4String  aString,
G4ThreeVector  detectorPos,
G4double  detectorDimX,
G4double  detectorDimY,
G4double  detectorDimZ,
G4int  numberOfVoxelsX,
G4int  numberOfVoxelsY,
G4int  numberOfVoxelsZ 
)

Definition at line 53 of file IORTDetectorROGeometry.cc.

59  :
60 
61  G4VReadOutGeometry(aString),
63  detectorSizeX(detectorDimX),
64  detectorSizeY(detectorDimY),
65  detectorSizeZ(detectorDimZ),
66  numberOfVoxelsAlongX(numberOfVoxelsX),
67  numberOfVoxelsAlongY(numberOfVoxelsY),
68  numberOfVoxelsAlongZ(numberOfVoxelsZ)
69 {
70 }
const G4ThreeVector detectorToWorldPosition
static const G4double pos

◆ ~IORTDetectorROGeometry()

IORTDetectorROGeometry::~IORTDetectorROGeometry ( )

Definition at line 73 of file IORTDetectorROGeometry.cc.

74 {
75 }

Member Function Documentation

◆ Build()

G4VPhysicalVolume * IORTDetectorROGeometry::Build ( void  )
privatevirtual

Implements G4VReadOutGeometry.

Definition at line 78 of file IORTDetectorROGeometry.cc.

79 {
80  // A dummy material is used to fill the volumes of the readout geometry.
81  // (It will be allowed to set a NULL pointer in volumes of such virtual
82  // division in future, since this material is irrelevant for tracking.)
83 
84  G4Material* dummyMat = new G4Material(name="dummyMat", 1., 1.*g/mole, 1.*g/cm3);
85 
86  G4double worldSizeX = 400.0 *cm; // 200.0 *cm;
87  G4double worldSizeY = 400.0 *cm; // 200.0 *cm;
88  G4double worldSizeZ = 400.0 *cm; // 200.0 *cm;
89 
90  G4double halfDetectorSizeX = detectorSizeX;
91  G4double halfDetectorSizeY = detectorSizeY;
92  G4double halfDetectorSizeZ = detectorSizeZ;
93 
94  // World volume of ROGeometry ...
95  G4Box* ROWorld = new G4Box("ROWorld",
96  worldSizeX,
97  worldSizeY,
98  worldSizeZ);
99 
100  G4LogicalVolume* ROWorldLog = new G4LogicalVolume(ROWorld, dummyMat,
101  "ROWorldLog", 0,0,0);
102 
103  G4VPhysicalVolume* ROWorldPhys = new G4PVPlacement(0,G4ThreeVector(),
104  "ROWorldPhys",
105  ROWorldLog,
106  0,false,0);
107 
108  // Detector ROGeometry
109  G4Box *RODetector = new G4Box("RODetector",
110  halfDetectorSizeX,
111  halfDetectorSizeY,
112  halfDetectorSizeZ);
113 
114  G4LogicalVolume *RODetectorLog = new G4LogicalVolume(RODetector,
115  dummyMat,
116  "RODetectorLog",
117  0,0,0);
118 
119  G4VPhysicalVolume *RODetectorPhys = new G4PVPlacement(0,
121  "DetectorPhys",
122  RODetectorLog,
123  ROWorldPhys,
124  false,0);
125 
126 
127  // Division along X axis: the detector is divided in slices along the X axis
128 
129  G4double halfXVoxelSizeX = halfDetectorSizeX/numberOfVoxelsAlongX;
130  G4double halfXVoxelSizeY = halfDetectorSizeY;
131  G4double halfXVoxelSizeZ = halfDetectorSizeZ;
132  G4double voxelXThickness = 2*halfXVoxelSizeX;
133 
134  G4Box *RODetectorXDivision = new G4Box("RODetectorXDivision",
135  halfXVoxelSizeX,
136  halfXVoxelSizeY,
137  halfXVoxelSizeZ);
138 
139  G4LogicalVolume *RODetectorXDivisionLog = new G4LogicalVolume(RODetectorXDivision,
140  dummyMat,
141  "RODetectorXDivisionLog",
142  0,0,0);
143 
144  G4VPhysicalVolume *RODetectorXDivisionPhys = new G4PVReplica("RODetectorXDivisionPhys",
145  RODetectorXDivisionLog,
146  RODetectorPhys,
147  kXAxis,
149  voxelXThickness);
150 
151  // Division along Y axis: the slices along the X axis are divided along the Y axis
152 
153  G4double halfYVoxelSizeX = halfXVoxelSizeX;
154  G4double halfYVoxelSizeY = halfDetectorSizeY/numberOfVoxelsAlongY;
155  G4double halfYVoxelSizeZ = halfDetectorSizeZ;
156  G4double voxelYThickness = 2*halfYVoxelSizeY;
157 
158  G4Box *RODetectorYDivision = new G4Box("RODetectorYDivision",
159  halfYVoxelSizeX,
160  halfYVoxelSizeY,
161  halfYVoxelSizeZ);
162 
163  G4LogicalVolume *RODetectorYDivisionLog = new G4LogicalVolume(RODetectorYDivision,
164  dummyMat,
165  "RODetectorYDivisionLog",
166  0,0,0);
167 
168  G4VPhysicalVolume *RODetectorYDivisionPhys = new G4PVReplica("RODetectorYDivisionPhys",
169  RODetectorYDivisionLog,
170  RODetectorXDivisionPhys,
171  kYAxis,
173  voxelYThickness);
174 
175  // Division along Z axis: the slices along the Y axis are divided along the Z axis
176 
177  G4double halfZVoxelSizeX = halfXVoxelSizeX;
178  G4double halfZVoxelSizeY = halfYVoxelSizeY;
179  G4double halfZVoxelSizeZ = halfDetectorSizeZ/numberOfVoxelsAlongZ;
180  G4double voxelZThickness = 2*halfZVoxelSizeZ;
181 
182  G4Box *RODetectorZDivision = new G4Box("RODetectorZDivision",
183  halfZVoxelSizeX,
184  halfZVoxelSizeY,
185  halfZVoxelSizeZ);
186 
187  G4LogicalVolume *RODetectorZDivisionLog = new G4LogicalVolume(RODetectorZDivision,
188  dummyMat,
189  "RODetectorZDivisionLog",
190  0,0,0);
191 
192  RODetectorZDivisionPhys = new G4PVReplica("RODetectorZDivisionPhys",
193  RODetectorZDivisionLog,
194  RODetectorYDivisionPhys,
195  kZAxis,
197  voxelZThickness);
198 
199  IORTDummySD *dummySD = new IORTDummySD;
200  RODetectorZDivisionLog -> SetSensitiveDetector(dummySD);
201 
202  return ROWorldPhys;
203 }
static const double cm
Definition: G4SIunits.hh:118
G4VPhysicalVolume * RODetectorZDivisionPhys
CLHEP::Hep3Vector G4ThreeVector
Definition: G4Box.hh:64
const G4ThreeVector detectorToWorldPosition
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5206
static const double cm3
Definition: G4SIunits.hh:120
static const double mole
Definition: G4SIunits.hh:283
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:

Member Data Documentation

◆ detectorSizeX

const G4double IORTDetectorROGeometry::detectorSizeX
private

Definition at line 67 of file IORTDetectorROGeometry.hh.

◆ detectorSizeY

const G4double IORTDetectorROGeometry::detectorSizeY
private

Definition at line 68 of file IORTDetectorROGeometry.hh.

◆ detectorSizeZ

const G4double IORTDetectorROGeometry::detectorSizeZ
private

Definition at line 69 of file IORTDetectorROGeometry.hh.

◆ detectorToWorldPosition

const G4ThreeVector IORTDetectorROGeometry::detectorToWorldPosition
private

Definition at line 66 of file IORTDetectorROGeometry.hh.

◆ numberOfVoxelsAlongX

const G4int IORTDetectorROGeometry::numberOfVoxelsAlongX
private

Definition at line 71 of file IORTDetectorROGeometry.hh.

◆ numberOfVoxelsAlongY

const G4int IORTDetectorROGeometry::numberOfVoxelsAlongY
private

Definition at line 72 of file IORTDetectorROGeometry.hh.

◆ numberOfVoxelsAlongZ

const G4int IORTDetectorROGeometry::numberOfVoxelsAlongZ
private

Definition at line 73 of file IORTDetectorROGeometry.hh.

◆ RODetectorZDivisionPhys

G4VPhysicalVolume* IORTDetectorROGeometry::RODetectorZDivisionPhys
private

Definition at line 75 of file IORTDetectorROGeometry.hh.


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