40 #include "DetectorConstruction.hh"
42 #include "DetectorMessenger.hh"
59 #ifdef G4MULTITHREADED
110 G4bool fromIsotopes =
false;
128 G4Exception(
"DetectorConstruction::CheckMaterials",
129 "DEFAULT_MATERIAL_NOT_INIT_1",
131 "Default material not initialized.");
134 G4Exception(
"DetectorConstruction::CheckMaterials",
135 "WATER_MATERIAL_NOT_INIT",
137 "Water material not initialized.");
149 G4Exception(
"DetectorConstruction::ConstructWorld",
150 "DEFAULT_MATERIAL_NOT_INIT_2",
152 "Default material not initialized.");
160 worldSize/2, worldSize/2, worldSize/2);
192 unsigned short int option)
217 unsigned short int isDNA;
300 Molecule *moleculeListTemp,
double atomSizeFactor)
369 int nbAtomH=0, nbAtomC=0, nbAtomO=0, nbAtomN=0, nbAtomS=0, nbAtomP=0;
373 while (moleculeListTemp)
375 residueListTemp = moleculeListTemp->
GetFirst();
379 while (residueListTemp)
381 AtomTemp=residueListTemp->
GetFirst();
385 int upTo=residueListTemp->
fNbAtom;
386 for (
int i=0 ; i < (upTo + startFrom) ; i++)
389 if (AtomTemp->
fElement.compare(
"H") == 0)
394 AtomTemp->
fY*1*angstrom,
395 AtomTemp->
fZ*1*angstrom),
403 else if (AtomTemp->
fElement.compare(
"C") == 0)
408 AtomTemp->
fY*1*angstrom,
409 AtomTemp->
fZ*1*angstrom),
417 else if (AtomTemp->
fElement.compare(
"O") == 0)
422 AtomTemp->
fY*1*angstrom,
423 AtomTemp->
fZ*1*angstrom),
431 else if (AtomTemp->
fElement.compare(
"N") == 0)
436 AtomTemp->
fY*1*angstrom,
437 AtomTemp->
fZ*1*angstrom),
445 else if (AtomTemp->
fElement.compare(
"S") == 0)
450 AtomTemp->
fY*1*angstrom,
451 AtomTemp->
fZ*1*angstrom),
459 else if (AtomTemp->
fElement.compare(
"P") == 0)
464 AtomTemp->
fY*1*angstrom,
465 AtomTemp->
fZ*1*angstrom),
478 AtomTemp->
fY*1*angstrom,
479 AtomTemp->
fZ*1*angstrom),
493 residueListTemp=residueListTemp->
GetNext();
496 moleculeListTemp=moleculeListTemp->
GetNext();
499 G4cout <<
"**************** atomisticView(...) ****************" <<
G4endl;
507 G4cout <<
"Number of Phosphorus = " << nbAtomP <<
G4endl;
508 G4cout <<
"Number of undifined atoms =" << nbAtomX <<G4endl<<
G4endl;
527 while (barycenterListTemp)
548 barycenterListTemp=barycenterListTemp->
GetNext();
577 while (barycenterListTemp)
634 tubS1_ZZ =
new G4Tubs(
"Cylinder",
659 G4double llUll=std::sqrt(Ux*Ux+Uy*Uy+Uz*Uz);
687 tubS2_ZZ =
new G4Tubs(
"Cylinder2",
712 llUll=std::sqrt(Ux*Ux+Uy*Uy+Uz*Uz);
719 theta_euler = direction.
theta();
720 phi_euler = direction.
phi();
742 barycenterListTemp=barycenterListTemp->
GetNext();
764 =
new G4Box(
"Bounding", dX*1*
angstrom, dY*1*angstrom, dZ*1*angstrom);
794 #ifdef G4MULTITHREADED
812 G4cout<<
"Build only world volume and bounding volume"
814 #ifdef G4MULTITHREADED
834 #ifdef G4MULTITHREADED
854 #ifdef G4MULTITHREADED
874 #ifdef G4MULTITHREADED
894 #ifdef G4MULTITHREADED
914 #ifdef G4MULTITHREADED
934 #ifdef G4MULTITHREADED
static constexpr double kelvin
static G4RunManager * GetRunManager()
int fNbAtom
Number of atoms into a residue (usage before vector)
void ResiduesView(G4LogicalVolume *, Barycenter *)
CLHEP::Hep3Vector G4ThreeVector
double fCenterBaseY
"Y coordinate" of this Base Barycenter
std::vector< ExP01TrackerHit * > a
G4LogicalVolume * GetLogicalVolume() const
Atom * GetNext()
Returns the next Atom.
Barycenter * fpBarycenterList
void DrawAtomsWithBounding_()
void BuildBoundingVolume()
Molecule * Load(const std::string &filename, unsigned short int &isDNA, unsigned short int verbose)
Load PDB file into memory.
CLHEP::HepRotation G4RotationMatrix
G4VPhysicalVolume * Construct()
virtual void DefineWorldVolume(G4VPhysicalVolume *worldVol, G4bool topologyIsChanged=true)
double fCenterPhosphateX
"X coordinate" of this Phosphate Barycenter
static constexpr double universe_mean_density
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
double fCenterSugarY
"Y coordinate" of this Sugar Barycenter
void LoadPDBfile(G4String fileName)
G4Material * fpDefaultMaterial
Barycenter * GetNext()
Get the next Barycenter.
G4Material * fpWaterMaterial
Molecule * fpMoleculeList
static constexpr double g
void DrawBoundingVolume(G4LogicalVolume *, Molecule *)
double fCenterSugarX
"X coordinate" of this Sugar Barycenter
void DrawResiduesWithBounding_()
std::string fElement
Element symbol extracted from 'atom name'.
double fCenterZ
"Z coordinate" of this nucelotide Barycenter
void ConstructMaterials()
static G4GeometryManager * GetInstance()
void ComputeNbNucleotidsPerStrand(Molecule *moleculeListTemp)
Compute number of nucleotide per strand.
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
double fCenterBaseX
"X coordinate" of this Base Barycenter
void ComputeBoundingVolumeParams(Molecule *moleculeListTemp, double &dX, double &dY, double &dZ, double &tX, double &tY, double &tZ)
Compute the corresponding bounding volume parameters.
double fCenterBaseZ
"Z coordinate" of this Base Barycenter
G4VPhysicalVolume * DefineVolumes()
Molecule * GetNext()
information about molecule (not implemented)
double GetRadius()
Get the distance between the farther atom and nucleotide barycenter.
void OpenGeometry(G4VPhysicalVolume *vol=0)
void SetVisAttributes(const G4VisAttributes *pVA)
double fCenterSugarZ
"Z coordinate" of this Sugar Barycenter
unsigned short int fPdbFileStatus
Check if PDB file loaded.
void DrawNucleotidesWithBounding_()
double fCenterPhosphateY
"Y coordinate" of this Phosphate Barycenter
void AtomisticView(G4LogicalVolume *, Molecule *, double atomSizeFactor)
G4VPhysicalVolume * ConstructWorld()
static G4Colour Magenta()
static G4SolidStore * GetInstance()
void SetForceSolid(G4bool=true)
double fY
Y orthogonal coordinates in Angstroms.
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
void SetVisibility(G4bool=true)
static G4PhysicalVolumeStore * GetInstance()
unsigned short int fChosenOption
Option for the visualisation.
double fCenterPhosphateZ
"Z coordinate" of this Phosphate Barycenter
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
double fZ
Z orthogonal coordinates in Angstroms.
void BarycenterView(G4LogicalVolume *, Barycenter *)
Molecule * GetMoleculeList()
G4GLOB_DLL std::ostream G4cout
double fX
X orthogonal coordinates in Angstroms.
static constexpr double angstrom
Residue * GetNext()
Get the next residue.
Atom * GetFirst()
Get the first atom.
static constexpr double pi
DetectorMessenger * fpMessenger
static constexpr double mole
double fCenterY
"Y coordinate" of this nucelotide Barycenter
G4String fPdbFileName
PDB filename.
Barycenter * ComputeNucleotideBarycenters(Molecule *moleculeListTemp)
Compute nucleotide barycenter from memory.
Barycenter * GetBarycenterList()
Residue * GetFirst()
Get the first Residue.
HepRotation inverse() const
static G4LogicalVolumeStore * GetInstance()
double fCenterX
"X coordinate" of this nucelotide Barycenter
static G4NistManager * Instance()