00180 {
00181 DefineMaterial();
00182
00183 G4RotationMatrix* xRot = new G4RotationMatrix;
00184 xRot->rotateX(90*deg);
00185
00186 G4Tubs* hole1 = new G4Tubs("hole1",hole[0],hole[1],hole[2]/2,0,360);
00187 G4LogicalVolume* logicalhole1 = new G4LogicalVolume(hole1, Steel,"logicalhole1");
00188
00189 new G4PVPlacement(xRot,G4ThreeVector(0,(outerCryo[1]+hole[2]/2)*mm,1640*mm),logicalhole1,"physicalhole1",logicalbes,false,0);
00190
00191 G4Tubs* hole2 = new G4Tubs("hole2",hole[3],hole[4],hole[5]/2,0,360);
00192 G4LogicalVolume* logicalhole2 = new G4LogicalVolume(hole2, Steel,"logicalhole2");
00193
00194 new G4PVPlacement(xRot,G4ThreeVector(0,(outerCryo[1]+hole[2]+hole[5]/2)*mm,1640*mm),logicalhole2,"physicalhole2",logicalbes,false,0);
00195
00196 G4Tubs* hole3 = new G4Tubs("hole3",hole[6],hole[7],hole[12]/2,0,360);
00197 G4LogicalVolume* logicalhole3 = new G4LogicalVolume(hole3, Steel,"logicalhole3");
00198
00199 new G4PVPlacement(xRot,G4ThreeVector(0,(outerCryo[1]+hole[2]+hole[12]/2)*mm,1640*mm),logicalhole3,"physicalhole3",logicalbes,false,0);
00200
00201 G4Tubs* hole4 = new G4Tubs("hole4",hole[8],hole[9],hole[12]/2,0,360);
00202 G4LogicalVolume* logicalhole4 = new G4LogicalVolume(hole4, G4Material::GetMaterial("Aluminium"),"logicalhole4");
00203
00204 new G4PVPlacement(xRot,G4ThreeVector(0,(l3Adia[1]+pipe2[1]+pipe2[4]+hole[12]/2)*mm,1640*mm),logicalhole4,"physicalhole4",logicalbes,false,0);
00205
00206 G4Box* hole5 = new G4Box("hole5",hole[10]/2,hole[11]/2,hole[12]/2);
00207 G4LogicalVolume* logicalhole5 = new G4LogicalVolume(hole5, G4Material::GetMaterial("Aluminium"),"logicalhole5");
00208
00209 new G4PVPlacement(xRot,G4ThreeVector(0,(l3Adia[1]+pipe2[1]+pipe2[4]+hole[12]/2)*mm,1640*mm),logicalhole5,"physicalhole5",logicalbes,false,0);
00210
00211
00212 G4Tubs* solidSCM_tmp = new G4Tubs("solidSCM_tmp",innerCryo[0]*mm,1700*mm,(outerCryo[2]+2*endCryo[2])/2.0*mm,0,360);
00213 G4Tubs* hole_tmp1 = new G4Tubs("hole_tmp1",0,hole[1],(1700.-1617.5+2)/2.*mm,0,360);
00214 G4SubtractionSolid* solidSCM = new G4SubtractionSolid("solidSCM",solidSCM_tmp,hole_tmp1,xRot,G4ThreeVector(0,(1700.+1617.5+2)/2*mm,1640*mm) );
00215 logicalSCM = new G4LogicalVolume(solidSCM, G4Material::GetMaterial("Air"),"logicalSCM");
00216 physicalSCM = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalSCM,"physicalSCM",logicalbes,false,0);
00217
00218 G4Tubs* tub1 = new G4Tubs("tub1",innerCryo[0]*mm,innerCryo[1]*mm,innerCryo[2]/2.0*mm,0,360);
00219 logicalinnCryo = new G4LogicalVolume(tub1, Steel,"logicalinnCryo");
00220 physicalinnCryo = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalinnCryo,"physicalinnCryo",logicalSCM,false,0);
00221
00222 G4Tubs* tub2 = new G4Tubs("tub2",l1Adia[0]*mm,l1Adia[1]*mm,l1Adia[2]/2.0*mm,0,360);
00223 logicall1Adia = new G4LogicalVolume(tub2, fibre,"logicall1Adia");
00224 physicall1Adia = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicall1Adia,"physicall1Adia",logicalSCM,false,0);
00225
00226 G4Tubs* tub3 = new G4Tubs("tub3",innerShield[0]*mm,innerShield[1]*mm,innerShield[2]/2.0*mm,0,360);
00227 logicalinnShield = new G4LogicalVolume(tub3, G4Material::GetMaterial("Aluminium"),"logicalinnShield");
00228 physicalinnShield = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalinnShield,"physicalinnShield",logicalSCM,false,0);
00229
00230 G4Tubs* tub4 = new G4Tubs("tub4",l2Adia[0]*mm,l2Adia[1]*mm,l2Adia[2]/2.0*mm,0,360);
00231 logicall2Adia = new G4LogicalVolume(tub4, fibre,"logicall2Adia");
00232 physicall2Adia = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicall2Adia,"physicall2Adia",logicalSCM,false,0);
00233
00234 G4Tubs* hole_tmp3 = new G4Tubs("hole_tmp3",0,hole[8]*mm,25*mm,0,360);
00235 G4Tubs* tub5_tmp = new G4Tubs("tub5_tmp",outerShield[0]*mm,outerShield[1]*mm,outerShield[2]/2.0*mm,0,360);
00236 G4SubtractionSolid* tub5 = new G4SubtractionSolid("tub5",tub5_tmp,hole_tmp3,xRot,G4ThreeVector(0,(outerShield[0]+outerShield[1])/2*mm,1640*mm) );
00237 logicaloutShield = new G4LogicalVolume(tub5, G4Material::GetMaterial("Aluminium"),"logicaloutShield");
00238 physicaloutShield = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicaloutShield,"physicaloutShield",logicalSCM,false,0);
00239
00240 G4Tubs* tub6_tmp = new G4Tubs("tub6_tmp",l3Adia[0]*mm,l3Adia[1]*mm,l3Adia[2]/2.0*mm,0,360);
00241 G4SubtractionSolid* tub6 = new G4SubtractionSolid("tub6",tub6_tmp,hole_tmp3,xRot,G4ThreeVector(0,(l3Adia[0]+l3Adia[1])/2*mm,1640*mm) );
00242 logicall3Adia = new G4LogicalVolume(tub6, fibre,"logicall3Adia");
00243 physicall3Adia = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicall3Adia,"physicall3Adia",logicalSCM,false,0);
00244
00245 G4Tubs* tub7 = new G4Tubs("tub7",endShield[0]*mm,endShield[1]*mm,endShield[2]/2.0*mm,0,360);
00246 logicalendShield = new G4LogicalVolume(tub7, G4Material::GetMaterial("Aluminium"),"logicalendShield");
00247 physicalendShield1 = new G4PVPlacement(0,G4ThreeVector(0,0,endShield[3]*mm),logicalendShield,"physicalendShield1",logicalSCM,false,0);
00248 physicalendShield2 = new G4PVPlacement(0,G4ThreeVector(0,0,endShield[4]*mm),logicalendShield,"physicalendShield2",logicalSCM,false,1);
00249
00250 G4Tubs* tub8 = new G4Tubs("tub8",l1insu[0]*mm,l1insu[1]*mm,l1insu[2]/2.0*mm,0,360);
00251 logicall1insu = new G4LogicalVolume(tub8, fibre,"logicall1insu");
00252 physicall1insu = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicall1insu,"physicall1insu",logicalSCM,false,0);
00253
00254 G4Tubs* tub9 = new G4Tubs("tub9",coil[0]*mm,coil[1]*mm,coil[2]/2.0*mm,0,360);
00255 logicalcoil = new G4LogicalVolume(tub9, G4Material::GetMaterial("Aluminium"),"logicalcoil");
00256 physicalcoil = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalcoil,"physicalcoil",logicalSCM,false,0);
00257
00258 G4Tubs* tub10 = new G4Tubs("tub10",l2insu[0]*mm,l2insu[1]*mm,l2insu[2]/2.0*mm,0,360);
00259 logicall2insu = new G4LogicalVolume(tub10, fibre,"logicall2insu");
00260 physicall2insu = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicall2insu,"physicall2insu",logicalSCM,false,0);
00261
00262 G4Tubs* tub11 = new G4Tubs("tub11",supp[0]*mm,supp[1]*mm,supp[2]/2.0*mm,0,360);
00263 logicalsupp = new G4LogicalVolume(tub11, G4Material::GetMaterial("Aluminium"),"logicalsupp");
00264 physicalsupp = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalsupp,"physicalsupp",logicalSCM,false,0);
00265
00266 G4Tubs* tub12 = new G4Tubs("tub12",l4Adia[0]*mm,l4Adia[1]*mm,l4Adia[2]/2.0*mm,0,360);
00267 logicall4Adia = new G4LogicalVolume(tub12, fibre,"logicall4Adia");
00268 physicall4Adia = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicall4Adia,"physicall4Adia",logicalSCM,false,0);
00269
00270 G4Tubs* tub13 = new G4Tubs("tub13",endCoil[0]*mm,endCoil[1]*mm,endCoil[2]/2.0*mm,0,360);
00271 logicalendCoil = new G4LogicalVolume(tub13, G4Material::GetMaterial("Aluminium"),"logicalendCoil");
00272 physicalendCoil1 = new G4PVPlacement(0,G4ThreeVector(0,0,endCoil[3]*mm),logicalendCoil,"physicalendCoil1",logicalSCM,false,0);
00273 physicalendCoil2 = new G4PVPlacement(0,G4ThreeVector(0,0,endCoil[4]*mm),logicalendCoil,"physicalendCoil2",logicalSCM,false,1);
00274
00275 G4Tubs* hole_tmp2 = new G4Tubs("hole_tmp2",0,hole[1],18*mm,0,360);
00276 G4Tubs* tub14_tmp = new G4Tubs("tub14_tmp",outerCryo[0]*mm,outerCryo[1]*mm,outerCryo[2]/2.0*mm,0,360);
00277 G4SubtractionSolid* tub14 = new G4SubtractionSolid("tub14",tub14_tmp,hole_tmp2,xRot,G4ThreeVector(0,(outerCryo[1]-8)*mm,1640*mm) );
00278 logicalouterCryo = new G4LogicalVolume(tub14, Steel,"logicalouterCryo");
00279 physicalouterCryo = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalouterCryo,"physicalouterCryo",logicalSCM,false,0);
00280
00281 G4Tubs* tub15 = new G4Tubs("tub15",endCryo[0]*mm,endCryo[1]*mm,endCryo[2]/2.0*mm,0,360);
00282 logicalendCryo = new G4LogicalVolume(tub15, Steel,"logicalendCryo");
00283 physicalendCryo1 = new G4PVPlacement(0,G4ThreeVector(0,0,endCryo[3]*mm),logicalendCryo,"physicalendCryo1",logicalSCM,false,0);
00284 physicalendCryo2 = new G4PVPlacement(0,G4ThreeVector(0,0,endCryo[4]*mm),logicalendCryo,"physicalendCryo2",logicalSCM,false,1);
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319 G4Box* solidpipe1 = new G4Box("solidpipe1",pipe1[2]/2*mm,(pipe1[1]+pipe1[4])/2*mm,pipe1[5]/2*mm);
00320 logicalpipe1 = new G4LogicalVolume(solidpipe1, G4Material::GetMaterial("Air"),"logicalpipe1");
00321 G4Tubs* tub17 = new G4Tubs("tub17",pipe1[0]*mm,pipe1[1]*mm,pipe1[5]/2*mm,0,360);
00322 G4Tubs* tub18 = new G4Tubs("tub18",0,pipe1[1]*mm,pipe1[5]/2*mm,0,360);
00323 G4Tubs* tub19 = new G4Tubs("tub19",0,pipe1[0]*mm,pipe1[5]/2*mm,0,360);
00324 G4Box* solidbox1 = new G4Box("solidbox1",pipe1[2]/2*mm,pipe1[3]/2*mm,pipe1[5]/2*mm);
00325 G4SubtractionSolid* solidsub1 = new G4SubtractionSolid("solidsub1",solidbox1,tub18,0,G4ThreeVector(0,(pipe1[4]-pipe1[3]/2)*mm,0) );
00326 G4LogicalVolume* logicalsub1 = new G4LogicalVolume(solidsub1, G4Material::GetMaterial("Aluminium"),"logicalsub1");
00327 G4LogicalVolume* logicaltub17 = new G4LogicalVolume(tub17, G4Material::GetMaterial("Aluminium"),"logicaltub17");
00328 G4LogicalVolume* logicaltub19 = new G4LogicalVolume(tub19,liquidhelium,"logicaltub19");
00329
00330 new G4PVPlacement(0,G4ThreeVector(0,0,0),logicaltub17,"physicaltub17",logicalpipe1,false,0);
00331
00332 new G4PVPlacement(0,G4ThreeVector(0,0,0),logicaltub19,"physicaltub19",logicalpipe1,false,0);
00333
00334 new G4PVPlacement(0,G4ThreeVector(0,-(pipe1[4]-pipe1[3]/2)*mm,0),logicalsub1,"physicalsub1",logicalpipe1,false,0);
00335 for(G4int i=0; i<24; i++)
00336 {
00337 std::ostringstream osnamerein;
00338 osnamerein << "physicalpipe1_"<<i;
00339 G4RotationMatrix* zRot = new G4RotationMatrix;
00340 zRot->rotateZ(15*i*deg);
00341
00342 physicalpipe1=new G4PVPlacement(zRot,G4ThreeVector(-(std::sqrt(innerShield[0]*innerShield[0]-pipe1[2]/2*pipe1[2]/2)-
00343 (pipe1[1]+pipe1[4])/2)*std::sin(15*pi/180*i)*mm,-(std::sqrt(innerShield[0]*innerShield[0]-
00344 pipe1[2]/2*pipe1[2]/2)-(pipe1[1]+pipe1[4])/2)*std::cos(15*pi/180*i)*mm,0),
00345 logicalpipe1,osnamerein.str(),logicalSCM,false,0);
00346 }
00347
00348 G4Box* solidpipe2 = new G4Box("solidpipe2",pipe2[2]/2*mm,(pipe2[1]+pipe2[4])/2*mm,pipe2[5]/2*mm);
00349 logicalpipe2 = new G4LogicalVolume(solidpipe2,G4Material::GetMaterial("Air"),"logicalpipe2");
00350 G4Tubs* tub20 = new G4Tubs("tub20",pipe2[0]*mm,pipe2[1]*mm,pipe2[5]/2*mm,0,360);
00351 G4Tubs* tub21 = new G4Tubs("tub21",0,pipe2[1]*mm,pipe2[5]/2*mm,0,360);
00352 G4Tubs* tub22 = new G4Tubs("tub22",0,pipe2[0]*mm,pipe2[5]/2*mm,0,360);
00353 G4Box* solidbox2 = new G4Box("solidbox2",pipe2[2]/2*mm,pipe2[3]/2*mm,pipe2[5]/2*mm);
00354 G4SubtractionSolid* solidsub2 = new G4SubtractionSolid("solidsub2",solidbox2,tub21,0,G4ThreeVector(0,(pipe2[4]-pipe2[3]/2)*mm,0) );
00355 G4LogicalVolume* logicalsub2 = new G4LogicalVolume(solidsub2,G4Material::GetMaterial("Aluminium"),"logicalsub2");
00356 G4LogicalVolume* logicaltub20 = new G4LogicalVolume(tub20,G4Material::GetMaterial("Aluminium"),"logicaltub20");
00357 G4LogicalVolume* logicaltub22 = new G4LogicalVolume(tub22,liquidhelium,"logicaltub22");
00358
00359 new G4PVPlacement(0,G4ThreeVector(0,0,0),logicaltub20,"physicaltub20",logicalpipe2,false,0);
00360
00361 new G4PVPlacement(0,G4ThreeVector(0,0,0),logicaltub22,"physicaltub22",logicalpipe2,false,0);
00362
00363 new G4PVPlacement(0,G4ThreeVector(0,-(pipe2[4]-pipe2[3]/2)*mm,0),logicalsub2,"physicalsub2",logicalpipe2,false,0);
00364 for(G4int i=0; i<24; i++)
00365 {
00366 std::ostringstream osnamerein;
00367 osnamerein << "physicalpipe2_"<<i;
00368 G4RotationMatrix* zRot = new G4RotationMatrix;
00369 zRot->rotateZ(15*i*deg);
00370 physicalpipe2= new G4PVPlacement(zRot,G4ThreeVector(-(l3Adia[1]+(pipe2[1]+pipe2[4])/2)*std::sin(15*pi/180*i)*mm,
00371 -(l3Adia[1]+(pipe2[1]+pipe2[4])/2)*std::cos(15*pi/180*i)*mm,0),logicalpipe2,osnamerein.str(),
00372 logicalSCM,false,0);
00373 }
00374
00375
00376 G4Box* solidpipe3 = new G4Box("solidpipe3",pipe3[2]/2*mm,(pipe3[1]+pipe3[4])/2*mm,pipe3[5]/2*mm);
00377 logicalpipe3 = new G4LogicalVolume(solidpipe3,G4Material::GetMaterial("Air"),"logicalpipe3");
00378 G4Tubs* tub23 = new G4Tubs("tub23",pipe3[0]*mm,pipe3[1]*mm,pipe3[5]/2*mm,0,360);
00379 G4Tubs* tub24 = new G4Tubs("tub24",0,pipe3[1]*mm,pipe3[5]/2*mm,0,360);
00380 G4Tubs* tub25 = new G4Tubs("tub25",0,pipe3[0]*mm,pipe3[5]/2*mm,0,360);
00381 G4Box* solidbox3 = new G4Box("solidbox3",pipe3[2]/2*mm,pipe3[3]/2*mm,pipe3[5]/2*mm);
00382 G4SubtractionSolid* solidsub3 = new G4SubtractionSolid("solidsub3",solidbox3,tub24,0,G4ThreeVector(0,(pipe3[4]-pipe3[3]/2)*mm,0));
00383 G4LogicalVolume* logicalsub3 = new G4LogicalVolume(solidsub3,G4Material::GetMaterial("Aluminium"),"logicalsub3");
00384 G4LogicalVolume* logicaltub23 = new G4LogicalVolume(tub23,G4Material::GetMaterial("Aluminium"),"logicaltub23");
00385 G4LogicalVolume* logicaltub25 = new G4LogicalVolume(tub25,liquidhelium,"logicaltub25");
00386
00387 new G4PVPlacement(0,G4ThreeVector(0,0,0),logicaltub23,"physicaltub23",logicalpipe3,false,0);
00388
00389 new G4PVPlacement(0,G4ThreeVector(0,0,0),logicaltub25,"physicaltub25",logicalpipe3,false,0);
00390
00391 new G4PVPlacement(0,G4ThreeVector(0,-(pipe3[4]-pipe3[3]/2)*mm,0),logicalsub3,"physicalsub3",logicalpipe3,false,0);
00392 for(G4int i=0; i<24; i++)
00393 {
00394 std::ostringstream osnamerein;
00395 osnamerein << "physicalpipe3_"<<i;
00396 G4RotationMatrix* zRot = new G4RotationMatrix;
00397 zRot->rotateZ(15*i*deg);
00398 physicalpipe3= new G4PVPlacement(zRot,G4ThreeVector(-(l4Adia[1]+(pipe3[1]+pipe3[4])/2)*std::sin(15*pi/180*i)*mm,
00399 -(l4Adia[1]+(pipe3[1]+pipe3[4])/2)*std::cos(15*pi/180*i)*mm,0),logicalpipe3,osnamerein.str(),
00400 logicalSCM,false,0);
00401 }
00402
00403
00404 G4VisAttributes* visSCM1 = new G4VisAttributes(G4Colour(0.,0.,1.));
00405 logicalSCM->SetVisAttributes(visSCM1);
00406 logicalinnCryo->SetVisAttributes(visSCM1);
00407
00408 logicalouterCryo->SetVisAttributes(visSCM1);
00409
00410 logicalendCryo->SetVisAttributes(visSCM1);
00411
00412 G4VisAttributes* visSCM2 = new G4VisAttributes(G4Colour(0.,1.,0.));
00413 logicall1Adia->SetVisAttributes(visSCM2);
00414
00415 logicall2Adia->SetVisAttributes(visSCM2);
00416
00417 logicall3Adia->SetVisAttributes(visSCM2);
00418
00419 logicall4Adia->SetVisAttributes(visSCM2);
00420
00421 G4VisAttributes* visSCM3 = new G4VisAttributes(G4Colour(1.,0.,0.));
00422 logicalinnShield->SetVisAttributes(visSCM3);
00423
00424 logicaloutShield->SetVisAttributes(visSCM3);
00425
00426 logicalendShield->SetVisAttributes(visSCM3);
00427
00428
00429 G4VisAttributes* visSCM4 = new G4VisAttributes(G4Colour(0.,1.,1.));
00430 logicall1insu->SetVisAttributes(visSCM4);
00431
00432 logicall2insu->SetVisAttributes(visSCM4);
00433
00434 G4VisAttributes* visSCM5 = new G4VisAttributes(G4Colour(1.,0.,1.));
00435 logicalcoil->SetVisAttributes(visSCM5);
00436
00437 logicalendCoil->SetVisAttributes(visSCM5);
00438
00439 G4VisAttributes* visSCM6 = new G4VisAttributes(G4Colour(1.,1.,0.));
00440 logicalsupp->SetVisAttributes(visSCM6);
00441
00442
00443
00444
00445 logicalpipe2->SetVisAttributes(visSCM2);
00446
00447
00448 logicaltub17->SetVisAttributes(visSCM2);
00449
00450 logicaltub19->SetVisAttributes(visSCM5);
00451
00452 logicaltub20->SetVisAttributes(visSCM1);
00453
00454 logicaltub22->SetVisAttributes(visSCM1);
00455
00456 logicaltub23->SetVisAttributes(visSCM2);
00457
00458 logicaltub25->SetVisAttributes(visSCM5);
00459
00460 logicalsub1->SetVisAttributes(visSCM4);
00461
00462 logicalsub2->SetVisAttributes(visSCM4);
00463
00464
00465 logicalsub3->SetVisAttributes(visSCM4);
00466
00467 logicalhole1->SetVisAttributes(visSCM3);
00468
00469 logicalhole2->SetVisAttributes(visSCM3);
00470
00471 logicalhole3->SetVisAttributes(visSCM3);
00472
00473 logicalhole4->SetVisAttributes(visSCM3);
00474
00475 logicalhole5->SetVisAttributes(visSCM3);
00476
00477 }