122 G4bool checkOverlaps =
true;
127 =
new G4Box(
"worldBox",10.*
m,3.*
m,10.*
m);
132 false,0,checkOverlaps);
137 =
new G4Tubs(
"magneticTubs",0.,1.*
m,1.*
m,0.,360.*
deg);
147 "magneticPhysical",worldLogical,
148 false,0,checkOverlaps);
156 =
new G4Box(
"firstArmBox",1.5*
m,1.*
m,3.*
m);
160 "firstArmPhysical",worldLogical,
161 false,0,checkOverlaps);
165 =
new G4Box(
"secondArmBox",2.*
m,2.*
m,3.5*
m);
166 auto secondArmLogical
168 auto x = -5.*
m * std::sin(fArmAngle);
169 auto z = 5.*
m * std::cos(fArmAngle);
172 "fSecondArmPhys",worldLogical,
173 false,0,checkOverlaps);
179 =
new G4LogicalVolume(hodoscope1Solid,scintillator,
"hodoscope1Logical");
184 "hodoscope1Physical",firstArmLogical,
185 false,i,checkOverlaps);
197 "chamber1Physical",firstArmLogical,
198 false,i,checkOverlaps);
203 =
new G4Box(
"wirePlane1Box",1.*
m,30.*
cm,0.1*
mm);
207 "wirePlane1Physical",chamber1Logical,
208 false,0,checkOverlaps);
214 =
new G4LogicalVolume(hodoscope2Solid,scintillator,
"hodoscope2Logical");
219 "hodoscope2Physical",secondArmLogical,
220 false,i,checkOverlaps);
225 =
new G4Box(
"chamber2Box",1.5*
m,30.*
cm,1.*
cm);
230 G4double z2 = (i-kNofChambers/2)*0.5*
m - 1.5*
m;
232 "chamber2Physical",secondArmLogical,
233 false,i,checkOverlaps);
238 =
new G4Box(
"wirePlane2Box",1.5*
m,30.*
cm,0.1*
mm);
242 "wirePlane2Physical",chamber2Logical,
243 false,0,checkOverlaps);
246 auto emCalorimeterSolid
247 =
new G4Box(
"EMcalorimeterBox",1.5*
m,30.*
cm,15.*
cm);
248 auto emCalorimeterLogical
251 "EMcalorimeterPhysical",secondArmLogical,
252 false,0,checkOverlaps);
264 auto hadCalorimeterSolid
265 =
new G4Box(
"HadCalorimeterBox",1.5*
m,30.*
cm,50.*
cm);
266 auto hadCalorimeterLogical
267 =
new G4LogicalVolume(hadCalorimeterSolid,lead,
"HadCalorimeterLogical");
269 "HadCalorimeterPhysical",secondArmLogical,
270 false,0,checkOverlaps);
273 auto HadCalColumnSolid
274 =
new G4Box(
"HadCalColumnBox",15.*
cm,30.*
cm,50.*
cm);
275 auto HadCalColumnLogical
277 new G4PVReplica(
"HadCalColumnPhysical",HadCalColumnLogical,
283 auto HadCalCellLogical
285 new G4PVReplica(
"HadCalCellPhysical",HadCalCellLogical,
289 auto HadCalLayerSolid
290 =
new G4Box(
"HadCalLayerBox",15.*
cm,15.*
cm,2.5*
cm);
291 auto HadCalLayerLogical
293 new G4PVReplica(
"HadCalLayerPhysical",HadCalLayerLogical,
297 auto HadCalScintiSolid
298 =
new G4Box(
"HadCalScintiBox",15.*
cm,15.*
cm,0.5*
cm);
301 "HadCalScintiLogical");
303 "HadCalScintiPhysical",HadCalLayerLogical,
304 false,0,checkOverlaps);
309 visAttributes->SetVisibility(
false);
310 worldLogical->SetVisAttributes(visAttributes);
311 fVisAttributes.push_back(visAttributes);
315 fVisAttributes.push_back(visAttributes);
318 visAttributes->SetVisibility(
false);
319 firstArmLogical->SetVisAttributes(visAttributes);
320 secondArmLogical->SetVisAttributes(visAttributes);
321 fVisAttributes.push_back(visAttributes);
326 fVisAttributes.push_back(visAttributes);
329 chamber1Logical->SetVisAttributes(visAttributes);
330 chamber2Logical->SetVisAttributes(visAttributes);
331 fVisAttributes.push_back(visAttributes);
334 visAttributes->SetVisibility(
false);
337 fVisAttributes.push_back(visAttributes);
340 visAttributes->SetVisibility(
false);
341 emCalorimeterLogical->SetVisAttributes(visAttributes);
342 fVisAttributes.push_back(visAttributes);
346 fVisAttributes.push_back(visAttributes);
349 hadCalorimeterLogical->SetVisAttributes(visAttributes);
350 fVisAttributes.push_back(visAttributes);
353 visAttributes->SetVisibility(
false);
354 HadCalColumnLogical->SetVisAttributes(visAttributes);
355 HadCalCellLogical->SetVisAttributes(visAttributes);
356 HadCalLayerLogical->SetVisAttributes(visAttributes);
358 fVisAttributes.push_back(visAttributes);
362 return worldPhysical;
static constexpr double mm
CLHEP::Hep3Vector G4ThreeVector
HepRotation & rotateX(double delta)
CLHEP::HepRotation G4RotationMatrix
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
void SetUserLimits(G4UserLimits *pULimits)
constexpr G4int kNofChambers
constexpr G4int kNofHadCells
void ConstructMaterials()
static constexpr double m
constexpr G4int kNofHadRows
EM Calorimeter cell parameterisation.
static constexpr double cm
constexpr G4int kNofHadColumns
constexpr G4int kNofHodoscopes2
static constexpr double deg
constexpr G4int kNofEmCells
constexpr G4int kNofHodoscopes1
void SetVisAttributes(const G4VisAttributes *pVA)