101 auto air = G4Material::GetMaterial(
"G4_AIR");
103 auto argonGas = G4Material::GetMaterial(
"G4_Ar");
104 auto scintillator = G4Material::GetMaterial(
"G4_PLASTIC_SC_VINYLTOLUENE");
105 auto csI = G4Material::GetMaterial(
"G4_CESIUM_IODIDE");
106 auto lead = G4Material::GetMaterial(
"G4_Pb");
110 G4bool checkOverlaps =
true;
115 =
new G4Box(
"worldBox",10.*m,3.*m,10.*m);
119 nullptr, G4ThreeVector(), worldLogical,
"worldPhysical",
nullptr,
false, 0, checkOverlaps);
124 =
new G4Tubs(
"magneticTubs",0.,1.*m,1.*m,0.,360.*deg);
131 auto fieldRot =
new G4RotationMatrix();
132 fieldRot->rotateX(90.*deg);
134 "magneticPhysical",worldLogical,
135 false,0,checkOverlaps);
143 =
new G4Box(
"firstArmBox",1.5*m,1.*m,3.*m);
146 new G4PVPlacement(
nullptr, G4ThreeVector(0., 0., -5. * m), firstArmLogical,
"firstArmPhysical",
147 worldLogical,
false, 0, checkOverlaps);
151 =
new G4Box(
"secondArmBox",2.*m,2.*m,3.5*m);
152 auto secondArmLogical
158 "fSecondArmPhys",worldLogical,
159 false,0,checkOverlaps);
163 =
new G4Box(
"hodoscope1Box",5.*cm,20.*cm,0.5*cm);
165 =
new G4LogicalVolume(hodoscope1Solid,scintillator,
"hodoscope1Logical");
170 "hodoscope1Physical", firstArmLogical,
false, i, checkOverlaps);
175 =
new G4Box(
"chamber1Box",1.*m,30.*cm,1.*cm);
181 new G4PVPlacement(
nullptr, G4ThreeVector(0., 0., z1), chamber1Logical,
"chamber1Physical",
182 firstArmLogical,
false, i, checkOverlaps);
187 =
new G4Box(
"wirePlane1Box",1.*m,30.*cm,0.1*mm);
191 chamber1Logical,
false, 0, checkOverlaps);
195 =
new G4Box(
"hodoscope2Box",5.*cm,20.*cm,0.5*cm);
197 =
new G4LogicalVolume(hodoscope2Solid,scintillator,
"hodoscope2Logical");
202 "hodoscope2Physical", secondArmLogical,
false, i, checkOverlaps);
207 =
new G4Box(
"chamber2Box",1.5*m,30.*cm,1.*cm);
213 new G4PVPlacement(
nullptr, G4ThreeVector(0., 0., z2), chamber2Logical,
"chamber2Physical",
214 secondArmLogical,
false, i, checkOverlaps);
219 =
new G4Box(
"wirePlane2Box",1.5*m,30.*cm,0.1*mm);
223 chamber2Logical,
false, 0, checkOverlaps);
226 auto emCalorimeterSolid
227 =
new G4Box(
"EMcalorimeterBox",1.5*m,30.*cm,15.*cm);
228 auto emCalorimeterLogical
230 new G4PVPlacement(
nullptr, G4ThreeVector(0., 0., 2. * m), emCalorimeterLogical,
231 "EMcalorimeterPhysical", secondArmLogical,
false, 0, checkOverlaps);
235 =
new G4Box(
"cellBox",7.5*cm,7.5*cm,15.*cm);
243 auto hadCalorimeterSolid
244 =
new G4Box(
"HadCalorimeterBox",1.5*m,30.*cm,50.*cm);
245 auto hadCalorimeterLogical
246 =
new G4LogicalVolume(hadCalorimeterSolid,lead,
"HadCalorimeterLogical");
247 new G4PVPlacement(
nullptr, G4ThreeVector(0., 0., 3. * m), hadCalorimeterLogical,
248 "HadCalorimeterPhysical", secondArmLogical,
false, 0, checkOverlaps);
251 auto HadCalColumnSolid
252 =
new G4Box(
"HadCalColumnBox",15.*cm,30.*cm,50.*cm);
253 auto HadCalColumnLogical
255 new G4PVReplica(
"HadCalColumnPhysical",HadCalColumnLogical,
260 =
new G4Box(
"HadCalCellBox",15.*cm,15.*cm,50.*cm);
261 auto HadCalCellLogical
263 new G4PVReplica(
"HadCalCellPhysical",HadCalCellLogical,
267 auto HadCalLayerSolid
268 =
new G4Box(
"HadCalLayerBox",15.*cm,15.*cm,2.5*cm);
269 auto HadCalLayerLogical
271 new G4PVReplica(
"HadCalLayerPhysical",HadCalLayerLogical,
275 auto HadCalScintiSolid
276 =
new G4Box(
"HadCalScintiBox",15.*cm,15.*cm,0.5*cm);
279 "HadCalScintiLogical");
281 "HadCalScintiPhysical", HadCalLayerLogical,
false, 0, checkOverlaps);
295 worldLogical->SetVisAttributes(invisible);
296 firstArmLogical->SetVisAttributes(invisible);
297 secondArmLogical->SetVisAttributes(invisible);
303 chamber1Logical->SetVisAttributes(green);
304 chamber2Logical->SetVisAttributes(green);
308 emCalorimeterLogical->SetVisAttributes(invisibleYellow);
311 hadCalorimeterLogical->SetVisAttributes(blue);
312 HadCalColumnLogical->SetVisAttributes(invisibleBlue);
313 HadCalCellLogical->SetVisAttributes(invisibleBlue);
314 HadCalLayerLogical->SetVisAttributes(invisibleBlue);
319 return worldPhysical;