Create detector geometry.
73 {
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
109
112
113 double A11 = 0.03918;
114
117
118
119
120
121
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++) {
130 }
132 Lv1SUS_Z[2] = Lv1SUS_Z[1];
135 Lv1SUS_Z[5] = Lv1SUS_Z[4];
146 Lv1SUS_Z[16] = Lv1SUS_Z[15];
149 Lv1SUS_Z[19] = Lv1SUS_Z[18];
151
152 double Lv1SUS_rI[Lv1SUS_num];
153 for (int tmpn = 0; tmpn < Lv1SUS_num; tmpn++)
154 { Lv1SUS_rI[tmpn] = 0.0; }
155
156 double Lv1SUS_rO[Lv1SUS_num];
158 Lv1SUS_rO[1] = Lv1SUS_rO[0];
160 Lv1SUS_rO[3] = Lv1SUS_rO[2];
163 Lv1SUS_rO[6] = Lv1SUS_rO[5];
165 Lv1SUS_rO[8] = Lv1SUS_rO[7];
167 Lv1SUS_rO[10] = Lv1SUS_rO[9];
168 Lv1SUS_rO[11] = Lv1SUS_rO[10];
170 Lv1SUS_rO[13] = Lv1SUS_rO[12];
172 Lv1SUS_rO[15] = Lv1SUS_rO[14];
175 Lv1SUS_rO[18] = Lv1SUS_rO[17];
177 Lv1SUS_rO[20] = Lv1SUS_rO[19];
178
181
182
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
187
188
190 new G4PVPlacement(0, G4ThreeVector(0, 0, 0), logi_Lv1SUS, "phys_Lv1SUS_name", &topVolume, false, 0);
191
192
193
194
195
196
197
199 prep = "Lv2OutTi.";
200
201 const int Lv2OutTi_num = 2;
202
203 double Lv2OutTi_Z[Lv2OutTi_num];
206
207 double Lv2OutTi_rI[Lv2OutTi_num];
209 Lv2OutTi_rI[1] = Lv2OutTi_rI[0];
210
211 double Lv2OutTi_rO[Lv2OutTi_num];
213 Lv2OutTi_rO[1] = Lv2OutTi_rO[0];
214
217
218
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
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
230
231
232
233
234 prep = "Lv2OutBe.";
235
236 const int Lv2OutBe_num = 2;
237
238 double Lv2OutBe_Z[Lv2OutBe_num];
241
242 double Lv2OutBe_rI[Lv2OutBe_num];
244 Lv2OutBe_rI[1] = Lv2OutBe_rI[0];
245
246 double Lv2OutBe_rO[Lv2OutBe_num];
248 Lv2OutBe_rO[1] = Lv2OutBe_rO[0];
249
252
253
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
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
264
265
266
267
268 prep = "Lv2InBe.";
269
270 const int Lv2InBe_num = 2;
271
272 double Lv2InBe_Z[Lv2InBe_num];
275
276 double Lv2InBe_rI[Lv2InBe_num];
278 Lv2InBe_rI[1] = Lv2InBe_rI[0];
279
280 double Lv2InBe_rO[Lv2InBe_num];
282 Lv2InBe_rO[1] = Lv2InBe_rO[0];
283
286
287
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
293 new G4PVPlacement(0, G4ThreeVector(0, 0, 0), logi_Lv2InBe, "phys_Lv2InBe_name", logi_Lv1SUS, false, 0);
294
295
296
297
298
299 prep = "Lv2Vacuum.";
300
308
310
313
314
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
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
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
348
349 G4Polycone* geo_Lv2VacuumPart1 = new G4Polycone("geo_Lv2VacuumPart1_name", 0, 2 * M_PI, Lv2Vacuum1_num, Lv2Vacuum1_Z, Lv2Vacuum1_rI,
350 Lv2Vacuum1_rO);
351
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
359 G4Polycone* geo_Lv2VacuumPart3 = new G4Polycone("geo_Lv2VacuumPart3_name", 0, 2 * M_PI, Lv2Vacuum3_num, Lv2Vacuum3_Z, Lv2Vacuum3_rI,
360 Lv2Vacuum3_rO);
361
362
363 G4Transform3D transform_Lv2VacuumPart3 = G4Translate3D(-0.5, 0., 0.);
364
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
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
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
387
388
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++) {
398 }
400 Lv2Paraf1_Z[2] = Lv2Paraf1_Z[1];
419 Lv2Paraf1_Z[18] = Lv2Paraf1_Z[17];
421
422 double Lv2Paraf1_rI[Lv2Paraf1_num];
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];
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];
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];
446 Lv2Paraf1_rO[1] = Lv2Paraf1_rO[0];
449 Lv2Paraf1_rO[4] = Lv2Paraf1_rO[3];
451 Lv2Paraf1_rO[6] = Lv2Paraf1_rO[5];
452 Lv2Paraf1_rO[7] = Lv2Paraf1_rO[6];
453 Lv2Paraf1_rO[8] = Lv2Paraf1_rO[7];
455 Lv2Paraf1_rO[10] = Lv2Paraf1_rO[9];
457 Lv2Paraf1_rO[12] = Lv2Paraf1_rO[11];
458 Lv2Paraf1_rO[13] = Lv2Paraf1_rO[12];
459 Lv2Paraf1_rO[14] = Lv2Paraf1_rO[13];
461 Lv2Paraf1_rO[16] = Lv2Paraf1_rO[15];
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++) {
471 }
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];
485 Lv2Paraf2_rO[2] = Lv2Paraf2_rO[1];
486
489
490
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
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
507
508
509 prep = "Lv3AuCoat.";
510
511 const int Lv3AuCoat_num = 2;
512
513 double Lv3AuCoat_Z[Lv3AuCoat_num];
516
517 double Lv3AuCoat_rI[Lv3AuCoat_num];
519 Lv3AuCoat_rI[1] = Lv3AuCoat_rI[0];
520
521 double Lv3AuCoat_rO[Lv3AuCoat_num];
523 Lv3AuCoat_rO[1] = Lv3AuCoat_rO[0];
524
527
528
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
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
544 prep = "Flange.";
545
548
551
552
553
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
572
573
574 prep = "Lv1TaFwd.";
575
578
579
586 double Lv1TaFwd_bL1 = Lv1TaFwd_L1 - Lv1TaFwd_aL1 - Lv1TaFwd_aL2 - Lv1TaFwd_aL3;
589
592
593
594
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
615
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
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
633
634
635 prep = "Lv2VacFwd.";
636
649
652
653
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
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
671 const int Lv2VacFwd3_num1 = 2;
672 const int Lv2VacFwd3_num2 = 3;
673
674 double Lv2VacFwd_Z1[Lv2VacFwd3_num1];
675 Lv2VacFwd_Z1[0] = 0.0;
676
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
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
701
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
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
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
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
718
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
728
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
734
735
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
743
744
745
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
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
762 setColor(*logi_Lv2VacFwd,
"#CCCCCC");
763
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
779
780
781 prep = "Lv1TaBwd.";
782
785
786
793 double Lv1TaBwd_bL1 = Lv1TaBwd_L1 - Lv1TaBwd_aL1 - Lv1TaBwd_aL2 - Lv1TaBwd_aL3;
796
799
800
801
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
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
831
832
833 prep = "Lv2VacBwd.";
834
847
850
851
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
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
869 const int Lv2VacBwd3_num1 = 2;
870 const int Lv2VacBwd3_num2 = 3;
871
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
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
898
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
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
913
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
923
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
929
930
931 transform_Lv2VacBwdPart1 = transform_Lv2VacBwdPart1 * G4RotateY3D(-Lv2VacBwd_A1 - Lv2VacBwd_A2);
932
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
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
953 setColor(*logi_Lv2VacBwd,
"#CCCCCC");
954
956 new G4PVPlacement(0, G4ThreeVector(0., 0., 0.), logi_Lv2VacBwd, "phys_Lv2VacBwd_name", logi_Lv1TaBwd, false, 0);
957
958
959
962
963
964 prep = "AreaTubeFwd.";
965
966 const int AreaTubeFwd_num = 2;
967
968 double AreaTubeFwd_Z[AreaTubeFwd_num];
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];
978 AreaTubeFwd_rO[1] = AreaTubeFwd_rO[0];
979
980
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
986
987
988 prep = "Lv1TaLERUp.";
989
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
1005 }
1006
1007 double Lv1TaLERUp_rI[Lv1TaLERUp_num];
1008 for (int i = 0; i < Lv1TaLERUp_num; i++)
1009 { Lv1TaLERUp_rI[i] = 0.0; }
1010
1013
1014
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
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
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
1048 }
1049
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
1060 setColor(*logi_Lv1SUSLERUp,
"#666666");
1061 new G4PVPlacement(transform_Lv1TaLERUp, logi_Lv1SUSLERUp, "phys_Lv1SUSLERUp_name", &topVolume, false, 0);
1062
1063
1064
1065
1066
1067 prep = "Lv2VacLERUp.";
1068
1069 double Lv2VacLERUp_rO[Lv1TaLERUp_num];
1070 for (int i = 0; i < Lv1TaLERUp_num; i++) {
1072 }
1073
1075 G4Material* mat_Lv2VacLERUp =
Materials::get(strMat_Lv2VacLERUp);
1076
1077
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
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
1094
1095
1096 prep = "Lv1TaHERDwn.";
1097
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
1113 }
1114
1115 double Lv1TaHERDwn_rI[Lv1TaHERDwn_num];
1116 for (int i = 0; i < Lv1TaHERDwn_num; i++)
1117 { Lv1TaHERDwn_rI[i] = 0.0; }
1118
1120 G4Material* mat_Lv1TaHERDwn =
Materials::get(strMat_Lv1TaHERDwn);
1121
1122
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
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
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
1156 }
1157
1159 G4Material* mat_Lv1SUSHERDwn =
Materials::get(strMat_Lv1SUSHERDwn);
1160
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
1169 setColor(*logi_Lv1SUSHERDwn,
"#666666");
1170 new G4PVPlacement(transform_Lv1TaHERDwn, logi_Lv1SUSHERDwn, "phys_Lv1SUSHERDwn_name", &topVolume, false, 0);
1171
1172
1173
1174
1175
1176 prep = "Lv2VacHERDwn.";
1177
1178 double Lv2VacHERDwn_rO[Lv1TaHERDwn_num];
1179 for (int i = 0; i < Lv1TaHERDwn_num; i++) {
1181 }
1182
1184 G4Material* mat_Lv2VacHERDwn =
Materials::get(strMat_Lv2VacHERDwn);
1185
1186
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
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
1208 prep = "AreaTubeBwd.";
1209
1210 const int AreaTubeBwd_num = 2;
1211
1212 double AreaTubeBwd_Z[AreaTubeBwd_num];
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];
1222 AreaTubeBwd_rO[1] = AreaTubeBwd_rO[0];
1223
1224
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
1230
1231
1232 prep = "Lv1TaHERUp.";
1233
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
1248 }
1249
1250 double Lv1TaHERUp_rI[Lv1TaHERUp_num];
1251 for (int i = 0; i < Lv1TaHERUp_num; i++)
1252 { Lv1TaHERUp_rI[i] = 0.0; }
1253
1256
1257
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
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
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
1291 }
1292
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
1303 setColor(*logi_Lv1SUSHERUp,
"#666666");
1304 new G4PVPlacement(transform_Lv1TaHERUp, logi_Lv1SUSHERUp, "phys_Lv1SUSHERUp_name", &topVolume, false, 0);
1305
1306
1307
1308
1309
1310 prep = "Lv2VacHERUp.";
1311
1312 double Lv2VacHERUp_rO[Lv1TaHERUp_num];
1313 for (int i = 0; i < Lv1TaHERUp_num; i++) {
1315 }
1316
1318 G4Material* mat_Lv2VacHERUp =
Materials::get(strMat_Lv2VacHERUp);
1319
1320
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
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
1337
1338
1339 prep = "Lv1TaLERDwn.";
1340
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
1356 }
1357
1358 double Lv1TaLERDwn_rI[Lv1TaLERDwn_num];
1359 for (int i = 0; i < Lv1TaLERDwn_num; i++)
1360 { Lv1TaLERDwn_rI[i] = 0.0; }
1361
1363 G4Material* mat_Lv1TaLERDwn =
Materials::get(strMat_Lv1TaLERDwn);
1364
1365
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
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
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
1399 }
1400
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
1411 setColor(*logi_Lv1SUSLERDwn,
"#666666");
1412 new G4PVPlacement(transform_Lv1TaLERDwn, logi_Lv1SUSLERDwn, "phys_Lv1SUSLERDwn_name", &topVolume, false, 0);
1413
1414
1415
1416
1417
1418 prep = "Lv2VacLERDwn.";
1419
1420 double Lv2VacLERDwn_rO[Lv1TaLERDwn_num];
1421 for (int i = 0; i < Lv1TaLERDwn_num; i++) {
1423 }
1424
1426 G4Material* mat_Lv2VacLERDwn =
Materials::get(strMat_Lv2VacLERDwn);
1427
1428
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
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
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
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
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
1478
1479
1480 prep = "PXDMountFwd.";
1481
1488
1490 G4Material* mat_PXDMountFwd =
Materials::get(strMat_PXDMountFwd);
1491
1492
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
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
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
1560 prep = "PXDMountFixtureFwd.";
1561
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
1572 G4Material* mat_PXDMountFixtureFwd =
Materials::get(strMat_PXDMountFixtureFwd);
1573
1574
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);
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
1641
1642
1643 prep = "PXDMountBwd.";
1644
1651
1653 G4Material* mat_PXDMountBwd =
Materials::get(strMat_PXDMountBwd);
1654
1655
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
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
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
1721 prep = "PXDMountFixtureBwd.";
1722
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
1733 G4Material* mat_PXDMountFixtureBwd =
Materials::get(strMat_PXDMountFixtureBwd);
1734
1735
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);
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
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.
double getParameter(const std::string &name) const
Get parameter value.
static const double mm
[millimeters]
static const double rad
Standard of [angle].
static const double cm
Standard units with the value = 1.
static G4Material * get(const std::string &name)
Find given material.
double sqrt(double a)
sqrt for double
void setVisibility(G4LogicalVolume &volume, bool visible)
Helper function to quickly set the visibility of a given volume.
void setColor(G4LogicalVolume &volume, const std::string &color)
Set the color of a logical volume.