76 #define GAP 1 // Magnet geometric volume
77 #define MAG 1 // Magnetic field grid
78 #define MEASUREVOL 1 // Volume for measurement
84 :physiWorld(NULL), logicWorld(NULL), solidWorld(NULL),
85 physiGap1(NULL), logicGap1(NULL), solidGap1(NULL),
86 physiGap2(NULL), logicGap2(NULL), solidGap2(NULL),
87 physiMeasureVolume(NULL), logicMeasureVolume(NULL),
88 solidMeasureVolume(NULL),
94 WorldSizeXY=WorldSizeZ=0;
95 GapSizeX1=GapSizeX2=GapSizeY1=GapSizeY2=GapSizeZ=0;
96 MeasureVolumeSizeXY=MeasureVolumeSizeZ=0;
110 return ConstructCalorimeter();
115 void PurgMagDetectorConstruction::DefineMaterials()
125 G4int ncomponents, natoms;
151 density = 1.000*
g/
cm3;
158 density = 1.290*
mg/
cm3;
164 density = 1.e-5*
g/
cm3;
165 pressure = 2.e-2*
bar;
173 density = 1.7836*
mg/
cm3 ;
177 density = 1.25053*
mg/
cm3 ;
181 density = 1.4289*
mg/
cm3 ;
186 density = 1.2928*
mg/
cm3 ;
193 density,ncomponents=3,
195 LaboratoryVacuum->
AddMaterial( Nitrogen, fractionmass = 0.7557 ) ;
196 LaboratoryVacuum->
AddMaterial( Oxygen, fractionmass = 0.2315 ) ;
197 LaboratoryVacuum->
AddMaterial( Argon, fractionmass = 0.0128 ) ;
204 WorldMaterial = LaboratoryVacuum;
208 G4cout <<
"end material"<< endl;
217 WorldSizeXY = 300.*
cm;
218 WorldSizeZ = 300.*
cm;
221 MeasureVolumeSizeXY = 280.*
cm;
222 MeasureVolumeSizeZ = 1.*
cm;
229 MeasureVolumePosition = -(SSD + MeasureVolumeSizeZ/2);
238 GapSizeX2 = 18.37*
cm;
264 G4cout <<
"\n-----------------------------------------------------------"
265 <<
"\n Geometry and materials"
266 <<
"\n-----------------------------------------------------------"
268 <<
"\n ---> " << WorldMaterial->
GetName() <<
" in World"
269 <<
"\n ---> " <<
"WorldSizeXY: " <<
G4BestUnit(WorldSizeXY,
"Length")
270 <<
"\n ---> " <<
"WorldSizeZ: " <<
G4BestUnit(WorldSizeZ,
"Length");
273 G4cout <<
"\n-----------------------------------------------------------"
274 <<
"\n ---> Purging Magnet:"
275 <<
"\n ---> " <<
"Gap made of "<< GapMaterial->
GetName()
276 <<
"\n ---> " <<
"GapSizeY1: " <<
G4BestUnit(GapSizeY1,
"Length")
277 <<
"\n ---> " <<
"GapSizeY2: " <<
G4BestUnit(GapSizeY2,
"Length")
278 <<
"\n ---> " <<
"GapSizeX1: " <<
G4BestUnit(GapSizeX1,
"Length")
279 <<
"\n ---> " <<
"GapSizeX2: " <<
G4BestUnit(GapSizeX2,
"Length");
283 G4cout <<
"\n-----------------------------------------------------------"
284 <<
"\n ---> Measurement Volume:"
285 <<
"\n ---> " << WorldMaterial->
GetName() <<
" in Measurement volume"
286 <<
"\n ---> " <<
"MeasureVolumeXY: " <<
G4BestUnit(MeasureVolumeSizeXY,
"Length")
287 <<
"\n ---> " <<
"MeasureVolumeZ: " <<
G4BestUnit(MeasureVolumeSizeZ,
"Length")
288 <<
"\n ---> " <<
"At SSD = " <<
G4BestUnit(MeasureVolumePosition,
"Length");
291 G4cout <<
"\n-----------------------------------------------------------\n";
300 solidWorld =
new G4Box(
"World",
301 WorldSizeXY/2,WorldSizeXY/2,WorldSizeZ/2);
329 solidMeasureVolume =
new G4Box(
"MeasureVolume",
330 MeasureVolumeSizeXY/2,MeasureVolumeSizeXY/2,MeasureVolumeSizeZ/2);
361 solidGap1 =
new G4Trd(
"Gap1",
382 solidGap2 =
new G4Trd(
"Gap2",
426 if (fField.
Get() == 0)
430 fField.
Put(PurgMagField);
static constexpr double mm
static constexpr double mg
PurgMagDetectorConstruction()
CLHEP::Hep3Vector G4ThreeVector
G4bool SetDetectorField(G4Field *detectorField)
void AddMaterial(G4Material *material, G4double fraction)
const G4String & GetName() const
static G4MaterialTable * GetMaterialTable()
G4double GetDeltaOneStep() const
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
void SetForceSolid(G4bool=true)
G4GLOB_DLL std::ostream G4cout
void ConstructSDandField()
void SetVisibility(G4bool=true)
static constexpr double cm
static constexpr double cm3
static G4TransportationManager * GetTransportationManager()
G4FieldManager * GetFieldManager() const
~PurgMagDetectorConstruction()
G4VPhysicalVolume * Construct()
void AddElement(G4Element *element, G4int nAtoms)
static constexpr double bar
void CreateChordFinder(G4MagneticField *detectorMagField)
void Put(const value_type &val) const
static constexpr double mole
void SetVisAttributes(const G4VisAttributes *pVA)