124 G4Material* air = G4Material::GetMaterial(
"G4_AIR");
126 G4Material* argonGas = G4Material::GetMaterial(
"G4_Ar");
127 G4Material* scintillator =
128 G4Material::GetMaterial(
"G4_PLASTIC_SC_VINYLTOLUENE");
129 G4Material* csI = G4Material::GetMaterial(
"G4_CESIUM_IODIDE");
130 G4Material* lead = G4Material::GetMaterial(
"G4_Pb");
134 G4bool checkOverlaps =
true;
138 G4VSolid* worldSolid =
new G4Box(
"worldBox", 10. * m, 3. * m, 10. * m);
139 G4LogicalVolume* worldLogical =
140 new G4LogicalVolume(worldSolid, air,
"worldLogical", 0, 0, 0);
141 G4VPhysicalVolume* worldPhysical =
new G4PVPlacement(0, G4ThreeVector(),
142 worldLogical,
"worldPhysical", 0,
false, 0, checkOverlaps);
146 G4VSolid* magneticSolid =
147 new G4Tubs(
"magneticTubs", 0., 1. * m, 1. * m, 0., 360. * deg);
149 fMagneticLogical =
new G4LogicalVolume(magneticSolid, air,
"magneticLogical");
153 G4RotationMatrix* fieldRot =
new G4RotationMatrix();
154 fieldRot->rotateX(90. * deg);
156 "magneticPhysical", worldLogical,
false, 0, checkOverlaps);
159 G4UserLimits* userLimits =
new G4UserLimits(5.0 * cm);
163 G4VSolid* firstArmSolid =
new G4Box(
"firstArmBox", 1.5 * m, 1. * m, 3. * m);
164 G4LogicalVolume* firstArmLogical =
165 new G4LogicalVolume(firstArmSolid, air,
"firstArmLogical", 0, 0, 0);
166 new G4PVPlacement(0, G4ThreeVector(0., 0., -5. * m), firstArmLogical,
167 "firstArmPhysical", worldLogical,
false, 0, checkOverlaps);
170 G4VSolid* secondArmSolid =
new G4Box(
"secondArmBox", 2. * m, 2. * m, 3.5 * m);
171 G4LogicalVolume* secondArmLogical =
172 new G4LogicalVolume(secondArmSolid, air,
"secondArmLogical", 0, 0, 0);
173 G4double x = -5. * m * std::sin(
fArmAngle);
174 G4double z = 5. * m * std::cos(
fArmAngle);
176 secondArmLogical,
"fSecondArmPhys", worldLogical,
false, 0, checkOverlaps);
179 G4VSolid* hodoscope1Solid =
180 new G4Box(
"hodoscope1Box", 5. * cm, 20. * cm, 0.5 * cm);
181 G4LogicalVolume* hodoscope1Logical =
new G4LogicalVolume(
182 hodoscope1Solid, scintillator,
"hodoscope1Logical", 0, 0, 0);
183 for (G4int i = 0; i < 15; i++) {
184 G4double x1 = (i - 7) * 10. * cm;
185 new G4PVPlacement(0, G4ThreeVector(x1, 0., -1.5 * m), hodoscope1Logical,
186 "hodoscope1Physical", firstArmLogical,
false, i, checkOverlaps);
190 G4VSolid* chamber1Solid =
new G4Box(
"chamber1Box", 1. * m, 30. * cm, 1. * cm);
191 G4LogicalVolume* chamber1Logical =
192 new G4LogicalVolume(chamber1Solid, argonGas,
"chamber1Logical", 0, 0, 0);
193 for (G4int i = 0; i < 5; i++) {
194 G4double z1 = (i - 2) * 0.5 * m;
195 new G4PVPlacement(0, G4ThreeVector(0., 0., z1), chamber1Logical,
196 "chamber1Physical", firstArmLogical,
false, i, checkOverlaps);
200 G4VSolid* wirePlane1Solid =
201 new G4Box(
"wirePlane1Box", 1. * m, 30. * cm, 0.1 * mm);
202 G4LogicalVolume* wirePlane1Logical =
new G4LogicalVolume(
203 wirePlane1Solid, argonGas,
"wirePlane1Logical", 0, 0, 0);
204 new G4PVPlacement(0, G4ThreeVector(0., 0., 0.), wirePlane1Logical,
205 "wirePlane1Physical", chamber1Logical,
false, 0, checkOverlaps);
208 G4VSolid* hodoscope2Solid =
209 new G4Box(
"hodoscope2Box", 5. * cm, 20. * cm, 0.5 * cm);
210 G4LogicalVolume* hodoscope2Logical =
new G4LogicalVolume(
211 hodoscope2Solid, scintillator,
"hodoscope2Logical", 0, 0, 0);
212 for (G4int i = 0; i < 25; i++) {
213 G4double x2 = (i - 12) * 10. * cm;
214 new G4PVPlacement(0, G4ThreeVector(x2, 0., 0.), hodoscope2Logical,
215 "hodoscope2Physical", secondArmLogical,
false, 0, checkOverlaps);
219 G4VSolid* chamber2Solid =
220 new G4Box(
"chamber2Box", 1.5 * m, 30. * cm, 1. * cm);
221 G4LogicalVolume* chamber2Logical =
222 new G4LogicalVolume(chamber2Solid, argonGas,
"chamber2Logical", 0, 0, 0);
223 for (G4int i = 0; i < 5; i++) {
224 G4double z2 = (i - 2) * 0.5 * m - 1.5 * m;
225 new G4PVPlacement(0, G4ThreeVector(0., 0., z2), chamber2Logical,
226 "chamber2Physical", secondArmLogical,
false, i, checkOverlaps);
230 G4VSolid* wirePlane2Solid =
231 new G4Box(
"wirePlane2Box", 1.5 * m, 30. * cm, 0.1 * mm);
232 G4LogicalVolume* wirePlane2Logical =
new G4LogicalVolume(
233 wirePlane2Solid, argonGas,
"wirePlane2Logical", 0, 0, 0);
234 new G4PVPlacement(0, G4ThreeVector(0., 0., 0.), wirePlane2Logical,
235 "wirePlane2Physical", chamber2Logical,
false, 0, checkOverlaps);
238 G4VSolid* EMcalorimeterSolid =
239 new G4Box(
"EMcalorimeterBox", 1.5 * m, 30. * cm, 15. * cm);
240 G4LogicalVolume* EMcalorimeterLogical =
new G4LogicalVolume(
241 EMcalorimeterSolid, csI,
"EMcalorimeterLogical", 0, 0, 0);
242 new G4PVPlacement(0, G4ThreeVector(0., 0., 2. * m), EMcalorimeterLogical,
243 "EMcalorimeterPhysical", secondArmLogical,
false, 0, checkOverlaps);
255 G4VSolid* EmCalColumnSolid =
256 new G4Box(
"EmCalColumnBox", 7.5 * cm, 30. * cm, 15. * cm);
257 G4LogicalVolume* EmCalColumnLogical =
258 new G4LogicalVolume(EmCalColumnSolid, csI,
"EmCalColumnLogical", 0, 0, 0);
259 new G4PVReplica(
"EmCalColumnPhysical", EmCalColumnLogical,
260 EMcalorimeterLogical, kXAxis, 20, 15. * cm);
263 G4VSolid* cellSolid =
new G4Box(
"cellBox", 7.5 * cm, 7.5 * cm, 15. * cm);
264 G4LogicalVolume* cellLogical =
265 new G4LogicalVolume(cellSolid, csI,
"cellLogical", 0, 0, 0);
267 "cellPhysical", cellLogical, EmCalColumnLogical, kYAxis, 4, 15. * cm);
270 G4VSolid* HadCalorimeterSolid =
271 new G4Box(
"HadCalorimeterBox", 1.5 * m, 30. * cm, 50. * cm);
272 G4LogicalVolume* HadCalorimeterLogical =
new G4LogicalVolume(
273 HadCalorimeterSolid, lead,
"HadCalorimeterLogical", 0, 0, 0);
274 new G4PVPlacement(0, G4ThreeVector(0., 0., 3. * m), HadCalorimeterLogical,
275 "HadCalorimeterPhysical", secondArmLogical,
false, 0, checkOverlaps);
278 G4VSolid* HadCalColumnSolid =
279 new G4Box(
"HadCalColumnBox", 15. * cm, 30. * cm, 50. * cm);
280 G4LogicalVolume* HadCalColumnLogical =
new G4LogicalVolume(
281 HadCalColumnSolid, lead,
"HadCalColumnLogical", 0, 0, 0);
282 new G4PVReplica(
"HadCalColumnPhysical", HadCalColumnLogical,
283 HadCalorimeterLogical, kXAxis, 10, 30. * cm);
286 G4VSolid* HadCalCellSolid =
287 new G4Box(
"HadCalCellBox", 15. * cm, 15. * cm, 50. * cm);
288 G4LogicalVolume* HadCalCellLogical =
289 new G4LogicalVolume(HadCalCellSolid, lead,
"HadCalCellLogical", 0, 0, 0);
290 new G4PVReplica(
"HadCalCellPhysical", HadCalCellLogical, HadCalColumnLogical,
291 kYAxis, 2, 30. * cm);
294 G4VSolid* HadCalLayerSolid =
295 new G4Box(
"HadCalLayerBox", 15. * cm, 15. * cm, 2.5 * cm);
296 G4LogicalVolume* HadCalLayerLogical =
297 new G4LogicalVolume(HadCalLayerSolid, lead,
"HadCalLayerLogical", 0, 0, 0);
298 new G4PVReplica(
"HadCalLayerPhysical", HadCalLayerLogical, HadCalCellLogical,
299 kZAxis, 20, 5. * cm);
302 G4VSolid* HadCalScintiSolid =
303 new G4Box(
"HadCalScintiBox", 15. * cm, 15. * cm, 0.5 * cm);
304 G4LogicalVolume* HadCalScintiLogical =
new G4LogicalVolume(
305 HadCalScintiSolid, scintillator,
"HadCalScintiLogical", 0, 0, 0);
306 new G4PVPlacement(0, G4ThreeVector(0., 0., 2. * cm), HadCalScintiLogical,
307 "HadCalScintiPhysical", HadCalLayerLogical,
false, 0, checkOverlaps);
311 G4VisAttributes* visAttributes =
new G4VisAttributes(G4Colour(1.0, 1.0, 1.0));
312 visAttributes->SetVisibility(
false);
313 worldLogical->SetVisAttributes(visAttributes);
316 visAttributes =
new G4VisAttributes(G4Colour(0.9, 0.9, 0.9));
320 visAttributes =
new G4VisAttributes(G4Colour(1.0, 1.0, 1.0));
321 visAttributes->SetVisibility(
false);
322 firstArmLogical->SetVisAttributes(visAttributes);
323 secondArmLogical->SetVisAttributes(visAttributes);
326 visAttributes =
new G4VisAttributes(G4Colour(0.8888, 0.0, 0.0));
327 hodoscope1Logical->SetVisAttributes(visAttributes);
328 hodoscope2Logical->SetVisAttributes(visAttributes);
331 visAttributes =
new G4VisAttributes(G4Colour(0.0, 1.0, 0.0));
332 chamber1Logical->SetVisAttributes(visAttributes);
333 chamber2Logical->SetVisAttributes(visAttributes);
336 visAttributes =
new G4VisAttributes(G4Colour(0.0, 0.8888, 0.0));
337 visAttributes->SetVisibility(
false);
338 wirePlane1Logical->SetVisAttributes(visAttributes);
339 wirePlane2Logical->SetVisAttributes(visAttributes);
342 visAttributes =
new G4VisAttributes(G4Colour(0.8888, 0.8888, 0.0));
343 visAttributes->SetVisibility(
false);
344 EMcalorimeterLogical->SetVisAttributes(visAttributes);
347 visAttributes =
new G4VisAttributes(G4Colour(0.9, 0.9, 0.0));
348 cellLogical->SetVisAttributes(visAttributes);
351 visAttributes =
new G4VisAttributes(G4Colour(0.0, 0.0, 0.9));
352 HadCalorimeterLogical->SetVisAttributes(visAttributes);
355 visAttributes =
new G4VisAttributes(G4Colour(0.0, 0.0, 0.9));
356 visAttributes->SetVisibility(
false);
357 HadCalColumnLogical->SetVisAttributes(visAttributes);
358 HadCalCellLogical->SetVisAttributes(visAttributes);
359 HadCalLayerLogical->SetVisAttributes(visAttributes);
360 HadCalScintiLogical->SetVisAttributes(visAttributes);
384 return worldPhysical;