Import Geant4 10.1.0 source tree
This commit is contained in:
@@ -23,18 +23,27 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DNAChemistryManager.hh 75583 2013-11-04 12:16:46Z gcosmo $
|
||||
// $Id: G4DNAChemistryManager.hh 87375 2014-12-02 08:17:28Z gcosmo $
|
||||
//
|
||||
// Author: Mathieu Karamitros (kara@cenbg.in2p3.fr)
|
||||
|
||||
// Author: Mathieu Karamitros, kara@cenbg.in2p3.fr
|
||||
//
|
||||
// WARNING : This class is released as a prototype.
|
||||
// It might strongly evolve or even disapear in the next releases.
|
||||
// The code is developed in the framework of the ESA AO7146
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 10 Oct 2011 M.Karamitros created
|
||||
// We would be very happy hearing from you, send us your feedback! :)
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// In order for Geant4-DNA to be maintained and still open-source,
|
||||
// article citations are crucial.
|
||||
// If you use Geant4-DNA chemistry and you publish papers about your software,
|
||||
// in addition to the general paper on Geant4-DNA:
|
||||
//
|
||||
// Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178
|
||||
//
|
||||
// we would be very happy if you could please also cite the following
|
||||
// reference papers on chemistry:
|
||||
//
|
||||
// J. Comput. Phys. 274 (2014) 841-882
|
||||
// Prog. Nucl. Sci. Tec. 2 (2011) 503-508
|
||||
|
||||
#ifndef G4DNACHEMISTRYMANAGER_HH
|
||||
#define G4DNACHEMISTRYMANAGER_HH
|
||||
@@ -43,127 +52,218 @@
|
||||
#include "G4ThreeVector.hh"
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
#include "G4UImessenger.hh"
|
||||
#include "G4VStateDependent.hh"
|
||||
|
||||
class G4Track;
|
||||
class G4DNAWaterExcitationStructure;
|
||||
class G4DNAWaterIonisationStructure;
|
||||
class G4Molecule;
|
||||
class G4VUserChemistryList;
|
||||
class G4UIcmdWithABool;
|
||||
class G4UIcmdWithoutParameter;
|
||||
class G4ITGun;
|
||||
|
||||
enum ElectronicModification
|
||||
{
|
||||
eIonizedMolecule,
|
||||
eExcitedMolecule,
|
||||
eDissociativeAttachment
|
||||
eIonizedMolecule,
|
||||
eExcitedMolecule,
|
||||
eDissociativeAttachment
|
||||
};
|
||||
|
||||
/**
|
||||
* G4DNAChemistryManager is called from the physics models.
|
||||
* It creates the water molecules and the solvated electrons and
|
||||
* and send them to synchronous step manager 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.
|
||||
*/
|
||||
* 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.
|
||||
*/
|
||||
|
||||
class G4DNAChemistryManager
|
||||
class G4DNAChemistryManager : public G4UImessenger, public G4VStateDependent
|
||||
{
|
||||
friend class std::auto_ptr<G4DNAChemistryManager>;
|
||||
~G4DNAChemistryManager();
|
||||
protected:
|
||||
virtual ~G4DNAChemistryManager();
|
||||
|
||||
public:
|
||||
static G4DNAChemistryManager* Instance();
|
||||
//============================================================================
|
||||
// STATIC METHODS
|
||||
//============================================================================
|
||||
static G4DNAChemistryManager* Instance();
|
||||
static G4DNAChemistryManager* GetInstanceIfExists();
|
||||
|
||||
/**
|
||||
* You should rather use DeleteInstance than the destructor of this class
|
||||
*/
|
||||
static void DeleteInstance();
|
||||
/**
|
||||
* You should rather use DeleteInstance than the destructor of this class
|
||||
*/
|
||||
static void DeleteInstance();
|
||||
G4bool IsChemistryActivated();
|
||||
void SetChemistryActivation(G4bool);
|
||||
static G4bool IsActivated();
|
||||
static void Activated(G4bool flag = true);
|
||||
|
||||
//============================================================================
|
||||
// VIRTUAL METHODS
|
||||
//============================================================================
|
||||
virtual G4bool Notify(G4ApplicationState requestedState);
|
||||
virtual void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
//============================================================================
|
||||
// INITIALIZATION AND FINALIZATION METHODS
|
||||
//============================================================================
|
||||
void Initialize();
|
||||
inline void SetChemistryList(G4VUserChemistryList*);
|
||||
inline void Deregister(G4VUserChemistryList*);
|
||||
|
||||
inline void ForceMasterReinitialization();
|
||||
inline void TagThreadForReinitialization();
|
||||
|
||||
void Run();
|
||||
void Clear();
|
||||
void Gun(G4ITGun*, bool physicsTableToBuild = true);
|
||||
inline void ForceThreadReinitialization();
|
||||
inline void ForceRebuildingPhysicsTable();
|
||||
|
||||
//============================================================================
|
||||
// FILE OPERATIONS
|
||||
//============================================================================
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
void WriteInto(const G4String&, std::ios_base::openmode mode =
|
||||
std::ios_base::out);
|
||||
void AddEmptyLineInOuputFile();
|
||||
|
||||
/**
|
||||
* Close the file specified with WriteInto
|
||||
*/
|
||||
void CloseFile();
|
||||
|
||||
//============================================================================
|
||||
// PUSH MOLECULES
|
||||
//============================================================================
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
void CreateWaterMolecule(ElectronicModification,
|
||||
G4int /*electronicLevel*/,
|
||||
const G4Track* /*theIncomingTrack*/);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
void CreateSolvatedElectron(const G4Track* /*theIncomingTrack*/,
|
||||
G4ThreeVector* finalPosition = 0);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
void PushMolecule(G4Molecule*& molecule,
|
||||
double time,
|
||||
const G4ThreeVector& position,
|
||||
int parentID);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
void PushMoleculeAtParentTimeAndPlace(G4Molecule*& molecule,
|
||||
const G4Track* /*theIncomingTrack*/);
|
||||
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
void WriteInto(const G4String&, std::ios_base::openmode mode = std::ios_base::out);
|
||||
inline void SetVerbose(G4int verbose)
|
||||
{
|
||||
fVerbose = verbose;
|
||||
}
|
||||
|
||||
/** Close the file specified with WriteInto
|
||||
*/
|
||||
void CloseFile();
|
||||
inline G4bool IsChemistryActived();
|
||||
inline void SetChemistryActivation(G4bool);
|
||||
protected:
|
||||
G4DNAWaterExcitationStructure* GetExcitationLevel();
|
||||
G4DNAWaterIonisationStructure* GetIonisationLevel();
|
||||
void InitializeFile();
|
||||
void InitializeMaster();
|
||||
void InitializeThread();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
void CreateWaterMolecule(ElectronicModification,
|
||||
G4int /*electronicLevel*/,
|
||||
const G4Track* /*theIncomingTrack*/);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
void CreateSolvatedElectron(const G4Track* /*theIncomingTrack*/,
|
||||
G4ThreeVector* finalPosition = 0);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
void PushMolecule(G4Molecule*& molecule,
|
||||
double time, const G4ThreeVector& position, int parentID);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
void PushMoleculeAtParentTimeAndPlace(G4Molecule*& molecule,
|
||||
const G4Track* /*theIncomingTrack*/);
|
||||
|
||||
|
||||
void AddEmptyLineInOuputFile();
|
||||
|
||||
protected :
|
||||
G4DNAWaterExcitationStructure* GetExcitationLevel();
|
||||
G4DNAWaterIonisationStructure* GetIonisationLevel();
|
||||
void InitializeFile();
|
||||
G4DNAChemistryManager();
|
||||
G4DNAChemistryManager();
|
||||
|
||||
private:
|
||||
static std::auto_ptr<G4DNAChemistryManager> fInstance;
|
||||
bool fActiveChemistry;
|
||||
G4bool fWriteFile;
|
||||
static G4ThreadLocal std::ofstream* fOutput;
|
||||
G4UIdirectory* fpChemDNADirectory;
|
||||
G4UIcmdWithABool* fpActivateChem;
|
||||
G4UIcmdWithoutParameter* fpRunChem;
|
||||
|
||||
G4DNAWaterExcitationStructure* fExcitationLevel;
|
||||
G4DNAWaterIonisationStructure* fIonisationLevel;
|
||||
static G4DNAChemistryManager* fgInstance;
|
||||
// static bool fActiveChemistry;
|
||||
bool fActiveChemistry;
|
||||
G4bool fFileInitialized;
|
||||
G4bool fWriteFile;
|
||||
static G4ThreadLocal std::ofstream* fpgOutput_tl;
|
||||
static G4ThreadLocal G4bool* fpgThreadInitialized_tl;
|
||||
G4bool fMasterInitialized;
|
||||
G4bool fForceThreadReinitialization;
|
||||
|
||||
G4DNAWaterExcitationStructure* fpExcitationLevel;
|
||||
G4DNAWaterIonisationStructure* fpIonisationLevel;
|
||||
|
||||
G4VUserChemistryList* fpUserChemistryList;
|
||||
G4bool fBuildPhysicsTable;
|
||||
G4bool fPhysicsTableBuilt;
|
||||
|
||||
G4bool fGeometryClosed;
|
||||
|
||||
G4int fVerbose;
|
||||
};
|
||||
|
||||
inline G4bool G4DNAChemistryManager::IsChemistryActived()
|
||||
inline void G4DNAChemistryManager::ForceRebuildingPhysicsTable()
|
||||
{
|
||||
return fActiveChemistry;
|
||||
fPhysicsTableBuilt = false;
|
||||
}
|
||||
|
||||
inline void G4DNAChemistryManager::SetChemistryActivation(G4bool flag)
|
||||
inline void G4DNAChemistryManager::SetChemistryList(G4VUserChemistryList* chemistryList)
|
||||
{
|
||||
fActiveChemistry = flag;
|
||||
fpUserChemistryList = chemistryList;
|
||||
Activated();
|
||||
}
|
||||
|
||||
inline void G4DNAChemistryManager::Deregister(G4VUserChemistryList* chemistryList)
|
||||
{
|
||||
if (fpUserChemistryList == chemistryList) fpUserChemistryList = 0;
|
||||
}
|
||||
|
||||
inline void G4DNAChemistryManager::ForceMasterReinitialization()
|
||||
{
|
||||
fMasterInitialized = false;
|
||||
InitializeMaster();
|
||||
}
|
||||
|
||||
inline void G4DNAChemistryManager::ForceThreadReinitialization()
|
||||
{
|
||||
// TODO
|
||||
fForceThreadReinitialization = true;
|
||||
}
|
||||
|
||||
inline void G4DNAChemistryManager::TagThreadForReinitialization()
|
||||
{
|
||||
if (fpgThreadInitialized_tl) delete fpgThreadInitialized_tl;
|
||||
}
|
||||
|
||||
#endif // G4DNACHEMISTRYMANAGER_HH
|
||||
|
||||
@@ -23,8 +23,27 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DNADamages.hh 66872 2013-01-15 01:25:57Z japost $
|
||||
// $Id: G4DNADamages.hh 85244 2014-10-27 08:24:13Z gcosmo $
|
||||
//
|
||||
// Author: Mathieu Karamitros, kara@cenbg.in2p3.fr
|
||||
|
||||
// The code is developed in the framework of the ESA AO7146
|
||||
//
|
||||
// We would be very happy hearing from you, send us your feedback! :)
|
||||
//
|
||||
// In order for Geant4-DNA to be maintained and still open-source,
|
||||
// article citations are crucial.
|
||||
// If you use Geant4-DNA chemistry and you publish papers about your software,
|
||||
// in addition to the general paper on Geant4-DNA:
|
||||
//
|
||||
// Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178
|
||||
//
|
||||
// we would be very happy if you could please also cite the following
|
||||
// reference papers on chemistry:
|
||||
//
|
||||
// J. Comput. Phys. 274 (2014) 841-882
|
||||
// Prog. Nucl. Sci. Tec. 2 (2011) 503-508
|
||||
|
||||
#ifndef G4DNADAMAGES_HH
|
||||
#define G4DNADAMAGES_HH 1
|
||||
|
||||
|
||||
@@ -23,8 +23,27 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DNAMolecularMaterial.hh 70171 2013-05-24 13:34:18Z gcosmo $
|
||||
// $Id: G4DNAMolecularMaterial.hh 85244 2014-10-27 08:24:13Z gcosmo $
|
||||
//
|
||||
// Author: Mathieu Karamitros, kara@cenbg.in2p3.fr
|
||||
|
||||
// The code is developed in the framework of the ESA AO7146
|
||||
//
|
||||
// We would be very happy hearing from you, send us your feedback! :)
|
||||
//
|
||||
// In order for Geant4-DNA to be maintained and still open-source,
|
||||
// article citations are crucial.
|
||||
// If you use Geant4-DNA chemistry and you publish papers about your software,
|
||||
// in addition to the general paper on Geant4-DNA:
|
||||
//
|
||||
// Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178
|
||||
//
|
||||
// we would be very happy if you could please also cite the following
|
||||
// reference papers on chemistry:
|
||||
//
|
||||
// J. Comput. Phys. 274 (2014) 841-882
|
||||
// Prog. Nucl. Sci. Tec. 2 (2011) 503-508
|
||||
|
||||
#ifndef G4DNAMolecularMaterial_HH
|
||||
#define G4DNAMolecularMaterial_HH
|
||||
|
||||
@@ -38,66 +57,77 @@ class G4Material;
|
||||
|
||||
struct CompareMaterial
|
||||
{
|
||||
// If the materials derives from a base material,
|
||||
// it should be able to find the derived material using the base material.
|
||||
bool operator() (const G4Material* mat1, const G4Material* mat2) const;
|
||||
// If the materials derives from a base material,
|
||||
// it should be able to find the derived material using the base material.
|
||||
bool operator()(const G4Material* mat1, const G4Material* mat2) const;
|
||||
};
|
||||
|
||||
typedef std::map<const G4Material*, double,CompareMaterial> ComponentMap;
|
||||
typedef std::map<const G4Material*, double, CompareMaterial> ComponentMap;
|
||||
|
||||
// G4DNAMolecularMaterial is initialized when G4ApplicationState == G4State_Idle
|
||||
|
||||
class G4DNAMolecularMaterial : public G4VStateDependent
|
||||
{
|
||||
public:
|
||||
static G4DNAMolecularMaterial* Instance();
|
||||
void DeleteInstance();
|
||||
void Initialize();
|
||||
static G4DNAMolecularMaterial* Instance();
|
||||
static void DeleteInstance();
|
||||
void Initialize();
|
||||
void Clear();
|
||||
|
||||
virtual G4bool Notify(G4ApplicationState requestedState) ;
|
||||
virtual G4bool Notify(G4ApplicationState requestedState);
|
||||
|
||||
inline const std::vector<ComponentMap>* GetMassFractionTable() const;
|
||||
inline const std::vector<ComponentMap>* GetDensityTable() const;
|
||||
inline const std::vector<ComponentMap>* GetMassFractionTable() const;
|
||||
inline const std::vector<ComponentMap>* GetDensityTable() const;
|
||||
// const std::vector<double>* GetMassFractionTableFor(const G4Material*) const;
|
||||
const std::vector<double>* GetDensityTableFor(const G4Material*) const;
|
||||
const std::vector<double>* GetNumMolPerVolTableFor(const G4Material*) const;
|
||||
const std::vector<double>* GetDensityTableFor(const G4Material*) const;
|
||||
const std::vector<double>* GetNumMolPerVolTableFor(const G4Material*) const;
|
||||
|
||||
protected :
|
||||
static G4DNAMolecularMaterial* fInstance;
|
||||
protected:
|
||||
static G4DNAMolecularMaterial* fInstance;
|
||||
// static G4ThreadLocal G4DNAMolecularMaterial* fInstance;
|
||||
G4DNAMolecularMaterial();
|
||||
G4DNAMolecularMaterial(const G4DNAMolecularMaterial& right);
|
||||
G4DNAMolecularMaterial& operator=(const G4DNAMolecularMaterial&);
|
||||
virtual ~G4DNAMolecularMaterial();
|
||||
void Create();
|
||||
void InitializeNumMolPerVol();
|
||||
void InitializeDensity();
|
||||
void RecordMolecularMaterial(G4Material* parentMaterial, G4Material* molecularMaterial, G4double fraction);
|
||||
void SearchMolecularMaterial(G4Material* parentMaterial, G4Material* material, double currentFraction);
|
||||
G4DNAMolecularMaterial();
|
||||
G4DNAMolecularMaterial(const G4DNAMolecularMaterial& right);
|
||||
G4DNAMolecularMaterial& operator=(const G4DNAMolecularMaterial&);
|
||||
virtual ~G4DNAMolecularMaterial();
|
||||
void Create();
|
||||
void InitializeNumMolPerVol();
|
||||
void InitializeDensity();
|
||||
void RecordMolecularMaterial(G4Material* parentMaterial,
|
||||
G4Material* molecularMaterial,
|
||||
G4double fraction);
|
||||
void SearchMolecularMaterial(G4Material* parentMaterial,
|
||||
G4Material* material,
|
||||
double currentFraction);
|
||||
|
||||
void AddMaterial(const G4Material*, double fraction);
|
||||
void AddMaterial(const G4Material*, double fraction);
|
||||
|
||||
void PrintNotAMolecularMaterial(const char* methodName, const G4Material* lookForMaterial) const;
|
||||
void PrintNotAMolecularMaterial(const char* methodName,
|
||||
const G4Material* lookForMaterial) const;
|
||||
|
||||
std::vector<ComponentMap>* fpCompFractionTable;
|
||||
std::vector<ComponentMap>* fpCompDensityTable;
|
||||
std::vector<ComponentMap>* fpCompNumMolPerVolTable;
|
||||
std::vector<ComponentMap>* fpCompFractionTable;
|
||||
std::vector<ComponentMap>* fpCompDensityTable;
|
||||
std::vector<ComponentMap>* fpCompNumMolPerVolTable;
|
||||
|
||||
mutable std::map<const G4Material*,std::vector<double>*,CompareMaterial> fAskedDensityTable;
|
||||
mutable std::map<const G4Material*,std::vector<double>*,CompareMaterial> fAskedNumPerVolTable;
|
||||
mutable std::map<const G4Material*,bool,CompareMaterial> fWarningPrinted;
|
||||
mutable std::map<const G4Material*, std::vector<double>*, CompareMaterial>
|
||||
fAskedDensityTable;
|
||||
mutable std::map<const G4Material*, std::vector<double>*, CompareMaterial>
|
||||
fAskedNumPerVolTable;
|
||||
mutable std::map<const G4Material*, bool, CompareMaterial> fWarningPrinted;
|
||||
|
||||
G4bool fIsInitialized;
|
||||
G4bool fIsInitialized;
|
||||
size_t fNMaterials;
|
||||
};
|
||||
|
||||
inline const std::vector<ComponentMap> *G4DNAMolecularMaterial::GetMassFractionTable() const
|
||||
inline const std::vector<ComponentMap>*
|
||||
G4DNAMolecularMaterial::GetMassFractionTable() const
|
||||
{
|
||||
return fpCompFractionTable;
|
||||
return fpCompFractionTable;
|
||||
}
|
||||
|
||||
inline const std::vector<ComponentMap>* G4DNAMolecularMaterial::GetDensityTable() const
|
||||
inline const std::vector<ComponentMap>*
|
||||
G4DNAMolecularMaterial::GetDensityTable() const
|
||||
{
|
||||
return fpCompDensityTable;
|
||||
return fpCompDensityTable;
|
||||
}
|
||||
|
||||
#endif // G4DNAMolecularMaterial_HH
|
||||
|
||||
@@ -23,18 +23,27 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DNAMolecularReactionTable.hh 70171 2013-05-24 13:34:18Z gcosmo $
|
||||
// $Id: G4DNAMolecularReactionTable.hh 85244 2014-10-27 08:24:13Z gcosmo $
|
||||
//
|
||||
// Author: Mathieu Karamitros (kara (AT) cenbg . in2p3 . fr)
|
||||
// Author: Mathieu Karamitros, kara@cenbg.in2p3.fr
|
||||
|
||||
// The code is developed in the framework of the ESA AO7146
|
||||
//
|
||||
// WARNING : This class is released as a prototype.
|
||||
// It might strongly evolve or even disapear in the next releases.
|
||||
// We would be very happy hearing from you, send us your feedback! :)
|
||||
//
|
||||
// History:
|
||||
// -----------
|
||||
// 10 Oct 2011 M.Karamitros created
|
||||
// In order for Geant4-DNA to be maintained and still open-source,
|
||||
// article citations are crucial.
|
||||
// If you use Geant4-DNA chemistry and you publish papers about your software,
|
||||
// in addition to the general paper on Geant4-DNA:
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178
|
||||
//
|
||||
// we would be very happy if you could please also cite the following
|
||||
// reference papers on chemistry:
|
||||
//
|
||||
// J. Comput. Phys. 274 (2014) 841-882
|
||||
// Prog. Nucl. Sci. Tec. 2 (2011) 503-508
|
||||
|
||||
|
||||
#ifndef G4MolecularReactionTable_h
|
||||
#define G4MolecularReactionTable_h 1
|
||||
@@ -59,10 +68,14 @@ public :
|
||||
G4DNAMolecularReactionData(G4double reactionRate,
|
||||
const G4Molecule* reactive1,
|
||||
const G4Molecule* reactive2);
|
||||
|
||||
G4DNAMolecularReactionData(G4double reactionRate,
|
||||
const G4String& reactive1,
|
||||
const G4String& reactive2);
|
||||
~G4DNAMolecularReactionData();
|
||||
|
||||
const G4Molecule* GetReactive1() const { return fReactive1.get(); }
|
||||
const G4Molecule* GetReactive2() const { return fReactive2.get(); }
|
||||
const G4Molecule* GetReactive1() const { return fReactive1; }
|
||||
const G4Molecule* GetReactive2() const { return fReactive2; }
|
||||
|
||||
G4double GetReactionRate() const {return fReactionRate;}
|
||||
G4double GetReducedReactionRadius() const {return fReducedReactionRadius;}
|
||||
@@ -73,6 +86,11 @@ public :
|
||||
void SetReactive(const G4Molecule* reactive1, const G4Molecule* reactive2);
|
||||
void AddProduct(const G4Molecule* molecule);
|
||||
|
||||
void SetReactive1(const G4String& reactive) ;
|
||||
void SetReactive2(const G4String& reactive) ;
|
||||
void SetReactive(const G4String& reactive1, const G4String& reactive2);
|
||||
void AddProduct(const G4String& molecule);
|
||||
|
||||
G4int GetNbProducts() const
|
||||
{
|
||||
if(fProducts) return fProducts->size();
|
||||
@@ -81,18 +99,18 @@ public :
|
||||
|
||||
const G4Molecule* GetProduct(G4int i) const
|
||||
{
|
||||
if(fProducts) return (*fProducts)[i].get();
|
||||
if(fProducts) return (*fProducts)[i];
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected :
|
||||
G4DNAMolecularReactionData();
|
||||
G4MoleculeHandle fReactive1;
|
||||
G4MoleculeHandle fReactive2;
|
||||
const G4Molecule* fReactive1;
|
||||
const G4Molecule* fReactive2;
|
||||
G4double fReactionRate;
|
||||
G4double fReducedReactionRadius;
|
||||
|
||||
std::vector<G4MoleculeHandle>* fProducts;
|
||||
std::vector<const G4Molecule*>* fProducts;
|
||||
};
|
||||
|
||||
struct compMoleculeP
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Author: Mathieu Karamitros, kara@cenbg.in2p3.fr
|
||||
|
||||
// The code is developed in the framework of the ESA AO7146
|
||||
//
|
||||
// We would be very happy hearing from you, send us your feedback! :)
|
||||
//
|
||||
// In order for Geant4-DNA to be maintained and still open-source,
|
||||
// article citations are crucial.
|
||||
// If you use Geant4-DNA chemistry and you publish papers about your software,
|
||||
// in addition to the general paper on Geant4-DNA:
|
||||
//
|
||||
// Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178
|
||||
//
|
||||
// we would be very happy if you could please also cite the following
|
||||
// reference papers on chemistry:
|
||||
//
|
||||
// J. Comput. Phys. 274 (2014) 841-882
|
||||
// Prog. Nucl. Sci. Tec. 2 (2011) 503-508
|
||||
|
||||
#ifndef MOLECULEGUN_HH_
|
||||
#define MOLECULEGUN_HH_
|
||||
|
||||
#include "G4ITGun.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4Track;
|
||||
class G4MoleculeGunMessenger;
|
||||
|
||||
class G4MoleculeGun : public G4ITGun
|
||||
{
|
||||
public:
|
||||
G4MoleculeGun();
|
||||
virtual ~G4MoleculeGun();
|
||||
|
||||
virtual void DefineTracks();
|
||||
void AddMolecule(const G4String& name,
|
||||
const G4ThreeVector& position,
|
||||
double time = 0);
|
||||
void AddNMolecules(size_t n,
|
||||
const G4String& name,
|
||||
const G4ThreeVector& position,
|
||||
double time = 0);
|
||||
|
||||
protected:
|
||||
G4Track* BuildTrack(const G4String& name,
|
||||
const G4ThreeVector& position,
|
||||
double time = 0);
|
||||
std::vector<G4Track*> fTracks;
|
||||
G4MoleculeGunMessenger* fpMessenger;
|
||||
|
||||
};
|
||||
|
||||
#endif /* MOLECULEGUN_HH_ */
|
||||
@@ -0,0 +1,98 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Author: Mathieu Karamitros, kara@cenbg.in2p3.fr
|
||||
|
||||
// The code is developed in the framework of the ESA AO7146
|
||||
//
|
||||
// We would be very happy hearing from you, send us your feedback! :)
|
||||
//
|
||||
// In order for Geant4-DNA to be maintained and still open-source,
|
||||
// article citations are crucial.
|
||||
// If you use Geant4-DNA chemistry and you publish papers about your software,
|
||||
// in addition to the general paper on Geant4-DNA:
|
||||
//
|
||||
// Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178
|
||||
//
|
||||
// we would be very happy if you could please also cite the following
|
||||
// reference papers on chemistry:
|
||||
//
|
||||
// J. Comput. Phys. 274 (2014) 841-882
|
||||
// Prog. Nucl. Sci. Tec. 2 (2011) 503-508
|
||||
|
||||
#ifndef MOLECULEGUNMESSENGER_HH_
|
||||
#define MOLECULEGUNMESSENGER_HH_
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4MoleculeGun;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWith3VectorAndUnit;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
class G4UIcmdWithAnInteger;
|
||||
class G4UIdirectory;
|
||||
|
||||
class G4MoleculeGunMessenger : public G4UImessenger
|
||||
{
|
||||
public:
|
||||
G4MoleculeGunMessenger();
|
||||
virtual ~G4MoleculeGunMessenger();
|
||||
|
||||
virtual void SetNewValue(G4UIcommand * command, G4String newValue);
|
||||
virtual G4String GetCurrentValue(G4UIcommand * command);
|
||||
void DefineTracks(G4MoleculeGun*);
|
||||
|
||||
protected:
|
||||
G4UIdirectory* fpGunDir;
|
||||
G4UIcmdWithAString* fpGunNewGunType;
|
||||
|
||||
struct MultipleGun : public G4UImessenger
|
||||
{
|
||||
MultipleGun(const G4String& name, G4MoleculeGunMessenger*);
|
||||
virtual ~MultipleGun();
|
||||
virtual void SetNewValue(G4UIcommand * command, G4String newValue);
|
||||
virtual G4String GetCurrentValue(G4UIcommand * command);
|
||||
void DefineTracks(G4MoleculeGun*);
|
||||
|
||||
G4UIdirectory* fpGunType;
|
||||
G4UIcmdWithAString* fpGunMoleculeModel;
|
||||
G4UIcmdWith3VectorAndUnit* fpGunPosition;
|
||||
G4UIcmdWithADoubleAndUnit* fpGunTime;
|
||||
G4UIcmdWithAnInteger* fpGunN;
|
||||
|
||||
G4String fMoleculeName;
|
||||
G4ThreeVector fPosition;
|
||||
G4double fTime;
|
||||
G4int fNumber;
|
||||
};
|
||||
|
||||
MultipleGun* CreateNewType(const G4String& name);
|
||||
|
||||
std::vector<MultipleGun*> fMultipleGun;
|
||||
};
|
||||
|
||||
#endif /* MOLECULEGUNMESSENGER_HH_ */
|
||||
@@ -23,10 +23,29 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4VDNAReactionModel.hh 64057 2012-10-30 15:04:49Z gcosmo $
|
||||
// $Id: G4VDNAReactionModel.hh 85244 2014-10-27 08:24:13Z gcosmo $
|
||||
//
|
||||
#ifndef G4VReactionModel_
|
||||
#define G4VReactionModel_
|
||||
// Author: Mathieu Karamitros, kara@cenbg.in2p3.fr
|
||||
|
||||
// The code is developed in the framework of the ESA AO7146
|
||||
//
|
||||
// We would be very happy hearing from you, send us your feedback! :)
|
||||
//
|
||||
// In order for Geant4-DNA to be maintained and still open-source,
|
||||
// article citations are crucial.
|
||||
// If you use Geant4-DNA chemistry and you publish papers about your software,
|
||||
// in addition to the general paper on Geant4-DNA:
|
||||
//
|
||||
// Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178
|
||||
//
|
||||
// we would be very happy if you could please also cite the following
|
||||
// reference papers on chemistry:
|
||||
//
|
||||
// J. Comput. Phys. 274 (2014) 841-882
|
||||
// Prog. Nucl. Sci. Tec. 2 (2011) 503-508
|
||||
|
||||
#ifndef G4VReactionModel_hh
|
||||
#define G4VReactionModel_hh
|
||||
|
||||
#include "globals.hh"
|
||||
#include "AddClone_def.hh"
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Author: Mathieu Karamitros, kara@cenbg.in2p3.fr
|
||||
|
||||
// The code is developed in the framework of the ESA AO7146
|
||||
//
|
||||
// We would be very happy hearing from you, send us your feedback! :)
|
||||
//
|
||||
// In order for Geant4-DNA to be maintained and still open-source,
|
||||
// article citations are crucial.
|
||||
// If you use Geant4-DNA chemistry and you publish papers about your software,
|
||||
// in addition to the general paper on Geant4-DNA:
|
||||
//
|
||||
// Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178
|
||||
//
|
||||
// we would be very happy if you could please also cite the following
|
||||
// reference papers on chemistry:
|
||||
//
|
||||
// J. Comput. Phys. 274 (2014) 841-882
|
||||
// Prog. Nucl. Sci. Tec. 2 (2011) 503-508
|
||||
|
||||
#ifndef G4VUSERCHEMISTRYLIST_HH_
|
||||
#define G4VUSERCHEMISTRYLIST_HH_
|
||||
|
||||
class G4Molecule;
|
||||
class G4DNAMolecularReactionTable;
|
||||
class G4VITStepModel;
|
||||
class G4MoleculeDefinition;
|
||||
|
||||
class G4VPhysicsContructor;
|
||||
|
||||
class G4VUserChemistryList
|
||||
{
|
||||
public:
|
||||
G4VUserChemistryList();
|
||||
virtual ~G4VUserChemistryList();
|
||||
|
||||
// If your user class also inherits from G4VPhysicsConstructor,
|
||||
// please put this flag to true
|
||||
virtual bool IsPhysicsConstructor()
|
||||
{
|
||||
if((G4VPhysicsContructor*)(this)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
// to be called from PhysicsList
|
||||
|
||||
virtual void ConstructMolecule()
|
||||
{
|
||||
;
|
||||
} // PhysicsList::ConstructParticle
|
||||
virtual void ConstructProcess()
|
||||
{
|
||||
;
|
||||
} // PhysicsList::ConstructProcess
|
||||
|
||||
/////////////
|
||||
|
||||
virtual void ConstructDissociationChannels()
|
||||
{
|
||||
;
|
||||
}
|
||||
virtual void ConstructReactionTable(G4DNAMolecularReactionTable* reactionTable) = 0;
|
||||
virtual void ConstructTimeStepModel(G4DNAMolecularReactionTable* reactionTable) = 0;
|
||||
|
||||
void BuildPhysicsTable();
|
||||
|
||||
protected:
|
||||
void RegisterTimeStepModel(G4VITStepModel* timeStepModel,
|
||||
double startingTime = 0);
|
||||
void BuildPhysicsTable(G4MoleculeDefinition*);
|
||||
|
||||
int verboseLevel;
|
||||
};
|
||||
|
||||
#endif /* G4VUSERCHEMISTRYLIST_HH_ */
|
||||
Reference in New Issue
Block a user