40 #include "DetectorConstruction.hh"
42 #include "DetectorMessenger.hh"
59 #ifdef G4MULTITHREADED
110 G4bool fromIsotopes =
false;
118 new G4Material(
"Galactic", z=1., a=1.01*
g/
mole,density= universe_mean_density,
129 G4cerr <<
"Cannot retrieve materials already defined. " <<
G4endl;
144 G4cerr <<
"Cannot retrieve materials already defined. " <<
G4endl;
154 worldSize/2, worldSize/2, worldSize/2);
186 unsigned short int option)
211 unsigned short int isDNA;
294 Molecule *moleculeListTemp,
double atomSizeFactor)
363 int nbAtomH=0, nbAtomC=0, nbAtomO=0, nbAtomN=0, nbAtomS=0, nbAtomP=0;
367 while (moleculeListTemp)
369 residueListTemp = moleculeListTemp->
GetFirst();
373 while (residueListTemp)
375 AtomTemp=residueListTemp->
GetFirst();
379 int upTo=residueListTemp->
fNbAtom;
380 for (
int i=0 ; i < (upTo + startFrom) ; i++)
383 if (AtomTemp->
fElement.compare(
"H") == 0)
388 AtomTemp->
fY*1*angstrom,
389 AtomTemp->
fZ*1*angstrom),
397 else if (AtomTemp->
fElement.compare(
"C") == 0)
402 AtomTemp->
fY*1*angstrom,
403 AtomTemp->
fZ*1*angstrom),
411 else if (AtomTemp->
fElement.compare(
"O") == 0)
416 AtomTemp->
fY*1*angstrom,
417 AtomTemp->
fZ*1*angstrom),
425 else if (AtomTemp->
fElement.compare(
"N") == 0)
430 AtomTemp->
fY*1*angstrom,
431 AtomTemp->
fZ*1*angstrom),
439 else if (AtomTemp->
fElement.compare(
"S") == 0)
444 AtomTemp->
fY*1*angstrom,
445 AtomTemp->
fZ*1*angstrom),
453 else if (AtomTemp->
fElement.compare(
"P") == 0)
458 AtomTemp->
fY*1*angstrom,
459 AtomTemp->
fZ*1*angstrom),
472 AtomTemp->
fY*1*angstrom,
473 AtomTemp->
fZ*1*angstrom),
487 residueListTemp=residueListTemp->
GetNext();
490 moleculeListTemp=moleculeListTemp->
GetNext();
493 G4cout <<
"**************** atomisticView(...) ****************" <<
G4endl;
501 G4cout <<
"Number of Phosphorus = " << nbAtomP <<
G4endl;
502 G4cout <<
"Number of undifined atoms =" << nbAtomX <<G4endl<<
G4endl;
521 while (barycenterListTemp)
542 barycenterListTemp=barycenterListTemp->
GetNext();
572 while (barycenterListTemp)
629 tubS1_ZZ =
new G4Tubs(
"Cylinder",
654 G4double llUll=std::sqrt(Ux*Ux+Uy*Uy+Uz*Uz);
661 G4double theta_euler = direction.theta();
662 G4double phi_euler = direction.phi();
682 tubS2_ZZ =
new G4Tubs(
"Cylinder2",
707 llUll=std::sqrt(Ux*Ux+Uy*Uy+Uz*Uz);
714 theta_euler = direction.theta();
715 phi_euler = direction.phi();
720 rotm1 = rotm1Inv.inverse();
737 barycenterListTemp=barycenterListTemp->
GetNext();
759 =
new G4Box(
"Bounding", dX*1*
angstrom, dY*1*angstrom, dZ*1*angstrom);
789 #ifdef G4MULTITHREADED
807 G4cout<<
"Build only world volume and bounding volume"
809 #ifdef G4MULTITHREADED
829 #ifdef G4MULTITHREADED
849 #ifdef G4MULTITHREADED
869 #ifdef G4MULTITHREADED
889 #ifdef G4MULTITHREADED
909 #ifdef G4MULTITHREADED
929 #ifdef G4MULTITHREADED
double fCenterBaseX
"X coordinate" of this Base Barycenter
double fCenterPhosphateZ
"Z coordinate" of this Phosphate Barycenter
G4Material * fpDefaultMaterial
void DrawResiduesWithBounding_()
double fCenterPhosphateX
"X coordinate" of this Phosphate Barycenter
double fCenterPhosphateY
"Y coordinate" of this Phosphate Barycenter
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
void ConstructMaterials()
double fCenterY
"Y coordinate" of this nucelotide Barycenter
CLHEP::Hep3Vector G4ThreeVector
CLHEP::HepRotation G4RotationMatrix
double fCenterX
"X coordinate" of this nucelotide Barycenter
double fCenterSugarX
"X coordinate" of this Sugar Barycenter
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
int fNbAtom
Number of atoms into a residue (usage before vector)
Barycenter * ComputeNucleotideBarycenters(Molecule *moleculeListTemp)
Compute nucleotide barycenter from memory.
G4VPhysicalVolume * Construct()
void SetVisibility(G4bool)
Residue * GetFirst()
Get the first Residue.
Residue * GetNext()
Get the next residue.
static G4Colour Magenta()
double fZ
Z orthogonal coordinates in Angstroms.
double fCenterSugarY
"Y coordinate" of this Sugar Barycenter
void SetForceSolid(G4bool)
static G4NistManager * Instance()
void BarycenterView(G4LogicalVolume *, Barycenter *)
double fCenterBaseZ
"Z coordinate" of this Base Barycenter
Barycenter * GetBarycenterList()
virtual void DefineWorldVolume(G4VPhysicalVolume *worldVol, G4bool topologyIsChanged=true)
static G4PhysicalVolumeStore * GetInstance()
Molecule * GetMoleculeList()
DetectorMessenger * fpMessenger
G4GLOB_DLL std::ostream G4cout
unsigned short int fPdbFileStatus
Check if PDB file loaded.
string fElement
Element symbol extracted from 'atom name'.
void ComputeNbNucleotidsPerStrand(Molecule *moleculeListTemp)
Compute number of nucleotide per strand.
double fCenterSugarZ
"Z coordinate" of this Sugar Barycenter
void DrawNucleotidesWithBounding_()
void BuildBoundingVolume()
void AtomisticView(G4LogicalVolume *, Molecule *, double atomSizeFactor)
static G4LogicalVolumeStore * GetInstance()
static G4SolidStore * GetInstance()
Molecule * GetNext()
information about molecule (not implemented)
static G4GeometryManager * GetInstance()
void DrawAtomsWithBounding_()
Molecule * fpMoleculeList
unsigned short int fChosenOption
Option for the visualisation.
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
double GetRadius()
Get the distance between the farther atom and nucleotide barycenter.
static const double kelvin
Barycenter * GetNext()
Get the next Barycenter.
G4String fPdbFileName
PDB filename.
static G4RunManager * GetRunManager()
Molecule * Load(const string &filename, unsigned short int &isDNA, unsigned short int verbose)
Load PDB file into memory.
G4LogicalVolume * GetLogicalVolume() const
G4Material * fpWaterMaterial
G4VPhysicalVolume * DefineVolumes(G4String filename, unsigned short int option)
Atom * GetFirst()
Get the first atom.
void ComputeBoundingVolumeParams(Molecule *moleculeListTemp, double &dX, double &dY, double &dZ, double &tX, double &tY, double &tZ)
Compute the corresponding bounding volume parameters.
double fX
X orthogonal coordinates in Angstroms.
void DrawBoundingVolume(G4LogicalVolume *, Molecule *)
void LoadPDBfile(G4String fileName)
double fCenterBaseY
"Y coordinate" of this Base Barycenter
Barycenter * fpBarycenterList
Atom * GetNext()
Returns the next Atom.
double fY
Y orthogonal coordinates in Angstroms.
void OpenGeometry(G4VPhysicalVolume *vol=0)
double fCenterZ
"Z coordinate" of this nucelotide Barycenter
G4VPhysicalVolume * ConstructWorld()
Messenger class that defines commands for DetectorConstruction.
void SetVisAttributes(const G4VisAttributes *pVA)
G4GLOB_DLL std::ostream G4cerr
static const double angstrom
void ResiduesView(G4LogicalVolume *, Barycenter *)