35 #include "DetectorConstruction.hh"
47 :fDefaultMaterial(NULL),fCollimatorMaterial(NULL),fBoiteMaterial(NULL),
48 fCathodeMaterial(NULL),fVerreMaterial(NULL),fVerre2Material(NULL),
49 fKgmMaterial(NULL),fBoite2Material(NULL),fBoite3Material(NULL),
50 fNucleusMaterial1(NULL),fCytoplasmMaterial1(NULL),
51 fNucleusMaterial2(NULL),fCytoplasmMaterial2(NULL),
52 fNucleusMaterial3(NULL),fCytoplasmMaterial3(NULL),
53 fPhysiWorld(NULL),fLogicWorld(NULL),fSolidWorld(NULL),
54 fPhysiVol(NULL),fLogicVol(NULL),fSolidVol(NULL),
55 fPhysiBoite(NULL),fLogicBoite(NULL),fSolidBoite(NULL),
56 fPhysiYoke1(NULL),fLogicYoke1(NULL),fSolidYoke1(NULL),
57 fPhysi1Gap(NULL),fLogic1Gap(NULL),fSolid1Gap(NULL),
58 fPhysi2Gap(NULL),fLogic2Gap(NULL),fSolid2Gap(NULL),
59 fPhysi3Gap(NULL),fLogic3Gap(NULL),fSolid3Gap(NULL),
60 fPhysiYoke2(NULL),fLogicYoke2(NULL),fSolidYoke2(NULL),
61 fPhysi4Gap(NULL),fLogic4Gap(NULL),fSolid4Gap(NULL),
62 fPhysi5Gap(NULL),fLogic5Gap(NULL),fSolid5Gap(NULL),
63 fPhysiBoiteIso(NULL),fLogicBoiteIso(NULL),fSolidBoiteIso(NULL),
64 fPhysiCathode(NULL),fLogicCathode(NULL),fSolidCathode(NULL),
65 fPhysiIso(NULL),fLogicIso(NULL),fSolidIso(NULL),
66 fPhysiVerre(NULL),fLogicVerre(NULL),fSolidVerre(NULL),
67 fPhysiBoite2(NULL),fLogicBoite2(NULL),fSolidBoite2(NULL),
68 fPhysiBoite3(NULL),fLogicBoite3(NULL),fSolidBoite3(NULL),
69 fPhysiKgm(NULL),fLogicKgm(NULL),fSolidKgm(NULL),
70 fPhysiVerre2(NULL),fLogicVerre2(NULL),fSolidVerre2(NULL),
71 fPhysiPhantom(NULL),fLogicPhantom(NULL),fSolidPhantom(NULL)
74 fWorldSizeXY=fWorldSizeZ=0;
81 delete fDefaultMaterial;
82 delete fCollimatorMaterial;
83 delete fBoiteMaterial;
84 delete fCathodeMaterial;
85 delete fVerreMaterial;
86 delete fVerre2Material;
88 delete fBoite2Material;
89 delete fBoite3Material;
90 delete fNucleusMaterial1;
91 delete fCytoplasmMaterial1;
92 delete fNucleusMaterial2;
93 delete fCytoplasmMaterial2;
94 delete fNucleusMaterial3;
95 delete fCytoplasmMaterial3;
104 return ConstructLine();
109 void DetectorConstruction::DefineMaterials()
115 G4int ncomponents, natoms,nel;
139 density = 1.000*
g/
cm3;
146 density = 1.290*
mg/
cm3;
148 temperature = 293.16*
kelvin;
155 density = (5e-6/1013.)*1.290*
mg/
cm3;
157 temperature = 293.16*
kelvin;
166 density = 21.4*
g/
cm3;
171 density = 2.552e-2*
mg/
cm3;
173 temperature = 293.16*
kelvin;
187 density = 3.44*
g/
cm3;
208 fDensityPhantom = 1.;
217 fDensityCytoplasm = 1.;
218 density = fDensityCytoplasm*
g/
cm3;
220 Cytoplasm1->
AddElement(H, fractionmass=0.112);
221 Cytoplasm1->
AddElement(O, fractionmass=0.888);
225 fDensityCytoplasm = 1.;
227 density = fDensityCytoplasm*
g/
cm3;
229 Cytoplasm2->
AddElement(H, fractionmass=0.1064);
230 Cytoplasm2->
AddElement(O, fractionmass=0.745);
231 Cytoplasm2->
AddElement(C, fractionmass=0.0904);
232 Cytoplasm2->
AddElement(N, fractionmass=0.0321);
233 Cytoplasm2->
AddElement(P, fractionmass=0.0261);
237 fDensityCytoplasm = 1.;
238 density = fDensityCytoplasm*
g/
cm3;
240 Cytoplasm3->
AddElement(H, fractionmass=0.112);
241 Cytoplasm3->
AddElement(O, fractionmass=0.888);
245 fDensityNucleus = 1.;
246 density = fDensityNucleus*
g/
cm3;
254 fDensityNucleus = 1.;
255 density = fDensityNucleus*
g/
cm3;
265 fDensityNucleus = 1.;
266 density = fDensityNucleus*
g/
cm3;
276 fDefaultMaterial = vacuum;
277 fCollimatorMaterial = Pt;
278 fBoiteMaterial = Butane;
279 fCathodeMaterial = Laiton;
280 fVerreMaterial = Si3N4;
281 fVerre2Material = SiO2;
283 fBoite2Material = Air;
284 fBoite3Material = Polyprop;
286 fNucleusMaterial1 = Nucleus1;
287 fCytoplasmMaterial1 = Cytoplasm1;
288 fNucleusMaterial2 = Nucleus2;
289 fCytoplasmMaterial2 = Cytoplasm2;
290 fNucleusMaterial3 = Nucleus3;
291 fCytoplasmMaterial3 = Cytoplasm3;
310 fCiblePositionX = -1461.42*
mm;
311 fCiblePositionY = 0*
mm;
312 fCiblePositionZ = -1327 + (955*std::cos(fLineAngle))*
mm;
318 fSolidWorld =
new G4Box(
"World",
319 fWorldSizeXY/2,fWorldSizeXY/2,fWorldSizeZ/2);
338 fSolidVol =
new G4Box(
"Vol",
339 10.*
m/2,10.*
m/2,(14025)*
mm/2);
357 G4double PosX = fCiblePositionX*
mm +( (6958.3/2-3.3)*std::sin(fLineAngle))*
mm;
358 G4double PosZ = (fCiblePositionZ+2012.5)*
mm - ((6958.3/2-3.3)*std::cos(fLineAngle))*
mm;
362 PosX = PosX + 1.3 *
micrometer * std::cos(fLineAngle);
363 PosZ = PosZ + 1.3 *
micrometer * std::sin(fLineAngle);
370 fSolidBoite =
new G4Box(
"Boite", 4*
cm, 4*
cm, 6958.3*
mm/2);
372 fLogicBoite =
new G4LogicalVolume(fSolidBoite, fDefaultMaterial,
"Boite");
386 fCollObjSizeXY = 8*
cm;
387 fCollObjSizeZ = 0.07*
mm;
389 fSolidYoke1 =
new G4Box(
"_CollObj_yoke1_", fCollObjSizeXY/2,fCollObjSizeXY/2,fCollObjSizeZ/2);
391 fLogicYoke1 =
new G4LogicalVolume(fSolidYoke1, fCollimatorMaterial,
"_CollObj_yoke1_");
394 "_CollObj_yoke1_",fLogicBoite,
false, 0);
403 fLogic1Gap =
new G4LogicalVolume(fSolid1Gap, fDefaultMaterial,
"_CollObj_gap1_");
406 fLogicYoke1,
false, 0);
416 fLogic2Gap =
new G4LogicalVolume(fSolid2Gap, fDefaultMaterial,
"_CollObj_gap2_");
419 fLogicYoke1,
false, 0);
429 fLogic3Gap =
new G4LogicalVolume(fSolid3Gap, fDefaultMaterial,
"_CollObj_gap3_");
439 fSolidYoke2 =
new G4Box(
"_CollDet_yoke_", 2.5*
cm, 2.5*
cm, 0.035*
mm);
441 fLogicYoke2 =
new G4LogicalVolume(fSolidYoke2, fCollimatorMaterial,
"_CollDet_yoke_");
445 fLogicYoke2,
"_CollDet_yoke_", fLogicBoite,
false, 0);
454 fLogic4Gap =
new G4LogicalVolume(fSolid4Gap, fDefaultMaterial,
"_CollDet_gap4_");
457 fLogicYoke2,
false, 0);
466 fLogic5Gap =
new G4LogicalVolume(fSolid5Gap, fDefaultMaterial,
"_CollDet_gap5_");
479 fSolidBoiteIso =
new G4Box(
"Isobutane", 2.5*
cm, 2.5*
cm, 1.75*
mm);
481 fLogicBoiteIso =
new G4LogicalVolume(fSolidBoiteIso, fBoiteMaterial,
"Isobutane");
493 fSolidCathode =
new G4Box(
"_Laiton_", 2.5*
cm, 2.5*
cm, 0.5*
mm);
495 fLogicCathode =
new G4LogicalVolume(fSolidCathode, fCathodeMaterial,
"_Laiton_");
506 fSolidIso =
new G4Box(
"_Iso_", 1.*
mm, 1.*
mm, 0.499925*
mm);
522 fLogicVerre =
new G4LogicalVolume(fSolidVerre, fVerreMaterial,
"_Si3N4_");
536 fSolidBoite2 =
new G4Box(
"_Air_", 2.5*
cm, 2.5*
cm, 0.1*
mm/2);
538 fLogicBoite2 =
new G4LogicalVolume(fSolidBoite2, fBoite2Material,
"_Air_");
552 fSolidBoite3 =
new G4Box(
"Polyprop", 2.5*
cm, 2.5*
cm, 0.004*
mm/2);
554 fLogicBoite3 =
new G4LogicalVolume(fSolidBoite3, fBoite3Material,
"Polyprop");
567 fSolidKgm =
new G4Box(
"KGM", 2.5*
cm, 2.5*
cm, 3*
mm/2);
583 fSolidVerre2 =
new G4Box(
"_Lame_", 2.5*
cm, 2.5*
cm, 0.150*
mm);
585 fLogicVerre2 =
new G4LogicalVolume(fSolidVerre2, fVerre2Material,
"_Lame_");
613 (fNucleusMaterial1,fCytoplasmMaterial1,
614 fNucleusMaterial2,fCytoplasmMaterial2,
615 fNucleusMaterial3,fCytoplasmMaterial3);
617 fSolidPhantom =
new G4Box(
"Phantom",
622 fLogicPhantom =
new G4LogicalVolume(fSolidPhantom,fDefaultMaterial,
"Phantom",0,0,0);
637 fMyCellParameterisation,
false);
737 if(!fField) fField =
new EMField();
G4double GetNucleusMass()
static constexpr double mm
G4int GetPhantomTotalPixels()
static constexpr double mg
CLHEP::Hep3Vector G4ThreeVector
HepRotation & rotateX(double delta)
CLHEP::HepRotation G4RotationMatrix
G4bool SetDetectorField(G4Field *detectorField)
std::vector< ExP01TrackerHit * > a
int universe_mean_density
G4VPhysicalVolume * Construct()
void SetUserLimits(G4UserLimits *pULimits)
static G4MaterialTable * GetMaterialTable()
void SetMassNucleus(G4double mN)
void SetMassCytoplasm(G4double mC)
HepRotation & rotateY(double delta)
void SetChordFinder(G4ChordFinder *aChordFinder)
void SetForceSolid(G4bool=true)
G4int GetNumberOfVariables() const
virtual void ConstructSDandField()
G4double GetCytoplasmMass()
G4GLOB_DLL std::ostream G4cout
static constexpr double um
static constexpr double m
void SetVisibility(G4bool=true)
static constexpr double cm
static constexpr double kg
static constexpr double kelvin
static constexpr double cm3
void SetDaughtersInvisible(G4bool=true)
static G4TransportationManager * GetTransportationManager()
G4FieldManager * GetFieldManager() const
HepRotation & rotateZ(double delta)
void SetNbOfPixelsInPhantom(G4int nP)
void AddElement(G4Element *element, G4int nAtoms)
static constexpr double bar
static constexpr double deg
static constexpr double atmosphere
static constexpr double micrometer
static constexpr double mole
void SetVisAttributes(const G4VisAttributes *pVA)
static constexpr double pi