80 fHodoscope1Logical(nullptr), fHodoscope2Logical(nullptr),
81 fWirePlane1Logical(nullptr), fWirePlane2Logical(nullptr),
82 fCellLogical(nullptr), fHadCalScintiLogical(nullptr),
83 fMagneticLogical(nullptr),
85 fArmAngle(30.*
deg), fArmRotation(nullptr), fSecondArmPhys(nullptr)
103 delete visAttributes;
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);
145 fieldRot->rotateX(90.*
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
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);
318 visAttributes->SetVisibility(
false);
319 firstArmLogical->SetVisAttributes(visAttributes);
320 secondArmLogical->SetVisAttributes(visAttributes);
329 chamber1Logical->SetVisAttributes(visAttributes);
330 chamber2Logical->SetVisAttributes(visAttributes);
334 visAttributes->SetVisibility(
false);
340 visAttributes->SetVisibility(
false);
341 emCalorimeterLogical->SetVisAttributes(visAttributes);
349 hadCalorimeterLogical->SetVisAttributes(visAttributes);
353 visAttributes->SetVisibility(
false);
354 HadCalColumnLogical->SetVisAttributes(visAttributes);
355 HadCalCellLogical->SetVisAttributes(visAttributes);
356 HadCalLayerLogical->SetVisAttributes(visAttributes);
362 return worldPhysical;
374 sdManager->AddNewDetector(hodoscope1);
378 sdManager->AddNewDetector(hodoscope2);
382 sdManager->AddNewDetector(chamber1);
386 sdManager->AddNewDetector(chamber2);
390 sdManager->AddNewDetector(emCalorimeter);
394 sdManager->AddNewDetector(hadCalorimeter);
402 G4bool forceToAllDaughters =
true;
417 nistManager->FindOrBuildMaterial(
"G4_AIR");
420 nistManager->FindOrBuildMaterial(
"G4_Ar");
428 nistManager->FindOrBuildMaterial(
"G4_PLASTIC_SC_VINYLTOLUENE");
431 nistManager->FindOrBuildMaterial(
"G4_CESIUM_IODIDE");
434 nistManager->FindOrBuildMaterial(
"G4_Pb");
454 G4cerr <<
"Detector has not yet been constructed." <<
G4endl;
482 "Set rotation angle of the second arm.");
484 armAngleCmd.
SetRange(
"angle>=0. && angle<180.");
void GeometryHasBeenModified(G4bool prop=true)
Definition of the B5HadCalorimeterSD class.
G4GenericMessenger * fMessenger
Definition of the B5CellParameterisation class.
void SetArmAngle(G4double val)
Definition of the B5DetectorConstruction class.
static constexpr double mm
Definition of the B5DriftChamberSD class.
CLHEP::Hep3Vector G4ThreeVector
G4LogicalVolume * fWirePlane2Logical
CLHEP::HepRotation G4RotationMatrix
G4bool SetDetectorField(G4Field *detectorField)
This class is generic messenger.
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
G4LogicalVolume * fHodoscope1Logical
void SetUserLimits(G4UserLimits *pULimits)
virtual ~B5DetectorConstruction()
static G4MaterialTable * GetMaterialTable()
Drift chamber sensitive detector.
constexpr G4int kNofChambers
Definition of the B5EmCalorimeterSD class.
G4LogicalVolume * fMagneticLogical
Command & DeclareMethodWithUnit(const G4String &name, const G4String &defaultUnit, const G4AnyMethod &fun, const G4String &doc="")
G4VPhysicalVolume * fSecondArmPhys
constexpr G4int kNofHadCells
static G4NistManager * Instance()
void ConstructMaterials()
void SetFieldManager(G4FieldManager *pFieldMgr, G4bool forceToAllDaughters)
G4LogicalVolume * fCellLogical
Command & SetDefaultValue(const G4String &)
virtual G4VPhysicalVolume * Construct()
G4GLOB_DLL std::ostream G4cout
static constexpr double m
constexpr G4int kNofHadRows
G4LogicalVolume * fHadCalScintiLogical
EM Calorimeter cell parameterisation.
virtual void ConstructSDandField()
static constexpr double cm
static G4ThreadLocal B5MagneticField * fMagneticField
void SetTranslation(const G4ThreeVector &v)
constexpr G4int kNofHadColumns
G4RotationMatrix * fArmRotation
static G4ThreadLocal G4FieldManager * fFieldMgr
Command & SetRange(const G4String &range)
constexpr G4int kNofHodoscopes2
G4LogicalVolume * fWirePlane1Logical
static G4RunManager * GetRunManager()
Definition of the B5MagneticField class.
Definition of the B5HodoscopeSD class.
G4LogicalVolume * fHodoscope2Logical
static G4SDManager * GetSDMpointer()
Hodoscope sensitive detector.
Command & SetParameterName(const G4String &, G4bool, G4bool=false)
void CreateChordFinder(G4MagneticField *detectorMagField)
static constexpr double deg
constexpr G4int kNofEmCells
constexpr G4int kNofHodoscopes1
EM calorimeter sensitive detector.
void SetVisAttributes(const G4VisAttributes *pVA)
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
Hadron calorimeter sensitive detector.
G4GLOB_DLL std::ostream G4cerr
std::vector< G4VisAttributes * > fVisAttributes