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 example is provided by the Geant4-DNA 26 // This example is provided by the Geant4-DNA collaboration 27 // Any report or published results obtained us 27 // Any report or published results obtained using the Geant4-DNA software 28 // shall cite the following Geant4-DNA collabo 28 // shall cite the following Geant4-DNA collaboration publication: 29 // Med. Phys. 37 (2010) 4692-4708 29 // Med. Phys. 37 (2010) 4692-4708 30 // The Geant4-DNA web site is available at htt 30 // The Geant4-DNA web site is available at http://geant4-dna.org 31 // 31 // 32 // If you use this example, please cite the fo 32 // If you use this example, please cite the following publication: 33 // Rad. Prot. Dos. 133 (2009) 2-11 33 // Rad. Prot. Dos. 133 (2009) 2-11 34 34 35 #include "DetectorConstruction.hh" 35 #include "DetectorConstruction.hh" 36 #include "G4PhysicalConstants.hh" 36 #include "G4PhysicalConstants.hh" 37 #include "G4SystemOfUnits.hh" 37 #include "G4SystemOfUnits.hh" 38 #include "G4MagIntegratorDriver.hh" 38 #include "G4MagIntegratorDriver.hh" 39 #include "G4AutoDelete.hh" 39 #include "G4AutoDelete.hh" 40 40 41 DetectorConstruction::DetectorConstruction() 41 DetectorConstruction::DetectorConstruction() 42 42 43 :fDefaultMaterial(nullptr),fCollimatorMateri 43 :fDefaultMaterial(nullptr),fCollimatorMaterial(nullptr),fBoiteMaterial(nullptr), 44 fCathodeMaterial(nullptr),fVerreMaterial(nu 44 fCathodeMaterial(nullptr),fVerreMaterial(nullptr),fVerre2Material(nullptr), 45 fKgmMaterial(nullptr),fBoite2Material(nullp 45 fKgmMaterial(nullptr),fBoite2Material(nullptr),fBoite3Material(nullptr), 46 fNucleusMaterial1(nullptr),fCytoplasmMateri 46 fNucleusMaterial1(nullptr),fCytoplasmMaterial1(nullptr), 47 fNucleusMaterial2(nullptr),fCytoplasmMateri 47 fNucleusMaterial2(nullptr),fCytoplasmMaterial2(nullptr), 48 fNucleusMaterial3(nullptr),fCytoplasmMateri 48 fNucleusMaterial3(nullptr),fCytoplasmMaterial3(nullptr), 49 fPhysiWorld(nullptr),fLogicWorld(nullptr),f 49 fPhysiWorld(nullptr),fLogicWorld(nullptr),fSolidWorld(nullptr), 50 fPhysiVol(nullptr),fLogicVol(nullptr),fSoli 50 fPhysiVol(nullptr),fLogicVol(nullptr),fSolidVol(nullptr), 51 fPhysiBoite(nullptr),fLogicBoite(nullptr),f 51 fPhysiBoite(nullptr),fLogicBoite(nullptr),fSolidBoite(nullptr), 52 fPhysiYoke1(nullptr),fLogicYoke1(nullptr),f 52 fPhysiYoke1(nullptr),fLogicYoke1(nullptr),fSolidYoke1(nullptr), 53 fPhysi1Gap(nullptr),fLogic1Gap(nullptr),fSo 53 fPhysi1Gap(nullptr),fLogic1Gap(nullptr),fSolid1Gap(nullptr), 54 fPhysi2Gap(nullptr),fLogic2Gap(nullptr),fSo 54 fPhysi2Gap(nullptr),fLogic2Gap(nullptr),fSolid2Gap(nullptr), 55 fPhysi3Gap(nullptr),fLogic3Gap(nullptr),fSo 55 fPhysi3Gap(nullptr),fLogic3Gap(nullptr),fSolid3Gap(nullptr), 56 fPhysiYoke2(nullptr),fLogicYoke2(nullptr),f 56 fPhysiYoke2(nullptr),fLogicYoke2(nullptr),fSolidYoke2(nullptr), 57 fPhysi4Gap(nullptr),fLogic4Gap(nullptr),fSo 57 fPhysi4Gap(nullptr),fLogic4Gap(nullptr),fSolid4Gap(nullptr), 58 fPhysi5Gap(nullptr),fLogic5Gap(nullptr),fSo 58 fPhysi5Gap(nullptr),fLogic5Gap(nullptr),fSolid5Gap(nullptr), 59 fPhysiBoiteIso(nullptr),fLogicBoiteIso(null 59 fPhysiBoiteIso(nullptr),fLogicBoiteIso(nullptr),fSolidBoiteIso(nullptr), 60 fPhysiCathode(nullptr),fLogicCathode(nullpt 60 fPhysiCathode(nullptr),fLogicCathode(nullptr),fSolidCathode(nullptr), 61 fPhysiIso(nullptr),fLogicIso(nullptr),fSoli 61 fPhysiIso(nullptr),fLogicIso(nullptr),fSolidIso(nullptr), 62 fPhysiVerre(nullptr),fLogicVerre(nullptr),f 62 fPhysiVerre(nullptr),fLogicVerre(nullptr),fSolidVerre(nullptr), 63 fPhysiBoite2(nullptr),fLogicBoite2(nullptr) 63 fPhysiBoite2(nullptr),fLogicBoite2(nullptr),fSolidBoite2(nullptr), 64 fPhysiBoite3(nullptr),fLogicBoite3(nullptr) 64 fPhysiBoite3(nullptr),fLogicBoite3(nullptr),fSolidBoite3(nullptr), 65 fPhysiKgm(nullptr),fLogicKgm(nullptr),fSoli 65 fPhysiKgm(nullptr),fLogicKgm(nullptr),fSolidKgm(nullptr), 66 fPhysiVerre2(nullptr),fLogicVerre2(nullptr) 66 fPhysiVerre2(nullptr),fLogicVerre2(nullptr),fSolidVerre2(nullptr), 67 fPhysiPhantom(nullptr),fLogicPhantom(nullpt 67 fPhysiPhantom(nullptr),fLogicPhantom(nullptr),fSolidPhantom(nullptr) 68 68 69 { 69 { 70 DefineMaterials(); 70 DefineMaterials(); 71 71 72 // Initialisation of variables which 72 // Initialisation of variables which 73 // will then be appropriately fixed in metho 73 // will then be appropriately fixed in methods of this class 74 // to implement the simulation geometry set- 74 // to implement the simulation geometry set-up 75 fDensityPhantom = 0.; // in g/cm3 75 fDensityPhantom = 0.; // in g/cm3 76 fDensityNucleus = 0.; // in g/cm3 76 fDensityNucleus = 0.; // in g/cm3 77 fDensityCytoplasm = 0.; // in g/cm3 77 fDensityCytoplasm = 0.; // in g/cm3 78 fWorldSizeXY=fWorldSizeZ=0.; 78 fWorldSizeXY=fWorldSizeZ=0.; 79 fCollObjSizeXY = 0.; 79 fCollObjSizeXY = 0.; 80 fCollObjSizeZ = 0.; 80 fCollObjSizeZ = 0.; 81 81 82 // TARGET POSITION 82 // TARGET POSITION 83 fCiblePositionX = 0.; 83 fCiblePositionX = 0.; 84 fCiblePositionY = 0.; 84 fCiblePositionY = 0.; 85 fCiblePositionZ = 0.; 85 fCiblePositionZ = 0.; 86 86 87 // MICROBEAM LINE ANGLE 87 // MICROBEAM LINE ANGLE 88 fLineAngle = 0.; 88 fLineAngle = 0.; 89 89 90 fNbOfPixelsInPhantom=0; 90 fNbOfPixelsInPhantom=0; 91 } 91 } 92 92 93 DetectorConstruction::~DetectorConstruction() 93 DetectorConstruction::~DetectorConstruction() 94 {} 94 {} 95 95 96 G4VPhysicalVolume* DetectorConstruction::Const 96 G4VPhysicalVolume* DetectorConstruction::Construct() 97 { 97 { 98 if(fPhysiWorld) { return fPhysiWorld; } 98 if(fPhysiWorld) { return fPhysiWorld; } 99 return ConstructLine(); 99 return ConstructLine(); 100 } 100 } 101 101 102 void DetectorConstruction::DefineMaterials() 102 void DetectorConstruction::DefineMaterials() 103 { 103 { 104 G4String name, symbol; 104 G4String name, symbol; 105 G4double density; 105 G4double density; 106 106 107 G4int ncomponents, natoms,nel; 107 G4int ncomponents, natoms,nel; 108 G4double z, a; 108 G4double z, a; 109 G4double fractionmass; 109 G4double fractionmass; 110 G4double temperature, pressure; 110 G4double temperature, pressure; 111 111 112 // Define Elements 112 // Define Elements 113 113 114 G4Element* H = new G4Element ("Hydrogen", 114 G4Element* H = new G4Element ("Hydrogen", "H", 1. , 1.01*g/mole); 115 G4Element* N = new G4Element ("Nitrogen", 115 G4Element* N = new G4Element ("Nitrogen", "N", 7., 14.01*g/mole); 116 G4Element* O = new G4Element ("Oxygen" , 116 G4Element* O = new G4Element ("Oxygen" , "O", 8. , 16.00*g/mole); 117 G4Element* Ar = new G4Element ("Argon" , " 117 G4Element* Ar = new G4Element ("Argon" , "Ar", 18., 39.948*g/mole ); 118 G4Element* C = new G4Element ("Carbon","C 118 G4Element* C = new G4Element ("Carbon","C", 6., 12.011*g/mole); 119 G4Element * Si = new G4Element ("Silicon"," 119 G4Element * Si = new G4Element ("Silicon","Si",14., 28.0855*g/mole); 120 G4Element * Cu = new G4Element ("Cuivre","C 120 G4Element * Cu = new G4Element ("Cuivre","Cu",29., 63.546*g/mole); 121 G4Element * Zn = new G4Element ("Zinc","Zn" 121 G4Element * Zn = new G4Element ("Zinc","Zn",30.,65.409*g/mole); 122 G4Element * P = new G4Element ("Phosphorus 122 G4Element * P = new G4Element ("Phosphorus","P",15.,30.973761*g/mole); 123 123 124 // Vacuum standard definition... 124 // Vacuum standard definition... 125 125 126 density = universe_mean_density; 126 density = universe_mean_density; 127 G4Material* vacuum = new G4Material(name="Va 127 G4Material* vacuum = new G4Material(name="Vacuum", z=1., a=1.01*g/mole, 128 density); 128 density); 129 // Water 129 // Water 130 130 131 density = 1.000*g/cm3; 131 density = 1.000*g/cm3; 132 G4Material* H2O = new G4Material(name="H2O" 132 G4Material* H2O = new G4Material(name="H2O" , density, ncomponents=2); 133 H2O->AddElement(H, natoms=2); 133 H2O->AddElement(H, natoms=2); 134 H2O->AddElement(O, natoms=1); 134 H2O->AddElement(O, natoms=1); 135 135 136 // Air 136 // Air 137 137 138 density = 1.290*mg/cm3; 138 density = 1.290*mg/cm3; 139 pressure = 1*atmosphere; 139 pressure = 1*atmosphere; 140 temperature = 293.16*kelvin; 140 temperature = 293.16*kelvin; 141 G4Material* Air = new G4Material(name="Air" 141 G4Material* Air = new G4Material(name="Air" , density, ncomponents=2, kStateGas, temperature, pressure); 142 Air->AddElement(N, fractionmass=0.7); 142 Air->AddElement(N, fractionmass=0.7); 143 Air->AddElement(O, fractionmass=0.3); 143 Air->AddElement(O, fractionmass=0.3); 144 144 145 // Low Pressure air 145 // Low Pressure air 146 146 147 density = (5e-6/1013.)*1.290*mg/cm3; // 5e-6 147 density = (5e-6/1013.)*1.290*mg/cm3; // 5e-6 mbar is the usual beam pipe air pressure 148 pressure = 1*atmosphere; 148 pressure = 1*atmosphere; 149 temperature = 293.16*kelvin; 149 temperature = 293.16*kelvin; 150 G4Material* LPAir = new G4Material(name="LPA 150 G4Material* LPAir = new G4Material(name="LPAir" , density, ncomponents=3, kStateGas, temperature, pressure); 151 LPAir->AddElement(N, fractionmass=0.715); 151 LPAir->AddElement(N, fractionmass=0.715); 152 LPAir->AddElement(O, fractionmass=0.25); 152 LPAir->AddElement(O, fractionmass=0.25); 153 LPAir->AddElement(Ar, fractionmass=0.035); 153 LPAir->AddElement(Ar, fractionmass=0.035); 154 154 155 // Platinum 155 // Platinum 156 156 157 a = 195.09*g/mole; 157 a = 195.09*g/mole; 158 density = 21.4*g/cm3; 158 density = 21.4*g/cm3; 159 G4Material* Pt = new G4Material(name="Pl", z 159 G4Material* Pt = new G4Material(name="Pl", z=78., a, density); 160 160 161 // Butane @ 10 mbar 161 // Butane @ 10 mbar 162 162 163 density = 2.552e-2*mg/cm3; 163 density = 2.552e-2*mg/cm3; 164 pressure = 0.01*bar; 164 pressure = 0.01*bar; 165 temperature = 293.16*kelvin; 165 temperature = 293.16*kelvin; 166 G4Material* Butane = new G4Material(name = " 166 G4Material* Butane = new G4Material(name = "Butane", density, nel = 2, kStateGas, temperature, pressure); 167 Butane->AddElement (C, natoms=4); 167 Butane->AddElement (C, natoms=4); 168 Butane->AddElement (H, natoms=10); 168 Butane->AddElement (H, natoms=10); 169 169 170 // Polypropylene 170 // Polypropylene 171 171 172 density = 0.9*g/cm3; 172 density = 0.9*g/cm3; 173 G4Material* Polyprop = new G4Material(name = 173 G4Material* Polyprop = new G4Material(name = "Polyprop", density, nel = 2); 174 Polyprop->AddElement (C,3); 174 Polyprop->AddElement (C,3); 175 Polyprop->AddElement (H,6); 175 Polyprop->AddElement (H,6); 176 176 177 // Si3N4 177 // Si3N4 178 178 179 density = 3.44*g/cm3; 179 density = 3.44*g/cm3; 180 G4Material* Si3N4 = new G4Material(name = "S 180 G4Material* Si3N4 = new G4Material(name = "Si3N4", density, nel = 2); 181 Si3N4->AddElement (Si, natoms=3); 181 Si3N4->AddElement (Si, natoms=3); 182 Si3N4->AddElement (N, natoms=4); 182 Si3N4->AddElement (N, natoms=4); 183 183 184 // SiO2 184 // SiO2 185 185 186 density = 2.5*g/cm3; 186 density = 2.5*g/cm3; 187 G4Material* SiO2 = new G4Material(name = "Si 187 G4Material* SiO2 = new G4Material(name = "SiO2", density, nel = 2); 188 SiO2->AddElement (Si, natoms=1); 188 SiO2->AddElement (Si, natoms=1); 189 SiO2->AddElement (O, natoms=2); 189 SiO2->AddElement (O, natoms=2); 190 190 191 // Brass 191 // Brass 192 192 193 density = 8.5*g/cm3; 193 density = 8.5*g/cm3; 194 G4Material* Laiton = new G4Material(name = " 194 G4Material* Laiton = new G4Material(name = "Laiton", density, nel = 2); 195 Laiton->AddElement (Cu,1); 195 Laiton->AddElement (Cu,1); 196 Laiton->AddElement (Zn,1); 196 Laiton->AddElement (Zn,1); 197 197 198 // Phantom 198 // Phantom 199 199 200 fDensityPhantom = 1.; // in g/cm3 200 fDensityPhantom = 1.; // in g/cm3 201 201 202 // Nucleus composition from Alard et al., Ra 202 // Nucleus composition from Alard et al., Rad. Res. 158, 650 (2002) and 203 // Comp. Math. Meth. Med. 147252 (2012) 203 // Comp. Math. Meth. Med. 147252 (2012) 204 // 204 // 205 // Cytoplasm composition is assumed to be wa 205 // Cytoplasm composition is assumed to be water 206 206 207 // Cytoplasm 207 // Cytoplasm 208 208 209 fDensityCytoplasm = 1.; // in g/cm3 209 fDensityCytoplasm = 1.; // in g/cm3 210 density = fDensityCytoplasm*g/cm3; 210 density = fDensityCytoplasm*g/cm3; 211 G4Material* Cytoplasm1 = new G4Material(name 211 G4Material* Cytoplasm1 = new G4Material(name="Cytoplasm1" , density, ncomponents=2); 212 Cytoplasm1->AddElement(H, fractionmass=0.112 212 Cytoplasm1->AddElement(H, fractionmass=0.112); 213 Cytoplasm1->AddElement(O, fractionmass=0.888 213 Cytoplasm1->AddElement(O, fractionmass=0.888); 214 214 215 // Nucleoli 215 // Nucleoli 216 216 217 fDensityCytoplasm = 1.; 217 fDensityCytoplasm = 1.; 218 // in g/cm3 (nucleoli are assumed to have th 218 // in g/cm3 (nucleoli are assumed to have the same chemical comp. as nucleus) 219 density = fDensityCytoplasm*g/cm3; 219 density = fDensityCytoplasm*g/cm3; 220 G4Material* Cytoplasm2 = new G4Material(name 220 G4Material* Cytoplasm2 = new G4Material(name="Cytoplasm2" , density, ncomponents=5); 221 Cytoplasm2->AddElement(H, fractionmass=0.106 221 Cytoplasm2->AddElement(H, fractionmass=0.1064); 222 Cytoplasm2->AddElement(O, fractionmass=0.745 222 Cytoplasm2->AddElement(O, fractionmass=0.745); 223 Cytoplasm2->AddElement(C, fractionmass=0.090 223 Cytoplasm2->AddElement(C, fractionmass=0.0904); 224 Cytoplasm2->AddElement(N, fractionmass=0.032 224 Cytoplasm2->AddElement(N, fractionmass=0.0321); 225 Cytoplasm2->AddElement(P, fractionmass=0.026 225 Cytoplasm2->AddElement(P, fractionmass=0.0261); 226 226 227 // default is water 227 // default is water 228 228 229 fDensityCytoplasm = 1.; // in g/cm3 229 fDensityCytoplasm = 1.; // in g/cm3 230 density = fDensityCytoplasm*g/cm3; 230 density = fDensityCytoplasm*g/cm3; 231 G4Material* Cytoplasm3 = new G4Material(name 231 G4Material* Cytoplasm3 = new G4Material(name="Cytoplasm3" , density, ncomponents=2); 232 Cytoplasm3->AddElement(H, fractionmass=0.112 232 Cytoplasm3->AddElement(H, fractionmass=0.112); 233 Cytoplasm3->AddElement(O, fractionmass=0.888 233 Cytoplasm3->AddElement(O, fractionmass=0.888); 234 234 235 // Nucleus chemical composition 235 // Nucleus chemical composition 236 236 237 fDensityNucleus = 1.; // in g/cm3 237 fDensityNucleus = 1.; // in g/cm3 238 density = fDensityNucleus*g/cm3; 238 density = fDensityNucleus*g/cm3; 239 G4Material* Nucleus1 = new G4Material(name=" 239 G4Material* Nucleus1 = new G4Material(name="Nucleus1" , density, ncomponents=5); 240 Nucleus1->AddElement(H, fractionmass=0.1064) 240 Nucleus1->AddElement(H, fractionmass=0.1064); 241 Nucleus1->AddElement(O, fractionmass=0.745); 241 Nucleus1->AddElement(O, fractionmass=0.745); 242 Nucleus1->AddElement(C, fractionmass=0.0904) 242 Nucleus1->AddElement(C, fractionmass=0.0904); 243 Nucleus1->AddElement(N, fractionmass=0.0321) 243 Nucleus1->AddElement(N, fractionmass=0.0321); 244 Nucleus1->AddElement(P, fractionmass=0.0261) 244 Nucleus1->AddElement(P, fractionmass=0.0261); 245 245 246 fDensityNucleus = 1.; // in g/cm3 246 fDensityNucleus = 1.; // in g/cm3 247 density = fDensityNucleus*g/cm3; 247 density = fDensityNucleus*g/cm3; 248 G4Material* Nucleus2 = new G4Material(name=" 248 G4Material* Nucleus2 = new G4Material(name="Nucleus2" , density, ncomponents=5); 249 Nucleus2->AddElement(H, fractionmass=0.1064) 249 Nucleus2->AddElement(H, fractionmass=0.1064); 250 Nucleus2->AddElement(O, fractionmass=0.745); 250 Nucleus2->AddElement(O, fractionmass=0.745); 251 Nucleus2->AddElement(C, fractionmass=0.0904) 251 Nucleus2->AddElement(C, fractionmass=0.0904); 252 Nucleus2->AddElement(N, fractionmass=0.0321) 252 Nucleus2->AddElement(N, fractionmass=0.0321); 253 Nucleus2->AddElement(P, fractionmass=0.0261) 253 Nucleus2->AddElement(P, fractionmass=0.0261); 254 254 255 // default 255 // default 256 256 257 fDensityNucleus = 1.; // in g/cm3 257 fDensityNucleus = 1.; // in g/cm3 258 density = fDensityNucleus*g/cm3; 258 density = fDensityNucleus*g/cm3; 259 G4Material* Nucleus3 = new G4Material(name=" 259 G4Material* Nucleus3 = new G4Material(name="Nucleus3" , density, ncomponents=5); 260 Nucleus3->AddElement(H, fractionmass=0.1064) 260 Nucleus3->AddElement(H, fractionmass=0.1064); 261 Nucleus3->AddElement(O, fractionmass=0.745); 261 Nucleus3->AddElement(O, fractionmass=0.745); 262 Nucleus3->AddElement(C, fractionmass=0.0904) 262 Nucleus3->AddElement(C, fractionmass=0.0904); 263 Nucleus3->AddElement(N, fractionmass=0.0321) 263 Nucleus3->AddElement(N, fractionmass=0.0321); 264 Nucleus3->AddElement(P, fractionmass=0.0261) 264 Nucleus3->AddElement(P, fractionmass=0.0261); 265 265 266 // Materials in setup 266 // Materials in setup 267 267 268 fDefaultMaterial = vacuum; 268 fDefaultMaterial = vacuum; 269 fCollimatorMaterial = Pt; 269 fCollimatorMaterial = Pt; 270 fBoiteMaterial = Butane; 270 fBoiteMaterial = Butane; 271 fCathodeMaterial = Laiton; 271 fCathodeMaterial = Laiton; 272 fVerreMaterial = Si3N4; 272 fVerreMaterial = Si3N4; 273 fVerre2Material = SiO2; 273 fVerre2Material = SiO2; 274 fKgmMaterial = H2O; 274 fKgmMaterial = H2O; 275 fBoite2Material = Air; 275 fBoite2Material = Air; 276 fBoite3Material = Polyprop; 276 fBoite3Material = Polyprop; 277 277 278 fNucleusMaterial1 = Nucleus1; 278 fNucleusMaterial1 = Nucleus1; 279 fCytoplasmMaterial1 = Cytoplasm1; 279 fCytoplasmMaterial1 = Cytoplasm1; 280 fNucleusMaterial2 = Nucleus2; 280 fNucleusMaterial2 = Nucleus2; 281 fCytoplasmMaterial2 = Cytoplasm2; 281 fCytoplasmMaterial2 = Cytoplasm2; 282 fNucleusMaterial3 = Nucleus3; 282 fNucleusMaterial3 = Nucleus3; 283 fCytoplasmMaterial3 = Cytoplasm3; 283 fCytoplasmMaterial3 = Cytoplasm3; 284 284 285 // DISPLAY MATERIALS 285 // DISPLAY MATERIALS 286 G4cout << G4endl << *(G4Material::GetMateria 286 G4cout << G4endl << *(G4Material::GetMaterialTable()) << G4endl; 287 287 288 } 288 } 289 289 290 G4VPhysicalVolume* DetectorConstruction::Const 290 G4VPhysicalVolume* DetectorConstruction::ConstructLine() 291 { 291 { 292 // WORLD 292 // WORLD 293 fWorldSizeXY = 20*m; 293 fWorldSizeXY = 20*m; 294 fWorldSizeZ = 40*m; 294 fWorldSizeZ = 40*m; 295 295 296 // MICROBEAM LINE ANGLE 296 // MICROBEAM LINE ANGLE 297 fLineAngle = 10*deg; 297 fLineAngle = 10*deg; 298 298 299 // TARGET POSITION 299 // TARGET POSITION 300 fCiblePositionX = -1461.42*mm; 300 fCiblePositionX = -1461.42*mm; 301 fCiblePositionY = 0*mm; 301 fCiblePositionY = 0*mm; 302 fCiblePositionZ = -1327 + (955*std::cos(fLin 302 fCiblePositionZ = -1327 + (955*std::cos(fLineAngle))*mm; 303 303 304 //************* 304 //************* 305 // WORLD VOLUME 305 // WORLD VOLUME 306 //************* 306 //************* 307 307 308 fSolidWorld = new G4Box("World", 308 fSolidWorld = new G4Box("World", //its name 309 fWorldSizeXY/2,fWorldSizeXY/2,fWorldSi 309 fWorldSizeXY/2,fWorldSizeXY/2,fWorldSizeZ/2); //its size 310 310 311 311 312 fLogicWorld = new G4LogicalVolume(fSolidWorl 312 fLogicWorld = new G4LogicalVolume(fSolidWorld, //its solid 313 fDefaultMaterial, //its material 313 fDefaultMaterial, //its material 314 "World"); //its name 314 "World"); //its name 315 315 316 fPhysiWorld = new G4PVPlacement(0, //no 316 fPhysiWorld = new G4PVPlacement(0, //no rotation 317 G4ThreeVector(), //at (0,0,0) 317 G4ThreeVector(), //at (0,0,0) 318 "World", // 318 "World", //its name 319 fLogicWorld, 319 fLogicWorld, //its logical volume 320 nullptr, // 320 nullptr, //its mother volume 321 false, // 321 false, //no boolean operation 322 0); //co 322 0); //copy number 323 323 324 //***************** 324 //***************** 325 // FULL LINE VOLUME 325 // FULL LINE VOLUME 326 //***************** 326 //***************** 327 327 328 fSolidVol = new G4Box("Vol", 328 fSolidVol = new G4Box("Vol", 329 10.*m/2,10.*m/2,(14025)*mm/2); 329 10.*m/2,10.*m/2,(14025)*mm/2); 330 330 331 fLogicVol = new G4LogicalVolume(fSolidVol, 331 fLogicVol = new G4LogicalVolume(fSolidVol, 332 fDefaultMaterial, 332 fDefaultMaterial, 333 "Vol"); 333 "Vol"); 334 334 335 fPhysiVol = new G4PVPlacement(0, 335 fPhysiVol = new G4PVPlacement(0, 336 G4ThreeVector(0,0,-2012.5*mm), 336 G4ThreeVector(0,0,-2012.5*mm), 337 "Vol", 337 "Vol", 338 fLogicVol, 338 fLogicVol, 339 fPhysiWorld, 339 fPhysiWorld, 340 false, 340 false, 341 0); 341 0); 342 342 343 // ***************************************** 343 // ************************************************* 344 // Whole microbeam line at 10 deg contained 344 // Whole microbeam line at 10 deg contained in a box 345 // ***************************************** 345 // ************************************************* 346 346 347 G4double PosX = fCiblePositionX*mm +( (6958. 347 G4double PosX = fCiblePositionX*mm +( (6958.3/2-3.3)*std::sin(fLineAngle))*mm; 348 G4double PosZ = (fCiblePositionZ+2012.5)*mm 348 G4double PosZ = (fCiblePositionZ+2012.5)*mm - ((6958.3/2-3.3)*std::cos(fLineAngle))*mm; 349 349 350 // Adjust box absolute position 350 // Adjust box absolute position 351 351 352 PosX = PosX + 1.3 * micrometer * std::cos(fL 352 PosX = PosX + 1.3 * micrometer * std::cos(fLineAngle); 353 PosZ = PosZ + 1.3 * micrometer * std::sin(fL 353 PosZ = PosZ + 1.3 * micrometer * std::sin(fLineAngle); 354 354 355 G4RotationMatrix *rot = new G4RotationMatrix 355 G4RotationMatrix *rot = new G4RotationMatrix(); 356 // rot->rotateX(0*deg); 356 // rot->rotateX(0*deg); 357 rot->rotateY(10*deg); 357 rot->rotateY(10*deg); 358 // rot->rotateZ(0*deg); 358 // rot->rotateZ(0*deg); 359 359 360 fSolidBoite = new G4Box("Boite", 4*cm, 4*cm, 360 fSolidBoite = new G4Box("Boite", 4*cm, 4*cm, 6958.3*mm/2); 361 361 362 fLogicBoite = new G4LogicalVolume(fSolidBoit 362 fLogicBoite = new G4LogicalVolume(fSolidBoite, fDefaultMaterial, "Boite"); 363 363 364 fPhysiBoite = new G4PVPlacement(rot, 364 fPhysiBoite = new G4PVPlacement(rot, 365 G4ThreeVector(PosX,0,PosZ), 365 G4ThreeVector(PosX,0,PosZ), 366 "Boite", 366 "Boite", 367 fLogicBoite, 367 fLogicBoite, 368 fPhysiVol, 368 fPhysiVol, 369 false, 369 false, 370 0); 370 0); 371 371 372 //****************************************** 372 //********************************************************************* 373 // OBJECT COLLIMATOR (after switching magnet 373 // OBJECT COLLIMATOR (after switching magnet, 5 micrometer in diameter) 374 //****************************************** 374 //********************************************************************* 375 375 376 fCollObjSizeXY = 8*cm; 376 fCollObjSizeXY = 8*cm; 377 fCollObjSizeZ = 0.07*mm; 377 fCollObjSizeZ = 0.07*mm; 378 378 379 fSolidYoke1 = new G4Box("_CollObj_yoke1_", f 379 fSolidYoke1 = new G4Box("_CollObj_yoke1_", fCollObjSizeXY/2,fCollObjSizeXY/2,fCollObjSizeZ/2); 380 380 381 fLogicYoke1 = new G4LogicalVolume(fSolidYoke 381 fLogicYoke1 = new G4LogicalVolume(fSolidYoke1, fCollimatorMaterial, "_CollObj_yoke1_"); 382 382 383 fPhysiYoke1 = new G4PVPlacement( 0, G4ThreeV 383 fPhysiYoke1 = new G4PVPlacement( 0, G4ThreeVector(0,0,6958.3*mm/2-3.3*mm-6955*mm+0.07*mm/2), fLogicYoke1, 384 "_CollObj_y 384 "_CollObj_yoke1_",fLogicBoite, false, 0); 385 385 386 // --> FIRST PART 386 // --> FIRST PART 387 387 388 fSolid1Gap = new G4Cons("_CollObj_gap1_", 0. 388 fSolid1Gap = new G4Cons("_CollObj_gap1_", 0.*micrometer, 6*micrometer, 389 0.*micrometer,2.5*micrometer, 389 0.*micrometer,2.5*micrometer, 390 3.5*micrometer, 390 3.5*micrometer, 391 0, twopi); 391 0, twopi); 392 392 393 fLogic1Gap = new G4LogicalVolume(fSolid1Gap, 393 fLogic1Gap = new G4LogicalVolume(fSolid1Gap, fDefaultMaterial, "_CollObj_gap1_"); 394 394 395 fPhysi1Gap = new G4PVPlacement(0, G4ThreeVec 395 fPhysi1Gap = new G4PVPlacement(0, G4ThreeVector(0,0,0.0315*mm), fLogic1Gap, "_CollObj_gap1_", 396 fLogicYoke1, 396 fLogicYoke1, false, 0); 397 397 398 398 399 // --> SECOND PART 399 // --> SECOND PART 400 400 401 fSolid2Gap = new G4Cons("_CollObj_gap2_", 0. 401 fSolid2Gap = new G4Cons("_CollObj_gap2_", 0.*micrometer, 15*micrometer, 402 0.*micrometer,6*micrometer, 402 0.*micrometer,6*micrometer, 403 6.5*micrometer, 403 6.5*micrometer, 404 0, twopi); 404 0, twopi); 405 405 406 fLogic2Gap = new G4LogicalVolume(fSolid2Gap, 406 fLogic2Gap = new G4LogicalVolume(fSolid2Gap, fDefaultMaterial, "_CollObj_gap2_"); 407 407 408 fPhysi2Gap = new G4PVPlacement(0, G4ThreeVec 408 fPhysi2Gap = new G4PVPlacement(0, G4ThreeVector(0,0,0.0215*mm), fLogic2Gap, "_CollObj_gap2_", 409 fLogicYoke1, 409 fLogicYoke1, false, 0); 410 410 411 411 412 // --> THIRD PART 412 // --> THIRD PART 413 413 414 fSolid3Gap = new G4Cons("_CollObj_gap3_", 0. 414 fSolid3Gap = new G4Cons("_CollObj_gap3_", 0.*micrometer, 105*micrometer, 415 0.*micrometer,15*micrometer, 415 0.*micrometer,15*micrometer, 416 25*micrometer, 416 25*micrometer, 417 0, twopi); 417 0, twopi); 418 418 419 fLogic3Gap = new G4LogicalVolume(fSolid3Gap, 419 fLogic3Gap = new G4LogicalVolume(fSolid3Gap, fDefaultMaterial, "_CollObj_gap3_"); 420 420 421 fPhysi3Gap = new G4PVPlacement(0, G4ThreeVec 421 fPhysi3Gap = new G4PVPlacement(0, G4ThreeVector(0,0,-0.010*mm), fLogic3Gap, "_CollObj_gap3_", fLogicYoke1, 422 false, 0); 422 false, 0); 423 423 424 424 425 //************************ 425 //************************ 426 // GAS DETECTOR COLLIMATOR 426 // GAS DETECTOR COLLIMATOR 427 //************************ 427 //************************ 428 428 429 fSolidYoke2 = new G4Box("_CollDet_yoke_", 2. 429 fSolidYoke2 = new G4Box("_CollDet_yoke_", 2.5*cm, 2.5*cm, 0.035*mm); 430 430 431 fLogicYoke2 = new G4LogicalVolume(fSolidYoke 431 fLogicYoke2 = new G4LogicalVolume(fSolidYoke2, fCollimatorMaterial, "_CollDet_yoke_"); 432 432 433 fPhysiYoke2 = new G4PVPlacement(0, 433 fPhysiYoke2 = new G4PVPlacement(0, 434 G4ThreeVecto 434 G4ThreeVector(0,0,6958.3*mm/2-0.3*mm-3*mm-0.004*mm-0.1*mm-1*mm-2.5*mm-0.070*mm/2), 435 fLogicYoke2, 435 fLogicYoke2, "_CollDet_yoke_", fLogicBoite, false, 0); 436 436 437 // --> FIRST PART 437 // --> FIRST PART 438 438 439 fSolid4Gap = new G4Cons("_CollDet_gap4_", 0. 439 fSolid4Gap = new G4Cons("_CollDet_gap4_", 0.*micrometer, 8*micrometer, 440 0.*micrometer,5*micrometer, 440 0.*micrometer,5*micrometer, 441 7.5*micrometer, 441 7.5*micrometer, 442 0, twopi); 442 0, twopi); 443 443 444 fLogic4Gap = new G4LogicalVolume(fSolid4Gap, 444 fLogic4Gap = new G4LogicalVolume(fSolid4Gap, fDefaultMaterial, "_CollDet_gap4_"); 445 445 446 fPhysi4Gap = new G4PVPlacement(0, G4ThreeVec 446 fPhysi4Gap = new G4PVPlacement(0, G4ThreeVector(0,0,0.0275*mm), fLogic4Gap, "_CollDet_gap4_", 447 fLogicYoke2, 447 fLogicYoke2, false, 0); 448 448 449 // --> SECOND PART 449 // --> SECOND PART 450 450 451 fSolid5Gap = new G4Cons("_CollDet_gap5_", 0. 451 fSolid5Gap = new G4Cons("_CollDet_gap5_", 0.*micrometer, 105*micrometer, 452 0.*micrometer,8*micrometer, 452 0.*micrometer,8*micrometer, 453 27.5*micrometer, 453 27.5*micrometer, 454 0, twopi); 454 0, twopi); 455 455 456 fLogic5Gap = new G4LogicalVolume(fSolid5Gap, 456 fLogic5Gap = new G4LogicalVolume(fSolid5Gap, fDefaultMaterial, "_CollDet_gap5_"); 457 457 458 fPhysi5Gap = new G4PVPlacement(0, 458 fPhysi5Gap = new G4PVPlacement(0, 459 G4ThreeVector(0,0,-0.0075*mm), 459 G4ThreeVector(0,0,-0.0075*mm), 460 fLogic5Gap, 460 fLogic5Gap, 461 "_CollDet_gap5_", 461 "_CollDet_gap5_", 462 fLogicYoke2, 462 fLogicYoke2, 463 false, 463 false, 464 0); 464 0); 465 // ************ 465 // ************ 466 // GAS DETECTOR 466 // GAS DETECTOR 467 // ************ 467 // ************ 468 468 469 fSolidBoiteIso = new G4Box("Isobutane", 2.5* 469 fSolidBoiteIso = new G4Box("Isobutane", 2.5*cm, 2.5*cm, 1.75*mm); 470 470 471 fLogicBoiteIso = new G4LogicalVolume(fSolidB 471 fLogicBoiteIso = new G4LogicalVolume(fSolidBoiteIso, fBoiteMaterial, "Isobutane"); 472 472 473 fPhysiBoiteIso = new G4PVPlacement(0, 473 fPhysiBoiteIso = new G4PVPlacement(0, 474 G4ThreeVector(0,0,6958.3*mm/2-0.3*mm- 474 G4ThreeVector(0,0,6958.3*mm/2-0.3*mm-3*mm-0.004*mm-0.1*mm-3.5*mm/2), 475 "Isobutane", 475 "Isobutane", 476 fLogicBoiteIso, 476 fLogicBoiteIso, 477 fPhysiBoite, 477 fPhysiBoite, 478 false, 478 false, 479 0); 479 0); 480 480 481 // --> GAS DETECTOR END CAP 481 // --> GAS DETECTOR END CAP 482 482 483 fSolidCathode = new G4Box("_Laiton_", 2.5*cm 483 fSolidCathode = new G4Box("_Laiton_", 2.5*cm, 2.5*cm, 0.5*mm); 484 484 485 fLogicCathode = new G4LogicalVolume(fSolidCa 485 fLogicCathode = new G4LogicalVolume(fSolidCathode, fCathodeMaterial, "_Laiton_"); 486 486 487 fPhysiCathode = new G4PVPlacement(0, 487 fPhysiCathode = new G4PVPlacement(0, 488 G4ThreeVector(0,0,1.25*mm), 488 G4ThreeVector(0,0,1.25*mm), 489 "_Laiton_", 489 "_Laiton_", 490 fLogicCathode, 490 fLogicCathode, 491 fPhysiBoiteIso, 491 fPhysiBoiteIso, 492 false, 0); 492 false, 0); 493 493 494 // --> ISOBUTANE GAS 494 // --> ISOBUTANE GAS 495 495 496 fSolidIso = new G4Box("_Iso_", 1.*mm, 1.*mm, 496 fSolidIso = new G4Box("_Iso_", 1.*mm, 1.*mm, 0.499925*mm); 497 497 498 fLogicIso = new G4LogicalVolume(fSolidIso, f 498 fLogicIso = new G4LogicalVolume(fSolidIso, fBoiteMaterial, "_Iso_"); 499 499 500 fPhysiIso = new G4PVPlacement(0, 500 fPhysiIso = new G4PVPlacement(0, 501 G4ThreeVector(0,0,-0.000075*mm), 501 G4ThreeVector(0,0,-0.000075*mm), 502 "_Iso_", 502 "_Iso_", 503 fLogicIso, 503 fLogicIso, 504 fPhysiCathode, 504 fPhysiCathode, 505 false, 505 false, 506 0); 506 0); 507 507 508 // --> Si3N4 WINDOW 508 // --> Si3N4 WINDOW 509 509 510 fSolidVerre = new G4Box("_Si3N4_", 0.5*mm, 0 510 fSolidVerre = new G4Box("_Si3N4_", 0.5*mm, 0.5*mm, 0.075*micrometer); 511 511 512 fLogicVerre = new G4LogicalVolume(fSolidVerr 512 fLogicVerre = new G4LogicalVolume(fSolidVerre, fVerreMaterial, "_Si3N4_"); 513 513 514 514 515 fPhysiVerre = new G4PVPlacement(0, 515 fPhysiVerre = new G4PVPlacement(0, 516 G4ThreeVector(0,0,0.499925*mm), 516 G4ThreeVector(0,0,0.499925*mm), 517 "_Si3N4_", 517 "_Si3N4_", 518 fLogicVerre, 518 fLogicVerre, 519 fPhysiCathode, 519 fPhysiCathode, 520 false, 520 false, 521 0); 521 0); 522 // ******* 522 // ******* 523 // AIR GAP 523 // AIR GAP 524 // ******* 524 // ******* 525 525 526 fSolidBoite2 = new G4Box("_Air_", 2.5*cm, 2. 526 fSolidBoite2 = new G4Box("_Air_", 2.5*cm, 2.5*cm, 0.1*mm/2); 527 527 528 fLogicBoite2 = new G4LogicalVolume(fSolidBoi 528 fLogicBoite2 = new G4LogicalVolume(fSolidBoite2, fBoite2Material, "_Air_"); 529 529 530 fPhysiBoite2 = new G4PVPlacement(0, 530 fPhysiBoite2 = new G4PVPlacement(0, 531 G4ThreeVector(0,0,6958.3*mm/2-0.3*mm- 531 G4ThreeVector(0,0,6958.3*mm/2-0.3*mm-3*mm-0.004*mm-0.1*mm/2), 532 "_Air_", 532 "_Air_", 533 fLogicBoite2, 533 fLogicBoite2, 534 fPhysiBoite, 534 fPhysiBoite, 535 false, 535 false, 536 0); 536 0); 537 537 538 //************* 538 //************* 539 // CELL SUPPORT 539 // CELL SUPPORT 540 //************* 540 //************* 541 541 542 fSolidBoite3 = new G4Box("Polyprop", 2.5*cm, 542 fSolidBoite3 = new G4Box("Polyprop", 2.5*cm, 2.5*cm, 0.004*mm/2); 543 543 544 fLogicBoite3 = new G4LogicalVolume(fSolidBoi 544 fLogicBoite3 = new G4LogicalVolume(fSolidBoite3, fBoite3Material, "Polyprop"); 545 545 546 fPhysiBoite3 = new G4PVPlacement(0, 546 fPhysiBoite3 = new G4PVPlacement(0, 547 G4ThreeVector(0,0,6958.3*mm/2-0.3*mm 547 G4ThreeVector(0,0,6958.3*mm/2-0.3*mm-3*mm-0.004*mm/2), 548 "Polyprop", 548 "Polyprop", 549 fLogicBoite3, 549 fLogicBoite3, 550 fPhysiBoite, 550 fPhysiBoite, 551 false, 551 false, 552 0); 552 0); 553 //**** 553 //**** 554 // KGM 554 // KGM 555 //**** 555 //**** 556 556 557 fSolidKgm = new G4Box("KGM", 2.5*cm, 2.5*cm, 557 fSolidKgm = new G4Box("KGM", 2.5*cm, 2.5*cm, 3*mm/2); 558 558 559 fLogicKgm = new G4LogicalVolume(fSolidKgm, f 559 fLogicKgm = new G4LogicalVolume(fSolidKgm, fKgmMaterial, "KGM"); 560 560 561 fPhysiKgm = new G4PVPlacement(0, 561 fPhysiKgm = new G4PVPlacement(0, 562 G4ThreeVector(0,0,6958.3*mm/2-0.3 562 G4ThreeVector(0,0,6958.3*mm/2-0.3*mm-3*mm/2), 563 "KGM", 563 "KGM", 564 fLogicKgm, 564 fLogicKgm, 565 fPhysiBoite, 565 fPhysiBoite, 566 false, 566 false, 567 0); 567 0); 568 568 569 //***************** 569 //***************** 570 // MICROSCOPE PLATE 570 // MICROSCOPE PLATE 571 //***************** 571 //***************** 572 572 573 fSolidVerre2 = new G4Box("_Lame_", 2.5*cm, 2 573 fSolidVerre2 = new G4Box("_Lame_", 2.5*cm, 2.5*cm, 0.150*mm); 574 574 575 fLogicVerre2 = new G4LogicalVolume(fSolidVer 575 fLogicVerre2 = new G4LogicalVolume(fSolidVerre2, fVerre2Material, "_Lame_"); 576 576 577 fPhysiVerre2 = new G4PVPlacement(0, 577 fPhysiVerre2 = new G4PVPlacement(0, 578 G4ThreeVector(0,0,6958.3*mm/2-0.3*mm 578 G4ThreeVector(0,0,6958.3*mm/2-0.3*mm/2), 579 "_Lame_", 579 "_Lame_", 580 fLogicVerre2, 580 fLogicVerre2, 581 fPhysiBoite, 581 fPhysiBoite, 582 false, 582 false, 583 0); 583 0); 584 584 585 // ************** 585 // ************** 586 // CELL CYTOPLASM 586 // CELL CYTOPLASM 587 // ************** 587 // ************** 588 588 589 // WITHIN KGM 589 // WITHIN KGM 590 /* 590 /* 591 fSolidCyto=new G4Ellipsoid("CYTO",25*microme 591 fSolidCyto=new G4Ellipsoid("CYTO",25*micrometer, 25*micrometer, 11*micrometer); 592 592 593 fLogicCyto=new G4LogicalVolume (fSolidCyto, 593 fLogicCyto=new G4LogicalVolume (fSolidCyto, fDefaultMaterial, "CYTO"); 594 594 595 fPhysiCyto=new G4PVPlacement(0, G4ThreeVecto 595 fPhysiCyto=new G4PVPlacement(0, G4ThreeVector(0,0,-1.5*mm+11*micrometer),"CYTO",fLogicCyto, fPhysiKgm, false, 0); 596 */ 596 */ 597 597 598 // ************ 598 // ************ 599 // CELL PHANTOM 599 // CELL PHANTOM 600 // ************ 600 // ************ 601 601 602 fMyCellParameterisation = new CellParameteri 602 fMyCellParameterisation = new CellParameterisation 603 (fNucleusMaterial1,fCytoplasmMaterial1 603 (fNucleusMaterial1,fCytoplasmMaterial1, 604 fNucleusMaterial2,fCytoplasmMaterial2, 604 fNucleusMaterial2,fCytoplasmMaterial2, 605 fNucleusMaterial3,fCytoplasmMaterial3); 605 fNucleusMaterial3,fCytoplasmMaterial3); 606 606 607 fSolidPhantom = new G4Box("Phantom", 607 fSolidPhantom = new G4Box("Phantom", 608 fMyCellParameterisation->GetPixelSizeX()/2 608 fMyCellParameterisation->GetPixelSizeX()/2, 609 fMyCellParameterisation->GetPixelSizeY()/2, 609 fMyCellParameterisation->GetPixelSizeY()/2, 610 fMyCellParameterisation->GetPixelSizeZ()/2); 610 fMyCellParameterisation->GetPixelSizeZ()/2); 611 611 612 fLogicPhantom = new G4LogicalVolume(fSolidPh 612 fLogicPhantom = new G4LogicalVolume(fSolidPhantom,fDefaultMaterial,"Phantom",0,0,0); 613 613 614 SetNbOfPixelsInPhantom (fMyCellParameterisat 614 SetNbOfPixelsInPhantom (fMyCellParameterisation->GetPhantomTotalPixels()); 615 615 616 SetMassNucleus(fMyCellParameterisation->GetN 616 SetMassNucleus(fMyCellParameterisation->GetNucleusMass()); 617 617 618 SetMassCytoplasm(fMyCellParameterisation->Ge 618 SetMassCytoplasm(fMyCellParameterisation->GetCytoplasmMass()); 619 619 620 fPhysiPhantom = new G4PVParameterised( 620 fPhysiPhantom = new G4PVParameterised( 621 "Phantom", 621 "Phantom", // their name 622 fLogicPhantom, 622 fLogicPhantom, // their logical volumr 623 //logicCyto, 623 //logicCyto, // Mother logical volume is Cyto 624 fLogicKgm, 624 fLogicKgm, // Mother logical volume is Kgm 625 kUndefined, // Are placed alon 625 kUndefined, // Are placed along this axis 626 fMyCellParameteris 626 fMyCellParameterisation->GetPhantomTotalPixels(), // Number of boxes 627 fMyCellParameteris 627 fMyCellParameterisation,false); // The parametrisation 628 628 629 G4cout << " ==========> The phantom contains 629 G4cout << " ==========> The phantom contains " << fMyCellParameterisation->GetPhantomTotalPixels() << " voxels " << G4endl; 630 G4cout << " ==========> Nucleus mass (kg)=" 630 G4cout << " ==========> Nucleus mass (kg)=" << fMyCellParameterisation->GetNucleusMass() / kg << G4endl; 631 G4cout << " ==========> Cytoplasm mass (kg)= 631 G4cout << " ==========> Cytoplasm mass (kg)=" << fMyCellParameterisation->GetCytoplasmMass()/ kg << G4endl; 632 G4cout << " ==========> Voxel size X (um)=" 632 G4cout << " ==========> Voxel size X (um)=" << fMyCellParameterisation->GetPixelSizeX()/um << G4endl; 633 G4cout << " ==========> Voxel size Y (um)=" 633 G4cout << " ==========> Voxel size Y (um)=" << fMyCellParameterisation->GetPixelSizeY()/um << G4endl; 634 G4cout << " ==========> Voxel size Z (um)=" 634 G4cout << " ==========> Voxel size Z (um)=" << fMyCellParameterisation->GetPixelSizeZ()/um << G4endl; 635 G4cout << G4endl; 635 G4cout << G4endl; 636 636 637 // VISUALISATION ATTRIBUTES (for phantom, se 637 // VISUALISATION ATTRIBUTES (for phantom, see in Parameterisation class) 638 638 639 G4VisAttributes* simpleWorldVisAtt= new G4Vi 639 G4VisAttributes* simpleWorldVisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0)); //White 640 simpleWorldVisAtt->SetVisibility(true); 640 simpleWorldVisAtt->SetVisibility(true); 641 641 642 G4VisAttributes* simplePlain= new G4VisAttri 642 G4VisAttributes* simplePlain= new G4VisAttributes(G4Colour(1.0,1.0,1.0)); //White 643 simplePlain->SetVisibility(true); 643 simplePlain->SetVisibility(true); 644 simplePlain->SetForceSolid(true); 644 simplePlain->SetForceSolid(true); 645 645 646 G4VisAttributes* simpleBoxAttLine= new G4Vis 646 G4VisAttributes* simpleBoxAttLine= new G4VisAttributes(G4Colour(1.0,0.0,0.0)); 647 simpleBoxAttLine->SetVisibility(true); 647 simpleBoxAttLine->SetVisibility(true); 648 648 649 G4VisAttributes* simpleBoxAtt= new G4VisAttr 649 G4VisAttributes* simpleBoxAtt= new G4VisAttributes(G4Colour(1.0,1.0,0.0)); 650 simpleBoxAtt->SetDaughtersInvisible(false); 650 simpleBoxAtt->SetDaughtersInvisible(false); 651 simpleBoxAtt->SetForceSolid(false); 651 simpleBoxAtt->SetForceSolid(false); 652 652 653 G4VisAttributes* simpleBoxAtt2= new G4VisAtt 653 G4VisAttributes* simpleBoxAtt2= new G4VisAttributes(G4Colour(0.0,1.0,0.0)); 654 simpleBoxAtt2->SetDaughtersInvisible(false); 654 simpleBoxAtt2->SetDaughtersInvisible(false); 655 simpleBoxAtt2->SetForceSolid(false); 655 simpleBoxAtt2->SetForceSolid(false); 656 656 657 G4VisAttributes* simpleBoxAttKGM= new G4VisA 657 G4VisAttributes* simpleBoxAttKGM= new G4VisAttributes(G4Colour(0.0,0.0,1.0)); 658 simpleBoxAttKGM->SetDaughtersInvisible(false 658 simpleBoxAttKGM->SetDaughtersInvisible(false); 659 simpleBoxAttKGM->SetForceSolid(false); 659 simpleBoxAttKGM->SetForceSolid(false); 660 660 661 G4VisAttributes* simpleBoxAttPropyl= new G4V 661 G4VisAttributes* simpleBoxAttPropyl= new G4VisAttributes(G4Colour(1.0,1.0,1.0)); 662 simpleBoxAttPropyl->SetDaughtersInvisible(tr 662 simpleBoxAttPropyl->SetDaughtersInvisible(true); 663 simpleBoxAttPropyl->SetForceSolid(false); 663 simpleBoxAttPropyl->SetForceSolid(false); 664 664 665 G4VisAttributes* simpleBoxAttAir= new G4VisA 665 G4VisAttributes* simpleBoxAttAir= new G4VisAttributes(G4Colour(0.0,1.0,0.0)); 666 simpleBoxAttAir->SetDaughtersInvisible(true) 666 simpleBoxAttAir->SetDaughtersInvisible(true); 667 simpleBoxAttAir->SetForceSolid(false); 667 simpleBoxAttAir->SetForceSolid(false); 668 668 669 G4VisAttributes* simpleBoxAtt3= new G4VisAtt 669 G4VisAttributes* simpleBoxAtt3= new G4VisAttributes(G4Colour(0.0,0.0,1.0)); 670 simpleBoxAtt3->SetDaughtersInvisible(false); 670 simpleBoxAtt3->SetDaughtersInvisible(false); 671 simpleBoxAtt3->SetForceSolid(false); 671 simpleBoxAtt3->SetForceSolid(false); 672 672 673 fLogicYoke1->SetVisAttributes(simpleBoxAtt); 673 fLogicYoke1->SetVisAttributes(simpleBoxAtt); 674 fLogic1Gap->SetVisAttributes(simpleBoxAtt); 674 fLogic1Gap->SetVisAttributes(simpleBoxAtt); 675 fLogic2Gap->SetVisAttributes(simpleBoxAtt); 675 fLogic2Gap->SetVisAttributes(simpleBoxAtt); 676 fLogic3Gap->SetVisAttributes(simpleBoxAtt); 676 fLogic3Gap->SetVisAttributes(simpleBoxAtt); 677 fLogicYoke2->SetVisAttributes(simpleBoxAtt); 677 fLogicYoke2->SetVisAttributes(simpleBoxAtt); 678 fLogic4Gap->SetVisAttributes(simpleBoxAtt); 678 fLogic4Gap->SetVisAttributes(simpleBoxAtt); 679 fLogic5Gap->SetVisAttributes(simpleBoxAtt); 679 fLogic5Gap->SetVisAttributes(simpleBoxAtt); 680 fLogicBoite->SetVisAttributes(simpleBoxAttLi 680 fLogicBoite->SetVisAttributes(simpleBoxAttLine); 681 fLogicCathode->SetVisAttributes(simpleBoxAtt 681 fLogicCathode->SetVisAttributes(simpleBoxAttPropyl); 682 fLogicIso->SetVisAttributes(simpleBoxAttProp 682 fLogicIso->SetVisAttributes(simpleBoxAttPropyl); 683 fLogicBoiteIso->SetVisAttributes(simpleBoxAt 683 fLogicBoiteIso->SetVisAttributes(simpleBoxAttPropyl); 684 fLogicVerre->SetVisAttributes(simpleBoxAtt); 684 fLogicVerre->SetVisAttributes(simpleBoxAtt); 685 fLogicBoite2->SetVisAttributes(simpleBoxAttA 685 fLogicBoite2->SetVisAttributes(simpleBoxAttAir); 686 fLogicBoite3->SetVisAttributes(simpleBoxAtt) 686 fLogicBoite3->SetVisAttributes(simpleBoxAtt); 687 fLogicKgm->SetVisAttributes(simpleBoxAttKGM) 687 fLogicKgm->SetVisAttributes(simpleBoxAttKGM); 688 fLogicVerre2->SetVisAttributes(simpleBoxAtt) 688 fLogicVerre2->SetVisAttributes(simpleBoxAtt); 689 689 690 return fPhysiWorld; 690 return fPhysiWorld; 691 } 691 } 692 692 693 void DetectorConstruction::ConstructSDandField 693 void DetectorConstruction::ConstructSDandField() 694 { 694 { 695 EMField* field = new EMField(); 695 EMField* field = new EMField(); 696 G4AutoDelete::Register(field); 696 G4AutoDelete::Register(field); 697 697 698 G4EqMagElectricField* fEquation = new G4EqMa 698 G4EqMagElectricField* fEquation = new G4EqMagElectricField(field); 699 G4MagIntegratorStepper* fStepper = new G4Cla 699 G4MagIntegratorStepper* fStepper = new G4ClassicalRK4 (fEquation,8); 700 G4FieldManager* fFieldMgr = 700 G4FieldManager* fFieldMgr = 701 G4TransportationManager::GetTransportation 701 G4TransportationManager::GetTransportationManager()->GetFieldManager(); 702 702 703 // Relaxed 703 // Relaxed 704 G4MagInt_Driver* fIntgrDriver = 704 G4MagInt_Driver* fIntgrDriver = 705 new G4MagInt_Driver(1*mm,fStepper,fStepper 705 new G4MagInt_Driver(1*mm,fStepper,fStepper->GetNumberOfVariables() ); 706 706 707 G4ChordFinder* fChordFinder = new G4ChordFin 707 G4ChordFinder* fChordFinder = new G4ChordFinder(fIntgrDriver); 708 fFieldMgr->SetChordFinder(fChordFinder); 708 fFieldMgr->SetChordFinder(fChordFinder); 709 fFieldMgr->SetDetectorField(field); 709 fFieldMgr->SetDetectorField(field); 710 710 711 // FOLLOWING PARAMETERS TUNED FROM RAY-TRACI 711 // FOLLOWING PARAMETERS TUNED FROM RAY-TRACING SIMULATIONS OF THE AIFIRA NANOBEAM LINE 712 /* 712 /* 713 fFieldMgr->GetChordFinder()->SetDeltaChord(1 713 fFieldMgr->GetChordFinder()->SetDeltaChord(1e-9*m); 714 fFieldMgr->SetDeltaIntersection(1e-9*m); 714 fFieldMgr->SetDeltaIntersection(1e-9*m); 715 fFieldMgr->SetDeltaOneStep(1e-9*m); 715 fFieldMgr->SetDeltaOneStep(1e-9*m); 716 716 717 fPropInField = 717 fPropInField = 718 G4TransportationManager::GetTransportation 718 G4TransportationManager::GetTransportationManager()->GetPropagatorInField(); 719 fPropInField->SetMinimumEpsilonStep(1e-16); 719 fPropInField->SetMinimumEpsilonStep(1e-16); // instead of 11 720 fPropInField->SetMaximumEpsilonStep(1e-15); 720 fPropInField->SetMaximumEpsilonStep(1e-15); // instead of 10 721 */ 721 */ 722 } 722 } 723 723