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