68 #include "FCALTestbeamSetupParameters.input"
80 G4cout <<
"Constructing materials...";
88 G4Box * SolidMother =
new G4Box(
"Mother",MotherSizeX,MotherSizeY,MotherSizeZ);
100 G4Box * SolidScintS1andS3 =
101 new G4Box(
"ScintS1andS3Solid",ScintS1andS3SizeX, ScintS1andS3SizeY, ScintS1andS3SizeZ);
102 G4Box * SolidScintS2 =
103 new G4Box(
"ScintS2Solid", ScintS2SizeX, ScintS2SizeY, ScintS2SizeZ);
107 "ScintS1andS3Logical");
114 "ScintS1Physical",LogicalScintS1andS3,PhysicalMother,0,0);
116 new G4PVPlacement(0,
G4ThreeVector(ScintS1_S3PosX, ScintS1_S3PosY, ScintS3PosZ),
117 "ScintS3Physical",LogicalScintS1andS3,PhysicalMother,0,0);
119 new G4PVPlacement(0,
G4ThreeVector(ScintS1_S3PosX, ScintS1_S3PosY, ScintS2PosZ),
120 "ScintS2Physical", LogicalScintS2, PhysicalMother,0,0);
124 LogicalScintS2->SetVisAttributes(ColorOfScintillator);
130 G4Box* SolidMWPC =
new G4Box(
"MWPCSolid",MWPCSizeX,MWPCSizeY,MWPCSizeZ);
136 new G4PVPlacement(0,
G4ThreeVector(MWPCPosX,MWPCPosY,MWPCPosZ[i]),
137 "MWPCPhysical", LogicalMWPC, PhysicalMother,0,i+1);
146 G4Box * SolidHoleCntrScint =
147 new G4Box(
"ScintSolid", HoleCntrSizeX, HoleCntrSizeY, HoleCntrScintSizeZ);
150 "HoleCntrScintLogical");
153 new G4Tubs(
"HoleSolid", ScintHoleRmin, ScintHoleRmax, ScintHoleLenght,
154 HoleStartPhi, HoleDPhi);
158 new G4PVPlacement(0,
G4ThreeVector(HolePosX, HolePosY, HolePosZ), LogicalHole,
159 "HolePhysicalScint", LogicalHoleCntrScint, 0, 0);
163 G4ThreeVector(HoleCntrScintPosX, HoleCntrScintPosY, HoleCntrScintPosZ),
164 "HoleCntrScintPhysical", LogicalHoleCntrScint, PhysicalMother, 0, 0);
167 G4Box * SolidHoleCntrAbsrb =
168 new G4Box(
"AbsrbSolid", HoleCntrSizeX, HoleCntrSizeY, HoleCntrAbsrbSizeZ);
171 "HoleCntrPbLoghical");
175 new G4Tubs(
"HoleSolidAbs", AbsrbHoleRmin, AbsrbHoleRmax, AbsrbHoleLenght,
176 HoleStartPhi, HoleDPhi);
180 new G4PVPlacement(0,
G4ThreeVector(HolePosX, HolePosY, HolePosZ), LogicalHoleAbs,
181 "HolePbPhysical", LogicalHoleCntrPb, 0, 0);
185 new G4PVPlacement(0,
G4ThreeVector(HoleCntrPbPosX, HoleCntrPbPosY, HoleCntrPbPosZ),
186 "HoleCntrPbPhysical", LogicalHoleCntrPb, PhysicalMother, 0, 0);
191 "HoleCntrAlLogical");
193 new G4PVPlacement(0,
G4ThreeVector(HolePosX, HolePosY, HolePosZ), LogicalHoleAbs,
194 "HoleAlPhysical", LogicalHoleCntrAl, 0, 0);
196 new G4PVPlacement(0,
G4ThreeVector(HoleCntrAlPosX, HoleCntrAlPosY, HoleCntrAlPosZ),
197 "HoleCntrAlPhysical", LogicalHoleCntrAl, PhysicalMother, 0, 0);
214 G4Box * SolidLeadWall =
215 new G4Box(
"LeadWallSolid", LeadWallSizeX, LeadWallSizeY, LeadWallSizeZ);
220 G4Box * SolidSlitPb =
new G4Box(
"SlitPb", LeadWallSlitSizeX, LeadWallSlitSizeY,
225 new G4PVPlacement(0,
G4ThreeVector(), LogicalSlitPb,
"SlitPbPhysical", LogicalLeadWall, 0, 0);
228 new G4PVPlacement(0,
G4ThreeVector(LeadWallPosX,LeadWallPosY,LeadWallPosZ),
229 "LeadWallPhysical", LogicalLeadWall, PhysicalMother, 0, 0);
238 G4Box * SolidIronWall =
239 new G4Box(
"IronWallSolid", IronWallSizeX, IronWallSizeY, IronWallSizeZ);
244 G4Box * SolidSlitFe =
new G4Box(
"SlitFe", IronWallSlitSizeX, IronWallSlitSizeY,
249 new G4PVPlacement(0,
G4ThreeVector(), LogicalSlitFe,
"SlitFePhysical", LogicalIronWall, 0, 0);
252 new G4PVPlacement(0,
G4ThreeVector(IronWallPosX,IronWallPosY,IronWallPosZ),
253 "IronWallPhysical", LogicalIronWall, PhysicalMother, 0, 0);
262 G4Box * SolidBigScint =
263 new G4Box(
"BigSolidScint",BigScintSizeX, BigScintSizeY, ScintSizeZ);
268 G4Box * SolidSmallScint =
269 new G4Box(
"SmallSolidScint",SmallScintSizeX, SmallScintSizeY, ScintSizeZ);
272 "SmallScintLogical");
274 for( i=0; i<(NBigScint+NSmallScint); i++)
278 new G4PVPlacement(0,
G4ThreeVector(ScintPosX, ScintPosY, ScintPosZ[i]),
279 "BigScintPhysical", LogicalBigScint, PhysicalMother,
284 new G4PVPlacement(0,
G4ThreeVector(ScintPosX, ScintPosY, ScintPosZ[i]),
285 "SmallScintPhysical", LogicalSmallScint, PhysicalMother,
293 G4Box * SolidBigIron =
294 new G4Box(
"BigSolidIron",BigIronSizeX, BigIronSizeY, IronSizeZ);
299 G4Box * SolidSmallIron =
300 new G4Box(
"SmallSolidIron",SmallIronSizeX, SmallIronSizeY, IronSizeZ);
305 for( i=0; i<(NBigIron+NSmallIron); i++)
309 new G4PVPlacement(0,
G4ThreeVector(IronPosX, IronPosY, IronPosZ[i]),
310 "BigIronPhysical", LogicalBigIron, PhysicalMother,
315 new G4PVPlacement(0,
G4ThreeVector(IronPosX, IronPosY, IronPosZ[i]),
316 "SmallIronPhysical", LogicalSmallIron, PhysicalMother,
326 G4Box * SolidConcWall =
327 new G4Box(
"ConcWallSolid", ConcWallSizeX, ConcWallSizeY, ConcWallSizeZ);
332 new G4PVPlacement(0,
G4ThreeVector(ConcWallPosX, ConcWallPosY, ConcWallAPosZ),
333 "ConcWallAPhysical", LogicalConcWallA, PhysicalMother, 0, 0);
339 new G4PVPlacement(0,
G4ThreeVector(ConcWallPosX, ConcWallPosY, ConcWallBPosZ),
340 "ConcWallBPhysical", LogicalConcWallB, PhysicalMother, 0, 0);
342 G4Box * SolidConcWallIns =
343 new G4Box(
"ConcWallInsSolid", ConcWallInsSizeX,ConcWallInsSizeY,ConcWallInsSizeZ);
346 "LogicalConcWallIns");
348 new G4PVPlacement(0,
G4ThreeVector(),
"ConcWallInsPhysical", LogicalConcWallIns, PhysicalConcWallA, 0, 0);
358 G4Box * SolidMuContr =
359 new G4Box(
"MuContrSolid", MuCntrSIzeX, MuCntrSIzeY, MuCntrSIzeZ);
364 new G4PVPlacement(0,
G4ThreeVector(MuCntrPosX, MuCntrPosY, MuCntrPosZ),
365 "MuContrPhyiscal", LogicalMuContr, PhysicalMother, 0, 0);
395 new G4PVPlacement(CryostatRotationMatrix,
396 G4ThreeVector(CryostatPosX,CryostatPosY,CryostatPosZ),
"CryostatVolumes"
397 , theCryostatVolumes, PhysicalMother, 0,0);
400 return PhysicalMother;
410 const G4String detName =
"FCALTB/TBSetupSD";
static FCALMaterialConsultant * GetInstance()
CLHEP::Hep3Vector G4ThreeVector
HepRotation & rotateX(double delta)
CLHEP::HepRotation G4RotationMatrix
G4VPhysicalVolume * Construct()
G4LogicalVolume * Construct()
G4Material * Material(G4String)
G4GLOB_DLL std::ostream G4cout
G4VSensitiveDetector * FindSensitiveDetector(G4String dName, G4bool warning=true)
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
void AddNewDetector(G4VSensitiveDetector *aSD)
static G4SDManager * GetSDMpointer()
void ConstructSDandField()
static constexpr double deg
static const G4VisAttributes & GetInvisible()
void SetVisAttributes(const G4VisAttributes *pVA)