5 #include <Geant4/G4Colour.hh>
6 #include <Geant4/G4Cons.hh>
7 #include <Geant4/G4LogicalVolume.hh>
8 #include <Geant4/G4PVPlacement.hh>
9 #include <Geant4/G4RotationMatrix.hh>
10 #include <Geant4/G4String.hh>
11 #include <Geant4/G4SystemOfUnits.hh>
12 #include <Geant4/G4ThreeVector.hh>
13 #include <Geant4/G4Transform3D.hh>
14 #include <Geant4/G4Tubs.hh>
15 #include <Geant4/G4Types.hh>
16 #include <Geant4/G4VPhysicalVolume.hh>
17 #include <Geant4/G4VisAttributes.hh>
32 , _innerRadius(0.0 *
m)
33 , _outerRadius(1.0 *
m)
38 , _materialCrystal(
"G4_PbWO4")
41 , _superdetector(
"NONE")
48 if (volume->GetName().find(
"arbage") != std::string::npos)
70 G4double rMin2 = rMin1;
71 G4double rMax2 = rMax1;
73 G4double sPhi =
_sPhi;
74 G4double dPhi =
_dPhi;
78 G4VSolid* GarbageCollector_solid =
new G4Cons(
"GarbageCollector_solid",
84 G4LogicalVolume* GarbageCollector_logical =
new G4LogicalVolume(GarbageCollector_solid, material_crystal, G4String(
"GarbageCollector"),
nullptr,
nullptr,
nullptr);
86 G4VisAttributes* ecalVisAtt =
new G4VisAttributes();
87 ecalVisAtt->SetVisibility(
true);
88 ecalVisAtt->SetForceSolid(
false);
89 ecalVisAtt->SetColour(G4Colour::Magenta());
90 GarbageCollector_logical->SetVisAttributes(ecalVisAtt);
92 G4RotationMatrix ecal_rotm;
97 new G4PVPlacement(G4Transform3D(ecal_rotm, G4ThreeVector(placeInX, placeInY, placeInZ)),
98 GarbageCollector_logical,
109 new G4PVPlacement(G4Transform3D(ecal_rotm, G4ThreeVector(placeInX, placeInY, -1 * placeInZ)),
110 GarbageCollector_logical,
111 "GarbageCollector_front",
121 G4double cyl_place = 0 *
mm;
123 G4double r_max = r_min + 1 *
mm;
126 G4VSolid* GarbageCollector_cyl_solid =
new G4Tubs(
"GarbageCollector_cyl_solid",
133 G4LogicalVolume* GarbageCollector_cyl_logical =
new G4LogicalVolume(GarbageCollector_cyl_solid,
135 G4String(
"GarbageCollector_cyl"),
140 GarbageCollector_cyl_logical->SetVisAttributes(ecalVisAtt);
142 new G4PVPlacement(G4Transform3D(ecal_rotm, G4ThreeVector(0, 0, cyl_place)),
143 GarbageCollector_cyl_logical,
144 "GarbageCollector_cyl",