Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 // This is the *BASIC* version of IORT, a Gean 27 // 28 // Main Authors: G.Russo(a,b), C.Casarino*(c), 29 // Contributor Authors: S.Guatelli(e) 30 // Past Authors: G.Arnetta(c), S.E.Mazzaglia(d 31 // 32 // (a) Fondazione Istituto San Raffaele G.Gi 33 // (b) IBFM-CNR , Segrate (Milano), Italy 34 // (c) LATO (Laboratorio di Tecnologie Oncol 35 // (d) Laboratori Nazionali del Sud of the I 36 // (e) University of Wallongong, Australia 37 // 38 // *Corresponding author, email to carlo.cas 39 ////////////////////////////////////////////// 40 41 #include "globals.hh" 42 #include "G4SystemOfUnits.hh" 43 #include "G4Box.hh" 44 #include "G4Tubs.hh" 45 #include "G4Cons.hh" 46 #include "G4VisAttributes.hh" 47 #include "G4Colour.hh" 48 #include "G4RunManager.hh" 49 #include "G4LogicalVolume.hh" 50 #include "G4PVPlacement.hh" 51 #include "G4RotationMatrix.hh" 52 #include "G4NistManager.hh" 53 #include "G4NistElementBuilder.hh" 54 #include "G4SubtractionSolid.hh" 55 #include "IORTDetectorConstruction.hh" 56 #include "Collimator70BeamLine.hh" 57 #include "Collimator70BeamLineMessenger.hh" 58 59 Collimator70BeamLine::Collimator70BeamLine(): 60 physicalTreatmentRoom(0),iortDetectorConstru 61 62 63 64 solidFinalCollimatorIORT(0), 65 physiFinalCollimatorIORT(0), 66 67 solidGiunz1FinalCollIORT(0), 68 physiGiunz1FinalCollIORT(0), 69 70 solidGiunz2FinalCollIORT(0), 71 physiGiunz2FinalCollIORT(0), 72 73 solidGiunz3FinalCollIORT(0), 74 physiGiunz3FinalCollIORT(0), 75 76 solidGiunz3FinalCollIntIORT(0), 77 physiGiunz3FinalCollIntIORT(0), 78 79 solidGiunz4FinalCollIORT(0), 80 physiGiunz4FinalCollIORT(0), 81 82 solidGiunz5FinalCollIORT(0), 83 physiGiunz5FinalCollIORT(0), 84 85 solidBlocco1IORT(0), 86 physiBlocco1IORT(0), 87 88 solidBlocco2IORT(0), 89 physiBlocco2IORT(0), 90 91 solidBlocco3IORT(0), 92 physiBlocco3IORT(0), 93 94 solidBlocco20mmIORT(0), 95 physiBlocco20mmIORT(0), 96 97 solidCM1_1_2IORT(0), 98 physiCM1_1_2IORT(0), 99 100 solidCM1_2_2IORT(0), 101 physiCM1_2_2IORT(0), 102 103 solidCM2_1_2IORT(0), 104 physiCM2_1_2IORT(0), 105 106 solidCM2_2_2IORT(0), 107 physiCM2_2_2IORT(0), 108 109 solidCCMIORT(0), 110 physiCCMIORT(0), 111 112 solidPFS1IORT(0), 113 physiPFS1IORT(0), 114 115 solidPFS2IORT(0), 116 physiPFS2IORT(0), 117 118 solidPFS3IORT(0), 119 physiPFS3IORT(0), 120 121 solidFTIORT(0), 122 physiFTIORT(0) 123 124 125 { 126 // Messenger to change parameters of the col 127 collimatorMessenger = new Collimator70BeamLi 128 129 } 130 ////////////////////////////////////////////// 131 Collimator70BeamLine::~Collimator70BeamLine() 132 { 133 delete collimatorMessenger; 134 delete iortDetectorConstruction; 135 } 136 137 ////////////////////////////////////////////// 138 139 140 G4VPhysicalVolume* Collimator70BeamLine::Const 141 { 142 // Sets default geometry and materials 143 SetDefaultDimensions(); 144 145 // Construct the whole Collimator Beam Line 146 ConstructCollimator70BeamLine(); 147 148 149 // IORTDetectorConstruction builds ONLY the 150 iortDetectorConstruction = new IORTDetectorC 151 152 return physicalTreatmentRoom; 153 } 154 155 // In the following method the DEFAULTS used i 156 // collimator beam line are provided 157 // HERE THE USER CAN CHANGE THE GEOMETRY CHARA 158 // LINE ELEMENTS, ALTERNATIVELY HE/SHE CAN USE 159 // MESSENGER IS PROVIDED) 160 // 161 // DEFAULT MATERIAL ARE ALSO PROVIDED 162 // and COLOURS ARE ALSO DEFINED 163 // ------------------------------------------- 164 ////////////////////////////////////////////// 165 void Collimator70BeamLine::SetDefaultDimension 166 { 167 168 // Set of coulors that can be used 169 white = new G4VisAttributes( G4Colour()); 170 white -> SetVisibility(true); 171 //white -> SetForceSolid(true); 172 173 blue = new G4VisAttributes(G4Colour(0. ,0. , 174 blue -> SetVisibility(true); 175 //blue -> SetForceSolid(true); 176 177 gray = new G4VisAttributes( G4Colour(0.5, 0. 178 gray-> SetVisibility(true); 179 //gray-> SetForceSolid(true); 180 181 red = new G4VisAttributes(G4Colour(1. ,0. ,0 182 red-> SetVisibility(true); 183 //red-> SetForceSolid(true); 184 185 yellow = new G4VisAttributes(G4Colour(1., 1. 186 yellow-> SetVisibility(true); 187 //yellow-> SetForceSolid(true); 188 189 green = new G4VisAttributes( G4Colour(25/255 190 green -> SetVisibility(true); 191 //green -> SetForceSolid(true); 192 193 darkGreen = new G4VisAttributes( G4Colour(0/ 194 darkGreen -> SetVisibility(true); 195 //darkGreen -> SetForceSolid(true); 196 197 darkOrange3 = new G4VisAttributes( G4Colour( 198 darkOrange3 -> SetVisibility(true); 199 //darkOrange3 -> SetForceSolid(true); 200 201 skyBlue = new G4VisAttributes( G4Colour(135/ 202 skyBlue -> SetVisibility(true); 203 //skyBlue -> SetForceSolid(true); 204 205 206 // Geometry FINAL COLLIMATOR DEFAULTS 207 208 G4double defaultOuterRadiusFinalCollimatorIO 209 OuterRadiusFinalCollimatorIORT = defaultOute 210 211 G4double defaultinnerRadiusFinalCollimatorIO 212 innerRadiusFinalCollimatorIORT = defaultinne 213 214 // DEFAULT DEFINITION OF THE MATERIALS 215 // All elements and compound definition foll 216 217 // ELEMENTS 218 G4bool isotopes = false; 219 G4Material* aluminumNist = G4NistManager::In 220 //G4Material* tantalumNist = G4NistManager:: 221 //G4Material* copperNistAsMaterial = G4NistM 222 G4Element* zincNist = G4NistManager::Instanc 223 G4Element* copperNist = G4NistManager::Insta 224 225 // COMPOUND 226 G4Material* airNist = G4NistManager::Instan 227 //G4Material* kaptonNist = G4NistManager::In 228 G4Material* galacticNist = G4NistManager::In 229 G4Material* PMMANist = G4NistManager::Instan 230 //G4Material* mylarNist = G4NistManager::Ins 231 G4Material* titanioNist = G4NistManager::Ins 232 233 234 G4double d; // Density 235 G4int nComponents;// Number of components 236 G4double fractionmass; // Fraction in mass o 237 238 d = 8.40*g/cm3; // brass 239 nComponents = 2; 240 G4Material* brass = new G4Material("Brass", 241 brass -> AddElement(zincNist, fractionmass = 242 brass -> AddElement(copperNist, fractionmass 243 244 245 // MATERIAL ASSIGNMENT 246 247 248 // Material of the FINAL COLLIMATOR IORT 249 finalCollimatorMaterialIORT = PMMANist; 250 251 // Junction 1 FINAL COLLIMATOR IORT 252 Giunz1FinalCollMaterialIORT = PMMANist; 253 254 // Junction 2 FINAL COLLIMATOR IORT 255 Giunz2FinalCollMaterialIORT = PMMANist; 256 257 // Junction 3 FINAL COLLIMATOR IORT 258 Giunz3FinalCollMaterialIORT = PMMANist; 259 260 // Junction 3 FINAL COLLIMATOR Int IORT 261 Giunz3FinalCollMaterialIntIORT = airNist; 262 263 // Junction 4 FINAL COLLIMATOR IORT 264 Giunz4FinalCollMaterialIORT = PMMANist; 265 266 // Junction 5 FINAL COLLIMATOR IORT 267 Giunz5FinalCollMaterialIORT = PMMANist; 268 269 // Block 1 Diameter 30 mm 270 Blocco1IORTMaterialIORT = PMMANist; 271 272 // Block 2 Diameter 30 mm 273 Blocco2IORTMaterialIORT = PMMANist; 274 275 // Block 3 Diameter 30 mm 276 Blocco3IORTMaterialIORT = PMMANist; 277 278 // Block Diameter 20 mm 279 Blocco20mmIORTMaterialIORT = PMMANist; 280 281 // First Monitor Chamber Lamina Al 1 of 2 282 CM1_1_2IORTMaterialIORT = aluminumNist; 283 284 // First Monitor Chamber Lamina Al 2 of 2 285 CM1_2_2IORTMaterialIORT = aluminumNist; 286 287 // Second Monitor Chamber Lamina Al 1 of 2 288 CM2_1_2IORTMaterialIORT = aluminumNist; 289 290 // Second Monitor Chamber Lamina Al 2 of 2 291 CM2_2_2IORTMaterialIORT = aluminumNist; 292 293 // Monitor Chamber Cylinder 294 CCMIORTMaterialIORT = PMMANist; 295 296 // Superior Final Part Monitor Chambers 297 PFS1IORTMaterialIORT = PMMANist; 298 299 // Superior Final Part Monitor Chambers 300 PFS2IORTMaterialIORT = PMMANist; 301 302 // Superior Final Part Monitor Chambers 303 PFS3IORTMaterialIORT = PMMANist; 304 305 // Superior Final Part Monitor Chambers Mater 306 FTIORTMaterialIORT = titanioNist; 307 308 // Vacuum Source 309 VSIORTMaterialIORT = galacticNist; 310 311 } 312 313 ////////////////////////////////////////////// 314 void Collimator70BeamLine::ConstructCollimator 315 { 316 // ----------------------------- 317 // Treatment room - World volume 318 //------------------------------ 319 // Treatment room sizes 320 const G4double worldX = 400.0 *cm; 321 const G4double worldY = 400.0 *cm; 322 const G4double worldZ = 400.0 *cm; 323 G4bool isotopes = false; 324 325 G4Material* airNist = G4NistManager::Instan 326 G4Box* treatmentRoom = new G4Box("TreatmentR 327 G4LogicalVolume* logicTreatmentRoom = new G4 328 329 330 0,0,0); 331 physicalTreatmentRoom = new G4PVPlacement(0, 332 G4ThreeVector(), 333 "physicalTreatmentRoom", 334 logicTreatmentRoom, 335 0,false,0); 336 337 338 // The treatment room is invisible in the Vi 339 logicTreatmentRoom -> SetVisAttributes (G4Vi 340 341 // Components of the Collimator Beam Line 342 343 IortBeamLineVacuumSource(); 344 IortBeamLineTitaniumWindows(); 345 IortBeamLineMonitorChambers(); 346 IortBeamLineBlocks() ; 347 IortBeamLineJunctions(); 348 IortBeamLineFinalCollimator(); 349 350 } 351 352 353 void Collimator70BeamLine::IortBeamLineVacuumS 354 { 355 // ------------------------------------------ 356 // Vacuum Source 357 // ----------------------------------------- 358 359 360 G4double phi1 = 90. *deg; 361 362 363 G4RotationMatrix rm1; 364 rm1.rotateY(phi1); 365 366 const G4double outRadiusVSIORT = 44.75 *mm; 367 const G4double innRadiusVSIORT = 0.*mm; 368 const G4double hightVSIORT = 1. *mm; 369 const G4double startAngleVSIORT = 0.*deg; 370 const G4double spanningAngleVSIORT = 360.*de 371 const G4double XPositionVSIORT = -862.797 *m 372 373 solidVSIORT = new G4Tubs("VSIORT", innRadius 374 outRadiusVSIORT, 375 hightVSIORT, 376 startAngleVSIORT, 377 spanningAngleVSIORT); 378 379 G4LogicalVolume* logVSIORT = new G4LogicalVo 380 VSIORTMaterialIORT, "VSIOR 381 382 physiVSIORT = new G4PVPlacement(G4Transform3 383 "VSIORT", logVSIORT, physicalTrea 384 385 logVSIORT -> SetVisAttributes(green); 386 } 387 388 void Collimator70BeamLine::IortBeamLineTitaniu 389 { 390 // ------------------------------------------- 391 // Titanium Window 392 // ----------------------------------------- 393 394 G4double phi2 = 90. *deg; 395 396 397 G4RotationMatrix rm2; 398 rm2.rotateY(phi2); 399 400 401 const G4double outRadiusFTIORT = 44.75 *mm; 402 const G4double innRadiusFTIORT = 8.5 *mm; 403 const G4double hightFTIORT = 0.006 *mm; 404 const G4double startAngleFTIORT = 0.*deg; 405 const G4double spanningAngleFTIORT = 360.*de 406 const G4double XPositionFTIORT = -861.791 *m 407 408 solidFTIORT = new G4Tubs("FTIORT", innRadius 409 outRadiusFTIORT, 410 hightFTIORT, 411 startAngleFTIORT, 412 spanningAngleFTIORT); 413 414 G4LogicalVolume* logFTIORT = new G4LogicalVo 415 FTIORTMaterialIORT, "FTIOR 416 417 physiFTIORT = new G4PVPlacement(G4Transform3 418 "FTIORT", logFTIORT, physicalTrea 419 420 logFTIORT -> SetVisAttributes(yellow); 421 } 422 423 void Collimator70BeamLine::IortBeamLineMonitor 424 { 425 426 G4double phi3 = 90. *deg; 427 428 // Matrix definition for a 90 deg rotatio 429 G4RotationMatrix rm3; 430 rm3.rotateY(phi3); 431 ////////////////////////////////////////////// 432 433 // Monitor Chambers System 434 435 ////////////////////////////////////////////// 436 437 438 // ----------------------------------------- 439 // Superior Final Part Monitor C 440 // ----------------------------------------- 441 442 const G4double outRadiusPFS3IORT = 44.75 *mm 443 const G4double innRadiusPFS3IORT = 17.5 *mm; 444 const G4double hightPFS3IORT = 3.03 *mm; 445 const G4double startAnglePFS3IORT = 0.*deg; 446 const G4double spanningAnglePFS3IORT = 360.* 447 const G4double XPositionPFS3IORT = -848.755 448 449 solidPFS3IORT = new G4Tubs("PFS3IORT", innRa 450 outRadiusPFS3IORT, 451 hightPFS3IORT, 452 startAnglePFS3IORT, 453 spanningAnglePFS3IORT); 454 455 G4LogicalVolume* logPFS3IORT = new G4Logical 456 PFS3IORTMaterialIORT, "PFS 457 458 physiPFS3IORT = new G4PVPlacement(G4Transfor 459 "PFS3IORT", logPFS3IORT, physical 460 461 logPFS3IORT -> SetVisAttributes(white); 462 463 464 // ----------------------------------------- 465 // Superior Final Part Monitor C 466 // ----------------------------------------- 467 468 const G4double outRadiusPFS2IORT = 44.75 *mm 469 const G4double innRadiusPFS2IORT = 10. *mm; 470 const G4double hightPFS2IORT = 1.47 *mm; 471 const G4double startAnglePFS2IORT = 0.*deg; 472 const G4double spanningAnglePFS2IORT = 360.* 473 const G4double XPositionPFS2IORT = -844.255 474 475 solidPFS2IORT = new G4Tubs("PFS2IORT", innRa 476 outRadiusPFS2IORT, 477 hightPFS2IORT, 478 startAnglePFS2IORT, 479 spanningAnglePFS2IORT); 480 481 G4LogicalVolume* logPFS2IORT = new G4Logical 482 PFS2IORTMaterialIORT, "PFS 483 484 physiPFS2IORT = new G4PVPlacement(G4Transfor 485 "PFS2IORT", logPFS2IORT, physical 486 487 logPFS2IORT -> SetVisAttributes(green); 488 489 // ----------------------------------------- 490 // Superior Final Part Monitor C 491 // ----------------------------------------- 492 493 const G4double outRadiusPFS1IORT = 35. *mm; 494 const G4double innRadiusPFS1IORT = 10. *mm; 495 const G4double hightPFS1IORT = 0.88 *mm; 496 const G4double startAnglePFS1IORT = 0.*deg; 497 const G4double spanningAnglePFS1IORT = 360.* 498 const G4double XPositionPFS1IORT = -841.905 499 500 solidPFS1IORT = new G4Tubs("PFS1IORT", innRa 501 outRadiusPFS1IORT, 502 hightPFS1IORT, 503 startAnglePFS1IORT, 504 spanningAnglePFS1IORT); 505 506 G4LogicalVolume* logPFS1IORT = new G4Logical 507 PFS1IORTMaterialIORT, "PFS 508 509 physiPFS1IORT = new G4PVPlacement(G4Transfor 510 "PFS1IORT", logPFS1IORT, physical 511 512 logPFS1IORT -> SetVisAttributes(green); 513 514 // ----------------------------------------- 515 // Monitor Chambers Cylinder 516 // ----------------------------------------- 517 518 const G4double outRadiusCCMIORT = 35. *mm; 519 const G4double innRadiusCCMIORT = 10. *mm; 520 const G4double hightCCMIORT = 4.0125 *mm; 521 const G4double startAngleCCMIORT = 0.*deg; 522 const G4double spanningAngleCCMIORT = 360.*d 523 const G4double XPositionCCMIORT = -837.0125 524 525 solidCCMIORT = new G4Tubs("CCMIORT", innRadi 526 outRadiusCCMIORT, 527 hightCCMIORT, 528 startAngleCCMIORT, 529 spanningAngleCCMIORT); 530 531 G4LogicalVolume* logCCMIORT = new G4LogicalV 532 CCMIORTMaterialIORT, "CCMI 533 534 physiCCMIORT = new G4PVPlacement(G4Transform 535 "CCMIORT", logCCMIORT, physicalTr 536 537 logCCMIORT -> SetVisAttributes(green); 538 539 540 // ----------------------------------------- 541 // Second Monitor Chamber Lamina Al 2 542 // ----------------------------------------- 543 544 const G4double outRadiusCM2_2_2IORT = 20. *m 545 const G4double innRadiusCM2_2_2IORT = 0. *mm 546 const G4double hightCM2_2_2IORT = 0.025 *mm; 547 const G4double startAngleCM2_2_2IORT = 0.*de 548 const G4double spanningAngleCM2_2_2IORT = 36 549 const G4double XPositionCM2_2_2IORT = -841. 550 551 solidCM2_2_2IORT = new G4Tubs("CM2_2_2IORT", 552 outRadiusCM2_2_2IORT, 553 hightCM2_2_2IORT, 554 startAngleCM2_2_2IORT, 555 spanningAngleCM2_2_2IORT); 556 557 G4LogicalVolume* logCM2_2_2IORT = new G4Logi 558 CM2_2_2IORTMaterialIORT, " 559 560 physiCM2_2_2IORT = new G4PVPlacement(G4Trans 561 "CM2_2_2ORT", logCM2_2_2IORT, phy 562 563 logCM2_2_2IORT -> SetVisAttributes(green); 564 565 566 // ------------------------------------------- 567 // Second Monitor Chamber Lamina Al 1 568 // ----------------------------------------- 569 570 const G4double outRadiusCM2_1_2IORT = 20. *m 571 const G4double innRadiusCM2_1_2IORT = 0. *mm 572 const G4double hightCM2_1_2IORT = 0.025 *mm; 573 const G4double startAngleCM2_1_2IORT = 0.*de 574 const G4double spanningAngleCM2_1_2IORT = 36 575 const G4double XPositionCM2_1_2IORT = -839. 576 577 solidCM2_1_2IORT = new G4Tubs("CM2_1_2IORT", 578 outRadiusCM2_1_2IORT, 579 hightCM2_1_2IORT, 580 startAngleCM2_1_2IORT, 581 spanningAngleCM2_1_2IORT); 582 583 G4LogicalVolume* logCM2_1_2IORT = new G4Logi 584 CM2_1_2IORTMaterialIORT, " 585 586 physiCM2_1_2IORT = new G4PVPlacement(G4Trans 587 "CM2_1_2ORT", logCM2_1_2IORT, phy 588 589 logCM2_1_2IORT -> SetVisAttributes(yellow); 590 591 // ----------------------------------------- 592 // First Monitor Chamber Lamina Al 2 593 // ----------------------------------------- 594 595 const G4double outRadiusCM1_2_2IORT = 20. *m 596 const G4double innRadiusCM1_2_2IORT = 0. *mm 597 const G4double hightCM1_2_2IORT = 0.025 *mm; 598 const G4double startAngleCM1_2_2IORT = 0.*de 599 const G4double spanningAngleCM1_2_2IORT = 36 600 const G4double XPositionCM1_2_2IORT = -837. 601 602 solidCM1_2_2IORT = new G4Tubs("CM1_2_2IORT", 603 outRadiusCM1_2_2IORT, 604 hightCM1_2_2IORT, 605 startAngleCM1_2_2IORT, 606 spanningAngleCM1_2_2IORT); 607 608 G4LogicalVolume* logCM1_2_2IORT = new G4Logi 609 CM1_2_2IORTMaterialIORT, "CM1_ 610 611 physiCM1_2_2IORT = new G4PVPlacement(G4Trans 612 "CM1_2_2ORT", logCM1_2_2IORT, phy 613 614 logCM1_2_2IORT -> SetVisAttributes(yellow); 615 616 // ----------------------------------------- 617 // First Monitor Chamber Lamina Al 1 618 // ----------------------------------------- 619 620 const G4double outRadiusCM1_1_2IORT = 20. *m 621 const G4double innRadiusCM1_1_2IORT = 0. *mm 622 const G4double hightCM1_1_2IORT = 0.025 *mm; 623 const G4double startAngleCM1_1_2IORT = 0.*de 624 const G4double spanningAngleCM1_1_2IORT = 36 625 const G4double XPositionCM1_1_2IORT = -835. 626 627 solidCM1_1_2IORT = new G4Tubs("CM1_1_2IORT", 628 outRadiusCM1_1_2IORT, 629 hightCM1_1_2IORT, 630 startAngleCM1_1_2IORT, 631 spanningAngleCM1_1_2IORT); 632 633 G4LogicalVolume* logCM1_1_2IORT = new G4Logi 634 CM1_1_2IORTMaterialIORT, " 635 636 physiCM1_1_2IORT = new G4PVPlacement(G4Trans 637 "CM1_1_2ORT", logCM1_1_2IORT, phy 638 639 logCM1_1_2IORT -> SetVisAttributes(yellow); 640 } 641 642 void Collimator70BeamLine::IortBeamLineBlocks( 643 { 644 645 G4double phi4 = 90. *deg; 646 647 648 G4RotationMatrix rm4; 649 rm4.rotateY(phi4); 650 651 ///////////////////////////////////////////// 652 653 // IORT BEAM LINE BLOCKS 654 655 ////////////////////////////////////////////// 656 657 // ----------------------------------------- 658 // Block 4 // 659 // ----------------------------------------- 660 661 const G4double outRadiusBlocco20mmIORT = 36. 662 const G4double innRadiusBlocco20mmIORT = 10. 663 const G4double hightBlocco20mmIORT = 3. *mm; 664 const G4double startAngleBlocco20mmIORT = 0. 665 const G4double spanningAngleBlocco20mmIORT = 666 const G4double XPositionBlocco20mmIORT = -83 667 668 solidBlocco20mmIORT = new G4Tubs("Blocco20mm 669 outRadiusBlocco20mmIORT, 670 hightBlocco20mmIORT, 671 startAngleBlocco20mmIORT, 672 spanningAngleBlocco20mmIORT); 673 674 G4LogicalVolume* logBlocco20mmIORT = new G4L 675 Blocco20mmIORTMaterialIORT 676 677 physiBlocco20mmIORT = new G4PVPlacement(G4Tr 678 "Blocco20mmORT", logBlocco20mmIOR 679 680 logBlocco20mmIORT -> SetVisAttributes(green) 681 682 683 // -----------------------// 684 // Block 3 // 685 // -----------------------// 686 687 const G4double outRadiusBlocco3IORT = 36.5 * 688 const G4double innRadiusBlocco3IORT = 15. *m 689 const G4double hightBlocco3IORT = 3.5 *mm; 690 const G4double startAngleBlocco3IORT = 0.*de 691 const G4double spanningAngleBlocco3IORT = 36 692 const G4double XPositionBlocco3IORT = -823.5 693 694 solidBlocco3IORT = new G4Tubs("Blocco3IORT", 695 outRadiusBlocco3IORT, 696 hightBlocco3IORT, 697 startAngleBlocco3IORT, 698 spanningAngleBlocco3IORT); 699 700 G4LogicalVolume* logBlocco3IORT = new G4Logi 701 Blocco3IORTMaterialIORT, " 702 703 physiBlocco3IORT = new G4PVPlacement(G4Trans 704 "Blocco3ORT", logBlocco3IORT, phy 705 706 logBlocco3IORT -> SetVisAttributes(yellow); 707 708 // -----------------------// 709 // Block 2 // 710 // -----------------------// 711 712 const G4double outRadiusBlocco2IORT = 41.5 * 713 const G4double innRadiusBlocco2IORT = 15. *m 714 const G4double hightBlocco2IORT = 8. *mm; 715 const G4double startAngleBlocco2IORT = 0.*de 716 const G4double spanningAngleBlocco2IORT = 36 717 const G4double XPositionBlocco2IORT = -812. 718 719 solidBlocco2IORT = new G4Tubs("Blocco2IORT", 720 outRadiusBlocco2IORT, 721 hightBlocco2IORT, 722 startAngleBlocco2IORT, 723 spanningAngleBlocco2IORT); 724 725 G4LogicalVolume* logBlocco2IORT = new G4Logi 726 Blocco2IORTMaterialIORT, " 727 728 physiBlocco2IORT = new G4PVPlacement(G4Trans 729 "Blocco2IORT", logBlocco2IORT, ph 730 731 logBlocco2IORT -> SetVisAttributes(red); 732 733 // ----------------------- // 734 // Block 1 // 735 // ----------------------- // 736 737 const G4double outRadiusBlocco1IORT = 52.0 * 738 const G4double innRadiusBlocco1IORT = 15. *m 739 const G4double hightBlocco1IORT = 8.5 *mm; 740 const G4double startAngleBlocco1IORT = 0.*de 741 const G4double spanningAngleBlocco1IORT = 36 742 const G4double XPositionBlocco1IORT = -795.5 743 744 solidBlocco1IORT = new G4Tubs("Blocco1IORT", 745 outRadiusBlocco1IORT, 746 hightBlocco1IORT, 747 startAngleBlocco1IORT, 748 spanningAngleBlocco1IORT); 749 750 G4LogicalVolume* logBlocco1IORT = new G4Logi 751 Blocco1IORTMaterialIORT, " 752 753 physiBlocco1IORT = new G4PVPlacement(G4Trans 754 "Blocco1IORT", logBlocco1IORT, ph 755 756 logBlocco1IORT -> SetVisAttributes(white); 757 } 758 759 void Collimator70BeamLine::IortBeamLineJunctio 760 { 761 762 763 G4double phi5 = 90. *deg; 764 765 766 G4RotationMatrix rm5; 767 rm5.rotateY(phi5); 768 // --------------------------------- // 769 // Junction 5 FINAL COLLIMATOR IORT // 770 // --------------------------------- // 771 772 const G4double outRadiusGiunz5FinalCollIORT 773 const G4double innRadiusGiunz5FinalCollIORT 774 const G4double hightGiunz5FinalCollIORT = 3. 775 const G4double startAngleGiunz5FinalCollIORT 776 const G4double spanningAngleGiunz5FinalCollI 777 const G4double Giunz5FinalCollXPositionIORT 778 779 solidGiunz5FinalCollIORT = new G4Tubs("Giunz 780 outRadiusGiunz5FinalCollIORT, 781 hightGiunz5FinalCollIORT, 782 startAngleGiunz5FinalCollIORT, 783 spanningAngleGiunz5FinalCollIORT); 784 785 G4LogicalVolume* logGiunz5FinalCollIORT = ne 786 Giunz5FinalCollMaterialIOR 787 788 physiGiunz5FinalCollIORT = new G4PVPlacement 789 "Giunz5FinalCollIORT", logGiunz5F 790 791 logGiunz5FinalCollIORT -> SetVisAttributes(y 792 793 // --------------------------------- // 794 // Junction 4 FINAL COLLIMATOR IORT // 795 // --------------------------------- // 796 797 const G4double outRadiusGiunz4FinalCollIORT 798 const G4double innRadiusGiunz4FinalCollIORT 799 const G4double hightGiunz4FinalCollIORT = 8. 800 const G4double startAngleGiunz4FinalCollIORT 801 const G4double spanningAngleGiunz4FinalCollI 802 const G4double Giunz4FinalCollXPositionIORT 803 804 solidGiunz4FinalCollIORT = new G4Tubs("Giunz 805 outRadiusGiunz4FinalCollIORT, 806 hightGiunz4FinalCollIORT, 807 startAngleGiunz4FinalCollIORT, 808 spanningAngleGiunz4FinalCollIORT); 809 810 G4LogicalVolume* logGiunz4FinalCollIORT = ne 811 Giunz4FinalCollMaterialIOR 812 813 physiGiunz4FinalCollIORT = new G4PVPlacement 814 "Giunz4FinalCollIORT", logGiunz4F 815 816 logGiunz4FinalCollIORT -> SetVisAttributes(b 817 818 819 820 // --------------------------------- // 821 // Junction 3 FINAL COLLIMATOR IORT // 822 // --------------------------------- // 823 824 const G4double outRadiusGiunz3FinalCollIORT 825 const G4double innRadiusGiunz3FinalCollIORT 826 const G4double hightGiunz3FinalCollIORT = 4. 827 const G4double startAngleGiunz3FinalCollIORT 828 const G4double spanningAngleGiunz3FinalCollI 829 const G4double Giunz3FinalCollXPositionIORT 830 831 solidGiunz3FinalCollIORT = new G4Tubs("Giunz 832 outRadiusGiunz3FinalCollIORT, 833 hightGiunz3FinalCollIORT, 834 startAngleGiunz3FinalCollIORT, 835 spanningAngleGiunz3FinalCollIORT); 836 837 G4LogicalVolume* logicsolidGiunz3FinalCollIO 838 Giunz3FinalCollMaterialIOR 839 840 physiGiunz3FinalCollIORT = new G4PVPlacement 841 "Giunz3FinalCollIORT", logicsolid 842 843 logicsolidGiunz3FinalCollIORT -> SetVisAttri 844 // logicsolidGiunz3FinalCollIORT -> SetVisA 845 846 847 848 // --------------------------------- // 849 // Junction 3 FINAL COLLIMATOR IORT internal 850 // --------------------------------- // 851 852 853 854 solidGiunz3FinalCollIntIORT = new G4Cons("Gi 855 856 G4LogicalVolume* logicsolidGiunz3FinalCollIn 857 Giunz3FinalCollMaterialInt 858 859 physiGiunz3FinalCollIntIORT = new G4PVPlacem 860 861 logicsolidGiunz3FinalCollIntIORT -> SetVisAt 862 863 864 // --------------------------------- // 865 // Junction 2 FINAL COLLIMATOR IORT // 866 // --------------------------------- // 867 868 const G4double outRadiusGiunz2FinalCollIORT 869 const G4double innRadiusGiunz2FinalCollIORT 870 const G4double hightGiunz2FinalCollIORT = 5. 871 const G4double startAngleGiunz2FinalCollIORT 872 const G4double spanningAngleGiunz2FinalCollI 873 const G4double Giunz2FinalCollXPositionIORT 874 875 solidGiunz2FinalCollIORT = new G4Tubs("Giunz 876 outRadiusGiunz2FinalCollIORT, 877 hightGiunz2FinalCollIORT, 878 startAngleGiunz2FinalCollIORT, 879 spanningAngleGiunz2FinalCollIORT); 880 881 G4LogicalVolume* logGiunz2FinalCollIORT = ne 882 Giunz2FinalCollMaterialIOR 883 884 physiGiunz2FinalCollIORT = new G4PVPlacement 885 "Giunz2FinalCollIORT", logGiunz2F 886 887 logGiunz2FinalCollIORT -> SetVisAttributes(r 888 889 // --------------------------------- // 890 // Junction 1 FINAL COLLIMATOR IORT // 891 // --------------------------------- // 892 893 const G4double outRadiusGiunz1FinalCollIORT 894 const G4double innRadiusGiunz1FinalCollIORT 895 const G4double hightGiunz1FinalCollIORT = 10 896 const G4double startAngleGiunz1FinalCollIORT 897 const G4double spanningAngleGiunz1FinalCollI 898 const G4double Giunz1FinalCollXPositionIORT 899 900 solidGiunz1FinalCollIORT = new G4Tubs("Giunz 901 outRadiusGiunz1FinalCollIORT, 902 hightGiunz1FinalCollIORT, 903 startAngleGiunz1FinalCollIORT, 904 spanningAngleGiunz1FinalCollIORT); 905 906 G4LogicalVolume* logGiunz1FinalCollIORT = ne 907 Giunz1FinalCollMaterialIOR 908 909 physiGiunz1FinalCollIORT = new G4PVPlacement 910 "Giunz1FinalCollIORT", logGiunz1F 911 912 logGiunz1FinalCollIORT -> SetVisAttributes(g 913 914 } 915 916 void Collimator70BeamLine::IortBeamLineFinalCo 917 { 918 // -----------------------// 919 // FINAL COLLIMATOR IORT // 920 //------------------------// 921 922 // const G4double outRadiusFinalCollimatorIOR 923 // const G4double innRadiusFinalCollimatorIOR 924 const G4double hightFinalCollimatorIORT = 33 925 const G4double startAngleFinalCollimatorIORT 926 const G4double spanningAngleFinalCollimatorI 927 const G4double finalCollimatorXPositionIORT 928 929 930 931 932 G4double phi6 = 90. *deg; 933 934 935 G4RotationMatrix rm6; 936 rm6.rotateY(phi6); 937 938 939 solidFinalCollimatorIORT = new G4Tubs("Final 940 OuterRadiusFinalCollimatorIORT, 941 hightFinalCollimatorIORT, 942 startAngleFinalCollimatorIORT, 943 spanningAngleFinalCollimatorIORT); 944 945 G4LogicalVolume* logFinalCollimatorIORT = ne 946 finalCollimatorMaterialIOR 947 948 physiFinalCollimatorIORT = new G4PVPlacement 949 "FinalCollimatorIORT", logFinalCo 950 951 // logFinalCollimatorIORT -> SetVisAttribut 952 logFinalCollimatorIORT -> SetVisAttributes(d 953 } 954 955 ////////////////////////////////////////////// 956 /////////////////////////// MESSENGER //////// 957 ////////////////////////////////////////////// 958 959 960 void Collimator70BeamLine::SetInnerRadiusFinal 961 { 962 solidFinalCollimatorIORT -> SetInnerRadius(v 963 G4RunManager::GetRunManager() -> GeometryHas 964 G4cout<<"Inner Radius of the final collimato 965 << solidFinalCollimatorIORT -> GetInnerRadiu 966 << G4endl; 967 } 968 969 ////////////////////////////////////////////// 970 971 void Collimator70BeamLine::SetOuterRadiusFinal 972 { 973 solidFinalCollimatorIORT -> SetOuterRadius(v 974 G4RunManager::GetRunManager() -> GeometryHas 975 G4cout<<"Outer Radius of the final collimato 976 << solidFinalCollimatorIORT -> GetOuterRadiu 977 << G4endl; 978 } 979 980 ////////////////////////////////////////////// 981 982 983 984