Belle II Software development
GeoBeamPipeCreator Class Reference

The creator for the BeamPipe geometry of the Belle II detector. More...

#include <GeoBeamPipeCreator.h>

Inheritance diagram for GeoBeamPipeCreator:
CreatorBase

Public Member Functions

 GeoBeamPipeCreator ()
 Constructor of the GeoBeamPipeCreator class.
 
virtual ~GeoBeamPipeCreator ()
 The destructor of the GeoBeamPipeCreator class.
 
virtual void create (const GearDir &content, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
 Creates the ROOT Objects for the BeamPipe geometry.
 
virtual void createPayloads (const GearDir &content, const IntervalOfValidity &iov) override
 creates DB payload for BeamPipeGeo class
 
virtual void createFromDB (const std::string &name, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
 Create the geometry from the Database.
 
 BELLE2_DEFINE_EXCEPTION (DBNotImplemented, "Cannot create geometry from Database.")
 Exception that will be thrown in createFromDB if member is not yet implemented by creator.
 

Protected Attributes

std::vector< SensitiveDetector * > m_sensitive
 Sensitive detector.
 
BeamPipeGeo m_config
 geometry parameters object
 

Private Member Functions

BeamPipeGeo createConfiguration (const GearDir &param)
 Reads IR geometry parameters from the xml files and createst DB class BeamPipeGeo.
 
void createGeometry (G4LogicalVolume &topVolume, geometry::GeometryTypes type)
 Create detector geometry.
 

Detailed Description

The creator for the BeamPipe geometry of the Belle II detector.


Definition at line 32 of file GeoBeamPipeCreator.h.

Constructor & Destructor Documentation

◆ GeoBeamPipeCreator()

Constructor of the GeoBeamPipeCreator class.

Definition at line 59 of file GeoBeamPipeCreator.cc.

60 {
61 }

◆ ~GeoBeamPipeCreator()

~GeoBeamPipeCreator ( )
virtual

The destructor of the GeoBeamPipeCreator class.

Definition at line 63 of file GeoBeamPipeCreator.cc.

64 {
65 //Delete all sensitive detectors
66 BOOST_FOREACH(SensitiveDetector * sensitive, m_sensitive) {
67 delete sensitive;
68 }
69 m_sensitive.clear();
70 }
std::vector< SensitiveDetector * > m_sensitive
Sensitive detector.

Member Function Documentation

◆ create()

virtual void create ( const GearDir content,
G4LogicalVolume &  topVolume,
geometry::GeometryTypes  type 
)
inlineoverridevirtual

Creates the ROOT Objects for the BeamPipe geometry.

Parameters
contentA reference to the content part of the parameter description, which should to be used to create the ROOT objects.
topVolumeGeant4 logical top volume.
typeGeometry type.

Implements CreatorBase.

Definition at line 67 of file GeoBeamPipeCreator.h.

68 {
70
71 // override geometry configuration from the DB
72 DBStore::Instance().addConstantOverride("BeamPipeGeo", new BeamPipeGeo(m_config));
73
74 createGeometry(topVolume, type);
75 }
BeamPipeGeo createConfiguration(const GearDir &param)
Reads IR geometry parameters from the xml files and createst DB class BeamPipeGeo.
void createGeometry(G4LogicalVolume &topVolume, geometry::GeometryTypes type)
Create detector geometry.
BeamPipeGeo m_config
geometry parameters object
static DBStore & Instance()
Instance of a singleton DBStore.
Definition: DBStore.cc:28
void addConstantOverride(const std::string &name, TObject *obj, bool oneRun=false)
Add constant override payload.
Definition: DBStore.cc:204

◆ createConfiguration()

BeamPipeGeo createConfiguration ( const GearDir param)
inlineprivate

Reads IR geometry parameters from the xml files and createst DB class BeamPipeGeo.

Definition at line 36 of file GeoBeamPipeCreator.h.

37 {
38 BeamPipeGeo BeamPipeGeoConfig;
39 BeamPipeGeoConfig.initialize(param);
40 return BeamPipeGeoConfig;
41 }

◆ createFromDB()

virtual void createFromDB ( const std::string &  name,
G4LogicalVolume &  topVolume,
geometry::GeometryTypes  type 
)
inlineoverridevirtual

Create the geometry from the Database.

Reimplemented from CreatorBase.

Definition at line 86 of file GeoBeamPipeCreator.h.

87 {
88 DBObjPtr<BeamPipeGeo> dbObj;
89 if (!dbObj) {
90 // Check that we found the object and if not report the problem
91 B2FATAL("No configuration for " << name << " found.");
92 }
93 m_config = *dbObj;
94 createGeometry(topVolume, type);
95 }

◆ createGeometry()

void createGeometry ( G4LogicalVolume &  topVolume,
geometry::GeometryTypes  type 
)
private

Create detector geometry.

Parameters
topVolumeGeant4 logical top volume.
typeGeometry type.

Definition at line 72 of file GeoBeamPipeCreator.cc.

73 {
74
75 //########## Index ##########
76 //
77 // "IP pipe" -9.0 cm to 13.85 cm
78 // Lv1SUS
79 // Lv2OutBe
80 // Lv2InBe
81 // Lv2Paraf
82 // Lv2Vacuum
83 // Lv3AuCoat
84 // "crotch pipe Forward " 13.85 cm to 40.0 cm
85 // Lv1TaFwd
86 // Lv2VacFwd
87 // "crotch pipe Backward " -9.0 cm to -40.0 cm
88 // Lv1TaBwd
89 // Lv2VacBwd
90 // "beam pipe more Forward " 40.0 cm to 63.35 cm
91 // Lv1TaLERUp
92 // Lv2VacLERUp
93 // Lv1TaHERDwn
94 // Lv2VacHERDwn
95 // "beam pipe more Backward " -40.0 cm to -62.725 cm
96 // Lv1TaHERUp
97 // Lv2VacHERUp
98 // Lv1TaLERDwn
99 // Lv2VacLERDwn
100 // Tangusten End Mounts
101 // PXDMountFwd
102 // PXDMountFixtureFwd
103 // PXDMountBwd
104 // PXDMountFixtureBwd
105 //
106 //###########################
107
108 double SafetyLength = m_config.getParameter("Safety.L1") * Unit::cm / Unit::mm;
109
110 double stepMax = 5.0 * Unit::mm;
111 int flag_limitStep = int(m_config.getParameter("LimitStepLength"));
112
113 double A11 = 0.03918;
114
117
118 //----------
119 //- Lv1SUS
120
121 //get parameters from .xml file
122 std::string prep = "Lv1SUS.";
123 //
124 const int Lv1SUS_num = 21;
125 //
126 double Lv1SUS_Z[Lv1SUS_num];
127 Lv1SUS_Z[0] = 0.0;
128 for (int tmpn = 0; tmpn < 8; tmpn++) {
129 Lv1SUS_Z[0] -= m_config.getParameter(prep + (format("L%1%") % (tmpn + 1)).str().c_str()) * Unit::cm / Unit::mm;
130 }
131 Lv1SUS_Z[1] = Lv1SUS_Z[0] + m_config.getParameter(prep + "L1") * Unit::cm / Unit::mm;
132 Lv1SUS_Z[2] = Lv1SUS_Z[1];
133 Lv1SUS_Z[3] = Lv1SUS_Z[2] + m_config.getParameter(prep + "L2") * Unit::cm / Unit::mm;
134 Lv1SUS_Z[4] = Lv1SUS_Z[3] + m_config.getParameter(prep + "L3") * Unit::cm / Unit::mm;
135 Lv1SUS_Z[5] = Lv1SUS_Z[4];
136 Lv1SUS_Z[6] = Lv1SUS_Z[5] + m_config.getParameter(prep + "L4") * Unit::cm / Unit::mm;
137 Lv1SUS_Z[7] = Lv1SUS_Z[6] + m_config.getParameter(prep + "L5") * Unit::cm / Unit::mm;
138 Lv1SUS_Z[8] = Lv1SUS_Z[7] + m_config.getParameter(prep + "L6") * Unit::cm / Unit::mm;
139 Lv1SUS_Z[9] = Lv1SUS_Z[8] + m_config.getParameter(prep + "L7") * Unit::cm / Unit::mm;
140 Lv1SUS_Z[10] = Lv1SUS_Z[9] + m_config.getParameter(prep + "L8") * Unit::cm / Unit::mm;
141 Lv1SUS_Z[11] = Lv1SUS_Z[10] + m_config.getParameter(prep + "L9") * Unit::cm / Unit::mm;
142 Lv1SUS_Z[12] = Lv1SUS_Z[11] + m_config.getParameter(prep + "L10") * Unit::cm / Unit::mm;
143 Lv1SUS_Z[13] = Lv1SUS_Z[12] + m_config.getParameter(prep + "L11") * Unit::cm / Unit::mm;
144 Lv1SUS_Z[14] = Lv1SUS_Z[13] + m_config.getParameter(prep + "L12") * Unit::cm / Unit::mm;
145 Lv1SUS_Z[15] = Lv1SUS_Z[14] + m_config.getParameter(prep + "L13") * Unit::cm / Unit::mm;
146 Lv1SUS_Z[16] = Lv1SUS_Z[15];
147 Lv1SUS_Z[17] = Lv1SUS_Z[16] + m_config.getParameter(prep + "L14") * Unit::cm / Unit::mm;
148 Lv1SUS_Z[18] = Lv1SUS_Z[17] + m_config.getParameter(prep + "L15") * Unit::cm / Unit::mm;
149 Lv1SUS_Z[19] = Lv1SUS_Z[18];
150 Lv1SUS_Z[20] = Lv1SUS_Z[19] + m_config.getParameter(prep + "L16") * Unit::cm / Unit::mm;
151 //
152 double Lv1SUS_rI[Lv1SUS_num];
153 for (int tmpn = 0; tmpn < Lv1SUS_num; tmpn++)
154 { Lv1SUS_rI[tmpn] = 0.0; }
155 //m_config.getParameter(prep+"L1")
156 double Lv1SUS_rO[Lv1SUS_num];
157 Lv1SUS_rO[0] = m_config.getParameter(prep + "R1") * Unit::cm / Unit::mm;
158 Lv1SUS_rO[1] = Lv1SUS_rO[0];
159 Lv1SUS_rO[2] = m_config.getParameter(prep + "R2") * Unit::cm / Unit::mm;
160 Lv1SUS_rO[3] = Lv1SUS_rO[2];
161 Lv1SUS_rO[4] = m_config.getParameter(prep + "R3") * Unit::cm / Unit::mm;
162 Lv1SUS_rO[5] = m_config.getParameter(prep + "R4") * Unit::cm / Unit::mm;
163 Lv1SUS_rO[6] = Lv1SUS_rO[5];
164 Lv1SUS_rO[7] = m_config.getParameter(prep + "R5") * Unit::cm / Unit::mm;
165 Lv1SUS_rO[8] = Lv1SUS_rO[7];
166 Lv1SUS_rO[9] = m_config.getParameter(prep + "R6") * Unit::cm / Unit::mm;
167 Lv1SUS_rO[10] = Lv1SUS_rO[9];
168 Lv1SUS_rO[11] = Lv1SUS_rO[10];
169 Lv1SUS_rO[12] = m_config.getParameter(prep + "R7") * Unit::cm / Unit::mm;
170 Lv1SUS_rO[13] = Lv1SUS_rO[12];
171 Lv1SUS_rO[14] = m_config.getParameter(prep + "R8") * Unit::cm / Unit::mm;
172 Lv1SUS_rO[15] = Lv1SUS_rO[14];
173 Lv1SUS_rO[16] = m_config.getParameter(prep + "R9") * Unit::cm / Unit::mm;
174 Lv1SUS_rO[17] = m_config.getParameter(prep + "R10") * Unit::cm / Unit::mm;
175 Lv1SUS_rO[18] = Lv1SUS_rO[17];
176 Lv1SUS_rO[19] = m_config.getParameter(prep + "R11") * Unit::cm / Unit::mm;
177 Lv1SUS_rO[20] = Lv1SUS_rO[19];
178 //
179 string strMat_Lv1SUS = m_config.getParameterStr(prep + "Material");
180 G4Material* mat_Lv1SUS = Materials::get(strMat_Lv1SUS);
181
182 //define geometry
183 G4Polycone* geo_Lv1SUS = new G4Polycone("geo_Lv1SUS_name", 0, 2 * M_PI, Lv1SUS_num, Lv1SUS_Z, Lv1SUS_rI, Lv1SUS_rO);
184 G4LogicalVolume* logi_Lv1SUS = new G4LogicalVolume(geo_Lv1SUS, mat_Lv1SUS, "logi_Lv1SUS_name");
185
186 //for (int i=0;i<Lv1SUS_num;i++)printf("%f %f\n",Lv1SUS_Z[i],Lv1SUS_rO[i]);
187
188 //- put volume
189 setColor(*logi_Lv1SUS, "#666666");
190 new G4PVPlacement(0, G4ThreeVector(0, 0, 0), logi_Lv1SUS, "phys_Lv1SUS_name", &topVolume, false, 0);
191
192
193 //----------
194 //- Lv2OutTi added for Phase 3.
195 //-
196 //----------
197 //get parameters from .xml file
198 if (m_config.getParameter("Lv2OutTi.L1", -1) > 0) {
199 prep = "Lv2OutTi.";
200 //
201 const int Lv2OutTi_num = 2;
202 //
203 double Lv2OutTi_Z[Lv2OutTi_num];
204 Lv2OutTi_Z[0] = -m_config.getParameter(prep + "L1") * Unit::cm / Unit::mm;
205 Lv2OutTi_Z[1] = m_config.getParameter(prep + "L2") * Unit::cm / Unit::mm;
206 //
207 double Lv2OutTi_rI[Lv2OutTi_num];
208 Lv2OutTi_rI[0] = m_config.getParameter(prep + "R1") * Unit::cm / Unit::mm;
209 Lv2OutTi_rI[1] = Lv2OutTi_rI[0];
210 //
211 double Lv2OutTi_rO[Lv2OutTi_num];
212 Lv2OutTi_rO[0] = m_config.getParameter(prep + "R2") * Unit::cm / Unit::mm;
213 Lv2OutTi_rO[1] = Lv2OutTi_rO[0];
214 //
215 string strMat_Lv2OutTi = m_config.getParameterStr(prep + "Material");
216 G4Material* mat_Lv2OutTi = Materials::get(strMat_Lv2OutTi);
217
218 //define geometry
219 G4Polycone* geo_Lv2OutTi = new G4Polycone("geo_Lv2OutTi_name", 0, 2 * M_PI, Lv2OutTi_num, Lv2OutTi_Z, Lv2OutTi_rI, Lv2OutTi_rO);
220 G4LogicalVolume* logi_Lv2OutTi = new G4LogicalVolume(geo_Lv2OutTi, mat_Lv2OutTi, "logi_Lv2OutTi_name");
221
222 //- put volume
223 setColor(*logi_Lv2OutTi, "#333300");
224 new G4PVPlacement(0, G4ThreeVector(0, 0, 0), logi_Lv2OutTi, "phys_Lv2OutTi_name", logi_Lv1SUS, false, 0);
225 }
226
227
228 //----------
229 //- Lv2OutBe
230 //-
231 //----------
232
233 //get parameters from .xml file
234 prep = "Lv2OutBe.";
235 //
236 const int Lv2OutBe_num = 2;
237 //
238 double Lv2OutBe_Z[Lv2OutBe_num];
239 Lv2OutBe_Z[0] = -m_config.getParameter(prep + "L1") * Unit::cm / Unit::mm;
240 Lv2OutBe_Z[1] = m_config.getParameter(prep + "L2") * Unit::cm / Unit::mm;
241 //
242 double Lv2OutBe_rI[Lv2OutBe_num];
243 Lv2OutBe_rI[0] = m_config.getParameter(prep + "R1") * Unit::cm / Unit::mm;
244 Lv2OutBe_rI[1] = Lv2OutBe_rI[0];
245 //
246 double Lv2OutBe_rO[Lv2OutBe_num];
247 Lv2OutBe_rO[0] = m_config.getParameter(prep + "R2") * Unit::cm / Unit::mm;
248 Lv2OutBe_rO[1] = Lv2OutBe_rO[0];
249 //
250 string strMat_Lv2OutBe = m_config.getParameterStr(prep + "Material");
251 G4Material* mat_Lv2OutBe = Materials::get(strMat_Lv2OutBe);
252
253 //define geometry
254 G4Polycone* geo_Lv2OutBe = new G4Polycone("geo_Lv2OutBe_name", 0, 2 * M_PI, Lv2OutBe_num, Lv2OutBe_Z, Lv2OutBe_rI, Lv2OutBe_rO);
255 G4LogicalVolume* logi_Lv2OutBe = new G4LogicalVolume(geo_Lv2OutBe, mat_Lv2OutBe, "logi_Lv2OutBe_name");
256
257 //- put volume
258 setColor(*logi_Lv2OutBe, "#333300");
259 new G4PVPlacement(0, G4ThreeVector(0, 0, 0), logi_Lv2OutBe, "phys_Lv2OutBe_name", logi_Lv1SUS, false, 0);
260
261
262 //----------
263 //- Lv2InBe
264 //-
265 //----------
266
267 //get parameters from .xml file
268 prep = "Lv2InBe.";
269 //
270 const int Lv2InBe_num = 2;
271 //
272 double Lv2InBe_Z[Lv2InBe_num];
273 Lv2InBe_Z[0] = -m_config.getParameter(prep + "L1") * Unit::cm / Unit::mm;
274 Lv2InBe_Z[1] = m_config.getParameter(prep + "L2") * Unit::cm / Unit::mm;
275 //
276 double Lv2InBe_rI[Lv2InBe_num];
277 Lv2InBe_rI[0] = m_config.getParameter(prep + "R1") * Unit::cm / Unit::mm;
278 Lv2InBe_rI[1] = Lv2InBe_rI[0];
279 //
280 double Lv2InBe_rO[Lv2InBe_num];
281 Lv2InBe_rO[0] = m_config.getParameter(prep + "R2") * Unit::cm / Unit::mm;
282 Lv2InBe_rO[1] = Lv2InBe_rO[0];
283 //
284 string strMat_Lv2InBe = m_config.getParameterStr(prep + "Material");
285 G4Material* mat_Lv2InBe = Materials::get(strMat_Lv2InBe);
286
287 //define geometry
288 G4Polycone* geo_Lv2InBe = new G4Polycone("geo_Lv2InBe_name", 0, 2 * M_PI, Lv2InBe_num, Lv2InBe_Z, Lv2InBe_rI, Lv2InBe_rO);
289 G4LogicalVolume* logi_Lv2InBe = new G4LogicalVolume(geo_Lv2InBe, mat_Lv2InBe, "logi_Lv2InBe_name");
290
291 //- put volume
292 setColor(*logi_Lv2InBe, "#333300");
293 new G4PVPlacement(0, G4ThreeVector(0, 0, 0), logi_Lv2InBe, "phys_Lv2InBe_name", logi_Lv1SUS, false, 0);
294
295 //----------
296 //- Lv2Vacuum
297
298 //get parameters from .xml file
299 prep = "Lv2Vacuum.";
300 //
301 double Lv2Vacuum_L1 = m_config.getParameter(prep + "L1") * Unit::cm / Unit::mm;
302 double Lv2Vacuum_L2 = m_config.getParameter(prep + "L2") * Unit::cm / Unit::mm;
303 double Lv2Vacuum_L3 = m_config.getParameter(prep + "L3") * Unit::cm / Unit::mm;
304 double Lv2Vacuum_L4 = m_config.getParameter(prep + "L4") * Unit::cm / Unit::mm;
305 double Lv2Vacuum_R1 = m_config.getParameter(prep + "R1") * Unit::cm / Unit::mm;
306 double Lv2Vacuum_R2 = m_config.getParameter(prep + "R2") * Unit::cm / Unit::mm;
307 double Lv2Vacuum_R3 = m_config.getParameter(prep + "R3") * Unit::cm / Unit::mm;
308 //double Lv2Vacuum_A1 = cLv2Vacuum.getAngle("A1");
309 double Lv2Vacuum_A2 = m_config.getParameter(prep + "A2");
310 //
311 string strMat_Lv2Vacuum = m_config.getParameterStr(prep + "Material");
312 G4Material* mat_Lv2Vacuum = Materials::get(strMat_Lv2Vacuum);
313 //
314 // Part 1
315 const int Lv2Vacuum1_num = 2;
316 //
317 double Lv2Vacuum1_Z[Lv2Vacuum1_num];
318 Lv2Vacuum1_Z[0] = -Lv2Vacuum_L1;
319 Lv2Vacuum1_Z[1] = Lv2Vacuum_L2;
320 double Lv2Vacuum1_rI[Lv2Vacuum1_num];
321 for (int tmpn = 0; tmpn < Lv2Vacuum1_num; tmpn++)
322 { Lv2Vacuum1_rI[tmpn] = 0.0; }
323 double Lv2Vacuum1_rO[Lv2Vacuum1_num];
324 Lv2Vacuum1_rO[0] = Lv2Vacuum_R1;
325 Lv2Vacuum1_rO[1] = Lv2Vacuum_R1;
326 // Part 2
327 double Lv2Vacuum2_Z1 = 2. * Lv2Vacuum_L3;
328 double Lv2Vacuum2_rI1 = 0.0;
329 double Lv2Vacuum2_rO1 = Lv2Vacuum_R2;
330 //
331 double Lv2Vacuum2_Z2 = (Lv2Vacuum_L3 * cos(Lv2Vacuum_A2)) + SafetyLength;
332 double Lv2Vacuum2_rI2 = 0.0;
333 double Lv2Vacuum2_rO2 = 2 * Lv2Vacuum_R2;
334 // Part 3
335 const int Lv2Vacuum3_num = 2;
336 //
337 double Lv2Vacuum3_Z[Lv2Vacuum3_num];
338 Lv2Vacuum3_Z[0] = 0.0;
339 Lv2Vacuum3_Z[1] = Lv2Vacuum_L4;
340 double Lv2Vacuum3_rI[Lv2Vacuum3_num];
341 for (int tmpn = 0; tmpn < Lv2Vacuum3_num; tmpn++)
342 { Lv2Vacuum3_rI[tmpn] = 0.0; }
343 double Lv2Vacuum3_rO[Lv2Vacuum3_num];
344 Lv2Vacuum3_rO[0] = Lv2Vacuum_R3;
345 Lv2Vacuum3_rO[1] = Lv2Vacuum_R3;
346
347 //define geometry
348 // Part 1
349 G4Polycone* geo_Lv2VacuumPart1 = new G4Polycone("geo_Lv2VacuumPart1_name", 0, 2 * M_PI, Lv2Vacuum1_num, Lv2Vacuum1_Z, Lv2Vacuum1_rI,
350 Lv2Vacuum1_rO);
351 // Part 2
352 G4Tubs* geo_Lv2VacuumPart2_1 = new G4Tubs("geo_Lv2VacuumPart2_1_name", Lv2Vacuum2_rI1, Lv2Vacuum2_rO1, Lv2Vacuum2_Z1, 0, 2 * M_PI);
353 G4Tubs* geo_Lv2VacuumPart2_2 = new G4Tubs("geo_Lv2VacuumPart2_2_name", Lv2Vacuum2_rI2, Lv2Vacuum2_rO2, Lv2Vacuum2_Z2, 0, 2 * M_PI);
354 G4Transform3D transform_Lv2VacuumPart2_2 = G4Translate3D(0., 0., 0.);
355 transform_Lv2VacuumPart2_2 = transform_Lv2VacuumPart2_2 * G4RotateY3D(-Lv2Vacuum_A2);
356 G4IntersectionSolid* geo_Lv2VacuumPart2 = new G4IntersectionSolid("geo_Lv2VacuumPart2_name", geo_Lv2VacuumPart2_1,
357 geo_Lv2VacuumPart2_2, transform_Lv2VacuumPart2_2);
358 // Part 3
359 G4Polycone* geo_Lv2VacuumPart3 = new G4Polycone("geo_Lv2VacuumPart3_name", 0, 2 * M_PI, Lv2Vacuum3_num, Lv2Vacuum3_Z, Lv2Vacuum3_rI,
360 Lv2Vacuum3_rO);
361 // Part1+2+3
362// G4Transform3D transform_Lv2VacuumPart3 = G4Translate3D(0., 0., 0.);
363 G4Transform3D transform_Lv2VacuumPart3 = G4Translate3D(-0.5, 0., 0.);
364 // A11 instead of A1
365 transform_Lv2VacuumPart3 = transform_Lv2VacuumPart3 * G4RotateY3D(-A11);
366 G4UnionSolid* geo_Lv2Vacuumxx = new G4UnionSolid("geo_Lv2Vacuumxx_name", geo_Lv2VacuumPart1, geo_Lv2VacuumPart3,
367 transform_Lv2VacuumPart3);
368 G4Transform3D transform_Lv2VacuumPart2 = G4Translate3D(Lv2Vacuum_L3 * sin(Lv2Vacuum_A2), 0.,
369 Lv2Vacuum_L2 + Lv2Vacuum_L3 * cos(Lv2Vacuum_A2));
370 transform_Lv2VacuumPart2 = transform_Lv2VacuumPart2 * G4RotateY3D(Lv2Vacuum_A2);
371 G4UnionSolid* geo_Lv2Vacuumx = new G4UnionSolid("geo_Lv2Vacuumx_name", geo_Lv2Vacuumxx, geo_Lv2VacuumPart2,
372 transform_Lv2VacuumPart2);
373 // Intersection with mother
374 G4IntersectionSolid* geo_Lv2Vacuum = new G4IntersectionSolid("geo_Lv2Vacuum_name", geo_Lv2Vacuumx, geo_Lv1SUS);
375 G4LogicalVolume* logi_Lv2Vacuum = new G4LogicalVolume(geo_Lv2Vacuum, mat_Lv2Vacuum, "logi_Lv2Vacuum_name");
376 if (flag_limitStep) logi_Lv2Vacuum->SetUserLimits(new G4UserLimits(stepMax));
377
378 //- put volume
379 setColor(*logi_Lv2Vacuum, "#CCCCCC");
380 new G4PVPlacement(0, G4ThreeVector(0, 0, 0), logi_Lv2Vacuum, "phys_Lv2Vacuum_name", logi_Lv1SUS, false, 0);
381
382 //-
383 //----------
384
385 //----------
386 //- Lv2Paraf
387
388 //get parameters from .xml file
389 prep = "Lv2Paraf.";
390 //
391 const int Lv2Paraf1_num = 20;
392 const int Lv2Paraf2_num = 3;
393 //
394 double Lv2Paraf1_Z[Lv2Paraf1_num];
395 Lv2Paraf1_Z[0] = 0.0;
396 for (int tmpn = 0; tmpn < 9; tmpn++) {
397 Lv2Paraf1_Z[0] -= m_config.getParameter(prep + (format("L%1%") % (tmpn + 1)).str().c_str()) * Unit::cm / Unit::mm;
398 }
399 Lv2Paraf1_Z[1] = Lv2Paraf1_Z[0] + m_config.getParameter(prep + "L1") * Unit::cm / Unit::mm;
400 Lv2Paraf1_Z[2] = Lv2Paraf1_Z[1];
401 Lv2Paraf1_Z[3] = Lv2Paraf1_Z[2] + m_config.getParameter(prep + "L2") * Unit::cm / Unit::mm;
402 Lv2Paraf1_Z[4] = Lv2Paraf1_Z[3] + m_config.getParameter(prep + "L3") * Unit::cm / Unit::mm;
403 Lv2Paraf1_Z[5] = Lv2Paraf1_Z[4] + m_config.getParameter(prep + "L4") * Unit::cm / Unit::mm;
404 Lv2Paraf1_Z[6] = Lv2Paraf1_Z[5] + m_config.getParameter(prep + "L5") * Unit::cm / Unit::mm;
405 Lv2Paraf1_Z[7] = Lv2Paraf1_Z[6] + m_config.getParameter(prep + "L6") * Unit::cm / Unit::mm;
406 Lv2Paraf1_Z[8] = Lv2Paraf1_Z[7] + m_config.getParameter(prep + "L7") * Unit::cm / Unit::mm;
407 Lv2Paraf1_Z[9] = Lv2Paraf1_Z[8] + m_config.getParameter(prep + "L8") * Unit::cm / Unit::mm;
408 Lv2Paraf1_Z[10] = Lv2Paraf1_Z[9] + m_config.getParameter(prep + "L9") * Unit::cm / Unit::mm + m_config.getParameter(
409 prep + "L10") * Unit::cm / Unit::mm;
410 Lv2Paraf1_Z[11] = Lv2Paraf1_Z[10] + m_config.getParameter(prep + "L11") * Unit::cm / Unit::mm;
411 Lv2Paraf1_Z[12] = Lv2Paraf1_Z[11] + m_config.getParameter(prep + "L12") * Unit::cm / Unit::mm;
412 Lv2Paraf1_Z[13] = Lv2Paraf1_Z[12] + m_config.getParameter(prep + "L13") * Unit::cm / Unit::mm;
413 Lv2Paraf1_Z[14] = Lv2Paraf1_Z[13] + m_config.getParameter(prep + "L14") * Unit::cm / Unit::mm;
414 Lv2Paraf1_Z[15] = Lv2Paraf1_Z[14] + m_config.getParameter(prep + "L15") * Unit::cm / Unit::mm + m_config.getParameter(
415 prep + "L16") * Unit::cm / Unit::mm;
416 Lv2Paraf1_Z[16] = Lv2Paraf1_Z[15] + m_config.getParameter(prep + "L17") * Unit::cm / Unit::mm + m_config.getParameter(
417 prep + "L18") * Unit::cm / Unit::mm;
418 Lv2Paraf1_Z[17] = Lv2Paraf1_Z[16] + m_config.getParameter(prep + "L19") * Unit::cm / Unit::mm;
419 Lv2Paraf1_Z[18] = Lv2Paraf1_Z[17];
420 Lv2Paraf1_Z[19] = Lv2Paraf1_Z[18] + m_config.getParameter(prep + "L20") * Unit::cm / Unit::mm;
421 //
422 double Lv2Paraf1_rI[Lv2Paraf1_num];
423 Lv2Paraf1_rI[0] = m_config.getParameter(prep + "R1") * Unit::cm / Unit::mm;
424 Lv2Paraf1_rI[1] = Lv2Paraf1_rI[0];
425 Lv2Paraf1_rI[2] = Lv2Paraf1_rI[1];
426 Lv2Paraf1_rI[3] = Lv2Paraf1_rI[2];
427 Lv2Paraf1_rI[4] = Lv2Paraf1_rI[3];
428 Lv2Paraf1_rI[5] = Lv2Paraf1_rI[4];
429 Lv2Paraf1_rI[6] = Lv2Paraf1_rI[5];
430 Lv2Paraf1_rI[7] = m_config.getParameter(prep + "R6") * Unit::cm / Unit::mm;
431 Lv2Paraf1_rI[8] = Lv2Paraf1_rI[7];
432 Lv2Paraf1_rI[9] = Lv2Paraf1_rI[8];
433 Lv2Paraf1_rI[10] = Lv2Paraf1_rI[9];
434 Lv2Paraf1_rI[11] = Lv2Paraf1_rI[10];
435 Lv2Paraf1_rI[12] = Lv2Paraf1_rI[11];
436 Lv2Paraf1_rI[13] = m_config.getParameter(prep + "R9") * Unit::cm / Unit::mm;
437 Lv2Paraf1_rI[14] = Lv2Paraf1_rI[13];
438 Lv2Paraf1_rI[15] = Lv2Paraf1_rI[14];
439 Lv2Paraf1_rI[16] = Lv2Paraf1_rI[15];
440 Lv2Paraf1_rI[17] = Lv2Paraf1_rI[16];
441 Lv2Paraf1_rI[18] = Lv2Paraf1_rI[17];
442 Lv2Paraf1_rI[19] = Lv2Paraf1_rI[18];
443 //
444 double Lv2Paraf1_rO[Lv2Paraf1_num];
445 Lv2Paraf1_rO[0] = m_config.getParameter(prep + "R2") * Unit::cm / Unit::mm;
446 Lv2Paraf1_rO[1] = Lv2Paraf1_rO[0];
447 Lv2Paraf1_rO[2] = m_config.getParameter(prep + "R3") * Unit::cm / Unit::mm;
448 Lv2Paraf1_rO[3] = m_config.getParameter(prep + "R4") * Unit::cm / Unit::mm;
449 Lv2Paraf1_rO[4] = Lv2Paraf1_rO[3];
450 Lv2Paraf1_rO[5] = m_config.getParameter(prep + "R5") * Unit::cm / Unit::mm;
451 Lv2Paraf1_rO[6] = Lv2Paraf1_rO[5];
452 Lv2Paraf1_rO[7] = Lv2Paraf1_rO[6];
453 Lv2Paraf1_rO[8] = Lv2Paraf1_rO[7];
454 Lv2Paraf1_rO[9] = m_config.getParameter(prep + "R7") * Unit::cm / Unit::mm;
455 Lv2Paraf1_rO[10] = Lv2Paraf1_rO[9];
456 Lv2Paraf1_rO[11] = m_config.getParameter(prep + "R8") * Unit::cm / Unit::mm;
457 Lv2Paraf1_rO[12] = Lv2Paraf1_rO[11];
458 Lv2Paraf1_rO[13] = Lv2Paraf1_rO[12];
459 Lv2Paraf1_rO[14] = Lv2Paraf1_rO[13];
460 Lv2Paraf1_rO[15] = m_config.getParameter(prep + "R10") * Unit::cm / Unit::mm;
461 Lv2Paraf1_rO[16] = Lv2Paraf1_rO[15];
462 Lv2Paraf1_rO[17] = m_config.getParameter(prep + "R12") * Unit::cm / Unit::mm;
463 Lv2Paraf1_rO[18] = m_config.getParameter(prep + "R13") * Unit::cm / Unit::mm;
464 Lv2Paraf1_rO[19] = Lv2Paraf1_rO[18];
465 //
466 //
467 double Lv2Paraf2_Z[Lv2Paraf2_num];
468 Lv2Paraf2_Z[0] = 0.0;
469 for (int tmpn = 10; tmpn <= 15; tmpn++) {
470 Lv2Paraf2_Z[0] += m_config.getParameter(prep + (format("L%1%") % tmpn).str().c_str()) * Unit::cm / Unit::mm;
471 }
472 Lv2Paraf2_Z[1] = Lv2Paraf2_Z[0] + m_config.getParameter(prep + "L16") * Unit::cm / Unit::mm + m_config.getParameter(
473 prep + "L17") * Unit::cm / Unit::mm;
474 Lv2Paraf2_Z[2] = Lv2Paraf2_Z[1] + m_config.getParameter(prep + "L18") * Unit::cm / Unit::mm + m_config.getParameter(
475 prep + "L19") * Unit::cm / Unit::mm +
476 m_config.getParameter(prep + "L20") * Unit::cm / Unit::mm + 1.0;
477 //
478 double Lv2Paraf2_rI[Lv2Paraf2_num];
479 for (int tmpn = 0; tmpn < Lv2Paraf2_num; tmpn++)
480 { Lv2Paraf2_rI[tmpn] = 0.0; }
481 //
482 double Lv2Paraf2_rO[Lv2Paraf2_num];
483 Lv2Paraf2_rO[0] = m_config.getParameter(prep + "R9") * Unit::cm / Unit::mm;
484 Lv2Paraf2_rO[1] = m_config.getParameter(prep + "R11") * Unit::cm / Unit::mm;
485 Lv2Paraf2_rO[2] = Lv2Paraf2_rO[1];
486 //
487 string strMat_Lv2Paraf = m_config.getParameterStr(prep + "Material");
488 G4Material* mat_Lv2Paraf = Materials::get(strMat_Lv2Paraf);
489
490 //define geometry
491 G4Polycone* geo_Lv2Parafpcon1 = new G4Polycone("geo_Lv2Parafpcon1_name", 0, 2 * M_PI, Lv2Paraf1_num, Lv2Paraf1_Z, Lv2Paraf1_rI,
492 Lv2Paraf1_rO);
493 G4Polycone* geo_Lv2Parafpcon2 = new G4Polycone("geo_Lv2Parafpcon2_name", 0, 2 * M_PI, Lv2Paraf2_num, Lv2Paraf2_Z, Lv2Paraf2_rI,
494 Lv2Paraf2_rO);
495 G4SubtractionSolid* geo_Lv2Paraf = new G4SubtractionSolid("geo_Lv2Paraf_name", geo_Lv2Parafpcon1, geo_Lv2Parafpcon2);
496 G4LogicalVolume* logi_Lv2Paraf = new G4LogicalVolume(geo_Lv2Paraf, mat_Lv2Paraf, "logi_Lv2Paraf_name");
497
498 //- put volume
499 setColor(*logi_Lv2Paraf, "#00CCCC");
500 new G4PVPlacement(0, G4ThreeVector(0, 0, 0), logi_Lv2Paraf, "phys_Lv2Paraf_name", logi_Lv1SUS, false, 0);
501
502 //-
503 //----------
504
505 //----------
506 //- Lv3AuCoat
507
508 //get parameters from .xml file
509 prep = "Lv3AuCoat.";
510 //
511 const int Lv3AuCoat_num = 2;
512 //
513 double Lv3AuCoat_Z[Lv3AuCoat_num];
514 Lv3AuCoat_Z[0] = -m_config.getParameter(prep + "L1") * Unit::cm / Unit::mm;
515 Lv3AuCoat_Z[1] = m_config.getParameter(prep + "L2") * Unit::cm / Unit::mm;
516 //
517 double Lv3AuCoat_rI[Lv3AuCoat_num];
518 Lv3AuCoat_rI[0] = m_config.getParameter(prep + "R1") * Unit::cm / Unit::mm;
519 Lv3AuCoat_rI[1] = Lv3AuCoat_rI[0];
520 //
521 double Lv3AuCoat_rO[Lv3AuCoat_num];
522 Lv3AuCoat_rO[0] = m_config.getParameter(prep + "R2") * Unit::cm / Unit::mm;
523 Lv3AuCoat_rO[1] = Lv3AuCoat_rO[0];
524 //
525 string strMat_Lv3AuCoat = m_config.getParameterStr(prep + "Material");
526 G4Material* mat_Lv3AuCoat = Materials::get(strMat_Lv3AuCoat);
527
528 //define geometry
529 G4Polycone* geo_Lv3AuCoat = new G4Polycone("geo_Lv3AuCoat_name", 0, 2 * M_PI, Lv3AuCoat_num, Lv3AuCoat_Z, Lv3AuCoat_rI,
530 Lv3AuCoat_rO);
531 G4LogicalVolume* logi_Lv3AuCoat = new G4LogicalVolume(geo_Lv3AuCoat, mat_Lv3AuCoat, "logi_Lv3AuCoat_name");
532
533 //- put volume
534 setColor(*logi_Lv3AuCoat, "#CCCC00");
535 new G4PVPlacement(0, G4ThreeVector(0, 0, 0), logi_Lv3AuCoat, "phys_Lv3AuCoat_name", logi_Lv2Vacuum, false, 0);
536
537 //-
538 //----------
539
542
543 //get parameters from .xml file
544 prep = "Flange.";
545 //
546 double Flange_R = m_config.getParameter(prep + "R") * Unit::cm / Unit::mm;
547 double Flange_L1 = m_config.getParameter(prep + "L1") * Unit::cm / Unit::mm;
548 //double Flange_L2 = m_config.getParameter(prep+"L2") * Unit::cm / Unit::mm;// Not used (2015/April/16. masked by T.Hara)
549 double Flange_D = m_config.getParameter(prep + "D") * Unit::cm / Unit::mm;
550 double Flange_T = m_config.getParameter(prep + "T") * Unit::cm / Unit::mm;
551
552 //define geometry
553 //G4Box* geo_Flange0 = new G4Box("geo_Flange0_name", Flange_L2, Flange_R, Flange_T);
554 G4Tubs* geo_Flange0 = new G4Tubs("geo_Flange0_name", 0, 424 * Unit::mm, Flange_T, 0, 2 * M_PI);
555 G4Tubs* geo_Flange1 = new G4Tubs("geo_Flange1_name", 0, Flange_R, Flange_T, 0, 2 * M_PI);
556 G4Tubs* geo_Flange2 = new G4Tubs("geo_Flange2_name", 0, Flange_R, Flange_T, 0, 2 * M_PI);
557
558 G4UnionSolid* geo_Flange_x = new G4UnionSolid("geo_Flange_x_name", geo_Flange1, geo_Flange2, G4Translate3D(-Flange_L1 * 2, 0, 0));
559 G4IntersectionSolid* geo_Flange = new G4IntersectionSolid("geo_Flange_name", geo_Flange0, geo_Flange_x, G4Translate3D(Flange_L1, 0,
560 0));
561
562
565
568
569
570 //----------
571 //- Lv1TaFwd
572
573 //get parameters from .xml file
574 prep = "Lv1TaFwd.";
575 //
576 double Lv1TaFwd_D1 = m_config.getParameter(prep + "D1") * Unit::cm / Unit::mm;
577 double Lv1TaFwd_L1 = m_config.getParameter(prep + "L1") * Unit::cm / Unit::mm;
578 //double Lv1TaFwd_L2 = m_config.getParameter(prep + "L2") * Unit::cm / Unit::mm;
579 //double Lv1TaFwd_L3 = m_config.getParameter(prep + "L3") * Unit::cm / Unit::mm;
580 double Lv1TaFwd_T1 = m_config.getParameter(prep + "T1") * Unit::cm / Unit::mm;
581 double Lv1TaFwd_aR1 = m_config.getParameter(prep + "aR1") * Unit::cm / Unit::mm;
582 double Lv1TaFwd_aR2 = m_config.getParameter(prep + "aR2") * Unit::cm / Unit::mm;
583 double Lv1TaFwd_aL1 = m_config.getParameter(prep + "aL1") * Unit::cm / Unit::mm;
584 double Lv1TaFwd_aL2 = m_config.getParameter(prep + "aL2") * Unit::cm / Unit::mm;
585 double Lv1TaFwd_aL3 = m_config.getParameter(prep + "aL3") * Unit::cm / Unit::mm;
586 double Lv1TaFwd_bL1 = Lv1TaFwd_L1 - Lv1TaFwd_aL1 - Lv1TaFwd_aL2 - Lv1TaFwd_aL3;
587 double Lv1TaFwd_bL2 = m_config.getParameter(prep + "bL2") * Unit::cm / Unit::mm;
588 double Lv1TaFwd_bL3 = m_config.getParameter(prep + "bL3") * Unit::cm / Unit::mm;
589 //
590 string strMat_Lv1TaFwd = m_config.getParameterStr(prep + "Material");
591 G4Material* mat_Lv1TaFwd = Materials::get(strMat_Lv1TaFwd);
592
593 //define geometry
594 //G4Trd* geo_Lv1TaFwd_xx = new G4Trd("geo_Lv1TaFwd_xx_name", Lv1TaFwd_L2, Lv1TaFwd_L3, Lv1TaFwd_T1, Lv1TaFwd_T1, Lv1TaFwd_L1 / 2.0);
595 double Lv1TaFwd_aR[4] = {Lv1TaFwd_aR1, Lv1TaFwd_aR1, Lv1TaFwd_aR2, Lv1TaFwd_aR2};
596 double Lv1TaFwd_ar[4] = {0, 0, 0, 0};
597 double Lv1TaFwd_aL[4] = { -Lv1TaFwd_L1 / 2.0 + 0,
598 -Lv1TaFwd_L1 / 2.0 + Lv1TaFwd_aL1,
599 -Lv1TaFwd_L1 / 2.0 + Lv1TaFwd_aL1 + Lv1TaFwd_aL2,
600 -Lv1TaFwd_L1 / 2.0 + Lv1TaFwd_aL1 + Lv1TaFwd_aL2 + Lv1TaFwd_aL3
601 };
602 G4VSolid* geo_Lv1TaFwd_a = new G4Polycone("geo_Lv1TaFwd_a_name", 0, 2 * M_PI, 4, Lv1TaFwd_aL, Lv1TaFwd_ar, Lv1TaFwd_aR);
603 G4VSolid* geo_Lv1TaFwd_b = new G4Trd("geo_Lv1TaFwd_b_name", Lv1TaFwd_bL2, Lv1TaFwd_bL3, Lv1TaFwd_T1, Lv1TaFwd_T1,
604 Lv1TaFwd_bL1 / 2.0);
605 G4VSolid* geo_Lv1TaFwd_c = new G4Box("geo_Lv1TaFwd_c_name", 200, Lv1TaFwd_T1, (Lv1TaFwd_aL1 + Lv1TaFwd_aL2 + Lv1TaFwd_aL3) / 2.0);
606 G4VSolid* geo_Lv1TaFwd_d = new G4IntersectionSolid("geo_Lv1TaFwd_d_name", geo_Lv1TaFwd_a, geo_Lv1TaFwd_c, G4Translate3D(0, 0,
607 -Lv1TaFwd_L1 / 2.0 + (Lv1TaFwd_aL1 + Lv1TaFwd_aL2 + Lv1TaFwd_aL3) / 2.0));
608 G4VSolid* geo_Lv1TaFwd_xx = new G4UnionSolid("geo_Lv1TaFwd_xx_name", geo_Lv1TaFwd_d, geo_Lv1TaFwd_b, G4Translate3D(0, 0,
609 Lv1TaFwd_L1 / 2.0 - Lv1TaFwd_bL1 / 2.0));
610 G4UnionSolid* geo_Lv1TaFwd_x
611 = new G4UnionSolid("geo_Lv1TaFwd_x_name", geo_Lv1TaFwd_xx, geo_Flange,
612 G4Translate3D(0, 0, Flange_D - (Lv1TaFwd_D1 + Lv1TaFwd_L1 / 2.0)));
613
614 //===MODIFY ME!!===
615 //avoid overlap with HeavyMetalShield
616 double HMS_Z[4] = {350, 410, 450, 482};
617 double HMS_rI[4] = {35.5, 35.5, 42.5, 42.5};
618 double HMS_rO[4] = {100, 100, 100, 100};
619 G4Polycone* geo_HMS = new G4Polycone("geo_HMS_name", 0, 2 * M_PI, 4, HMS_Z, HMS_rI, HMS_rO);
620 G4SubtractionSolid* geo_Lv1TaFwd = new G4SubtractionSolid("geo_Lv1TaFwd_name", geo_Lv1TaFwd_x, geo_HMS,
621 G4Translate3D(0, 0, -(Lv1TaFwd_D1 + Lv1TaFwd_L1 / 2.0)));
622
623 G4LogicalVolume* logi_Lv1TaFwd = new G4LogicalVolume(geo_Lv1TaFwd, mat_Lv1TaFwd, "logi_Lv1TaFwd_name");
624
625 //- put volume at (0.,0.,D1 + L1/2)
626 setColor(*logi_Lv1TaFwd, "#333333");
627 new G4PVPlacement(0, G4ThreeVector(0, 0, Lv1TaFwd_D1 + Lv1TaFwd_L1 / 2.0), logi_Lv1TaFwd, "phys_Lv1TaFwd_name", &topVolume, false,
628 0);
629
630
631 //----------
632 //- Lv2VacFwd
633
634 //get parameters from .xml file
635 prep = "Lv2VacFwd.";
636 //
637 double Lv2VacFwd_D1 = m_config.getParameter(prep + "D1") * Unit::cm / Unit::mm;
638 double Lv2VacFwd_D2 = m_config.getParameter(prep + "D2") * Unit::cm / Unit::mm;
639 double Lv2VacFwd_D3 = m_config.getParameter(prep + "D3") * Unit::cm / Unit::mm;
640 double Lv2VacFwd_L1 = m_config.getParameter(prep + "L1") * Unit::cm / Unit::mm;
641 double Lv2VacFwd_L2 = m_config.getParameter(prep + "L2") * Unit::cm / Unit::mm;
642 double Lv2VacFwd_L3 = m_config.getParameter(prep + "L3") * Unit::cm / Unit::mm;
643 double Lv2VacFwd_R1 = m_config.getParameter(prep + "R1") * Unit::cm / Unit::mm;
644 double Lv2VacFwd_R2 = m_config.getParameter(prep + "R2") * Unit::cm / Unit::mm;
645 double Lv2VacFwd_R3 = m_config.getParameter(prep + "R3") * Unit::cm / Unit::mm;
646 double Lv2VacFwd_R4 = m_config.getParameter(prep + "R4") * Unit::cm / Unit::mm;
647 double Lv2VacFwd_A1 = m_config.getParameter(prep + "A1");
648 double Lv2VacFwd_A2 = m_config.getParameter(prep + "A2");
649 //
650 string strMat_Lv2VacFwd = m_config.getParameterStr(prep + "Material");
651 G4Material* mat_Lv2VacFwd = Materials::get(strMat_Lv2VacFwd);
652 //
653 // Part 1
654 double Lv2VacFwd1_Z1 = sqrt(Lv2VacFwd_D1 * Lv2VacFwd_D1 + Lv2VacFwd_D2 * Lv2VacFwd_D2 - 2.*Lv2VacFwd_D1 * Lv2VacFwd_D2 * cos(
655 Lv2VacFwd_A1));
656 double Lv2VacFwd1_rI1 = 0.0;
657 double Lv2VacFwd1_rO1 = Lv2VacFwd_R1;
658 //
659 double Lv2VacFwd1_Z2 = (Lv2VacFwd1_Z1 / 2. * cos(Lv2VacFwd_A2)) + SafetyLength;
660 double Lv2VacFwd1_rI2 = 0.0;
661 double Lv2VacFwd1_rO2 = 2 * Lv2VacFwd_R1;
662 // Part 2
663 double Lv2VacFwd2_Z1 = Lv2VacFwd_L1;
664 double Lv2VacFwd2_rI1 = 0.0;
665 double Lv2VacFwd2_rO1 = Lv2VacFwd_R2;
666 //
667 double Lv2VacFwd2_Z2 = (Lv2VacFwd_L1 / 2. * cos(Lv2VacFwd_A2)) + SafetyLength;
668 double Lv2VacFwd2_rI2 = 0.0;
669 double Lv2VacFwd2_rO2 = 2 * Lv2VacFwd_R2;
670 // Part 3
671 const int Lv2VacFwd3_num1 = 2; // Cylindrical part
672 const int Lv2VacFwd3_num2 = 3; // Policone part
673 //-----------> Cylindrical part
674 double Lv2VacFwd_Z1[Lv2VacFwd3_num1];
675 Lv2VacFwd_Z1[0] = 0.0;
676// Lv2VacFwd_Z1[1] = Lv2VacFwd_D3 - Lv2VacFwd_L2;
677 Lv2VacFwd_Z1[1] = Lv2VacFwd_D3 - Lv2VacFwd_L2 + 0.03 * SafetyLength;
678 double Lv2VacFwd_rI1[Lv2VacFwd3_num1];
679 for (int tmpn = 0; tmpn < Lv2VacFwd3_num1; tmpn++)
680 { Lv2VacFwd_rI1[tmpn] = 0.0; }
681 double Lv2VacFwd_rO1[Lv2VacFwd3_num1];
682 Lv2VacFwd_rO1[0] = Lv2VacFwd_R3;
683 Lv2VacFwd_rO1[1] = Lv2VacFwd_R3;
684 //<---------------
685 //----------->Policone part
686 double Lv2VacFwd_Z2[Lv2VacFwd3_num2];
687 Lv2VacFwd_Z2[0] = Lv2VacFwd_D3 - Lv2VacFwd_L2;
688 Lv2VacFwd_Z2[1] = Lv2VacFwd_D3;
689 Lv2VacFwd_Z2[2] = Lv2VacFwd_D3 + Lv2VacFwd_L3;
690 double Lv2VacFwd_rI2[Lv2VacFwd3_num2];
691 for (int tmpn = 0; tmpn < Lv2VacFwd3_num2; tmpn++)
692 { Lv2VacFwd_rI2[tmpn] = 0.0; }
693 double Lv2VacFwd_rO2[Lv2VacFwd3_num2];
694 Lv2VacFwd_rO2[0] = Lv2VacFwd_R3;
695 Lv2VacFwd_rO2[1] = Lv2VacFwd_R4;
696 Lv2VacFwd_rO2[2] = Lv2VacFwd_R4;
697 //<-------------------
698 //
699
700 //define geometry
701 // Part 1
702 G4Tubs* geo_Lv2VacFwdPart1_1 = new G4Tubs("geo_Lv2VacFwdPart1_1_name", Lv2VacFwd1_rI1, Lv2VacFwd1_rO1, Lv2VacFwd1_Z1, 0, 2 * M_PI);
703 G4Tubs* geo_Lv2VacFwdPart1_2 = new G4Tubs("geo_Lv2VacFwdPart1_2_name", Lv2VacFwd1_rI2, Lv2VacFwd1_rO2, Lv2VacFwd1_Z2, 0, 2 * M_PI);
704 //Slanted tube of Part 1
705 G4Transform3D transform_Lv2VacFwdPart1_2 = G4Translate3D(0., 0., 0.);
706 transform_Lv2VacFwdPart1_2 = transform_Lv2VacFwdPart1_2 * G4RotateY3D(-Lv2VacFwd_A2 / 2.);
707 G4IntersectionSolid* geo_Lv2VacFwdPart1 = new G4IntersectionSolid("geo_Lv2VacFwdPart1_name", geo_Lv2VacFwdPart1_1,
708 geo_Lv2VacFwdPart1_2, transform_Lv2VacFwdPart1_2);
709 // Part 2
710 G4Tubs* geo_Lv2VacFwdPart2_1 = new G4Tubs("geo_Lv2VacFwdPart2_1_name", Lv2VacFwd2_rI1, Lv2VacFwd2_rO1, Lv2VacFwd2_Z1, 0, 2 * M_PI);
711 G4Tubs* geo_Lv2VacFwdPart2_2 = new G4Tubs("geo_Lv2VacFwdPart2_2_name", Lv2VacFwd2_rI2, Lv2VacFwd2_rO2, Lv2VacFwd2_Z2, 0, 2 * M_PI);
712 //Slanted tube of Part 2
713 G4Transform3D transform_Lv2VacFwdPart2_2 = G4Translate3D(0., 0., 0.);
714 transform_Lv2VacFwdPart2_2 = transform_Lv2VacFwdPart2_2 * G4RotateY3D(Lv2VacFwd_A2 / 2.);
715 G4IntersectionSolid* geo_Lv2VacFwdPart2 = new G4IntersectionSolid("geo_Lv2VacFwdPart2_name", geo_Lv2VacFwdPart2_1,
716 geo_Lv2VacFwdPart2_2, transform_Lv2VacFwdPart2_2);
717 // Part 3
718// G4Polycone* geo_Lv2VacFwdPart3 = new G4Polycone("geo_Lv2VacFwdPart3", 0, 2 * M_PI, Lv2VacFwd3_num, Lv2VacFwd_Z, Lv2VacFwd_rI, Lv2VacFwd_rO);
719 G4Polycone* geo_Lv2VacFwdPart3_1 = new G4Polycone("geo_Lv2VacFwdPart3_1", 0, 2 * M_PI, Lv2VacFwd3_num1, Lv2VacFwd_Z1, Lv2VacFwd_rI1,
720 Lv2VacFwd_rO1);
721 G4Polycone* geo_Lv2VacFwdPart3_2 = new G4Polycone("geo_Lv2VacFwdPart3_2", 0, 2 * M_PI, Lv2VacFwd3_num2, Lv2VacFwd_Z2, Lv2VacFwd_rI2,
722 Lv2VacFwd_rO2);
723 G4Transform3D transform_Lv2VacFwdPart3_1 = G4Translate3D(-0.5, 0., 0.);
724 transform_Lv2VacFwdPart3_1 = transform_Lv2VacFwdPart3_1 * G4RotateY3D(Lv2VacFwd_A1 - A11);
725 G4UnionSolid* geo_Lv2VacFwdPart3 = new G4UnionSolid("geo_Lv2VacFwdPart3_name", geo_Lv2VacFwdPart3_2, geo_Lv2VacFwdPart3_1,
726 transform_Lv2VacFwdPart3_1);
727 // Part1+2+3
728 //tmp begin
729 G4Transform3D transform_Lv2VacFwdPart1 = G4Translate3D((Lv2VacFwd_D1 * sin(Lv2VacFwd_A1) + Lv2VacFwd_D2 * sin(
730 2.*Lv2VacFwd_A1)) / 2.,
731 0.,
732 (Lv2VacFwd_D1 * cos(Lv2VacFwd_A1) + Lv2VacFwd_D2 * cos(2.*Lv2VacFwd_A1)) / 2.);
733 //G4Transform3D transform_Lv2VacFwdPart1 = G4Translate3D((Lv2VacFwd_D1 * sin(Lv2VacFwd_A1) + Lv2VacFwd_D2 * sin(2.*Lv2VacFwd_A1)) / 1.9 ,
734 // 0.,
735 // (Lv2VacFwd_D1 * cos(Lv2VacFwd_A1) + Lv2VacFwd_D2 * cos(2.*Lv2VacFwd_A1)) / 1.9);
736 transform_Lv2VacFwdPart1 = transform_Lv2VacFwdPart1 * G4RotateY3D(Lv2VacFwd_A1 + Lv2VacFwd_A2);
737 //
738 G4Transform3D transform_Lv2VacFwdPart2 = G4Translate3D(Lv2VacFwd_D2 * sin(2.*Lv2VacFwd_A1) + Lv2VacFwd_L1 * sin(
739 2.*Lv2VacFwd_A1) / 2.0,
740 0.,
741 Lv2VacFwd_D2 * cos(2.*Lv2VacFwd_A1) + Lv2VacFwd_L1 * cos(2.*Lv2VacFwd_A1) / 2.0);
742 //G4Transform3D transform_Lv2VacFwdPart2 = G4Translate3D(Lv2VacFwd_D2 * sin(2.*Lv2VacFwd_A1) + Lv2VacFwd_L1 * sin(2.*Lv2VacFwd_A1) / 2.05,
743 // 0.,
744 // Lv2VacFwd_D2 * cos(2.*Lv2VacFwd_A1) + Lv2VacFwd_L1 * cos(2.*Lv2VacFwd_A1) / 2.05);
745 //tmp end
746 transform_Lv2VacFwdPart2 = transform_Lv2VacFwdPart2 * G4RotateY3D(2.*Lv2VacFwd_A1);
747 //
748 G4UnionSolid* geo_Lv2VacFwdxx = new G4UnionSolid("geo_Lv2VacFwdxx_name", geo_Lv2VacFwdPart3, geo_Lv2VacFwdPart1,
749 transform_Lv2VacFwdPart1);
750 G4UnionSolid* geo_Lv2VacFwdx = new G4UnionSolid("geo_Lv2VacFwdx_name", geo_Lv2VacFwdxx, geo_Lv2VacFwdPart2,
751 transform_Lv2VacFwdPart2);
752 // Intersection
753 G4Transform3D transform_Lv2VacFwd = G4Translate3D(0., 0., -Lv1TaFwd_D1 - Lv1TaFwd_L1 / 2.);
754 transform_Lv2VacFwd = transform_Lv2VacFwd * G4RotateY3D(-Lv2VacFwd_A1);
755 //
756 G4IntersectionSolid* geo_Lv2VacFwd = new G4IntersectionSolid("geo_Lv2VacFwd_name", geo_Lv1TaFwd, geo_Lv2VacFwdx,
757 transform_Lv2VacFwd);
758 G4LogicalVolume* logi_Lv2VacFwd = new G4LogicalVolume(geo_Lv2VacFwd, mat_Lv2VacFwd, "logi_Lv2VacFwd_name");
759 if (flag_limitStep) logi_Lv2VacFwd->SetUserLimits(new G4UserLimits(stepMax));
760
761 //- put volume
762 setColor(*logi_Lv2VacFwd, "#CCCCCC");
763 //you must set this invisible, otherwise encounter segV.
764 setVisibility(*logi_Lv2VacFwd, false);
765 new G4PVPlacement(0, G4ThreeVector(0., 0., 0.), logi_Lv2VacFwd, "phys_Lv2VacFwd_name", logi_Lv1TaFwd, false, 0);
766
767 //-
768 //----------
769
772
773
776
777 //----------
778 //- Lv1TaBwd
779
780 //get parameters from .xml file
781 prep = "Lv1TaBwd.";
782 //
783 double Lv1TaBwd_D1 = m_config.getParameter(prep + "D1") * Unit::cm / Unit::mm;
784 double Lv1TaBwd_L1 = m_config.getParameter(prep + "L1") * Unit::cm / Unit::mm;
785 //double Lv1TaBwd_L2 = m_config.getParameter(prep + "L2") * Unit::cm / Unit::mm;
786 //double Lv1TaBwd_L3 = m_config.getParameter(prep + "L3") * Unit::cm / Unit::mm;
787 double Lv1TaBwd_T1 = m_config.getParameter(prep + "T1") * Unit::cm / Unit::mm;
788 double Lv1TaBwd_aR1 = m_config.getParameter(prep + "aR1") * Unit::cm / Unit::mm;
789 double Lv1TaBwd_aR2 = m_config.getParameter(prep + "aR2") * Unit::cm / Unit::mm;
790 double Lv1TaBwd_aL1 = m_config.getParameter(prep + "aL1") * Unit::cm / Unit::mm;
791 double Lv1TaBwd_aL2 = m_config.getParameter(prep + "aL2") * Unit::cm / Unit::mm;
792 double Lv1TaBwd_aL3 = m_config.getParameter(prep + "aL3") * Unit::cm / Unit::mm;
793 double Lv1TaBwd_bL1 = Lv1TaBwd_L1 - Lv1TaBwd_aL1 - Lv1TaBwd_aL2 - Lv1TaBwd_aL3;
794 double Lv1TaBwd_bL2 = m_config.getParameter(prep + "bL2") * Unit::cm / Unit::mm;
795 double Lv1TaBwd_bL3 = m_config.getParameter(prep + "bL3") * Unit::cm / Unit::mm;
796 //
797 string strMat_Lv1TaBwd = m_config.getParameterStr(prep + "Material");
798 G4Material* mat_Lv1TaBwd = Materials::get(strMat_Lv1TaBwd);
799
800 //define geometry
801 //G4Trd* geo_Lv1TaBwd_x = new G4Trd("geo_Lv1TaBwd_x_name", Lv1TaBwd_L2, Lv1TaBwd_L3, Lv1TaBwd_T1, Lv1TaBwd_T1, Lv1TaBwd_L1 / 2.0);
802 double Lv1TaBwd_aR[4] = {Lv1TaBwd_aR2, Lv1TaBwd_aR2, Lv1TaBwd_aR1, Lv1TaBwd_aR1};
803 double Lv1TaBwd_ar[4] = {0, 0, 0, 0};
804 double Lv1TaBwd_aL[4] = { +Lv1TaBwd_L1 / 2.0 - (Lv1TaBwd_aL1 + Lv1TaBwd_aL2 + Lv1TaBwd_aL3),
805 +Lv1TaBwd_L1 / 2.0 - (Lv1TaBwd_aL1 + Lv1TaBwd_aL2),
806 +Lv1TaBwd_L1 / 2.0 - (Lv1TaBwd_aL1),
807 +Lv1TaBwd_L1 / 2.0 - 0
808 };
809 G4VSolid* geo_Lv1TaBwd_a = new G4Polycone("geo_Lv1TaBwd_a_name", 0, 2 * M_PI, 4, Lv1TaBwd_aL, Lv1TaBwd_ar, Lv1TaBwd_aR);
810 G4VSolid* geo_Lv1TaBwd_b = new G4Trd("geo_Lv1TaBwd_b_name", Lv1TaBwd_bL2, Lv1TaBwd_bL3, Lv1TaBwd_T1, Lv1TaBwd_T1,
811 Lv1TaBwd_bL1 / 2.0);
812 G4VSolid* geo_Lv1TaBwd_c = new G4Box("geo_Lv1TaBwd_c_name", 200, Lv1TaBwd_T1, (Lv1TaBwd_aL1 + Lv1TaBwd_aL2 + Lv1TaBwd_aL3) / 2.0);
813 G4VSolid* geo_Lv1TaBwd_d = new G4IntersectionSolid("geo_Lv1TaBwd_d_name", geo_Lv1TaBwd_a, geo_Lv1TaBwd_c, G4Translate3D(0, 0,
814 +Lv1TaBwd_L1 / 2.0 - (Lv1TaBwd_aL1 + Lv1TaBwd_aL2 + Lv1TaBwd_aL3) / 2.0));
815 G4VSolid* geo_Lv1TaBwd_x = new G4UnionSolid("geo_Lv1TaBwd_x_name", geo_Lv1TaBwd_d, geo_Lv1TaBwd_b, G4Translate3D(0, 0,
816 -Lv1TaBwd_L1 / 2.0 + Lv1TaBwd_bL1 / 2.0));
817 G4UnionSolid* geo_Lv1TaBwd = new G4UnionSolid("geo_Lv1TaBwd_name", geo_Lv1TaBwd_x, geo_Flange,
818 G4Translate3D(0, 0, -Flange_D - (-Lv1TaBwd_D1 - Lv1TaBwd_L1 / 2.0)));
819 G4LogicalVolume* logi_Lv1TaBwd = new G4LogicalVolume(geo_Lv1TaBwd, mat_Lv1TaBwd, "logi_Lv1TaBwd_name");
820
821 //- put volume
822 setColor(*logi_Lv1TaBwd, "#333333");
823 new G4PVPlacement(0, G4ThreeVector(0, 0, -Lv1TaBwd_D1 - Lv1TaBwd_L1 / 2.0), logi_Lv1TaBwd, "phys_Lv1TaBwd_name", &topVolume, false,
824 0);
825
826 //-
827 //----------
828
829 //----------
830 //- Lv2VacBwd
831
832 //get parameters from .xml file
833 prep = "Lv2VacBwd.";
834 //
835 double Lv2VacBwd_D1 = m_config.getParameter(prep + "D1") * Unit::cm / Unit::mm;
836 double Lv2VacBwd_D2 = m_config.getParameter(prep + "D2") * Unit::cm / Unit::mm;
837 double Lv2VacBwd_D3 = m_config.getParameter(prep + "D3") * Unit::cm / Unit::mm;
838 double Lv2VacBwd_L1 = m_config.getParameter(prep + "L1") * Unit::cm / Unit::mm;
839 double Lv2VacBwd_L2 = m_config.getParameter(prep + "L2") * Unit::cm / Unit::mm;
840 double Lv2VacBwd_L3 = m_config.getParameter(prep + "L3") * Unit::cm / Unit::mm;
841 double Lv2VacBwd_R1 = m_config.getParameter(prep + "R1") * Unit::cm / Unit::mm;
842 double Lv2VacBwd_R2 = m_config.getParameter(prep + "R2") * Unit::cm / Unit::mm;
843 double Lv2VacBwd_R3 = m_config.getParameter(prep + "R3") * Unit::cm / Unit::mm;
844 double Lv2VacBwd_R4 = m_config.getParameter(prep + "R4") * Unit::cm / Unit::mm;
845 double Lv2VacBwd_A1 = m_config.getParameter(prep + "A1");
846 double Lv2VacBwd_A2 = m_config.getParameter(prep + "A2");
847 //
848 string strMat_Lv2VacBwd = m_config.getParameterStr(prep + "Material");
849 G4Material* mat_Lv2VacBwd = Materials::get(strMat_Lv2VacBwd);
850 //
851 // Part 1
852 double Lv2VacBwd1_Z1 = sqrt(Lv2VacBwd_D1 * Lv2VacBwd_D1 + Lv2VacBwd_D2 * Lv2VacBwd_D2 - 2.*Lv2VacBwd_D1 * Lv2VacBwd_D2 * cos(
853 Lv2VacBwd_A1));
854 double Lv2VacBwd1_rI1 = 0.0;
855 double Lv2VacBwd1_rO1 = Lv2VacBwd_R1;
856 //
857 double Lv2VacBwd1_Z2 = (Lv2VacBwd1_Z1 / 2. * cos(Lv2VacBwd_A2)) + SafetyLength;
858 double Lv2VacBwd1_rI2 = 0.0;
859 double Lv2VacBwd1_rO2 = 2 * Lv2VacBwd_R1;
860 // Part 2
861 double Lv2VacBwd2_Z1 = Lv2VacBwd_L1;
862 double Lv2VacBwd2_rI1 = 0.0;
863 double Lv2VacBwd2_rO1 = Lv2VacBwd_R2;
864 //
865 double Lv2VacBwd2_Z2 = (Lv2VacBwd_L1 / 2. * cos(Lv2VacBwd_A2)) + SafetyLength;
866 double Lv2VacBwd2_rI2 = 0.0;
867 double Lv2VacBwd2_rO2 = 2 * Lv2VacBwd_R2;
868 // Part 3
869 const int Lv2VacBwd3_num1 = 2; // cylindrical part
870 const int Lv2VacBwd3_num2 = 3; // policone part
871 // ----------->Cylindrical part
872 double Lv2VacBwd_Z1[Lv2VacBwd3_num1];
873 Lv2VacBwd_Z1[0] = 0.0;
874 Lv2VacBwd_Z1[1] = -Lv2VacBwd_D3 + Lv2VacBwd_L2 - 0.03 * SafetyLength;
875 double Lv2VacBwd_rI1[Lv2VacBwd3_num1];
876 for (int tmpn = 0; tmpn < Lv2VacBwd3_num1; tmpn++)
877 { Lv2VacBwd_rI1[tmpn] = 0.0; }
878 double Lv2VacBwd_rO1[Lv2VacBwd3_num1];
879 Lv2VacBwd_rO1[0] = Lv2VacBwd_R3;
880 Lv2VacBwd_rO1[1] = Lv2VacBwd_R3;
881 //<----------------
882 //------------> Policone part
883 double Lv2VacBwd_Z2[Lv2VacBwd3_num2];
884 Lv2VacBwd_Z2[0] = -Lv2VacBwd_D3 + Lv2VacBwd_L2;
885 Lv2VacBwd_Z2[1] = -Lv2VacBwd_D3;
886 Lv2VacBwd_Z2[2] = -Lv2VacBwd_D3 - Lv2VacBwd_L3;
887 double Lv2VacBwd_rI2[Lv2VacBwd3_num2];
888 for (int tmpn = 0; tmpn < Lv2VacBwd3_num2; tmpn++)
889 { Lv2VacBwd_rI2[tmpn] = 0.0; }
890 double Lv2VacBwd_rO2[Lv2VacBwd3_num2];
891 Lv2VacBwd_rO2[0] = Lv2VacBwd_R3;
892 Lv2VacBwd_rO2[1] = Lv2VacBwd_R4;
893 Lv2VacBwd_rO2[2] = Lv2VacBwd_R4;
894 //<--------------
895 //
896
897 //define geometry
898 // Part 1
899 G4Tubs* geo_Lv2VacBwdPart1_1 = new G4Tubs("geo_Lv2VacBwdPart1_1_name", Lv2VacBwd1_rI1, Lv2VacBwd1_rO1, Lv2VacBwd1_Z1, 0, 2 * M_PI);
900 G4Tubs* geo_Lv2VacBwdPart1_2 = new G4Tubs("geo_Lv2VacBwdPart1_2_name", Lv2VacBwd1_rI2, Lv2VacBwd1_rO2, Lv2VacBwd1_Z2, 0, 2 * M_PI);
901 G4Transform3D transform_Lv2VacBwdPart1_2 = G4Translate3D(0., 0., 0.);
902 transform_Lv2VacBwdPart1_2 = transform_Lv2VacBwdPart1_2 * G4RotateY3D(Lv2VacBwd_A2 / 2.);
903 G4IntersectionSolid* geo_Lv2VacBwdPart1 = new G4IntersectionSolid("geo_Lv2VacBwdPart1_name", geo_Lv2VacBwdPart1_1,
904 geo_Lv2VacBwdPart1_2, transform_Lv2VacBwdPart1_2);
905 // Part 2
906 G4Tubs* geo_Lv2VacBwdPart2_1 = new G4Tubs("geo_Lv2VacBwdPart2_1_name", Lv2VacBwd2_rI1, Lv2VacBwd2_rO1, Lv2VacBwd2_Z1, 0, 2 * M_PI);
907 G4Tubs* geo_Lv2VacBwdPart2_2 = new G4Tubs("geo_Lv2VacBwdPart2_2_name", Lv2VacBwd2_rI2, Lv2VacBwd2_rO2, Lv2VacBwd2_Z2, 0, 2 * M_PI);
908 G4Transform3D transform_Lv2VacBwdPart2_2 = G4Translate3D(0., 0., 0.);
909 transform_Lv2VacBwdPart2_2 = transform_Lv2VacBwdPart2_2 * G4RotateY3D(-Lv2VacBwd_A2 / 2.);
910 G4IntersectionSolid* geo_Lv2VacBwdPart2 = new G4IntersectionSolid("geo_Lv2VacBwdPart2_name", geo_Lv2VacBwdPart2_1,
911 geo_Lv2VacBwdPart2_2, transform_Lv2VacBwdPart2_2);
912 // Part 3
913// G4Polycone* geo_Lv2VacBwdPart3 = new G4Polycone("geo_Lv2VacBwdPart3", 0, 2 * M_PI, Lv2VacBwd3_num, Lv2VacBwd_Z, Lv2VacBwd_rI, Lv2VacBwd_rO);
914 G4Polycone* geo_Lv2VacBwdPart3_1 = new G4Polycone("geo_Lv2VacBwdPart3_1", 0, 2 * M_PI, Lv2VacBwd3_num1, Lv2VacBwd_Z1, Lv2VacBwd_rI1,
915 Lv2VacBwd_rO1);
916 G4Polycone* geo_Lv2VacBwdPart3_2 = new G4Polycone("geo_Lv2VacBwdPart3_2", 0, 2 * M_PI, Lv2VacBwd3_num2, Lv2VacBwd_Z2, Lv2VacBwd_rI2,
917 Lv2VacBwd_rO2);
918 G4Transform3D transform_Lv2VacBwdPart3_1 = G4Translate3D(-0.5, 0., 0.);
919 transform_Lv2VacBwdPart3_1 = transform_Lv2VacBwdPart3_1 * G4RotateY3D(-Lv2VacBwd_A1 + A11);
920 G4UnionSolid* geo_Lv2VacBwdPart3 = new G4UnionSolid("geo_Lv2VacBwdPart3_name", geo_Lv2VacBwdPart3_2, geo_Lv2VacBwdPart3_1,
921 transform_Lv2VacBwdPart3_1);
922 // Part1+2+3
923 //tmp begin
924 G4Transform3D transform_Lv2VacBwdPart1 = G4Translate3D((Lv2VacBwd_D1 * sin(Lv2VacBwd_A1) + Lv2VacBwd_D2 * sin(
925 2.*Lv2VacBwd_A1)) / 2.,
926 0.,
927 -(Lv2VacBwd_D1 * cos(Lv2VacBwd_A1) + Lv2VacBwd_D2 * cos(2.*Lv2VacBwd_A1)) / 2.);
928 //G4Transform3D transform_Lv2VacBwdPart1 = G4Translate3D((Lv2VacBwd_D1 * sin(Lv2VacBwd_A1) + Lv2VacBwd_D2 * sin(2.*Lv2VacBwd_A1)) / 2.05,
929 // 0.,
930 // -(Lv2VacBwd_D1 * cos(Lv2VacBwd_A1) + Lv2VacBwd_D2 * cos(2.*Lv2VacBwd_A1)) / 2.05);
931 transform_Lv2VacBwdPart1 = transform_Lv2VacBwdPart1 * G4RotateY3D(-Lv2VacBwd_A1 - Lv2VacBwd_A2);
932 //tmp end
933 //
934 G4Transform3D transform_Lv2VacBwdPart2 = G4Translate3D((Lv2VacBwd_D2 + Lv2VacBwd_L1 / 2.0) * sin(2.*Lv2VacBwd_A1),
935 0.,
936 -(Lv2VacBwd_D2 + Lv2VacBwd_L1 / 2.0) * cos(2.*Lv2VacBwd_A1));
937 transform_Lv2VacBwdPart2 = transform_Lv2VacBwdPart2 * G4RotateY3D(-2.*Lv2VacBwd_A1);
938 //
939 G4UnionSolid* geo_Lv2VacBwdxx = new G4UnionSolid("geo_Lv2VacBwdxx_name", geo_Lv2VacBwdPart3, geo_Lv2VacBwdPart1,
940 transform_Lv2VacBwdPart1);
941 G4UnionSolid* geo_Lv2VacBwdx = new G4UnionSolid("geo_Lv2VacBwdx_name", geo_Lv2VacBwdxx, geo_Lv2VacBwdPart2,
942 transform_Lv2VacBwdPart2);
943 // Intersection
944 G4Transform3D transform_Lv2VacBwd = G4Translate3D(0., 0., +Lv1TaBwd_D1 + Lv1TaBwd_L1 / 2.);
945 transform_Lv2VacBwd = transform_Lv2VacBwd * G4RotateY3D(+Lv2VacBwd_A1);
946 //
947 G4IntersectionSolid* geo_Lv2VacBwd = new G4IntersectionSolid("geo_Lv2VacBwd_name", geo_Lv1TaBwd, geo_Lv2VacBwdx,
948 transform_Lv2VacBwd);
949 G4LogicalVolume* logi_Lv2VacBwd = new G4LogicalVolume(geo_Lv2VacBwd, mat_Lv2VacBwd, "logi_Lv2VacBwd_name");
950 if (flag_limitStep) logi_Lv2VacBwd->SetUserLimits(new G4UserLimits(stepMax));
951
952 //- put volume
953 setColor(*logi_Lv2VacBwd, "#CCCCCC");
954 //you must set this invisible, otherwise encounter segV.
955 setVisibility(*logi_Lv2VacBwd, false);
956 new G4PVPlacement(0, G4ThreeVector(0., 0., 0.), logi_Lv2VacBwd, "phys_Lv2VacBwd_name", logi_Lv1TaBwd, false, 0);
957
958 //-
959
962
963 //get parameters from .xml file
964 prep = "AreaTubeFwd.";
965 //
966 const int AreaTubeFwd_num = 2;
967 //
968 double AreaTubeFwd_Z[AreaTubeFwd_num];
969 AreaTubeFwd_Z[0] = m_config.getParameter(prep + "D1") * Unit::cm / Unit::mm;
970 AreaTubeFwd_Z[1] = m_config.getParameter(prep + "D2") * Unit::cm / Unit::mm;
971 //
972 double AreaTubeFwd_rI[AreaTubeFwd_num];
973 for (int i = 0; i < AreaTubeFwd_num; i++)
974 { AreaTubeFwd_rI[i] = 0.0; }
975 //
976 double AreaTubeFwd_rO[AreaTubeFwd_num];
977 AreaTubeFwd_rO[0] = m_config.getParameter(prep + "R1") * Unit::cm / Unit::mm;
978 AreaTubeFwd_rO[1] = AreaTubeFwd_rO[0];
979
980 //define geometry
981 G4Polycone* geo_AreaTubeFwdpcon = new G4Polycone("geo_AreaTubeFwdpcon_name", 0, 2 * M_PI, AreaTubeFwd_num, AreaTubeFwd_Z,
982 AreaTubeFwd_rI, AreaTubeFwd_rO);
983
984 //----------
985 //- Lv1TaLERUp
986
987 //get parameters from .xml file
988 prep = "Lv1TaLERUp.";
989 //
990 double Lv1TaLERUp_A1 = m_config.getParameter(prep + "A1");
991 //
992 const int Lv1TaLERUp_num = 12;
993 //
994 double Lv1TaLERUp_Z[Lv1TaLERUp_num];
995 double Lv1TaLERUp_rO[Lv1TaLERUp_num];
996 for (int i = 0; i < Lv1TaLERUp_num; i++) {
997 ostringstream ossZ_Lv1TaLERUp;
998 ossZ_Lv1TaLERUp << "L" << i + 1;
999
1000 ostringstream ossR_Lv1TaLERUp;
1001 ossR_Lv1TaLERUp << "R" << i + 1;
1002
1003 Lv1TaLERUp_Z[i] = m_config.getParameter(prep + ossZ_Lv1TaLERUp.str()) * Unit::cm / Unit::mm;
1004 Lv1TaLERUp_rO[i] = m_config.getParameter(prep + ossR_Lv1TaLERUp.str()) * Unit::cm / Unit::mm;
1005 }
1006 //
1007 double Lv1TaLERUp_rI[Lv1TaLERUp_num];
1008 for (int i = 0; i < Lv1TaLERUp_num; i++)
1009 { Lv1TaLERUp_rI[i] = 0.0; }
1010 //
1011 string strMat_Lv1TaLERUp = m_config.getParameterStr(prep + "Material");
1012 G4Material* mat_Lv1TaLERUp = Materials::get(strMat_Lv1TaLERUp);
1013
1014 //define geometry
1015 G4Polycone* geo_Lv1TaLERUppcon = new G4Polycone("geo_Lv1TaLERUppcon_name", 0, 2 * M_PI, Lv1TaLERUp_num, Lv1TaLERUp_Z, Lv1TaLERUp_rI,
1016 Lv1TaLERUp_rO);
1017 G4Transform3D transform_AreaTubeFwdForLER = G4Translate3D(0., 0., 0.);
1018 transform_AreaTubeFwdForLER = transform_AreaTubeFwdForLER * G4RotateY3D(-Lv1TaLERUp_A1);
1019 G4IntersectionSolid* geo_Lv1TaLERUp = new G4IntersectionSolid("geo_Lv1TaLERUp_name", geo_Lv1TaLERUppcon, geo_AreaTubeFwdpcon,
1020 transform_AreaTubeFwdForLER);
1021 G4LogicalVolume* logi_Lv1TaLERUp = new G4LogicalVolume(geo_Lv1TaLERUp, mat_Lv1TaLERUp, "logi_Lv1TaLERUp_name");
1022
1023 //- put volume
1024 setColor(*logi_Lv1TaLERUp, "#0000CC");
1025 G4Transform3D transform_Lv1TaLERUp = G4Translate3D(0., 0., 0.);
1026 transform_Lv1TaLERUp = transform_Lv1TaLERUp * G4RotateY3D(Lv1TaLERUp_A1);
1027 new G4PVPlacement(transform_Lv1TaLERUp, logi_Lv1TaLERUp, "phys_Lv1TaLERUp_name", &topVolume, false, 0);
1028
1029 //----------
1030 //-Lv1SUSLERUp
1031 prep = "Lv1SUSLERUp.";
1032 const int Lv1SUSLERUp_num = 6;
1033 double Lv1SUSLERUp_Z[Lv1SUSLERUp_num];
1034 double Lv1SUSLERUp_rO[Lv1SUSLERUp_num];
1035 double Lv1SUSLERUp_rI[Lv1SUSLERUp_num];
1036
1037 for (int i = 0; i < Lv1SUSLERUp_num; i++) {
1038 ostringstream ossZ_Lv1SUSLERUp;
1039 ossZ_Lv1SUSLERUp << "Z" << i + 1;
1040 ostringstream ossRI_Lv1SUSLERUp;
1041 ossRI_Lv1SUSLERUp << "RI" << i + 1;
1042 ostringstream ossRO_Lv1SUSLERUp;
1043 ossRO_Lv1SUSLERUp << "RO" << i + 1;
1044
1045 Lv1SUSLERUp_Z[i] = m_config.getParameter(prep + ossZ_Lv1SUSLERUp.str()) * Unit::cm / Unit::mm;
1046 Lv1SUSLERUp_rI[i] = m_config.getParameter(prep + ossRI_Lv1SUSLERUp.str()) * Unit::cm / Unit::mm;
1047 Lv1SUSLERUp_rO[i] = m_config.getParameter(prep + ossRO_Lv1SUSLERUp.str()) * Unit::cm / Unit::mm;
1048 }
1049
1050 string strMat_Lv1SUSLERUp = m_config.getParameterStr(prep + "Material");
1051 G4Material* mat_Lv1SUSLERUp = Materials::get(strMat_Lv1SUSLERUp);
1052
1053 G4Polycone* geo_Lv1SUSLERUppcon = new G4Polycone("geo_Lv1SUSLERUppcon_name", 0, 2 * M_PI, Lv1SUSLERUp_num, Lv1SUSLERUp_Z,
1054 Lv1SUSLERUp_rI, Lv1SUSLERUp_rO);
1055 G4IntersectionSolid* geo_Lv1SUSLERUp = new G4IntersectionSolid("", geo_Lv1SUSLERUppcon, geo_AreaTubeFwdpcon,
1056 transform_AreaTubeFwdForLER);
1057 G4LogicalVolume* logi_Lv1SUSLERUp = new G4LogicalVolume(geo_Lv1SUSLERUp, mat_Lv1SUSLERUp, "logi_Lv1SUSLERUp_name");
1058
1059 //-put volumn
1060 setColor(*logi_Lv1SUSLERUp, "#666666");
1061 new G4PVPlacement(transform_Lv1TaLERUp, logi_Lv1SUSLERUp, "phys_Lv1SUSLERUp_name", &topVolume, false, 0);
1062
1063 //----------
1064 //- Lv2VacLERUp
1065
1066 //get parameters from .xml file
1067 prep = "Lv2VacLERUp.";
1068 //
1069 double Lv2VacLERUp_rO[Lv1TaLERUp_num];
1070 for (int i = 0; i < Lv1TaLERUp_num; i++) {
1071 Lv2VacLERUp_rO[i] = m_config.getParameter(prep + "R1") * Unit::cm / Unit::mm;
1072 }
1073 //
1074 string strMat_Lv2VacLERUp = m_config.getParameterStr(prep + "Material");
1075 G4Material* mat_Lv2VacLERUp = Materials::get(strMat_Lv2VacLERUp);
1076
1077 //define geometry
1078 G4Polycone* geo_Lv2VacLERUppcon = new G4Polycone("geo_Lv2VacLERUppcon_name", 0, 2 * M_PI, Lv1TaLERUp_num, Lv1TaLERUp_Z,
1079 Lv1TaLERUp_rI, Lv2VacLERUp_rO);
1080 G4IntersectionSolid* geo_Lv2VacLERUp = new G4IntersectionSolid("geo_Lv2VacLERUp_name", geo_Lv2VacLERUppcon, geo_AreaTubeFwdpcon,
1081 transform_AreaTubeFwdForLER);
1082 G4LogicalVolume* logi_Lv2VacLERUp = new G4LogicalVolume(geo_Lv2VacLERUp, mat_Lv2VacLERUp, "logi_Lv2VacLERUp_name");
1083 if (flag_limitStep) logi_Lv2VacLERUp->SetUserLimits(new G4UserLimits(stepMax));
1084
1085
1086 //- put volume
1087 setColor(*logi_Lv2VacLERUp, "#CCCCCC");
1088 new G4PVPlacement(0, G4ThreeVector(0, 0, 0), logi_Lv2VacLERUp, "phys_Lv2VacLERUp_name", logi_Lv1TaLERUp, false, 0);
1089 //-
1090 //----------
1091
1092 //----------
1093 //- Lv1TaHERDwn
1094
1095 //get parameters from .xml file
1096 prep = "Lv1TaHERDwn.";
1097 //
1098 double Lv1TaHERDwn_A1 = m_config.getParameter(prep + "A1");
1099 //
1100 const int Lv1TaHERDwn_num = 12;
1101 //
1102 double Lv1TaHERDwn_Z[Lv1TaHERDwn_num];
1103 double Lv1TaHERDwn_rO[Lv1TaHERDwn_num];
1104 for (int i = 0; i < Lv1TaHERDwn_num; i++) {
1105 ostringstream ossZ_Lv1TaHERDwn;
1106 ossZ_Lv1TaHERDwn << "L" << i + 1;
1107
1108 ostringstream ossR_Lv1TaHERDwn;
1109 ossR_Lv1TaHERDwn << "R" << i + 1;
1110
1111 Lv1TaHERDwn_Z[i] = m_config.getParameter(prep + ossZ_Lv1TaHERDwn.str()) * Unit::cm / Unit::mm;
1112 Lv1TaHERDwn_rO[i] = m_config.getParameter(prep + ossR_Lv1TaHERDwn.str()) * Unit::cm / Unit::mm;
1113 }
1114 //
1115 double Lv1TaHERDwn_rI[Lv1TaHERDwn_num];
1116 for (int i = 0; i < Lv1TaHERDwn_num; i++)
1117 { Lv1TaHERDwn_rI[i] = 0.0; }
1118 //
1119 string strMat_Lv1TaHERDwn = m_config.getParameterStr(prep + "Material");
1120 G4Material* mat_Lv1TaHERDwn = Materials::get(strMat_Lv1TaHERDwn);
1121
1122 //define geometry
1123 G4Polycone* geo_Lv1TaHERDwnpcon = new G4Polycone("geo_Lv1TaHERDwnpcon_name", 0, 2 * M_PI, Lv1TaHERDwn_num, Lv1TaHERDwn_Z,
1124 Lv1TaHERDwn_rI, Lv1TaHERDwn_rO);
1125 G4Transform3D transform_AreaTubeFwdForHER = G4Translate3D(0., 0., 0.);
1126 transform_AreaTubeFwdForHER = transform_AreaTubeFwdForHER * G4RotateY3D(-Lv1TaHERDwn_A1);
1127 G4IntersectionSolid* geo_Lv1TaHERDwn = new G4IntersectionSolid("", geo_Lv1TaHERDwnpcon, geo_AreaTubeFwdpcon,
1128 transform_AreaTubeFwdForHER);
1129 G4LogicalVolume* logi_Lv1TaHERDwn = new G4LogicalVolume(geo_Lv1TaHERDwn, mat_Lv1TaHERDwn, "logi_Lv1TaHERDwn_name");
1130
1131 //- put volume
1132 setColor(*logi_Lv1TaHERDwn, "#00CC00");
1133 G4Transform3D transform_Lv1TaHERDwn = G4Translate3D(0., 0., 0.);
1134 transform_Lv1TaHERDwn = transform_Lv1TaHERDwn * G4RotateY3D(Lv1TaHERDwn_A1);
1135 new G4PVPlacement(transform_Lv1TaHERDwn, logi_Lv1TaHERDwn, "phys_Lv1TaHERDwn_name", &topVolume, false, 0);
1136
1137 //----------
1138 //-Lv1SUSHERDwn
1139 prep = "Lv1SUSHERDwn.";
1140 const int Lv1SUSHERDwn_num = 6;
1141 double Lv1SUSHERDwn_Z[Lv1SUSHERDwn_num];
1142 double Lv1SUSHERDwn_rO[Lv1SUSHERDwn_num];
1143 double Lv1SUSHERDwn_rI[Lv1SUSHERDwn_num];
1144
1145 for (int i = 0; i < Lv1SUSHERDwn_num; i++) {
1146 ostringstream ossZ_Lv1SUSHERDwn;
1147 ossZ_Lv1SUSHERDwn << "Z" << i + 1;
1148 ostringstream ossRI_Lv1SUSHERDwn;
1149 ossRI_Lv1SUSHERDwn << "RI" << i + 1;
1150 ostringstream ossRO_Lv1SUSHERDwn;
1151 ossRO_Lv1SUSHERDwn << "RO" << i + 1;
1152
1153 Lv1SUSHERDwn_Z[i] = m_config.getParameter(prep + ossZ_Lv1SUSHERDwn.str()) * Unit::cm / Unit::mm;
1154 Lv1SUSHERDwn_rI[i] = m_config.getParameter(prep + ossRI_Lv1SUSHERDwn.str()) * Unit::cm / Unit::mm;
1155 Lv1SUSHERDwn_rO[i] = m_config.getParameter(prep + ossRO_Lv1SUSHERDwn.str()) * Unit::cm / Unit::mm;
1156 }
1157
1158 string strMat_Lv1SUSHERDwn = m_config.getParameterStr(prep + "Material");
1159 G4Material* mat_Lv1SUSHERDwn = Materials::get(strMat_Lv1SUSHERDwn);
1160 //G4Material* mat_Lv1SUSHERDwn = mat_Lv1SUS;
1161
1162 G4Polycone* geo_Lv1SUSHERDwnpcon = new G4Polycone("geo_Lv1SUSHERDwnpcon_name", 0, 2 * M_PI, Lv1SUSHERDwn_num, Lv1SUSHERDwn_Z,
1163 Lv1SUSHERDwn_rI, Lv1SUSHERDwn_rO);
1164 G4IntersectionSolid* geo_Lv1SUSHERDwn = new G4IntersectionSolid("", geo_Lv1SUSHERDwnpcon, geo_AreaTubeFwdpcon,
1165 transform_AreaTubeFwdForHER);
1166 G4LogicalVolume* logi_Lv1SUSHERDwn = new G4LogicalVolume(geo_Lv1SUSHERDwn, mat_Lv1SUSHERDwn, "logi_Lv1SUSHERDwn_name");
1167
1168 //-put volumn
1169 setColor(*logi_Lv1SUSHERDwn, "#666666");
1170 new G4PVPlacement(transform_Lv1TaHERDwn, logi_Lv1SUSHERDwn, "phys_Lv1SUSHERDwn_name", &topVolume, false, 0);
1171
1172 //----------
1173 //- Lv2VacHERDwn
1174
1175 //get parameters from .xml file
1176 prep = "Lv2VacHERDwn.";
1177 //
1178 double Lv2VacHERDwn_rO[Lv1TaHERDwn_num];
1179 for (int i = 0; i < Lv1TaHERDwn_num; i++) {
1180 Lv2VacHERDwn_rO[i] = m_config.getParameter(prep + "R1") * Unit::cm / Unit::mm;
1181 }
1182 //
1183 string strMat_Lv2VacHERDwn = m_config.getParameterStr(prep + "Material");
1184 G4Material* mat_Lv2VacHERDwn = Materials::get(strMat_Lv2VacHERDwn);
1185
1186 //define geometry
1187 G4Polycone* geo_Lv2VacHERDwnpcon = new G4Polycone("geo_Lv2VacHERDwnpcon_name", 0, 2 * M_PI, Lv1TaHERDwn_num, Lv1TaHERDwn_Z,
1188 Lv1TaHERDwn_rI, Lv2VacHERDwn_rO);
1189 G4IntersectionSolid* geo_Lv2VacHERDwn = new G4IntersectionSolid("", geo_Lv2VacHERDwnpcon, geo_AreaTubeFwdpcon,
1190 transform_AreaTubeFwdForHER);
1191 G4LogicalVolume* logi_Lv2VacHERDwn = new G4LogicalVolume(geo_Lv2VacHERDwn, mat_Lv2VacHERDwn, "logi_Lv2VacHERDwn_name");
1192 if (flag_limitStep) logi_Lv2VacHERDwn->SetUserLimits(new G4UserLimits(stepMax));
1193
1194 //- put volume
1195 setColor(*logi_Lv2VacHERDwn, "#CCCCCC");
1196 new G4PVPlacement(0, G4ThreeVector(0, 0, 0), logi_Lv2VacHERDwn, "phys_Lv2VacHERDwn_name", logi_Lv1TaHERDwn, false, 0);
1197
1198 //-
1199 //----------
1200
1203
1206
1207 //get parameters from .xml file
1208 prep = "AreaTubeBwd.";
1209 //
1210 const int AreaTubeBwd_num = 2;
1211 //
1212 double AreaTubeBwd_Z[AreaTubeBwd_num];
1213 AreaTubeBwd_Z[0] = -m_config.getParameter(prep + "D1") * Unit::cm / Unit::mm;
1214 AreaTubeBwd_Z[1] = -m_config.getParameter(prep + "D2") * Unit::cm / Unit::mm;
1215 //
1216 double AreaTubeBwd_rI[AreaTubeBwd_num];
1217 for (int i = 0; i < AreaTubeBwd_num; i++)
1218 { AreaTubeBwd_rI[i] = 0.0; }
1219 //
1220 double AreaTubeBwd_rO[AreaTubeBwd_num];
1221 AreaTubeBwd_rO[0] = m_config.getParameter(prep + "R1") * Unit::cm / Unit::mm;
1222 AreaTubeBwd_rO[1] = AreaTubeBwd_rO[0];
1223
1224 //define geometry
1225 G4Polycone* geo_AreaTubeBwdpcon = new G4Polycone("geo_AreaTubeBwdpcon_name", 0, 2 * M_PI, AreaTubeBwd_num, AreaTubeBwd_Z,
1226 AreaTubeBwd_rI, AreaTubeBwd_rO);
1227
1228 //----------
1229 //- Lv1TaHERUp
1230
1231 //get parameters from .xml file
1232 prep = "Lv1TaHERUp.";
1233 //
1234 double Lv1TaHERUp_A1 = m_config.getParameter(prep + "A1");
1235 //
1236 const int Lv1TaHERUp_num = 12;
1237 double Lv1TaHERUp_Z[Lv1TaHERUp_num];
1238 double Lv1TaHERUp_rO[Lv1TaHERUp_num];
1239 for (int i = 0; i < Lv1TaHERUp_num; i++) {
1240 ostringstream ossZ_Lv1TaHERUp;
1241 ossZ_Lv1TaHERUp << "L" << i + 1;
1242
1243 ostringstream ossR_Lv1TaHERUp;
1244 ossR_Lv1TaHERUp << "R" << i + 1;
1245
1246 Lv1TaHERUp_Z[i] = -m_config.getParameter(prep + ossZ_Lv1TaHERUp.str()) * Unit::cm / Unit::mm;
1247 Lv1TaHERUp_rO[i] = m_config.getParameter(prep + ossR_Lv1TaHERUp.str()) * Unit::cm / Unit::mm;
1248 }
1249 //
1250 double Lv1TaHERUp_rI[Lv1TaHERUp_num];
1251 for (int i = 0; i < Lv1TaHERUp_num; i++)
1252 { Lv1TaHERUp_rI[i] = 0.0; }
1253 //
1254 string strMat_Lv1TaHERUp = m_config.getParameterStr(prep + "Material");
1255 G4Material* mat_Lv1TaHERUp = Materials::get(strMat_Lv1TaHERUp);
1256
1257 //define geometry
1258 G4Polycone* geo_Lv1TaHERUppcon = new G4Polycone("geo_Lv1TaHERUppcon_name", 0, 2 * M_PI, Lv1TaHERUp_num, Lv1TaHERUp_Z, Lv1TaHERUp_rI,
1259 Lv1TaHERUp_rO);
1260 G4Transform3D transform_AreaTubeBwdForHER = G4Translate3D(0., 0., 0.);
1261 transform_AreaTubeBwdForHER = transform_AreaTubeBwdForHER * G4RotateY3D(-Lv1TaHERUp_A1);
1262 G4IntersectionSolid* geo_Lv1TaHERUp = new G4IntersectionSolid("", geo_Lv1TaHERUppcon, geo_AreaTubeBwdpcon,
1263 transform_AreaTubeBwdForHER);
1264 G4LogicalVolume* logi_Lv1TaHERUp = new G4LogicalVolume(geo_Lv1TaHERUp, mat_Lv1TaHERUp, "logi_Lv1TaHERUp_name");
1265
1266 //- put volume
1267 setColor(*logi_Lv1TaHERUp, "#00CC00");
1268 G4Transform3D transform_Lv1TaHERUp = G4Translate3D(0., 0., 0.);
1269 transform_Lv1TaHERUp = transform_Lv1TaHERUp * G4RotateY3D(Lv1TaHERUp_A1);
1270 new G4PVPlacement(transform_Lv1TaHERUp, logi_Lv1TaHERUp, "phys_Lv1TaHERUp_name", &topVolume, false, 0);
1271
1272 //----------
1273 //-Lv1SUSHERUp
1274 prep = "Lv1SUSHERUp.";
1275 const int Lv1SUSHERUp_num = 6;
1276 double Lv1SUSHERUp_Z[Lv1SUSHERUp_num];
1277 double Lv1SUSHERUp_rO[Lv1SUSHERUp_num];
1278 double Lv1SUSHERUp_rI[Lv1SUSHERUp_num];
1279
1280 for (int i = 0; i < Lv1SUSHERUp_num; i++) {
1281 ostringstream ossZ_Lv1SUSHERUp;
1282 ossZ_Lv1SUSHERUp << "Z" << i + 1;
1283 ostringstream ossRI_Lv1SUSHERUp;
1284 ossRI_Lv1SUSHERUp << "RI" << i + 1;
1285 ostringstream ossRO_Lv1SUSHERUp;
1286 ossRO_Lv1SUSHERUp << "RO" << i + 1;
1287
1288 Lv1SUSHERUp_Z[i] = -m_config.getParameter(prep + ossZ_Lv1SUSHERUp.str()) * Unit::cm / Unit::mm;
1289 Lv1SUSHERUp_rI[i] = m_config.getParameter(prep + ossRI_Lv1SUSHERUp.str()) * Unit::cm / Unit::mm;
1290 Lv1SUSHERUp_rO[i] = m_config.getParameter(prep + ossRO_Lv1SUSHERUp.str()) * Unit::cm / Unit::mm;
1291 }
1292
1293 string strMat_Lv1SUSHERUp = m_config.getParameterStr(prep + "Material");
1294 G4Material* mat_Lv1SUSHERUp = Materials::get(strMat_Lv1SUSHERUp);
1295
1296 G4Polycone* geo_Lv1SUSHERUppcon = new G4Polycone("geo_Lv1SUSHERUppcon_name", 0, 2 * M_PI, Lv1SUSHERUp_num, Lv1SUSHERUp_Z,
1297 Lv1SUSHERUp_rI, Lv1SUSHERUp_rO);
1298 G4IntersectionSolid* geo_Lv1SUSHERUp = new G4IntersectionSolid("", geo_Lv1SUSHERUppcon, geo_AreaTubeBwdpcon,
1299 transform_AreaTubeFwdForHER);
1300 G4LogicalVolume* logi_Lv1SUSHERUp = new G4LogicalVolume(geo_Lv1SUSHERUp, mat_Lv1SUSHERUp, "logi_Lv1SUSHERUp_name");
1301
1302 //-put volumn
1303 setColor(*logi_Lv1SUSHERUp, "#666666");
1304 new G4PVPlacement(transform_Lv1TaHERUp, logi_Lv1SUSHERUp, "phys_Lv1SUSHERUp_name", &topVolume, false, 0);
1305
1306 //----------
1307 //- Lv2VacHERUp
1308
1309 //get parameters from .xml file
1310 prep = "Lv2VacHERUp.";
1311 //
1312 double Lv2VacHERUp_rO[Lv1TaHERUp_num];
1313 for (int i = 0; i < Lv1TaHERUp_num; i++) {
1314 Lv2VacHERUp_rO[i] = m_config.getParameter(prep + "R1") * Unit::cm / Unit::mm;
1315 }
1316 //
1317 string strMat_Lv2VacHERUp = m_config.getParameterStr(prep + "Material");
1318 G4Material* mat_Lv2VacHERUp = Materials::get(strMat_Lv2VacHERUp);
1319
1320 //define geometry
1321 G4Polycone* geo_Lv2VacHERUppcon = new G4Polycone("geo_Lv2VacHERUppcon_name", 0, 2 * M_PI, Lv1TaHERUp_num, Lv1TaHERUp_Z,
1322 Lv1TaHERUp_rI, Lv2VacHERUp_rO);
1323 G4IntersectionSolid* geo_Lv2VacHERUp = new G4IntersectionSolid("", geo_Lv2VacHERUppcon, geo_AreaTubeBwdpcon,
1324 transform_AreaTubeFwdForHER);
1325 G4LogicalVolume* logi_Lv2VacHERUp = new G4LogicalVolume(geo_Lv2VacHERUp, mat_Lv2VacHERUp, "logi_Lv2VacHERUp_name");
1326 if (flag_limitStep) logi_Lv2VacHERUp->SetUserLimits(new G4UserLimits(stepMax));
1327
1328 //- put volume
1329 setColor(*logi_Lv2VacHERUp, "#CCCCCC");
1330 new G4PVPlacement(0, G4ThreeVector(0, 0, 0), logi_Lv2VacHERUp, "phys_Lv2VacHERUp_name", logi_Lv1TaHERUp, false, 0);
1331
1332 //-
1333 //----------
1334
1335 //----------
1336 //- Lv1TaLERDwn
1337
1338 //get parameters from .xml file
1339 prep = "Lv1TaLERDwn.";
1340 //
1341 double Lv1TaLERDwn_A1 = m_config.getParameter(prep + "A1");
1342 //
1343 const int Lv1TaLERDwn_num = 12;
1344 //
1345 double Lv1TaLERDwn_Z[Lv1TaLERDwn_num];
1346 double Lv1TaLERDwn_rO[Lv1TaLERDwn_num];
1347 for (int i = 0; i < Lv1TaLERDwn_num; i++) {
1348 ostringstream ossZ_Lv1TaLERDwn;
1349 ossZ_Lv1TaLERDwn << "L" << i + 1;
1350
1351 ostringstream ossR_Lv1TaLERDwn;
1352 ossR_Lv1TaLERDwn << "R" << i + 1;
1353
1354 Lv1TaLERDwn_Z[i] = -m_config.getParameter(prep + ossZ_Lv1TaLERDwn.str()) * Unit::cm / Unit::mm;
1355 Lv1TaLERDwn_rO[i] = m_config.getParameter(prep + ossR_Lv1TaLERDwn.str()) * Unit::cm / Unit::mm;
1356 }
1357 //
1358 double Lv1TaLERDwn_rI[Lv1TaLERDwn_num];
1359 for (int i = 0; i < Lv1TaLERDwn_num; i++)
1360 { Lv1TaLERDwn_rI[i] = 0.0; }
1361 //
1362 string strMat_Lv1TaLERDwn = m_config.getParameterStr(prep + "Material");
1363 G4Material* mat_Lv1TaLERDwn = Materials::get(strMat_Lv1TaLERDwn);
1364
1365 //define geometry
1366 G4Polycone* geo_Lv1TaLERDwnpcon = new G4Polycone("geo_Lv1TaLERDwnpcon_name", 0, 2 * M_PI, Lv1TaLERDwn_num, Lv1TaLERDwn_Z,
1367 Lv1TaLERDwn_rI, Lv1TaLERDwn_rO);
1368 G4Transform3D transform_AreaTubeBwdForLER = G4Translate3D(0., 0., 0.);
1369 transform_AreaTubeBwdForLER = transform_AreaTubeBwdForLER * G4RotateY3D(-Lv1TaLERDwn_A1);
1370 G4IntersectionSolid* geo_Lv1TaLERDwn = new G4IntersectionSolid("", geo_Lv1TaLERDwnpcon, geo_AreaTubeBwdpcon,
1371 transform_AreaTubeBwdForLER);
1372 G4LogicalVolume* logi_Lv1TaLERDwn = new G4LogicalVolume(geo_Lv1TaLERDwn, mat_Lv1TaLERDwn, "logi_Lv1TaLERDwn_name");
1373
1374 //- put volume
1375 setColor(*logi_Lv1TaLERDwn, "#0000CC");
1376 G4Transform3D transform_Lv1TaLERDwn = G4Translate3D(0., 0., 0.);
1377 transform_Lv1TaLERDwn = transform_Lv1TaLERDwn * G4RotateY3D(Lv1TaLERDwn_A1);
1378 new G4PVPlacement(transform_Lv1TaLERDwn, logi_Lv1TaLERDwn, "phys_Lv1TaLERDwn_name", &topVolume, false, 0);
1379
1380 //----------
1381 //-Lv1SUSLERDwn
1382 prep = "Lv1SUSLERDwn.";
1383 const int Lv1SUSLERDwn_num = 6;
1384 double Lv1SUSLERDwn_Z[Lv1SUSLERDwn_num];
1385 double Lv1SUSLERDwn_rO[Lv1SUSLERDwn_num];
1386 double Lv1SUSLERDwn_rI[Lv1SUSLERDwn_num];
1387
1388 for (int i = 0; i < Lv1SUSLERDwn_num; i++) {
1389 ostringstream ossZ_Lv1SUSLERDwn;
1390 ossZ_Lv1SUSLERDwn << "Z" << i + 1;
1391 ostringstream ossRI_Lv1SUSLERDwn;
1392 ossRI_Lv1SUSLERDwn << "RI" << i + 1;
1393 ostringstream ossRO_Lv1SUSLERDwn;
1394 ossRO_Lv1SUSLERDwn << "RO" << i + 1;
1395
1396 Lv1SUSLERDwn_Z[i] = -m_config.getParameter(prep + ossZ_Lv1SUSLERDwn.str()) * Unit::cm / Unit::mm;
1397 Lv1SUSLERDwn_rI[i] = m_config.getParameter(prep + ossRI_Lv1SUSLERDwn.str()) * Unit::cm / Unit::mm;
1398 Lv1SUSLERDwn_rO[i] = m_config.getParameter(prep + ossRO_Lv1SUSLERDwn.str()) * Unit::cm / Unit::mm;
1399 }
1400
1401 string strMat_Lv1SUSLERDwn = m_config.getParameterStr(prep + "Material");
1402 G4Material* mat_Lv1SUSLERDwn = Materials::get(strMat_Lv1SUSLERDwn);
1403
1404 G4Polycone* geo_Lv1SUSLERDwnpcon = new G4Polycone("geo_Lv1SUSLERDwnpcon_name", 0, 2 * M_PI, Lv1SUSLERDwn_num, Lv1SUSLERDwn_Z,
1405 Lv1SUSLERDwn_rI, Lv1SUSLERDwn_rO);
1406 G4IntersectionSolid* geo_Lv1SUSLERDwn = new G4IntersectionSolid("", geo_Lv1SUSLERDwnpcon, geo_AreaTubeBwdpcon,
1407 transform_AreaTubeFwdForHER);
1408 G4LogicalVolume* logi_Lv1SUSLERDwn = new G4LogicalVolume(geo_Lv1SUSLERDwn, mat_Lv1SUSLERDwn, "logi_Lv1SUSLERDwn_name");
1409
1410 //-put volumn
1411 setColor(*logi_Lv1SUSLERDwn, "#666666");
1412 new G4PVPlacement(transform_Lv1TaLERDwn, logi_Lv1SUSLERDwn, "phys_Lv1SUSLERDwn_name", &topVolume, false, 0);
1413
1414 //----------
1415 //- Lv2VacLERDwn
1416
1417 //get parameters from .xml file
1418 prep = "Lv2VacLERDwn.";
1419 //
1420 double Lv2VacLERDwn_rO[Lv1TaLERDwn_num];
1421 for (int i = 0; i < Lv1TaLERDwn_num; i++) {
1422 Lv2VacLERDwn_rO[i] = m_config.getParameter(prep + "R1") * Unit::cm / Unit::mm;
1423 }
1424 //
1425 string strMat_Lv2VacLERDwn = m_config.getParameterStr(prep + "Material");
1426 G4Material* mat_Lv2VacLERDwn = Materials::get(strMat_Lv2VacLERDwn);
1427
1428 //define geometry
1429 G4Polycone* geo_Lv2VacLERDwnpcon = new G4Polycone("geo_Lv2VacLERDwnpcon_name", 0, 2 * M_PI, Lv1TaLERDwn_num, Lv1TaLERDwn_Z,
1430 Lv1TaLERDwn_rI, Lv2VacLERDwn_rO);
1431 G4IntersectionSolid* geo_Lv2VacLERDwn = new G4IntersectionSolid("", geo_Lv2VacLERDwnpcon, geo_AreaTubeBwdpcon,
1432 transform_AreaTubeBwdForLER);
1433 G4LogicalVolume* logi_Lv2VacLERDwn = new G4LogicalVolume(geo_Lv2VacLERDwn, mat_Lv2VacLERDwn, "logi_Lv2VacLERDwn_name");
1434 if (flag_limitStep) logi_Lv2VacLERDwn->SetUserLimits(new G4UserLimits(stepMax));
1435
1436 //- put volume
1437 setColor(*logi_Lv2VacLERDwn, "#CCCCCC");
1438 new G4PVPlacement(0, G4ThreeVector(0, 0, 0), logi_Lv2VacLERDwn, "phys_Lv2VacLERDwn_name", logi_Lv1TaLERDwn, false, 0);
1439
1440
1441 //----------
1442 // Cu flange
1443
1444 G4IntersectionSolid* geo_CuFlangeFwd_x2 = new G4IntersectionSolid("geo_CuFlangeFwd_x2_name", geo_AreaTubeFwdpcon, geo_Flange,
1445 G4Translate3D(0, 0, Flange_D + Flange_T * 2));
1446 G4SubtractionSolid* geo_CuFlangeFwd_x = new G4SubtractionSolid("geo_CuFlangeFwd_x_name", geo_CuFlangeFwd_x2, geo_Lv1TaLERUp,
1447 transform_Lv1TaLERUp);
1448 G4SubtractionSolid* geo_CuFlangeFwd = new G4SubtractionSolid("geo_CuFlangeFwd_name", geo_CuFlangeFwd_x, geo_Lv1TaHERDwn,
1449 transform_Lv1TaHERDwn);
1450
1451 G4LogicalVolume* logi_CuFlangeFwd = new G4LogicalVolume(geo_CuFlangeFwd, mat_Lv1TaLERUp, "logi_CuFlangeFwd_name");
1452
1453 //- put volume
1454 setColor(*logi_CuFlangeFwd, "#CCCCCC");
1455 new G4PVPlacement(0, G4ThreeVector(0, 0, 0), logi_CuFlangeFwd, "phys_CuFlangeFwd_name", &topVolume, false, 0);
1456
1457
1458
1459
1460 G4IntersectionSolid* geo_CuFlangeBwd_x2 = new G4IntersectionSolid("geo_CuFlangeBwd_x2_name", geo_AreaTubeBwdpcon, geo_Flange,
1461 G4Translate3D(0, 0, -Flange_D - Flange_T * 2));
1462 G4SubtractionSolid* geo_CuFlangeBwd_x = new G4SubtractionSolid("geo_CuFlangeBwd_x_name", geo_CuFlangeBwd_x2, geo_Lv1TaHERUp,
1463 transform_Lv1TaHERUp);
1464 G4SubtractionSolid* geo_CuFlangeBwd = new G4SubtractionSolid("geo_CuFlangeBwd_name", geo_CuFlangeBwd_x, geo_Lv1TaLERDwn,
1465 transform_Lv1TaLERDwn);
1466
1467 G4LogicalVolume* logi_CuFlangeBwd = new G4LogicalVolume(geo_CuFlangeBwd, mat_Lv1TaLERUp, "logi_CuFlangeBwd_name");
1468
1469 //- put volume
1470 setColor(*logi_CuFlangeBwd, "#CCCCCC");
1471 new G4PVPlacement(0, G4ThreeVector(0, 0, 0), logi_CuFlangeBwd, "phys_CuFlangeBwd_name", &topVolume, false, 0);
1472
1475
1476 //----------
1477 //- PXDMountFwd
1478
1479 //get parameters from .xml file
1480 prep = "PXDMountFwd.";
1481 //
1482 double PXDMountFwd_Z1 = m_config.getParameter(prep + "Z1") * Unit::cm / Unit::mm;
1483 double PXDMountFwd_R1 = m_config.getParameter(prep + "R1") * Unit::cm / Unit::mm;
1484 double PXDMountFwd_D1 = m_config.getParameter(prep + "D1") * Unit::cm / Unit::mm;
1485 double PXDMountFwd_R2 = m_config.getParameter(prep + "R2") * Unit::cm / Unit::mm;
1486 double PXDMountFwd_L1 = m_config.getParameter(prep + "L1") * Unit::cm / Unit::mm;
1487 double PXDMountFwd_L2 = m_config.getParameter(prep + "L2") * Unit::cm / Unit::mm;
1488 //
1489 string strMat_PXDMountFwd = m_config.getParameterStr(prep + "Material");
1490 G4Material* mat_PXDMountFwd = Materials::get(strMat_PXDMountFwd);
1491
1492 //define geometry
1493 G4VSolid* geo_PXDMountFwd_a = new G4Tubs("geo_PXDMountFwd_a", 0, PXDMountFwd_R1, PXDMountFwd_D1 / 2, 0, 2 * M_PI);
1494 G4VSolid* geo_PXDMountFwd_b = new G4SubtractionSolid("geo_PXDMountFwd_b", geo_PXDMountFwd_a, geo_Lv1TaFwd_d, G4Translate3D(0., 0.,
1495 -(-Lv1TaFwd_L1 / 2.0 + Lv1TaFwd_aL1 + Lv1TaFwd_aL2 + Lv1TaFwd_aL3) + PXDMountFwd_D1 / 2));
1496 G4VSolid* geo_PXDMountFwd_c = new G4Tubs("geo_PXDMountFwd_c", 0, PXDMountFwd_R2, 100, 0, 2 * M_PI);
1497 G4VSolid* geo_PXDMountFwd_d = new G4Box("geo_PXDMountFwd_d", PXDMountFwd_R1 - PXDMountFwd_L1, 100, PXDMountFwd_R2);
1498
1499 G4VSolid* geo_PXDMountFwd_p1 = new G4SubtractionSolid("geo_PXDMountFwd_p1", geo_PXDMountFwd_b, geo_PXDMountFwd_c,
1500 G4Translate3D(+PXDMountFwd_L1, 0., +(PXDMountFwd_D1 / 2 - PXDMountFwd_L2))*G4RotateX3D(M_PI / 2));
1501 G4VSolid* geo_PXDMountFwd_p2 = new G4SubtractionSolid("geo_PXDMountFwd_p2", geo_PXDMountFwd_p1, geo_PXDMountFwd_c,
1502 G4Translate3D(+PXDMountFwd_L1, 0., -(PXDMountFwd_D1 / 2 - PXDMountFwd_L2))*G4RotateX3D(M_PI / 2));
1503 G4VSolid* geo_PXDMountFwd_p3 = new G4SubtractionSolid("geo_PXDMountFwd_p3", geo_PXDMountFwd_p2, geo_PXDMountFwd_c,
1504 G4Translate3D(-PXDMountFwd_L1, 0., +(PXDMountFwd_D1 / 2 - PXDMountFwd_L2))*G4RotateX3D(M_PI / 2));
1505 G4VSolid* geo_PXDMountFwd_p4 = new G4SubtractionSolid("geo_PXDMountFwd_p4", geo_PXDMountFwd_p3, geo_PXDMountFwd_c,
1506 G4Translate3D(-PXDMountFwd_L1, 0., -(PXDMountFwd_D1 / 2 - PXDMountFwd_L2))*G4RotateX3D(M_PI / 2));
1507
1508 G4VSolid* geo_PXDMountFwd_q1 = new G4SubtractionSolid("geo_PXDMountFwd_q1", geo_PXDMountFwd_p4, geo_PXDMountFwd_d,
1509 G4Translate3D(+PXDMountFwd_R1, 0., +(PXDMountFwd_D1 / 2 - PXDMountFwd_L2)));
1510 G4VSolid* geo_PXDMountFwd_q2 = new G4SubtractionSolid("geo_PXDMountFwd_q2", geo_PXDMountFwd_q1, geo_PXDMountFwd_d,
1511 G4Translate3D(+PXDMountFwd_R1, 0., -(PXDMountFwd_D1 / 2 - PXDMountFwd_L2)));
1512 G4VSolid* geo_PXDMountFwd_q3 = new G4SubtractionSolid("geo_PXDMountFwd_q3", geo_PXDMountFwd_q2, geo_PXDMountFwd_d,
1513 G4Translate3D(-PXDMountFwd_R1, 0., +(PXDMountFwd_D1 / 2 - PXDMountFwd_L2)));
1514 G4VSolid* geo_PXDMountFwd_q4 = new G4SubtractionSolid("geo_PXDMountFwd_q4", geo_PXDMountFwd_q3, geo_PXDMountFwd_d,
1515 G4Translate3D(-PXDMountFwd_R1, 0., -(PXDMountFwd_D1 / 2 - PXDMountFwd_L2)));
1516
1517 G4VSolid* geo_PXDMountFwd = geo_PXDMountFwd_q4;
1518
1519 G4LogicalVolume* logi_PXDMountFwd = new G4LogicalVolume(geo_PXDMountFwd, mat_PXDMountFwd, "logi_PXDMountFwd_name");
1520 setColor(*logi_PXDMountFwd, "#333333");
1521
1522 new G4PVPlacement(0, G4ThreeVector(0, 0, +PXDMountFwd_D1 / 2 + PXDMountFwd_Z1), logi_PXDMountFwd, "phys_PXDMountFwd_name",
1523 &topVolume, false, 0);
1524
1525
1526 //adding the screws
1527 double PXDMountFixture_screw_radius = 0.2 * Unit::cm / Unit::mm;
1528 double PXDMountFixture_screw_length = 0.5 * Unit::cm / Unit::mm; //half z
1529 G4VSolid* geo_PXDMountFwd_s1 = new G4Tubs("geo_PXDMountFwd_s1", 0, PXDMountFixture_screw_radius, PXDMountFixture_screw_length, 0,
1530 2 * M_PI);
1531 G4VSolid* geo_PXDMountFwd_s2 = new G4Tubs("geo_PXDMountFwd_s2", 0, PXDMountFixture_screw_radius, PXDMountFixture_screw_length, 0,
1532 2 * M_PI);
1533 G4VSolid* geo_PXDMountFwd_s3 = new G4Tubs("geo_PXDMountFwd_s3", 0, PXDMountFixture_screw_radius, PXDMountFixture_screw_length, 0,
1534 2 * M_PI);
1535 G4VSolid* geo_PXDMountFwd_s4 = new G4Tubs("geo_PXDMountFwd_s4", 0, PXDMountFixture_screw_radius, PXDMountFixture_screw_length, 0,
1536 2 * M_PI);
1537
1538 G4Material* mat_PXDMountFwd_s = Materials::get("Cu");
1539
1540 G4Rotate3D rotate_PXDMountFwd = G4RotateX3D(-M_PI / 2.0 / Unit::rad);
1541 G4Transform3D transform_PXDMountFwd_s1 = G4Translate3D(+PXDMountFwd_L1, 0,
1542 PXDMountFwd_Z1 + PXDMountFwd_D1 - PXDMountFwd_L2) * rotate_PXDMountFwd;
1543 G4Transform3D transform_PXDMountFwd_s2 = G4Translate3D(+PXDMountFwd_L1, 0, PXDMountFwd_Z1 + PXDMountFwd_L2) * rotate_PXDMountFwd;
1544 G4Transform3D transform_PXDMountFwd_s3 = G4Translate3D(-PXDMountFwd_L1, 0,
1545 PXDMountFwd_Z1 + PXDMountFwd_D1 - PXDMountFwd_L2) * rotate_PXDMountFwd;
1546 G4Transform3D transform_PXDMountFwd_s4 = G4Translate3D(-PXDMountFwd_L1, 0, PXDMountFwd_Z1 + PXDMountFwd_L2) * rotate_PXDMountFwd;
1547
1548 G4LogicalVolume* logi_PXDMountFwd_s1 = new G4LogicalVolume(geo_PXDMountFwd_s1, mat_PXDMountFwd_s, "logi_PXDMountFwd_name_s1");
1549 G4LogicalVolume* logi_PXDMountFwd_s2 = new G4LogicalVolume(geo_PXDMountFwd_s2, mat_PXDMountFwd_s, "logi_PXDMountFwd_name_s2");
1550 G4LogicalVolume* logi_PXDMountFwd_s3 = new G4LogicalVolume(geo_PXDMountFwd_s3, mat_PXDMountFwd_s, "logi_PXDMountFwd_name_s3");
1551 G4LogicalVolume* logi_PXDMountFwd_s4 = new G4LogicalVolume(geo_PXDMountFwd_s4, mat_PXDMountFwd_s, "logi_PXDMountFwd_name_s4");
1552
1553 new G4PVPlacement(transform_PXDMountFwd_s1, logi_PXDMountFwd_s1, "phys_PXDMountFwd_name_s1", &topVolume, false, 0);
1554 new G4PVPlacement(transform_PXDMountFwd_s2, logi_PXDMountFwd_s2, "phys_PXDMountFwd_name_s2", &topVolume, false, 0);
1555 new G4PVPlacement(transform_PXDMountFwd_s3, logi_PXDMountFwd_s3, "phys_PXDMountFwd_name_s3", &topVolume, false, 0);
1556 new G4PVPlacement(transform_PXDMountFwd_s4, logi_PXDMountFwd_s4, "phys_PXDMountFwd_name_s4", &topVolume, false, 0);
1557
1558 //----------
1559 //- PXDMountFixtureFwd
1560 prep = "PXDMountFixtureFwd.";
1561 //
1562 double PXDMountFixtureFwd_Z1 = m_config.getParameter(prep + "Z1") * Unit::cm / Unit::mm;
1563 double PXDMountFixtureFwd_R1 = m_config.getParameter(prep + "R1") * Unit::cm / Unit::mm;
1564 double PXDMountFixtureFwd_D1 = m_config.getParameter(prep + "D1") * Unit::cm / Unit::mm;
1565 double PXDMountFixtureFwd_T1 = m_config.getParameter(prep + "T1") * Unit::cm / Unit::mm;
1566 double PXDMountFixtureFwd_T2 = m_config.getParameter(prep + "T2") * Unit::cm / Unit::mm;
1567 double PXDMountFixtureFwd_FL = m_config.getParameter(prep + "I1") * Unit::cm / Unit::mm;
1568 double PXDMountFixtureFwd_inner_cut_phi = PXDMountFixtureFwd_FL / (PXDMountFwd_R1 + PXDMountFixtureFwd_T1);
1569 double PXDMountFixtureFwd_outter_uni_phi = (1 / 6.0) * M_PI - PXDMountFixtureFwd_FL / PXDMountFixtureFwd_R1;
1570
1571 string strMat_PXDMountFixtureFwd = m_config.getParameterStr(prep + "Material");
1572 G4Material* mat_PXDMountFixtureFwd = Materials::get(strMat_PXDMountFixtureFwd);
1573
1574 //define geometry
1575 G4VSolid* geo_PXDMountFixtureFwd_a = new G4Tubs("geo_PXDMountFixtureFwd_a", 0, PXDMountFixtureFwd_R1 - PXDMountFixtureFwd_T2,
1576 PXDMountFixtureFwd_D1 / 2, 0,
1577 2 * M_PI);
1578 G4VSolid* geo_PXDMountFixtureFwd_b = new G4Box("geo_PXDMountFixtureFwd_b", PXDMountFixtureFwd_R1 * 0.5, 0.1 * Unit::cm / Unit::mm,
1579 100);
1580
1581 G4VSolid* geo_PXDMountFixtureFwd_b1 = new G4Box("geo_PXDMountFixtureFwd_b1", PXDMountFwd_R1 + PXDMountFixtureFwd_T1,
1582 PXDMountFixtureFwd_FL * 0.5, 100);
1583 G4VSolid* geo_PXDMountFixtureFwd_b2 = new G4Tubs("geo_PXDMountFixtureFwd_b2", PXDMountFwd_R1 + PXDMountFixtureFwd_T1,
1584 PXDMountFixtureFwd_R1, PXDMountFixtureFwd_D1 / 2,
1585 0, PXDMountFixtureFwd_outter_uni_phi);
1586 G4VSolid* geo_PXDMountFixtureFwd_b3 = new G4Box("geo_PXDMountFixtureFwd_b3", 0.2 * Unit::cm / Unit::mm, 0.35 * Unit::cm / Unit::mm,
1587 100 * Unit::cm / Unit::mm);
1588
1589 G4VSolid* geo_PXDMountFixtureFwd_a1 = new G4Tubs("geo_PXDMountFixtureFwd_a1", 0, PXDMountFwd_R1, 100, 0, 2 * M_PI);
1590
1591 G4VSolid* geo_PXDMountFixtureFwd_c1 = new G4SubtractionSolid("geo_PXDMountFixtureFwd_c1", geo_PXDMountFixtureFwd_a,
1592 geo_PXDMountFixtureFwd_a1);
1593
1594
1595 G4VSolid* geo_PXDMountFixtureFwd_d1 = geo_PXDMountFixtureFwd_c1;
1596 for (int i = 0; i < 4; ++i) {
1597
1598 geo_PXDMountFixtureFwd_d1 = new G4SubtractionSolid("geo_PXDMountFixtureFwd_d1", geo_PXDMountFixtureFwd_d1,
1599 geo_PXDMountFixtureFwd_b1, G4RotateZ3D(i * 0.25 * M_PI));
1600 }
1601 geo_PXDMountFixtureFwd_d1 = new G4SubtractionSolid("geo_PXDMountFixtureFwd_d1", geo_PXDMountFixtureFwd_d1,
1602 geo_PXDMountFixtureFwd_b, G4Translate3D(PXDMountFixtureFwd_R1, - PXDMountFixtureFwd_FL * 0.5, 0));
1603 geo_PXDMountFixtureFwd_d1 = new G4SubtractionSolid("geo_PXDMountFixtureFwd_d1", geo_PXDMountFixtureFwd_d1,
1604 geo_PXDMountFixtureFwd_b, G4Translate3D(-PXDMountFixtureFwd_R1, PXDMountFixtureFwd_FL * 0.5, 0));
1605
1606
1607 double PXDMountFixtureFwd_R1_temp = PXDMountFixtureFwd_R1 - PXDMountFixtureFwd_T2;
1608 for (int i = 2; i < 7; i += 4) {
1609
1610 geo_PXDMountFixtureFwd_d1 = new G4SubtractionSolid("geo_PXDMountFixtureFwd_d1", geo_PXDMountFixtureFwd_d1,
1611 geo_PXDMountFixtureFwd_b3,
1612 G4Translate3D(PXDMountFixtureFwd_R1_temp * cos(i * 0.25 * M_PI - 0.5 * PXDMountFixtureFwd_inner_cut_phi),
1613 PXDMountFixtureFwd_R1_temp * sin(i * 0.25 * M_PI - 0.5 * PXDMountFixtureFwd_inner_cut_phi),
1614 0)*G4RotateZ3D(i * 0.25 * M_PI - 0.5 * PXDMountFixtureFwd_inner_cut_phi));
1615
1616 geo_PXDMountFixtureFwd_d1 = new G4SubtractionSolid("geo_PXDMountFixtureFwd_d1", geo_PXDMountFixtureFwd_d1,
1617 geo_PXDMountFixtureFwd_b3,
1618 G4Translate3D(PXDMountFixtureFwd_R1_temp * cos(i * 0.25 * M_PI + 0.5 * PXDMountFixtureFwd_inner_cut_phi),
1619 PXDMountFixtureFwd_R1_temp * sin(i * 0.25 * M_PI + 0.5 * PXDMountFixtureFwd_inner_cut_phi),
1620 0)*G4RotateZ3D(i * 0.25 * M_PI + 0.5 * PXDMountFixtureFwd_inner_cut_phi));
1621
1622 }
1623 G4VSolid* geo_PXDMountFixtureFwd_d2 = geo_PXDMountFixtureFwd_d1;
1624 for (int i = 0; i < 12; ++i) {
1625 if (i == 2 || i == 3 || i == 8 || i == 9) continue;
1626 geo_PXDMountFixtureFwd_d2 = new G4UnionSolid("geo_PXDMountFixtureFwd_d1", geo_PXDMountFixtureFwd_d2,
1627 geo_PXDMountFixtureFwd_b2, G4RotateZ3D(i * (1 / 6.0) * M_PI + ((1 / 12.0)*M_PI - 0.5 * PXDMountFixtureFwd_outter_uni_phi)));
1628
1629 }
1630
1631 G4VSolid* geo_PXDMountFixtureFwd = geo_PXDMountFixtureFwd_d2;
1632 G4LogicalVolume* logi_PXDMountFixtureFwd = new G4LogicalVolume(geo_PXDMountFixtureFwd, mat_PXDMountFixtureFwd,
1633 "logi_PXDMountFixtureFwd_name");
1634 setColor(*logi_PXDMountFixtureFwd, "#333333");
1635
1636 new G4PVPlacement(0, G4ThreeVector(0, 0, +PXDMountFixtureFwd_D1 / 2 + PXDMountFixtureFwd_Z1), logi_PXDMountFixtureFwd,
1637 "phys_PXDMountFixtureFwd_name",
1638 &topVolume, false, 0);
1639 //----------
1640 //- PXDMountBwd
1641
1642 //get parameters from .xml file
1643 prep = "PXDMountBwd.";
1644 //
1645 double PXDMountBwd_Z1 = m_config.getParameter(prep + "Z1") * Unit::cm / Unit::mm;
1646 double PXDMountBwd_R1 = m_config.getParameter(prep + "R1") * Unit::cm / Unit::mm;
1647 double PXDMountBwd_D1 = m_config.getParameter(prep + "D1") * Unit::cm / Unit::mm;
1648 double PXDMountBwd_R2 = m_config.getParameter(prep + "R2") * Unit::cm / Unit::mm;
1649 double PXDMountBwd_L1 = m_config.getParameter(prep + "L1") * Unit::cm / Unit::mm;
1650 double PXDMountBwd_L2 = m_config.getParameter(prep + "L2") * Unit::cm / Unit::mm;
1651 //
1652 string strMat_PXDMountBwd = m_config.getParameterStr(prep + "Material");
1653 G4Material* mat_PXDMountBwd = Materials::get(strMat_PXDMountBwd);
1654
1655 //define geometry
1656 G4VSolid* geo_PXDMountBwd_a = new G4Tubs("geo_PXDMountBwd_a", 0, PXDMountBwd_R1, PXDMountBwd_D1 / 2, 0, 2 * M_PI);
1657 G4VSolid* geo_PXDMountBwd_b = new G4SubtractionSolid("geo_PXDMountBwd_b", geo_PXDMountBwd_a, geo_Lv1TaBwd_d, G4Translate3D(0., 0.,
1658 -(+Lv1TaBwd_L1 / 2.0 - (Lv1TaBwd_aL1 + Lv1TaBwd_aL2 + Lv1TaBwd_aL3)) - PXDMountBwd_D1 / 2));
1659 G4VSolid* geo_PXDMountBwd_c = new G4Tubs("geo_PXDMountBwd_c", 0, PXDMountBwd_R2, 100, 0, 2 * M_PI);
1660 G4VSolid* geo_PXDMountBwd_d = new G4Box("geo_PXDMountBwd_d", PXDMountBwd_R1 - PXDMountBwd_L1, 100, PXDMountBwd_R2);
1661
1662 G4VSolid* geo_PXDMountBwd_p1 = new G4SubtractionSolid("geo_PXDMountBwd_p1", geo_PXDMountBwd_b, geo_PXDMountBwd_c,
1663 G4Translate3D(+PXDMountBwd_L1, 0., +(PXDMountBwd_D1 / 2 - PXDMountBwd_L2))*G4RotateX3D(M_PI / 2));
1664 G4VSolid* geo_PXDMountBwd_p2 = new G4SubtractionSolid("geo_PXDMountBwd_p2", geo_PXDMountBwd_p1, geo_PXDMountBwd_c,
1665 G4Translate3D(+PXDMountBwd_L1, 0., -(PXDMountBwd_D1 / 2 - PXDMountBwd_L2))*G4RotateX3D(M_PI / 2));
1666 G4VSolid* geo_PXDMountBwd_p3 = new G4SubtractionSolid("geo_PXDMountBwd_p3", geo_PXDMountBwd_p2, geo_PXDMountBwd_c,
1667 G4Translate3D(-PXDMountBwd_L1, 0., +(PXDMountBwd_D1 / 2 - PXDMountBwd_L2))*G4RotateX3D(M_PI / 2));
1668 G4VSolid* geo_PXDMountBwd_p4 = new G4SubtractionSolid("geo_PXDMountBwd_p4", geo_PXDMountBwd_p3, geo_PXDMountBwd_c,
1669 G4Translate3D(-PXDMountBwd_L1, 0., -(PXDMountBwd_D1 / 2 - PXDMountBwd_L2))*G4RotateX3D(M_PI / 2));
1670
1671 G4VSolid* geo_PXDMountBwd_q1 = new G4SubtractionSolid("geo_PXDMountBwd_q1", geo_PXDMountBwd_p4, geo_PXDMountBwd_d,
1672 G4Translate3D(+PXDMountBwd_R1, 0., +(PXDMountBwd_D1 / 2 - PXDMountBwd_L2)));
1673 G4VSolid* geo_PXDMountBwd_q2 = new G4SubtractionSolid("geo_PXDMountBwd_q2", geo_PXDMountBwd_q1, geo_PXDMountBwd_d,
1674 G4Translate3D(+PXDMountBwd_R1, 0., -(PXDMountBwd_D1 / 2 - PXDMountBwd_L2)));
1675 G4VSolid* geo_PXDMountBwd_q3 = new G4SubtractionSolid("geo_PXDMountBwd_q3", geo_PXDMountBwd_q2, geo_PXDMountBwd_d,
1676 G4Translate3D(-PXDMountBwd_R1, 0., +(PXDMountBwd_D1 / 2 - PXDMountBwd_L2)));
1677 G4VSolid* geo_PXDMountBwd_q4 = new G4SubtractionSolid("geo_PXDMountBwd_q4", geo_PXDMountBwd_q3, geo_PXDMountBwd_d,
1678 G4Translate3D(-PXDMountBwd_R1, 0., -(PXDMountBwd_D1 / 2 - PXDMountBwd_L2)));
1679
1680 G4VSolid* geo_PXDMountBwd = geo_PXDMountBwd_q4;
1681
1682 G4LogicalVolume* logi_PXDMountBwd = new G4LogicalVolume(geo_PXDMountBwd, mat_PXDMountBwd, "logi_PXDMountBwd_name");
1683 setColor(*logi_PXDMountBwd, "#333333");
1684
1685 new G4PVPlacement(0, G4ThreeVector(0, 0, -PXDMountBwd_D1 / 2 - PXDMountBwd_Z1), logi_PXDMountBwd, "phys_PXDMountBwd_name",
1686 &topVolume, false, 0);
1687
1688 // adding screws
1689 //
1690 G4VSolid* geo_PXDMountBwd_s1 = new G4Tubs("geo_PXDMountBwd_s1", 0, PXDMountFixture_screw_radius, PXDMountFixture_screw_length, 0,
1691 2 * M_PI);
1692 G4VSolid* geo_PXDMountBwd_s2 = new G4Tubs("geo_PXDMountBwd_s2", 0, PXDMountFixture_screw_radius, PXDMountFixture_screw_length, 0,
1693 2 * M_PI);
1694 G4VSolid* geo_PXDMountBwd_s3 = new G4Tubs("geo_PXDMountBwd_s3", 0, PXDMountFixture_screw_radius, PXDMountFixture_screw_length, 0,
1695 2 * M_PI);
1696 G4VSolid* geo_PXDMountBwd_s4 = new G4Tubs("geo_PXDMountBwd_s4", 0, PXDMountFixture_screw_radius, PXDMountFixture_screw_length, 0,
1697 2 * M_PI);
1698
1699 G4Material* mat_PXDMountBwd_s = Materials::get("Cu");
1700
1701 G4Rotate3D rotate_PXDMountBwd = G4RotateX3D(-M_PI / 2.0 / Unit::rad);
1702 G4Transform3D transform_PXDMountBwd_s1 = G4Translate3D(+PXDMountBwd_L1, 0,
1703 -PXDMountBwd_Z1 - PXDMountBwd_D1 + PXDMountBwd_L2) * rotate_PXDMountBwd;
1704 G4Transform3D transform_PXDMountBwd_s2 = G4Translate3D(+PXDMountBwd_L1, 0, -PXDMountBwd_Z1 - PXDMountBwd_L2) * rotate_PXDMountBwd;
1705 G4Transform3D transform_PXDMountBwd_s3 = G4Translate3D(-PXDMountBwd_L1, 0,
1706 -PXDMountBwd_Z1 - PXDMountBwd_D1 + PXDMountBwd_L2) * rotate_PXDMountBwd;
1707 G4Transform3D transform_PXDMountBwd_s4 = G4Translate3D(-PXDMountBwd_L1, 0, -PXDMountBwd_Z1 - PXDMountBwd_L2) * rotate_PXDMountBwd;
1708
1709 G4LogicalVolume* logi_PXDMountBwd_s1 = new G4LogicalVolume(geo_PXDMountBwd_s1, mat_PXDMountBwd_s, "logi_PXDMountBwd_name_s1");
1710 G4LogicalVolume* logi_PXDMountBwd_s2 = new G4LogicalVolume(geo_PXDMountBwd_s2, mat_PXDMountBwd_s, "logi_PXDMountBwd_name_s2");
1711 G4LogicalVolume* logi_PXDMountBwd_s3 = new G4LogicalVolume(geo_PXDMountBwd_s3, mat_PXDMountBwd_s, "logi_PXDMountBwd_name_s3");
1712 G4LogicalVolume* logi_PXDMountBwd_s4 = new G4LogicalVolume(geo_PXDMountBwd_s4, mat_PXDMountBwd_s, "logi_PXDMountBwd_name_s4");
1713
1714 new G4PVPlacement(transform_PXDMountBwd_s1, logi_PXDMountBwd_s1, "phys_PXDMountBwd_name_s1", &topVolume, false, 0);
1715 new G4PVPlacement(transform_PXDMountBwd_s2, logi_PXDMountBwd_s2, "phys_PXDMountBwd_name_s2", &topVolume, false, 0);
1716 new G4PVPlacement(transform_PXDMountBwd_s3, logi_PXDMountBwd_s3, "phys_PXDMountBwd_name_s3", &topVolume, false, 0);
1717 new G4PVPlacement(transform_PXDMountBwd_s4, logi_PXDMountBwd_s4, "phys_PXDMountBwd_name_s4", &topVolume, false, 0);
1718
1719 //----------
1720 //- PXDMountFixtureBwd
1721 prep = "PXDMountFixtureBwd.";
1722 //
1723 double PXDMountFixtureBwd_Z1 = m_config.getParameter(prep + "Z1") * Unit::cm / Unit::mm;
1724 double PXDMountFixtureBwd_R1 = m_config.getParameter(prep + "R1") * Unit::cm / Unit::mm;
1725 double PXDMountFixtureBwd_D1 = m_config.getParameter(prep + "D1") * Unit::cm / Unit::mm;
1726 double PXDMountFixtureBwd_T1 = m_config.getParameter(prep + "T1") * Unit::cm / Unit::mm;
1727 double PXDMountFixtureBwd_T2 = m_config.getParameter(prep + "T2") * Unit::cm / Unit::mm;
1728 double PXDMountFixtureBwd_FL = m_config.getParameter(prep + "I1") * Unit::cm / Unit::mm;
1729 double PXDMountFixtureBwd_inner_cut_phi = PXDMountFixtureBwd_FL / (PXDMountBwd_R1 + PXDMountFixtureBwd_T1);
1730 double PXDMountFixtureBwd_outter_uni_phi = (1 / 6.0) * M_PI - PXDMountFixtureBwd_FL / PXDMountFixtureBwd_R1;
1731
1732 string strMat_PXDMountFixtureBwd = m_config.getParameterStr(prep + "Material");
1733 G4Material* mat_PXDMountFixtureBwd = Materials::get(strMat_PXDMountFixtureBwd);
1734
1735 //define geometry
1736 G4VSolid* geo_PXDMountFixtureBwd_a = new G4Tubs("geo_PXDMountFixtureBwd_a", 0, PXDMountFixtureBwd_R1 - PXDMountFixtureBwd_T2,
1737 PXDMountFixtureBwd_D1 / 2, 0,
1738 2 * M_PI);
1739 G4VSolid* geo_PXDMountFixtureBwd_b = new G4Box("geo_PXDMountFixtureBwd_b", PXDMountFixtureBwd_R1 * 0.5, 0.1 * Unit::cm / Unit::mm,
1740 100);
1741
1742 G4VSolid* geo_PXDMountFixtureBwd_b1 = new G4Box("geo_PXDMountFixtureBwd_b1", PXDMountBwd_R1 + PXDMountFixtureBwd_T1,
1743 PXDMountFixtureBwd_FL * 0.5, 100);
1744 G4VSolid* geo_PXDMountFixtureBwd_b2 = new G4Tubs("geo_PXDMountFixtureBwd_b2", PXDMountBwd_R1 + PXDMountFixtureBwd_T1,
1745 PXDMountFixtureBwd_R1, PXDMountFixtureBwd_D1 / 2,
1746 0, PXDMountFixtureBwd_outter_uni_phi);
1747 G4VSolid* geo_PXDMountFixtureBwd_b3 = new G4Box("geo_PXDMountFixtureBwd_b3", 0.2 * Unit::cm / Unit::mm, 0.35 * Unit::cm / Unit::mm,
1748 100 * Unit::cm / Unit::mm);
1749
1750 G4VSolid* geo_PXDMountFixtureBwd_a1 = new G4Tubs("geo_PXDMountFixtureBwd_a1", 0, PXDMountBwd_R1, 100, 0, 2 * M_PI);
1751
1752 G4VSolid* geo_PXDMountFixtureBwd_c1 = new G4SubtractionSolid("geo_PXDMountFixtureBwd_c1", geo_PXDMountFixtureBwd_a,
1753 geo_PXDMountFixtureBwd_a1);
1754
1755
1756 G4VSolid* geo_PXDMountFixtureBwd_d1 = geo_PXDMountFixtureBwd_c1;
1757 for (int i = 0; i < 4; ++i) {
1758
1759 geo_PXDMountFixtureBwd_d1 = new G4SubtractionSolid("geo_PXDMountFixtureBwd_d1", geo_PXDMountFixtureBwd_d1,
1760 geo_PXDMountFixtureBwd_b1, G4RotateZ3D(i * 0.25 * M_PI));
1761 }
1762 geo_PXDMountFixtureBwd_d1 = new G4SubtractionSolid("geo_PXDMountFixtureBwd_d1", geo_PXDMountFixtureBwd_d1,
1763 geo_PXDMountFixtureBwd_b, G4Translate3D(PXDMountFixtureBwd_R1, - PXDMountFixtureBwd_FL * 0.5, 0));
1764 geo_PXDMountFixtureBwd_d1 = new G4SubtractionSolid("geo_PXDMountFixtureBwd_d1", geo_PXDMountFixtureBwd_d1,
1765 geo_PXDMountFixtureBwd_b, G4Translate3D(-PXDMountFixtureBwd_R1, PXDMountFixtureBwd_FL * 0.5, 0));
1766
1767
1768 double PXDMountFixtureBwd_R1_temp = PXDMountFixtureBwd_R1 - PXDMountFixtureBwd_T2;
1769 for (int i = 2; i < 7; i += 4) {
1770
1771 geo_PXDMountFixtureBwd_d1 = new G4SubtractionSolid("geo_PXDMountFixtureBwd_d1", geo_PXDMountFixtureBwd_d1,
1772 geo_PXDMountFixtureBwd_b3,
1773 G4Translate3D(PXDMountFixtureBwd_R1_temp * cos(i * 0.25 * M_PI - 0.5 * PXDMountFixtureBwd_inner_cut_phi),
1774 PXDMountFixtureBwd_R1_temp * sin(i * 0.25 * M_PI - 0.5 * PXDMountFixtureBwd_inner_cut_phi),
1775 0)*G4RotateZ3D(i * 0.25 * M_PI - 0.5 * PXDMountFixtureBwd_inner_cut_phi));
1776
1777 geo_PXDMountFixtureBwd_d1 = new G4SubtractionSolid("geo_PXDMountFixtureBwd_d1", geo_PXDMountFixtureBwd_d1,
1778 geo_PXDMountFixtureBwd_b3,
1779 G4Translate3D(PXDMountFixtureBwd_R1_temp * cos(i * 0.25 * M_PI + 0.5 * PXDMountFixtureBwd_inner_cut_phi),
1780 PXDMountFixtureBwd_R1_temp * sin(i * 0.25 * M_PI + 0.5 * PXDMountFixtureBwd_inner_cut_phi),
1781 0)*G4RotateZ3D(i * 0.25 * M_PI + 0.5 * PXDMountFixtureBwd_inner_cut_phi));
1782
1783 }
1784 G4VSolid* geo_PXDMountFixtureBwd_d2 = geo_PXDMountFixtureBwd_d1;
1785 for (int i = 0; i < 12; ++i) {
1786 if (i == 2 || i == 3 || i == 8 || i == 9) continue;
1787 geo_PXDMountFixtureBwd_d2 = new G4UnionSolid("geo_PXDMountFixtureBwd_d1", geo_PXDMountFixtureBwd_d2,
1788 geo_PXDMountFixtureBwd_b2, G4RotateZ3D(i * (1 / 6.0) * M_PI + ((1 / 12.0)*M_PI - 0.5 * PXDMountFixtureBwd_outter_uni_phi)));
1789
1790 }
1791
1792 G4VSolid* geo_PXDMountFixtureBwd = geo_PXDMountFixtureBwd_d2;
1793 G4LogicalVolume* logi_PXDMountFixtureBwd = new G4LogicalVolume(geo_PXDMountFixtureBwd, mat_PXDMountFixtureBwd,
1794 "logi_PXDMountFixtureBwd_name");
1795 setColor(*logi_PXDMountFixtureBwd, "#333333");
1796
1797 new G4PVPlacement(0, G4ThreeVector(0, 0, -PXDMountFixtureBwd_D1 / 2 - PXDMountFixtureBwd_Z1), logi_PXDMountFixtureBwd,
1798 "phys_PXDMountFixtureBwd_name",
1799 &topVolume, false, 0);
1800
1801
1802 //---------------------------
1803 // for dose simulation
1804 //---------------------------
1805
1806 int Index_sensi = 11;
1807 m_sensitive.push_back((SensitiveDetector*)(new BkgSensitiveDetector("IR", Index_sensi++)));
1808 logi_Lv3AuCoat->SetSensitiveDetector(m_sensitive.back());
1809
1810 m_sensitive.push_back((SensitiveDetector*)(new BkgSensitiveDetector("IR", Index_sensi++)));
1811 logi_Lv1TaFwd->SetSensitiveDetector(m_sensitive.back());
1812
1813 m_sensitive.push_back((SensitiveDetector*)(new BkgSensitiveDetector("IR", Index_sensi++)));
1814 logi_Lv1TaBwd->SetSensitiveDetector(m_sensitive.back());
1815
1816 m_sensitive.push_back((SensitiveDetector*)(new BkgSensitiveDetector("IR", Index_sensi++)));
1817 logi_Lv1TaLERUp->SetSensitiveDetector(m_sensitive.back());
1818
1819 m_sensitive.push_back((SensitiveDetector*)(new BkgSensitiveDetector("IR", Index_sensi++)));
1820 logi_Lv1SUSLERUp->SetSensitiveDetector(m_sensitive.back());
1821
1822 m_sensitive.push_back((SensitiveDetector*)(new BkgSensitiveDetector("IR", Index_sensi++)));
1823 logi_Lv1TaHERDwn->SetSensitiveDetector(m_sensitive.back());
1824
1825 m_sensitive.push_back((SensitiveDetector*)(new BkgSensitiveDetector("IR", Index_sensi++)));
1826 logi_Lv1SUSHERDwn->SetSensitiveDetector(m_sensitive.back());
1827
1828 m_sensitive.push_back((SensitiveDetector*)(new BkgSensitiveDetector("IR", Index_sensi++)));
1829 logi_Lv1TaHERUp->SetSensitiveDetector(m_sensitive.back());
1830
1831 m_sensitive.push_back((SensitiveDetector*)(new BkgSensitiveDetector("IR", Index_sensi++)));
1832 logi_Lv1SUSHERUp->SetSensitiveDetector(m_sensitive.back());
1833
1834 m_sensitive.push_back((SensitiveDetector*)(new BkgSensitiveDetector("IR", Index_sensi++)));
1835 logi_Lv1TaLERDwn->SetSensitiveDetector(m_sensitive.back());
1836
1837 m_sensitive.push_back((SensitiveDetector*)(new BkgSensitiveDetector("IR", Index_sensi++)));
1838 logi_Lv1SUSLERDwn->SetSensitiveDetector(m_sensitive.back());
1839
1840 m_sensitive.push_back((SensitiveDetector*)(new BkgSensitiveDetector("IR", Index_sensi++)));
1841 logi_CuFlangeFwd->SetSensitiveDetector(m_sensitive.back());
1842
1843 m_sensitive.push_back((SensitiveDetector*)(new BkgSensitiveDetector("IR", Index_sensi++)));
1844 logi_CuFlangeBwd->SetSensitiveDetector(m_sensitive.back());
1845
1846 //-
1847 //----------
1848
1851 }
const std::string & getParameterStr(const std::string &name) const
Get string parameter.
Definition: IRGeoBase.h:64
double getParameter(const std::string &name) const
Get parameter value.
Definition: IRGeoBase.h:41
static const double mm
[millimeters]
Definition: Unit.h:70
static const double rad
Standard of [angle].
Definition: Unit.h:50
static const double cm
Standard units with the value = 1.
Definition: Unit.h:47
static G4Material * get(const std::string &name)
Find given material.
Definition: Materials.h:63
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28
void setVisibility(G4LogicalVolume &volume, bool visible)
Helper function to quickly set the visibility of a given volume.
Definition: utilities.cc:108
void setColor(G4LogicalVolume &volume, const std::string &color)
Set the color of a logical volume.
Definition: utilities.cc:100

◆ createPayloads()

virtual void createPayloads ( const GearDir content,
const IntervalOfValidity iov 
)
inlineoverridevirtual

creates DB payload for BeamPipeGeo class

Reimplemented from CreatorBase.

Definition at line 78 of file GeoBeamPipeCreator.h.

79 {
80 DBImportObjPtr<BeamPipeGeo> importObj;
81 importObj.construct(createConfiguration(content));
82 importObj.import(iov);
83 }

Member Data Documentation

◆ m_config

BeamPipeGeo m_config
protected

geometry parameters object

Definition at line 101 of file GeoBeamPipeCreator.h.

◆ m_sensitive

std::vector<SensitiveDetector*> m_sensitive
protected

Sensitive detector.

Definition at line 99 of file GeoBeamPipeCreator.h.


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