54 auto_ptr<G4DNAChemistryManager> G4DNAChemistryManager::fInstance(0);
56 G4DNAChemistryManager::G4DNAChemistryManager() :
57 fActiveChemistry(false)
67 return fInstance.get();
70 G4DNAChemistryManager::~G4DNAChemistryManager()
72 if (fOutput.is_open())
76 if(fIonisationLevel)
delete fIonisationLevel;
77 if(fExcitationLevel)
delete fExcitationLevel;
92 ios_base::openmode mode)
94 fOutput.open(output.
data(), mode);
95 fOutput << std::setprecision(6) << std::scientific;
97 fOutput << setw(11) <<
left <<
"#Parent ID"
98 << setw(10) <<
"Molecule"
99 << setw(14) <<
"Elec Modif"
100 << setw(13) <<
"Energy (eV)"
101 << setw(22) <<
"X pos of parent [nm]"
102 << setw(22) <<
"Y pos of parent [nm]"
103 << setw(22) <<
"Z pos of parent [nm]"
104 << setw(14) <<
"X pos [nm]"
105 << setw(14) <<
"Y pos [nm]"
106 << setw(14) <<
"Z pos [nm]"
109 << setw(13) <<
"1)io/ex=0/1"
112 << setw(13) <<
"2)level=0...5"
119 if (fOutput.is_open())
128 if(!fExcitationLevel)
132 return fExcitationLevel;
137 if(!fIonisationLevel)
141 return fIonisationLevel;
145 G4int electronicLevel,
146 const G4Track* theIncomingTrack)
152 switch (modification)
167 <<
left << modification
169 <<
right <<electronicLevel
172 << std::setprecision(2) << std::fixed
173 << setw(13) << energy/
eV
174 << std::setprecision(6) << std::scientific
185 switch (modification)
188 H2O -> AddElectron(5,1);
191 H2O -> ExciteMolecule(electronicLevel);
194 H2O -> IonizeMolecule(electronicLevel);
201 H2OTrack -> SetParentID(theIncomingTrack->
GetTrackID());
203 H2OTrack -> SetKineticEnergy(0.);
215 fOutput << setw(11)<< theIncomingTrack->
GetTrackID()
218 << std::setprecision(2) << std::fixed
220 << std::setprecision(6) << std::scientific
225 if(finalPosition != 0)
227 fOutput<< setw(14)<< (finalPosition->
x())/
nanometer
229 << setw(14)<< (finalPosition->
z())/
nanometer ;
247 e_aqTrack -> SetTrackStatus(
fAlive);
248 e_aqTrack -> SetParentID(theIncomingTrack->
GetTrackID());
260 fOutput << setw(11)<< parentID
261 << setw(10)<< molecule->
GetName()
263 << std::setprecision(2) << std::fixed
265 << std::setprecision(6) << std::scientific
275 track -> SetTrackStatus(
fAlive);
276 track -> SetParentID(parentID);
288 const G4Track* theIncomingTrack)
292 fOutput << setw(11)<< theIncomingTrack->
GetTrackID()
293 << setw(10)<< molecule->
GetName()
295 << std::setprecision(2) << std::fixed
297 << std::setprecision(6) << std::scientific
307 track -> SetTrackStatus(
fAlive);
308 track -> SetParentID(theIncomingTrack->
GetTrackID());