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