179 G4RotationMatrix* xRot =
new G4RotationMatrix;
180 xRot->rotateX( 90 * deg );
182 G4Tubs* hole1 =
new G4Tubs(
"hole1", hole[0], hole[1], hole[2] / 2, 0, 360 );
183 G4LogicalVolume* logicalhole1 =
new G4LogicalVolume( hole1, Steel,
"logicalhole1" );
185 new G4PVPlacement( xRot, G4ThreeVector( 0, ( outerCryo[1] + hole[2] / 2 ) * mm, 1640 * mm ),
186 logicalhole1,
"physicalhole1", logicalbes,
false, 0 );
188 G4Tubs* hole2 =
new G4Tubs(
"hole2", hole[3], hole[4], hole[5] / 2, 0, 360 );
189 G4LogicalVolume* logicalhole2 =
new G4LogicalVolume( hole2, Steel,
"logicalhole2" );
192 xRot, G4ThreeVector( 0, ( outerCryo[1] + hole[2] + hole[5] / 2 ) * mm, 1640 * mm ),
193 logicalhole2,
"physicalhole2", logicalbes,
false, 0 );
195 G4Tubs* hole3 =
new G4Tubs(
"hole3", hole[6], hole[7], hole[12] / 2, 0, 360 );
196 G4LogicalVolume* logicalhole3 =
new G4LogicalVolume( hole3, Steel,
"logicalhole3" );
199 xRot, G4ThreeVector( 0, ( outerCryo[1] + hole[2] + hole[12] / 2 ) * mm, 1640 * mm ),
200 logicalhole3,
"physicalhole3", logicalbes,
false, 0 );
202 G4Tubs* hole4 =
new G4Tubs(
"hole4", hole[8], hole[9], hole[12] / 2, 0, 360 );
203 G4LogicalVolume* logicalhole4 =
204 new G4LogicalVolume( hole4, G4Material::GetMaterial(
"Aluminium" ),
"logicalhole4" );
208 G4ThreeVector( 0, ( l3Adia[1] + pipe2[1] + pipe2[4] + hole[12] / 2 ) * mm, 1640 * mm ),
209 logicalhole4,
"physicalhole4", logicalbes,
false, 0 );
211 G4Box* hole5 =
new G4Box(
"hole5", hole[10] / 2, hole[11] / 2, hole[12] / 2 );
212 G4LogicalVolume* logicalhole5 =
213 new G4LogicalVolume( hole5, G4Material::GetMaterial(
"Aluminium" ),
"logicalhole5" );
217 G4ThreeVector( 0, ( l3Adia[1] + pipe2[1] + pipe2[4] + hole[12] / 2 ) * mm, 1640 * mm ),
218 logicalhole5,
"physicalhole5", logicalbes,
false, 0 );
220 G4Tubs* solidSCM_tmp =
new G4Tubs(
"solidSCM_tmp", innerCryo[0] * mm, 1700 * mm,
221 ( outerCryo[2] + 2 * endCryo[2] ) / 2.0 * mm, 0, 360 );
223 new G4Tubs(
"hole_tmp1", 0, hole[1], ( 1700. - 1617.5 + 2 ) / 2. * mm, 0, 360 );
224 G4SubtractionSolid* solidSCM =
225 new G4SubtractionSolid(
"solidSCM", solidSCM_tmp, hole_tmp1, xRot,
226 G4ThreeVector( 0, ( 1700. + 1617.5 + 2 ) / 2 * mm, 1640 * mm ) );
227 logicalSCM =
new G4LogicalVolume( solidSCM, G4Material::GetMaterial(
"Air" ),
"logicalSCM" );
228 physicalSCM =
new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicalSCM,
"physicalSCM",
229 logicalbes,
false, 0 );
231 G4Tubs* tub1 =
new G4Tubs(
"tub1", innerCryo[0] * mm, innerCryo[1] * mm,
232 innerCryo[2] / 2.0 * mm, 0, 360 );
233 logicalinnCryo =
new G4LogicalVolume( tub1, Steel,
"logicalinnCryo" );
234 physicalinnCryo =
new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicalinnCryo,
235 "physicalinnCryo", logicalSCM,
false, 0 );
238 new G4Tubs(
"tub2", l1Adia[0] * mm, l1Adia[1] * mm, l1Adia[2] / 2.0 * mm, 0, 360 );
239 logicall1Adia =
new G4LogicalVolume( tub2, fibre,
"logicall1Adia" );
240 physicall1Adia =
new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicall1Adia,
241 "physicall1Adia", logicalSCM,
false, 0 );
243 G4Tubs* tub3 =
new G4Tubs(
"tub3", innerShield[0] * mm, innerShield[1] * mm,
244 innerShield[2] / 2.0 * mm, 0, 360 );
246 new G4LogicalVolume( tub3, G4Material::GetMaterial(
"Aluminium" ),
"logicalinnShield" );
247 physicalinnShield =
new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicalinnShield,
248 "physicalinnShield", logicalSCM,
false, 0 );
251 new G4Tubs(
"tub4", l2Adia[0] * mm, l2Adia[1] * mm, l2Adia[2] / 2.0 * mm, 0, 360 );
252 logicall2Adia =
new G4LogicalVolume( tub4, fibre,
"logicall2Adia" );
253 physicall2Adia =
new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicall2Adia,
254 "physicall2Adia", logicalSCM,
false, 0 );
256 G4Tubs* hole_tmp3 =
new G4Tubs(
"hole_tmp3", 0, hole[8] * mm, 25 * mm, 0, 360 );
257 G4Tubs* tub5_tmp =
new G4Tubs(
"tub5_tmp", outerShield[0] * mm, outerShield[1] * mm,
258 outerShield[2] / 2.0 * mm, 0, 360 );
259 G4SubtractionSolid* tub5 =
new G4SubtractionSolid(
260 "tub5", tub5_tmp, hole_tmp3, xRot,
261 G4ThreeVector( 0, ( outerShield[0] + outerShield[1] ) / 2 * mm, 1640 * mm ) );
263 new G4LogicalVolume( tub5, G4Material::GetMaterial(
"Aluminium" ),
"logicaloutShield" );
264 physicaloutShield =
new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicaloutShield,
265 "physicaloutShield", logicalSCM,
false, 0 );
268 new G4Tubs(
"tub6_tmp", l3Adia[0] * mm, l3Adia[1] * mm, l3Adia[2] / 2.0 * mm, 0, 360 );
269 G4SubtractionSolid* tub6 =
new G4SubtractionSolid(
270 "tub6", tub6_tmp, hole_tmp3, xRot,
271 G4ThreeVector( 0, ( l3Adia[0] + l3Adia[1] ) / 2 * mm, 1640 * mm ) );
272 logicall3Adia =
new G4LogicalVolume( tub6, fibre,
"logicall3Adia" );
273 physicall3Adia =
new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicall3Adia,
274 "physicall3Adia", logicalSCM,
false, 0 );
276 G4Tubs* tub7 =
new G4Tubs(
"tub7", endShield[0] * mm, endShield[1] * mm,
277 endShield[2] / 2.0 * mm, 0, 360 );
279 new G4LogicalVolume( tub7, G4Material::GetMaterial(
"Aluminium" ),
"logicalendShield" );
281 new G4PVPlacement( 0, G4ThreeVector( 0, 0, endShield[3] * mm ), logicalendShield,
282 "physicalendShield1", logicalSCM,
false, 0 );
284 new G4PVPlacement( 0, G4ThreeVector( 0, 0, endShield[4] * mm ), logicalendShield,
285 "physicalendShield2", logicalSCM,
false, 1 );
288 new G4Tubs(
"tub8", l1insu[0] * mm, l1insu[1] * mm, l1insu[2] / 2.0 * mm, 0, 360 );
289 logicall1insu =
new G4LogicalVolume( tub8, fibre,
"logicall1insu" );
290 physicall1insu =
new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicall1insu,
291 "physicall1insu", logicalSCM,
false, 0 );
293 G4Tubs* tub9 =
new G4Tubs(
"tub9", coil[0] * mm, coil[1] * mm, coil[2] / 2.0 * mm, 0, 360 );
295 new G4LogicalVolume( tub9, G4Material::GetMaterial(
"Aluminium" ),
"logicalcoil" );
296 physicalcoil =
new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicalcoil,
"physicalcoil",
297 logicalSCM,
false, 0 );
300 new G4Tubs(
"tub10", l2insu[0] * mm, l2insu[1] * mm, l2insu[2] / 2.0 * mm, 0, 360 );
301 logicall2insu =
new G4LogicalVolume( tub10, fibre,
"logicall2insu" );
302 physicall2insu =
new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicall2insu,
303 "physicall2insu", logicalSCM,
false, 0 );
306 new G4Tubs(
"tub11", supp[0] * mm, supp[1] * mm, supp[2] / 2.0 * mm, 0, 360 );
308 new G4LogicalVolume( tub11, G4Material::GetMaterial(
"Aluminium" ),
"logicalsupp" );
309 physicalsupp =
new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicalsupp,
"physicalsupp",
310 logicalSCM,
false, 0 );
313 new G4Tubs(
"tub12", l4Adia[0] * mm, l4Adia[1] * mm, l4Adia[2] / 2.0 * mm, 0, 360 );
314 logicall4Adia =
new G4LogicalVolume( tub12, fibre,
"logicall4Adia" );
315 physicall4Adia =
new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicall4Adia,
316 "physicall4Adia", logicalSCM,
false, 0 );
319 new G4Tubs(
"tub13", endCoil[0] * mm, endCoil[1] * mm, endCoil[2] / 2.0 * mm, 0, 360 );
321 new G4LogicalVolume( tub13, G4Material::GetMaterial(
"Aluminium" ),
"logicalendCoil" );
323 new G4PVPlacement( 0, G4ThreeVector( 0, 0, endCoil[3] * mm ), logicalendCoil,
324 "physicalendCoil1", logicalSCM,
false, 0 );
326 new G4PVPlacement( 0, G4ThreeVector( 0, 0, endCoil[4] * mm ), logicalendCoil,
327 "physicalendCoil2", logicalSCM,
false, 1 );
329 G4Tubs* hole_tmp2 =
new G4Tubs(
"hole_tmp2", 0, hole[1], 18 * mm, 0, 360 );
330 G4Tubs* tub14_tmp =
new G4Tubs(
"tub14_tmp", outerCryo[0] * mm, outerCryo[1] * mm,
331 outerCryo[2] / 2.0 * mm, 0, 360 );
332 G4SubtractionSolid* tub14 =
333 new G4SubtractionSolid(
"tub14", tub14_tmp, hole_tmp2, xRot,
334 G4ThreeVector( 0, ( outerCryo[1] - 8 ) * mm, 1640 * mm ) );
335 logicalouterCryo =
new G4LogicalVolume( tub14, Steel,
"logicalouterCryo" );
336 physicalouterCryo =
new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicalouterCryo,
337 "physicalouterCryo", logicalSCM,
false, 0 );
340 new G4Tubs(
"tub15", endCryo[0] * mm, endCryo[1] * mm, endCryo[2] / 2.0 * mm, 0, 360 );
341 logicalendCryo =
new G4LogicalVolume( tub15, Steel,
"logicalendCryo" );
343 new G4PVPlacement( 0, G4ThreeVector( 0, 0, endCryo[3] * mm ), logicalendCryo,
344 "physicalendCryo1", logicalSCM,
false, 0 );
346 new G4PVPlacement( 0, G4ThreeVector( 0, 0, endCryo[4] * mm ), logicalendCryo,
347 "physicalendCryo2", logicalSCM,
false, 1 );
387 G4Box* solidpipe1 =
new G4Box(
"solidpipe1", pipe1[2] / 2 * mm,
388 ( pipe1[1] + pipe1[4] ) / 2 * mm, pipe1[5] / 2 * mm );
390 new G4LogicalVolume( solidpipe1, G4Material::GetMaterial(
"Air" ),
"logicalpipe1" );
392 new G4Tubs(
"tub17", pipe1[0] * mm, pipe1[1] * mm, pipe1[5] / 2 * mm, 0, 360 );
393 G4Tubs* tub18 =
new G4Tubs(
"tub18", 0, pipe1[1] * mm, pipe1[5] / 2 * mm, 0, 360 );
394 G4Tubs* tub19 =
new G4Tubs(
"tub19", 0, pipe1[0] * mm, pipe1[5] / 2 * mm, 0, 360 );
396 new G4Box(
"solidbox1", pipe1[2] / 2 * mm, pipe1[3] / 2 * mm, pipe1[5] / 2 * mm );
397 G4SubtractionSolid* solidsub1 =
398 new G4SubtractionSolid(
"solidsub1", solidbox1, tub18, 0,
399 G4ThreeVector( 0, ( pipe1[4] - pipe1[3] / 2 ) * mm, 0 ) );
400 G4LogicalVolume* logicalsub1 =
401 new G4LogicalVolume( solidsub1, G4Material::GetMaterial(
"Aluminium" ),
"logicalsub1" );
402 G4LogicalVolume* logicaltub17 =
403 new G4LogicalVolume( tub17, G4Material::GetMaterial(
"Aluminium" ),
"logicaltub17" );
404 G4LogicalVolume* logicaltub19 =
new G4LogicalVolume( tub19, liquidhelium,
"logicaltub19" );
406 new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicaltub17,
"physicaltub17", logicalpipe1,
409 new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicaltub19,
"physicaltub19", logicalpipe1,
412 new G4PVPlacement( 0, G4ThreeVector( 0, -( pipe1[4] - pipe1[3] / 2 ) * mm, 0 ), logicalsub1,
413 "physicalsub1", logicalpipe1,
false, 0 );
414 for ( G4int i = 0; i < 24; i++ )
416 std::ostringstream osnamerein;
417 osnamerein <<
"physicalpipe1_" << i;
418 G4RotationMatrix* zRot =
new G4RotationMatrix;
419 zRot->rotateZ( 15 * i * deg );
421 physicalpipe1 =
new G4PVPlacement(
424 -( std::sqrt( innerShield[0] * innerShield[0] - pipe1[2] / 2 * pipe1[2] / 2 ) -
425 ( pipe1[1] + pipe1[4] ) / 2 ) *
426 std::sin( 15 *
pi / 180 * i ) * mm,
427 -( std::sqrt( innerShield[0] * innerShield[0] - pipe1[2] / 2 * pipe1[2] / 2 ) -
428 ( pipe1[1] + pipe1[4] ) / 2 ) *
429 std::cos( 15 *
pi / 180 * i ) * mm,
431 logicalpipe1, osnamerein.str(), logicalSCM,
false, 0 );
434 G4Box* solidpipe2 =
new G4Box(
"solidpipe2", pipe2[2] / 2 * mm,
435 ( pipe2[1] + pipe2[4] ) / 2 * mm, pipe2[5] / 2 * mm );
437 new G4LogicalVolume( solidpipe2, G4Material::GetMaterial(
"Air" ),
"logicalpipe2" );
439 new G4Tubs(
"tub20", pipe2[0] * mm, pipe2[1] * mm, pipe2[5] / 2 * mm, 0, 360 );
440 G4Tubs* tub21 =
new G4Tubs(
"tub21", 0, pipe2[1] * mm, pipe2[5] / 2 * mm, 0, 360 );
441 G4Tubs* tub22 =
new G4Tubs(
"tub22", 0, pipe2[0] * mm, pipe2[5] / 2 * mm, 0, 360 );
443 new G4Box(
"solidbox2", pipe2[2] / 2 * mm, pipe2[3] / 2 * mm, pipe2[5] / 2 * mm );
444 G4SubtractionSolid* solidsub2 =
445 new G4SubtractionSolid(
"solidsub2", solidbox2, tub21, 0,
446 G4ThreeVector( 0, ( pipe2[4] - pipe2[3] / 2 ) * mm, 0 ) );
447 G4LogicalVolume* logicalsub2 =
448 new G4LogicalVolume( solidsub2, G4Material::GetMaterial(
"Aluminium" ),
"logicalsub2" );
449 G4LogicalVolume* logicaltub20 =
450 new G4LogicalVolume( tub20, G4Material::GetMaterial(
"Aluminium" ),
"logicaltub20" );
451 G4LogicalVolume* logicaltub22 =
new G4LogicalVolume( tub22, liquidhelium,
"logicaltub22" );
453 new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicaltub20,
"physicaltub20", logicalpipe2,
456 new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicaltub22,
"physicaltub22", logicalpipe2,
459 new G4PVPlacement( 0, G4ThreeVector( 0, -( pipe2[4] - pipe2[3] / 2 ) * mm, 0 ), logicalsub2,
460 "physicalsub2", logicalpipe2,
false, 0 );
461 for ( G4int i = 0; i < 24; i++ )
463 std::ostringstream osnamerein;
464 osnamerein <<
"physicalpipe2_" << i;
465 G4RotationMatrix* zRot =
new G4RotationMatrix;
466 zRot->rotateZ( 15 * i * deg );
467 physicalpipe2 =
new G4PVPlacement(
470 -( l3Adia[1] + ( pipe2[1] + pipe2[4] ) / 2 ) * std::sin( 15 *
pi / 180 * i ) * mm,
471 -( l3Adia[1] + ( pipe2[1] + pipe2[4] ) / 2 ) * std::cos( 15 *
pi / 180 * i ) * mm,
473 logicalpipe2, osnamerein.str(), logicalSCM,
false, 0 );
477 G4Box* solidpipe3 =
new G4Box(
"solidpipe3", pipe3[2] / 2 * mm,
478 ( pipe3[1] + pipe3[4] ) / 2 * mm, pipe3[5] / 2 * mm );
480 new G4LogicalVolume( solidpipe3, G4Material::GetMaterial(
"Air" ),
"logicalpipe3" );
482 new G4Tubs(
"tub23", pipe3[0] * mm, pipe3[1] * mm, pipe3[5] / 2 * mm, 0, 360 );
483 G4Tubs* tub24 =
new G4Tubs(
"tub24", 0, pipe3[1] * mm, pipe3[5] / 2 * mm, 0, 360 );
484 G4Tubs* tub25 =
new G4Tubs(
"tub25", 0, pipe3[0] * mm, pipe3[5] / 2 * mm, 0, 360 );
486 new G4Box(
"solidbox3", pipe3[2] / 2 * mm, pipe3[3] / 2 * mm, pipe3[5] / 2 * mm );
487 G4SubtractionSolid* solidsub3 =
488 new G4SubtractionSolid(
"solidsub3", solidbox3, tub24, 0,
489 G4ThreeVector( 0, ( pipe3[4] - pipe3[3] / 2 ) * mm, 0 ) );
490 G4LogicalVolume* logicalsub3 =
491 new G4LogicalVolume( solidsub3, G4Material::GetMaterial(
"Aluminium" ),
"logicalsub3" );
492 G4LogicalVolume* logicaltub23 =
493 new G4LogicalVolume( tub23, G4Material::GetMaterial(
"Aluminium" ),
"logicaltub23" );
494 G4LogicalVolume* logicaltub25 =
new G4LogicalVolume( tub25, liquidhelium,
"logicaltub25" );
496 new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicaltub23,
"physicaltub23", logicalpipe3,
499 new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicaltub25,
"physicaltub25", logicalpipe3,
502 new G4PVPlacement( 0, G4ThreeVector( 0, -( pipe3[4] - pipe3[3] / 2 ) * mm, 0 ), logicalsub3,
503 "physicalsub3", logicalpipe3,
false, 0 );
504 for ( G4int i = 0; i < 24; i++ )
506 std::ostringstream osnamerein;
507 osnamerein <<
"physicalpipe3_" << i;
508 G4RotationMatrix* zRot =
new G4RotationMatrix;
509 zRot->rotateZ( 15 * i * deg );
510 physicalpipe3 =
new G4PVPlacement(
513 -( l4Adia[1] + ( pipe3[1] + pipe3[4] ) / 2 ) * std::sin( 15 *
pi / 180 * i ) * mm,
514 -( l4Adia[1] + ( pipe3[1] + pipe3[4] ) / 2 ) * std::cos( 15 *
pi / 180 * i ) * mm,
516 logicalpipe3, osnamerein.str(), logicalSCM,
false, 0 );
520 G4VisAttributes* visSCM1 =
new G4VisAttributes( G4Colour( 0., 0., 1. ) );
521 logicalSCM->SetVisAttributes( visSCM1 );
522 logicalinnCryo->SetVisAttributes( visSCM1 );
524 logicalouterCryo->SetVisAttributes( visSCM1 );
526 logicalendCryo->SetVisAttributes( visSCM1 );
528 G4VisAttributes* visSCM2 =
new G4VisAttributes( G4Colour( 0., 1., 0. ) );
529 logicall1Adia->SetVisAttributes( visSCM2 );
531 logicall2Adia->SetVisAttributes( visSCM2 );
533 logicall3Adia->SetVisAttributes( visSCM2 );
535 logicall4Adia->SetVisAttributes( visSCM2 );
537 G4VisAttributes* visSCM3 =
new G4VisAttributes( G4Colour( 1., 0., 0. ) );
538 logicalinnShield->SetVisAttributes( visSCM3 );
540 logicaloutShield->SetVisAttributes( visSCM3 );
542 logicalendShield->SetVisAttributes( visSCM3 );
545 G4VisAttributes* visSCM4 =
new G4VisAttributes( G4Colour( 0., 1., 1. ) );
546 logicall1insu->SetVisAttributes( visSCM4 );
548 logicall2insu->SetVisAttributes( visSCM4 );
550 G4VisAttributes* visSCM5 =
new G4VisAttributes( G4Colour( 1., 0., 1. ) );
551 logicalcoil->SetVisAttributes( visSCM5 );
553 logicalendCoil->SetVisAttributes( visSCM5 );
555 G4VisAttributes* visSCM6 =
new G4VisAttributes( G4Colour( 1., 1., 0. ) );
556 logicalsupp->SetVisAttributes( visSCM6 );
561 logicalpipe2->SetVisAttributes( visSCM2 );
564 logicaltub17->SetVisAttributes( visSCM2 );
566 logicaltub19->SetVisAttributes( visSCM5 );
568 logicaltub20->SetVisAttributes( visSCM1 );
570 logicaltub22->SetVisAttributes( visSCM1 );
572 logicaltub23->SetVisAttributes( visSCM2 );
574 logicaltub25->SetVisAttributes( visSCM5 );
576 logicalsub1->SetVisAttributes( visSCM4 );
578 logicalsub2->SetVisAttributes( visSCM4 );
581 logicalsub3->SetVisAttributes( visSCM4 );
583 logicalhole1->SetVisAttributes( visSCM3 );
585 logicalhole2->SetVisAttributes( visSCM3 );
587 logicalhole3->SetVisAttributes( visSCM3 );
589 logicalhole4->SetVisAttributes( visSCM3 );
591 logicalhole5->SetVisAttributes( visSCM3 );