Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4PhysChemIO::G4Analysis Class Reference

#include <G4PhysChemIO.hh>

+ Inheritance diagram for G4PhysChemIO::G4Analysis:

Public Member Functions

 G4Analysis (G4VAnalysisManager *)
 
virtual ~G4Analysis ()
 
virtual void InitializeMaster ()
 
virtual void InitializeThread ()
 
virtual void InitializeFile ()
 
virtual void NewRun ()
 
virtual void NewEvent ()
 
virtual void CreateWaterMolecule (G4int electronicModif, G4int, G4double energy, const G4Track *)
 
virtual void CreateSolvatedElectron (const G4Track *, G4ThreeVector *finalPosition=0)
 
virtual void WriteInto (const G4String &, std::ios_base::openmode mode=std::ios_base::out)
 
virtual void AddEmptyLineInOutputFile ()
 
virtual void CloseFile ()
 
- Public Member Functions inherited from G4VPhysChemIO
 G4VPhysChemIO ()
 
virtual ~G4VPhysChemIO ()
 
virtual void InitializeMaster ()
 
virtual void InitializeThread ()
 
virtual void InitializeFile ()=0
 
virtual void NewRun ()=0
 
virtual void NewEvent ()=0
 
virtual void CreateWaterMolecule (G4int electronicModif, G4int, G4double energy, const G4Track *)=0
 
virtual void CreateSolvatedElectron (const G4Track *, G4ThreeVector *finalPosition=0)=0
 
virtual void WriteInto (const G4String &, std::ios_base::openmode mode=std::ios_base::out)=0
 
virtual void AddEmptyLineInOutputFile ()
 
virtual void CloseFile ()=0
 

Protected Attributes

G4VAnalysisManagerfpAnalysisManager
 
int fNtupleID
 
G4bool fFileInitialized
 

Detailed Description

Definition at line 101 of file G4PhysChemIO.hh.

Constructor & Destructor Documentation

◆ G4Analysis()

G4PhysChemIO::G4Analysis::G4Analysis ( G4VAnalysisManager analysisManager)

Definition at line 162 of file G4PhysChemIO.cc.

162 :
163fpAnalysisManager(analysisManager)
164{
165 fFileInitialized = false;
166 fNtupleID = -1;
167}
G4VAnalysisManager * fpAnalysisManager

◆ ~G4Analysis()

G4PhysChemIO::G4Analysis::~G4Analysis ( )
virtual

Definition at line 171 of file G4PhysChemIO.cc.

172{
174}

Member Function Documentation

◆ AddEmptyLineInOutputFile()

virtual void G4PhysChemIO::G4Analysis::AddEmptyLineInOutputFile ( )
inlinevirtual

Reimplemented from G4VPhysChemIO.

Definition at line 145 of file G4PhysChemIO.hh.

145{}

◆ CloseFile()

void G4PhysChemIO::G4Analysis::CloseFile ( )
virtual

Close the file specified with WriteInto

Implements G4VPhysChemIO.

Definition at line 218 of file G4PhysChemIO.cc.

219{
220// fpAnalysisManager->Write();
221// fpAnalysisManager->CloseFile();
222}

◆ CreateSolvatedElectron()

void G4PhysChemIO::G4Analysis::CreateSolvatedElectron ( const G4Track electronTrack,
G4ThreeVector finalPosition = 0 
)
virtual

Same idea as the previous method but for solvated electron. This method should be used by the physics model of the ElectronSolvatation process.

Implements G4VPhysChemIO.

Definition at line 264 of file G4PhysChemIO.cc.

266{
268
269 // parent ID
271 electronTrack->GetTrackID());
272
273 // molecule type
275
276 //----------------------------------------------------------------------------
277 // valid for H2O only
278
279 // electronic modif
280 fpAnalysisManager->FillNtupleIColumn(fNtupleID, 2, -1); // electronic modif
281 fpAnalysisManager->FillNtupleIColumn(fNtupleID, 3, -1); // electronic level
283 electronTrack->GetKineticEnergy() / eV);
284
285 //----------------------------------------------------------------------------
286 const G4ThreeVector& parentPos = electronTrack->GetPosition();
287 const double i_nm = 1./nanometer;
288
289 fpAnalysisManager->FillNtupleDColumn(fNtupleID,5, parentPos.x() *i_nm);
290 fpAnalysisManager->FillNtupleDColumn(fNtupleID,6, parentPos.y() *i_nm);
291 fpAnalysisManager->FillNtupleDColumn(fNtupleID,7, parentPos.z() *i_nm);
292
293 if (finalPosition != 0)
294 {
295 fpAnalysisManager->FillNtupleDColumn(fNtupleID,8, finalPosition->x()*i_nm);
296 fpAnalysisManager->FillNtupleDColumn(fNtupleID,9, finalPosition->y()*i_nm);
297 fpAnalysisManager->FillNtupleDColumn(fNtupleID,10, finalPosition->z()*i_nm);
298 }
299 else
300 {
301 fpAnalysisManager->FillNtupleDColumn(fNtupleID,8, parentPos.x() *i_nm);
302 fpAnalysisManager->FillNtupleDColumn(fNtupleID,9, parentPos.y() *i_nm);
303 fpAnalysisManager->FillNtupleDColumn(fNtupleID,10, parentPos.z() *i_nm);
304 }
305
307}
double z() const
double x() const
double y() const
virtual void InitializeFile()
G4int GetTrackID() const
const G4ThreeVector & GetPosition() const
G4double GetKineticEnergy() const
G4bool FillNtupleSColumn(G4int id, const G4String &value)
G4bool FillNtupleDColumn(G4int id, G4double value)
G4bool FillNtupleIColumn(G4int id, G4int value)

◆ CreateWaterMolecule()

void G4PhysChemIO::G4Analysis::CreateWaterMolecule ( G4int  electronicModif,
G4int  electronicLevel,
G4double  energy,
const G4Track theIncomingTrack 
)
virtual

Method used by DNA physics model to create a water molecule. The ElectronicModification is a flag telling wheter the molecule is ionized or excited, the electronic level is calculated by the model and the IncomingTrack is the track responsible for the creation of this molecule, for instance an electron.

Implements G4VPhysChemIO.

Definition at line 226 of file G4PhysChemIO.cc.

230{
232
233 // parent ID
235 theIncomingTrack->GetTrackID());
236
237 // molecule type
239
240 //----------------------------------------------------------------------------
241 // valid for H2O only
242
243 // electronic modif
245 // ionization = 0 / excitation = 1 / diss att = 2
246 fpAnalysisManager->FillNtupleIColumn(fNtupleID, 3, electronicLevel);
248
249 //----------------------------------------------------------------------------
250 const G4ThreeVector& parentPos = theIncomingTrack->GetPosition();
251
252 fpAnalysisManager->FillNtupleDColumn(fNtupleID,5,(parentPos.x())/nanometer);
253 fpAnalysisManager->FillNtupleDColumn(fNtupleID,6,(parentPos.y())/nanometer);
254 fpAnalysisManager->FillNtupleDColumn(fNtupleID,7,(parentPos.z())/nanometer);
255
256 fpAnalysisManager->FillNtupleDColumn(fNtupleID,8,(parentPos.x())/nanometer);
257 fpAnalysisManager->FillNtupleDColumn(fNtupleID,9,(parentPos.y())/nanometer);
258 fpAnalysisManager->FillNtupleDColumn(fNtupleID,10,(parentPos.z())/nanometer);
260}

◆ InitializeFile()

void G4PhysChemIO::G4Analysis::InitializeFile ( )
virtual

Implements G4VPhysChemIO.

Definition at line 178 of file G4PhysChemIO.cc.

179{
180 if (fFileInitialized) return;
181
182 fNtupleID = fpAnalysisManager->CreateNtuple("PhysChem","PhysChem");
185
186 //----------------------------------------------------------------------------
187 // valid for H2O only
189 // ionization = 0 / excitation = 1 / diss att = 2
191 // valid for ion and exc only
193 // valid for ion and exc only
194
195 //----------------------------------------------------------------------------
203
204 fFileInitialized = true;
205}
G4int CreateNtupleIColumn(const G4String &name)
G4int CreateNtupleDColumn(const G4String &name)
G4int CreateNtupleSColumn(const G4String &name)
G4int CreateNtuple(const G4String &name, const G4String &title)

Referenced by CreateSolvatedElectron(), and CreateWaterMolecule().

◆ InitializeMaster()

virtual void G4PhysChemIO::G4Analysis::InitializeMaster ( )
inlinevirtual

Reimplemented from G4VPhysChemIO.

Definition at line 107 of file G4PhysChemIO.hh.

107{}

◆ InitializeThread()

virtual void G4PhysChemIO::G4Analysis::InitializeThread ( )
inlinevirtual

Reimplemented from G4VPhysChemIO.

Definition at line 108 of file G4PhysChemIO.hh.

108{}

◆ NewEvent()

virtual void G4PhysChemIO::G4Analysis::NewEvent ( )
inlinevirtual

Implements G4VPhysChemIO.

Definition at line 112 of file G4PhysChemIO.hh.

112{}

◆ NewRun()

virtual void G4PhysChemIO::G4Analysis::NewRun ( )
inlinevirtual

Implements G4VPhysChemIO.

Definition at line 111 of file G4PhysChemIO.hh.

111{}

◆ WriteInto()

void G4PhysChemIO::G4Analysis::WriteInto ( const G4String ,
std::ios_base::openmode  mode = std::ios_base::out 
)
virtual

Tells the chemMan to write into a file the position and electronic state of the water molecule and the position thermalized or not of the solvated electron

Implements G4VPhysChemIO.

Definition at line 209 of file G4PhysChemIO.cc.

211{
213 fFileInitialized = false;
214}
G4bool OpenFile(const G4String &fileName="")

Member Data Documentation

◆ fFileInitialized

G4bool G4PhysChemIO::G4Analysis::fFileInitialized
protected

◆ fNtupleID

int G4PhysChemIO::G4Analysis::fNtupleID
protected

◆ fpAnalysisManager

G4VAnalysisManager* G4PhysChemIO::G4Analysis::fpAnalysisManager
protected

The documentation for this class was generated from the following files: