67{
68 G4cout << "\nPar01DetectorConstruction....\n" << G4endl;
69
70
71
73
74
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");
79
80
81
82
83
84
85
86 G4Box *WorldBox=
new G4Box(
"WorldBox",400*cm, 400*cm, 400*cm);
88 "WorldLogical", 0, 0, 0);
90 "WorldPhysical",
91 WorldLog,
92 0,false,0);
93
94 G4double detectSize = 125*cm;
95
96
97
98
99
100
101 G4Box *driftChamberBox
102 =
new G4Box(
"DriftChamberSolid", detectSize, detectSize, 40*cm);
105 "DriftChamberLogical", 0, 0, 0);
106
107
109 "DriftChamberPhysical",
110 driftChamberLog,
111 WorldPhys,false,0);
112
113
114
115
116
117
118 G4Box *calorimeterBox
119 =
new G4Box(
"CalorimeterSolid", detectSize, detectSize, 20*cm);
121 "CalorimeterLogical", 0, 0, 0);
122
124 "CalorimeterPhysical",
125 calorimeterLog,
126 WorldPhys,false,0);
127
128
129
130
131
132
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);
139
141
142
143
144 G4int copyNo=0;
145 G4double xTlate, yTlate;
148 for (G4int j = 0; j <
fnY; j++)
149 {
150 yTlate = -detectSize + 3*CrystalY + j*2*CrystalY;
151 for (G4int i = 0; i <
fnX; i++)
152 {
153 xTlate = -detectSize + 3*CrystalX + i*2*CrystalX;
155 tName1,
157 calorimeterPhys,false,copyNo++);
158 }
159 }
160
161
162
163
164
165
166
167
169 =
new G4Box(
"HadCaloSolid", detectSize, detectSize, 50*cm);
171 "HadCaloLogical", 0, 0, 0);
172
174 "HadCaloPhysical",
175 hadCaloLog,
176 WorldPhys,false,0);
177
178
179
180
181
182
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);
189
191
192
193 copyNo=0;
196 for (G4int jj = 0; jj <
fnYhad; jj++)
197 {
198 yTlate = -detectSize + 3*TowerY + jj*2*TowerY;
199 for (G4int i = 0; i <
fnXhad; i++)
200 {
201 xTlate = -detectSize + 3*TowerX + i*2*TowerX;
203 tName2,
205 hadCaloPhys,false,copyNo++);
206 }
207 }
208
209
210
211
212
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);
219
220
222 hadRegion->AddRootLogicalVolume(hadCaloLog);
223 cuts.clear();
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);
227
228
229 WorldLog->SetVisAttributes(G4VisAttributes::GetInvisible());
230
231 auto driftchamberTubeVisAtt
233 driftchamberTubeVisAtt->SetForceWireframe(true);
234 driftChamberLog->SetVisAttributes(driftchamberTubeVisAtt);
235
236 auto calorimeterBoxVisAtt
238 calorimeterBoxVisAtt->SetForceWireframe(true);
239 calorimeterLog->SetVisAttributes(calorimeterBoxVisAtt);
240
241 auto crystalVisAtt
243 crystalVisAtt->SetForceWireframe(true);
245
246 auto hadCaloBoxVisAtt
248 hadCaloBoxVisAtt->SetForceWireframe(true);
249 hadCaloLog->SetVisAttributes(hadCaloBoxVisAtt);
250
251 auto towerVisAtt
253 towerVisAtt->SetForceWireframe(true);
254 fTowerLog->SetVisAttributes(towerVisAtt);
255
256
257
258
259
260
261
262
263 return WorldPhys;
264}
G4LogicalVolume * fTowerLog
G4LogicalVolume * fCrystalLog