Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 // This is the *BASIC* version of Hadrontherap 26 // This is the *BASIC* version of Hadrontherapy, a Geant4-based application 27 // See more at: http://g4advancedexamples.lngs 27 // See more at: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy 28 // 28 // 29 // Visit the Hadrontherapy web site (http://ww 29 // Visit the Hadrontherapy web site (http://www.lns.infn.it/link/Hadrontherapy) to request 30 // the *COMPLETE* version of this program, tog 30 // the *COMPLETE* version of this program, together with its documentation; 31 // Hadrontherapy (both basic and full version) 31 // Hadrontherapy (both basic and full version) are supported by the Italian INFN 32 // Institute in the framework of the MC-INFN G 32 // Institute in the framework of the MC-INFN Group 33 // 33 // 34 34 35 #include <fstream> 35 #include <fstream> 36 36 37 #include "globals.hh" 37 #include "globals.hh" 38 #include "G4SystemOfUnits.hh" 38 #include "G4SystemOfUnits.hh" 39 #include "G4Material.hh" 39 #include "G4Material.hh" 40 #include "G4Tubs.hh" 40 #include "G4Tubs.hh" 41 #include "G4Box.hh" 41 #include "G4Box.hh" 42 #include "G4LogicalVolume.hh" 42 #include "G4LogicalVolume.hh" 43 #include "G4VPhysicalVolume.hh" 43 #include "G4VPhysicalVolume.hh" 44 #include "G4ThreeVector.hh" 44 #include "G4ThreeVector.hh" 45 #include "G4PVPlacement.hh" 45 #include "G4PVPlacement.hh" 46 #include "G4Transform3D.hh" 46 #include "G4Transform3D.hh" 47 #include "G4RotationMatrix.hh" 47 #include "G4RotationMatrix.hh" 48 #include "G4VisAttributes.hh" 48 #include "G4VisAttributes.hh" 49 #include "G4Colour.hh" 49 #include "G4Colour.hh" 50 #include "HadrontherapyModulator.hh" 50 #include "HadrontherapyModulator.hh" 51 #include "G4Transform3D.hh" 51 #include "G4Transform3D.hh" 52 #include "G4ios.hh" 52 #include "G4ios.hh" 53 #include "G4RunManager.hh" 53 #include "G4RunManager.hh" 54 #include "G4NistManager.hh" 54 #include "G4NistManager.hh" 55 #include <iostream> << 56 55 57 HadrontherapyModulator::HadrontherapyModulator << 56 HadrontherapyModulator::HadrontherapyModulator():physiMotherMod(0), >> 57 solidMod0(0), logicMod0(0), physiMod0(0), 58 solidMod1(0), logicMod1(0 58 solidMod1(0), logicMod1(0), physiMod1(0), 59 solidMod2(0), logicMod2(0 59 solidMod2(0), logicMod2(0), physiMod2(0), 60 solidMod3(0), logicMod3(0 60 solidMod3(0), logicMod3(0), physiMod3(0), 61 solidMod4(0), logicMod4(0 61 solidMod4(0), logicMod4(0), physiMod4(0), 62 FileName("Modulators/Modulator010 << 62 solidMod5(0), logicMod5(0), physiMod5(0), 63 { << 63 solidMod6(0), logicMod6(0), physiMod6(0), 64 pi=4*std::atan(1.); << 64 solidMod7(0), logicMod7(0), physiMod7(0), 65 StepNumbers=22; << 65 solidMod8(0), logicMod8(0), physiMod8(0), 66 Weight=new G4double[StepNumbers]; << 66 solidMod9(0), logicMod9(0), physiMod9(0), 67 StepThickness=new G4double[StepNumbers]; << 67 solidMod10(0), logicMod10(0), physiMod10(0), 68 StartingAngle=new G4double[StepNumbers]; << 68 solidMod11(0), logicMod11(0), physiMod11(0), 69 SpanningAngle=new G4double[StepNumbers]; << 69 solidMod12(0), logicMod12(0), physiMod12(0), 70 PositionMod=new G4ThreeVector[StepNumbers]; << 70 solidMod13(0), logicMod13(0), physiMod13(0), 71 << 71 solidMod14(0), logicMod14(0), physiMod14(0), 72 << 72 solidMod15(0), logicMod15(0), physiMod15(0), 73 solidMod=new G4Tubs *[StepNumbers]; << 73 solidMod16(0), logicMod16(0), physiMod16(0), 74 logicMod=new G4LogicalVolume *[StepNumbers] << 74 solidMod17(0), logicMod17(0), physiMod17(0), 75 physiMod=new G4VPhysicalVolume *[(4*(StepNu << 75 solidMod18(0), logicMod18(0), physiMod18(0), 76 << 76 solidMod20(0), logicMod20(0), physiMod20(0), 77 for (G4int i=0;i<StepNumbers;i++) << 77 solidMod21(0), logicMod21(0), physiMod21(0), 78 { << 78 solidMod22(0), logicMod22(0), physiMod22(0), 79 Weight[i]=0; << 79 solidMod23(0), logicMod23(0), physiMod23(0), 80 StepThickness[i]=0; << 80 solidMod24(0), logicMod24(0), physiMod24(0), 81 StartingAngle[i]=0; << 81 solidMod25(0), logicMod25(0), physiMod25(0), 82 SpanningAngle[i]=0; << 82 solidMod26(0), logicMod26(0), physiMod26(0), 83 PositionMod[i]=G4ThreeVector(0,0,0); << 83 solidMod27(0), logicMod27(0), physiMod27(0), 84 solidMod[i]=0; << 84 solidMod28(0), logicMod28(0), physiMod28(0), 85 logicMod[i]=0; << 85 solidMod29(0), logicMod29(0), physiMod29(0), 86 << 86 solidMod30(0), logicMod30(0), physiMod30(0), 87 } << 87 solidMod31(0), logicMod31(0), physiMod31(0), 88 << 88 solidMod32(0), logicMod32(0), physiMod32(0), 89 for (G4int i=0;i<4*(StepNumbers-1)+1;i++) << 89 solidMod33(0), logicMod33(0), physiMod33(0), 90 { << 90 solidMod34(0), logicMod34(0), physiMod34(0), 91 physiMod[i]=0; << 91 solidMod35(0), logicMod35(0), physiMod35(0), 92 } << 92 solidMod36(0), logicMod36(0), physiMod36(0), 93 << 93 solidMod37(0), logicMod37(0), physiMod37(0), 94 << 94 solidMod38(0), logicMod38(0), physiMod38(0), 95 ModulatorMessenger = new HadrontherapyModul << 95 solidMod40(0), logicMod40(0), physiMod40(0), 96 ModulatorDefaultProperties(); << 96 solidMod41(0), logicMod41(0), physiMod41(0), >> 97 solidMod42(0), logicMod42(0), physiMod42(0), >> 98 solidMod43(0), logicMod43(0), physiMod43(0), >> 99 solidMod44(0), logicMod44(0), physiMod44(0), >> 100 solidMod45(0), logicMod45(0), physiMod45(0), >> 101 solidMod46(0), logicMod46(0), physiMod46(0), >> 102 solidMod47(0), logicMod47(0), physiMod47(0), >> 103 solidMod48(0), logicMod48(0), physiMod48(0), >> 104 solidMod49(0), logicMod49(0), physiMod49(0), >> 105 solidMod50(0), logicMod50(0), physiMod50(0), >> 106 solidMod51(0), logicMod51(0), physiMod51(0), >> 107 solidMod52(0), logicMod52(0), physiMod52(0), >> 108 solidMod53(0), logicMod53(0), physiMod53(0), >> 109 solidMod54(0), logicMod54(0), physiMod54(0), >> 110 solidMod55(0), logicMod55(0), physiMod55(0), >> 111 solidMod56(0), logicMod56(0), physiMod56(0), >> 112 solidMod57(0), logicMod57(0), physiMod57(0), >> 113 solidMod58(0), logicMod58(0), physiMod58(0), >> 114 solidMod60(0), logicMod60(0), physiMod60(0), >> 115 solidMod61(0), logicMod61(0), physiMod61(0), >> 116 solidMod62(0), logicMod62(0), physiMod62(0), >> 117 solidMod63(0), logicMod63(0), physiMod63(0), >> 118 solidMod64(0), logicMod64(0), physiMod64(0), >> 119 solidMod65(0), logicMod65(0), physiMod65(0), >> 120 solidMod66(0), logicMod66(0), physiMod66(0), >> 121 solidMod67(0), logicMod67(0), physiMod67(0), >> 122 solidMod68(0), logicMod68(0), physiMod68(0), >> 123 solidMod69(0), logicMod69(0), physiMod69(0), >> 124 solidMod70(0), logicMod70(0), physiMod70(0), >> 125 solidMod71(0), logicMod71(0), physiMod71(0), >> 126 solidMod72(0), logicMod72(0), physiMod72(0), >> 127 solidMod73(0), logicMod73(0), physiMod73(0), >> 128 solidMod74(0), logicMod74(0), physiMod74(0), >> 129 solidMod75(0), logicMod75(0), physiMod75(0), >> 130 solidMod76(0), logicMod76(0), physiMod76(0), >> 131 solidMod77(0), logicMod77(0), physiMod77(0), >> 132 solidMod78(0), logicMod78(0), physiMod78(0) >> 133 { 97 rm = new G4RotationMatrix(); 134 rm = new G4RotationMatrix(); 98 G4double phi = 270. *deg; 135 G4double phi = 270. *deg; 99 rm -> rotateY(phi); 136 rm -> rotateY(phi); 100 } 137 } 101 ////////////////////////////////////////////// 138 ///////////////////////////////////////////////////////////////////////////// 102 HadrontherapyModulator::~HadrontherapyModulato 139 HadrontherapyModulator::~HadrontherapyModulator() 103 { 140 { 104 delete rm; 141 delete rm; 105 delete [] Weight; << 106 delete [] StepThickness; << 107 delete [] StartingAngle; << 108 delete [] SpanningAngle; << 109 delete [] PositionMod; << 110 delete [] solidMod; << 111 delete [] logicMod; << 112 delete [] physiMod; << 113 delete ModulatorMessenger; << 114 } 142 } 115 << 116 ////////////////////////////////////////////// 143 ///////////////////////////////////////////////////////////////////////////// 117 void HadrontherapyModulator::ModulatorDefaultP << 118 { << 119 /* Here we initialize the step properties of M << 120 specific modulator by changing the values in t << 121 file and activate reading from file via a macr << 122 << 123 StepThickness[0]=0; Weight[0]=.14445; << 124 StepThickness[1]=.8; Weight[1]=.05665; << 125 StepThickness[2]=1.6; Weight[2]=.05049; << 126 StepThickness[3]=2.4; Weight[3]=.04239; << 127 StepThickness[4]=3.2; Weight[4]=.04313; << 128 StepThickness[5]=4.0; Weight[5]=.03879; << 129 StepThickness[6]=4.8; Weight[6]=.04182; << 130 StepThickness[7]=5.6; Weight[7]=.03422; << 131 StepThickness[8]=6.4; Weight[8]=.03469; << 132 StepThickness[9]=7.2; Weight[9]=.03589; << 133 StepThickness[10]=8.0; Weight[10]=.03633; << 134 StepThickness[11]=8.8; Weight[11]=.03842; << 135 StepThickness[12]=9.6; Weight[12]=.03688; << 136 StepThickness[13]=10.4; Weight[13]=.03705; << 137 StepThickness[14]=11.2; Weight[14]=.03773; << 138 StepThickness[15]=12.0; Weight[15]=.03968; << 139 StepThickness[16]=12.8; Weight[16]=.04058; << 140 StepThickness[17]=13.6; Weight[17]=.03903; << 141 StepThickness[18]=14.4; Weight[18]=.04370; << 142 StepThickness[19]=15.2; Weight[19]=.03981; << 143 StepThickness[20]=16.0; Weight[20]=.05226; << 144 StepThickness[21]=16.8; Weight[21]=.03603; << 145 GetStepInformation(); << 146 << 147 } << 148 ////////////////////////////////////////////// << 149 void HadrontherapyModulator:: ModulatorPropert << 150 { << 151 delete [] Weight; << 152 delete [] StepThickness; << 153 delete [] StartingAngle; << 154 delete [] SpanningAngle; << 155 delete [] PositionMod; << 156 delete [] solidMod; << 157 delete [] logicMod; << 158 delete [] physiMod; << 159 delete solidMod1; << 160 delete logicMod1; << 161 delete physiMod1; << 162 delete solidMod2; << 163 delete logicMod2; << 164 delete physiMod2; << 165 delete solidMod3; << 166 delete logicMod3; << 167 delete physiMod3; << 168 delete solidMod4; << 169 delete logicMod4; << 170 delete physiMod4; << 171 // The Modulator wheel properties is getting f << 172 File.open(Name, std::ios::in); << 173 if(!File.is_open()) << 174 { << 175 G4cout<<" WARNING: The File with name of "<< << 176 " doesn't exist to get modulator step propert << 177 << 178 G4Exception("HadrontherapyModulator::Modulato << 179 , FatalException, "Error: No available extern << 180 } << 181 << 182 G4String string; << 183 File >>string>> StepNumbers; << 184 File >>string>>string>>string; << 185 << 186 << 187 Weight=new G4double[StepNumbers]; << 188 StepThickness=new G4double[StepNumbers]; << 189 StartingAngle=new G4double[StepNumbers]; << 190 SpanningAngle=new G4double[StepNumbers]; << 191 PositionMod=new G4ThreeVector[StepNumbers]; << 192 << 193 << 194 solidMod=new G4Tubs *[StepNumbers]; << 195 logicMod=new G4LogicalVolume *[StepNumbers] << 196 physiMod=new G4VPhysicalVolume *[(4*(StepNu << 197 << 198 for(G4int i=0;i<StepNumbers;i++) << 199 { << 200 G4String stringX; << 201 File>>stringX>> StepThickness[i]>>Weight[i] << 202 } << 203 << 204 GetStepInformation(); << 205 BuildSteps(); << 206 << 207 << 208 << 209 } << 210 ////////////////////////////////////////////// << 211 void HadrontherapyModulator::GetStepInformatio << 212 { << 213 << 214 G4double TotalWeight=0; << 215 // convert the absolute weight values to rela << 216 for(G4int i=0;i<StepNumbers;i++) << 217 { << 218 TotalWeight+=Weight[i]; << 219 } << 220 << 221 for(G4int i=0;i<StepNumbers;i++) << 222 { << 223 Weight[i]=Weight[i]/TotalWeight; << 224 } << 225 << 226 // To build the RMW step layers will be put o << 227 << 228 StartingAngle[0]=0 *deg; << 229 SpanningAngle[0]=90 *deg; << 230 G4double PositionModx; << 231 G4double WholeStartingAngle=0 *deg; << 232 G4double WholeThickness=0; << 233 for(G4int i=1;i<StepNumbers;i++) << 234 { << 235 StartingAngle[i]=WholeStartingAngle+(Weigh << 236 SpanningAngle[i]=90* deg -2*StartingAngle[ << 237 StepThickness[i]=StepThickness[i]-WholeThi << 238 PositionModx=WholeThickness+StepThickness[ << 239 PositionMod[i]=G4ThreeVector(0,0,PositionM << 240 WholeThickness+=StepThickness[i]; << 241 WholeStartingAngle=StartingAngle[i]; << 242 } << 243 << 244 << 245 } << 246 ////////////////////////////////////////////// << 247 void HadrontherapyModulator::BuildModulator(G4 144 void HadrontherapyModulator::BuildModulator(G4VPhysicalVolume* motherVolume) 248 { 145 { 249 G4bool isotopes = false; 146 G4bool isotopes = false; 250 G4Material* airNist = G4NistManager::Instan 147 G4Material* airNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_AIR", isotopes); 251 148 >> 149 // You have to uncomment the following line if you want to define a PMMA material >> 150 // G4Material* PMMANist = G4NistManager::Instance()->FindOrBuildMaterial("G4_PLEXIGLASS", isotopes); 252 151 253 Mod0Mater = airNist; << 152 G4Material* Mod0Mater = airNist; 254 ModMater = airNist; // You have to change m << 153 G4Material* ModMater = airNist; // You have to set ModMater to PMMANist if you want to change modulator material (default is air) 255 154 256 innerRadiusOfTheTube = 2.5 *cm; << 155 G4double innerRadiusOfTheTube = 2.5 *cm; 257 outerRadiusOfTheTube = 9.5 *cm; << 156 G4double outerRadiusOfTheTube = 9.5 *cm; >> 157 G4double hightOfTheTube = 0.03*cm; 258 158 259 // Mother of the modulator wheel 159 // Mother of the modulator wheel 260 G4ThreeVector positionMotherMod = G4ThreeVec 160 G4ThreeVector positionMotherMod = G4ThreeVector(-2160.50 *mm, 30 *mm, 50 *mm); 261 161 262 G4Box* solidMotherMod = new G4Box("MotherMod 162 G4Box* solidMotherMod = new G4Box("MotherMod", 12 *cm, 12 *cm, 12 *cm); 263 163 264 logicMotherMod = new G4LogicalVolume(solidMo << 164 G4LogicalVolume * logicMotherMod = new G4LogicalVolume(solidMotherMod, Mod0Mater,"MotherMod",0,0,0); 265 165 266 physiMotherMod = new G4PVPlacement(rm,positi 166 physiMotherMod = new G4PVPlacement(rm,positionMotherMod, "MotherMod", 267 logicMotherMod, 167 logicMotherMod, 268 motherVolume, 168 motherVolume, 269 false, 169 false, 270 0); << 170 0); 271 BuildSteps(); << 171 272 << 273 << 274 << 275 } << 276 ///////////////////////////////////////////// << 277 void HadrontherapyModulator::BuildSteps() << 278 { << 279 //------------------------------------------ 172 //---------------------------------------------------------- 280 // Mother volume of first quarter of the mod 173 // Mother volume of first quarter of the modulator 281 //------------------------------------------ 174 //---------------------------------------------------------- 282 175 283 G4double hightOfTheTube0 = 10.0 *cm; << 176 G4double hightOfTheTube0 = 5.0 *cm; 284 G4double startAngleOfTheTube0 = 0 *deg; << 177 G4double startAngleOfTheTube0 = 45 *deg; 285 G4double spanningAngleOfTheTube0 = 90 *deg; 178 G4double spanningAngleOfTheTube0 = 90 *deg; 286 179 287 G4RotationMatrix rm1; << 180 G4RotationMatrix rm2; 288 rm1.rotateZ(0 *deg); << 181 rm2.rotateZ(0 *deg); 289 182 290 G4ThreeVector positionMod1 = G4ThreeVector(0 << 183 G4ThreeVector positionMod0 = G4ThreeVector(0*cm,0*cm,0*cm); 291 184 292 solidMod1 = new G4Tubs("Mod1", << 185 solidMod0 = new G4Tubs("Mod0", 293 innerRadiusOfTheTube, 186 innerRadiusOfTheTube, 294 outerRadiusOfTheTube, 187 outerRadiusOfTheTube, 295 hightOfTheTube0/2., << 188 hightOfTheTube0, 296 startAngleOfTheTube0, 189 startAngleOfTheTube0, 297 spanningAngleOfTheTube0); 190 spanningAngleOfTheTube0); 298 191 299 logicMod1 = new G4LogicalVolume(solidMod1, M << 192 logicMod0 = new G4LogicalVolume(solidMod0, Mod0Mater, "Mod0",0,0,0); 300 193 301 physiMod1 = new G4PVPlacement(G4Transform3D( << 194 physiMod0 = new G4PVPlacement(G4Transform3D(rm2, positionMod0), 302 logicMod1, << 195 logicMod0, 303 "Mod1", << 196 "Mod0", 304 logicMotherMod, 197 logicMotherMod, 305 false, 198 false, 306 0); 199 0); 307 200 308 201 309 //------------------------------------------ 202 //---------------------------------------------------------- 310 // modulator steps << 203 // First modulator sclice 311 //------------------------------------------ 204 //---------------------------------------------------------- 312 for (G4int i=1;i<StepNumbers;i++) << 205 313 { << 206 G4double startAngleOfTheTube1 = 54.267*deg; >> 207 G4double spanningAngleOfTheTube1 = 71.466*deg; 314 208 315 solidMod[i] = new G4Tubs("Modstep", << 209 >> 210 G4ThreeVector positionMod1 = G4ThreeVector(0*cm,0*cm,0.51*cm); >> 211 solidMod1 = new G4Tubs("Mod1", 316 innerRadiusOfTheTube, 212 innerRadiusOfTheTube, 317 outerRadiusOfTheTube, 213 outerRadiusOfTheTube, 318 StepThickness[i]/2., << 214 hightOfTheTube, 319 StartingAngle[i], << 215 startAngleOfTheTube1, 320 SpanningAngle[i]); << 216 spanningAngleOfTheTube1); 321 217 322 logicMod[i] = new G4LogicalVolume(solidMod[i << 218 logicMod1 = new G4LogicalVolume(solidMod1, ModMater, "Mod1",0,0,0); 323 ModMater, " << 219 physiMod1 = new G4PVPlacement(0, 324 << 220 positionMod1, 325 physiMod[i] = new G4PVPlacement(0, << 326 PositionMod[i], << 327 logicMod[i], << 328 "Modstep", << 329 logicMod1, 221 logicMod1, >> 222 "Mod1", >> 223 logicMod0, >> 224 false, >> 225 0); >> 226 >> 227 >> 228 //---------------------------------------------------------- >> 229 // Second modulator slice >> 230 //---------------------------------------------------------- >> 231 >> 232 G4double startAngleOfTheTube2 = 57.714*deg; >> 233 G4double spanningAngleOfTheTube2 = 64.572*deg; >> 234 >> 235 >> 236 >> 237 G4ThreeVector positionMod2 = G4ThreeVector(0*cm,0*cm,0.45*cm); >> 238 solidMod2 = new G4Tubs("Mod2", >> 239 innerRadiusOfTheTube, >> 240 outerRadiusOfTheTube, >> 241 hightOfTheTube, >> 242 startAngleOfTheTube2, >> 243 spanningAngleOfTheTube2); >> 244 >> 245 logicMod2 = new G4LogicalVolume(solidMod2, ModMater, "Mod2",0,0,0); >> 246 physiMod2 = new G4PVPlacement(0, >> 247 positionMod2, >> 248 logicMod2, >> 249 "Mod2", >> 250 logicMod0, 330 false, 251 false, 331 0); << 252 0); 332 << 253 333 << 254 334 } << 255 //---------------------------------------------------------- >> 256 // 3th modulator slice >> 257 //---------------------------------------------------------- >> 258 >> 259 G4double startAngleOfTheTube3 = 60.478*deg; >> 260 G4double spanningAngleOfTheTube3 = 59.044*deg; >> 261 >> 262 >> 263 >> 264 G4ThreeVector positionMod3 = G4ThreeVector(0*cm,0*cm,0.39*cm); >> 265 solidMod3 = new G4Tubs("Mod3", >> 266 innerRadiusOfTheTube, >> 267 outerRadiusOfTheTube, >> 268 hightOfTheTube, >> 269 startAngleOfTheTube3, >> 270 spanningAngleOfTheTube3); >> 271 >> 272 logicMod3 = new G4LogicalVolume(solidMod3, ModMater, "Mod3",0,0,0); >> 273 physiMod3 = new G4PVPlacement(0, >> 274 positionMod3, >> 275 logicMod3, >> 276 "Mod3", >> 277 logicMod0, >> 278 false, >> 279 0); >> 280 >> 281 >> 282 //---------------------------------------------------------- >> 283 // >> 284 //---------------------------------------------------------- >> 285 >> 286 G4double startAngleOfTheTube4 = 62.668*deg; >> 287 G4double spanningAngleOfTheTube4 = 54.664*deg; >> 288 >> 289 >> 290 G4ThreeVector positionMod4 = G4ThreeVector(0*cm,0*cm,0.33*cm); >> 291 solidMod4 = new G4Tubs("Mod4", >> 292 innerRadiusOfTheTube, >> 293 outerRadiusOfTheTube, >> 294 hightOfTheTube, >> 295 startAngleOfTheTube4, >> 296 spanningAngleOfTheTube4); >> 297 >> 298 logicMod4 = new G4LogicalVolume(solidMod4, ModMater, "Mod4",0,0,0); >> 299 physiMod4 = new G4PVPlacement(0, // no rotation >> 300 positionMod4, // at (x,y,z) >> 301 logicMod4, // its logical volume >> 302 "Mod4", // its name >> 303 logicMod0, // its mother volume >> 304 false, // no boolean operations >> 305 0); // no particular field >> 306 >> 307 >> 308 //---------------------------------------------------------- >> 309 //Quinta fetta Modulatore >> 310 //---------------------------------------------------------- >> 311 >> 312 G4double startAngleOfTheTube5 = 64.814*deg; >> 313 G4double spanningAngleOfTheTube5 = 50.372*deg; >> 314 >> 315 >> 316 G4ThreeVector positionMod5 = G4ThreeVector(0*cm,0*cm,0.27*cm); >> 317 solidMod5 = new G4Tubs("Mod5", >> 318 innerRadiusOfTheTube, >> 319 outerRadiusOfTheTube, >> 320 hightOfTheTube, >> 321 startAngleOfTheTube5, >> 322 spanningAngleOfTheTube5); >> 323 >> 324 logicMod5 = new G4LogicalVolume(solidMod5, ModMater, "Mod5",0,0,0); >> 325 physiMod5 = new G4PVPlacement(0, // no rotation >> 326 positionMod5, // at (x,y,z) >> 327 logicMod5, // its logical volume >> 328 "Mod5", // its name >> 329 logicMod0, // its mother volume >> 330 false, // no boolean operations >> 331 0); // no particular field >> 332 >> 333 >> 334 //---------------------------------------------------------- >> 335 //Sesta fetta Modulatore >> 336 //---------------------------------------------------------- 335 337 336 ///////////////////////////////////////////// << 338 G4double startAngleOfTheTube6 = 66.706*deg; >> 339 G4double spanningAngleOfTheTube6 = 46.588*deg; >> 340 >> 341 >> 342 G4ThreeVector positionMod6 = G4ThreeVector(0*cm,0*cm,0.21*cm); >> 343 solidMod6 = new G4Tubs("Mod6", >> 344 innerRadiusOfTheTube, >> 345 outerRadiusOfTheTube, >> 346 hightOfTheTube, >> 347 startAngleOfTheTube6, >> 348 spanningAngleOfTheTube6); >> 349 >> 350 logicMod6 = new G4LogicalVolume(solidMod6, ModMater, "Mod6",0,0,0); >> 351 physiMod6 = new G4PVPlacement(0, // no rotation >> 352 positionMod6, // at (x,y,z) >> 353 logicMod6, // its logical volume >> 354 "Mod6", // its name >> 355 logicMod0, // its mother volume >> 356 false, // no boolean operations >> 357 0); // no particular field >> 358 >> 359 >> 360 //---------------------------------------------------------- >> 361 //Settima fetta Modulatore >> 362 //---------------------------------------------------------- >> 363 >> 364 G4double startAngleOfTheTube7 = 68.648*deg; >> 365 G4double spanningAngleOfTheTube7 = 42.704*deg; >> 366 >> 367 >> 368 >> 369 G4ThreeVector positionMod7 = G4ThreeVector(0*cm,0*cm,0.15*cm); >> 370 solidMod7 = new G4Tubs("Mod7", >> 371 innerRadiusOfTheTube, >> 372 outerRadiusOfTheTube, >> 373 hightOfTheTube, >> 374 startAngleOfTheTube7, >> 375 spanningAngleOfTheTube7); >> 376 >> 377 logicMod7 = new G4LogicalVolume(solidMod7, ModMater, "Mod7",0,0,0); >> 378 physiMod7 = new G4PVPlacement(0, // no rotation >> 379 positionMod7, // at (x,y,z) >> 380 logicMod7, // its logical volume >> 381 "Mod7", // its name >> 382 logicMod0, // its mother volume >> 383 false, // no boolean operations >> 384 0); // no particular field >> 385 >> 386 >> 387 >> 388 //---------------------------------------------------------- >> 389 //Ottava fetta Modulatore >> 390 //---------------------------------------------------------- >> 391 >> 392 G4double startAngleOfTheTube8 = 70.472*deg; >> 393 G4double spanningAngleOfTheTube8 = 39.056*deg; >> 394 >> 395 >> 396 G4ThreeVector positionMod8 = G4ThreeVector(0*cm,0*cm,0.09*cm); >> 397 solidMod8 = new G4Tubs("Mod8", >> 398 innerRadiusOfTheTube, >> 399 outerRadiusOfTheTube, >> 400 hightOfTheTube, >> 401 startAngleOfTheTube8, >> 402 spanningAngleOfTheTube8); >> 403 >> 404 logicMod8 = new G4LogicalVolume(solidMod8, ModMater, "Mod8",0,0,0); >> 405 physiMod8 = new G4PVPlacement(0, // no rotation >> 406 positionMod8, // at (x,y,z) >> 407 logicMod8, // its logical volume >> 408 "Mod8", // its name >> 409 logicMod0, // its mother volume >> 410 false, // no boolean operations >> 411 0); // no particular field >> 412 >> 413 >> 414 >> 415 >> 416 //---------------------------------------------------------- >> 417 //Nona fetta Modulatore >> 418 //---------------------------------------------------------- >> 419 >> 420 G4double startAngleOfTheTube9 = 72.288*deg; >> 421 G4double spanningAngleOfTheTube9 = 35.424*deg; >> 422 >> 423 >> 424 G4ThreeVector positionMod9 = G4ThreeVector(0*cm,0*cm,0.03*cm); >> 425 solidMod9 = new G4Tubs("Mod9", >> 426 innerRadiusOfTheTube, >> 427 outerRadiusOfTheTube, >> 428 hightOfTheTube, >> 429 startAngleOfTheTube9, >> 430 spanningAngleOfTheTube9); >> 431 >> 432 logicMod9 = new G4LogicalVolume(solidMod9, ModMater, "Mod9",0,0,0); >> 433 physiMod9 = new G4PVPlacement(0, // no rotation >> 434 positionMod9, // at (x,y,z) >> 435 logicMod9, // its logical volume >> 436 "Mod9", // its name >> 437 logicMod0, // its mother volume >> 438 false, // no boolean operations >> 439 0); // no particular field >> 440 >> 441 >> 442 //---------------------------------------------------------- >> 443 //Decima fetta Modulatore >> 444 //---------------------------------------------------------- >> 445 >> 446 G4double startAngleOfTheTube10 = 74.061*deg; >> 447 G4double spanningAngleOfTheTube10 = 31.878*deg; >> 448 >> 449 >> 450 G4ThreeVector positionMod10 = G4ThreeVector(0*cm,0*cm,-0.03*cm); >> 451 solidMod10 = new G4Tubs("Mod10", >> 452 innerRadiusOfTheTube, >> 453 outerRadiusOfTheTube, >> 454 hightOfTheTube, >> 455 startAngleOfTheTube10, >> 456 spanningAngleOfTheTube10); >> 457 >> 458 logicMod10 = new G4LogicalVolume(solidMod10, ModMater, "Mod10",0,0,0); >> 459 physiMod10 = new G4PVPlacement(0, // no rotation >> 460 positionMod10, // at (x,y,z) >> 461 logicMod10, // its logical volume >> 462 "Mod10", // its name >> 463 logicMod0, // its mother volume >> 464 false, // no boolean operations >> 465 0); // no particular field >> 466 >> 467 //---------------------------------------------------------- >> 468 // Undicesima fetta Modulatore >> 469 //---------------------------------------------------------- >> 470 >> 471 G4double startAngleOfTheTube11 = 75.793*deg; >> 472 G4double spanningAngleOfTheTube11 = 28.414*deg; >> 473 >> 474 >> 475 G4ThreeVector positionMod11 = G4ThreeVector(0*cm,0*cm,-0.09*cm); >> 476 solidMod11 = new G4Tubs("Mod11", >> 477 innerRadiusOfTheTube, >> 478 outerRadiusOfTheTube, >> 479 hightOfTheTube, >> 480 startAngleOfTheTube11, >> 481 spanningAngleOfTheTube11); >> 482 >> 483 logicMod11 = new G4LogicalVolume(solidMod11, ModMater, "Mod11",0,0,0); >> 484 physiMod11 = new G4PVPlacement(0, // no rotation >> 485 positionMod11, // at (x,y,z) >> 486 logicMod11, // its logical volume >> 487 "Mod11", // its name >> 488 logicMod0, // its mother volume >> 489 false, // no boolean operations >> 490 0); // no particular field >> 491 >> 492 //---------------------------------------------------------- >> 493 //Dodicesima fetta Modulatore >> 494 //---------------------------------------------------------- >> 495 >> 496 G4double startAngleOfTheTube12 = 77.579*deg; >> 497 G4double spanningAngleOfTheTube12 = 24.842*deg; >> 498 >> 499 >> 500 >> 501 G4ThreeVector positionMod12 = G4ThreeVector(0*cm,0*cm,-0.15*cm); >> 502 solidMod12 = new G4Tubs("Mod12", >> 503 innerRadiusOfTheTube, >> 504 outerRadiusOfTheTube, >> 505 hightOfTheTube, >> 506 startAngleOfTheTube12, >> 507 spanningAngleOfTheTube12); >> 508 >> 509 logicMod12 = new G4LogicalVolume(solidMod12, ModMater, "Mod12",0,0,0); >> 510 physiMod12 = new G4PVPlacement(0, // no rotation >> 511 positionMod12, // at (x,y,z) >> 512 logicMod12, // its logical volume >> 513 "Mod12", // its name >> 514 logicMod0, // its mother volume >> 515 false, // no boolean operations >> 516 0); // no particular field >> 517 >> 518 >> 519 //---------------------------------------------------------- >> 520 //Tredicesima fetta Modulatore >> 521 //---------------------------------------------------------- >> 522 >> 523 G4double startAngleOfTheTube13 = 79.273*deg; >> 524 G4double spanningAngleOfTheTube13 = 21.454*deg; >> 525 >> 526 >> 527 G4ThreeVector positionMod13 = G4ThreeVector(0*cm,0*cm,-0.21*cm); >> 528 solidMod13 = new G4Tubs("Mod13", >> 529 innerRadiusOfTheTube, >> 530 outerRadiusOfTheTube, >> 531 hightOfTheTube, >> 532 startAngleOfTheTube13, >> 533 spanningAngleOfTheTube13); >> 534 >> 535 logicMod13 = new G4LogicalVolume(solidMod13, ModMater, "Mod13",0,0,0); >> 536 physiMod13 = new G4PVPlacement(0, // no rotation >> 537 positionMod13, // at (x,y,z) >> 538 logicMod13, // its logical volume >> 539 "Mod13", // its name >> 540 logicMod0, // its mother volume >> 541 false, // no boolean operations >> 542 0); // no particular field >> 543 >> 544 //---------------------------------------------------------- >> 545 //Quat. fetta Modulatore >> 546 //---------------------------------------------------------- >> 547 >> 548 G4double startAngleOfTheTube14 = 81.014*deg; >> 549 G4double spanningAngleOfTheTube14 = 17.972*deg; >> 550 >> 551 >> 552 G4ThreeVector positionMod14 = G4ThreeVector(0*cm,0*cm,-0.27*cm); >> 553 solidMod14 = new G4Tubs("Mod14", >> 554 innerRadiusOfTheTube, >> 555 outerRadiusOfTheTube, >> 556 hightOfTheTube, >> 557 startAngleOfTheTube14, >> 558 spanningAngleOfTheTube14); >> 559 >> 560 logicMod14 = new G4LogicalVolume(solidMod14, ModMater, "Mod14",0,0,0); >> 561 physiMod14 = new G4PVPlacement(0, // no rotation >> 562 positionMod14, // at (x,y,z) >> 563 logicMod14, // its logical volume >> 564 "Mod14", // its name >> 565 logicMod0, // its mother volume >> 566 false, // no boolean operations >> 567 0); // no particular field >> 568 >> 569 >> 570 //---------------------------------------------------------- >> 571 //Quindicesima fetta Modulatore >> 572 //---------------------------------------------------------- >> 573 >> 574 G4double startAngleOfTheTube15 = 82.695*deg; >> 575 G4double spanningAngleOfTheTube15 = 14.61*deg; >> 576 >> 577 >> 578 G4ThreeVector positionMod15 = G4ThreeVector(0*cm,0*cm,-0.33*cm); >> 579 solidMod15 = new G4Tubs("Mod15", >> 580 innerRadiusOfTheTube, >> 581 outerRadiusOfTheTube, >> 582 hightOfTheTube, >> 583 startAngleOfTheTube15, >> 584 spanningAngleOfTheTube15); >> 585 >> 586 logicMod15 = new G4LogicalVolume(solidMod15, ModMater, "Mod15",0,0,0); >> 587 physiMod15 = new G4PVPlacement(0, // no rotation >> 588 positionMod15, // at (x,y,z) >> 589 logicMod15, // its logical volume >> 590 "Mod15", // its name >> 591 logicMod0, // its mother volume >> 592 false, // no boolean operations >> 593 0); // no particular field >> 594 >> 595 //---------------------------------------------------------- >> 596 //Sedic. fetta Modulatore >> 597 //---------------------------------------------------------- >> 598 >> 599 G4double startAngleOfTheTube16 = 84.425*deg; >> 600 G4double spanningAngleOfTheTube16 = 11.15*deg; >> 601 >> 602 >> 603 G4ThreeVector positionMod16 = G4ThreeVector(0*cm,0*cm,-0.39*cm); >> 604 solidMod16 = new G4Tubs("Mod16", >> 605 innerRadiusOfTheTube, >> 606 outerRadiusOfTheTube, >> 607 hightOfTheTube, >> 608 startAngleOfTheTube16, >> 609 spanningAngleOfTheTube16); >> 610 >> 611 logicMod16 = new G4LogicalVolume(solidMod16, ModMater, "Mod16",0,0,0); >> 612 physiMod16 = new G4PVPlacement(0, // no rotation >> 613 positionMod16, // at (x,y,z) >> 614 logicMod16, // its logical volume >> 615 "Mod16", // its name >> 616 logicMod0, // its mother volume >> 617 false, // no boolean operations >> 618 0); // no particular field >> 619 >> 620 //---------------------------------------------------------- >> 621 //Dicias. fetta Modulatore >> 622 //---------------------------------------------------------- >> 623 >> 624 G4double startAngleOfTheTube17 = 86.203*deg; >> 625 G4double spanningAngleOfTheTube17 = 7.594*deg; >> 626 >> 627 >> 628 >> 629 G4ThreeVector positionMod17 = G4ThreeVector(0*cm,0*cm,-0.45*cm); >> 630 solidMod17 = new G4Tubs("Mod17", >> 631 innerRadiusOfTheTube, >> 632 outerRadiusOfTheTube, >> 633 hightOfTheTube, >> 634 startAngleOfTheTube17, >> 635 spanningAngleOfTheTube17); >> 636 >> 637 logicMod17 = new G4LogicalVolume(solidMod17, ModMater, "Mod17",0,0,0); >> 638 physiMod17 = new G4PVPlacement(0, // no rotation >> 639 positionMod17, // at (x,y,z) >> 640 logicMod17, // its logical volume >> 641 "Mod17", // its name >> 642 logicMod0, // its mother volume >> 643 false, // no boolean operations >> 644 0); // no particular field >> 645 //---------------------------------------------------------- >> 646 //Diciot. fetta Modulatore >> 647 //---------------------------------------------------------- >> 648 >> 649 G4double startAngleOfTheTube18 = 87.910*deg; >> 650 G4double spanningAngleOfTheTube18 = 4.18*deg; >> 651 >> 652 >> 653 >> 654 G4ThreeVector positionMod18 = G4ThreeVector(0*cm,0*cm,-0.51*cm); >> 655 solidMod18 = new G4Tubs("Mod18", >> 656 innerRadiusOfTheTube, >> 657 outerRadiusOfTheTube, >> 658 hightOfTheTube, >> 659 startAngleOfTheTube18, >> 660 spanningAngleOfTheTube18); >> 661 >> 662 logicMod18 = new G4LogicalVolume(solidMod18, ModMater, "Mod18",0,0,0); >> 663 physiMod18 = new G4PVPlacement(0, // no rotation >> 664 positionMod18, // at (x,y,z) >> 665 logicMod18, // its logical volume >> 666 "Mod18", // its name >> 667 logicMod0, // its mother volume >> 668 false, // no boolean operations >> 669 0); // no particular field >> 670 >> 671 >> 672 337 //------------------------------------------ 673 //---------------------------------------------------------- 338 // Mother volume of the second modulator qua 674 // Mother volume of the second modulator quarter 339 //------------------------------------------ 675 //---------------------------------------------------------- 340 676 341 677 342 G4RotationMatrix rm2; << 678 G4RotationMatrix rm20; 343 rm2.rotateZ(90 *deg); << 679 rm20.rotateZ(90 *deg); 344 680 345 G4ThreeVector positionMod2 = G4ThreeVector(0 << 681 G4ThreeVector positionMod20 = G4ThreeVector(0*cm,0*cm,0*cm); 346 682 347 solidMod2 = new G4Tubs("Mod2", << 683 solidMod20 = new G4Tubs("Mod20", 348 innerRadiusOfTheTube, 684 innerRadiusOfTheTube, 349 outerRadiusOfTheTube, 685 outerRadiusOfTheTube, 350 hightOfTheTube0/2., << 686 hightOfTheTube0, 351 startAngleOfTheTube0, 687 startAngleOfTheTube0, 352 spanningAngleOfTheTube0); 688 spanningAngleOfTheTube0); 353 689 354 logicMod2 = new G4LogicalVolume(solidMod2, << 690 logicMod20 = new G4LogicalVolume(solidMod20, Mod0Mater, "Mod0",0,0,0); 355 Mod0Mater, " << 356 691 357 692 358 physiMod2 = new G4PVPlacement(G4Transform3D( << 693 physiMod20 = new G4PVPlacement(G4Transform3D(rm20, positionMod20), 359 logicMod2, << 694 logicMod20, 360 "Mod2", << 695 "Mod20", 361 logicMotherMod, 696 logicMotherMod, 362 false, 697 false, 363 0); 698 0); >> 699 >> 700 >> 701 >> 702 >> 703 //---------------------------------------------------------- >> 704 // 1st modulator slice (2nd quarter) >> 705 //---------------------------------------------------------- >> 706 >> 707 G4ThreeVector positionMod21 = G4ThreeVector(0*cm,0*cm,0.51*cm); >> 708 solidMod21 = new G4Tubs("Mod21", >> 709 innerRadiusOfTheTube, >> 710 outerRadiusOfTheTube, >> 711 hightOfTheTube, >> 712 startAngleOfTheTube1, >> 713 spanningAngleOfTheTube1); >> 714 >> 715 logicMod21 = new G4LogicalVolume(solidMod21, ModMater, "Mod21",0,0,0); >> 716 >> 717 physiMod21 = new G4PVPlacement(0, // no rotation >> 718 positionMod21, // at (x,y,z) >> 719 logicMod21, // its logical volume >> 720 "Mod21", // its name >> 721 logicMod20, // its mother volume >> 722 false, // no boolean operations >> 723 0); // no particular field >> 724 >> 725 >> 726 //---------------------------------------------------------- >> 727 // 2nd modulator slice (2nd quarter) >> 728 //---------------------------------------------------------- >> 729 >> 730 G4ThreeVector positionMod22 = G4ThreeVector(0*cm,0*cm,0.45*cm); >> 731 >> 732 solidMod22 = new G4Tubs("Mod22", >> 733 innerRadiusOfTheTube, >> 734 outerRadiusOfTheTube, >> 735 hightOfTheTube, >> 736 startAngleOfTheTube2, >> 737 spanningAngleOfTheTube2); >> 738 >> 739 logicMod22 = new G4LogicalVolume(solidMod22, ModMater, "Mod22",0,0,0); >> 740 >> 741 physiMod22 = new G4PVPlacement(0, // no rotation >> 742 positionMod22, // at (x,y,z) >> 743 logicMod22, // its logical volume >> 744 "Mod22", // its name >> 745 logicMod20, // its mother volume >> 746 false, // no boolean operations >> 747 0); // no particular field >> 748 >> 749 >> 750 //---------------------------------------------------------- >> 751 // 3rd modulator slice (2nd quarter) >> 752 //---------------------------------------------------------- 364 753 >> 754 G4ThreeVector positionMod23 = G4ThreeVector(0*cm,0*cm,0.39*cm); 365 755 366 for (G4int i=1;i<StepNumbers;i++) << 756 solidMod23 = new G4Tubs("Mod23", 367 { << 757 innerRadiusOfTheTube, 368 << 758 outerRadiusOfTheTube, 369 physiMod[StepNumbers+i-1] = new G4PVPlacemen << 759 hightOfTheTube, 370 PositionMod[i], << 760 startAngleOfTheTube3, 371 logicMod[i], << 761 spanningAngleOfTheTube3); 372 "Modstep", << 762 373 logicMod2, << 763 logicMod23 = new G4LogicalVolume(solidMod23, ModMater, "Mod23",0,0,0); 374 false, << 764 physiMod23 = new G4PVPlacement(0, // no rotation 375 0); << 765 positionMod23, // at (x,y,z) 376 << 766 logicMod23, // its logical volume 377 } << 767 "Mod23", // its name >> 768 logicMod20, // its mother volume >> 769 false, // no boolean operations >> 770 0); // no particular field >> 771 >> 772 >> 773 //---------------------------------------------------------- >> 774 // 4th modulator slice (2nd quarter) >> 775 //---------------------------------------------------------- >> 776 >> 777 >> 778 G4ThreeVector positionMod24 = G4ThreeVector(0*cm,0*cm,0.33*cm); >> 779 >> 780 solidMod24 = new G4Tubs("Mod24", >> 781 innerRadiusOfTheTube, >> 782 outerRadiusOfTheTube, >> 783 hightOfTheTube, >> 784 startAngleOfTheTube4, >> 785 spanningAngleOfTheTube4); >> 786 >> 787 logicMod24 = new G4LogicalVolume(solidMod24, ModMater, "Mod24",0,0,0); >> 788 >> 789 physiMod24 = new G4PVPlacement(0, // no rotation >> 790 positionMod24, // at (x,y,z) >> 791 logicMod24, // its logical volume >> 792 "Mod24", // its name >> 793 logicMod20, // its mother volume >> 794 false, // no boolean operations >> 795 0); // no particular field >> 796 >> 797 >> 798 //---------------------------------------------------------- >> 799 //Quinta fetta Modulatore 2 >> 800 //---------------------------------------------------------- >> 801 >> 802 >> 803 >> 804 G4ThreeVector positionMod25 = G4ThreeVector(0*cm,0*cm,0.27*cm); >> 805 >> 806 solidMod25 = new G4Tubs("Mod25", >> 807 innerRadiusOfTheTube, >> 808 outerRadiusOfTheTube, >> 809 hightOfTheTube, >> 810 startAngleOfTheTube5, >> 811 spanningAngleOfTheTube5); >> 812 >> 813 logicMod25 = new G4LogicalVolume(solidMod25, ModMater, "Mod25",0,0,0); >> 814 physiMod25 = new G4PVPlacement(0, // no rotation >> 815 positionMod25, // at (x,y,z) >> 816 logicMod25, // its logical volume >> 817 "Mod25", // its name >> 818 logicMod20, // its mother volume >> 819 false, // no boolean operations >> 820 0); // no particular field >> 821 >> 822 >> 823 //---------------------------------------------------------- >> 824 //Sesta fetta Modulatore 2 >> 825 //---------------------------------------------------------- >> 826 >> 827 >> 828 G4ThreeVector positionMod26 = G4ThreeVector(0*cm,0*cm,0.21*cm); >> 829 solidMod26 = new G4Tubs("Mod26", >> 830 innerRadiusOfTheTube, >> 831 outerRadiusOfTheTube, >> 832 hightOfTheTube, >> 833 startAngleOfTheTube6, >> 834 spanningAngleOfTheTube6); >> 835 >> 836 logicMod26 = new G4LogicalVolume(solidMod26, ModMater, "Mod26",0,0,0); >> 837 physiMod26 = new G4PVPlacement(0, // no rotation >> 838 positionMod26, // at (x,y,z) >> 839 logicMod26, // its logical volume >> 840 "Mod26", // its name >> 841 logicMod20, // its mother volume >> 842 false, // no boolean operations >> 843 0); // no particular field >> 844 >> 845 >> 846 //---------------------------------------------------------- >> 847 //Settima fetta Modulatore 2 >> 848 //---------------------------------------------------------- >> 849 >> 850 >> 851 G4ThreeVector positionMod27 = G4ThreeVector(0*cm,0*cm,0.15*cm); >> 852 >> 853 solidMod27 = new G4Tubs("Mod27", >> 854 innerRadiusOfTheTube, >> 855 outerRadiusOfTheTube, >> 856 hightOfTheTube, >> 857 startAngleOfTheTube7, >> 858 spanningAngleOfTheTube7); >> 859 >> 860 logicMod27 = new G4LogicalVolume(solidMod27, ModMater, "Mod27",0,0,0); >> 861 physiMod27 = new G4PVPlacement(0, // no rotation >> 862 positionMod27, // at (x,y,z) >> 863 logicMod27, // its logical volume >> 864 "Mod27", // its name >> 865 logicMod20, // its mother volume >> 866 false, // no boolean operations >> 867 0); // no particular field >> 868 >> 869 >> 870 >> 871 //---------------------------------------------------------- >> 872 //Ottava fetta Modulatore 2 >> 873 //---------------------------------------------------------- >> 874 >> 875 >> 876 >> 877 >> 878 G4ThreeVector positionMod28 = G4ThreeVector(0*cm,0*cm,0.09*cm); >> 879 solidMod28 = new G4Tubs("Mod28", >> 880 innerRadiusOfTheTube, >> 881 outerRadiusOfTheTube, >> 882 hightOfTheTube, >> 883 startAngleOfTheTube8, >> 884 spanningAngleOfTheTube8); >> 885 >> 886 logicMod28 = new G4LogicalVolume(solidMod28, ModMater, "Mod28",0,0,0); >> 887 physiMod28 = new G4PVPlacement(0, // no rotation >> 888 positionMod28, // at (x,y,z) >> 889 logicMod28, // its logical volume >> 890 "Mod28", // its name >> 891 logicMod20, // its mother volume >> 892 false, // no boolean operations >> 893 0); // no particular field >> 894 >> 895 >> 896 >> 897 >> 898 //---------------------------------------------------------- >> 899 //Nona fetta Modulatore 3 >> 900 //---------------------------------------------------------- >> 901 >> 902 >> 903 >> 904 G4ThreeVector positionMod29 = G4ThreeVector(0*cm,0*cm,0.03*cm); >> 905 solidMod29 = new G4Tubs("Mod29", >> 906 innerRadiusOfTheTube, >> 907 outerRadiusOfTheTube, >> 908 hightOfTheTube, >> 909 startAngleOfTheTube9, >> 910 spanningAngleOfTheTube9); >> 911 >> 912 logicMod29 = new G4LogicalVolume(solidMod29, ModMater, "Mod29",0,0,0); >> 913 physiMod29 = new G4PVPlacement(0, // no rotation >> 914 positionMod29, // at (x,y,z) >> 915 logicMod29, // its logical volume >> 916 "Mod29", // its name >> 917 logicMod20, // its mother volume >> 918 false, // no boolean operations >> 919 0); // no particular field >> 920 >> 921 >> 922 //---------------------------------------------------------- >> 923 //Decima fetta Modulatore 3 >> 924 //---------------------------------------------------------- >> 925 >> 926 >> 927 G4ThreeVector positionMod30 = G4ThreeVector(0*cm,0*cm,-0.03*cm); >> 928 solidMod30 = new G4Tubs("Mod30", >> 929 innerRadiusOfTheTube, >> 930 outerRadiusOfTheTube, >> 931 hightOfTheTube, >> 932 startAngleOfTheTube10, >> 933 spanningAngleOfTheTube10); >> 934 >> 935 logicMod30 = new G4LogicalVolume(solidMod30, ModMater, "Mod30",0,0,0); >> 936 physiMod30 = new G4PVPlacement(0, // no rotation >> 937 positionMod30, // at (x,y,z) >> 938 logicMod30, // its logical volume >> 939 "Mod30", // its name >> 940 logicMod20, // its mother volume >> 941 false, // no boolean operations >> 942 0); // no particular field >> 943 >> 944 //---------------------------------------------------------- >> 945 // Undicesima fetta Modulatore 3 >> 946 //---------------------------------------------------------- >> 947 >> 948 G4ThreeVector positionMod31 = G4ThreeVector(0*cm,0*cm,-0.09*cm); >> 949 solidMod31 = new G4Tubs("Mod31", >> 950 innerRadiusOfTheTube, >> 951 outerRadiusOfTheTube, >> 952 hightOfTheTube, >> 953 startAngleOfTheTube11, >> 954 spanningAngleOfTheTube11); >> 955 >> 956 logicMod31 = new G4LogicalVolume(solidMod31, ModMater, "Mod31",0,0,0); >> 957 physiMod31 = new G4PVPlacement(0, // no rotation >> 958 positionMod31, // at (x,y,z) >> 959 logicMod31, // its logical volume >> 960 "Mod31", // its name >> 961 logicMod20, // its mother volume >> 962 false, // no boolean operations >> 963 0); // no particular field >> 964 >> 965 //---------------------------------------------------------- >> 966 //Dodicesima fetta Modulatore 3 >> 967 //---------------------------------------------------------- >> 968 >> 969 G4ThreeVector positionMod32 = G4ThreeVector(0*cm,0*cm,-0.15*cm); >> 970 solidMod32 = new G4Tubs("Mod32", >> 971 innerRadiusOfTheTube, >> 972 outerRadiusOfTheTube, >> 973 hightOfTheTube, >> 974 startAngleOfTheTube12, >> 975 spanningAngleOfTheTube12); >> 976 >> 977 logicMod32 = new G4LogicalVolume(solidMod32, ModMater, "Mod32",0,0,0); >> 978 physiMod32 = new G4PVPlacement(0, // no rotation >> 979 positionMod32, // at (x,y,z) >> 980 logicMod32, // its logical volume >> 981 "Mod32", // its name >> 982 logicMod20, // its mother volume >> 983 false, // no boolean operations >> 984 0); // no particular field >> 985 >> 986 >> 987 //---------------------------------------------------------- >> 988 //Tredicesima fetta Modulatore 3 >> 989 //---------------------------------------------------------- >> 990 >> 991 G4ThreeVector positionMod33 = G4ThreeVector(0*cm,0*cm,-0.21*cm); >> 992 solidMod33 = new G4Tubs("Mod33", >> 993 innerRadiusOfTheTube, >> 994 outerRadiusOfTheTube, >> 995 hightOfTheTube, >> 996 startAngleOfTheTube13, >> 997 spanningAngleOfTheTube13); >> 998 >> 999 logicMod33 = new G4LogicalVolume(solidMod33, ModMater, "Mod33",0,0,0); >> 1000 physiMod33 = new G4PVPlacement(0, // no rotation >> 1001 positionMod33, // at (x,y,z) >> 1002 logicMod33, // its logical volume >> 1003 "Mod33", // its name >> 1004 logicMod20, // its mother volume >> 1005 false, // no boolean operations >> 1006 0); // no particular field >> 1007 >> 1008 //---------------------------------------------------------- >> 1009 //Quat. fetta Modulatore 3 >> 1010 //---------------------------------------------------------- >> 1011 >> 1012 >> 1013 G4ThreeVector positionMod34 = G4ThreeVector(0*cm,0*cm,-0.27*cm); >> 1014 solidMod34 = new G4Tubs("Mod34", >> 1015 innerRadiusOfTheTube, >> 1016 outerRadiusOfTheTube, >> 1017 hightOfTheTube, >> 1018 startAngleOfTheTube14, >> 1019 spanningAngleOfTheTube14); >> 1020 >> 1021 logicMod34 = new G4LogicalVolume(solidMod34, ModMater, "Mod34",0,0,0); >> 1022 physiMod34 = new G4PVPlacement(0, // no rotation >> 1023 positionMod34, // at (x,y,z) >> 1024 logicMod34, // its logical volume >> 1025 "Mod134", // its name >> 1026 logicMod20, // its mother volume >> 1027 false, // no boolean operations >> 1028 0); // no particular field >> 1029 >> 1030 >> 1031 //---------------------------------------------------------- >> 1032 //Quindicesima fetta Modulatore 2 >> 1033 //---------------------------------------------------------- >> 1034 >> 1035 >> 1036 G4ThreeVector positionMod35 = G4ThreeVector(0*cm,0*cm,-0.33*cm); >> 1037 solidMod35 = new G4Tubs("Mod35", >> 1038 innerRadiusOfTheTube, >> 1039 outerRadiusOfTheTube, >> 1040 hightOfTheTube, >> 1041 startAngleOfTheTube15, >> 1042 spanningAngleOfTheTube15); >> 1043 >> 1044 logicMod35 = new G4LogicalVolume(solidMod35, ModMater, "Mod35",0,0,0); >> 1045 physiMod35 = new G4PVPlacement(0, // no rotation >> 1046 positionMod35, // at (x,y,z) >> 1047 logicMod35, // its logical volume >> 1048 "Mod35", // its name >> 1049 logicMod20, // its mother volume >> 1050 false, // no boolean operations >> 1051 0); // no particular field 378 1052 >> 1053 //---------------------------------------------------------- >> 1054 //Sedic. fetta Modulatore 2 >> 1055 //---------------------------------------------------------- 379 1056 >> 1057 >> 1058 G4ThreeVector positionMod36 = G4ThreeVector(0*cm,0*cm,-0.39*cm); >> 1059 solidMod36 = new G4Tubs("Mod36", >> 1060 innerRadiusOfTheTube, >> 1061 outerRadiusOfTheTube, >> 1062 hightOfTheTube, >> 1063 startAngleOfTheTube16, >> 1064 spanningAngleOfTheTube16); >> 1065 >> 1066 logicMod36 = new G4LogicalVolume(solidMod36, ModMater, "Mod36",0,0,0); >> 1067 physiMod36 = new G4PVPlacement(0, // no rotation >> 1068 positionMod36, // at (x,y,z) >> 1069 logicMod36, // its logical volume >> 1070 "Mod36", // its name >> 1071 logicMod20, // its mother volume >> 1072 false, // no boolean operations >> 1073 0); // no particular field >> 1074 >> 1075 //---------------------------------------------------------- >> 1076 //Dicias. fetta Modulatore 2 >> 1077 //---------------------------------------------------------- >> 1078 >> 1079 G4ThreeVector positionMod37 = G4ThreeVector(0*cm,0*cm,-0.45*cm); >> 1080 solidMod37 = new G4Tubs("Mod37", >> 1081 innerRadiusOfTheTube, >> 1082 outerRadiusOfTheTube, >> 1083 hightOfTheTube, >> 1084 startAngleOfTheTube17, >> 1085 spanningAngleOfTheTube17); >> 1086 >> 1087 logicMod37 = new G4LogicalVolume(solidMod37, ModMater, "Mod37",0,0,0); >> 1088 physiMod37 = new G4PVPlacement(0, // no rotation >> 1089 positionMod37, // at (x,y,z) >> 1090 logicMod37, // its logical volume >> 1091 "Mod37", // its name >> 1092 logicMod20, // its mother volume >> 1093 false, // no boolean operations >> 1094 0); // no particular field >> 1095 //---------------------------------------------------------- >> 1096 //Diciot. fetta Modulatore 2 >> 1097 //---------------------------------------------------------- >> 1098 >> 1099 >> 1100 G4ThreeVector positionMod38 = G4ThreeVector(0*cm,0*cm,-0.51*cm); >> 1101 solidMod38 = new G4Tubs("Mod38", >> 1102 innerRadiusOfTheTube, >> 1103 outerRadiusOfTheTube, >> 1104 hightOfTheTube, >> 1105 startAngleOfTheTube18, >> 1106 spanningAngleOfTheTube18); >> 1107 >> 1108 logicMod38 = new G4LogicalVolume(solidMod38, ModMater, "Mod38",0,0,0); >> 1109 physiMod38 = new G4PVPlacement(0, // no rotation >> 1110 positionMod38, // at (x,y,z) >> 1111 logicMod38, // its logical volume >> 1112 "Mod38", // its name >> 1113 logicMod20, // its mother volume >> 1114 false, // no boolean operations >> 1115 0); // no particular field >> 1116 >> 1117 380 1118 381 //------------------------------------------ 1119 //---------------------------------------------------------- 382 // Mother volume of the third modulator quar << 1120 //Volume Madre 3/4 del Modulatore Mod 40 383 //------------------------------------------ 1121 //---------------------------------------------------------- 384 1122 385 1123 386 G4RotationMatrix rm3; << 1124 G4RotationMatrix rm40; 387 rm3.rotateZ(180 *deg); << 1125 rm40.rotateZ(180 *deg); 388 1126 389 G4ThreeVector positionMod3 = G4ThreeVector(0 << 1127 G4ThreeVector positionMod40 = G4ThreeVector(0*cm,0*cm,0*cm); 390 1128 391 solidMod3 = new G4Tubs("Mod3", << 1129 solidMod40 = new G4Tubs("Mod40", 392 innerRadiusOfTheTube, 1130 innerRadiusOfTheTube, 393 outerRadiusOfTheTube, 1131 outerRadiusOfTheTube, 394 hightOfTheTube0, 1132 hightOfTheTube0, 395 startAngleOfTheTube0/2., << 1133 startAngleOfTheTube0, 396 spanningAngleOfTheTube0); 1134 spanningAngleOfTheTube0); 397 1135 398 logicMod3 = new G4LogicalVolume(solidMod3, << 1136 logicMod40 = new G4LogicalVolume(solidMod40, Mod0Mater, "Mod40",0,0,0); 399 Mod0Mater, " << 400 1137 401 1138 402 physiMod3 = new G4PVPlacement(G4Transform3D( << 1139 physiMod40 = new G4PVPlacement(G4Transform3D(rm40, positionMod40), 403 logicMod3, // its logical volume << 1140 logicMod40, // its logical volume 404 "Mod3", // its name << 1141 "Mod40", // its name 405 logicMotherMod, // its mother volum 1142 logicMotherMod, // its mother volume 406 false, // no boolean operatio 1143 false, // no boolean operations 407 0); // no particular field 1144 0); // no particular field 408 1145 409 1146 410 1147 411 1148 412 for (G4int i=1;i<StepNumbers;i++) << 413 { << 414 1149 415 physiMod[2*(StepNumbers-1)+i] = new G4PVPlac << 1150 //---------------------------------------------------------- 416 PositionMod[i], << 1151 //Prima fetta Modulatore 3 417 logicMod[i], << 1152 //---------------------------------------------------------- 418 "Modstep", << 1153 419 logicMod3, << 1154 G4ThreeVector positionMod41 = G4ThreeVector(0*cm,0*cm,0.51*cm); 420 false, << 1155 solidMod41 = new G4Tubs("Mod41", 421 0); << 1156 innerRadiusOfTheTube, 422 << 1157 outerRadiusOfTheTube, 423 } << 1158 hightOfTheTube, >> 1159 startAngleOfTheTube1, >> 1160 spanningAngleOfTheTube1); >> 1161 >> 1162 logicMod41 = new G4LogicalVolume(solidMod41, ModMater, "Mod41",0,0,0); >> 1163 >> 1164 physiMod41 = new G4PVPlacement(0, // no rotation >> 1165 positionMod41, // at (x,y,z) >> 1166 logicMod41, // its logical volume >> 1167 "Mod41", // its name >> 1168 logicMod40, // its mother volume >> 1169 false, // no boolean operations >> 1170 0); // no particular field >> 1171 >> 1172 >> 1173 //---------------------------------------------------------- >> 1174 //Seconda fetta Modulatore 3 >> 1175 //---------------------------------------------------------- >> 1176 >> 1177 G4ThreeVector positionMod42 = G4ThreeVector(0*cm,0*cm,0.45*cm); >> 1178 >> 1179 solidMod42 = new G4Tubs("Mod42", >> 1180 innerRadiusOfTheTube, >> 1181 outerRadiusOfTheTube, >> 1182 hightOfTheTube, >> 1183 startAngleOfTheTube2, >> 1184 spanningAngleOfTheTube2); >> 1185 >> 1186 logicMod42 = new G4LogicalVolume(solidMod42, ModMater, "Mod42",0,0,0); >> 1187 >> 1188 physiMod42 = new G4PVPlacement(0, // no rotation >> 1189 positionMod42, // at (x,y,z) >> 1190 logicMod42, // its logical volume >> 1191 "Mod42", // its name >> 1192 logicMod40, // its mother volume >> 1193 false, // no boolean operations >> 1194 0); // no particular field >> 1195 >> 1196 >> 1197 //---------------------------------------------------------- >> 1198 //Terza fetta Modulatore 3 >> 1199 //---------------------------------------------------------- >> 1200 >> 1201 G4ThreeVector positionMod43 = G4ThreeVector(0*cm,0*cm,0.39*cm); >> 1202 >> 1203 solidMod43 = new G4Tubs("Mod43", >> 1204 innerRadiusOfTheTube, >> 1205 outerRadiusOfTheTube, >> 1206 hightOfTheTube, >> 1207 startAngleOfTheTube3, >> 1208 spanningAngleOfTheTube3); >> 1209 >> 1210 logicMod43 = new G4LogicalVolume(solidMod43, ModMater, "Mod43",0,0,0); >> 1211 physiMod43 = new G4PVPlacement(0, // no rotation >> 1212 positionMod43, // at (x,y,z) >> 1213 logicMod43, // its logical volume >> 1214 "Mod43", // its name >> 1215 logicMod40, // its mother volume >> 1216 false, // no boolean operations >> 1217 0); // no particular field 424 1218 >> 1219 425 //------------------------------------------ 1220 //---------------------------------------------------------- 426 // Mother volume of the fourth modulator qua << 1221 //Quarta fetta Modulatore 3 427 //------------------------------------------ 1222 //---------------------------------------------------------- >> 1223 >> 1224 >> 1225 G4ThreeVector positionMod44 = G4ThreeVector(0*cm,0*cm,0.33*cm); >> 1226 >> 1227 solidMod44 = new G4Tubs("Mod44", >> 1228 innerRadiusOfTheTube, >> 1229 outerRadiusOfTheTube, >> 1230 hightOfTheTube, >> 1231 startAngleOfTheTube4, >> 1232 spanningAngleOfTheTube4); >> 1233 >> 1234 logicMod44 = new G4LogicalVolume(solidMod44, ModMater, "Mod44",0,0,0); >> 1235 >> 1236 physiMod44 = new G4PVPlacement(0, // no rotation >> 1237 positionMod44, // at (x,y,z) >> 1238 logicMod44, // its logical volume >> 1239 "Mod44", // its name >> 1240 logicMod40, // its mother volume >> 1241 false, // no boolean operations >> 1242 0); // no particular field >> 1243 >> 1244 >> 1245 //---------------------------------------------------------- >> 1246 //Quinta fetta Modulatore 3 >> 1247 //---------------------------------------------------------- >> 1248 >> 1249 >> 1250 >> 1251 G4ThreeVector positionMod45 = G4ThreeVector(0*cm,0*cm,0.27*cm); >> 1252 >> 1253 solidMod45 = new G4Tubs("Mod45", >> 1254 innerRadiusOfTheTube, >> 1255 outerRadiusOfTheTube, >> 1256 hightOfTheTube, >> 1257 startAngleOfTheTube5, >> 1258 spanningAngleOfTheTube5); >> 1259 >> 1260 logicMod45 = new G4LogicalVolume(solidMod45, ModMater, "Mod45",0,0,0); >> 1261 physiMod45 = new G4PVPlacement(0, // no rotation >> 1262 positionMod45, // at (x,y,z) >> 1263 logicMod45, // its logical volume >> 1264 "Mod45", // its name >> 1265 logicMod40, // its mother volume >> 1266 false, // no boolean operations >> 1267 0); // no particular field >> 1268 >> 1269 >> 1270 //---------------------------------------------------------- >> 1271 //Sesta fetta Modulatore 3 >> 1272 //---------------------------------------------------------- >> 1273 >> 1274 >> 1275 G4ThreeVector positionMod46 = G4ThreeVector(0*cm,0*cm,0.21*cm); >> 1276 solidMod46 = new G4Tubs("Mod46", >> 1277 innerRadiusOfTheTube, >> 1278 outerRadiusOfTheTube, >> 1279 hightOfTheTube, >> 1280 startAngleOfTheTube6, >> 1281 spanningAngleOfTheTube6); >> 1282 >> 1283 logicMod46 = new G4LogicalVolume(solidMod46, ModMater, "Mod46",0,0,0); >> 1284 physiMod46 = new G4PVPlacement(0, // no rotation >> 1285 positionMod46, // at (x,y,z) >> 1286 logicMod46, // its logical volume >> 1287 "Mod46", // its name >> 1288 logicMod40, // its mother volume >> 1289 false, // no boolean operations >> 1290 0); // no particular field >> 1291 >> 1292 >> 1293 //---------------------------------------------------------- >> 1294 //Settima fetta Modulatore 3 >> 1295 //---------------------------------------------------------- >> 1296 >> 1297 >> 1298 G4ThreeVector positionMod47 = G4ThreeVector(0*cm,0*cm,0.15*cm); 428 1299 >> 1300 solidMod47 = new G4Tubs("Mod47", >> 1301 innerRadiusOfTheTube, >> 1302 outerRadiusOfTheTube, >> 1303 hightOfTheTube, >> 1304 startAngleOfTheTube7, >> 1305 spanningAngleOfTheTube7); >> 1306 >> 1307 logicMod47 = new G4LogicalVolume(solidMod47, ModMater, "Mod47",0,0,0); >> 1308 physiMod47 = new G4PVPlacement(0, // no rotation >> 1309 positionMod47, // at (x,y,z) >> 1310 logicMod47, // its logical volume >> 1311 "Mod47", // its name >> 1312 logicMod40, // its mother volume >> 1313 false, // no boolean operations >> 1314 0); // no particular field >> 1315 >> 1316 >> 1317 >> 1318 //---------------------------------------------------------- >> 1319 //Ottava fetta Modulatore 3 >> 1320 //---------------------------------------------------------- >> 1321 >> 1322 >> 1323 G4ThreeVector positionMod48 = G4ThreeVector(0*cm,0*cm,0.09*cm); >> 1324 solidMod48 = new G4Tubs("Mod48", >> 1325 innerRadiusOfTheTube, >> 1326 outerRadiusOfTheTube, >> 1327 hightOfTheTube, >> 1328 startAngleOfTheTube8, >> 1329 spanningAngleOfTheTube8); >> 1330 >> 1331 logicMod48 = new G4LogicalVolume(solidMod48, ModMater, "Mod48",0,0,0); >> 1332 physiMod48 = new G4PVPlacement(0, // no rotation >> 1333 positionMod48, // at (x,y,z) >> 1334 logicMod48, // its logical volume >> 1335 "Mod48", // its name >> 1336 logicMod40, // its mother volume >> 1337 false, // no boolean operations >> 1338 0); // no particular field >> 1339 >> 1340 >> 1341 >> 1342 >> 1343 //---------------------------------------------------------- >> 1344 //Nona fetta Modulatore 2 >> 1345 //---------------------------------------------------------- >> 1346 >> 1347 >> 1348 >> 1349 G4ThreeVector positionMod49 = G4ThreeVector(0*cm,0*cm,0.03*cm); >> 1350 solidMod49 = new G4Tubs("Mod49", >> 1351 innerRadiusOfTheTube, >> 1352 outerRadiusOfTheTube, >> 1353 hightOfTheTube, >> 1354 startAngleOfTheTube9, >> 1355 spanningAngleOfTheTube9); >> 1356 >> 1357 logicMod49 = new G4LogicalVolume(solidMod49, ModMater, "Mod49",0,0,0); >> 1358 physiMod49 = new G4PVPlacement(0, // no rotation >> 1359 positionMod49, // at (x,y,z) >> 1360 logicMod49, // its logical volume >> 1361 "Mod49", // its name >> 1362 logicMod40, // its mother volume >> 1363 false, // no boolean operations >> 1364 0); // no particular field >> 1365 >> 1366 >> 1367 //---------------------------------------------------------- >> 1368 //Decima fetta Modulatore 3 >> 1369 //---------------------------------------------------------- >> 1370 >> 1371 >> 1372 G4ThreeVector positionMod50 = G4ThreeVector(0*cm,0*cm,-0.03*cm); >> 1373 solidMod50 = new G4Tubs("Mod50", >> 1374 innerRadiusOfTheTube, >> 1375 outerRadiusOfTheTube, >> 1376 hightOfTheTube, >> 1377 startAngleOfTheTube10, >> 1378 spanningAngleOfTheTube10); >> 1379 >> 1380 logicMod50 = new G4LogicalVolume(solidMod50, ModMater, "Mod50",0,0,0); >> 1381 physiMod50 = new G4PVPlacement(0, // no rotation >> 1382 positionMod50, // at (x,y,z) >> 1383 logicMod50, // its logical volume >> 1384 "Mod50", // its name >> 1385 logicMod40, // its mother volume >> 1386 false, // no boolean operations >> 1387 0); // no particular field >> 1388 >> 1389 //---------------------------------------------------------- >> 1390 // Undicesima fetta Modulatore 3 >> 1391 //---------------------------------------------------------- >> 1392 >> 1393 G4ThreeVector positionMod51 = G4ThreeVector(0*cm,0*cm,-0.09*cm); >> 1394 solidMod51 = new G4Tubs("Mod51", >> 1395 innerRadiusOfTheTube, >> 1396 outerRadiusOfTheTube, >> 1397 hightOfTheTube, >> 1398 startAngleOfTheTube11, >> 1399 spanningAngleOfTheTube11); >> 1400 >> 1401 logicMod51 = new G4LogicalVolume(solidMod51, ModMater, "Mod51",0,0,0); >> 1402 physiMod51 = new G4PVPlacement(0, // no rotation >> 1403 positionMod51, // at (x,y,z) >> 1404 logicMod51, // its logical volume >> 1405 "Mod51", // its name >> 1406 logicMod40, // its mother volume >> 1407 false, // no boolean operations >> 1408 0); // no particular field >> 1409 >> 1410 //---------------------------------------------------------- >> 1411 //Dodicesima fetta Modulatore 3 >> 1412 //---------------------------------------------------------- >> 1413 >> 1414 G4ThreeVector positionMod52 = G4ThreeVector(0*cm,0*cm,-0.15*cm); >> 1415 solidMod52 = new G4Tubs("Mod52", >> 1416 innerRadiusOfTheTube, >> 1417 outerRadiusOfTheTube, >> 1418 hightOfTheTube, >> 1419 startAngleOfTheTube12, >> 1420 spanningAngleOfTheTube12); >> 1421 >> 1422 logicMod52 = new G4LogicalVolume(solidMod52, ModMater, "Mod52",0,0,0); >> 1423 physiMod52 = new G4PVPlacement(0, // no rotation >> 1424 positionMod52, // at (x,y,z) >> 1425 logicMod52, // its logical volume >> 1426 "Mod52", // its name >> 1427 logicMod40, // its mother volume >> 1428 false, // no boolean operations >> 1429 0); // no particular field >> 1430 >> 1431 >> 1432 //---------------------------------------------------------- >> 1433 //Tredicesima fetta Modulatore 3 >> 1434 //---------------------------------------------------------- >> 1435 >> 1436 G4ThreeVector positionMod53 = G4ThreeVector(0*cm,0*cm,-0.21*cm); >> 1437 solidMod53 = new G4Tubs("Mod53", >> 1438 innerRadiusOfTheTube, >> 1439 outerRadiusOfTheTube, >> 1440 hightOfTheTube, >> 1441 startAngleOfTheTube13, >> 1442 spanningAngleOfTheTube13); >> 1443 >> 1444 logicMod53 = new G4LogicalVolume(solidMod53, ModMater, "Mod53",0,0,0); >> 1445 physiMod53 = new G4PVPlacement(0, // no rotation >> 1446 positionMod53, // at (x,y,z) >> 1447 logicMod53, // its logical volume >> 1448 "Mod53", // its name >> 1449 logicMod40, // its mother volume >> 1450 false, // no boolean operations >> 1451 0); // no particular field >> 1452 >> 1453 //---------------------------------------------------------- >> 1454 //Quat. fetta Modulatore 3 >> 1455 //---------------------------------------------------------- >> 1456 >> 1457 >> 1458 G4ThreeVector positionMod54 = G4ThreeVector(0*cm,0*cm,-0.27*cm); >> 1459 solidMod54 = new G4Tubs("Mod54", >> 1460 innerRadiusOfTheTube, >> 1461 outerRadiusOfTheTube, >> 1462 hightOfTheTube, >> 1463 startAngleOfTheTube14, >> 1464 spanningAngleOfTheTube14); >> 1465 >> 1466 logicMod54 = new G4LogicalVolume(solidMod54, ModMater, "Mod54",0,0,0); >> 1467 physiMod54 = new G4PVPlacement(0, // no rotation >> 1468 positionMod54, // at (x,y,z) >> 1469 logicMod54, // its logical volume >> 1470 "Mod154", // its name >> 1471 logicMod40, // its mother volume >> 1472 false, // no boolean operations >> 1473 0); // no particular field >> 1474 >> 1475 >> 1476 //---------------------------------------------------------- >> 1477 //Quindicesima fetta Modulatore 3 >> 1478 //---------------------------------------------------------- >> 1479 >> 1480 >> 1481 G4ThreeVector positionMod55 = G4ThreeVector(0*cm,0*cm,-0.33*cm); >> 1482 solidMod55 = new G4Tubs("Mod35", >> 1483 innerRadiusOfTheTube, >> 1484 outerRadiusOfTheTube, >> 1485 hightOfTheTube, >> 1486 startAngleOfTheTube15, >> 1487 spanningAngleOfTheTube15); >> 1488 >> 1489 logicMod55 = new G4LogicalVolume(solidMod55, ModMater, "Mod55",0,0,0); >> 1490 physiMod55 = new G4PVPlacement(0, // no rotation >> 1491 positionMod55, // at (x,y,z) >> 1492 logicMod55, // its logical volume >> 1493 "Mod55", // its name >> 1494 logicMod40, // its mother volume >> 1495 false, // no boolean operations >> 1496 0); // no particular field >> 1497 >> 1498 //---------------------------------------------------------- >> 1499 //Sedic. fetta Modulatore 3 >> 1500 //---------------------------------------------------------- >> 1501 >> 1502 >> 1503 G4ThreeVector positionMod56 = G4ThreeVector(0*cm,0*cm,-0.39*cm); >> 1504 solidMod56 = new G4Tubs("Mod56", >> 1505 innerRadiusOfTheTube, >> 1506 outerRadiusOfTheTube, >> 1507 hightOfTheTube, >> 1508 startAngleOfTheTube16, >> 1509 spanningAngleOfTheTube16); >> 1510 >> 1511 logicMod56 = new G4LogicalVolume(solidMod56, ModMater, "Mod56",0,0,0); >> 1512 physiMod56 = new G4PVPlacement(0, // no rotation >> 1513 positionMod56, // at (x,y,z) >> 1514 logicMod56, // its logical volume >> 1515 "Mod56", // its name >> 1516 logicMod40, // its mother volume >> 1517 false, // no boolean operations >> 1518 0); // no particular field >> 1519 >> 1520 //---------------------------------------------------------- >> 1521 //Dicias. fetta Modulatore 3 >> 1522 //---------------------------------------------------------- 429 1523 430 G4RotationMatrix rm4; << 1524 G4ThreeVector positionMod57 = G4ThreeVector(0*cm,0*cm,-0.45*cm); 431 rm4.rotateZ(270 *deg); << 1525 solidMod57 = new G4Tubs("Mod57", >> 1526 innerRadiusOfTheTube, >> 1527 outerRadiusOfTheTube, >> 1528 hightOfTheTube, >> 1529 startAngleOfTheTube17, >> 1530 spanningAngleOfTheTube17); >> 1531 >> 1532 logicMod57 = new G4LogicalVolume(solidMod57, ModMater, "Mod57",0,0,0); >> 1533 physiMod57 = new G4PVPlacement(0, // no rotation >> 1534 positionMod57, // at (x,y,z) >> 1535 logicMod57, // its logical volume >> 1536 "Mod57", // its name >> 1537 logicMod40, // its mother volume >> 1538 false, // no boolean operations >> 1539 0); // no particular field >> 1540 >> 1541 //---------------------------------------------------------- >> 1542 //Diciot. fetta Modulatore 3 >> 1543 //---------------------------------------------------------- >> 1544 >> 1545 >> 1546 G4ThreeVector positionMod58 = G4ThreeVector(0*cm,0*cm,-0.51*cm); >> 1547 solidMod58 = new G4Tubs("Mod58", >> 1548 innerRadiusOfTheTube, >> 1549 outerRadiusOfTheTube, >> 1550 hightOfTheTube, >> 1551 startAngleOfTheTube18, >> 1552 spanningAngleOfTheTube18); >> 1553 >> 1554 logicMod58 = new G4LogicalVolume(solidMod58, ModMater, "Mod58",0,0,0); >> 1555 physiMod58 = new G4PVPlacement(0, // no rotation >> 1556 positionMod58, // at (x,y,z) >> 1557 logicMod58, // its logical volume >> 1558 "Mod58", // its name >> 1559 logicMod40, // its mother volume >> 1560 false, // no boolean operations >> 1561 0); // no particular field >> 1562 >> 1563 >> 1564 >> 1565 //---------------------------------------------------------- >> 1566 //Volume Madre 4/4 del Modulatore Mod 60 >> 1567 //---------------------------------------------------------- >> 1568 >> 1569 >> 1570 G4RotationMatrix rm60; >> 1571 rm60.rotateZ(270 *deg); 432 1572 433 G4ThreeVector positionMod4 = G4ThreeVector(0 << 1573 G4ThreeVector positionMod60 = G4ThreeVector(0*cm,0*cm,0*cm); 434 1574 435 solidMod4 = new G4Tubs("Mod4", << 1575 solidMod60 = new G4Tubs("Mod60", 436 innerRadiusOfTheTube, 1576 innerRadiusOfTheTube, 437 outerRadiusOfTheTube, 1577 outerRadiusOfTheTube, 438 hightOfTheTube0, 1578 hightOfTheTube0, 439 startAngleOfTheTube0/2., << 1579 startAngleOfTheTube0, 440 spanningAngleOfTheTube0); 1580 spanningAngleOfTheTube0); 441 1581 442 logicMod4 = new G4LogicalVolume(solidMod4, << 1582 logicMod60 = new G4LogicalVolume(solidMod60, Mod0Mater, "Mod60",0,0,0); 443 Mod0Mater, " << 444 1583 445 1584 446 physiMod4 = new G4PVPlacement(G4Transform3D( << 1585 physiMod60 = new G4PVPlacement(G4Transform3D(rm60, positionMod60), 447 logicMod4, << 1586 logicMod60, // its logical volume 448 "Mod4", << 1587 "Mod60", // its name 449 logicMotherMod, << 1588 logicMotherMod, // its mother volume 450 false, << 1589 false, // no boolean operations 451 0); << 1590 0); // no particular field 452 1591 453 1592 454 for (G4int i=1;i<StepNumbers;i++) << 1593 455 { << 1594 //---------------------------------------------------------- 456 physiMod[3*(StepNumbers-1)+i] = new G4PVPlac << 1595 //Prima fetta Modulatore 4 457 PositionMod[i], << 1596 //---------------------------------------------------------- 458 logicMod[i], << 1597 459 "Modstep", << 1598 G4ThreeVector positionMod61 = G4ThreeVector(0*cm,0*cm,0.51*cm); 460 logicMod4, << 1599 solidMod61 = new G4Tubs("Mod61", 461 false, << 1600 innerRadiusOfTheTube, 462 0); << 1601 outerRadiusOfTheTube, 463 } << 1602 hightOfTheTube, 464 // Inform the kernel about the new geometry << 1603 startAngleOfTheTube1, 465 G4RunManager::GetRunManager() -> GeometryH << 1604 spanningAngleOfTheTube1); 466 G4RunManager::GetRunManager() -> PhysicsHa << 1605 >> 1606 logicMod61 = new G4LogicalVolume(solidMod61, ModMater, "Mod61",0,0,0); >> 1607 >> 1608 physiMod61 = new G4PVPlacement(0, // no rotation >> 1609 positionMod61, // at (x,y,z) >> 1610 logicMod61, // its logical volume >> 1611 "Mod61", // its name >> 1612 logicMod60, // its mother volume >> 1613 false, // no boolean operations >> 1614 0); // no particular field >> 1615 >> 1616 >> 1617 //---------------------------------------------------------- >> 1618 //Seconda fetta Modulatore 4 >> 1619 //---------------------------------------------------------- >> 1620 >> 1621 G4ThreeVector positionMod62 = G4ThreeVector(0*cm,0*cm,0.45*cm); >> 1622 >> 1623 solidMod62 = new G4Tubs("Mod62", >> 1624 innerRadiusOfTheTube, >> 1625 outerRadiusOfTheTube, >> 1626 hightOfTheTube, >> 1627 startAngleOfTheTube2, >> 1628 spanningAngleOfTheTube2); >> 1629 >> 1630 logicMod62 = new G4LogicalVolume(solidMod62, ModMater, "Mod62",0,0,0); >> 1631 >> 1632 physiMod62 = new G4PVPlacement(0, // no rotation >> 1633 positionMod62, // at (x,y,z) >> 1634 logicMod62, // its logical volume >> 1635 "Mod62", // its name >> 1636 logicMod60, // its mother volume >> 1637 false, // no boolean operations >> 1638 0); // no particular field >> 1639 >> 1640 >> 1641 //---------------------------------------------------------- >> 1642 //Terza fetta Modulatore 4 >> 1643 //---------------------------------------------------------- >> 1644 >> 1645 G4ThreeVector positionMod63 = G4ThreeVector(0*cm,0*cm,0.39*cm); >> 1646 >> 1647 solidMod63 = new G4Tubs("Mod63", >> 1648 innerRadiusOfTheTube, >> 1649 outerRadiusOfTheTube, >> 1650 hightOfTheTube, >> 1651 startAngleOfTheTube3, >> 1652 spanningAngleOfTheTube3); >> 1653 >> 1654 logicMod63 = new G4LogicalVolume(solidMod63, ModMater, "Mod63",0,0,0); >> 1655 physiMod63 = new G4PVPlacement(0, // no rotation >> 1656 positionMod63, // at (x,y,z) >> 1657 logicMod63, // its logical volume >> 1658 "Mod63", // its name >> 1659 logicMod60, // its mother volume >> 1660 false, // no boolean operations >> 1661 0); // no particular field >> 1662 >> 1663 >> 1664 //---------------------------------------------------------- >> 1665 //Quarta fetta Modulatore 4 >> 1666 //---------------------------------------------------------- >> 1667 >> 1668 >> 1669 G4ThreeVector positionMod64 = G4ThreeVector(0*cm,0*cm,0.33*cm); >> 1670 >> 1671 solidMod64 = new G4Tubs("Mod64", >> 1672 innerRadiusOfTheTube, >> 1673 outerRadiusOfTheTube, >> 1674 hightOfTheTube, >> 1675 startAngleOfTheTube4, >> 1676 spanningAngleOfTheTube4); >> 1677 >> 1678 logicMod64 = new G4LogicalVolume(solidMod64, ModMater, "Mod64",0,0,0); >> 1679 >> 1680 physiMod64 = new G4PVPlacement(0, // no rotation >> 1681 positionMod64, // at (x,y,z) >> 1682 logicMod64, // its logical volume >> 1683 "Mod64", // its name >> 1684 logicMod60, // its mother volume >> 1685 false, // no boolean operations >> 1686 0); // no particular field >> 1687 >> 1688 >> 1689 //---------------------------------------------------------- >> 1690 //Quinta fetta Modulatore 3 >> 1691 //---------------------------------------------------------- >> 1692 >> 1693 >> 1694 >> 1695 G4ThreeVector positionMod65 = G4ThreeVector(0*cm,0*cm,0.27*cm); >> 1696 >> 1697 solidMod65 = new G4Tubs("Mod65", >> 1698 innerRadiusOfTheTube, >> 1699 outerRadiusOfTheTube, >> 1700 hightOfTheTube, >> 1701 startAngleOfTheTube5, >> 1702 spanningAngleOfTheTube5); >> 1703 >> 1704 logicMod65 = new G4LogicalVolume(solidMod65, ModMater, "Mod65",0,0,0); >> 1705 physiMod65 = new G4PVPlacement(0, // no rotation >> 1706 positionMod65, // at (x,y,z) >> 1707 logicMod65, // its logical volume >> 1708 "Mod65", // its name >> 1709 logicMod60, // its mother volume >> 1710 false, // no boolean operations >> 1711 0); // no particular field >> 1712 >> 1713 >> 1714 //---------------------------------------------------------- >> 1715 //Sesta fetta Modulatore 4 >> 1716 //---------------------------------------------------------- >> 1717 >> 1718 >> 1719 G4ThreeVector positionMod66 = G4ThreeVector(0*cm,0*cm,0.21*cm); >> 1720 solidMod66 = new G4Tubs("Mod66", >> 1721 innerRadiusOfTheTube, >> 1722 outerRadiusOfTheTube, >> 1723 hightOfTheTube, >> 1724 startAngleOfTheTube6, >> 1725 spanningAngleOfTheTube6); >> 1726 >> 1727 logicMod66 = new G4LogicalVolume(solidMod66, ModMater, "Mod66",0,0,0); >> 1728 physiMod66 = new G4PVPlacement(0, // no rotation >> 1729 positionMod66, // at (x,y,z) >> 1730 logicMod66, // its logical volume >> 1731 "Mod66", // its name >> 1732 logicMod60, // its mother volume >> 1733 false, // no boolean operations >> 1734 0); // no particular field >> 1735 >> 1736 >> 1737 //---------------------------------------------------------- >> 1738 //Settima fetta Modulatore 4 >> 1739 //---------------------------------------------------------- >> 1740 >> 1741 >> 1742 G4ThreeVector positionMod67 = G4ThreeVector(0*cm,0*cm,0.15*cm); >> 1743 >> 1744 solidMod67 = new G4Tubs("Mod67", >> 1745 innerRadiusOfTheTube, >> 1746 outerRadiusOfTheTube, >> 1747 hightOfTheTube, >> 1748 startAngleOfTheTube7, >> 1749 spanningAngleOfTheTube7); >> 1750 >> 1751 logicMod67 = new G4LogicalVolume(solidMod67, ModMater, "Mod67",0,0,0); >> 1752 physiMod67 = new G4PVPlacement(0, // no rotation >> 1753 positionMod67, // at (x,y,z) >> 1754 logicMod67, // its logical volume >> 1755 "Mod67", // its name >> 1756 logicMod60, // its mother volume >> 1757 false, // no boolean operations >> 1758 0); // no particular field >> 1759 >> 1760 >> 1761 >> 1762 //---------------------------------------------------------- >> 1763 //Ottava fetta Modulatore 4 >> 1764 //---------------------------------------------------------- >> 1765 >> 1766 >> 1767 G4ThreeVector positionMod68 = G4ThreeVector(0*cm,0*cm,0.09*cm); >> 1768 solidMod68 = new G4Tubs("Mod68", >> 1769 innerRadiusOfTheTube, >> 1770 outerRadiusOfTheTube, >> 1771 hightOfTheTube, >> 1772 startAngleOfTheTube8, >> 1773 spanningAngleOfTheTube8); >> 1774 >> 1775 logicMod68 = new G4LogicalVolume(solidMod68, ModMater, "Mod68",0,0,0); >> 1776 physiMod68 = new G4PVPlacement(0, // no rotation >> 1777 positionMod68, // at (x,y,z) >> 1778 logicMod68, // its logical volume >> 1779 "Mod68", // its name >> 1780 logicMod60, // its mother volume >> 1781 false, // no boolean operations >> 1782 0); // no particular field >> 1783 >> 1784 >> 1785 >> 1786 >> 1787 //---------------------------------------------------------- >> 1788 //Nona fetta Modulatore 4 >> 1789 //---------------------------------------------------------- >> 1790 >> 1791 >> 1792 >> 1793 G4ThreeVector positionMod69 = G4ThreeVector(0*cm,0*cm,0.03*cm); >> 1794 solidMod69 = new G4Tubs("Mod69", >> 1795 innerRadiusOfTheTube, >> 1796 outerRadiusOfTheTube, >> 1797 hightOfTheTube, >> 1798 startAngleOfTheTube9, >> 1799 spanningAngleOfTheTube9); >> 1800 >> 1801 logicMod69 = new G4LogicalVolume(solidMod69, ModMater, "Mod69",0,0,0); >> 1802 physiMod69 = new G4PVPlacement(0, // no rotation >> 1803 positionMod69, // at (x,y,z) >> 1804 logicMod69, // its logical volume >> 1805 "Mod69", // its name >> 1806 logicMod60, // its mother volume >> 1807 false, // no boolean operations >> 1808 0); // no particular field >> 1809 >> 1810 >> 1811 //---------------------------------------------------------- >> 1812 //Decima fetta Modulatore 4 >> 1813 //---------------------------------------------------------- >> 1814 >> 1815 >> 1816 G4ThreeVector positionMod70 = G4ThreeVector(0*cm,0*cm,-0.03*cm); >> 1817 solidMod70 = new G4Tubs("Mod70", >> 1818 innerRadiusOfTheTube, >> 1819 outerRadiusOfTheTube, >> 1820 hightOfTheTube, >> 1821 startAngleOfTheTube10, >> 1822 spanningAngleOfTheTube10); >> 1823 >> 1824 logicMod70 = new G4LogicalVolume(solidMod70, ModMater, "Mod70",0,0,0); >> 1825 physiMod70 = new G4PVPlacement(0, // no rotation >> 1826 positionMod70, // at (x,y,z) >> 1827 logicMod70, // its logical volume >> 1828 "Mod70", // its name >> 1829 logicMod60, // its mother volume >> 1830 false, // no boolean operations >> 1831 0); // no particular field >> 1832 >> 1833 //---------------------------------------------------------- >> 1834 // Undicesima fetta Modulatore 4 >> 1835 //---------------------------------------------------------- >> 1836 >> 1837 G4ThreeVector positionMod71 = G4ThreeVector(0*cm,0*cm,-0.09*cm); >> 1838 solidMod71 = new G4Tubs("Mod71", >> 1839 innerRadiusOfTheTube, >> 1840 outerRadiusOfTheTube, >> 1841 hightOfTheTube, >> 1842 startAngleOfTheTube11, >> 1843 spanningAngleOfTheTube11); >> 1844 >> 1845 logicMod71 = new G4LogicalVolume(solidMod71, ModMater, "Mod71",0,0,0); >> 1846 physiMod71 = new G4PVPlacement(0, // no rotation >> 1847 positionMod71, // at (x,y,z) >> 1848 logicMod71, // its logical volume >> 1849 "Mod71", // its name >> 1850 logicMod60, // its mother volume >> 1851 false, // no boolean operations >> 1852 0); // no particular field >> 1853 >> 1854 //---------------------------------------------------------- >> 1855 //Dodicesima fetta Modulatore 4 >> 1856 //---------------------------------------------------------- >> 1857 >> 1858 G4ThreeVector positionMod72 = G4ThreeVector(0*cm,0*cm,-0.15*cm); >> 1859 solidMod72 = new G4Tubs("Mod72", >> 1860 innerRadiusOfTheTube, >> 1861 outerRadiusOfTheTube, >> 1862 hightOfTheTube, >> 1863 startAngleOfTheTube12, >> 1864 spanningAngleOfTheTube12); >> 1865 >> 1866 logicMod72 = new G4LogicalVolume(solidMod72, ModMater, "Mod72",0,0,0); >> 1867 physiMod72 = new G4PVPlacement(0, // no rotation >> 1868 positionMod72, // at (x,y,z) >> 1869 logicMod72, // its logical volume >> 1870 "Mod72", // its name >> 1871 logicMod60, // its mother volume >> 1872 false, // no boolean operations >> 1873 0); // no particular field >> 1874 >> 1875 >> 1876 //---------------------------------------------------------- >> 1877 //Tredicesima fetta Modulatore 4 >> 1878 //---------------------------------------------------------- >> 1879 >> 1880 G4ThreeVector positionMod73 = G4ThreeVector(0*cm,0*cm,-0.21*cm); >> 1881 solidMod73 = new G4Tubs("Mod73", >> 1882 innerRadiusOfTheTube, >> 1883 outerRadiusOfTheTube, >> 1884 hightOfTheTube, >> 1885 startAngleOfTheTube13, >> 1886 spanningAngleOfTheTube13); >> 1887 >> 1888 logicMod73 = new G4LogicalVolume(solidMod73, ModMater, "Mod73",0,0,0); >> 1889 physiMod73 = new G4PVPlacement(0, // no rotation >> 1890 positionMod73, // at (x,y,z) >> 1891 logicMod73, // its logical volume >> 1892 "Mod73", // its name >> 1893 logicMod60, // its mother volume >> 1894 false, // no boolean operations >> 1895 0); // no particular field >> 1896 >> 1897 //---------------------------------------------------------- >> 1898 //Quat. fetta Modulatore 4 >> 1899 //---------------------------------------------------------- >> 1900 >> 1901 >> 1902 G4ThreeVector positionMod74 = G4ThreeVector(0*cm,0*cm,-0.27*cm); >> 1903 solidMod74 = new G4Tubs("Mod74", >> 1904 innerRadiusOfTheTube, >> 1905 outerRadiusOfTheTube, >> 1906 hightOfTheTube, >> 1907 startAngleOfTheTube14, >> 1908 spanningAngleOfTheTube14); >> 1909 >> 1910 logicMod74 = new G4LogicalVolume(solidMod74, ModMater, "Mod74",0,0,0); >> 1911 physiMod74 = new G4PVPlacement(0, // no rotation >> 1912 positionMod74, // at (x,y,z) >> 1913 logicMod74, // its logical volume >> 1914 "Mod174", // its name >> 1915 logicMod60, // its mother volume >> 1916 false, // no boolean operations >> 1917 0); // no particular field >> 1918 >> 1919 >> 1920 //---------------------------------------------------------- >> 1921 //Quindicesima fetta Modulatore 4 >> 1922 //---------------------------------------------------------- >> 1923 >> 1924 >> 1925 G4ThreeVector positionMod75 = G4ThreeVector(0*cm,0*cm,-0.33*cm); >> 1926 solidMod75 = new G4Tubs("Mod75", >> 1927 innerRadiusOfTheTube, >> 1928 outerRadiusOfTheTube, >> 1929 hightOfTheTube, >> 1930 startAngleOfTheTube15, >> 1931 spanningAngleOfTheTube15); >> 1932 >> 1933 logicMod75 = new G4LogicalVolume(solidMod75, ModMater, "Mod75",0,0,0); >> 1934 physiMod75 = new G4PVPlacement(0, // no rotation >> 1935 positionMod75, // at (x,y,z) >> 1936 logicMod75, // its logical volume >> 1937 "Mod75", // its name >> 1938 logicMod60, // its mother volume >> 1939 false, // no boolean operations >> 1940 0); // no particular field >> 1941 >> 1942 //---------------------------------------------------------- >> 1943 //Sedic. fetta Modulatore 4 >> 1944 //---------------------------------------------------------- >> 1945 >> 1946 >> 1947 G4ThreeVector positionMod76 = G4ThreeVector(0*cm,0*cm,-0.39*cm); >> 1948 solidMod76 = new G4Tubs("Mod76", >> 1949 innerRadiusOfTheTube, >> 1950 outerRadiusOfTheTube, >> 1951 hightOfTheTube, >> 1952 startAngleOfTheTube16, >> 1953 spanningAngleOfTheTube16); >> 1954 >> 1955 logicMod76 = new G4LogicalVolume(solidMod76, ModMater, "Mod76",0,0,0); >> 1956 physiMod76 = new G4PVPlacement(0, // no rotation >> 1957 positionMod76, // at (x,y,z) >> 1958 logicMod76, // its logical volume >> 1959 "Mod76", // its name >> 1960 logicMod60, // its mother volume >> 1961 false, // no boolean operations >> 1962 0); // no particular field >> 1963 >> 1964 //---------------------------------------------------------- >> 1965 //Dicias. fetta Modulatore 4 >> 1966 //---------------------------------------------------------- >> 1967 >> 1968 G4ThreeVector positionMod77 = G4ThreeVector(0*cm,0*cm,-0.45*cm); >> 1969 solidMod77 = new G4Tubs("Mod57", >> 1970 innerRadiusOfTheTube, >> 1971 outerRadiusOfTheTube, >> 1972 hightOfTheTube, >> 1973 startAngleOfTheTube17, >> 1974 spanningAngleOfTheTube17); >> 1975 >> 1976 logicMod77 = new G4LogicalVolume(solidMod77, ModMater, "Mod77",0,0,0); >> 1977 physiMod77 = new G4PVPlacement(0, // no rotation >> 1978 positionMod77, // at (x,y,z) >> 1979 logicMod77, // its logical volume >> 1980 "Mod77", // its name >> 1981 logicMod60, // its mother volume >> 1982 false, // no boolean operations >> 1983 0); // no particular field >> 1984 >> 1985 //---------------------------------------------------------- >> 1986 //Diciot. fetta Modulatore 3 >> 1987 //---------------------------------------------------------- >> 1988 >> 1989 >> 1990 G4ThreeVector positionMod78 = G4ThreeVector(0*cm,0*cm,-0.51*cm); >> 1991 solidMod78 = new G4Tubs("Mod78", >> 1992 innerRadiusOfTheTube, >> 1993 outerRadiusOfTheTube, >> 1994 hightOfTheTube, >> 1995 startAngleOfTheTube18, >> 1996 spanningAngleOfTheTube18); >> 1997 >> 1998 logicMod78 = new G4LogicalVolume(solidMod78, ModMater, "Mod78",0,0,0); >> 1999 physiMod78 = new G4PVPlacement(0, // no rotation >> 2000 positionMod78, // at (x,y,z) >> 2001 logicMod78, // its logical volume >> 2002 "Mod78", // its name >> 2003 logicMod60, // its mother volume >> 2004 false, // no boolean operations >> 2005 0); // no particular field >> 2006 467 G4VisAttributes * red = new G4VisAttributes( 2007 G4VisAttributes * red = new G4VisAttributes( G4Colour(1. ,0. ,0.)); 468 red-> SetVisibility(true); 2008 red-> SetVisibility(true); 469 red-> SetForceSolid(true); 2009 red-> SetForceSolid(true); 470 logicMotherMod -> SetVisAttributes(G4VisAttr << 2010 logicMotherMod -> SetVisAttributes(G4VisAttributes::Invisible); 471 << 2011 472 logicMod1 ->SetVisAttributes(G4VisAttributes << 2012 logicMod0 ->SetVisAttributes(G4VisAttributes::Invisible); 473 logicMod2 ->SetVisAttributes(G4VisAttributes << 2013 logicMod20 ->SetVisAttributes(G4VisAttributes::Invisible); 474 logicMod3 ->SetVisAttributes(G4VisAttributes << 2014 logicMod40 ->SetVisAttributes(G4VisAttributes::Invisible); 475 logicMod4 ->SetVisAttributes(G4VisAttributes << 2015 logicMod60 ->SetVisAttributes(G4VisAttributes::Invisible); 476 << 2016 logicMod1 -> SetVisAttributes(red); 477 for (G4int i=1;i<StepNumbers;i++) << 2017 logicMod2 -> SetVisAttributes(red); 478 { << 2018 logicMod3 -> SetVisAttributes(red); 479 logicMod[i] -> SetVisAttributes(red); << 2019 logicMod4 -> SetVisAttributes(red); 480 } << 2020 logicMod5 -> SetVisAttributes(red); 481 << 2021 logicMod6 -> SetVisAttributes(red); 482 } << 2022 logicMod7 -> SetVisAttributes(red); >> 2023 logicMod8 -> SetVisAttributes(red); >> 2024 logicMod9 -> SetVisAttributes(red); >> 2025 logicMod10 -> SetVisAttributes(red); >> 2026 logicMod11 -> SetVisAttributes(red); >> 2027 logicMod12 -> SetVisAttributes(red); >> 2028 logicMod13 -> SetVisAttributes(red); >> 2029 logicMod14 -> SetVisAttributes(red); >> 2030 logicMod15 -> SetVisAttributes(red); >> 2031 logicMod16 -> SetVisAttributes(red); >> 2032 logicMod17 -> SetVisAttributes(red); >> 2033 logicMod18 -> SetVisAttributes(red); >> 2034 logicMod21 -> SetVisAttributes(red); >> 2035 logicMod22 -> SetVisAttributes(red); >> 2036 logicMod23 -> SetVisAttributes(red); >> 2037 logicMod24 -> SetVisAttributes(red); >> 2038 logicMod25 -> SetVisAttributes(red); >> 2039 logicMod26 -> SetVisAttributes(red); >> 2040 logicMod27 -> SetVisAttributes(red); >> 2041 logicMod28 -> SetVisAttributes(red); >> 2042 logicMod29 -> SetVisAttributes(red); >> 2043 logicMod30 -> SetVisAttributes(red); >> 2044 logicMod31 -> SetVisAttributes(red); >> 2045 logicMod32 -> SetVisAttributes(red); >> 2046 logicMod33 -> SetVisAttributes(red); >> 2047 logicMod34 -> SetVisAttributes(red); >> 2048 logicMod35 -> SetVisAttributes(red); >> 2049 logicMod36 -> SetVisAttributes(red); >> 2050 logicMod37 -> SetVisAttributes(red); >> 2051 logicMod38 -> SetVisAttributes(red); >> 2052 logicMod41 -> SetVisAttributes(red); >> 2053 logicMod42 -> SetVisAttributes(red); >> 2054 logicMod43 -> SetVisAttributes(red); >> 2055 logicMod44 -> SetVisAttributes(red); >> 2056 logicMod45 -> SetVisAttributes(red); >> 2057 logicMod46 -> SetVisAttributes(red); >> 2058 logicMod47 -> SetVisAttributes(red); >> 2059 logicMod48 -> SetVisAttributes(red); >> 2060 logicMod49 -> SetVisAttributes(red); >> 2061 logicMod50 -> SetVisAttributes(red); >> 2062 logicMod51 -> SetVisAttributes(red); >> 2063 logicMod52 -> SetVisAttributes(red); >> 2064 logicMod53 -> SetVisAttributes(red); >> 2065 logicMod54 -> SetVisAttributes(red); >> 2066 logicMod55 -> SetVisAttributes(red); >> 2067 logicMod56 -> SetVisAttributes(red); >> 2068 logicMod57 -> SetVisAttributes(red); >> 2069 logicMod58 -> SetVisAttributes(red); >> 2070 logicMod61 -> SetVisAttributes(red); >> 2071 logicMod62 -> SetVisAttributes(red); >> 2072 logicMod63 -> SetVisAttributes(red); >> 2073 logicMod64 -> SetVisAttributes(red); >> 2074 logicMod65 -> SetVisAttributes(red); >> 2075 logicMod66 -> SetVisAttributes(red); >> 2076 logicMod67 -> SetVisAttributes(red); >> 2077 logicMod68 -> SetVisAttributes(red); >> 2078 logicMod69 -> SetVisAttributes(red); >> 2079 logicMod70 -> SetVisAttributes(red); >> 2080 logicMod71 -> SetVisAttributes(red); >> 2081 logicMod72 -> SetVisAttributes(red); >> 2082 logicMod73 -> SetVisAttributes(red); >> 2083 logicMod74 -> SetVisAttributes(red); >> 2084 logicMod75 -> SetVisAttributes(red); >> 2085 logicMod76 -> SetVisAttributes(red); >> 2086 logicMod77 -> SetVisAttributes(red); >> 2087 logicMod78 -> SetVisAttributes(red); >> 2088 } 483 2089 484 ////////////////////////////////////////////// << 485 // Messenger values << 486 ////////////////////////////////////////////// 2090 ///////////////////////////////////////////////////////////////////////////// 487 void HadrontherapyModulator::SetModulatorAngle 2091 void HadrontherapyModulator::SetModulatorAngle(G4double angle) 488 { 2092 { 489 G4double rotationAngle = angle; 2093 G4double rotationAngle = angle; 490 rm -> rotateZ(rotationAngle); 2094 rm -> rotateZ(rotationAngle); 491 physiMotherMod -> SetRotation(rm); 2095 physiMotherMod -> SetRotation(rm); 492 G4cout << "MODULATOR HAS BEEN ROTATED OF " < 2096 G4cout << "MODULATOR HAS BEEN ROTATED OF " << rotationAngle/deg 493 << " deg" << G4endl; 2097 << " deg" << G4endl; 494 G4RunManager::GetRunManager() -> GeometryHas 2098 G4RunManager::GetRunManager() -> GeometryHasBeenModified(); 495 } 2099 } 496 ////////////////////////////////////////////// << 497 // Change modulator material << 498 void HadrontherapyModulator::SetModulatorMater << 499 { << 500 if (G4Material* NewMaterial = G4NistManage << 501 { << 502 if (NewMaterial) << 503 { << 504 for(G4int i=1;i<StepNumbers;i++) << 505 { << 506 logicMod[i] -> SetMaterial(NewMaterial); << 507 // G4RunManager::GetRunManager() -> Physi << 508 G4RunManager::GetRunManager() -> Geometr << 509 << 510 // G4cout<<(logicMod[i]->GetMaterial()->G << 511 } << 512 G4cout << "The material of the Modulator whe << 513 } << 514 } << 515 else << 516 { << 517 G4cout << "WARNING: material \"" << Material << 518 " table [located in $G4INSTALL/source/ma << 519 G4cout << "Use command \"/parameter/nist\" t << 520 << 521 << 522 } << 523 } << 524 2100 525 ////////////////////////////////////////////// << 526 // Change modulator position in the beam line << 527 void HadrontherapyModulator::SetModulatorPosit << 528 { << 529 G4ThreeVector NewModulatorPos=Pos; << 530 physiMotherMod -> SetTranslation( NewModulat << 531 G4RunManager::GetRunManager() -> GeometryHas << 532 G4cout << "The modulator wheel is translated << 533 << 534 } << 535 ////////////////////////////////////////////// << 536 //change modulator inner raduis << 537 void HadrontherapyModulator::SetModulatorInner << 538 { << 539 solidMod1 -> SetInnerRadius(newvalue); << 540 solidMod2 -> SetInnerRadius(newvalue); << 541 solidMod3 -> SetInnerRadius(newvalue); << 542 solidMod4 -> SetInnerRadius(newvalue); << 543 for(G4int i=1;i<StepNumbers;i++) << 544 { << 545 solidMod[i] -> SetInnerRadius(newvalue);} << 546 G4RunManager::GetRunManager() -> GeometryHa << 547 G4cout << "InnerRadius of the Modulator Whee << 548 << newvalue/mm<<" mm"<< G4endl; << 549 } << 550 ////////////////////////////////////////////// << 551 //change modulator outer raduis << 552 void HadrontherapyModulator::SetModulatorOuter << 553 { << 554 solidMod1 -> SetOuterRadius(newvalue); << 555 solidMod2 -> SetOuterRadius(newvalue); << 556 solidMod3 -> SetOuterRadius(newvalue); << 557 solidMod4 -> SetOuterRadius(newvalue); << 558 for(G4int i=1;i<StepNumbers;i++) << 559 { << 560 solidMod[i] -> SetOuterRadius(newvalue);} << 561 G4RunManager::GetRunManager() -> GeometryHa << 562 G4cout << "OuterRadius of the Modulator Whee << 563 << newvalue/mm<<" mm"<<G4endl; << 564 } << 565 ////////////////////////////////////////////// << 566 void HadrontherapyModulator:: GetDataFromFile( << 567 2101 568 { << 569 G4String Name=value; << 570 if(value=="default" ) << 571 { << 572 Name=FileName; << 573 } << 574 G4cout<<" Step properties of modulator will be << 575 <<Name<<G4endl; << 576 ModulatorPropertiesFromFile(Name); << 577 } << 578 2102