Import Geant4 10.4.0.beta source tree
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Based on the work of M. Terrissol and M. C. Bordage
|
||||
//
|
||||
// Users are requested to cite the following papers:
|
||||
// - M. Terrissol, A. Baudre, Radiat. Prot. Dosim. 31 (1990) 175-177
|
||||
// - M.C. Bordage, J. Bordes, S. Edel, M. Terrissol, X. Franceries,
|
||||
// M. Bardies, N. Lampe, S. Incerti, Phys. Med. 32 (2016) 1833-1840
|
||||
//
|
||||
// Authors of this class:
|
||||
// M.C. Bordage, M. Terrissol, S. Edel, J. Bordes, S. Incerti
|
||||
//
|
||||
// 15.01.2014: creation
|
||||
//
|
||||
|
||||
#ifndef G4LOGLOGINTERPOLATION_HH
|
||||
#define G4LOGLOGINTERPOLATION_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VDataSetAlgorithm.hh"
|
||||
#include "G4DataVector.hh"
|
||||
|
||||
class G4DNACPA100LogLogInterpolation : public G4VDataSetAlgorithm {
|
||||
|
||||
public:
|
||||
|
||||
G4DNACPA100LogLogInterpolation();
|
||||
|
||||
~G4DNACPA100LogLogInterpolation();
|
||||
|
||||
G4double Calculate(G4double point, G4int bin,
|
||||
const G4DataVector& energies,
|
||||
const G4DataVector& data) const;
|
||||
|
||||
G4double Calculate(G4double point, G4int bin,
|
||||
const G4DataVector& energies,
|
||||
const G4DataVector& data,
|
||||
const G4DataVector& log_energies,
|
||||
const G4DataVector& log_data) const;
|
||||
|
||||
virtual G4VDataSetAlgorithm* Clone() const;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
// Hide copy constructor and assignment operator
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Based on the work of M. Terrissol and M. C. Bordage
|
||||
//
|
||||
// Users are requested to cite the following papers:
|
||||
// - M. Terrissol, A. Baudre, Radiat. Prot. Dosim. 31 (1990) 175-177
|
||||
// - M.C. Bordage, J. Bordes, S. Edel, M. Terrissol, X. Franceries,
|
||||
// M. Bardies, N. Lampe, S. Incerti, Phys. Med. 32 (2016) 1833-1840
|
||||
//
|
||||
// Authors of this class:
|
||||
// M.C. Bordage, M. Terrissol, S. Edel, J. Bordes, S. Incerti
|
||||
//
|
||||
// 15.01.2014: creation
|
||||
//
|
||||
|
||||
#ifndef G4DNACPA100WaterExcitationStructure_hh
|
||||
#define G4DNACPA100WaterExcitationStructure_hh 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include <vector>
|
||||
|
||||
|
||||
class G4DNACPA100WaterExcitationStructure
|
||||
{
|
||||
public:
|
||||
|
||||
G4DNACPA100WaterExcitationStructure();
|
||||
|
||||
virtual ~G4DNACPA100WaterExcitationStructure();
|
||||
|
||||
G4double ExcitationEnergy(G4int level);
|
||||
|
||||
G4int NumberOfLevels() { return nLevels; }
|
||||
|
||||
// Copy constructor and assignment operator to be added here
|
||||
|
||||
private:
|
||||
|
||||
// Number of excitation levels of the water molecule
|
||||
G4int nLevels;
|
||||
|
||||
std::vector<G4double> energyConstant;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Based on the work of M. Terrissol and M. C. Bordage
|
||||
//
|
||||
// Users are requested to cite the following papers:
|
||||
// - M. Terrissol, A. Baudre, Radiat. Prot. Dosim. 31 (1990) 175-177
|
||||
// - M.C. Bordage, J. Bordes, S. Edel, M. Terrissol, X. Franceries,
|
||||
// M. Bardies, N. Lampe, S. Incerti, Phys. Med. 32 (2016) 1833-1840
|
||||
//
|
||||
// Authors of this class:
|
||||
// M.C. Bordage, M. Terrissol, S. Edel, J. Bordes, S. Incerti
|
||||
//
|
||||
// 15.01.2014: creation
|
||||
//
|
||||
|
||||
#ifndef G4DNACPA100WaterIonisationStructure_hh
|
||||
#define G4DNACPA100WaterIonisationStructure_hh 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include <vector>
|
||||
|
||||
|
||||
class G4DNACPA100WaterIonisationStructure
|
||||
{
|
||||
public:
|
||||
|
||||
G4DNACPA100WaterIonisationStructure();
|
||||
|
||||
virtual ~G4DNACPA100WaterIonisationStructure();
|
||||
|
||||
G4double IonisationEnergy(G4int level);
|
||||
|
||||
G4double UEnergy(G4int level);
|
||||
|
||||
G4int NumberOfLevels() { return nLevels; }
|
||||
|
||||
// Copy constructor and assignment operator to be added here
|
||||
|
||||
private:
|
||||
|
||||
// Number of Ionisation levels of the water molecule
|
||||
G4int nLevels;
|
||||
|
||||
std::vector<G4double> energyConstant;
|
||||
std::vector<G4double> UConstant;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DNAChemistryManager.hh 100802 2016-11-02 14:55:27Z gcosmo $
|
||||
// $Id: G4DNAChemistryManager.hh 103042 2017-03-10 11:50:07Z gcosmo $
|
||||
//
|
||||
|
||||
// Author: Mathieu Karamitros
|
||||
@@ -64,6 +64,7 @@ class G4UIcmdWithABool;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
class G4UIcmdWithoutParameter;
|
||||
class G4ITGun;
|
||||
class G4VPhysChemIO;
|
||||
|
||||
enum ElectronicModification
|
||||
{
|
||||
@@ -85,7 +86,8 @@ enum ElectronicModification
|
||||
* creation of water molecules and solvated electrons.
|
||||
*/
|
||||
|
||||
class G4DNAChemistryManager : public G4UImessenger, public G4VStateDependent
|
||||
class G4DNAChemistryManager: public G4UImessenger,
|
||||
public G4VStateDependent
|
||||
{
|
||||
protected:
|
||||
virtual ~G4DNAChemistryManager();
|
||||
@@ -119,7 +121,7 @@ public:
|
||||
void Initialize();
|
||||
inline void SetChemistryList(G4VUserChemistryList*);
|
||||
inline void Deregister(G4VUserChemistryList*);
|
||||
void SetGlobalTemperature(double temp_K);
|
||||
void SetGlobalTemperature(G4double temp_K);
|
||||
|
||||
inline void ForceMasterReinitialization();
|
||||
inline void TagThreadForReinitialization();
|
||||
@@ -152,10 +154,10 @@ public:
|
||||
//============================================================================
|
||||
/**
|
||||
* Method used by DNA physics model to create a water molecule.
|
||||
* The ElectronicModification is a flag telling wheter the molecule
|
||||
* The ElectronicModification is a flag telling whether 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.
|
||||
* of this molecule (electron, proton...).
|
||||
*/
|
||||
void CreateWaterMolecule(ElectronicModification,
|
||||
G4int /*electronicLevel*/,
|
||||
@@ -179,9 +181,9 @@ public:
|
||||
*/
|
||||
|
||||
void PushMolecule(G4Molecule*& molecule,
|
||||
double time,
|
||||
G4double time,
|
||||
const G4ThreeVector& position,
|
||||
int parentID);
|
||||
G4int parentID);
|
||||
|
||||
/**
|
||||
* WARNING : In case chemistry is not activated, PushMoleculeAtParentTimeAndPlace
|
||||
@@ -200,7 +202,7 @@ public:
|
||||
fVerbose = verbose;
|
||||
}
|
||||
|
||||
inline void SetBuildPhysicsTable(bool flag)
|
||||
inline void SetBuildPhysicsTable(G4bool flag)
|
||||
{fBuildPhysicsTable = flag;}
|
||||
|
||||
G4bool IsCounterResetWhenRunEnds() const
|
||||
@@ -213,6 +215,8 @@ public:
|
||||
fResetCounterWhenRunEnds = resetCounterWhenRunEnds;
|
||||
}
|
||||
|
||||
void SetPhysChemIO(G4VPhysChemIO* physChemIO);
|
||||
|
||||
protected:
|
||||
G4DNAWaterExcitationStructure* GetExcitationLevel();
|
||||
G4DNAWaterIonisationStructure* GetIonisationLevel();
|
||||
@@ -227,17 +231,22 @@ private:
|
||||
G4UIcmdWithABool* fpActivateChem;
|
||||
G4UIcmdWithoutParameter* fpRunChem;
|
||||
G4UIcmdWithoutParameter* fpSkipReactionsFromChemList;
|
||||
//G4UIcmdWithADoubleAndUnit* fpGridSize;
|
||||
//G4UIcmdWithADoubleAndUnit* fpGridSize; // not used in release
|
||||
G4UIcmdWithADoubleAndUnit* fpScaleForNewTemperature;
|
||||
G4UIcmdWithoutParameter* fpInitChem;
|
||||
|
||||
|
||||
static G4DNAChemistryManager* fgInstance;
|
||||
// static bool fActiveChemistry;
|
||||
bool fActiveChemistry;
|
||||
G4bool fFileInitialized;
|
||||
G4bool fWriteFile;
|
||||
static G4ThreadLocal std::ofstream* fpgOutput_tl;
|
||||
static G4ThreadLocal G4bool* fpgThreadInitialized_tl;
|
||||
G4bool fActiveChemistry;
|
||||
|
||||
struct ThreadLocalData{
|
||||
ThreadLocalData();
|
||||
~ThreadLocalData();
|
||||
G4VPhysChemIO* fpPhysChemIO;
|
||||
G4bool fThreadInitialized_tl;
|
||||
};
|
||||
|
||||
static G4ThreadLocal ThreadLocalData* fpThreadData;
|
||||
|
||||
G4bool fMasterInitialized;
|
||||
G4bool fForceThreadReinitialization;
|
||||
|
||||
@@ -255,6 +264,8 @@ private:
|
||||
G4bool fResetCounterWhenRunEnds;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
inline void G4DNAChemistryManager::ForceRebuildingPhysicsTable()
|
||||
{
|
||||
fPhysicsTableBuilt = false;
|
||||
@@ -279,13 +290,12 @@ inline void G4DNAChemistryManager::ForceMasterReinitialization()
|
||||
|
||||
inline void G4DNAChemistryManager::ForceThreadReinitialization()
|
||||
{
|
||||
// TODO
|
||||
fForceThreadReinitialization = true;
|
||||
}
|
||||
|
||||
inline void G4DNAChemistryManager::TagThreadForReinitialization()
|
||||
{
|
||||
if (fpgThreadInitialized_tl) delete fpgThreadInitialized_tl;
|
||||
fpThreadData->fThreadInitialized_tl = false;
|
||||
}
|
||||
|
||||
#endif // G4DNACHEMISTRYMANAGER_HH
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DNAMolecularMaterial.hh 101354 2016-11-15 08:27:51Z gcosmo $
|
||||
// $Id: G4DNAMolecularMaterial.hh 103042 2017-03-10 11:50:07Z gcosmo $
|
||||
//
|
||||
// Author: Mathieu Karamitros
|
||||
//
|
||||
@@ -40,7 +40,7 @@
|
||||
// reference papers on chemistry:
|
||||
//
|
||||
// J. Comput. Phys. 274 (2014) 841-882
|
||||
// Prog. Nucl. Sci. Tec. 2 (2011) 503-508
|
||||
// Prog. Nucl. Sci. Tec. 2 (2011) 503-508
|
||||
|
||||
#ifndef G4DNAMolecularMaterial_HH
|
||||
#define G4DNAMolecularMaterial_HH
|
||||
@@ -54,18 +54,46 @@
|
||||
class G4Material;
|
||||
class G4MolecularConfiguration;
|
||||
|
||||
/**
|
||||
* \struct CompareMaterial
|
||||
* \brief Materials can be described as a derivation of existing "parent"
|
||||
* materials in order to alter few of their features, such as density.
|
||||
* \p CompareMaterial compare materials taking into account
|
||||
* their possible "affiliation".
|
||||
*/
|
||||
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;
|
||||
};
|
||||
|
||||
typedef std::map<const G4Material*, double, CompareMaterial> ComponentMap;
|
||||
|
||||
// G4DNAMolecularMaterial is initialized when G4ApplicationState == G4State_Idle
|
||||
/**
|
||||
* \class G4DNAMolecularMaterial
|
||||
* \brief G4DNAMolecularMaterial builds tables of molecular densities for chosen
|
||||
* molecular materials. The class handles homogeneous, composite and
|
||||
* derived materials. A material of interest is labeled as molecular if built
|
||||
* using the number of atoms rather than the mass fractions.
|
||||
*
|
||||
* \details
|
||||
* - Initialization:
|
||||
* G4DNAMolecularMaterial is initialized when
|
||||
* G4ApplicationState == G4State_Idle.
|
||||
* It should be initialized on the master thread and used in read-only mode
|
||||
* during stepping. The singleton is thread-shared.
|
||||
*
|
||||
* - For Developers:
|
||||
* Use GetNumMolPerVolTableFor(molecule) in the concrete implementation of
|
||||
* G4VEmModel::Initialise or G4VProcess::PreparePhysicsTable
|
||||
* at run initialization to retrieve a read-only, thread-safe, table.
|
||||
* The table is then built on the master thread at initialization time and
|
||||
* shared between all threads and models.
|
||||
*
|
||||
* \note A G4material is labeled as molecular if built using the number of atoms
|
||||
*
|
||||
*/
|
||||
|
||||
class G4DNAMolecularMaterial : public G4VStateDependent
|
||||
class G4DNAMolecularMaterial: public G4VStateDependent
|
||||
{
|
||||
public:
|
||||
static G4DNAMolecularMaterial* Instance();
|
||||
@@ -77,7 +105,39 @@ public:
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* \fn const std::vector<double>* \
|
||||
* GetDensityTableFor(const G4Material* searchedMaterial) const
|
||||
* \brief Retrieve a table of volumetric mass densities (mass per unit volume)
|
||||
* in the G4 unit system for chosen material.
|
||||
*
|
||||
* @param[in] searchedMaterial
|
||||
* The material which you'd like to retrieve the volumic mass
|
||||
* @pre The \p searchedMaterial used in parameter must be built as a
|
||||
* molecular material, using the number of atoms rather than the density
|
||||
* fractions.
|
||||
* \return
|
||||
* Pointer to a table of molecular densities for the \p searchedMaterial
|
||||
* indexed on the (parent) material index.
|
||||
*
|
||||
*/
|
||||
const std::vector<double>* GetDensityTableFor(const G4Material*) const;
|
||||
|
||||
/**
|
||||
* \fn const std::vector<double>* \
|
||||
* GetNumMolPerVolTableFor(const G4Material* searchedMaterial) const
|
||||
* \brief Retrieve a table of molecular densities (number of molecules per
|
||||
* unit volume) in the G4 unit system for chosen material.
|
||||
*
|
||||
* @param[in] searchedMaterial
|
||||
* The material which you'd like to retrieve the molecular density
|
||||
* @pre The \p searchedMaterial used in parameter must be built as a
|
||||
* molecular material, using the number of atoms rather than the density
|
||||
* fractions.
|
||||
* \return
|
||||
* Pointer to a table of molecular densities for the \p searchedMaterial
|
||||
* indexed on the (parent) material index.
|
||||
*/
|
||||
const std::vector<double>* GetNumMolPerVolTableFor(const G4Material*) const;
|
||||
|
||||
inline const std::vector<ComponentMap>* GetMassFractionTable() const{
|
||||
@@ -90,13 +150,75 @@ public:
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
G4MolecularConfiguration* GetMolecularConfiguration(const G4Material*) const;
|
||||
|
||||
/**
|
||||
* \fn void SetMolecularConfiguration(const G4Material* material, \
|
||||
* G4MolecularConfiguration* molConf)
|
||||
* \brief Associate a molecular configuration to a G4material.
|
||||
*
|
||||
* @param[in] material
|
||||
* Pointer to a G4 material. The material
|
||||
* does not need to be defined as a molecular material.
|
||||
* @param[in] molConf
|
||||
* The molecular configuration corresponding to
|
||||
* the G4 \p material.
|
||||
*/
|
||||
void SetMolecularConfiguration(const G4Material*,
|
||||
G4MolecularConfiguration*);
|
||||
|
||||
/**
|
||||
* \fn void SetMolecularConfiguration(const G4Material* material, \
|
||||
* const G4String& molConf)
|
||||
* \brief Associate a molecular configuration to a G4material.
|
||||
*
|
||||
* @param[in] material
|
||||
* Pointer to a G4 material. The material
|
||||
* does not need to be defined as a molecular material.
|
||||
* @param[in] molConf
|
||||
* User ID of the molecular configuration corresponding to
|
||||
* the G4 \p material.
|
||||
*/
|
||||
void SetMolecularConfiguration(const G4Material*,
|
||||
const G4String&);
|
||||
|
||||
/**
|
||||
* \fn void SetMolecularConfiguration(const G4Material* material, \
|
||||
* const G4String& molConf)
|
||||
* \brief Associate a molecular configuration to a G4material.
|
||||
*
|
||||
* @param[in] material
|
||||
* Name of the G4 material. The material
|
||||
* does not need to be defined as a molecular material.
|
||||
* @param[in] molConf
|
||||
* User ID of the molecular configuration corresponding to
|
||||
* the G4 \p material.
|
||||
*/
|
||||
void SetMolecularConfiguration(const G4String& materialName,
|
||||
const G4String& molUserIF);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* \brief Deprecated
|
||||
* \deprecated Will return a G4 fatal exception.
|
||||
* Use instead GetNumMolPerVolTableFor(molecule) at run
|
||||
* initialization to retrieve a read-only, thread-safe, table.
|
||||
* \note A G4material is labeled as molecular if built using
|
||||
* the number of atoms.
|
||||
*/
|
||||
G4double GetNumMoleculePerVolumeUnitForMaterial(const G4Material *mat);
|
||||
|
||||
/**
|
||||
* \brief Deprecated
|
||||
* \deprecated Will return a G4 fatal exception.
|
||||
* Use instead GetNumMolPerVolTableFor(molecule) at run
|
||||
* initialization to retrieve a read-only, thread-safe, table.
|
||||
* \note A G4material is labeled as molecular if built using
|
||||
* the number of atoms.
|
||||
*/
|
||||
G4double GetNumMolPerVolForComponentInComposite(const G4Material *composite,
|
||||
const G4Material *component,
|
||||
G4double massFraction);
|
||||
|
||||
protected:
|
||||
static G4DNAMolecularMaterial* fInstance;
|
||||
@@ -119,6 +241,7 @@ protected:
|
||||
void PrintNotAMolecularMaterial(const char* methodName,
|
||||
const G4Material* lookForMaterial) const;
|
||||
|
||||
// Tables built for all molecular materials at initialization
|
||||
std::vector<ComponentMap>* fpCompFractionTable;
|
||||
std::vector<ComponentMap>* fpCompDensityTable;
|
||||
std::vector<ComponentMap>* fpCompNumMolPerVolTable;
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
///
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
// Authors: S. Meylan and C. Villagrasa (IRSN, France)
|
||||
// Models come from
|
||||
// M. Bug et al, Rad. Phys and Chem. 130, 459-479 (2017)
|
||||
|
||||
#ifndef G4DNAPTBIonisationStructure_HH
|
||||
#define G4DNAPTBIonisationStructure_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
|
||||
class G4DNAPTBIonisationStructure
|
||||
{
|
||||
public:
|
||||
|
||||
G4DNAPTBIonisationStructure();
|
||||
|
||||
virtual ~G4DNAPTBIonisationStructure();
|
||||
|
||||
G4double IonisationEnergy(G4int level, const G4String &materialName);
|
||||
|
||||
G4int NumberOfLevels(const G4String& materialName);
|
||||
|
||||
// Copy constructor and assignment operator to be added here
|
||||
|
||||
private:
|
||||
|
||||
// Number of Ionisation levels of the water molecule
|
||||
std::map<G4String, G4int> nLevels;
|
||||
|
||||
std::map<G4String, std::vector<G4double> > energyConstant;
|
||||
|
||||
G4String ReplaceMaterial(const G4String &materialName);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,135 @@
|
||||
/*
|
||||
* G4PhysChemIO.hh
|
||||
*
|
||||
* Created on: 3 févr. 2017
|
||||
* Author: matkara
|
||||
*/
|
||||
#ifndef G4PHYSCHEMIO_HH_
|
||||
#define G4PHYSCHEMIO_HH_
|
||||
|
||||
#include "G4VPhysChemIO.hh"
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
namespace G4PhysChemIO{
|
||||
|
||||
class FormattedText: public G4VPhysChemIO
|
||||
{
|
||||
public:
|
||||
FormattedText();
|
||||
virtual ~FormattedText();
|
||||
|
||||
virtual void InitializeMaster(){}
|
||||
virtual void InitializeThread(){}
|
||||
virtual void InitializeFile();
|
||||
|
||||
virtual void NewRun(){}
|
||||
virtual void NewEvent(){}
|
||||
|
||||
/**
|
||||
* When DNA physics model create a water molecule, you'll get a notification
|
||||
* through this method.
|
||||
* The ElectronicModification is a flag telling whether 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 (electron, proton...)
|
||||
*/
|
||||
virtual void CreateWaterMolecule(G4int electronicModif,
|
||||
G4int /*electronicLevel*/,
|
||||
G4double energy,
|
||||
const G4Track* /*theIncomingTrack*/);
|
||||
|
||||
/**
|
||||
* Same idea as the previous method but for solvated electron.
|
||||
* This method should be used by the physics model of the ElectronSolvatation
|
||||
* process.
|
||||
*/
|
||||
virtual void CreateSolvatedElectron(const G4Track* /*theIncomingTrack*/,
|
||||
G4ThreeVector* finalPosition = 0);
|
||||
|
||||
//============================================================================
|
||||
// FILE OPERATIONS
|
||||
//============================================================================
|
||||
|
||||
/**
|
||||
* Tells the chemistry manager to write into a file
|
||||
* the position and electronic state of the water molecule
|
||||
* and the position thermalized or not of the solvated electron
|
||||
*/
|
||||
virtual void WriteInto(const G4String&,
|
||||
std::ios_base::openmode mode = std::ios_base::out);
|
||||
virtual void AddEmptyLineInOuputFile();
|
||||
|
||||
/**
|
||||
* Close the file specified with WriteInto
|
||||
*/
|
||||
virtual void CloseFile();
|
||||
|
||||
protected:
|
||||
G4int fRunID; // unused
|
||||
G4int fEventID; // unused
|
||||
G4bool fFileInitialized;
|
||||
std::ofstream fOfstream;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
class G4Analysis: public G4VPhysChemIO
|
||||
{
|
||||
public:
|
||||
G4Analysis(G4VAnalysisManager*);
|
||||
virtual ~G4Analysis();
|
||||
|
||||
virtual void InitializeMaster(){}
|
||||
virtual void InitializeThread(){}
|
||||
virtual void InitializeFile();
|
||||
|
||||
virtual void NewRun(){}
|
||||
virtual void NewEvent(){}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void CreateWaterMolecule(G4int electronicModif,
|
||||
G4int /*electronicLevel*/,
|
||||
G4double energy,
|
||||
const G4Track* /*theIncomingTrack*/);
|
||||
|
||||
/**
|
||||
* Same idea as the previous method but for solvated electron.
|
||||
* This method should be used by the physics model of the ElectronSolvatation
|
||||
* process.
|
||||
*/
|
||||
virtual void CreateSolvatedElectron(const G4Track* /*theIncomingTrack*/,
|
||||
G4ThreeVector* finalPosition = 0);
|
||||
|
||||
//============================================================================
|
||||
// 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
|
||||
*/
|
||||
virtual void WriteInto(const G4String&, std::ios_base::openmode mode =
|
||||
std::ios_base::out);
|
||||
virtual void AddEmptyLineInOuputFile(){}
|
||||
|
||||
/**
|
||||
* Close the file specified with WriteInto
|
||||
*/
|
||||
virtual void CloseFile();
|
||||
|
||||
protected:
|
||||
G4VAnalysisManager* fpAnalysisManager;
|
||||
int fNtupleID;
|
||||
G4bool fFileInitialized;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // G4PHYSCHEMIO_HH_
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* G4VPhysChemIO.hh
|
||||
*
|
||||
* Created on: 3 févr. 2017
|
||||
* Author: matkara
|
||||
*/
|
||||
|
||||
#ifndef G4VPHYSCHEMIO_HH_
|
||||
#define G4VPHYSCHEMIO_HH_
|
||||
|
||||
#include <fstream>
|
||||
#include "globals.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
|
||||
class G4Track;
|
||||
class G4VAnalysisManager;
|
||||
|
||||
class G4VPhysChemIO
|
||||
{
|
||||
public:
|
||||
G4VPhysChemIO();
|
||||
virtual ~G4VPhysChemIO();
|
||||
|
||||
virtual void InitializeMaster(){}
|
||||
virtual void InitializeThread(){}
|
||||
virtual void InitializeFile() = 0;
|
||||
|
||||
virtual void NewRun() = 0;
|
||||
virtual void NewEvent() = 0;
|
||||
|
||||
/**
|
||||
* When DNA physics model create a water molecule, you'll get a notification
|
||||
* through this method.
|
||||
* The ElectronicModification is a flag telling whether 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 (electron, proton...)
|
||||
*/
|
||||
virtual void CreateWaterMolecule(G4int electronicModif,
|
||||
G4int /*electronicLevel*/,
|
||||
G4double energy,
|
||||
const G4Track* /*theIncomingTrack*/) = 0;
|
||||
|
||||
/**
|
||||
* Same idea as the previous method but for solvated electron.
|
||||
* This method should be used by the physics model of the ElectronSolvatation
|
||||
* process.
|
||||
*/
|
||||
virtual void CreateSolvatedElectron(const G4Track* /*theIncomingTrack*/,
|
||||
G4ThreeVector* finalPosition = 0) = 0;
|
||||
|
||||
//============================================================================
|
||||
// FILE OPERATIONS
|
||||
//============================================================================
|
||||
|
||||
/**
|
||||
* Tells the chemistry manager to write into a file
|
||||
* the position and electronic state of the water molecule
|
||||
* and the position thermalized or not of the solvated electron
|
||||
*/
|
||||
virtual void WriteInto(const G4String&, std::ios_base::openmode mode =
|
||||
std::ios_base::out) = 0;
|
||||
virtual void AddEmptyLineInOuputFile(){};
|
||||
|
||||
/**
|
||||
* Close the file specified with WriteInto
|
||||
*/
|
||||
virtual void CloseFile() = 0;
|
||||
};
|
||||
|
||||
#endif // G4PHYSCHEMIO_HH_
|
||||
Reference in New Issue
Block a user