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), solidMeasureVolume(NULL),
92 WorldSizeXY=WorldSizeZ=0;
93 GapSizeX1=GapSizeX2=GapSizeY1=GapSizeY2=GapSizeZ=0;
94 MeasureVolumeSizeXY=MeasureVolumeSizeZ=0;
108 return ConstructCalorimeter();
113 void PurgMagDetectorConstruction::DefineMaterials()
123 G4int ncomponents, natoms;
149 density = 1.000*
g/
cm3;
156 density = 1.290*
mg/
cm3;
162 density = 1.e-5*
g/
cm3;
163 pressure = 2.e-2*
bar;
171 density = 1.7836*
mg/
cm3 ;
175 density = 1.25053*
mg/
cm3 ;
179 density = 1.4289*
mg/
cm3 ;
184 density = 1.2928*
mg/
cm3 ;
191 density,ncomponents=3,
193 LaboratoryVacuum->
AddMaterial( Nitrogen, fractionmass = 0.7557 ) ;
194 LaboratoryVacuum->
AddMaterial( Oxygen, fractionmass = 0.2315 ) ;
195 LaboratoryVacuum->
AddMaterial( Argon, fractionmass = 0.0128 ) ;
202 WorldMaterial = LaboratoryVacuum;
206 G4cout <<
"end material"<< endl;
215 WorldSizeXY = 300.*
cm;
216 WorldSizeZ = 300.*
cm;
219 MeasureVolumeSizeXY = 280.*
cm;
220 MeasureVolumeSizeZ = 1.*
cm;
227 MeasureVolumePosition = -(SSD + MeasureVolumeSizeZ/2);
236 GapSizeX2 = 18.37*
cm;
262 static G4bool fieldIsInitialized =
false;
263 if(!fieldIsInitialized)
280 fieldIsInitialized =
true;
288 G4cout <<
"\n-----------------------------------------------------------"
289 <<
"\n Geometry and materials"
290 <<
"\n-----------------------------------------------------------"
292 <<
"\n ---> " << WorldMaterial->
GetName() <<
" in World"
293 <<
"\n ---> " <<
"WorldSizeXY: " <<
G4BestUnit(WorldSizeXY,
"Length")
294 <<
"\n ---> " <<
"WorldSizeZ: " <<
G4BestUnit(WorldSizeZ,
"Length");
297 G4cout <<
"\n-----------------------------------------------------------"
298 <<
"\n ---> Purging Magnet:"
299 <<
"\n ---> " <<
"Gap made of "<< GapMaterial->
GetName()
300 <<
"\n ---> " <<
"GapSizeY1: " <<
G4BestUnit(GapSizeY1,
"Length")
301 <<
"\n ---> " <<
"GapSizeY2: " <<
G4BestUnit(GapSizeY2,
"Length")
302 <<
"\n ---> " <<
"GapSizeX1: " <<
G4BestUnit(GapSizeX1,
"Length")
303 <<
"\n ---> " <<
"GapSizeX2: " <<
G4BestUnit(GapSizeX2,
"Length");
307 G4cout <<
"\n-----------------------------------------------------------"
308 <<
"\n ---> Measurement Volume:"
309 <<
"\n ---> " << WorldMaterial->
GetName() <<
" in Measurement volume"
310 <<
"\n ---> " <<
"MeasureVolumeXY: " <<
G4BestUnit(MeasureVolumeSizeXY,
"Length")
311 <<
"\n ---> " <<
"MeasureVolumeZ: " <<
G4BestUnit(MeasureVolumeSizeZ,
"Length")
312 <<
"\n ---> " <<
"At SSD = " <<
G4BestUnit(MeasureVolumePosition,
"Length");
315 G4cout <<
"\n-----------------------------------------------------------\n";
324 solidWorld =
new G4Box(
"World",
325 WorldSizeXY/2,WorldSizeXY/2,WorldSizeZ/2);
353 solidMeasureVolume =
new G4Box(
"MeasureVolume",
354 MeasureVolumeSizeXY/2,MeasureVolumeSizeXY/2,MeasureVolumeSizeZ/2);
385 solidGap1 =
new G4Trd(
"Gap1",
406 solidGap2 =
new G4Trd(
"Gap2",
PurgMagDetectorConstruction()
CLHEP::Hep3Vector G4ThreeVector
G4bool SetDetectorField(G4Field *detectorField)
void AddMaterial(G4Material *material, G4double fraction)
const G4String & GetName() const
void SetVisibility(G4bool)
static G4MaterialTable * GetMaterialTable()
G4double GetDeltaOneStep() const
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
void SetForceSolid(G4bool)
void SetChordFinder(G4ChordFinder *aChordFinder)
G4GLOB_DLL std::ostream G4cout
static G4TransportationManager * GetTransportationManager()
G4FieldManager * GetFieldManager() const
~PurgMagDetectorConstruction()
G4VPhysicalVolume * Construct()
void AddElement(G4Element *element, G4int nAtoms)
void SetVisAttributes(const G4VisAttributes *pVA)