9#include <ir/geometry/GeoCryostatCreator.h>
10#include <ir/simulation/SensitiveDetector.h>
12#include <geometry/Materials.h>
13#include <geometry/CreatorFactory.h>
14#include <geometry/utilities.h>
15#include <framework/gearbox/Unit.h>
18#include <boost/algorithm/string.hpp>
20#include <G4LogicalVolume.hh>
21#include <G4PVPlacement.hh>
27#include <G4Polycone.hh>
28#include <G4EllipticalTube.hh>
29#include <G4UnionSolid.hh>
30#include <G4IntersectionSolid.hh>
31#include <G4SubtractionSolid.hh>
32#include <G4UserLimits.hh>
43 using namespace geometry;
51 geometry::CreatorFactory<GeoCryostatCreator> GeoCryostatFactory(
"CryostatCreator");
154 G4Transform3D transform_HER = G4Translate3D(0., 0., 0.);
155 transform_HER = transform_HER * G4RotateY3D(crossingAngleHER);
157 G4Transform3D transform_LER = G4Translate3D(0., 0., 0.);
158 transform_LER = transform_LER * G4RotateY3D(crossingAngleLER);
160 map<string, CryostatElement> elements;
167 std::string prep =
"TubeR.";
171 std::vector<double> TubeR_Z(TubeR_N);
172 std::vector<double> TubeR_R(TubeR_N);
173 std::vector<double> TubeR_r(TubeR_N);
175 for (
int i = 0; i < TubeR_N; ++i) {
176 ostringstream ossZID;
179 ostringstream ossRID;
182 ostringstream ossrID;
190 tubeR.
transform = G4Translate3D(0., 0., 0.);
191 tubeR.
geo =
new G4Polycone(
"geo_TubeR_name", 0, 2 * M_PI, TubeR_N, &(TubeR_Z[0]), &(TubeR_r[0]), &(TubeR_R[0]));
193 elements[
"TubeR"] = tubeR;
200 std::vector<double> TubeR2_Z(TubeR2_N);
201 std::vector<double> TubeR2_R(TubeR2_N);
202 std::vector<double> TubeR2_r(TubeR2_N);
204 for (
int i = 0; i < TubeR2_N; ++i) {
205 ostringstream ossZID;
208 ostringstream ossRID;
211 ostringstream ossrID;
219 tubeR2.
transform = G4Translate3D(0., 0., 0.);
220 tubeR2.
geo =
new G4Polycone(
"geo_TubeR2_name", 0, 2 * M_PI, TubeR2_N, &(TubeR2_Z[0]), &(TubeR2_r[0]), &(TubeR2_R[0]));
222 elements[
"TubeR2"] = tubeR2;
229 std::vector<double> TubeL_Z(TubeL_N);
230 std::vector<double> TubeL_R(TubeL_N);
231 std::vector<double> TubeL_r(TubeL_N);
233 for (
int i = 0; i < TubeL_N; ++i) {
234 ostringstream ossZID;
237 ostringstream ossRID;
240 ostringstream ossrID;
248 tubeL.
transform = G4Translate3D(0., 0., 0.);
249 tubeL.
geo =
new G4Polycone(
"geo_TubeL_name", 0, 2 * M_PI, TubeL_N, &(TubeL_Z[0]), &(TubeL_r[0]), &(TubeL_R[0]));
251 elements[
"TubeL"] = tubeL;
264 std::vector<double> A1spc1_Z(A1spc1_N);
265 std::vector<double> A1spc1_r(A1spc1_N);
266 std::vector<double> A1spc1_R(A1spc1_N);
268 for (
int i = 0; i < A1spc1_N; ++i) {
269 ostringstream ossZID;
272 ostringstream ossRID;
275 ostringstream ossrID;
284 G4Polycone* geo_A1spc1xx =
new G4Polycone(
"geo_A1spc1xx_name", 0, 2 * M_PI, A1spc1_N, &(A1spc1_Z[0]), &(A1spc1_r[0]),
292 std::vector<double> A1spc2_Z(A1spc2_N);
293 std::vector<double> A1spc2_R(A1spc2_N);
294 std::vector<double> A1spc2_r(A1spc2_N);
296 for (
int i = 0; i < A1spc2_N; ++i) {
297 ostringstream ossZID;
300 ostringstream ossRID;
303 ostringstream ossrID;
312 G4Polycone* geo_A1spc2xx =
new G4Polycone(
"geo_A1spc2xx_name", 0, 2 * M_PI, A1spc2_N, &(A1spc2_Z[0]), &(A1spc2_r[0]),
320 std::vector<double> B1spc1_Z(B1spc1_N);
321 std::vector<double> B1spc1_R(B1spc1_N);
322 std::vector<double> B1spc1_r(B1spc1_N);
324 for (
int i = 0; i < B1spc1_N; ++i) {
325 ostringstream ossZID;
328 ostringstream ossRID;
331 ostringstream ossrID;
340 G4Polycone* geo_B1spc1xx =
new G4Polycone(
"geo_B1spc1xx_name", 0, 2 * M_PI, B1spc1_N, &(B1spc1_Z[0]), &(B1spc1_r[0]),
348 std::vector<double> B1spc2_Z(B1spc2_N);
349 std::vector<double> B1spc2_R(B1spc2_N);
350 std::vector<double> B1spc2_r(B1spc2_N);
352 for (
int i = 0; i < B1spc2_N; ++i) {
353 ostringstream ossZID;
356 ostringstream ossRID;
359 ostringstream ossrID;
368 G4Polycone* geo_B1spc2xx =
new G4Polycone(
"geo_B1spc2xx_name", 0, 2 * M_PI, B1spc2_N, &(B1spc2_Z[0]), &(B1spc2_r[0]),
372 B1spc2.
geo =
new G4IntersectionSolid(
"geo_B1spc2_name", geo_B1spc2xx, elements[
"TubeR2"].geo, B1spc2.
transform.inverse());
375 G4IntersectionSolid* geo_B1spc1x =
new G4IntersectionSolid(
"geo_B1spc1x_name", geo_B1spc1xx, elements[
"TubeR"].geo,
377 B1spc1.
geo =
new G4UnionSolid(
"geo_B1spc1_name", geo_B1spc1x, B1spc2.
geo);
379 A1spc2.
geo =
new G4IntersectionSolid(
"geo_A1spc2_name", geo_A1spc2xx, elements[
"TubeR2"].geo, A1spc2.
transform.inverse());
382 G4IntersectionSolid* geo_A1spc1xy =
new G4IntersectionSolid(
"geo_A1spc1xy_name", geo_A1spc1xx, elements[
"TubeR"].geo,
384 G4UnionSolid* geo_A1spc1x =
new G4UnionSolid(
"geo_A1spc1x_name", geo_A1spc1xy, A1spc2.
geo);
385 A1spc1.
geo =
new G4SubtractionSolid(
"geo_A1spc1_name", geo_A1spc1x, B1spc1.
geo, A1spc1.
transform.inverse()*B1spc1.
transform);
389 A1spc1.
logi =
new G4LogicalVolume(A1spc1.
geo, mat_A1spc1,
"logi_A1spc1_name");
391 A1spc1.
logi->SetUserLimits(
new G4UserLimits(stepMax));
396 new G4PVPlacement(A1spc1.
transform, A1spc1.
logi,
"phys_A1spc1_name", &topVolume,
false, 0);
400 B1spc1.
logi =
new G4LogicalVolume(B1spc1.
geo, mat_B1spc1,
"logi_B1spc1_name");
402 B1spc1.
logi->SetUserLimits(
new G4UserLimits(stepMax));
407 new G4PVPlacement(B1spc1.
transform, B1spc1.
logi,
"phys_B1spc1_name", &topVolume,
false, 0);
409 elements[
"A1spc1"] = A1spc1;
410 elements[
"A1spc2"] = A1spc2;
411 elements[
"B1spc1"] = B1spc1;
412 elements[
"B1spc2"] = B1spc2;
422 std::vector<double> C1wal1_Z(C1wal1_N);
423 std::vector<double> C1wal1_R(C1wal1_N);
424 std::vector<double> C1wal1_r(C1wal1_N);
426 for (
int i = 0; i < C1wal1_N; ++i) {
427 ostringstream ossZID;
430 ostringstream ossRID;
433 ostringstream ossrID;
441 C1wal1.
transform = G4Translate3D(0., 0., 0.);
444 G4Polycone* geo_C1wal1xxx =
new G4Polycone(
"geo_C1wal1xxx_name", 0, 2 * M_PI, C1wal1_N, &(C1wal1_Z[0]), &(C1wal1_r[0]),
446 G4IntersectionSolid* geo_C1wal1xx =
new G4IntersectionSolid(
"geo_C1wal1xx_name", geo_C1wal1xxx, elements[
"TubeR"].geo,
447 elements[
"TubeR"].transform);
448 G4SubtractionSolid* geo_C1wal1x =
new G4SubtractionSolid(
"geo_C1wal1x_name", geo_C1wal1xx, elements[
"A1spc1"].geo,
449 elements[
"A1spc1"].transform);
450 C1wal1.
geo =
new G4SubtractionSolid(
"geo_C1wal1_name", geo_C1wal1x, elements[
"B1spc1"].geo, elements[
"B1spc1"].transform);
454 C1wal1.
logi =
new G4LogicalVolume(C1wal1.
geo, mat_C1wal1,
"logi_C1wal1_name");
459 new G4PVPlacement(0, G4ThreeVector(0, 0, 0), C1wal1.
logi,
"phys_C1wal1_name", &topVolume,
false, 0);
461 elements[
"C1wal1"] = C1wal1;
471 std::vector<double> D1spc1_Z(D1spc1_N);
472 std::vector<double> D1spc1_r(D1spc1_N);
473 std::vector<double> D1spc1_R(D1spc1_N);
475 for (
int i = 0; i < D1spc1_N; ++i) {
476 ostringstream ossZID;
479 ostringstream ossRID;
482 ostringstream ossrID;
491 G4Polycone* geo_D1spc1xx =
new G4Polycone(
"geo_D1spc1xx_name", 0, 2 * M_PI, D1spc1_N, &(D1spc1_Z[0]), &(D1spc1_r[0]),
499 std::vector<double> E1spc1_Z(E1spc1_N);
500 std::vector<double> E1spc1_R(E1spc1_N);
501 std::vector<double> E1spc1_r(E1spc1_N);
503 for (
int i = 0; i < E1spc1_N; ++i) {
504 ostringstream ossZID;
507 ostringstream ossRID;
510 ostringstream ossrID;
519 G4Polycone* geo_E1spc1xx =
new G4Polycone(
"geo_E1spc1xx_name", 0, 2 * M_PI, E1spc1_N, &(E1spc1_Z[0]), &(E1spc1_r[0]),
523 G4IntersectionSolid* geo_D1spc1x =
new G4IntersectionSolid(
"geo_D1spc1x_name", geo_D1spc1xx, elements[
"TubeL"].geo,
525 E1spc1.
geo =
new G4IntersectionSolid(
"geo_E1spc1_name", geo_E1spc1xx, elements[
"TubeL"].geo, E1spc1.
transform.inverse());
526 D1spc1.
geo =
new G4SubtractionSolid(
"geo_D1spc1_name", geo_D1spc1x, E1spc1.
geo, D1spc1.
transform.inverse()*E1spc1.
transform);
530 D1spc1.
logi =
new G4LogicalVolume(D1spc1.
geo, mat_D1spc1,
"logi_D1spc1_name");
532 D1spc1.
logi->SetUserLimits(
new G4UserLimits(stepMax));
537 new G4PVPlacement(D1spc1.
transform, D1spc1.
logi,
"phys_D1spc1_name", &topVolume,
false, 0);
541 E1spc1.
logi =
new G4LogicalVolume(E1spc1.
geo, mat_E1spc1,
"logi_E1spc1_name");
543 E1spc1.
logi->SetUserLimits(
new G4UserLimits(stepMax));
548 new G4PVPlacement(E1spc1.
transform, E1spc1.
logi,
"phys_E1spc1_name", &topVolume,
false, 0);
550 elements[
"E1spc1"] = E1spc1;
551 elements[
"D1spc1"] = D1spc1;
562 std::vector<double> F1wal1_Z(F1wal1_N);
563 std::vector<double> F1wal1_R(F1wal1_N);
564 std::vector<double> F1wal1_r(F1wal1_N);
566 for (
int i = 0; i < F1wal1_N; ++i) {
567 ostringstream ossZID;
570 ostringstream ossRID;
573 ostringstream ossrID;
581 F1wal1.
transform = G4Translate3D(0., 0., 0.);
584 G4Polycone* geo_F1wal1xxx =
new G4Polycone(
"geo_F1wal1xxx_name", 0, 2 * M_PI, F1wal1_N, &(F1wal1_Z[0]), &(F1wal1_r[0]),
586 G4IntersectionSolid* geo_F1wal1xx =
new G4IntersectionSolid(
"geo_F1wal1xx_name", geo_F1wal1xxx, elements[
"TubeL"].geo,
587 elements[
"TubeL"].transform);
588 G4SubtractionSolid* geo_F1wal1x =
new G4SubtractionSolid(
"geo_F1wal1x_name", geo_F1wal1xx, elements[
"D1spc1"].geo,
589 elements[
"D1spc1"].transform);
590 F1wal1.
geo =
new G4SubtractionSolid(
"geo_F1wal1_name", geo_F1wal1x, elements[
"E1spc1"].geo, elements[
"E1spc1"].transform);
594 F1wal1.
logi =
new G4LogicalVolume(F1wal1.
geo, mat_F1wal1,
"logi_F1wal1_name");
599 new G4PVPlacement(F1wal1.
transform, F1wal1.
logi,
"phys_F1wal1_name", &topVolume,
false, 0);
601 elements[
"F1wal1"] = F1wal1;
607 std::vector<std::string> supports;
609 for (
const auto& name : supports) {
634 G4Transform3D transform_box = G4Translate3D(box_X0, box_Y0, box_Z0);
635 transform_box = transform_box * G4RotateY3D(sup_PHI /
Unit::rad);
637 G4Transform3D transform_trd = G4Translate3D(trd_X0, trd_Y0, trd_Z0);
638 transform_trd = transform_trd * G4RotateY3D(sup_PHI /
Unit::rad) * G4RotateX3D(M_PI / 2.0 /
Unit::rad);
641 string geo_box_name =
"geo_" + name +
"_box_name";
642 string geo_trd_name =
"geo_" + name +
"_trd_name";
645 if (sup_cut_N == 0) {
646 geo_sup_name =
"geo_" + name +
"_name";
648 geo_sup_name =
"geo_" + name +
"_x_name";
651 G4Box* geo_box =
new G4Box(geo_box_name, box_W / 2.0, box_H / 2.0, box_L / 2.0);
652 G4Trd* geo_trd =
new G4Trd(geo_trd_name, trd_W1 / 2.0, trd_W2 / 2.0, trd_L / 2.0, trd_L / 2.0, trd_H / 2.0);
654 G4VSolid* geo_sup =
new G4UnionSolid(geo_sup_name, geo_box, geo_trd, transform_box.inverse() * transform_trd);
657 for (
int i = 0; i < sup_cut_N; ++i) {
658 ostringstream oss_block_num;
662 string geo_supx_name;
663 if (i == sup_cut_N - 1) {
664 geo_supx_name =
"geo_" + name +
"_name";
666 geo_sup_name =
"geo_" + name +
"_x" + oss_block_num.str() +
"_name";
668 string geo_cut_name =
"geo_" + name +
"_cut" + oss_block_num.str() +
"_name";
672 if (cut_type == 0.0) {
677 geo_cut =
new G4Box(geo_cut_name, cut_W / 2.0, cut_H / 2.0, cut_L / 2.0);
683 geo_cut =
new G4Tubs(geo_cut_name, 0.0, cut_R, cut_L / 2.0, 0.0, 2.0 * M_PI);
694 G4Transform3D cut_transform = G4Translate3D(cut_X0, cut_Y0, cut_Z0);
695 cut_transform = cut_transform * G4RotateX3D(cut_PHI /
Unit::rad);
696 cut_transform = cut_transform * G4RotateZ3D(cut_TH /
Unit::rad);
698 geo_sup =
new G4SubtractionSolid(geo_sup_name, geo_sup, geo_cut, cut_transform);
707 string logi_sup_name =
"logi_" + name +
"_name";
708 G4LogicalVolume* logi_sup =
new G4LogicalVolume(sup.
geo, mat_sup, logi_sup_name);
715 string phys_sup_name =
"phys_" + name +
"_name";
716 new G4PVPlacement(sup.
transform, sup.
logi, phys_sup_name, &topVolume,
false, 0);
718 elements[name] = sup;
725 std::vector<std::string> straightSections;
727 for (
const auto& name : straightSections) {
734 std::vector<double> Z(N);
735 std::vector<double>
R(N);
736 std::vector<double> r(N);
738 for (
int i = 0; i < N; ++i) {
739 ostringstream ossZID;
742 ostringstream ossRID;
745 ostringstream ossrID;
753 polycone.
transform = G4Translate3D(0.0, 0.0, 0.0);
760 string geo_polyconexx_name =
"geo_" + name +
"xx_name";
761 string geo_polyconex_name =
"geo_" + name +
"x_name";
762 string geo_polycone_name =
"geo_" + name +
"_name";
764 G4VSolid* geo_polyconexx, *geo_polycone;
767 geo_polyconexx =
new G4Polycone(geo_polyconexx_name, 0.0, 2 * M_PI, N, &(Z[0]), &(r[0]), &(
R[0]));
768 G4VSolid* geo_polyconex =
new G4SubtractionSolid(geo_polyconex_name, geo_polyconexx, elements[subtract].geo,
769 elements[motherVolume].transform.inverse()*polycone.
transform.inverse()*elements[subtract].transform);
770 geo_polycone =
new G4IntersectionSolid(geo_polycone_name, geo_polyconex, elements[
intersect].geo,
771 elements[motherVolume].transform.inverse()*polycone.
transform.inverse()*elements[
intersect].transform);
772 }
else if (subtract !=
"") {
773 geo_polyconexx =
new G4Polycone(geo_polyconexx_name, 0.0, 2 * M_PI, N, &(Z[0]), &(r[0]), &(
R[0]));
774 geo_polycone =
new G4SubtractionSolid(geo_polycone_name, geo_polyconexx, elements[subtract].geo,
775 elements[motherVolume].transform.inverse()*polycone.
transform.inverse()*elements[subtract].transform);
777 geo_polyconexx =
new G4Polycone(geo_polyconexx_name, 0.0, 2 * M_PI, N, &(Z[0]), &(r[0]), &(
R[0]));
778 geo_polycone =
new G4IntersectionSolid(geo_polycone_name, geo_polyconexx, elements[
intersect].geo,
779 elements[motherVolume].transform.inverse()*polycone.
transform.inverse()*elements[
intersect].transform);
781 geo_polycone =
new G4Polycone(geo_polycone_name, 0.0, 2 * M_PI, N, &(Z[0]), &(r[0]), &(
R[0]));
783 polycone.
geo = geo_polycone;
788 string logi_polycone_name =
"logi_" + name +
"_name";
789 polycone.
logi =
new G4LogicalVolume(polycone.
geo, mat_polycone, logi_polycone_name);
794 string phys_polycone_name =
"phys_" + name +
"_name";
795 new G4PVPlacement(polycone.
transform, polycone.
logi, phys_polycone_name, elements[motherVolume].logi,
false, 0);
800 elements[name] = polycone;
807 std::vector<std::string> shields;
809 for (
const auto& name : shields) {
833 shield.
transform = G4Translate3D(shield_X0, shield_Y0, shield_Z0);
836 G4Transform3D transform_shield_hole = G4Translate3D(shield_hole_dX, shield_hole_dY, shield_hole_dZ);
839 string geo_shieldx_name =
"geo_" + name +
"x_name";
840 string geo_shield_hole_name =
"geo_" + name +
"_hole_name";
841 string geo_shield_name =
"geo_" + name +
"_name";
843 if (shield_hole_W == 0 || shield_hole_H == 0 || shield_hole_L == 0) {
844 G4Box* geo_shield =
new G4Box(geo_shield_name, shield_W / 2.0, shield_H / 2.0, shield_L / 2.0);
846 shield.
geo = geo_shield;
848 G4Box* geo_shieldx =
new G4Box(geo_shieldx_name, shield_W / 2.0, shield_H / 2.0, shield_L / 2.0);
849 G4Box* geo_shield_hole =
new G4Box(geo_shield_hole_name, shield_hole_W / 2.0, shield_hole_H / 2.0, shield_hole_L / 2.0);
850 G4SubtractionSolid* geo_shield =
new G4SubtractionSolid(geo_shield_name, geo_shieldx, geo_shield_hole,
851 transform_shield_hole);
853 shield.
geo = geo_shield;
859 string logi_shield_name =
"logi_" + name +
"_name";
860 G4LogicalVolume* logi_shield =
new G4LogicalVolume(shield.
geo, mat_shield, logi_shield_name);
862 shield.
logi = logi_shield;
867 string phys_shield_name =
"phys_" + name +
"_name";
868 new G4PVPlacement(shield.
transform, shield.
logi, phys_shield_name, &topVolume,
false, 0);
870 elements[name] = shield;
875 G4Tubs* geo_rvcR =
new G4Tubs(
"geo_rvcR", 60, 60 + 60, (620 - 560) / 2., 0, 2 * M_PI);
876 G4LogicalVolume* logi_rvcR =
new G4LogicalVolume(geo_rvcR,
Materials::get(
"SUS316L"),
"logi_rvcR_name");
877 new G4PVPlacement(0, G4ThreeVector(0, 0, (620 + 560) / 2.), logi_rvcR,
"phys_rvcR_name", &topVolume,
false, 0);
879 G4Tubs* geo_rvcL =
new G4Tubs(
"geo_rvcL", 60, 60 + 60, (-560 - (-620)) / 2., 0, 2 * M_PI);
880 G4LogicalVolume* logi_rvcL =
new G4LogicalVolume(geo_rvcL,
Materials::get(
"SUS316L"),
"logi_rvcL_name");
881 new G4PVPlacement(0, G4ThreeVector(0, 0, (-620 - 560) / 2.), logi_rvcL,
"phys_rvcL_name", &topVolume,
false, 0);
885 G4EllipticalTube* geo_elp_QC1LEx =
new G4EllipticalTube(
"geo_elp_QC1LEx", 10.5, 13.5, (-675 - (-1225)) / 2.);
886 G4IntersectionSolid* geo_elp_QC1LE =
new G4IntersectionSolid(
"geo_elp_QC1LE", elements[
"D2wal1"].geo, geo_elp_QC1LEx,
887 G4Translate3D(0, 0, (-675 - 1225) / 2.));
888 G4LogicalVolume* logi_elp_QC1LE =
new G4LogicalVolume(geo_elp_QC1LE,
Materials::get(
"Vacuum"),
"logi_elp_QC1LE_name");
889 new G4PVPlacement(0, G4ThreeVector(0, 0, 0), logi_elp_QC1LE,
"phys_elp_QC1LE_name", elements[
"D2wal1"].logi,
false, 0);
891 G4EllipticalTube* geo_elp_QC1LPx =
new G4EllipticalTube(
"geo_elp_QC1LPx", 10.5, 13.5, (-675 - (-1225)) / 2.);
892 G4IntersectionSolid* geo_elp_QC1LP =
new G4IntersectionSolid(
"geo_elp_QC1LP", elements[
"E2wal1"].geo, geo_elp_QC1LPx,
893 G4Translate3D(0, 0, (-675 - 1225) / 2.));
894 G4LogicalVolume* logi_elp_QC1LP =
new G4LogicalVolume(geo_elp_QC1LP,
Materials::get(
"Vacuum"),
"logi_elp_QC1LP_name");
895 new G4PVPlacement(0, G4ThreeVector(0, 0, 0), logi_elp_QC1LP,
"phys_elp_QC1LP_name", elements[
"E2wal1"].logi,
false, 0);
897 G4EllipticalTube* geo_elp_QC1REx =
new G4EllipticalTube(
"geo_elp_QC1REx", 10.5, 13.5, (1225 - 675) / 2.);
898 G4IntersectionSolid* geo_elp_QC1RE =
new G4IntersectionSolid(
"geo_elp_QC1RE", elements[
"A2wal1"].geo, geo_elp_QC1REx,
899 G4Translate3D(0, 0, (1225 + 675) / 2.));
900 G4LogicalVolume* logi_elp_QC1RE =
new G4LogicalVolume(geo_elp_QC1RE,
Materials::get(
"Vacuum"),
"logi_elp_QC1RE_name");
901 new G4PVPlacement(0, G4ThreeVector(0, 0, 0), logi_elp_QC1RE,
"phys_elp_QC1RE_name", elements[
"A2wal1"].logi,
false, 0);
903 G4EllipticalTube* geo_elp_QC1RPx =
new G4EllipticalTube(
"geo_elp_QC1RPx", 10.5, 13.5, (1225 - 675) / 2.);
904 G4IntersectionSolid* geo_elp_QC1RP =
new G4IntersectionSolid(
"geo_elp_QC1RP", elements[
"B2wal1"].geo, geo_elp_QC1RPx,
905 G4Translate3D(0, 0, (1225 + 675) / 2.));
906 G4LogicalVolume* logi_elp_QC1RP =
new G4LogicalVolume(geo_elp_QC1RP,
Materials::get(
"Vacuum"),
"logi_elp_QC1RP_name");
907 new G4PVPlacement(0, G4ThreeVector(0, 0, 0), logi_elp_QC1RP,
"phys_elp_QC1RP_name", elements[
"B2wal1"].logi,
false, 0);
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.
GeoCryostatCreator()
Constructor of the GeoCryostatCreator class.
virtual ~GeoCryostatCreator()
The destructor of the GeoCryostatCreator class.
CryostatGeo m_config
geometry parameters object
void createGeometry(G4LogicalVolume &topVolume, geometry::GeometryTypes type)
Create detector geometry.
SensitiveDetector * m_sensitive
Sensitive detector.
The IR Sensitive Detector class.
int intersect(const TRGCDCLpar &lp1, const TRGCDCLpar &lp2, CLHEP::HepVector &v1, CLHEP::HepVector &v2)
intersection
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.
GeometryTypes
Flag indicating the type of geometry to be used.
Abstract base class for different kinds of events.
The struct for CryostatElement.
G4LogicalVolume * logi
Logical volume.
G4VSolid * geo
Solid volume.
G4Transform3D transform
Transformation.