ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DetectorConstruction.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file 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 // and the DNA geometry given in the Geom_DNA example
29 // shall cite the following Geant4-DNA collaboration publications:
30 // [1] NIM B 298 (2013) 47-54
31 // [2] Med. Phys. 37 (2010) 4692-4708
32 // The Geant4-DNA web site is available at http://geant4-dna.org
33 //
36 
37 #include "DetectorConstruction.hh"
38 
39 // Geant4
40 #include "globals.hh"
42 #include "G4LogicalVolume.hh"
43 #include "G4UnionSolid.hh"
44 #include "G4Box.hh"
45 #include "G4Orb.hh"
46 #include "G4Tubs.hh"
47 #include "G4Ellipsoid.hh"
48 #include "G4PVParameterised.hh"
49 #include "G4PVPlacement.hh"
50 #include "G4RotationMatrix.hh"
51 #include "G4VisAttributes.hh"
52 #include "G4NistManager.hh"
54 
55 #define countof(x) (sizeof(x) / sizeof(x[0]))
56 
57 using namespace std;
58 using CLHEP::mm;
59 using CLHEP::degree;
60 using CLHEP::nanometer;
61 using CLHEP::micrometer;
62 
63 static G4VisAttributes visInvBlue(false, G4Colour(0.0, 0.0, 1.0));
64 static G4VisAttributes visInvWhite(false, G4Colour(1.0, 1.0, 1.0));
65 static G4VisAttributes visInvPink(false, G4Colour(1.0, 0.0, 1.0));
66 static G4VisAttributes visInvCyan(false, G4Colour(0.0, 1.0, 1.0));
67 static G4VisAttributes visInvRed(false, G4Colour(1.0, 0.0, 0.0));
68 static G4VisAttributes visInvGreen(false, G4Colour(0.0, 1.0, 0.0));
69 static G4VisAttributes visBlue(true, G4Colour(0.0, 0.0, 1.0));
70 static G4VisAttributes visWhite(true, G4Colour(1.0, 1.0, 1.0));
71 static G4VisAttributes visPink(true, G4Colour(1.0, 0.0, 1.0));
72 static G4VisAttributes visCyan(true, G4Colour(0.0, 1.0, 1.0));
73 static G4VisAttributes visRed(true, G4Colour(1.0, 0.0, 0.0));
74 static G4VisAttributes visGreen(true, G4Colour(0.0, 1.0, 0.0));
75 
76 
77 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
78 
81  fBuildChromatineFiber(true),
82  fBuildBases(false)
83 {
84 }
85 
86 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
87 
89 {
90 }
91 
92 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
93 
95 {
97  return ConstructDetector();
98 }
99 
100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
101 
103 {
104  // Water is defined from NIST material database
106  man->FindOrBuildMaterial("G4_WATER");
107 }
108 
109 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
110 
112  G4VPhysicalVolume* chromBox,
113  G4LogicalVolume* logicBoxros)
114 {
116  new G4PVParameterised("box ros",
117  logicBoxros,
118  chromBox,
119  kUndefined,
120  cp->GetNumRosettes(),
121  cp);
122 
123  G4cout << filename << " done" << G4endl;
124 }
125 
126 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
127 
129 {
130  if(fBuildBases == false && fBuildChromatineFiber == false)
131  {
132  G4cout <<"======================================================" << G4endl;
133  G4cout <<"WARNING from DetectorConstruction::ConstructDetector:" << G4endl;
134  G4cout << "As long as the flags fBuildBases and fBuildChromatineFiber are "
135  "false, the output root file will be empty" << G4endl;
136  G4cout << "This is intended for fast computation, display, testing ..."
137  << G4endl;
138  G4cout <<"======================================================" << G4endl;
139  }
140 
141  G4String name;
142 
143  /***************************************************************************/
144  // World
145  /***************************************************************************/
146 
147  DefineMaterials();
148  G4Material* waterMaterial = G4Material::GetMaterial("G4_WATER");
149 
150  G4Box* solidWorld = new G4Box("world", 10.0 * mm, 10.0 * mm, 10.0 * mm);
151  G4LogicalVolume* logicWorld = new G4LogicalVolume(solidWorld,
152  waterMaterial,
153  "world");
154  G4PVPlacement* physiWorld = new G4PVPlacement(0,
155  G4ThreeVector(),
156  "world",
157  logicWorld,
158  0,
159  false,
160  0);
161  logicWorld->SetVisAttributes(&visInvWhite);
162 
163  /****************************************************************************/
164  // Box nucleus
165  /****************************************************************************/
166 
167  G4Box* solidTin = new G4Box("tin",
168  13 * micrometer,
169  10 * micrometer,
170  5 * micrometer);
171  G4LogicalVolume* logicTin = new G4LogicalVolume(solidTin,
172  waterMaterial,
173  "tin");
174  G4VPhysicalVolume* physiTin = new G4PVPlacement(0,
175  G4ThreeVector(),
176  "tin",
177  logicTin,
178  physiWorld,
179  false,
180  0);
181  logicTin->SetVisAttributes(&visInvWhite);
182 
183  /****************************************************************************/
184  // Cell nucleus
185  /****************************************************************************/
186 
187  G4Ellipsoid* solidNucleus = new G4Ellipsoid("nucleus",
188  11.82 * micrometer,
189  8.52 * micrometer,
190  3 * micrometer,
191  0,
192  0);
193  G4LogicalVolume* logicNucleus = new G4LogicalVolume(solidNucleus,
194  waterMaterial,
195  "logic nucleus");
196  G4VPhysicalVolume* physiNucleus = new G4PVPlacement(0,
197  G4ThreeVector(),
198  "physi nucleus",
199  logicNucleus,
200  physiTin,
201  false,
202  0);
203  logicNucleus->SetVisAttributes(&visPink);
204 
205  /****************************************************************************/
206  // Chromosomes territories
207  /****************************************************************************/
208  // NOTE: The only supported values for the rotation are
209  // 0 and 90 degrees on the Y axis.
210  G4double chromosomePositionSizeRotation[][7] = {
211  {4.467, 2.835, 0, 1.557, 1.557, 1.557, 90},
212  {-4.467, 2.835, 0, 1.557, 1.557, 1.557, 0},
213  {4.423, -2.831, 0, 1.553, 1.553, 1.553, 90},
214  {-4.423, -2.831, 0, 1.553, 1.553, 1.553, 0},
215  {1.455, 5.63, 0, 1.455, 1.455, 1.455, 0},
216  {-1.455, 5.63, 0, 1.455, 1.455, 1.455, 90},
217  {1.435, 0, 1.392, 1.435, 1.435, 1.435, 0},
218  {-1.435, 0, 1.392, 1.435, 1.435, 1.435, 90},
219  {1.407, 0, -1.450, 1.407, 1.407, 1.407, 90}, // 5 right
220  {-1.407, 0, -1.450, 1.407, 1.407, 1.407, 0}, // 5 left
221  {1.380, -5.437, 0, 1.380, 1.380, 1.380, 0},
222  {-1.380, -5.437, 0, 1.380, 1.380, 1.380, 90},
223  {1.347, 2.782, -1.150, 1.347, 1.347, 1.347, 90},
224  {-1.347, 2.782, -1.150, 1.347, 1.347, 1.347, 0},
225  {1.311, -2.746, -1.220, 1.311, 1.311, 1.311, 90},
226  {-1.311, -2.746, -1.220, 1.311, 1.311, 1.311, 0},
227  {7.251, -2.541, 0, 1.275, 1.275, 1.275, 0},
228  {-6.701, 0, -0.85, 1.275, 1.275, 1.275, 90},
229  {4.148, 0, 1.278, 1.278, 1.278, 1.278, 90}, // 10 right
230  {-4.148, 0, 1.278, 1.278, 1.278, 1.278, 0}, // 10 left
231  {4.147, 0, -1.277, 1.277, 1.277, 1.277, 0},
232  {-4.147, 0, -1.277, 1.277, 1.277, 1.277, 90},
233  {8.930, 0.006, 0, 1.272, 1.272, 1.272, 90},
234  {-7.296, 2.547, 0, 1.272, 1.272, 1.272, 90},
235  {1.207, -2.642, 1.298, 1.207, 1.207, 1.207, 0},
236  {-1.207, -2.642, 1.298, 1.207, 1.207, 1.207, 90},
237  {1.176, 2.611, 1.368, 1.176, 1.176, 1.176, 0},
238  {-1.176, 2.611, 1.368, 1.176, 1.176, 1.176, 90},
239  {4.065, 5.547, 0, 1.155, 1.155, 1.155, 90}, // 15 right
240  {-4.065, 5.547, 0, 1.155, 1.155, 1.155, 0}, // 15 left
241  {6.542, 0.159, 1.116, 1.116, 1.116, 1.116, 0},
242  {-9.092, 0, 0, 1.116, 1.116, 1.116, 0},
243  {6.507, 0.159, -1.081, 1.081, 1.081, 1.081, 90},
244  {-7.057, -2.356, 0, 1.081, 1.081, 1.081, 90},
245  {3.824, -5.448, 0, 1.064, 1.064, 1.064, 90},
246  {-3.824, -5.448, 0, 1.064, 1.064, 1.064, 0},
247  {5.883, -5.379, 0, 0.995, 0.995, 0.995, 0},
248  {-9.133, -2.111, 0, 0.995, 0.995, 0.995, 0},
249  {6.215, 5.387, 0, 0.995, 0.995, 0.995, 0}, // 20 right
250  {-6.971, -4.432, 0, 0.995, 0.995, 0.995, 90}, // 20 left
251  {9.583, 2.177, 0, 0.899, 0.899, 0.899, 90},
252  {-9.467, 2.03, 0, 0.899, 0.899, 0.899, 0},
253  {9.440, -2.180, 0, 0.914, 0.914, 0.914, 90},
254  {-6.34, 0, 1.339, 0.914, 0.914, 0.914, 0},
255  {-6.947, 4.742, 0, 0.923, 0.923, 0.923, 90}, // Y
256  {7.354, 2.605, 0, 1.330, 1.330, 1.330, 0} // X
257  };
258 
259  G4RotationMatrix* rotch = new G4RotationMatrix;
260  rotch->rotateY(90 * degree);
261 
262  vector<G4VPhysicalVolume*> physiBox(48);
263 
264  for (unsigned int i = 0; i < countof(chromosomePositionSizeRotation); i++)
265  {
266  G4double* p = &chromosomePositionSizeRotation[i][0];
267  G4double* size = &chromosomePositionSizeRotation[i][3];
268  G4double rotation = chromosomePositionSizeRotation[i][6];
269  G4ThreeVector pos(p[0] * micrometer, p[1] * micrometer, p[2] * micrometer);
270  G4RotationMatrix* rot = rotation == 0 ? 0 : rotch;
271 
272  ostringstream ss;
273  ss << "box" << (i / 2) + 1 << (i % 2 ? 'l' : 'r');
274  name = ss.str();
275  ss.str("");
276  ss.clear();
277 
278  /*
279  snprintf(name, countof(name), "box%d%c",
280  (i / 2) + 1, i % 2 ? 'l' : 'r');
281  */
282  G4Box* solidBox = new G4Box(name,
283  size[0] * micrometer,
284  size[1] * micrometer,
285  size[2] * micrometer);
286  G4LogicalVolume* logicBox = new G4LogicalVolume(solidBox,
287  waterMaterial,
288  name);
289  physiBox[i] = new G4PVPlacement(rot,
290  pos,
291  "chromo",
292  logicBox,
293  physiNucleus,
294  false,
295  0);
296  logicBox->SetVisAttributes(&visBlue);
297  }
298 
299  /**************************************************************************/
300  // Box containing the chromatin flowers
301  /**************************************************************************/
302 
303  G4Tubs* solidBoxros = new G4Tubs("solid box ros",
304  0 * nanometer,
305  399 * nanometer,
306  20 * nanometer,
307  0 * degree,
308  360 * degree);
309  G4LogicalVolume* logicBoxros = new G4LogicalVolume(solidBoxros,
310  waterMaterial,
311  "box ros");
312  logicBoxros->SetVisAttributes(&visInvBlue);
313 
314  //Loading flower box position for each chromosome territory
315 
316  for (int k = 0; k < 22; k++)
317  {
318  ostringstream oss;
319  oss << "chromo" << k + 1 << ".dat";
320  name = oss.str();
321  oss.str("");
322  oss.clear();
323  //snprintf(name, countof(name), "chromo%d.dat", k + 1);
324  LoadChromosome(name.c_str(), physiBox[k * 2], logicBoxros);
325  LoadChromosome(name.c_str(), physiBox[k * 2 + 1], logicBoxros);
326  }
327 
328  LoadChromosome("chromoY.dat", physiBox[44], logicBoxros);
329  LoadChromosome("chromoX.dat", physiBox[45], logicBoxros);
330 
331  /****************************************************************************/
333  {
334  // chromatin fiber envelope
335  G4Tubs* solidEnv = new G4Tubs("chromatin fiber",
336  0,
337  15.4 * nanometer,
338  80.5 * nanometer,
339  0 * degree,
340  360 * degree);
341  G4LogicalVolume* logicEnv = new G4LogicalVolume(solidEnv,
342  waterMaterial,
343  "LV chromatin fiber");
344  logicEnv->SetVisAttributes(&visInvPink);
345 
346  // Chromatin fiber position
347  for (G4int i = 0; i < 7; i++)
348  {
349  G4RotationMatrix* rotFiber = new G4RotationMatrix;
350  rotFiber->rotateX(90 * degree);
351  rotFiber->rotateY(i * 25.72 * degree);
352  G4ThreeVector posFiber = G4ThreeVector(0, 152 * nanometer, 0);
353  posFiber.rotateZ(i * 25.72 * degree);
354  new G4PVPlacement(rotFiber,
355  posFiber,
356  logicEnv,
357  "physi env",
358  logicBoxros,
359  false,
360  0);
361 
362  rotFiber = new G4RotationMatrix;
363  rotFiber->rotateX(90 * degree);
364  rotFiber->rotateY((7 + i) * 25.72 * degree);
365  posFiber = G4ThreeVector(0, 152 * nanometer, 0);
366  posFiber.rotateZ((7 + i) * 25.72 * degree);
367  new G4PVPlacement(rotFiber,
368  posFiber,
369  logicEnv,
370  "physi env",
371  logicBoxros,
372  false,
373  0);
374 
375  rotFiber = new G4RotationMatrix;
376  rotFiber->rotateX(90 * degree);
377  rotFiber->rotateY((25.72 + (i - 14) * 51.43) * degree);
378  posFiber = G4ThreeVector(-36.5 * nanometer, 312 * nanometer, 0);
379  posFiber.rotateZ((i - 14) * 51.43 * degree);
380  new G4PVPlacement(rotFiber,
381  posFiber,
382  logicEnv,
383  "physi env",
384  logicBoxros,
385  false,
386  0);
387 
388  rotFiber = new G4RotationMatrix;
389  rotFiber->rotateX(90 * degree);
390  rotFiber->rotateY(180 * degree);
391  rotFiber->rotateY((i - 21) * 51.43 * degree);
392  posFiber = G4ThreeVector(-103 * nanometer, 297 * nanometer, 0);
393  posFiber.rotateZ((i - 21) * 51.43 * degree);
394  new G4PVPlacement(rotFiber,
395  posFiber,
396  logicEnv,
397  "physi env",
398  logicBoxros,
399  false,
400  0);
401 
402  }
403 
404  if (fBuildBases)
405  {
406  // Histones
407  G4Tubs* solidHistone = new G4Tubs("solid histone",
408  0,
409  3.25 * nanometer,
410  2.85 * nanometer,
411  0 * degree,
412  360 * degree);
413  G4LogicalVolume* logicHistone = new G4LogicalVolume(solidHistone,
414  waterMaterial,
415  "logic histone");
416 
417  //Base pair
418  G4Orb* solidBp1 = new G4Orb("blue sphere", 0.17 * nanometer);
419  G4LogicalVolume* logicBp1 = new G4LogicalVolume(solidBp1,
420  waterMaterial,
421  "logic blue sphere");
422  G4Orb* solidBp2 = new G4Orb("pink sphere", 0.17 * nanometer);
423  G4LogicalVolume* logicBp2 = new G4LogicalVolume(solidBp2,
424  waterMaterial,
425  "logic pink sphere");
426 
427  //Phosphodiester group
428 
429  G4Orb* solidSugar_48em1_nm = new G4Orb("sugar", 0.48 * nanometer);
430 
431  G4ThreeVector posi(0.180248 * nanometer,
432  0.32422 * nanometer,
433  0.00784 * nanometer);
434  G4UnionSolid* uniDNA = new G4UnionSolid("move",
435  solidSugar_48em1_nm,
436  solidSugar_48em1_nm,
437  0,
438  posi);
439 
440  G4ThreeVector posi2(-0.128248 * nanometer,
441  0.41227 * nanometer,
442  0.03584 * nanometer);
443  G4UnionSolid* uniDNA2 = new G4UnionSolid("move2",
444  solidSugar_48em1_nm,
445  solidSugar_48em1_nm,
446  0,
447  posi2);
448 
449  /************************************************************************
450  Phosphodiester group Position
451  ************************************************************************/
452 
453  for (G4int n = 2; n < 200; n++)
454  {
455  G4double SP1[2][3] = {
456  { (-0.6 * nanometer) * cos(n * 0.26),
457  0, (0.6* nanometer) * sin(n * 0.26) },
458  { (0.6 * nanometer) * cos(n * 0.26),
459  0, (-0.6 * nanometer) * sin(0.26 * n) }
460  };
461  G4double matriceSP1[3][3] = {
462  { cos(n * 0.076), -sin(n * 0.076), 0 },
463  { sin(n * 0.076), cos(n * 0.076), 0 },
464  { 0, 0, 1 }
465  };
466  G4double matriceSP2[2][3];
467 
468  for (G4int i = 0; i < 3; i++)
469  {
470  G4double sumSP1 = 0;
471  G4double sumSP2 = 0;
472  for (G4int j = 0; j < 3; j++)
473  {
474  sumSP1 += matriceSP1[i][j] * SP1[0][j];
475  sumSP2 += matriceSP1[i][j] * SP1[1][j];
476  }
477  matriceSP2[0][i] = sumSP1;
478  matriceSP2[1][i] = sumSP2;
479  }
480 
481  G4double heliceSP[3] = {
482  (4.85 * nanometer) * cos(n * 0.076),
483  (4.85 * nanometer) * sin(n * 0.076),
484  (n * 0.026 * nanometer)
485  };
486 
487  for (G4int i = 0; i < 3; i++)
488  {
489  matriceSP2[0][i] += heliceSP[i];
490  matriceSP2[1][i] += heliceSP[i];
491  }
492  G4ThreeVector posSugar1(matriceSP2[0][2],
493  matriceSP2[0][1],
494  (matriceSP2[0][0]) - (4.25 * nanometer));
495  G4ThreeVector posSugar2(matriceSP2[1][2],
496  matriceSP2[1][1],
497  (matriceSP2[1][0]) - (5.45 * nanometer));
498 
499  ostringstream ss;
500  ss << "sugar_" << n;
501  name = ss.str().c_str();
502  ss.str("");
503  ss.clear();
504 
505  // snprintf(name, countof(name), "sugar %d", n);
506  uniDNA = new G4UnionSolid(name,
507  uniDNA,
508  solidSugar_48em1_nm,
509  0,
510  posSugar1);
511 
512  ss << "sugar_" << n;
513  name = ss.str().c_str();
514  ss.str("");
515  ss.clear();
516 
517  // snprintf(name, countof(name), "sugar %d", n);
518  uniDNA2 = new G4UnionSolid(name,
519  uniDNA2,
520  solidSugar_48em1_nm,
521  0,
522  posSugar2);
523  }
524  G4LogicalVolume* logicSphere3 = new G4LogicalVolume(uniDNA,
525  waterMaterial,
526  "logic sugar 2");
527  G4LogicalVolume* logicSphere4 = new G4LogicalVolume(uniDNA2,
528  waterMaterial,
529  "logic sugar 4");
530 
531  /**************************************************************************
532  Base pair Position
533  **************************************************************************/
534  for (G4int n = 0; n < 200; n++)
535  {
536  G4double bp1[2][3] = {
537  { (-0.34 * nanometer) * cos(n * 0.26),
538  0, (0.34* nanometer) * sin(n * 0.26) },
539  { (0.34 * nanometer) * cos(n * 0.26),
540  0, (-0.34 * nanometer) * sin(0.26 * n) }
541  };
542  G4double matriceBP1[3][3] = {
543  { cos(n * 0.076), -sin(n * 0.076), 0 },
544  {sin(n * 0.076), cos(n * 0.076), 0 },
545  { 0, 0, 1 }
546  };
547  G4double matriceBP2[2][3];
548 
549  for (G4int i = 0; i < 3; i++)
550  {
551  G4double sumBP1 = 0;
552  G4double sumBP2 = 0;
553  for (G4int j = 0; j < 3; j++)
554  {
555  sumBP1 += matriceBP1[i][j] * bp1[0][j];
556  sumBP2 += matriceBP1[i][j] * bp1[1][j];
557  }
558  matriceBP2[0][i] = sumBP1;
559  matriceBP2[1][i] = sumBP2;
560  }
561  G4double heliceBP[3] = {
562  (4.8 * nanometer) * cos(n * 0.076),
563  (4.8 * nanometer) * sin(n * 0.076),
564  n * 0.026 * nanometer
565  };
566 
567  for (G4int i = 0; i < 3; i++)
568  {
569  matriceBP2[0][i] += heliceBP[i];
570  matriceBP2[1][i] += heliceBP[i];
571  }
572  G4ThreeVector position1(matriceBP2[0][2],
573  matriceBP2[0][1],
574  matriceBP2[0][0] - (4.25 * nanometer));
575  G4ThreeVector position2(matriceBP2[1][2],
576  matriceBP2[1][1],
577  matriceBP2[1][0] - (5.45 * nanometer));
578 
579  new G4PVPlacement(0,
580  position1,
581  logicBp1,
582  "physi blue sphere",
583  logicSphere3,
584  false,
585  0);
586  new G4PVPlacement(0,
587  position2,
588  logicBp2,
589  "physi pink sphere",
590  logicSphere4,
591  false,
592  0);
593  }
594 
595  /****************************************************************************/
596  // Initial position of different elements
597  /****************************************************************************/
598  // DNA and histone positions
599  for (int j = 0; j < 90; j++)
600  {
601  // DNA (bp-SP)
602  G4RotationMatrix* rotStrand1 = new G4RotationMatrix;
603  rotStrand1->rotateZ(j * -51.43 * degree);
604  G4ThreeVector posStrand1(-2.7 * nanometer,
605  9.35 * nanometer,
606  (-69.9 * nanometer) + (j * 1.67 * nanometer));
607  posStrand1.rotateZ(j * 51.43 * degree);
608  new G4PVPlacement(rotStrand1,
609  posStrand1,
610  logicSphere3,
611  "physi sugar 2",
612  logicEnv,
613  false,
614  0);
615 
616  G4RotationMatrix* rotStrand2 = new G4RotationMatrix;
617  rotStrand2->rotateZ(j * -51.43 * degree);
618  G4ThreeVector posStrand2(-2.7 * nanometer,
619  9.35 * nanometer,
620  (-68.7 * nanometer) + (j * 1.67 * nanometer));
621  posStrand2.rotateZ(j * 51.43 * degree);
622  new G4PVPlacement(rotStrand2,
623  posStrand2,
624  logicSphere4,
625  "physi sugar 4",
626  logicEnv,
627  false,
628  0);
629 
630  // histones
631  G4RotationMatrix* rotHistone = new G4RotationMatrix;
632  rotHistone->rotateY(90 * degree);
633  rotHistone->rotateX(j * (-51.43 * degree));
634  G4ThreeVector posHistone(0.0,
635  9.35 * nanometer,
636  (-74.15 + j * 1.67) * nanometer);
637  posHistone.rotateZ(j * 51.43 * degree);
638  new G4PVPlacement(rotHistone,
639  posHistone,
640  logicHistone,
641  "PV histone",
642  logicEnv,
643  false,
644  0);
645  }
646  /************************************************************************/
647  // Visualisation colors
648  /************************************************************************/
649 
650  logicBp1->SetVisAttributes(&visInvCyan);
651  logicBp2->SetVisAttributes(&visInvPink);
652 
653  logicSphere3->SetVisAttributes(&visInvWhite);
654  logicSphere4->SetVisAttributes(&visInvRed);
655 
656  logicHistone->SetVisAttributes(&visInvBlue);
657  }
658  }
659 
660  G4cout << "Geometry has been loaded" << G4endl;
661  return physiWorld;
662 }