70 GammaRayTelDetectorConstruction::fMagFieldMessenger = 0;
75 :solidWorld(0),logicWorld(0),physiWorld(0),
76 solidPayload(0),logicPayload(0),physiPayload(0),
77 solidTKR(0),logicTKR(0),physiTKR(0),
78 solidCAL(0),logicCAL(0),physiCAL(0),
79 solidACT(0),logicACT(0),physiACT(0),
80 solidACL1(0),logicACL1(0),physiACL1(0),
81 solidACL2(0),logicACL2(0),physiACL2(0),
82 solidTKRDetectorX(0),logicTKRDetectorX(0),physiTKRDetectorX(0),
83 solidTKRDetectorY(0),logicTKRDetectorY(0),physiTKRDetectorY(0),
84 solidCALLayerX(0),logicCALLayerX(0),physiCALLayerX(0),
85 solidCALLayerY(0),logicCALLayerY(0),physiCALLayerY(0),
86 solidCALDetectorX(0),logicCALDetectorX(0),physiCALDetectorX(0),
87 solidCALDetectorY(0),logicCALDetectorY(0),physiCALDetectorY(0),
88 solidPlane(0),logicPlane(0),physiPlane(0),
89 solidConverter(0),logicConverter(0),physiConverter(0),
90 logicTKRStripX(0),logicTKRStripY(0)
97 TKRSiliconTileXY = 9.*
cm;
99 TKRLayerDistance = 3.*
cm;
100 SiliconGuardRing = 1.5*
mm;
101 TKRViewsDistance = 1.*
mm;
104 CALBarThickness = 1.5*
cm;
107 ACDThickness = 1.*
cm;
109 NbOfACDLateralTiles = 2;
112 ACDTKRDistance = 5.*
cm;
113 CALTKRDistance = 1.5*
cm;
117 calorimeterSD.
Put(0);
118 anticoincidenceSD.
Put(0);
120 ComputePayloadParameters();
130 {
delete detectorMessenger;}
137 return ConstructPayload();
142 void GammaRayTelDetectorConstruction::DefineMaterials()
148 G4int ncomponents, natoms;
190 density = 19.3*
g/
cm3;
199 density = 1.032*
g/
cm3;
204 density = 4.53*
g/
cm3;
213 density = 1.290*
mg/
cm3;
218 density = 2.700*
g/
cm3;
222 density = 2.333*
g/
cm3;
226 density = 7.87*
g/
cm3;
230 density = 11.35*
g/
cm3;
240 temperature = 2.73*
kelvin;
243 density = 1.e-5*
g/
cm3;
244 pressure = 2.e-2*
bar;
254 ConverterMaterial = W;
255 defaultMaterial = vacuum;
267 ComputePayloadParameters();
273 solidWorld =
new G4Box(
"World",
274 WorldSizeXY/2,WorldSizeXY/2,WorldSizeZ/2);
306 solidPayload =
new G4Box(
"Payload",
326 solidCAL =
new G4Box(
"CAL",
327 CALSizeXY/2,CALSizeXY/2,CALSizeZ/2);
334 -PayloadSizeZ/2+CALSizeZ/2),
344 solidTKR =
new G4Box(
"TKR",
345 TKRSizeXY/2,TKRSizeXY/2,TKRSizeZ/2);
352 -PayloadSizeZ/2+CALSizeZ+
353 CALTKRDistance+TKRSizeZ/2),
365 solidACT =
new G4Box(
"ACT",
366 ACTSizeXY/2,ACTSizeXY/2,ACTSizeZ/2);
372 -PayloadSizeZ/2+CALSizeZ+
373 CALTKRDistance+TKRSizeZ+
374 ACDTKRDistance+ACTSizeZ/2),
385 solidACL1 =
new G4Box(
"ACL1",
386 ACL1SizeX/2,ACL1SizeY/2,ACL1SizeZ/2);
392 -PayloadSizeXY/2+ACL1SizeY/2,
393 -PayloadSizeZ/2+ACL1SizeZ/2),
402 PayloadSizeXY/2-ACL1SizeY/2,
403 -PayloadSizeZ/2+ACL1SizeZ/2),
410 solidACL2 =
new G4Box(
"ACL2",
411 ACL2SizeX/2,ACL2SizeY/2,ACL2SizeZ/2);
420 PayloadSizeXY/2-ACL2SizeY/2,
421 -PayloadSizeZ/2+ACL2SizeZ/2),
430 -PayloadSizeXY/2+ACL2SizeY/2,
431 -PayloadSizeZ/2+ACL2SizeZ/2),
441 solidPlane =
new G4Box(
"Plane",
442 TKRSizeXY/2,TKRSizeXY/2,TKRSupportThickness/2);
448 solidTKRDetectorY =
new G4Box
449 (
"TKRDetectorY",TKRSizeXY/2,TKRSizeXY/2,TKRSiliconThickness/2);
456 solidTKRDetectorX =
new G4Box
457 (
"TKRDetectorX",TKRSizeXY/2,TKRSizeXY/2,TKRSiliconThickness/2);
464 solidConverter =
new G4Box
465 (
"Converter",TKRSizeXY/2,TKRSizeXY/2,ConverterThickness/2);
473 for (i = 0; i < NbOfTKRLayers; i++)
478 +TKRSiliconThickness/2
479 +(i)*TKRLayerDistance),
489 TKRSiliconThickness/2 +
492 (i)*TKRLayerDistance),
503 2*TKRSiliconThickness +
505 ConverterThickness/2+
506 (i)*TKRLayerDistance),
518 2*TKRSiliconThickness +
521 TKRSupportThickness/2+
522 (i)*TKRLayerDistance),
533 G4VSolid * solidTKRActiveTileX =
new
534 G4Box(
"Active Tile X", TKRActiveTileXY/2,
535 TKRActiveTileXY/2,TKRActiveTileZ/2);
538 G4VSolid * solidTKRActiveTileY =
new
539 G4Box(
"Active Tile Y", TKRActiveTileXY/2,
540 TKRActiveTileXY/2,TKRActiveTileZ/2);
545 "Active Tile X",0,0,0);
550 "Active Tile Y",0,0,0);
562 for (i=0;i< NbOfTKRTiles; i++)
564 for (j=0;j< NbOfTKRTiles; j++)
566 k = i*NbOfTKRTiles + j;
569 x = -TKRSizeXY/2+TilesSeparation+SiliconGuardRing+
570 TKRActiveTileXY/2+(i)*((2*SiliconGuardRing)+
571 TilesSeparation+TKRActiveTileXY);
572 y = -TKRSizeXY/2+TilesSeparation+SiliconGuardRing+
573 TKRActiveTileXY/2+(j)*((2*SiliconGuardRing)+TilesSeparation+
586 x = -TKRSizeXY/2+TilesSeparation+SiliconGuardRing+
587 TKRActiveTileXY/2+(j)*((2*SiliconGuardRing)+
588 TilesSeparation+TKRActiveTileXY);
589 y = -TKRSizeXY/2+TilesSeparation+SiliconGuardRing+
590 TKRActiveTileXY/2+(i)*((2*SiliconGuardRing)+
591 TilesSeparation+TKRActiveTileXY);
617 TKRXStripX = TKRYStripY = TKRSiliconPitch;
618 TKRYStripX = TKRXStripY = TKRActiveTileXY;
619 TKRZStrip = TKRSiliconThickness;
623 TKRXStripX/2,TKRYStripX/2,
631 TKRXStripY/2,TKRYStripY/2,
639 for (i=0;i< NbOfTKRStrips; i++)
643 (i)*TKRSiliconPitch, 0., 0.),
654 (i)*TKRSiliconPitch, 0.),
672 solidCALLayerX =
new G4Box(
"CALLayerX",
673 CALSizeXY/2,CALSizeXY/2,CALBarThickness/2);
679 solidCALLayerY =
new G4Box(
"CALLayerY",
680 CALSizeXY/2,CALSizeXY/2,CALBarThickness/2);
686 for (i = 0; i < NbOfCALLayers; i++)
693 (i)*2*CALBarThickness),
705 (i)*2*CALBarThickness),
716 solidCALDetectorX =
new G4Box(
"CALDetectorX",
717 CALBarX/2,CALBarY/2,CALBarThickness/2);
723 solidCALDetectorY =
new G4Box(
"CALDetectorY",
724 CALBarY/2,CALBarX/2,CALBarThickness/2);
730 for (i = 0; i < NbOfCALBars; i++)
832 if(trackerSD.
Get()==0)
849 if(calorimeterSD.
Get()==0)
852 calorimeterSD.
Put(SD);
855 if (logicCALDetectorX)
857 if (logicCALDetectorY)
864 if(anticoincidenceSD.
Get()==0)
867 (
"AnticoincidenceSD");
868 anticoincidenceSD.
Put(SD);
894 G4cout <<
"\n------------------------------------------------------------"
895 <<
"\n---> The Tracker is " << NbOfTKRLayers <<
" layers of: "
896 << ConverterThickness/
mm <<
"mm of " << ConverterMaterial->
GetName()
897 <<
"\n------------------------------------------------------------\n";
911 ConverterMaterial = pttoMaterial;
919 ConverterThickness = val;
926 TKRSiliconThickness = val;
932 TKRSiliconPitch = val;
938 TKRSiliconTileXY = val;
955 TKRLayerDistance = val;
960 TKRViewsDistance = val;
978 CALBarThickness = val;
995 std::stringstream
sss;
996 sss <<
"/globalField/setValue 0 0 " << fieldValue/
tesla <<
" tesla";
static constexpr double tesla
void SetVerboseLevel(G4int verboseLevel)
void SetNbOfCALLayers(G4int)
~GammaRayTelDetectorConstruction()
static constexpr double mm
void UpdateMaterialList(G4VPhysicalVolume *currentWorld=0)
void SetNbOfTKRLayers(G4int)
static constexpr double mg
CLHEP::Hep3Vector G4ThreeVector
void SetCALBarThickness(G4double)
void SetTKRSiliconThickness(G4double)
void AddMaterial(G4Material *material, G4double fraction)
std::vector< ExP01TrackerHit * > a
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
int universe_mean_density
const G4String & GetName() const
static G4MaterialTable * GetMaterialTable()
void SetTKRViewsDistance(G4double)
void SetTKRSiliconPitch(G4double)
void SetNbOfCALBars(G4int)
void ConstructSDandField()
void SetForceSolid(G4bool=true)
virtual void DefineWorldVolume(G4VPhysicalVolume *worldVol, G4bool topologyIsChanged=true)
static G4UImanager * GetUIpointer()
void SetConverterMaterial(G4String)
static G4RegionStore * GetInstance()
G4GLOB_DLL std::ostream G4cout
void SetTKRLayerDistance(G4double)
void PhysicsHasBeenModified()
void SetVisibility(G4bool=true)
static constexpr double cm
void PrintPayloadParameters()
void SetNbOfTKRTiles(G4int)
GammaRayTelDetectorConstruction()
static constexpr double kelvin
void SetTKRTileSizeXY(G4double)
static constexpr double cm3
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
void AddNewDetector(G4VSensitiveDetector *aSD)
static G4RunManager * GetRunManager()
static const char sss[MAX_N_PAR+2]
static G4SDManager * GetSDMpointer()
void SetMagField(G4double)
void AddElement(G4Element *element, G4int nAtoms)
G4VPhysicalVolume * Construct()
static constexpr double bar
void SetMaterial(G4Material *pMaterial)
void Put(const value_type &val) const
static constexpr double micrometer
static constexpr double mole
static const G4VisAttributes & GetInvisible()
void SetForceWireframe(G4bool=true)
void SetVisAttributes(const G4VisAttributes *pVA)
void SetConverterThickness(G4double)
void SetACDThickness(G4double)
G4int ApplyCommand(const char *aCommand)