38 #include "DetectorConstruction.hh"
56 #define countof(x) (sizeof(x) / sizeof(x[0]))
82 fBuildChromatineFiber(true),
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 ..."
139 G4cout <<
"======================================================" <<
G4endl;
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},
221 {-1.407, 0, -1.450, 1.407, 1.407, 1.407, 0},
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},
231 {-4.148, 0, 1.278, 1.278, 1.278, 1.278, 0},
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},
241 {-4.065, 5.547, 0, 1.155, 1.155, 1.155, 0},
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},
251 {-6.971, -4.432, 0, 0.995, 0.995, 0.995, 90},
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},
257 {7.354, 2.605, 0, 1.330, 1.330, 1.330, 0}
263 vector<G4VPhysicalVolume*> physiBox(48);
265 for (
unsigned int i = 0; i <
countof(chromosomePositionSizeRotation); i++)
267 G4double*
p = &chromosomePositionSizeRotation[i][0];
268 G4double* size = &chromosomePositionSizeRotation[i][3];
269 G4double rotation = chromosomePositionSizeRotation[i][6];
274 ss <<
"box" << (i / 2) + 1 << (i % 2 ?
'l' :
'r');
285 size[1] * micrometer,
286 size[2] * micrometer);
317 for (
int k = 0; k < 22; k++)
320 oss <<
"chromo" << k + 1 <<
".dat";
344 "LV chromatin fiber");
348 for (
G4int i = 0; i < 7; i++)
354 posFiber.
rotateZ(i * 25.72 * degree);
364 rotFiber->
rotateX(90 * degree);
365 rotFiber->
rotateY((7 + i) * 25.72 * degree);
367 posFiber.
rotateZ((7 + i) * 25.72 * degree);
377 rotFiber->
rotateX(90 * degree);
378 rotFiber->
rotateY((25.72 + (i - 14) * 51.43) * degree);
380 posFiber.
rotateZ((i - 14) * 51.43 * degree);
390 rotFiber->
rotateX(90 * degree);
391 rotFiber->
rotateY(180 * degree);
392 rotFiber->
rotateY((i - 21) * 51.43 * degree);
394 posFiber.
rotateZ((i - 21) * 51.43 * degree);
422 "logic blue sphere");
426 "logic pink sphere");
463 { cos(
n * 0.076), -sin(
n * 0.076), 0 },
464 { sin(
n * 0.076), cos(
n * 0.076), 0 },
469 for (
G4int i = 0; i < 3; i++)
473 for (
G4int j = 0; j < 3; j++)
475 sumSP1 += matriceSP1[i][j] * SP1[0][j];
476 sumSP2 += matriceSP1[i][j] * SP1[1][j];
478 matriceSP2[0][i] = sumSP1;
479 matriceSP2[1][i] = sumSP2;
488 for (
G4int i = 0; i < 3; i++)
490 matriceSP2[0][i] += heliceSP[i];
491 matriceSP2[1][i] += heliceSP[i];
495 (matriceSP2[0][0]) - (4.25 *
nanometer));
498 (matriceSP2[1][0]) - (5.45 *
nanometer));
502 name = ss.str().c_str();
514 name = ss.str().c_str();
535 for (
G4int n = 0; n < 200; n++)
544 { cos(n * 0.076), -sin(n * 0.076), 0 },
545 {sin(n * 0.076), cos(n * 0.076), 0 },
550 for (
G4int i = 0; i < 3; i++)
554 for (
G4int j = 0; j < 3; j++)
556 sumBP1 += matriceBP1[i][j] * bp1[0][j];
557 sumBP2 += matriceBP1[i][j] * bp1[1][j];
559 matriceBP2[0][i] = sumBP1;
560 matriceBP2[1][i] = sumBP2;
568 for (
G4int i = 0; i < 3; i++)
570 matriceBP2[0][i] += heliceBP[i];
571 matriceBP2[1][i] += heliceBP[i];
600 for (
int j = 0; j < 90; j++)
604 rotStrand1->
rotateZ(j * -51.43 * degree);
608 posStrand1.rotateZ(j * 51.43 * degree);
618 rotStrand2->
rotateZ(j * -51.43 * degree);
622 posStrand2.rotateZ(j * 51.43 * degree);
633 rotHistone->
rotateY(90 * degree);
634 rotHistone->
rotateX(j * (-51.43 * degree));
638 posHistone.rotateZ(j * 51.43 * degree);
static constexpr double micrometer
static constexpr double nanometer
CLHEP::Hep3Vector G4ThreeVector
static constexpr double micrometer
static const G4double pos
static constexpr double mm
static G4VisAttributes visInvGreen(false, G4Colour(0.0, 1.0, 0.0))
static G4VisAttributes visRed(true, G4Colour(1.0, 0.0, 0.0))
CLHEP::HepRotation G4RotationMatrix
static G4VisAttributes visBlue(true, G4Colour(0.0, 0.0, 1.0))
G4VPhysicalVolume * Construct()
Definition of the ChromosomeParameterisation class.
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
static G4VisAttributes visInvWhite(false, G4Colour(1.0, 1.0, 1.0))
static G4VisAttributes visInvRed(false, G4Colour(1.0, 0.0, 0.0))
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
void SetVisAttributes(const G4VisAttributes *pVA)
static G4VisAttributes visCyan(true, G4Colour(0.0, 1.0, 1.0))
Hep3Vector & rotateZ(double)
HepRotation & rotateY(double delta)
static G4VisAttributes visInvCyan(false, G4Colour(0.0, 1.0, 1.0))
G4bool fBuildChromatineFiber
static constexpr double mm
static G4VisAttributes visPink(true, G4Colour(1.0, 0.0, 1.0))
HepRotation & rotateZ(double delta)
static constexpr double degree
G4GLOB_DLL std::ostream G4cout
G4VPhysicalVolume * ConstructDetector()
static G4VisAttributes visInvPink(false, G4Colour(1.0, 0.0, 1.0))
static G4VisAttributes visWhite(true, G4Colour(1.0, 1.0, 1.0))
static G4VisAttributes visGreen(true, G4Colour(0.0, 1.0, 0.0))
HepRotation & rotateX(double delta)
static constexpr double degree
void LoadChromosome(const char *filename, G4VPhysicalVolume *physiBox, G4LogicalVolume *logicBoxros)
static G4VisAttributes visInvBlue(false, G4Colour(0.0, 0.0, 1.0))
static constexpr double nanometer
static G4NistManager * Instance()