93 theUserLimitsForRoom = 0;
94 theUserLimitsForDetector = 0;
101 theMinEkine = 250.0*
eV;
102 theRoomMinEkine = 250.0*
eV;
110 delete theUserLimitsForRoom;
111 delete theUserLimitsForDetector;
112 delete detectorMessenger;
118 void DMXDetectorConstruction::DefineMaterials()
121 #include "DMXDetectorMaterial.icc"
168 G4double worldWidth = 470.0*
cm + 2.*wallThick;
169 G4double worldLength = 690.0*
cm + 2.*wallThick;
170 G4double worldHeight = 280.0*
cm + 2.*wallThick;
173 (
"world_box", 0.5*worldWidth, 0.5*worldLength, 0.5*worldHeight );
176 "world_phys", world_log, NULL,
false,0);
187 G4double labWidth = worldWidth - 2.*wallThick;
188 G4double labLength = worldLength - 2.*wallThick;
189 G4double labHeight = worldHeight - 2.*wallThick;
192 (
"lab_box", 0.5*labWidth, 0.5*labLength, 0.5*labHeight );
195 lab_log, world_phys,
false,0);
205 #include "DMXDetectorRoom.icc"
217 G4double LN2PosZ = 0.5*jacketHeight + 0.5*LN2jacketHeight
218 + jacketflangeHeight + PosZ;
221 0.*
cm, LN2jacketRadius, 0.5*LN2jacketHeight, 0.*
deg, 360.*
deg);
223 (LN2jacket_tube, LN2jacket_mat,
"LN2jacket_log");
225 "LN2jacket_phys", LN2jacket_log, lab_phys,
false,0);
235 G4double LN2vacuumRadius = LN2jacketRadius - LN2jacketMetalThick;
236 G4double LN2vacuumHeight = LN2jacketHeight - LN2jacketMetalThick;
239 0.*
cm, LN2vacuumRadius, 0.5*LN2vacuumHeight, 0.*
deg, 360.*
deg);
241 (LN2vacuum_tube, vacuum_mat,
"LN2vacuum_log");
243 "LN2vacuum_phys", LN2vacuum_log, LN2jacket_phys,
false,0);
250 G4double LN2Height = 590.0*
mm - 2.*LN2jacketMetalThick;
251 G4double LN2vesselRadius = LN2Radius + LN2jacketMetalThick;
252 G4double LN2vesselHeight = LN2Height;
253 G4double LN2vesselPosZ = 0.5*LN2vacuumHeight - 0.5*LN2vesselHeight;
256 0.*
cm, LN2vesselRadius, 0.5*LN2vesselHeight, 0.*
deg, 360.*
deg);
258 (LN2vessel_tube, LN2jacket_mat,
"LN2vessel_log");
260 "LN2vessel_phys", LN2vessel_log, LN2vacuum_phys,
false,0);
271 0.*
cm, LN2Radius, 0.5*LN2Height, 0.*
deg, 360.*
deg);
274 "LN2_phys", LN2_log, LN2vessel_phys,
false,0);
285 G4double jacketMetalThick = LN2jacketMetalThick;
288 0.*
cm, jacketRadius, 0.5*jacketHeight, 0.*
deg, 360.*
deg);
289 jacket_log =
new G4LogicalVolume(jacket_tube, jacket_mat,
"jacket_log");
291 "jacket_phys", jacket_log, lab_phys,
false,0);
302 G4double topjacketflangePosZ = 0.5*(jacketHeight+jacketflangeHeight);
304 G4Tubs* jacketflange_tube =
new G4Tubs(
"jacketflange_tube",
305 0.*
cm, jacketflangeRadius, 0.5*jacketflangeHeight, 0.*
deg, 360.*
deg);
307 (jacketflange_tube, jacketflange_mat,
"jacketflange_log");
310 "topjacketflange_phys", jacketflange_log, lab_phys,
false,0);
313 "bottomjacketflange_phys", jacketflange_log, lab_phys,
false,0);
320 G4double vacuumRadius = jacketRadius - jacketMetalThick;
321 G4double vacuumHeight = jacketHeight - jacketMetalThick;
324 0.*
cm, vacuumRadius, 0.5*vacuumHeight, 0.*
deg, 360.*
deg);
325 vacuum_log =
new G4LogicalVolume(vacuum_tube, vacuum_mat,
"vacuum_log");
327 "vacuum_phys", vacuum_log, jacket_phys,
false,0);
336 G4double copperRadius = 103.5*
mm + copperMetalThick;
338 G4double copperInner = copperRadius - copperMetalThick;
340 G4double copperVPos = 0.5*(vesselHeight-copperHeight) + 13.0*
cm;
342 G4double coppertopVPos = copperVPos + 0.5*(coppertopThick+copperHeight);
345 copperInner, copperRadius, 0.5*copperHeight, 0.*
deg, 360.*
deg);
346 copper_log =
new G4LogicalVolume(copper_tube, copper_mat,
"copper_log");
348 "copper_phys", copper_log, vacuum_phys,
false,0);
351 0.*
cm, copperRadius, 0.5*coppertopThick, 0.*
deg, 360.*
deg);
353 (coppertop_tube, copper_mat,
"coppertop_log");
355 "coppertop_phys", coppertop_log, vacuum_phys,
false,0);
365 G4double vesselMetalThick = jacketMetalThick;
366 G4double vesselRadius = 75.0*
mm + vesselMetalThick;
369 G4double PMTvesselRadius = 31.0*
mm + vesselMetalThick;
374 G4double TotalvesselHeight = PMTvesselHeight + vesselHeight;
377 0.*
cm, vesselRadius, 0.5*vesselHeight, 0.*
deg, 360.*
deg);
379 0.*
cm, PMTvesselRadius, 0.5*PMTvesselHeight, 0.*
deg, 360.*
deg);
382 (
"vessel_sol", vessel_tube, PMTvessel_tube,
386 vessel_log =
new G4LogicalVolume(vessel_sol, vessel_mat,
"vessel_log");
388 "vessel_phys", vessel_log, vacuum_phys,
false,0);
392 G4Tubs* vesseltop_flange1 =
new G4Tubs(
"vesseltop_flange1",
393 0.*
cm, vesselflangeRadius, 0.25*vesselflangeThick, 0.*
deg, 360.*
deg);
395 (vesseltop_flange1, vessel_mat,
"vesseltop_log1");
398 G4ThreeVector(0.,0.,0.5*(vesselHeight+0.5*vesselflangeThick)+vesselVPos),
399 "vesseltop_phys1", vesseltop_log1, vacuum_phys,
false,0);
401 G4Tubs* vesseltop_flange2 =
new G4Tubs(
"vesseltop_flange2",vesselRadius,
402 vesselflangeRadius, 0.25*vesselflangeThick, 0.*
deg, 360.*
deg);
404 (vesseltop_flange2, vessel_mat,
"vesseltop_log2");
407 G4ThreeVector(0.,0.,0.5*(vesselHeight-0.5*vesselflangeThick)+vesselVPos),
408 "vesseltop_phys2", vesseltop_log2, vacuum_phys,
false,0);
412 (
"vesselbottom_flange1",vesselRadius, vesselflangeRadius,
413 0.25*vesselflangeThick, 0.*
deg, 360.*
deg);
415 (vesselbottom_flange1, vessel_mat,
"vesselbottom_log1");
417 G4ThreeVector(0.,0.,-0.5*(vesselHeight-0.5*vesselflangeThick)+vesselVPos),
418 "vesselbottom_phys1", vesselbottom_log1, vacuum_phys,
false,0);
421 (
"vesselbottom_flange2",PMTvesselRadius, vesselflangeRadius,
422 0.25*vesselflangeThick, 0.*
deg, 360.*
deg);
424 (vesselbottom_flange2, vessel_mat,
"vesselbottom_log2");
426 G4ThreeVector(0.,0.,-0.5*(vesselHeight+0.5*vesselflangeThick)+vesselVPos),
427 "vesselbottom_phys2", vesselbottom_log2, vacuum_phys,
false,0);
431 (
"pmtvesselbottom_flange1", PMTvesselRadius, pmtvesselflangeRadius,
432 0.25*pmtvesselflangeThick, 0.*
deg, 360.*
deg);
434 (pmtvesselbottom_flange1, vessel_mat,
"pmtvesselbottom_log1");
436 (-0.5*vesselHeight-PMTvesselHeight+vesselVPos+0.25*pmtvesselflangeThick)),
437 "pmtvesselbottom_phys1", pmtvesselbottom_log1, vacuum_phys,
false,0);
440 (
"pmtvesselbottom_flange2", 0.*
cm, pmtvesselflangeRadius,
441 0.25*pmtvesselflangeThick, 0.*
deg, 360.*
deg);
443 (pmtvesselbottom_flange2, vessel_mat,
"pmtvesselbottom_log2");
445 -0.5*vesselHeight-PMTvesselHeight+vesselVPos-0.25*pmtvesselflangeThick),
446 "pmtvesselbottom_phys2", pmtvesselbottom_log2, vacuum_phys,
false,0);
478 G4double DetectorRadius = vesselRadius - vesselMetalThick;
479 G4double GXeHeight = TotalvesselHeight - mirrorVPos + gasGap;
480 G4double GXeVPos = 0.5*vesselHeight - 0.5*GXeHeight;
483 0.*
cm, DetectorRadius, 0.5*GXeHeight, 0.*
deg, 360.*
deg);
486 "GXe_phys", GXe_log, vessel_phys,
false,0);
496 G4double LXeHeight = mirrorVPos - gasGap;
497 G4double PMTDetectorRadius = PMTvesselRadius - vesselMetalThick;
498 G4double PMTDetectorHeight = PMTvesselHeight;
499 G4double LXeTubeHeight = LXeHeight - PMTDetectorHeight;
500 G4double LXe_solVPos = -0.5*(LXeTubeHeight+PMTDetectorHeight);
501 G4double LXeVPos = -0.5*TotalvesselHeight + 0.5*LXeHeight;
504 0.*
cm, DetectorRadius, 0.5*LXeTubeHeight, 0.*
deg, 360.*
deg);
505 G4Tubs* PMTdetector_tube =
new G4Tubs(
"PMTdetector_tube",
506 0.*
cm, PMTDetectorRadius, 0.5*PMTDetectorHeight, 0.*
deg, 360.*
deg);
509 (
"LXe_sol", LXe_tube, PMTdetector_tube,
514 "LXe_phys", LXe_log, vessel_phys,
false, 0);
526 G4double laggingRadius = DetectorRadius - laggingThickness;
528 G4Tubs* gaslag_tube =
new G4Tubs(
"gaslag_tube", laggingRadius,
529 DetectorRadius, 0.5*GXeHeight, 0.*
deg, 360.*
deg);
530 gaslag_log =
new G4LogicalVolume(gaslag_tube, vessel_mat,
"gaslag_log");
532 "gaslag_phys", gaslag_log, GXe_phys,
false, 0);
543 G4double lagTubeRadius = DetectorRadius - laggingThickness;
544 G4double lagTubeHeight = LXeHeight - PMTDetectorHeight;
545 G4double lagPMTRadius = PMTDetectorRadius - laggingThickness;
546 G4double lagPMTHeight = PMTDetectorHeight;
548 G4Tubs* liqLag_tube =
new G4Tubs(
"liqlag_tube", lagTubeRadius,
549 DetectorRadius, 0.5*lagTubeHeight, 0.*
deg, 360.*
deg);
550 G4Tubs* lagPMT_tube =
new G4Tubs(
"lagPMT_tube", lagPMTRadius,
551 PMTDetectorRadius, 0.5*lagPMTHeight, 0.*
deg, 360.*
deg);
554 (
"liqLag_sol", liqLag_tube, lagPMT_tube,
557 liqLag_log =
new G4LogicalVolume(liqLag_sol, vessel_mat,
"liqLag_log");
559 "liqLag_phys", liqLag_log, LXe_phys,
false, 0);
582 G4double vessel_REFL[NUM] = { 0.2, 0.2 };
584 vessel_mt->
AddProperty(
"REFLECTIVITY", vessel_PP, vessel_REFL, NUM);
589 (
"VesselTop", GXe_phys, vesseltop_phys1, OpVesselSurface);
593 (
"VesselBottom", LXe_phys, vesselbottom_phys2, OpVesselSurface);
597 (
"GasVessel", GXe_phys, gaslag_phys, OpVesselSurface);
601 (
"LiquidVessel", LXe_phys, liqLag_phys, OpVesselSurface);
610 G4double CuShieldInnerRadius = CuShieldOuterRadius-CuShieldThickness;
611 G4double CuShieldVPosition = -0.5*LXeTubeHeight - PMTDetectorHeight
612 + 0.5*CuShieldHeight;
617 G4Tubs* CuShield_tube =
new G4Tubs(
"CuShield_tube", CuShieldInnerRadius,
618 CuShieldOuterRadius, 0.5*CuShieldHeight, 0.*
deg, 360.*
deg);
623 "CuShield_phys", CuShield_log, LXe_phys,
false, 0);
637 (
"Shield", LXe_phys, CuShield_phys, OpCuShieldSurface);
640 G4double CuShield_REFL[NUM] = { 0.3, 0.2 };
642 CuShield_mt->
AddProperty(
"REFLECTIVITY", CuShield_PP, CuShield_REFL, NUM);
650 G4double ringInnerRadius = CuShieldOuterRadius;
651 G4double ringVOffset = 0.5*ringHeight;
652 G4double ringVPosition = -0.5*GXeHeight + gasGap +ringVOffset;
654 G4Tubs* ring_tube=
new G4Tubs(
"ring_tube", ringInnerRadius,
655 ringOuterRadius, 0.5*ringHeight, 0.*
deg, 360.*
deg);
660 G4double ring_REFL[NUM] = { 0.7, 0.65 };
662 ring_mt->
AddProperty(
"REFLECTIVITY", ring_PP, ring_REFL, NUM);
671 (0.*
cm, 0.*
cm, ringVPosition),
"ring_phys0",ring_log,GXe_phys,
false, 0);
674 (
"Ring", GXe_phys, ring_phys_gas[0], OpRingSurface);
678 "ring_phys1",ring_log, GXe_phys,
false, 0);
681 (
"Ring", GXe_phys, ring_phys_gas[1], OpRingSurface);
685 ringVPosition = 0.5*LXeTubeHeight;
689 "ring_phys2",ring_log,LXe_phys,
false, 0);
692 (
"Ring", LXe_phys, ring_phys_liq[0], OpRingSurface);
696 "ring_phys3",ring_log, LXe_phys,
false, 0);
699 (
"Ring", LXe_phys, ring_phys_liq[1], OpRingSurface);
703 "ring_phys4",ring_log, LXe_phys,
false, 0);
706 (
"Ring", LXe_phys, ring_phys_liq[2], OpRingSurface);
710 "ring_phys5",ring_log, LXe_phys,
false, 0);
713 (
"Ring", LXe_phys, ring_phys_liq[3], OpRingSurface);
717 "ring_phys6",ring_log, LXe_phys,
false, 0);
720 (
"Ring", LXe_phys, ring_phys_liq[4], OpRingSurface);
724 "ring_phys7",ring_log, LXe_phys,
false, 0);
727 (
"Ring", LXe_phys, ring_phys_liq[5], OpRingSurface);
738 G4double mirrorRadius = ringInnerRadius;
739 G4double mirrorVOffset = 0.5*ringHeight;
740 G4double mirrorVPosition = -0.5*GXeHeight + gasGap +mirrorVOffset;
742 G4Tubs* mirror_tube =
new G4Tubs(
"mirror_tube", 0.*
cm, mirrorRadius,
743 0.5*mirrorHeight, 0.*
deg, 360.*
deg);
744 mirror_log =
new G4LogicalVolume(mirror_tube, mirror_mat,
"mirror_log");
747 "mirror_phys", mirror_log, GXe_phys,
false, 0);
760 (
"Mirror", GXe_phys, mirror_phys, OpMirrorSurface);
763 G4double mirror_REFL[NUM] = { 0.83, 0.78 };
765 mirror_mt->
AddProperty(
"REFLECTIVITY", mirror_PP, mirror_REFL, NUM);
772 G4double gridRadius = ringInnerRadius;
773 G4double grid1VOffset = 3.5*ringHeight+1.75*
mm;
774 G4double grid1VPosition = 0.5*LXeTubeHeight - grid1VOffset;
775 G4double grid2VOffset = 4.5*ringHeight+3.50*
mm;
776 G4double grid2VPosition = 0.5*LXeTubeHeight - grid2VOffset;
779 0.5*gridHeight, 0.*
deg, 360.*
deg);
783 "grid1_phys", grid1_log, LXe_phys,
false, 0);
786 "grid2_phys", grid2_log, LXe_phys,
false, 0);
800 G4double recessVPosition = 0.5*(alphaHeight - recessHeight);
802 G4double alphaVOffset = grid1VOffset-0.5*alphaHeight - gridHeight;
804 G4double extra_offset = (recessHeight +0.3*
mm + 0.5*americiumHeight);
805 G4double alphaVPosition = 0.5*LXeTubeHeight - alphaVOffset + extra_offset;
808 0.5*alphaHeight, 0.*
deg, 360.*
deg);
809 G4Tubs* recess_tube =
new G4Tubs(
"recess_tube", 0.*
cm, recessRadius,
810 0.5*recessHeight, 0.*
deg, 360.*
deg);
818 "alpha_phys", alpha_log, LXe_phys,
false, 0);
829 (
"Alpha", LXe_phys, alpha_phys, OpAlphaSurface);
832 G4double alpha_REFL[NUM] = { 0.05, 0.05 };
834 alpha_mt->
AddProperty(
"REFLECTIVITY", alpha_PP, alpha_REFL, NUM);
842 G4double americiumVOffset = 0.5*(alphaHeight-americiumHeight)-recessHeight;
843 G4double americiumVPosition = americiumVOffset;
845 sourceZ = vesselVPos + LXeVPos + alphaVPosition + americiumVPosition + PosZ;
846 G4cout <<
G4endl <<
"Calibration source centre (X,Y,Z): 0, 0, "
850 americiumRadius, 0.5*americiumHeight, 0.*
deg, 360.*
deg);
854 americiumVPosition),
"americium_phys", americium_log, alpha_phys,
false,0);
861 (
"Americium", LXe_phys, americium_phys, OpAmericiumSurface);
864 G4double americium_REFL[NUM] = { 0.7, 0.65 };
866 americium_mt->
AddProperty(
"REFLECTIVITY", americium_PP, americium_REFL, NUM);
880 G4double pmtVPosition = -0.5*(LXeTubeHeight+pmtHeight)+pmtVOffset;
884 G4Tubs* pmt_tube =
new G4Tubs(
"pmt_tube", 0.*
cm, pmtRadius, 0.5*pmtHeight,
889 -2.*pmtRadius*std::cos(30.0*
deg))));
893 "pmt_phys", pmt_log, LXe_phys,
false, 0);
899 (
"pmt_surf", LXe_phys, pmt_phys, pmt_opsurf);
909 G4double phcathVOffset = 0.5*pmtHeight-2.*pmtRadius*std::cos(30.0*
deg);
910 G4double phcathVPosition = phcathVOffset;
913 2.*pmtRadius-1.6*
mm, 2.*pmtRadius-1.59*
mm, 0.*
deg, 360.*
deg, 0.*
deg,
916 phcath_log =
new G4LogicalVolume(phcath_sol, phcath_mat,
"phcath_log");
918 "phcath_phys", phcath_log, pmt_phys,
false, 0);
924 (
"phcath_surf", pmt_phys, phcath_phys, phcath_opsurf);
927 G4double phcath_REFL[NUM] = { 0.0, 0.0};
929 phcath_mt->
AddProperty(
"REFLECTIVITY", phcath_PP, phcath_REFL, NUM);
942 G4cout << G4endl <<
"User Limits: " << G4endl
943 <<
"\t theMaxTimeCuts: " <<
G4BestUnit(theMaxTimeCuts,
"Time")
945 <<
"\t theRoomTimeCut: " <<
G4BestUnit(theRoomTimeCut,
"Time")
947 <<
"\t theMaxStepSize: " <<
G4BestUnit(theMaxStepSize,
"Length")
949 <<
"\t theMinEKine: " <<
G4BestUnit(theMinEkine,
"Energy")
951 <<
"\t minRoomMinEKine: " <<
G4BestUnit(theRoomMinEkine,
"Energy")
954 if (theUserLimitsForRoom != 0)
delete theUserLimitsForRoom;
955 if (theUserLimitsForDetector != 0)
delete theUserLimitsForDetector;
962 #include "DMXDetectorRoomLimits.icc"
964 theUserLimitsForDetector =
new G4UserLimits(theDetectorStepSize,
999 name=
"/DMXDet/pmtSD";
1014 theRoomMinEkine = val;
1015 if (theUserLimitsForRoom != 0)
1030 if (theUserLimitsForDetector != 0)
1044 theRoomTimeCut = val;
1045 if (theUserLimitsForRoom != 0)
1059 theMaxTimeCuts = val;
1060 if (theUserLimitsForDetector != 0)
CLHEP::Hep3Vector G4ThreeVector
CLHEP::HepRotation G4RotationMatrix
void SetVisibility(G4bool)
void SetUserLimits(G4UserLimits *pULimits)
virtual void SetUserMinEkine(G4double uekinMin)
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
void SetTimeCut(G4double)
void SetForceSolid(G4bool)
G4MaterialPropertyVector * AddProperty(const char *key, G4double *PhotonEnergies, G4double *PropertyValues, G4int NumEntries)
G4VPhysicalVolume * Construct()
G4GLOB_DLL std::ostream G4cout
DMXDetectorConstruction()
void SetRoomTimeCut(G4double)
~DMXDetectorConstruction()
void SetEnergyCut(G4double)
void AddNewDetector(G4VSensitiveDetector *aSD)
static G4SDManager * GetSDMpointer()
static const G4VisAttributes Invisible
void SetRoomEnergyCut(G4double)
void SetMaterialPropertiesTable(G4MaterialPropertiesTable *anMPT)
virtual void SetUserMaxTime(G4double utimeMax)
void SetVisAttributes(const G4VisAttributes *pVA)
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)