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

#include <ML2ReadOutGeometry.hh>

Inheritance diagram for CML2ReadOutGeometry:
Collaboration diagram for CML2ReadOutGeometry:

Public Member Functions

 CML2ReadOutGeometry ()
 
 ~CML2ReadOutGeometry (void)
 
void setBuildData (G4ThreeVector centre, G4ThreeVector halfSize, G4int NumberOfVoxelsAlongX, G4int NumberOfVoxelsAlongY, G4int NumberOfVoxelsAlongZ)
 
G4VPhysicalVolumeBuild ()
 
- 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 G4SensitiveVolumeListGetIncludeList () const
 
void SetIncludeList (G4SensitiveVolumeList *value)
 
const G4SensitiveVolumeListGetExcludeList () const
 
void SetExcludeList (G4SensitiveVolumeList *value)
 
G4String GetName () const
 
void SetName (G4String value)
 
G4VPhysicalVolumeGetROWorld () const
 

Additional Inherited Members

- Protected Member Functions inherited from G4VReadOutGeometry
 G4VReadOutGeometry (const G4VReadOutGeometry &right)
 
G4VReadOutGeometryoperator= (const G4VReadOutGeometry &right)
 
virtual G4bool FindROTouchable (G4Step *)
 
- Protected Attributes inherited from G4VReadOutGeometry
G4VPhysicalVolumeROworld
 
G4SensitiveVolumeListfincludeList
 
G4SensitiveVolumeListfexcludeList
 
G4String name
 
G4NavigatorROnavigator
 
G4TouchableHistorytouchableHistory
 

Detailed Description

Definition at line 52 of file ML2ReadOutGeometry.hh.

Constructor & Destructor Documentation

CML2ReadOutGeometry::CML2ReadOutGeometry ( )

Definition at line 54 of file ML2ReadOutGeometry.cc.

54  : ROPhyVol(0)
55 {
56  // Build the world volume
57  G4Material *Vacuum=G4NistManager::Instance()->FindOrBuildMaterial("G4_Galactic");
58  G4ThreeVector halfSizeWorld, ctr;
59  ctr.set(0.*mm, 0.*mm, 0.*mm);
60  halfSizeWorld.set(3000.*mm, 3000*mm, 3000*mm);
61  G4Box *ROphmWorldB = new G4Box("ROphmWorldG", halfSizeWorld.getX(), halfSizeWorld.getY(), halfSizeWorld.getZ());
62  G4LogicalVolume *ROphmWorldLV = new G4LogicalVolume(ROphmWorldB, Vacuum, "ROphmWorldL", 0, 0, 0);
63  ROPhyVol= new G4PVPlacement(0, ctr, "ROphmWorldPV", ROphmWorldLV, 0, false, 0);
64 }
void set(double x, double y, double z)
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
static constexpr double mm
Definition: G4SIunits.hh:115
Definition: G4Box.hh:64
double getY() const
static G4NistManager * Instance()
double getX() const
double getZ() const

Here is the call graph for this function:

CML2ReadOutGeometry::~CML2ReadOutGeometry ( void  )

Definition at line 66 of file ML2ReadOutGeometry.cc.

67 {
68  delete ROPhyVol;
69 }

Member Function Documentation

G4VPhysicalVolume * CML2ReadOutGeometry::Build ( void  )
virtual

Implements G4VReadOutGeometry.

Definition at line 80 of file ML2ReadOutGeometry.cc.

81 {
82  // Build RO Zone
83  G4Material *Vacuum=G4NistManager::Instance()->FindOrBuildMaterial("G4_Galactic");
84  G4Box *ROBox = new G4Box("ROBox", halfSize.getX(), halfSize.getY(), halfSize.getZ());
85  G4LogicalVolume *ROLV = new G4LogicalVolume(ROBox, Vacuum, "ROLV", 0, 0, 0);
86  G4VPhysicalVolume *ROPV;
87  ROPV = new G4PVPlacement(0, centre, "ROPV", ROLV, ROPhyVol, false, 0);
88 
89  // ROGeomtry: Voxel division
90 
91  G4double halfXVoxelDimensionX, halfXVoxelDimensionY, halfXVoxelDimensionZ;
92 
93  halfXVoxelDimensionX=halfSize.getX()/NumberOfVoxelsAlongX;
94  halfXVoxelDimensionY=halfSize.getY()/NumberOfVoxelsAlongY;
95  halfXVoxelDimensionZ=halfSize.getZ()/NumberOfVoxelsAlongZ;
96 
97  G4double voxelXThicknessX = 2*halfXVoxelDimensionX;
98  G4double voxelXThicknessY = 2*halfXVoxelDimensionY;
99  G4double voxelXThicknessZ = 2*halfXVoxelDimensionZ;
100 
101 
102  // X division first... slice along X axis
103  G4Box *ROPhantomXDivision = new G4Box("ROPhantomXDivision",
104  halfXVoxelDimensionX,
105  halfSize.getY(),
106  halfSize.getZ());
107 
108  G4LogicalVolume *ROPhantomXDivisionLog = new G4LogicalVolume(ROPhantomXDivision,
109  Vacuum,
110  "ROPhantomXDivisionLog",
111  0,0,0);
112  G4VPhysicalVolume *ROPhantomXDivisionPhys;
113  ROPhantomXDivisionPhys = new G4PVReplica("ROPhantomXDivisionPhys",
114  ROPhantomXDivisionLog,
115  ROPV,
116  kXAxis,
117  NumberOfVoxelsAlongX,
118  voxelXThicknessX,
119  -halfSize.getX());
120  // ...then Z division
121 
122  G4Box *ROPhantomZDivision = new G4Box("ROPhantomZDivision",
123  halfXVoxelDimensionX,
124  halfSize.getY(),
125  halfXVoxelDimensionZ);
126 
127  G4LogicalVolume *ROPhantomZDivisionLog = new G4LogicalVolume(ROPhantomZDivision,
128  Vacuum,
129  "ROPhantomZDivisionLog",
130  0,0,0);
131  G4VPhysicalVolume *ROPhantomZDivisionPhys;
132  ROPhantomZDivisionPhys = new G4PVReplica("ROPhantomZDivisionPhys",
133  ROPhantomZDivisionLog,
134  ROPhantomXDivisionPhys,
135  kZAxis,
136  NumberOfVoxelsAlongZ,
137  voxelXThicknessZ,
138  -halfSize.getZ());
139  // ...then Y division
140 
141  G4Box *ROPhantomYDivision = new G4Box("ROPhantomYDivision",
142  halfXVoxelDimensionX,
143  halfXVoxelDimensionY,
144  halfXVoxelDimensionZ);
145 
146  G4LogicalVolume *ROPhantomYDivisionLog = new G4LogicalVolume(ROPhantomYDivision,
147  Vacuum,
148  "ROPhantomYDivisionLog",
149  0,0,0);
150  ROPhantomYDivisionPhys = new G4PVReplica("ROPhantomYDivisionPhys",
151  ROPhantomYDivisionLog,
152  ROPhantomZDivisionPhys,
153  kYAxis,
154  NumberOfVoxelsAlongY,
155  voxelXThicknessY,
156  -halfSize.getY());
157 
158  // Sensitive detector doesn't matter which logical volume is used
159  G4VSensitiveDetector *sensDet=new CML2DummySD("Dummy ROG phantom");
160  ROPhantomYDivisionLog->SetSensitiveDetector(sensDet);
161 
162  return ROPhyVol;
163 }
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
Definition: G4Box.hh:64
double getY() const
static G4NistManager * Instance()
double getX() const
double getZ() const
double G4double
Definition: G4Types.hh:76
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)

Here is the call graph for this function:

void CML2ReadOutGeometry::setBuildData ( G4ThreeVector  centre,
G4ThreeVector  halfSize,
G4int  NumberOfVoxelsAlongX,
G4int  NumberOfVoxelsAlongY,
G4int  NumberOfVoxelsAlongZ 
)

Definition at line 71 of file ML2ReadOutGeometry.cc.

72 {
73  centre=ctr;
74  halfSize=hSiz;
75  NumberOfVoxelsAlongX=NVX;
76  NumberOfVoxelsAlongY=NVY;
77  NumberOfVoxelsAlongZ=NVZ;
78 }

Here is the caller graph for this function:


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