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