54auto_ptr<G4DNAChemistryManager> G4DNAChemistryManager::fInstance(0);
56G4DNAChemistryManager::G4DNAChemistryManager() :
57 fActiveChemistry(false)
67 return fInstance.get();
70G4DNAChemistryManager::~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)
165 fOutput << setw(11) << left << theIncomingTrack->
GetTrackID()
167 << left << modification
169 << right <<electronicLevel
172 << std::setprecision(2) << std::fixed
173 << setw(13) << energy/eV
174 << std::setprecision(6) << std::scientific
175 << setw(22) << (theIncomingTrack->
GetPosition().
x())/nanometer
176 << setw(22) << (theIncomingTrack->
GetPosition().
y())/nanometer
177 << setw(22) << (theIncomingTrack->
GetPosition().
z())/nanometer
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
221 << setw(22)<< (theIncomingTrack->
GetPosition().
x())/nanometer
222 << setw(22)<< (theIncomingTrack->
GetPosition().
y())/nanometer
223 << setw(22)<< (theIncomingTrack->
GetPosition().
z())/nanometer ;
225 if(finalPosition != 0)
227 fOutput<< setw(14)<< (finalPosition->
x())/nanometer
228 << setw(14)<< (finalPosition->
y())/nanometer
229 << setw(14)<< (finalPosition->
z())/nanometer ;
241 e_aqTrack = e_aq->
BuildTrack(picosecond,*finalPosition);
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
266 << setw(22)<< (
position.x())/nanometer
267 << setw(22)<< (
position.y())/nanometer
268 << setw(22)<< (
position.z())/nanometer;
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
298 << setw(22)<< (theIncomingTrack->
GetPosition().
x())/nanometer
299 << setw(22)<< (theIncomingTrack->
GetPosition().
y())/nanometer
300 << setw(22)<< (theIncomingTrack->
GetPosition().
z())/nanometer ;
307 track -> SetTrackStatus(
fAlive);
308 track -> SetParentID(theIncomingTrack->
GetTrackID());
@ eDissociativeAttachment
friend class std::auto_ptr< G4DNAChemistryManager >
void PushMolecule(G4Molecule *&molecule, double time, const G4ThreeVector &position, int parentID)
static G4DNAChemistryManager * Instance()
void CreateSolvatedElectron(const G4Track *, G4ThreeVector *finalPosition=0)
G4DNAWaterIonisationStructure * GetIonisationLevel()
G4DNAWaterExcitationStructure * GetExcitationLevel()
void PushMoleculeAtParentTimeAndPlace(G4Molecule *&molecule, const G4Track *)
static void DeleteInstance()
void WriteInto(const G4String &, std::ios_base::openmode mode=std::ios_base::out)
void CreateWaterMolecule(ElectronicModification, G4int, const G4Track *)
static void DeleteInstance()
G4double ExcitationEnergy(G4int level)
G4double IonisationEnergy(G4int level)
static G4Electron_aq * Definition()
static G4H2O * Definition()
static G4ITManager< T > * Instance()
virtual void PushTrack(G4Track *)
static G4ITTrackHolder * Instance()
static void DeleteManager()
static void DeleteInstance()
static void DeleteInstance()
const G4String & GetName() const
G4Track * BuildTrack(G4double globalTime, const G4ThreeVector &Position)
const char * data() const
const G4ThreeVector & GetPosition() const
G4double GetGlobalTime() const
G4double GetKineticEnergy() const