68 G4cout <<
"\nPar01DetectorConstruction....\n" << G4endl;
75 G4Material* air = nistManager->FindOrBuildMaterial(
"G4_AIR");
76 G4Material* csi = nistManager->FindOrBuildMaterial(
"G4_CESIUM_IODIDE");
77 G4Material* helium = nistManager->FindOrBuildMaterial(
"G4_He");
78 G4Material* iron = nistManager->FindOrBuildMaterial(
"G4_Fe");
86 G4Box *WorldBox=
new G4Box(
"WorldBox",400*cm, 400*cm, 400*cm);
88 "WorldLogical", 0, 0, 0);
94 G4double detectSize = 125*cm;
101 G4Box *driftChamberBox
102 =
new G4Box(
"DriftChamberSolid", detectSize, detectSize, 40*cm);
105 "DriftChamberLogical", 0, 0, 0);
109 "DriftChamberPhysical",
118 G4Box *calorimeterBox
119 =
new G4Box(
"CalorimeterSolid", detectSize, detectSize, 20*cm);
121 "CalorimeterLogical", 0, 0, 0);
124 "CalorimeterPhysical",
133 G4double CrystalX = 2.5*cm;
134 G4double CrystalY = CrystalX;
135 G4double CrystalZ = 20*cm;
136 G4Box *CrystalSolid =
new G4Box(
"CrystalSolid", CrystalX, CrystalY, CrystalZ);
138 "CrystalLogical", 0, 0, 0);
145 G4double xTlate, yTlate;
148 for (G4int j = 0; j <
fnY; j++)
150 yTlate = -detectSize + 3*CrystalY + j*2*CrystalY;
151 for (G4int i = 0; i <
fnX; i++)
153 xTlate = -detectSize + 3*CrystalX + i*2*CrystalX;
157 calorimeterPhys,
false,copyNo++);
169 =
new G4Box(
"HadCaloSolid", detectSize, detectSize, 50*cm);
171 "HadCaloLogical", 0, 0, 0);
183 G4double TowerX = 5*cm;
184 G4double TowerY = TowerX;
185 G4double TowerZ = 45*cm;
186 G4Box *TowerSolid =
new G4Box(
"TowerSolid", TowerX, TowerY, TowerZ);
188 "TowerLogical", 0, 0, 0);
196 for (G4int jj = 0; jj <
fnYhad; jj++)
198 yTlate = -detectSize + 3*TowerY + jj*2*TowerY;
199 for (G4int i = 0; i <
fnXhad; i++)
201 xTlate = -detectSize + 3*TowerX + i*2*TowerX;
205 hadCaloPhys,
false,copyNo++);
214 caloRegion->AddRootLogicalVolume(calorimeterLog);
215 std::vector<double> cuts;
216 cuts.push_back(1.0*mm);cuts.push_back(1.0*mm);cuts.push_back(1.0*mm);cuts.push_back(1.0*mm);
218 caloRegion->GetProductionCuts()->SetProductionCuts(cuts);
222 hadRegion->AddRootLogicalVolume(hadCaloLog);
224 cuts.push_back(1.0*cm);cuts.push_back(1.0*cm);cuts.push_back(1.0*cm);cuts.push_back(1.0*cm);
226 hadRegion->GetProductionCuts()->SetProductionCuts(cuts);
229 WorldLog->SetVisAttributes(G4VisAttributes::GetInvisible());
231 auto driftchamberTubeVisAtt
233 driftchamberTubeVisAtt->SetForceWireframe(
true);
234 driftChamberLog->SetVisAttributes(driftchamberTubeVisAtt);
236 auto calorimeterBoxVisAtt
238 calorimeterBoxVisAtt->SetForceWireframe(
true);
239 calorimeterLog->SetVisAttributes(calorimeterBoxVisAtt);
243 crystalVisAtt->SetForceWireframe(
true);
246 auto hadCaloBoxVisAtt
248 hadCaloBoxVisAtt->SetForceWireframe(
true);
249 hadCaloLog->SetVisAttributes(hadCaloBoxVisAtt);
253 towerVisAtt->SetForceWireframe(
true);
254 fTowerLog->SetVisAttributes(towerVisAtt);