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