56 auto_ptr<G4DNAChemistryManager> G4DNAChemistryManager::fInstance ;
57 G4ThreadLocal std::ofstream* G4DNAChemistryManager::fOutput = 0;
61 fActiveChemistry(false)
70 if (fInstance.get() == 0)
73 if(fInstance.get() == 0)
79 return fInstance.get();
82 G4DNAChemistryManager::~G4DNAChemistryManager()
84 if(fIonisationLevel)
delete fIonisationLevel;
85 if(fExcitationLevel)
delete fExcitationLevel;
104 *fOutput << std::setprecision(6) << std::scientific;
105 *fOutput << setw(11) <<
left <<
"#Parent ID"
106 << setw(10) <<
"Molecule"
107 << setw(14) <<
"Elec Modif"
108 << setw(13) <<
"Energy (eV)"
109 << setw(22) <<
"X pos of parent [nm]"
110 << setw(22) <<
"Y pos of parent [nm]"
111 << setw(22) <<
"Z pos of parent [nm]"
112 << setw(14) <<
"X pos [nm]"
113 << setw(14) <<
"Y pos [nm]"
114 << setw(14) <<
"Z pos [nm]"
117 << setw(13) <<
"1)io/ex=0/1"
120 << setw(13) <<
"2)level=0...5"
125 ios_base::openmode mode)
127 fOutput =
new std::ofstream();
128 fOutput->open(output.
data(), mode);
134 if (fOutput->is_open())
144 if(!fExcitationLevel)
148 return fExcitationLevel;
153 if(!fIonisationLevel)
157 return fIonisationLevel;
161 G4int electronicLevel,
162 const G4Track* theIncomingTrack)
168 switch (modification)
183 <<
left << modification
185 <<
right <<electronicLevel
188 << std::setprecision(2) << std::fixed
189 << setw(13) << energy/
eV
190 << std::setprecision(6) << std::scientific
201 switch (modification)
204 H2O -> AddElectron(5,1);
207 H2O -> ExciteMolecule(electronicLevel);
210 H2O -> IonizeMolecule(electronicLevel);
217 H2OTrack -> SetParentID(theIncomingTrack->
GetTrackID());
219 H2OTrack -> SetKineticEnergy(0.);
231 *fOutput << setw(11)<< theIncomingTrack->
GetTrackID()
234 << std::setprecision(2) << std::fixed
236 << std::setprecision(6) << std::scientific
241 if(finalPosition != 0)
243 *fOutput<< setw(14)<< (finalPosition->
x())/
nanometer
245 << setw(14)<< (finalPosition->
z())/
nanometer ;
263 e_aqTrack -> SetTrackStatus(
fAlive);
264 e_aqTrack -> SetParentID(theIncomingTrack->
GetTrackID());
276 *fOutput << setw(11)<< parentID
277 << setw(10)<< molecule->
GetName()
279 << std::setprecision(2) << std::fixed
281 << std::setprecision(6) << std::scientific
291 track -> SetTrackStatus(
fAlive);
292 track -> SetParentID(parentID);
304 const G4Track* theIncomingTrack)
308 *fOutput << setw(11)<< theIncomingTrack->
GetTrackID()
309 << setw(10)<< molecule->
GetName()
311 << std::setprecision(2) << std::fixed
313 << std::setprecision(6) << std::scientific
323 track -> SetTrackStatus(
fAlive);
324 track -> SetParentID(theIncomingTrack->
GetTrackID());
void WriteInto(const G4String &, std::ios_base::openmode mode=std::ios_base::out)
void PushMoleculeAtParentTimeAndPlace(G4Molecule *&molecule, const G4Track *)
static void DeleteInstance()
static G4Electron_aq * Definition()
G4double ExcitationEnergy(G4int level)
static G4H2O * Definition()
void CreateSolvatedElectron(const G4Track *, G4ThreeVector *finalPosition=0)
const G4ThreeVector & GetPosition() const
void AddEmptyLineInOuputFile()
G4DNAWaterExcitationStructure * GetExcitationLevel()
const G4String & GetName() const
G4double GetKineticEnergy() const
static G4ITManager< T > * Instance()
static void DeleteInstance()
void PushMolecule(G4Molecule *&molecule, double time, const G4ThreeVector &position, int parentID)
static void DeleteManager()
static void DeleteInstance()
G4double GetGlobalTime() const
G4double IonisationEnergy(G4int level)
G4Track * BuildTrack(G4double globalTime, const G4ThreeVector &Position)
const char * data() const
static G4DNAChemistryManager * Instance()
void CreateWaterMolecule(ElectronicModification, G4int, const G4Track *)
static G4ITTrackHolder * Instance()
virtual void PushTrack(G4Track *)
G4DNAWaterIonisationStructure * GetIonisationLevel()
static void DeleteInstance()