Geant4  10.01.p03
G4DNAChemistryManager Class Reference

WARNING: THIS CLASS IS A PROTOTYPE G4DNAChemistryManager is called from the physics models. More...

#include <G4DNAChemistryManager.hh>

+ Inheritance diagram for G4DNAChemistryManager:
+ Collaboration diagram for G4DNAChemistryManager:

Public Member Functions

G4bool IsChemistryActivated ()
 
void SetChemistryActivation (G4bool)
 
virtual G4bool Notify (G4ApplicationState requestedState)
 
virtual void SetNewValue (G4UIcommand *, G4String)
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
void Initialize ()
 
void SetChemistryList (G4VUserChemistryList *)
 
void Deregister (G4VUserChemistryList *)
 
void ForceMasterReinitialization ()
 
void TagThreadForReinitialization ()
 
void Run ()
 
void Clear ()
 
void Gun (G4ITGun *, bool physicsTableToBuild=true)
 
void ForceThreadReinitialization ()
 
void ForceRebuildingPhysicsTable ()
 
void WriteInto (const G4String &, std::ios_base::openmode mode=std::ios_base::out)
 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. More...
 
void AddEmptyLineInOuputFile ()
 
void CloseFile ()
 Close the file specified with WriteInto. More...
 
void CreateWaterMolecule (ElectronicModification, G4int, const G4Track *)
 Method used by DNA physics model to create a water molecule. More...
 
void CreateSolvatedElectron (const G4Track *, G4ThreeVector *finalPosition=0)
 On the same idea as the previous method but for solvated electron. More...
 
void PushMolecule (G4Molecule *&molecule, double time, const G4ThreeVector &position, int parentID)
 WARNING : In case chemistry is not activated, PushMolecule will take care of deleting the transfered molecule. More...
 
void PushMoleculeAtParentTimeAndPlace (G4Molecule *&molecule, const G4Track *)
 WARNING : In case chemistry is not activated, PushMoleculeAtParentTimeAndPlace will take care of deleting the transfered molecule. More...
 
void SetVerbose (G4int verbose)
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
G4bool operator== (const G4UImessenger &messenger) const
 
G4bool CommandsShouldBeInMaster () const
 
- Public Member Functions inherited from G4VStateDependent
 G4VStateDependent (G4bool bottom=false)
 
virtual ~G4VStateDependent ()
 
G4int operator== (const G4VStateDependent &right) const
 
G4int operator!= (const G4VStateDependent &right) const
 

Static Public Member Functions

static G4DNAChemistryManagerInstance ()
 
static G4DNAChemistryManagerGetInstanceIfExists ()
 
static void DeleteInstance ()
 You should rather use DeleteInstance than the destructor of this class. More...
 
static G4bool IsActivated ()
 
static void Activated (G4bool flag=true)
 

Protected Member Functions

virtual ~G4DNAChemistryManager ()
 
G4DNAWaterExcitationStructureGetExcitationLevel ()
 
G4DNAWaterIonisationStructureGetIonisationLevel ()
 
void InitializeFile ()
 
void InitializeMaster ()
 
void InitializeThread ()
 
 G4DNAChemistryManager ()
 
- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (G4String s)
 
G4double StoD (G4String s)
 
G4bool StoB (G4String s)
 
void AddUIcommand (G4UIcommand *newCommand)
 
void CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 

Private Attributes

G4UIdirectoryfpChemDNADirectory
 
G4UIcmdWithABoolfpActivateChem
 
G4UIcmdWithoutParameterfpRunChem
 
bool fActiveChemistry
 
G4bool fFileInitialized
 
G4bool fWriteFile
 
G4bool fMasterInitialized
 
G4bool fForceThreadReinitialization
 
G4DNAWaterExcitationStructurefpExcitationLevel
 
G4DNAWaterIonisationStructurefpIonisationLevel
 
G4VUserChemistryListfpUserChemistryList
 
G4bool fBuildPhysicsTable
 
G4bool fPhysicsTableBuilt
 
G4bool fGeometryClosed
 
G4int fVerbose
 

Static Private Attributes

static G4DNAChemistryManagerfgInstance
 
static G4ThreadLocal
std::ofstream * 
fpgOutput_tl = 0
 
static G4ThreadLocal G4boolfpgThreadInitialized_tl = 0
 

Additional Inherited Members

- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 
G4bool commandsShouldBeInMaster
 

Detailed Description

WARNING: THIS CLASS IS A PROTOTYPE G4DNAChemistryManager is called from the physics models.

It creates the water molecules and the solvated electrons and and send them to G4ITStepManager to be treated in the chemistry stage. For this, the fActiveChemistry flag needs to be on. It is also possible to give already molecule's pointers already built. G4DNAChemistryManager will then be in charge of creating the track and loading it to the IT system. The user can also ask to create a file containing a information about the creation of water molecules and solvated electrons.

Definition at line 87 of file G4DNAChemistryManager.hh.

Constructor & Destructor Documentation

G4DNAChemistryManager::~G4DNAChemistryManager ( )
protectedvirtual

Definition at line 126 of file G4DNAChemistryManager.cc.

References Clear(), and fgInstance.

+ Here is the call graph for this function:

G4DNAChemistryManager::G4DNAChemistryManager ( )
protected

Definition at line 68 of file G4DNAChemistryManager.cc.

References fActiveChemistry, fBuildPhysicsTable, fFileInitialized, fForceThreadReinitialization, fGeometryClosed, fMasterInitialized, fpActivateChem, fpChemDNADirectory, fpExcitationLevel, fPhysicsTableBuilt, fpIonisationLevel, fpRunChem, fpUserChemistryList, fVerbose, and fWriteFile.

Referenced by Instance().

+ Here is the caller graph for this function:

Member Function Documentation

void G4DNAChemistryManager::Activated ( G4bool  flag = true)
static

Definition at line 446 of file G4DNAChemistryManager.cc.

References fActiveChemistry, and Instance().

Referenced by SetChemistryList(), and SetNewValue().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4DNAChemistryManager::AddEmptyLineInOuputFile ( )

Definition at line 476 of file G4DNAChemistryManager.cc.

References fpgOutput_tl, fWriteFile, and G4endl.

void G4DNAChemistryManager::Clear ( )

Definition at line 138 of file G4DNAChemistryManager.cc.

References G4MoleculeCounter::DeleteInstance(), G4DNAMolecularReactionTable::DeleteInstance(), G4MolecularConfiguration::DeleteManager(), fpActivateChem, fpChemDNADirectory, fpExcitationLevel, fpIonisationLevel, fpRunChem, fpUserChemistryList, and G4VUserChemistryList::IsPhysicsConstructor().

Referenced by Notify(), and ~G4DNAChemistryManager().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4DNAChemistryManager::CloseFile ( )

Close the file specified with WriteInto.

Definition at line 484 of file G4DNAChemistryManager.cc.

References fpgOutput_tl, fVerbose, G4cout, and G4endl.

Referenced by Run().

+ Here is the caller graph for this function:

void G4DNAChemistryManager::CreateSolvatedElectron ( const G4Track theIncomingTrack,
G4ThreeVector finalPosition = 0 
)

On the same idea as the previous method but for solvated electron.

This method should be used by the physics model of the ElectronSolvatation process.

Definition at line 584 of file G4DNAChemistryManager.cc.

References G4Molecule::BuildTrack(), G4Electron_aq::Definition(), eV, fActiveChemistry, fAlive, fFileInitialized, fpgOutput_tl, fWriteFile, G4endl, G4Track::GetKineticEnergy(), G4Track::GetPosition(), G4Track::GetTrackID(), InitializeFile(), G4VITTrackHolder::Instance(), nanometer, picosecond, and G4VITTrackHolder::Push().

Referenced by G4DNATransformElectronModel::SampleSecondaries(), and G4DNAOneStepSolvatationModel::SampleSecondaries().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4DNAChemistryManager::CreateWaterMolecule ( ElectronicModification  modification,
G4int  electronicLevel,
const G4Track theIncomingTrack 
)

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.

Definition at line 518 of file G4DNAChemistryManager.cc.

References G4Molecule::BuildTrack(), G4H2O::Definition(), eDissociativeAttachment, eExcitedMolecule, eIonizedMolecule, G4INCL::KinematicsUtils::energy(), eV, G4DNAWaterExcitationStructure::ExcitationEnergy(), fActiveChemistry, fFileInitialized, fpgOutput_tl, fStopButAlive, fWriteFile, G4endl, GetExcitationLevel(), GetIonisationLevel(), G4Track::GetPosition(), G4Track::GetTrackID(), InitializeFile(), G4VITTrackHolder::Instance(), G4DNAWaterIonisationStructure::IonisationEnergy(), left, nanometer, picosecond, G4VITTrackHolder::Push(), and right.

Referenced by G4DNABornExcitationModel::SampleSecondaries(), G4DNAMillerGreenExcitationModel::SampleSecondaries(), G4DNAMeltonAttachmentModel::SampleSecondaries(), G4DNARuddIonisationModel::SampleSecondaries(), G4DNARuddIonisationExtendedModel::SampleSecondaries(), and G4DNABornIonisationModel::SampleSecondaries().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4DNAChemistryManager::DeleteInstance ( )
static

You should rather use DeleteInstance than the destructor of this class.

Definition at line 190 of file G4DNAChemistryManager.cc.

References chemManExistence, fgInstance, G4cout, G4endl, and G4TemplateAutoLock< M, L, U >::unlock().

+ Here is the call graph for this function:

void G4DNAChemistryManager::Deregister ( G4VUserChemistryList chemistryList)
inline

Definition at line 248 of file G4DNAChemistryManager.hh.

References fpUserChemistryList.

Referenced by G4VUserChemistryList::~G4VUserChemistryList().

+ Here is the caller graph for this function:

void G4DNAChemistryManager::ForceMasterReinitialization ( )
inline

Definition at line 253 of file G4DNAChemistryManager.hh.

References fMasterInitialized, and InitializeMaster().

+ Here is the call graph for this function:

void G4DNAChemistryManager::ForceRebuildingPhysicsTable ( )
inline

Definition at line 237 of file G4DNAChemistryManager.hh.

References fPhysicsTableBuilt.

void G4DNAChemistryManager::ForceThreadReinitialization ( )
inline

Definition at line 259 of file G4DNAChemistryManager.hh.

References fForceThreadReinitialization.

G4String G4DNAChemistryManager::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

Definition at line 241 of file G4DNAChemistryManager.cc.

References G4UIcommand::ConvertToString(), fActiveChemistry, and fpActivateChem.

+ Here is the call graph for this function:

G4DNAWaterExcitationStructure * G4DNAChemistryManager::GetExcitationLevel ( )
protected

Definition at line 499 of file G4DNAChemistryManager.cc.

References fpExcitationLevel.

Referenced by CreateWaterMolecule().

+ Here is the caller graph for this function:

G4DNAChemistryManager * G4DNAChemistryManager::GetInstanceIfExists ( )
static

Definition at line 121 of file G4DNAChemistryManager.cc.

References fgInstance.

Referenced by G4VUserChemistryList::~G4VUserChemistryList().

+ Here is the caller graph for this function:

G4DNAWaterIonisationStructure * G4DNAChemistryManager::GetIonisationLevel ( )
protected

Definition at line 509 of file G4DNAChemistryManager.cc.

References fpIonisationLevel.

Referenced by CreateWaterMolecule().

+ Here is the caller graph for this function:

void G4DNAChemistryManager::Gun ( G4ITGun gun,
bool  physicsTableToBuild = true 
)

Definition at line 278 of file G4DNAChemistryManager.cc.

References fBuildPhysicsTable, G4Scheduler::Instance(), and G4Scheduler::SetGun().

+ Here is the call graph for this function:

void G4DNAChemistryManager::Initialize ( )

Definition at line 284 of file G4DNAChemistryManager.cc.

References InitializeMaster(), InitializeThread(), G4Threading::IsMultithreadedApplication(), and G4Threading::IsWorkerThread().

Referenced by G4EmDNAChemistry::ConstructProcess().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4DNAChemistryManager::InitializeFile ( )
protected

Definition at line 412 of file G4DNAChemistryManager.cc.

References fFileInitialized, fpgOutput_tl, fVerbose, fWriteFile, G4cout, G4endl, and left.

Referenced by CreateSolvatedElectron(), CreateWaterMolecule(), InitializeThread(), PushMolecule(), and PushMoleculeAtParentTimeAndPlace().

+ Here is the caller graph for this function:

void G4DNAChemistryManager::InitializeMaster ( )
protected

Definition at line 320 of file G4DNAChemistryManager.cc.

References G4VUserChemistryList::ConstructDissociationChannels(), G4VUserChemistryList::ConstructReactionTable(), fActiveChemistry, FatalException, fMasterInitialized, fpUserChemistryList, fVerbose, G4cout, G4endl, G4Exception(), G4DNAMolecularReactionTable::GetReactionTable(), and G4Scheduler::Instance().

Referenced by ForceMasterReinitialization(), and Initialize().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4DNAChemistryManager::InitializeThread ( )
protected

Definition at line 353 of file G4DNAChemistryManager.cc.

References G4VUserChemistryList::BuildPhysicsTable(), G4GeometryManager::CloseGeometry(), G4VUserChemistryList::ConstructTimeStepModel(), FatalException, fBuildPhysicsTable, fForceThreadReinitialization, fGeometryClosed, fpgThreadInitialized_tl, fPhysicsTableBuilt, fpUserChemistryList, fVerbose, G4cout, G4endl, G4Exception(), G4GeometryManager::GetInstance(), G4DNAMolecularReactionTable::GetReactionTable(), G4Scheduler::Initialize(), InitializeFile(), G4MoleculeCounter::InitializeInstance(), G4Scheduler::Instance(), and G4GeometryManager::OpenGeometry().

Referenced by Initialize(), and Run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4DNAChemistryManager * G4DNAChemistryManager::Instance ( void  )
static
G4bool G4DNAChemistryManager::IsActivated ( )
static

Definition at line 441 of file G4DNAChemistryManager.cc.

References fActiveChemistry, and Instance().

+ Here is the call graph for this function:

G4bool G4DNAChemistryManager::IsChemistryActivated ( )

Definition at line 451 of file G4DNAChemistryManager.cc.

References fActiveChemistry.

G4bool G4DNAChemistryManager::Notify ( G4ApplicationState  requestedState)
virtual

Implements G4VStateDependent.

Definition at line 210 of file G4DNAChemistryManager.cc.

References Clear(), fGeometryClosed, fVerbose, G4cout, G4endl, G4State_GeomClosed, and G4State_Quit.

+ Here is the call graph for this function:

void G4DNAChemistryManager::PushMolecule ( G4Molecule *&  molecule,
double  time,
const G4ThreeVector position,
int  parentID 
)

WARNING : In case chemistry is not activated, PushMolecule will take care of deleting the transfered molecule.

Before calling this method, it is also possible to check if the chemistry is activated through IsChemistryActived(). This method will create the track corresponding to the transfered molecule and will be in charge of loading the new track to the system.

Definition at line 631 of file G4DNAChemistryManager.cc.

References G4Molecule::BuildTrack(), fActiveChemistry, fAlive, fFileInitialized, fpgOutput_tl, fWriteFile, G4endl, G4Molecule::GetName(), InitializeFile(), G4VITTrackHolder::Instance(), nanometer, and G4VITTrackHolder::Push().

+ Here is the call graph for this function:

void G4DNAChemistryManager::PushMoleculeAtParentTimeAndPlace ( G4Molecule *&  molecule,
const G4Track theIncomingTrack 
)

WARNING : In case chemistry is not activated, PushMoleculeAtParentTimeAndPlace will take care of deleting the transfered molecule.

Before calling this method, it is also possible to check if the chemistry is activated through IsChemistryActived(). This method will create the track corresponding to the transfered molecule and will be in charge of loading the new track to the system.

Definition at line 663 of file G4DNAChemistryManager.cc.

References G4Molecule::BuildTrack(), eV, fActiveChemistry, fAlive, fFileInitialized, fpgOutput_tl, fWriteFile, G4endl, G4Track::GetGlobalTime(), G4Track::GetKineticEnergy(), G4Molecule::GetName(), G4Track::GetPosition(), G4Track::GetTrackID(), InitializeFile(), G4VITTrackHolder::Instance(), nanometer, and G4VITTrackHolder::Push().

+ Here is the call graph for this function:

void G4DNAChemistryManager::Run ( )

Definition at line 251 of file G4DNAChemistryManager.cc.

References CloseFile(), fActiveChemistry, FatalException, fMasterInitialized, fpgThreadInitialized_tl, G4Exception(), InitializeThread(), G4Scheduler::Instance(), and G4Scheduler::Process().

Referenced by StackingAction::NewStage(), and SetNewValue().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4DNAChemistryManager::SetChemistryActivation ( G4bool  flag)

Definition at line 456 of file G4DNAChemistryManager.cc.

References fActiveChemistry.

void G4DNAChemistryManager::SetChemistryList ( G4VUserChemistryList chemistryList)
inline

Definition at line 242 of file G4DNAChemistryManager.hh.

References Activated(), and fpUserChemistryList.

Referenced by G4EmDNAChemistry::G4EmDNAChemistry().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4DNAChemistryManager::SetNewValue ( G4UIcommand command,
G4String  value 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 229 of file G4DNAChemistryManager.cc.

References Activated(), fpActivateChem, fpRunChem, G4UIcmdWithABool::GetNewBoolValue(), and Run().

+ Here is the call graph for this function:

void G4DNAChemistryManager::SetVerbose ( G4int  verbose)
inline

Definition at line 196 of file G4DNAChemistryManager.hh.

References fVerbose.

void G4DNAChemistryManager::TagThreadForReinitialization ( )
inline

Definition at line 265 of file G4DNAChemistryManager.hh.

References fpgThreadInitialized_tl.

void G4DNAChemistryManager::WriteInto ( const G4String ,
std::ios_base::openmode  mode = std::ios_base::out 
)

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.

Definition at line 461 of file G4DNAChemistryManager.cc.

References G4String::data(), fFileInitialized, fpgOutput_tl, fVerbose, fWriteFile, G4cout, and G4endl.

+ Here is the call graph for this function:

Member Data Documentation

G4bool G4DNAChemistryManager::fBuildPhysicsTable
private

Definition at line 229 of file G4DNAChemistryManager.hh.

Referenced by G4DNAChemistryManager(), Gun(), and InitializeThread().

G4bool G4DNAChemistryManager::fForceThreadReinitialization
private
G4bool G4DNAChemistryManager::fGeometryClosed
private

Definition at line 232 of file G4DNAChemistryManager.hh.

Referenced by G4DNAChemistryManager(), InitializeThread(), and Notify().

G4DNAChemistryManager * G4DNAChemistryManager::fgInstance
staticprivate
G4bool G4DNAChemistryManager::fMasterInitialized
private
G4UIcmdWithABool* G4DNAChemistryManager::fpActivateChem
private
G4UIdirectory* G4DNAChemistryManager::fpChemDNADirectory
private

Definition at line 211 of file G4DNAChemistryManager.hh.

Referenced by Clear(), and G4DNAChemistryManager().

G4DNAWaterExcitationStructure* G4DNAChemistryManager::fpExcitationLevel
private

Definition at line 225 of file G4DNAChemistryManager.hh.

Referenced by Clear(), G4DNAChemistryManager(), and GetExcitationLevel().

G4ThreadLocal std::ofstream * G4DNAChemistryManager::fpgOutput_tl = 0
staticprivate
G4ThreadLocal G4bool * G4DNAChemistryManager::fpgThreadInitialized_tl = 0
staticprivate

Definition at line 221 of file G4DNAChemistryManager.hh.

Referenced by InitializeThread(), Run(), and TagThreadForReinitialization().

G4bool G4DNAChemistryManager::fPhysicsTableBuilt
private
G4DNAWaterIonisationStructure* G4DNAChemistryManager::fpIonisationLevel
private

Definition at line 226 of file G4DNAChemistryManager.hh.

Referenced by Clear(), G4DNAChemistryManager(), and GetIonisationLevel().

G4UIcmdWithoutParameter* G4DNAChemistryManager::fpRunChem
private

Definition at line 213 of file G4DNAChemistryManager.hh.

Referenced by Clear(), G4DNAChemistryManager(), and SetNewValue().

G4VUserChemistryList* G4DNAChemistryManager::fpUserChemistryList
private
G4int G4DNAChemistryManager::fVerbose
private

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