[807] | 1 | // |
---|
| 2 | // ******************************************************************** |
---|
| 3 | // * License and Disclaimer * |
---|
| 4 | // * * |
---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
| 7 | // * conditions of the Geant4 Software License, included in the file * |
---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
| 9 | // * include a list of copyright holders. * |
---|
| 10 | // * * |
---|
| 11 | // * Neither the authors of this software system, nor their employing * |
---|
| 12 | // * institutes,nor the agencies providing financial support for this * |
---|
| 13 | // * work make any representation or warranty, express or implied, * |
---|
| 14 | // * regarding this software system or assume any liability for its * |
---|
| 15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
| 16 | // * for the full disclaimer and the limitation of liability. * |
---|
| 17 | // * * |
---|
| 18 | // * This code implementation is the result of the scientific and * |
---|
| 19 | // * technical work of the GEANT4 collaboration. * |
---|
| 20 | // * By using, copying, modifying or distributing the software (or * |
---|
| 21 | // * any work based on the software) you agree to acknowledge its * |
---|
| 22 | // * use in resulting scientific publications, and indicate your * |
---|
| 23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
| 24 | // ******************************************************************** |
---|
| 25 | // |
---|
| 26 | // ------------------------------------------------------------------- |
---|
| 27 | // $Id: MicrobeamDetectorConstruction.cc,v 1.7 2007/08/27 15:51:54 gcosmo Exp $ |
---|
| 28 | // ------------------------------------------------------------------- |
---|
| 29 | |
---|
| 30 | #include "MicrobeamDetectorConstruction.hh" |
---|
| 31 | |
---|
| 32 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 33 | |
---|
| 34 | MicrobeamDetectorConstruction::MicrobeamDetectorConstruction() |
---|
| 35 | |
---|
| 36 | :defaultMaterial(NULL),collimatorMaterial(NULL),BoiteMaterial(NULL), |
---|
| 37 | CathodeMaterial(NULL),VerreMaterial(NULL),Verre2Material(NULL), |
---|
| 38 | KgmMaterial(NULL),Boite2Material(NULL),Boite3Material(NULL), |
---|
| 39 | nucleusMaterial1(NULL),cytoplasmMaterial1(NULL), |
---|
| 40 | nucleusMaterial2(NULL),cytoplasmMaterial2(NULL), |
---|
| 41 | nucleusMaterial3(NULL),cytoplasmMaterial3(NULL), |
---|
| 42 | physiWorld(NULL),logicWorld(NULL),solidWorld(NULL), |
---|
| 43 | physiVol(NULL),logicVol(NULL),solidVol(NULL), |
---|
| 44 | physiBoite(NULL),logicBoite(NULL),solidBoite(NULL), |
---|
| 45 | physiYoke1(NULL),logicYoke1(NULL),solidYoke1(NULL), |
---|
| 46 | physi1Gap(NULL),logic1Gap(NULL),solid1Gap(NULL), |
---|
| 47 | physi2Gap(NULL),logic2Gap(NULL),solid2Gap(NULL), |
---|
| 48 | physi3Gap(NULL),logic3Gap(NULL),solid3Gap(NULL), |
---|
| 49 | physiYoke2(NULL),logicYoke2(NULL),solidYoke2(NULL), |
---|
| 50 | physi4Gap(NULL),logic4Gap(NULL),solid4Gap(NULL), |
---|
| 51 | physi5Gap(NULL),logic5Gap(NULL),solid5Gap(NULL), |
---|
| 52 | physiBoiteIso(NULL),logicBoiteIso(NULL),solidBoiteIso(NULL), |
---|
| 53 | physiCathode(NULL),logicCathode(NULL),solidCathode(NULL), |
---|
| 54 | physiIso(NULL),logicIso(NULL),solidIso(NULL), |
---|
| 55 | physiVerre(NULL),logicVerre(NULL),solidVerre(NULL), |
---|
| 56 | physiBoite2(NULL),logicBoite2(NULL),solidBoite2(NULL), |
---|
| 57 | physiBoite3(NULL),logicBoite3(NULL),solidBoite3(NULL), |
---|
| 58 | physiKgm(NULL),logicKgm(NULL),solidKgm(NULL), |
---|
| 59 | physiVerre2(NULL),logicVerre2(NULL),solidVerre2(NULL), |
---|
| 60 | physiPhantom(NULL),logicPhantom(NULL),solidPhantom(NULL) |
---|
| 61 | |
---|
| 62 | { |
---|
| 63 | WorldSizeXY=WorldSizeZ=0; |
---|
| 64 | } |
---|
| 65 | |
---|
| 66 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 67 | |
---|
| 68 | MicrobeamDetectorConstruction::~MicrobeamDetectorConstruction() |
---|
| 69 | { |
---|
| 70 | delete defaultMaterial; |
---|
| 71 | delete collimatorMaterial; |
---|
| 72 | delete BoiteMaterial; |
---|
| 73 | delete CathodeMaterial; |
---|
| 74 | delete VerreMaterial; |
---|
| 75 | delete Verre2Material; |
---|
| 76 | delete KgmMaterial; |
---|
| 77 | delete Boite2Material; |
---|
| 78 | delete Boite3Material; |
---|
| 79 | delete nucleusMaterial1; |
---|
| 80 | delete cytoplasmMaterial1; |
---|
| 81 | delete nucleusMaterial2; |
---|
| 82 | delete cytoplasmMaterial2; |
---|
| 83 | delete nucleusMaterial3; |
---|
| 84 | delete cytoplasmMaterial3; |
---|
| 85 | } |
---|
| 86 | |
---|
| 87 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 88 | |
---|
| 89 | G4VPhysicalVolume* MicrobeamDetectorConstruction::Construct() |
---|
| 90 | |
---|
| 91 | { |
---|
| 92 | DefineMaterials(); |
---|
| 93 | return ConstructMicrobeamLine(); |
---|
| 94 | } |
---|
| 95 | |
---|
| 96 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 97 | |
---|
| 98 | void MicrobeamDetectorConstruction::DefineMaterials() |
---|
| 99 | { |
---|
| 100 | |
---|
| 101 | G4String name, symbol; |
---|
| 102 | G4double density; |
---|
| 103 | |
---|
| 104 | G4int ncomponents, natoms,nel; |
---|
| 105 | G4double z, a; |
---|
| 106 | G4double fractionmass; |
---|
| 107 | G4double temperature, pressure; |
---|
| 108 | |
---|
| 109 | // Define Elements |
---|
| 110 | G4Element* H = new G4Element ("Hydrogen", "H", 1. , 1.01*g/mole); |
---|
| 111 | G4Element* N = new G4Element ("Nitrogen", "N", 7., 14.01*g/mole); |
---|
| 112 | G4Element* O = new G4Element ("Oxygen" , "O", 8. , 16.00*g/mole); |
---|
| 113 | G4Element* Ar = new G4Element ("Argon" , "Ar", 18., 39.948*g/mole ); |
---|
| 114 | G4Element* C = new G4Element ("Carbon","C", 6., 12.011*g/mole); |
---|
| 115 | G4Element * Si = new G4Element ("Silicon","Si",14., 28.0855*g/mole); |
---|
| 116 | G4Element * Cu = new G4Element ("Cuivre","Cu",29., 63.546*g/mole); |
---|
| 117 | G4Element * Zn = new G4Element ("Zinc","Zn",30.,65.409*g/mole); |
---|
| 118 | G4Element * P = new G4Element ("Phosphorus","P",15.,30.973761*g/mole); |
---|
| 119 | |
---|
| 120 | // Vaccum standard definition... |
---|
| 121 | density = universe_mean_density; |
---|
| 122 | G4Material* vacuum = new G4Material(name="Vacuum", z=1., a=1.01*g/mole, |
---|
| 123 | density); |
---|
| 124 | // Water |
---|
| 125 | density = 1.000*g/cm3; |
---|
| 126 | G4Material* H2O = new G4Material(name="H2O" , density, ncomponents=2); |
---|
| 127 | H2O->AddElement(H, natoms=2); |
---|
| 128 | H2O->AddElement(O, natoms=1); |
---|
| 129 | |
---|
| 130 | // Air |
---|
| 131 | density = 1.290*mg/cm3; |
---|
| 132 | pressure = 1*atmosphere; |
---|
| 133 | temperature = 293.16*kelvin; |
---|
| 134 | G4Material* Air = new G4Material(name="Air" , density, ncomponents=2, kStateGas, temperature, pressure); |
---|
| 135 | Air->AddElement(N, fractionmass=0.7); |
---|
| 136 | Air->AddElement(O, fractionmass=0.3); |
---|
| 137 | |
---|
| 138 | // Low Pressure Air |
---|
| 139 | density = (5e-6/1013.)*1.290*mg/cm3; // 5e-6 mbar is the usual beam pipe air pressure |
---|
| 140 | pressure = 1*atmosphere; |
---|
| 141 | temperature = 293.16*kelvin; |
---|
| 142 | G4Material* LPAir = new G4Material(name="LPAir" , density, ncomponents=3, kStateGas, temperature, pressure); |
---|
| 143 | LPAir->AddElement(N, fractionmass=0.715); |
---|
| 144 | LPAir->AddElement(O, fractionmass=0.25); |
---|
| 145 | LPAir->AddElement(Ar, fractionmass=0.035); |
---|
| 146 | |
---|
| 147 | // Platine |
---|
| 148 | a = 195.09*g/mole; |
---|
| 149 | density = 21.4*g/cm3; |
---|
| 150 | G4Material* Pt = new G4Material(name="Pl", z=78., a, density); |
---|
| 151 | |
---|
| 152 | // Butane @ 10 mbar |
---|
| 153 | density = 2.552e-2*mg/cm3; |
---|
| 154 | pressure = 0.01*bar; |
---|
| 155 | temperature = 293.16*kelvin; |
---|
| 156 | G4Material* Butane = new G4Material(name = "Butane", density, nel = 2, kStateGas, temperature, pressure); |
---|
| 157 | Butane->AddElement (C, natoms=4); |
---|
| 158 | Butane->AddElement (H, natoms=10); |
---|
| 159 | |
---|
| 160 | // Polypropylene |
---|
| 161 | density = 0.9*g/cm3; |
---|
| 162 | G4Material* Polyprop = new G4Material(name = "Polyprop", density, nel = 2); |
---|
| 163 | Polyprop->AddElement (C,3); |
---|
| 164 | Polyprop->AddElement (H,6); |
---|
| 165 | |
---|
| 166 | // Si3N4 |
---|
| 167 | density = 3.44*g/cm3; |
---|
| 168 | G4Material* Si3N4 = new G4Material(name = "Si3N4", density, nel = 2); |
---|
| 169 | Si3N4->AddElement (Si, natoms=3); |
---|
| 170 | Si3N4->AddElement (N, natoms=4); |
---|
| 171 | |
---|
| 172 | // SiO2 |
---|
| 173 | density = 2.5*g/cm3; |
---|
| 174 | G4Material* SiO2 = new G4Material(name = "SiO2", density, nel = 2); |
---|
| 175 | SiO2->AddElement (Si, natoms=1); |
---|
| 176 | SiO2->AddElement (O, natoms=2); |
---|
| 177 | |
---|
| 178 | // Laiton |
---|
| 179 | density = 8.5*g/cm3; |
---|
| 180 | G4Material* Laiton = new G4Material(name = "Laiton", density, nel = 2); |
---|
| 181 | Laiton->AddElement (Cu,1); |
---|
| 182 | Laiton->AddElement (Zn,1); |
---|
| 183 | |
---|
| 184 | // Phantom |
---|
| 185 | densityPhantom = 1; // in g/cm3 |
---|
| 186 | |
---|
| 187 | // Cytoplasm chemical composition |
---|
| 188 | densityCytoplasm = 1.; // in g/cm3 |
---|
| 189 | density = densityCytoplasm*g/cm3; |
---|
| 190 | G4Material* Cytoplasm1 = new G4Material(name="Cytoplasm1" , density, ncomponents=5); |
---|
| 191 | Cytoplasm1->AddElement(H, fractionmass=0.596); |
---|
| 192 | Cytoplasm1->AddElement(O, fractionmass=0.2424); |
---|
| 193 | Cytoplasm1->AddElement(C, fractionmass=0.1111); |
---|
| 194 | Cytoplasm1->AddElement(N, fractionmass=0.0404); |
---|
| 195 | Cytoplasm1->AddElement(P, fractionmass=0.0101); |
---|
| 196 | |
---|
| 197 | densityCytoplasm = 10.; |
---|
| 198 | // in g/cm3 (nucleoli are assumed to be ten times denser than water and have the same chemical comp. as nucleus) |
---|
| 199 | density = densityCytoplasm*g/cm3; |
---|
| 200 | G4Material* Cytoplasm2 = new G4Material(name="Cytoplasm2" , density, ncomponents=5); |
---|
| 201 | Cytoplasm2->AddElement(H, fractionmass=0.1064); |
---|
| 202 | Cytoplasm2->AddElement(O, fractionmass=0.745); |
---|
| 203 | Cytoplasm2->AddElement(C, fractionmass=0.0904); |
---|
| 204 | Cytoplasm2->AddElement(N, fractionmass=0.0321); |
---|
| 205 | Cytoplasm2->AddElement(P, fractionmass=0.0261); |
---|
| 206 | |
---|
| 207 | // default |
---|
| 208 | densityCytoplasm = 1.; // in g/cm3 |
---|
| 209 | density = densityCytoplasm*g/cm3; |
---|
| 210 | G4Material* Cytoplasm3 = new G4Material(name="Cytoplasm3" , density, ncomponents=5); |
---|
| 211 | Cytoplasm3->AddElement(H, fractionmass=0.596); |
---|
| 212 | Cytoplasm3->AddElement(O, fractionmass=0.2424); |
---|
| 213 | Cytoplasm3->AddElement(C, fractionmass=0.1111); |
---|
| 214 | Cytoplasm3->AddElement(N, fractionmass=0.0404); |
---|
| 215 | Cytoplasm3->AddElement(P, fractionmass=0.0101); |
---|
| 216 | |
---|
| 217 | // Nucleus chemical composition |
---|
| 218 | densityNucleus = 1.; // in g/cm3 |
---|
| 219 | density = densityNucleus*g/cm3; |
---|
| 220 | G4Material* Nucleus1 = new G4Material(name="Nucleus1" , density, ncomponents=5); |
---|
| 221 | Nucleus1->AddElement(H, fractionmass=0.1064); |
---|
| 222 | Nucleus1->AddElement(O, fractionmass=0.745); |
---|
| 223 | Nucleus1->AddElement(C, fractionmass=0.0904); |
---|
| 224 | Nucleus1->AddElement(N, fractionmass=0.0321); |
---|
| 225 | Nucleus1->AddElement(P, fractionmass=0.0261); |
---|
| 226 | |
---|
| 227 | densityNucleus = 1.1; // in g/cm3 |
---|
| 228 | density = densityNucleus*g/cm3; |
---|
| 229 | G4Material* Nucleus2 = new G4Material(name="Nucleus2" , density, ncomponents=5); |
---|
| 230 | Nucleus2->AddElement(H, fractionmass=0.1064); |
---|
| 231 | Nucleus2->AddElement(O, fractionmass=0.745); |
---|
| 232 | Nucleus2->AddElement(C, fractionmass=0.0904); |
---|
| 233 | Nucleus2->AddElement(N, fractionmass=0.0321); |
---|
| 234 | Nucleus2->AddElement(P, fractionmass=0.0261); |
---|
| 235 | |
---|
| 236 | // default |
---|
| 237 | densityNucleus = 1.; // in g/cm3 |
---|
| 238 | density = densityNucleus*g/cm3; |
---|
| 239 | G4Material* Nucleus3 = new G4Material(name="Nucleus3" , density, ncomponents=5); |
---|
| 240 | Nucleus3->AddElement(H, fractionmass=0.1064); |
---|
| 241 | Nucleus3->AddElement(O, fractionmass=0.745); |
---|
| 242 | Nucleus3->AddElement(C, fractionmass=0.0904); |
---|
| 243 | Nucleus3->AddElement(N, fractionmass=0.0321); |
---|
| 244 | Nucleus3->AddElement(P, fractionmass=0.0261); |
---|
| 245 | |
---|
| 246 | // Materials in setup. |
---|
| 247 | defaultMaterial = vacuum; |
---|
| 248 | collimatorMaterial = Pt; |
---|
| 249 | BoiteMaterial = Butane; |
---|
| 250 | CathodeMaterial = Laiton; |
---|
| 251 | VerreMaterial = Si3N4; |
---|
| 252 | Verre2Material = SiO2; |
---|
| 253 | KgmMaterial = H2O; |
---|
| 254 | Boite2Material = Air; |
---|
| 255 | Boite3Material = Polyprop; |
---|
| 256 | nucleusMaterial1 = Nucleus1; |
---|
| 257 | cytoplasmMaterial1 = Cytoplasm1; |
---|
| 258 | nucleusMaterial2 = Nucleus2; |
---|
| 259 | cytoplasmMaterial2 = Cytoplasm2; |
---|
| 260 | nucleusMaterial3 = Nucleus3; |
---|
| 261 | cytoplasmMaterial3 = Cytoplasm3; |
---|
| 262 | |
---|
| 263 | // DISPLAY MATERIALS |
---|
| 264 | G4cout << G4endl << *(G4Material::GetMaterialTable()) << G4endl; |
---|
| 265 | |
---|
| 266 | } |
---|
| 267 | |
---|
| 268 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 269 | |
---|
| 270 | G4VPhysicalVolume* MicrobeamDetectorConstruction::ConstructMicrobeamLine() |
---|
| 271 | { |
---|
| 272 | // WORLD |
---|
| 273 | WorldSizeXY = 20*m; |
---|
| 274 | WorldSizeZ = 40*m; |
---|
| 275 | |
---|
| 276 | // MICROBEAM LINE ANGLE |
---|
| 277 | lineAngle = 10*deg; |
---|
| 278 | |
---|
| 279 | // TARGET POSITION |
---|
| 280 | CiblePositionX = -1461.42*mm; |
---|
| 281 | CiblePositionY = 0*mm; |
---|
| 282 | CiblePositionZ = -1327 + (955*std::cos(lineAngle))*mm; |
---|
| 283 | |
---|
| 284 | // ELECTROMAGNETIC FIELD PARAMETERS |
---|
| 285 | |
---|
| 286 | static G4bool fieldIsInitialized = false; |
---|
| 287 | |
---|
| 288 | if(!fieldIsInitialized) |
---|
| 289 | |
---|
| 290 | { |
---|
| 291 | Field = new MicrobeamEMField(); |
---|
| 292 | pEquation = new G4EqMagElectricField(Field); |
---|
| 293 | pStepper = new G4ClassicalRK4 (pEquation); |
---|
| 294 | pFieldMgr = G4TransportationManager::GetTransportationManager()->GetFieldManager(); |
---|
| 295 | pIntgrDriver = new G4MagInt_Driver(0.000001*mm,pStepper,pStepper->GetNumberOfVariables() ); |
---|
| 296 | pChordFinder = new G4ChordFinder(pIntgrDriver); |
---|
| 297 | pFieldMgr->SetChordFinder( pChordFinder ); |
---|
| 298 | pFieldMgr->SetDetectorField(Field); |
---|
| 299 | fieldIsInitialized = true; |
---|
| 300 | |
---|
| 301 | // FOLLOWING PARAMETERS TUNED FROM RAY-TRACING SIMULATIONS OF THE AIFIRA NANOBEAM LINE |
---|
| 302 | |
---|
| 303 | pFieldMgr->GetChordFinder()->SetDeltaChord(1e-9*m); |
---|
| 304 | pFieldMgr->SetDeltaIntersection(1e-9*m); |
---|
| 305 | pFieldMgr->SetDeltaOneStep(1e-9*m); |
---|
| 306 | |
---|
| 307 | propInField = |
---|
| 308 | G4TransportationManager::GetTransportationManager()->GetPropagatorInField(); |
---|
| 309 | propInField->SetMinimumEpsilonStep(1e-11); |
---|
| 310 | propInField->SetMaximumEpsilonStep(1e-10); |
---|
| 311 | } |
---|
| 312 | |
---|
| 313 | //************* |
---|
| 314 | // WORLD VOLUME |
---|
| 315 | //************* |
---|
| 316 | |
---|
| 317 | solidWorld = new G4Box("World", //its name |
---|
| 318 | WorldSizeXY/2,WorldSizeXY/2,WorldSizeZ/2); //its size |
---|
| 319 | |
---|
| 320 | |
---|
| 321 | logicWorld = new G4LogicalVolume(solidWorld, //its solid |
---|
| 322 | defaultMaterial, //its material |
---|
| 323 | "World"); //its name |
---|
| 324 | |
---|
| 325 | physiWorld = new G4PVPlacement(0, //no rotation |
---|
| 326 | G4ThreeVector(), //at (0,0,0) |
---|
| 327 | "World", //its name |
---|
| 328 | logicWorld, //its logical volume |
---|
| 329 | NULL, //its mother volume |
---|
| 330 | false, //no boolean operation |
---|
| 331 | 0); //copy number |
---|
| 332 | |
---|
| 333 | //***************** |
---|
| 334 | // FULL LINE VOLUME |
---|
| 335 | //***************** |
---|
| 336 | |
---|
| 337 | solidVol = new G4Box("Vol", |
---|
| 338 | 10.*m/2,10.*m/2,(14025)*mm/2); |
---|
| 339 | |
---|
| 340 | logicVol = new G4LogicalVolume(solidVol, |
---|
| 341 | defaultMaterial, |
---|
| 342 | "Vol"); |
---|
| 343 | |
---|
| 344 | physiVol = new G4PVPlacement(0, |
---|
| 345 | G4ThreeVector(0,0,-2012.5*mm), |
---|
| 346 | "Vol", |
---|
| 347 | logicVol, |
---|
| 348 | physiWorld, |
---|
| 349 | false, |
---|
| 350 | 0); |
---|
| 351 | |
---|
| 352 | // ************************************************* |
---|
| 353 | // Whole microbeam line at 10 deg contained in a box |
---|
| 354 | // ************************************************* |
---|
| 355 | |
---|
| 356 | G4double PosX = CiblePositionX*mm +( (6958.3/2-3.3)*std::sin(lineAngle))*mm; |
---|
| 357 | G4double PosZ = (CiblePositionZ+2012.5)*mm - ((6958.3/2-3.3)*std::cos(lineAngle))*mm; |
---|
| 358 | |
---|
| 359 | // Adjust box absolute position |
---|
| 360 | |
---|
| 361 | PosX = PosX + 1.3 * micrometer * std::cos(lineAngle); |
---|
| 362 | PosZ = PosZ + 1.3 * micrometer * std::sin(lineAngle); |
---|
| 363 | |
---|
| 364 | G4RotationMatrix *rot = new G4RotationMatrix(); |
---|
| 365 | rot->rotateX(0*deg); |
---|
| 366 | rot->rotateY(10*deg); |
---|
| 367 | rot->rotateZ(0*deg); |
---|
| 368 | |
---|
| 369 | solidBoite = new G4Box("Boite", 4*cm, 4*cm, 6958.3*mm/2); |
---|
| 370 | |
---|
| 371 | logicBoite = new G4LogicalVolume(solidBoite, defaultMaterial, "Boite"); |
---|
| 372 | |
---|
| 373 | physiBoite = new G4PVPlacement(rot, |
---|
| 374 | G4ThreeVector(PosX,0,PosZ), |
---|
| 375 | "Boite", |
---|
| 376 | logicBoite, |
---|
| 377 | physiVol, |
---|
| 378 | false, |
---|
| 379 | 0); |
---|
| 380 | |
---|
| 381 | //********************************************************************* |
---|
| 382 | // OBJECT COLLIMATOR (after switching magnet, 5 micrometer in diameter) |
---|
| 383 | //********************************************************************* |
---|
| 384 | |
---|
| 385 | CollObjSizeXY = 8*cm; |
---|
| 386 | CollObjSizeZ = 0.07*mm; |
---|
| 387 | |
---|
| 388 | solidYoke1 = new G4Box("_CollObj_yoke1_", CollObjSizeXY/2,CollObjSizeXY/2 , CollObjSizeZ/2); |
---|
| 389 | |
---|
| 390 | logicYoke1 = new G4LogicalVolume(solidYoke1, collimatorMaterial, "_CollObj_yoke1_"); |
---|
| 391 | physiYoke1 = new G4PVPlacement( 0, G4ThreeVector(0,0,6958.3*mm/2-3.3*mm-6955*mm+0.07*mm/2), logicYoke1, "_CollObj_yoke1_", |
---|
| 392 | logicBoite, false, 0); |
---|
| 393 | |
---|
| 394 | // --> FIRST PART |
---|
| 395 | |
---|
| 396 | solid1Gap = new G4Cons("_CollObj_gap1_", 0.*micrometer, 6*micrometer, |
---|
| 397 | 0.*micrometer,2.5*micrometer, |
---|
| 398 | 3.5*micrometer, |
---|
| 399 | 0, ((360*CLHEP::pi)/180)); |
---|
| 400 | |
---|
| 401 | logic1Gap = new G4LogicalVolume(solid1Gap, defaultMaterial, "_CollObj_gap1_"); |
---|
| 402 | |
---|
| 403 | physi1Gap = new G4PVPlacement(0, G4ThreeVector(0,0,0.0315*mm), logic1Gap, "_CollObj_gap1_", logicYoke1, false, 0); |
---|
| 404 | |
---|
| 405 | |
---|
| 406 | // --> SECOND PART |
---|
| 407 | |
---|
| 408 | solid2Gap = new G4Cons("_CollObj_gap2_", 0.*micrometer, 15*micrometer, |
---|
| 409 | 0.*micrometer,6*micrometer, |
---|
| 410 | 6.5*micrometer, |
---|
| 411 | 0, ((360*CLHEP::pi)/180)); |
---|
| 412 | |
---|
| 413 | logic2Gap = new G4LogicalVolume(solid2Gap, defaultMaterial, "_CollObj_gap2_"); |
---|
| 414 | |
---|
| 415 | physi2Gap = new G4PVPlacement(0, G4ThreeVector(0,0,0.0215*mm), logic2Gap, "_CollObj_gap2_", logicYoke1, false, 0); |
---|
| 416 | |
---|
| 417 | |
---|
| 418 | // --> THIRD PART |
---|
| 419 | |
---|
| 420 | solid3Gap = new G4Cons("_CollObj_gap3_", 0.*micrometer, 105*micrometer, |
---|
| 421 | 0.*micrometer,15*micrometer, |
---|
| 422 | 25*micrometer, |
---|
| 423 | 0, ((360*CLHEP::pi)/180)); |
---|
| 424 | |
---|
| 425 | logic3Gap = new G4LogicalVolume(solid3Gap, defaultMaterial, "_CollObj_gap3_"); |
---|
| 426 | |
---|
| 427 | physi3Gap = new G4PVPlacement(0, G4ThreeVector(0,0,-0.010*mm), logic3Gap, "_CollObj_gap3_", logicYoke1, false, 0); |
---|
| 428 | |
---|
| 429 | |
---|
| 430 | //************************ |
---|
| 431 | // GAS DETECTOR COLLIMATOR |
---|
| 432 | //************************ |
---|
| 433 | |
---|
| 434 | solidYoke2 = new G4Box("_CollDet_yoke_", 2.5*cm, 2.5*cm, 0.035*mm); |
---|
| 435 | |
---|
| 436 | logicYoke2 = new G4LogicalVolume(solidYoke2, collimatorMaterial, "_CollDet_yoke_"); |
---|
| 437 | |
---|
| 438 | physiYoke2 = new G4PVPlacement(0, 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), logicYoke2, "_CollDet_yoke_", |
---|
| 439 | logicBoite, false, 0); |
---|
| 440 | |
---|
| 441 | // --> FIRST PART |
---|
| 442 | |
---|
| 443 | solid4Gap = new G4Cons("_CollDet_gap4_", 0.*micrometer, 8*micrometer, |
---|
| 444 | 0.*micrometer,5*micrometer, |
---|
| 445 | 7.5*micrometer, |
---|
| 446 | 0, ((360*CLHEP::pi)/180)); |
---|
| 447 | |
---|
| 448 | logic4Gap = new G4LogicalVolume(solid4Gap, defaultMaterial, "_CollDet_gap4_"); |
---|
| 449 | |
---|
| 450 | physi4Gap = new G4PVPlacement(0, G4ThreeVector(0,0,0.0275*mm), logic4Gap, "_CollDet_gap4_", logicYoke2, false, 0); |
---|
| 451 | |
---|
| 452 | // --> SECOND PART |
---|
| 453 | |
---|
| 454 | solid5Gap = new G4Cons("_CollDet_gap5_", 0.*micrometer, 105*micrometer, |
---|
| 455 | 0.*micrometer,8*micrometer, |
---|
| 456 | 27.5*micrometer, |
---|
| 457 | 0, ((360*CLHEP::pi)/180)); |
---|
| 458 | |
---|
| 459 | logic5Gap = new G4LogicalVolume(solid5Gap, defaultMaterial, "_CollDet_gap5_"); |
---|
| 460 | |
---|
| 461 | physi5Gap = new G4PVPlacement(0, |
---|
| 462 | G4ThreeVector(0,0,-0.0075*mm), |
---|
| 463 | logic5Gap, |
---|
| 464 | "_CollDet_gap5_", |
---|
| 465 | logicYoke2, |
---|
| 466 | false, |
---|
| 467 | 0); |
---|
| 468 | // ************ |
---|
| 469 | // GAS DETECTOR |
---|
| 470 | // ************ |
---|
| 471 | |
---|
| 472 | solidBoiteIso = new G4Box("Isobutane", 2.5*cm, 2.5*cm, 1.75*mm); |
---|
| 473 | |
---|
| 474 | logicBoiteIso = new G4LogicalVolume(solidBoiteIso, BoiteMaterial, "Isobutane"); |
---|
| 475 | |
---|
| 476 | physiBoiteIso = new G4PVPlacement(0, |
---|
| 477 | G4ThreeVector(0,0,6958.3*mm/2-0.3*mm-3*mm-0.004*mm-0.1*mm-3.5*mm/2), |
---|
| 478 | "Isobutane", |
---|
| 479 | logicBoiteIso, |
---|
| 480 | physiBoite, |
---|
| 481 | false, |
---|
| 482 | 0); |
---|
| 483 | // --> GAS DETECTOR END CAP |
---|
| 484 | |
---|
| 485 | solidCathode = new G4Box("_Laiton_", 2.5*cm, 2.5*cm, 0.5*mm); |
---|
| 486 | |
---|
| 487 | logicCathode = new G4LogicalVolume(solidCathode, CathodeMaterial, "_Laiton_"); |
---|
| 488 | |
---|
| 489 | physiCathode = new G4PVPlacement(0, |
---|
| 490 | G4ThreeVector(0,0,1.25*mm), |
---|
| 491 | "_Laiton_", |
---|
| 492 | logicCathode, |
---|
| 493 | physiBoiteIso, |
---|
| 494 | false, 0); |
---|
| 495 | |
---|
| 496 | // --> ISOBUTANE GAS |
---|
| 497 | |
---|
| 498 | solidIso = new G4Box("_Iso_", 1.*mm, 1.*mm, 0.499925*mm); |
---|
| 499 | |
---|
| 500 | logicIso = new G4LogicalVolume(solidIso, BoiteMaterial, "_Iso_"); |
---|
| 501 | |
---|
| 502 | physiIso = new G4PVPlacement(0, |
---|
| 503 | G4ThreeVector(0,0,-0.000075*mm), |
---|
| 504 | "_Iso_", |
---|
| 505 | logicIso, |
---|
| 506 | physiCathode, |
---|
| 507 | false, |
---|
| 508 | 0); |
---|
| 509 | |
---|
| 510 | // --> Si3N4 WINDOW |
---|
| 511 | |
---|
| 512 | solidVerre = new G4Box("_Si3N4_", 0.5*mm, 0.5*mm, 0.075*micrometer); |
---|
| 513 | |
---|
| 514 | logicVerre = new G4LogicalVolume(solidVerre, VerreMaterial, "_Si3N4_"); |
---|
| 515 | |
---|
| 516 | |
---|
| 517 | physiVerre = new G4PVPlacement(0, |
---|
| 518 | G4ThreeVector(0,0,0.499925*mm), |
---|
| 519 | "_Si3N4_", |
---|
| 520 | logicVerre, |
---|
| 521 | physiCathode, |
---|
| 522 | false, |
---|
| 523 | 0); |
---|
| 524 | // ******* |
---|
| 525 | // AIR GAP |
---|
| 526 | // ******* |
---|
| 527 | |
---|
| 528 | solidBoite2 = new G4Box("_Air_", 2.5*cm, 2.5*cm, 0.1*mm/2); |
---|
| 529 | |
---|
| 530 | logicBoite2 = new G4LogicalVolume(solidBoite2, Boite2Material, "_Air_"); |
---|
| 531 | |
---|
| 532 | physiBoite2 = new G4PVPlacement(0, |
---|
| 533 | G4ThreeVector(0,0,6958.3*mm/2-0.3*mm-3*mm-0.004*mm-0.1*mm/2), |
---|
| 534 | "_Air_", |
---|
| 535 | logicBoite2, |
---|
| 536 | physiBoite, |
---|
| 537 | false, |
---|
| 538 | 0); |
---|
| 539 | |
---|
| 540 | //************* |
---|
| 541 | // CELL SUPPORT |
---|
| 542 | //************* |
---|
| 543 | |
---|
| 544 | solidBoite3 = new G4Box("Polyprop", 2.5*cm, 2.5*cm, 0.004*mm/2); |
---|
| 545 | |
---|
| 546 | logicBoite3 = new G4LogicalVolume(solidBoite3, Boite3Material, "Polyprop"); |
---|
| 547 | |
---|
| 548 | physiBoite3 = new G4PVPlacement(0, |
---|
| 549 | G4ThreeVector(0,0,6958.3*mm/2-0.3*mm-3*mm-0.004*mm/2), |
---|
| 550 | "Polyprop", |
---|
| 551 | logicBoite3, |
---|
| 552 | physiBoite, |
---|
| 553 | false, |
---|
| 554 | 0); |
---|
| 555 | //**** |
---|
| 556 | // KGM |
---|
| 557 | //**** |
---|
| 558 | |
---|
| 559 | solidKgm = new G4Box("KGM", 2.5*cm, 2.5*cm, 3*mm/2); |
---|
| 560 | |
---|
| 561 | logicKgm = new G4LogicalVolume(solidKgm, KgmMaterial, "KGM"); |
---|
| 562 | |
---|
| 563 | physiKgm = new G4PVPlacement(0, |
---|
| 564 | G4ThreeVector(0,0,6958.3*mm/2-0.3*mm-3*mm/2), |
---|
| 565 | "KGM", |
---|
| 566 | logicKgm, |
---|
| 567 | physiBoite, |
---|
| 568 | false, |
---|
| 569 | 0); |
---|
| 570 | |
---|
| 571 | //***************** |
---|
| 572 | // MICROSCOPE PLATE |
---|
| 573 | //***************** |
---|
| 574 | |
---|
| 575 | solidVerre2 = new G4Box("_Lame_", 2.5*cm, 2.5*cm, 0.150*mm); |
---|
| 576 | |
---|
| 577 | logicVerre2 = new G4LogicalVolume(solidVerre2, Verre2Material, "_Lame_"); |
---|
| 578 | |
---|
| 579 | physiVerre2 = new G4PVPlacement(0, |
---|
| 580 | G4ThreeVector(0,0,6958.3*mm/2-0.3*mm/2), |
---|
| 581 | "_Lame_", |
---|
| 582 | logicVerre2, |
---|
| 583 | physiBoite, |
---|
| 584 | false, |
---|
| 585 | 0); |
---|
| 586 | |
---|
| 587 | // ************** |
---|
| 588 | // CELL CYTOPLASM |
---|
| 589 | // ************** |
---|
| 590 | |
---|
| 591 | // WITHIN KGM |
---|
| 592 | /* |
---|
| 593 | solidCyto=new G4Ellipsoid("CYTO",25*micrometer, 25*micrometer, 11*micrometer); |
---|
| 594 | |
---|
| 595 | logicCyto=new G4LogicalVolume (solidCyto, defaultMaterial, "CYTO"); |
---|
| 596 | |
---|
| 597 | physiCyto=new G4PVPlacement(0, G4ThreeVector(0,0,-1.5*mm+11*micrometer),"CYTO",logicCyto,physiKgm, false, 0); |
---|
| 598 | */ |
---|
| 599 | |
---|
| 600 | // ************ |
---|
| 601 | // CELL PHANTOM |
---|
| 602 | // ************ |
---|
| 603 | |
---|
| 604 | solidPhantom = new G4Box("Phantom", |
---|
| 605 | myMicrobeamPhantomConfiguration.GetPixelSizeX()/2, |
---|
| 606 | myMicrobeamPhantomConfiguration.GetPixelSizeY()/2, |
---|
| 607 | myMicrobeamPhantomConfiguration.GetPixelSizeZ()/2); |
---|
| 608 | |
---|
| 609 | logicPhantom = new G4LogicalVolume(solidPhantom,defaultMaterial,"Phantom",0,0,0); |
---|
| 610 | |
---|
| 611 | // PHANTOM MASSES |
---|
| 612 | |
---|
| 613 | SetNbOfPixelsInPhantom (myMicrobeamPhantomConfiguration.GetPhantomTotalPixels()); |
---|
| 614 | |
---|
| 615 | SetMassNucleus(myMicrobeamPhantomConfiguration.GetNucleusMass()); |
---|
| 616 | |
---|
| 617 | SetMassCytoplasm(myMicrobeamPhantomConfiguration.GetCytoplasmMass()); |
---|
| 618 | |
---|
| 619 | // PHANTOM |
---|
| 620 | |
---|
| 621 | phantomParam = new MicrobeamCellParameterisation |
---|
| 622 | (myMicrobeamPhantomConfiguration.GetPhantomTotalPixels(), |
---|
| 623 | myMicrobeamPhantomConfiguration.GetPixelSizeX()/2, |
---|
| 624 | myMicrobeamPhantomConfiguration.GetPixelSizeY()/2, |
---|
| 625 | myMicrobeamPhantomConfiguration.GetPixelSizeZ()/2, |
---|
| 626 | nucleusMaterial1,cytoplasmMaterial1, |
---|
| 627 | nucleusMaterial2,cytoplasmMaterial2, |
---|
| 628 | nucleusMaterial3,cytoplasmMaterial3 |
---|
| 629 | ); |
---|
| 630 | |
---|
| 631 | physiPhantom = new G4PVParameterised( |
---|
| 632 | "Phantom", // their name |
---|
| 633 | logicPhantom, // their logical volumr |
---|
| 634 | // logicCyto, // Mother logical volume |
---|
| 635 | logicKgm, // Mother logical volume |
---|
| 636 | kUndefined, // Are placed along this axis |
---|
| 637 | phantomParam->GetNoBoxes(), // Number of boxes |
---|
| 638 | phantomParam,false); // The parametrisation |
---|
| 639 | |
---|
| 640 | G4cout << " ==========> The phantom contains " |
---|
| 641 | << myMicrobeamPhantomConfiguration.GetPhantomTotalPixels() << " voxels " << G4endl; |
---|
| 642 | G4cout << G4endl; |
---|
| 643 | |
---|
| 644 | // USER LIMITS ON STEP LENGTH |
---|
| 645 | |
---|
| 646 | logicWorld->SetUserLimits(new G4UserLimits(100*mm)); |
---|
| 647 | logicVol->SetUserLimits(new G4UserLimits(100*mm)); |
---|
| 648 | logicBoite->SetUserLimits(new G4UserLimits(10*mm)); |
---|
| 649 | |
---|
| 650 | /* |
---|
| 651 | logicPhantom->SetUserLimits (new G4UserLimits(0.5*micrometer)); |
---|
| 652 | logic1Gap->SetUserLimits (new G4UserLimits(5*micrometer)); |
---|
| 653 | logic2Gap->SetUserLimits (new G4UserLimits(5*micrometer)); |
---|
| 654 | logic3Gap->SetUserLimits (new G4UserLimits(5*micrometer)); |
---|
| 655 | logic4Gap->SetUserLimits (new G4UserLimits(5*micrometer)); |
---|
| 656 | logic5Gap->SetUserLimits (new G4UserLimits(5*micrometer)); |
---|
| 657 | logicBoiteIso->SetUserLimits (new G4UserLimits(200.*micrometer)); |
---|
| 658 | logicCathode->SetUserLimits (new G4UserLimits(100.*micrometer)); |
---|
| 659 | logicIso->SetUserLimits (new G4UserLimits(100.*micrometer)); |
---|
| 660 | logicVerre->SetUserLimits (new G4UserLimits(0.02*micrometer)); |
---|
| 661 | logicBoite2->SetUserLimits (new G4UserLimits(10*micrometer)); |
---|
| 662 | logicBoite3->SetUserLimits (new G4UserLimits(0.2*micrometer)); |
---|
| 663 | logicKgm->SetUserLimits (new G4UserLimits(1*micrometer)); |
---|
| 664 | logicVerre2->SetUserLimits (new G4UserLimits(10*micrometer)); |
---|
| 665 | */ |
---|
| 666 | |
---|
| 667 | // VISUALISATION ATTRIBUTES (for phantom, see in Parameterisation class) |
---|
| 668 | |
---|
| 669 | G4VisAttributes* simpleWorldVisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0)); //White |
---|
| 670 | simpleWorldVisAtt->SetVisibility(true); |
---|
| 671 | |
---|
| 672 | G4VisAttributes* simplePlain= new G4VisAttributes(G4Colour(1.0,1.0,1.0)); //White |
---|
| 673 | simplePlain->SetVisibility(true); |
---|
| 674 | simplePlain->SetForceSolid(true); |
---|
| 675 | |
---|
| 676 | G4VisAttributes* simpleBoxAttLine= new G4VisAttributes(G4Colour(1.0,0.0,0.0)); |
---|
| 677 | simpleBoxAttLine->SetVisibility(true); |
---|
| 678 | |
---|
| 679 | G4VisAttributes* simpleBoxAtt= new G4VisAttributes(G4Colour(1.0,1.0,0.0)); |
---|
| 680 | simpleBoxAtt->SetDaughtersInvisible(false); |
---|
| 681 | simpleBoxAtt->SetForceSolid(false); |
---|
| 682 | |
---|
| 683 | G4VisAttributes* simpleBoxAtt2= new G4VisAttributes(G4Colour(0.0,1.0,0.0)); |
---|
| 684 | simpleBoxAtt2->SetDaughtersInvisible(false); |
---|
| 685 | simpleBoxAtt2->SetForceSolid(false); |
---|
| 686 | |
---|
| 687 | G4VisAttributes* simpleBoxAttKGM= new G4VisAttributes(G4Colour(0.0,0.0,1.0)); |
---|
| 688 | simpleBoxAttKGM->SetDaughtersInvisible(false); |
---|
| 689 | simpleBoxAttKGM->SetForceSolid(false); |
---|
| 690 | |
---|
| 691 | G4VisAttributes* simpleBoxAttPropyl= new G4VisAttributes(G4Colour(1.0,1.0,1.0)); |
---|
| 692 | simpleBoxAttPropyl->SetDaughtersInvisible(true); |
---|
| 693 | simpleBoxAttPropyl->SetForceSolid(false); |
---|
| 694 | |
---|
| 695 | G4VisAttributes* simpleBoxAttAir= new G4VisAttributes(G4Colour(0.0,1.0,0.0)); |
---|
| 696 | simpleBoxAttAir->SetDaughtersInvisible(true); |
---|
| 697 | simpleBoxAttAir->SetForceSolid(false); |
---|
| 698 | |
---|
| 699 | G4VisAttributes* simpleBoxAtt3= new G4VisAttributes(G4Colour(0.0,0.0,1.0)); |
---|
| 700 | simpleBoxAtt3->SetDaughtersInvisible(false); |
---|
| 701 | simpleBoxAtt3->SetForceSolid(false); |
---|
| 702 | |
---|
| 703 | logicYoke1->SetVisAttributes(simpleBoxAtt); |
---|
| 704 | logic1Gap->SetVisAttributes(simpleBoxAtt); |
---|
| 705 | logic2Gap->SetVisAttributes(simpleBoxAtt); |
---|
| 706 | logic3Gap->SetVisAttributes(simpleBoxAtt); |
---|
| 707 | logicYoke2->SetVisAttributes(simpleBoxAtt); |
---|
| 708 | logic4Gap->SetVisAttributes(simpleBoxAtt); |
---|
| 709 | logic5Gap->SetVisAttributes(simpleBoxAtt); |
---|
| 710 | logicBoite->SetVisAttributes(simpleBoxAttLine); |
---|
| 711 | logicCathode->SetVisAttributes(simpleBoxAttPropyl); |
---|
| 712 | logicIso->SetVisAttributes(simpleBoxAttPropyl); |
---|
| 713 | logicBoiteIso->SetVisAttributes(simpleBoxAttPropyl); |
---|
| 714 | logicVerre->SetVisAttributes(simpleBoxAtt); |
---|
| 715 | logicBoite2->SetVisAttributes(simpleBoxAttAir); |
---|
| 716 | logicBoite3->SetVisAttributes(simpleBoxAtt); |
---|
| 717 | logicKgm->SetVisAttributes(simpleBoxAttKGM); |
---|
| 718 | logicVerre2->SetVisAttributes(simpleBoxAtt); |
---|
| 719 | |
---|
| 720 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 721 | |
---|
| 722 | return physiWorld; |
---|
| 723 | } |
---|