37 #include "DetectorConstruction.hh"
55 #define countof(x) (sizeof(x) / sizeof(x[0]))
81 fBuildChromatineFiber(
true),
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 ..."
138 G4cout <<
"======================================================" <<
G4endl;
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},
220 {-1.407, 0, -1.450, 1.407, 1.407, 1.407, 0},
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},
230 {-4.148, 0, 1.278, 1.278, 1.278, 1.278, 0},
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},
240 {-4.065, 5.547, 0, 1.155, 1.155, 1.155, 0},
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},
250 {-6.971, -4.432, 0, 0.995, 0.995, 0.995, 90},
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},
256 {7.354, 2.605, 0, 1.330, 1.330, 1.330, 0}
262 vector<G4VPhysicalVolume*> physiBox(48);
264 for (
unsigned int i = 0; i <
countof(chromosomePositionSizeRotation); i++)
266 G4double*
p = &chromosomePositionSizeRotation[i][0];
267 G4double* size = &chromosomePositionSizeRotation[i][3];
268 G4double rotation = chromosomePositionSizeRotation[i][6];
273 ss <<
"box" << (i / 2) + 1 << (i % 2 ?
'l' :
'r');
284 size[1] * micrometer,
285 size[2] * micrometer);
316 for (
int k = 0;
k < 22;
k++)
319 oss <<
"chromo" <<
k + 1 <<
".dat";
343 "LV chromatin fiber");
347 for (
G4int i = 0; i < 7; i++)
353 posFiber.
rotateZ(i * 25.72 * degree);
363 rotFiber->
rotateX(90 * degree);
364 rotFiber->
rotateY((7 + i) * 25.72 * degree);
366 posFiber.
rotateZ((7 + i) * 25.72 * degree);
376 rotFiber->
rotateX(90 * degree);
377 rotFiber->
rotateY((25.72 + (i - 14) * 51.43) * degree);
379 posFiber.
rotateZ((i - 14) * 51.43 * degree);
389 rotFiber->
rotateX(90 * degree);
390 rotFiber->
rotateY(180 * degree);
391 rotFiber->
rotateY((i - 21) * 51.43 * degree);
393 posFiber.
rotateZ((i - 21) * 51.43 * degree);
421 "logic blue sphere");
425 "logic pink sphere");
462 { cos(
n * 0.076), -sin(
n * 0.076), 0 },
463 { sin(
n * 0.076), cos(
n * 0.076), 0 },
468 for (
G4int i = 0; i < 3; i++)
472 for (
G4int j = 0; j < 3; j++)
474 sumSP1 += matriceSP1[i][j] * SP1[0][j];
475 sumSP2 += matriceSP1[i][j] * SP1[1][j];
477 matriceSP2[0][i] = sumSP1;
478 matriceSP2[1][i] = sumSP2;
487 for (
G4int i = 0; i < 3; i++)
489 matriceSP2[0][i] += heliceSP[i];
490 matriceSP2[1][i] += heliceSP[i];
494 (matriceSP2[0][0]) - (4.25 *
nanometer));
497 (matriceSP2[1][0]) - (5.45 *
nanometer));
501 name = ss.str().c_str();
513 name = ss.str().c_str();
534 for (
G4int n = 0; n < 200; n++)
543 { cos(n * 0.076), -sin(n * 0.076), 0 },
544 {sin(n * 0.076), cos(n * 0.076), 0 },
549 for (
G4int i = 0; i < 3; i++)
553 for (
G4int j = 0; j < 3; j++)
555 sumBP1 += matriceBP1[i][j] * bp1[0][j];
556 sumBP2 += matriceBP1[i][j] * bp1[1][j];
558 matriceBP2[0][i] = sumBP1;
559 matriceBP2[1][i] = sumBP2;
567 for (
G4int i = 0; i < 3; i++)
569 matriceBP2[0][i] += heliceBP[i];
570 matriceBP2[1][i] += heliceBP[i];
599 for (
int j = 0; j < 90; j++)
603 rotStrand1->
rotateZ(j * -51.43 * degree);
607 posStrand1.rotateZ(j * 51.43 * degree);
617 rotStrand2->
rotateZ(j * -51.43 * degree);
621 posStrand2.rotateZ(j * 51.43 * degree);
632 rotHistone->
rotateY(90 * degree);
633 rotHistone->
rotateX(j * (-51.43 * degree));
637 posHistone.rotateZ(j * 51.43 * degree);