66{
67
69
70
71 auto parallelLogicalVolume = GetWorld()->GetLogicalVolume();
72
78
82 G4double detectorRadius =
fNbOfLayers * fullLayerThickness;
83 G4double detectorOuterRadius = detectorInnerRadius + detectorRadius;
84 G4double rowThickness = detectorLength /
fNbOfRows;
85 G4double full2Pi = 2.* CLHEP::pi * rad;
87
88
89
90 auto solidDetector =
new G4Tubs(
"Detector",
91 detectorInnerRadius,
92 detectorOuterRadius,
93 detectorLength / 2.,
94 0,
95 full2Pi);
97 dummy,
98 "Detector");
100 G4ThreeVector(0, 0, 0),
101 logicDetector,
102 "Detector",
103 parallelLogicalVolume,
104 false,
105 9999,
106 true);
107
108
109
110 auto solidRow =
new G4Tubs(
"Row", detectorInnerRadius, detectorOuterRadius, rowThickness / 2.,
111 0, full2Pi);
112
116 logicRow,
117 logicDetector,
118 kZAxis,
120 rowThickness);
121 else
123 G4ThreeVector(),
124 logicRow,
125 "Row",
126 logicDetector,
127 false,
128 0);
129
130
132 auto solidSlice =
new G4Tubs(
"Slice", detectorInnerRadius, detectorOuterRadius, rowThickness/2,
133 0, cellPhi);
135 dummy,
136 "Slice");
139 logicSlice,
140 logicRow,
141 kPhi,
143 cellPhi,
144 -cellPhi);
145 } else {
147 G4ThreeVector(),
148 logicSlice,
149 "Slice",
150 logicRow,
151 false,
152 0);
153 }
154
155
157 attribs.SetColour(
G4Colour(0, 1, 0, 0.1));
158 attribs.SetForceSolid(true);
160 auto solidCell =
new G4Tubs(
"Cell", detectorInnerRadius,
162 rowThickness/2, 0, cellPhi);
166 logicSlice,
167 kRho,
170 detectorInnerRadius);
171 } else {
172 auto solidCell =
new G4Tubs(
"Cell", detectorInnerRadius,
174 rowThickness/2, 0, cellPhi);
178 G4ThreeVector(),
180 "Cell",
181 logicSlice,
182 false,
183 0);
184 }
186}
G4double GetLength() const
Get length of the cylindrical detector (along z-axis)
G4double GetAbsorberThickness(const std::size_t aLayer) const
Get thickness of the layer.
G4double GetInnerRadius() const
Get inner radius of the cylindrical detector.
std::vector< G4LogicalVolume * > fLogicalCell
G4int GetNbOfRows() const
Get number of rows.
G4int GetNbOfSlices() const
Get number of slices.