78 fHodoscope1Logical(nullptr), fHodoscope2Logical(nullptr),
79 fWirePlane1Logical(nullptr), fWirePlane2Logical(nullptr),
80 fCellLogical(nullptr), fHadCalScintiLogical(nullptr),
81 fMagneticLogical(nullptr),
83 fArmAngle(30.*
deg), fArmRotation(nullptr), fSecondArmPhys(nullptr)
101 delete visAttributes;
120 G4bool checkOverlaps =
true;
125 =
new G4Box(
"worldBox",10.*
m,3.*
m,10.*
m);
130 false,0,checkOverlaps);
135 =
new G4Tubs(
"magneticTubs",0.,1.*
m,1.*
m,0.,360.*
deg);
145 "magneticPhysical",worldLogical,
146 false,0,checkOverlaps);
154 =
new G4Box(
"firstArmBox",1.5*
m,1.*
m,3.*
m);
158 "firstArmPhysical",worldLogical,
159 false,0,checkOverlaps);
163 =
new G4Box(
"secondArmBox",2.*
m,2.*
m,3.5*
m);
164 auto secondArmLogical
170 "fSecondArmPhys",worldLogical,
171 false,0,checkOverlaps);
177 =
new G4LogicalVolume(hodoscope1Solid,scintillator,
"hodoscope1Logical");
182 "hodoscope1Physical",firstArmLogical,
183 false,i,checkOverlaps);
195 "chamber1Physical",firstArmLogical,
196 false,i,checkOverlaps);
201 =
new G4Box(
"wirePlane1Box",1.*
m,30.*
cm,0.1*
mm);
205 "wirePlane1Physical",chamber1Logical,
206 false,0,checkOverlaps);
212 =
new G4LogicalVolume(hodoscope2Solid,scintillator,
"hodoscope2Logical");
217 "hodoscope2Physical",secondArmLogical,
218 false,i,checkOverlaps);
223 =
new G4Box(
"chamber2Box",1.5*
m,30.*
cm,1.*
cm);
230 "chamber2Physical",secondArmLogical,
231 false,i,checkOverlaps);
236 =
new G4Box(
"wirePlane2Box",1.5*
m,30.*
cm,0.1*
mm);
240 "wirePlane2Physical",chamber2Logical,
241 false,0,checkOverlaps);
244 auto emCalorimeterSolid
245 =
new G4Box(
"EMcalorimeterBox",1.5*
m,30.*
cm,15.*
cm);
246 auto emCalorimeterLogical
249 "EMcalorimeterPhysical",secondArmLogical,
250 false,0,checkOverlaps);
262 auto hadCalorimeterSolid
263 =
new G4Box(
"HadCalorimeterBox",1.5*
m,30.*
cm,50.*
cm);
264 auto hadCalorimeterLogical
265 =
new G4LogicalVolume(hadCalorimeterSolid,lead,
"HadCalorimeterLogical");
267 "HadCalorimeterPhysical",secondArmLogical,
268 false,0,checkOverlaps);
271 auto HadCalColumnSolid
272 =
new G4Box(
"HadCalColumnBox",15.*
cm,30.*
cm,50.*
cm);
273 auto HadCalColumnLogical
275 new G4PVReplica(
"HadCalColumnPhysical",HadCalColumnLogical,
281 auto HadCalCellLogical
283 new G4PVReplica(
"HadCalCellPhysical",HadCalCellLogical,
287 auto HadCalLayerSolid
288 =
new G4Box(
"HadCalLayerBox",15.*
cm,15.*
cm,2.5*
cm);
289 auto HadCalLayerLogical
291 new G4PVReplica(
"HadCalLayerPhysical",HadCalLayerLogical,
295 auto HadCalScintiSolid
296 =
new G4Box(
"HadCalScintiBox",15.*
cm,15.*
cm,0.5*
cm);
299 "HadCalScintiLogical");
301 "HadCalScintiPhysical",HadCalLayerLogical,
302 false,0,checkOverlaps);
307 visAttributes->SetVisibility(
false);
308 worldLogical->SetVisAttributes(visAttributes);
316 visAttributes->SetVisibility(
false);
317 firstArmLogical->SetVisAttributes(visAttributes);
318 secondArmLogical->SetVisAttributes(visAttributes);
327 chamber1Logical->SetVisAttributes(visAttributes);
328 chamber2Logical->SetVisAttributes(visAttributes);
332 visAttributes->SetVisibility(
false);
338 visAttributes->SetVisibility(
false);
339 emCalorimeterLogical->SetVisAttributes(visAttributes);
347 hadCalorimeterLogical->SetVisAttributes(visAttributes);
351 visAttributes->SetVisibility(
false);
352 HadCalColumnLogical->SetVisAttributes(visAttributes);
353 HadCalCellLogical->SetVisAttributes(visAttributes);
354 HadCalLayerLogical->SetVisAttributes(visAttributes);
360 return worldPhysical;
372 sdManager->AddNewDetector(hodoscope1);
376 sdManager->AddNewDetector(hodoscope2);
380 sdManager->AddNewDetector(chamber1);
384 sdManager->AddNewDetector(chamber2);
388 sdManager->AddNewDetector(emCalorimeter);
392 sdManager->AddNewDetector(hadCalorimeter);
400 G4bool forceToAllDaughters =
true;
411 nistManager->FindOrBuildMaterial(
"G4_AIR");
414 nistManager->FindOrBuildMaterial(
"G4_Ar");
422 nistManager->FindOrBuildMaterial(
"G4_PLASTIC_SC_VINYLTOLUENE");
425 nistManager->FindOrBuildMaterial(
"G4_CESIUM_IODIDE");
428 nistManager->FindOrBuildMaterial(
"G4_Pb");
448 G4cerr <<
"Detector has not yet been constructed." <<
G4endl;
476 "Set rotation angle of the second arm.");
478 armAngleCmd.
SetRange(
"angle>=0. && angle<180.");