ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4VDNAModel Class Referenceabstract

The G4VDNAModel class. More...

#include <geant4/tree/geant4-10.6-release/source/processes/electromagnetic/dna/models/include/G4VDNAModel.hh>

+ Inheritance diagram for G4VDNAModel:
+ Collaboration diagram for G4VDNAModel:

Public Member Functions

 G4VDNAModel (const G4String &nam, const G4String &applyToMaterial)
 G4VDNAModel Constructeur of the G4VDNAModel class.
 
virtual ~G4VDNAModel ()
 ~G4VDNAModel
 
virtual void Initialise (const G4ParticleDefinition *particle, const G4DataVector &cuts, G4ParticleChangeForGamma *fpChangeForGamme=nullptr)=0
 Initialise Each model must implement an Initialize method.
 
virtual G4double CrossSectionPerVolume (const G4Material *material, const G4String &materialName, const G4ParticleDefinition *p, G4double ekin, G4double emin, G4double emax)=0
 CrossSectionPerVolume Every model must implement its own CrossSectionPerVolume method. It is used by the process to determine the step path and must return a cross section times a number of molecules per volume unit.
 
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4String &materialName, const G4DynamicParticle *, G4ParticleChangeForGamma *particleChangeForGamma, G4double tmin=0, G4double tmax=DBL_MAX)=0
 SampleSecondaries Each model must implement SampleSecondaries to decide if a particle will be created after the ModelInterface or if any charateristic of the incident particle will change.
 
G4bool IsMaterialDefine (const G4String &materialName)
 IsMaterialDefine Check if the given material is defined in the simulation.
 
G4bool IsMaterialExistingInModel (const G4String &materialName)
 IsMaterialExistingInModel Check if the given material is defined in the current model class.
 
G4bool IsParticleExistingInModelForMaterial (const G4String &particleName, const G4String &materialName)
 IsParticleExistingInModelForMaterial To check two things: 1- is the material existing in model ? 2- if yes, is the particle defined for that material ?
 
G4String GetName ()
 GetName.
 
G4double GetHighELimit (const G4String &material, const G4String &particle)
 GetHighEnergyLimit.
 
G4double GetLowELimit (const G4String &material, const G4String &particle)
 GetLowEnergyLimit.
 
void SetHighELimit (const G4String &material, const G4String &particle, G4double lim)
 SetHighEnergyLimit.
 
void SetLowELimit (const G4String &material, const G4String &particle, G4double lim)
 SetLowEnergyLimit.
 

Protected Types

typedef std::map< G4String,
std::map< G4String,
G4DNACrossSectionDataSet
*, std::less< G4String > > > 
TableMapData
 
typedef std::map< G4String,
std::map< G4String, G4double > > 
RatioMapData
 
typedef std::map< G4String,
G4double >::const_iterator 
ItCompoMapData
 

Protected Member Functions

TableMapDataGetTableData ()
 GetTableData.
 
std::vector< G4StringBuildApplyToMatVect (const G4String &materials)
 BuildApplyToMatVect Build the material name vector which is used to know the materials the user want to include in the model.
 
void ReadAndSaveCSFile (const G4String &materialName, const G4String &particleName, const G4String &file, G4double scaleFactor)
 ReadAndSaveCSFile Read and save a "simple" cross section file : use of G4DNACrossSectionDataSet->loadData()
 
G4int RandomSelectShell (G4double k, const G4String &particle, const G4String &materialName)
 RandomSelectShell Method to randomely select a shell from the data table uploaded. The size of the table (number of columns) is used to determine the total number of possible shells.
 
void AddCrossSectionData (G4String materialName, G4String particleName, G4String fileCS, G4String fileDiffCS, G4double scaleFactor)
 AddCrossSectionData Method used during the initialization of the model class to add a new material. It adds a material to the model and fills vectors with informations.
 
void AddCrossSectionData (G4String materialName, G4String particleName, G4String fileCS, G4double scaleFactor)
 AddCrossSectionData Method used during the initialization of the model class to add a new material. It adds a material to the model and fills vectors with informations. Not every model needs differential cross sections.
 
void LoadCrossSectionData (const G4String &particleName)
 LoadCrossSectionData Method to loop on all the registered materials in the model and load the corresponding data.
 
virtual void ReadDiffCSFile (const G4String &materialName, const G4String &particleName, const G4String &path, const G4double scaleFactor)
 ReadDiffCSFile Virtual method that need to be implemented if one wish to use the differential cross sections. The read method for that kind of information is not standardized yet.
 
void EnableForMaterialAndParticle (const G4String &materialName, const G4String &particleName)
 EnableMaterialAndParticle.
 

Private Attributes

const G4String fStringOfMaterials
 fStringOfMaterials The user can decide to specify by hand which are the materials the be activated among those implemented in the model. If the user does then only the specified materials contained in this string variable will be activated. The string is like: mat1/mat2/mat3/mat4
 
TableMapData fTableData
 fTableData It contains the cross section data and can be used like: dataTable=fTableData[material][particle]
 
std::vector< G4StringfModelMaterials
 List the materials that can be activated (and will be by default) within the model.
 
std::vector< G4StringfModelParticles
 List the particles that can be activated within the model.
 
std::vector< G4StringfModelCSFiles
 List the cross section data files.
 
std::vector< G4StringfModelDiffCSFiles
 List the differential corss section data files.
 
std::vector< G4doublefModelScaleFactors
 List the model scale factors (they could change with material)
 
std::map< G4String, std::map
< G4String, G4double > > 
fLowEnergyLimits
 List the low energy limits.
 
std::map< G4String, std::map
< G4String, G4double > > 
fHighEnergyLimits
 List the high energy limits.
 
G4String fName
 model name
 

Detailed Description

The G4VDNAModel class.

All the models using the DNA material management should inherit from that class. The goal is to allow the use of the material management system with little code interferences within the model classes.

Definition at line 49 of file G4VDNAModel.hh.

View newest version in sPHENIX GitHub at line 49 of file G4VDNAModel.hh

Member Typedef Documentation

typedef std::map<G4String, G4double>::const_iterator G4VDNAModel::ItCompoMapData
protected

Definition at line 185 of file G4VDNAModel.hh.

View newest version in sPHENIX GitHub at line 185 of file G4VDNAModel.hh

typedef std::map<G4String,std::map<G4String, G4double> > G4VDNAModel::RatioMapData
protected

Definition at line 184 of file G4VDNAModel.hh.

View newest version in sPHENIX GitHub at line 184 of file G4VDNAModel.hh

typedef std::map<G4String, std::map<G4String,G4DNACrossSectionDataSet*,std::less<G4String> > > G4VDNAModel::TableMapData
protected

Definition at line 183 of file G4VDNAModel.hh.

View newest version in sPHENIX GitHub at line 183 of file G4VDNAModel.hh

Constructor & Destructor Documentation

G4VDNAModel::G4VDNAModel ( const G4String nam,
const G4String applyToMaterial 
)

G4VDNAModel Constructeur of the G4VDNAModel class.

Parameters
nam
applyToMaterial

Definition at line 35 of file G4VDNAModel.cc.

View newest version in sPHENIX GitHub at line 35 of file G4VDNAModel.cc

G4VDNAModel::~G4VDNAModel ( )
virtual

~G4VDNAModel

Definition at line 41 of file G4VDNAModel.cc.

View newest version in sPHENIX GitHub at line 41 of file G4VDNAModel.cc

References fTableData.

Member Function Documentation

void G4VDNAModel::AddCrossSectionData ( G4String  materialName,
G4String  particleName,
G4String  fileCS,
G4String  fileDiffCS,
G4double  scaleFactor 
)
protected

AddCrossSectionData Method used during the initialization of the model class to add a new material. It adds a material to the model and fills vectors with informations.

Parameters
materialName
particleName
fileCS
fileDiffCS
scaleFactor

Definition at line 58 of file G4VDNAModel.cc.

View newest version in sPHENIX GitHub at line 58 of file G4VDNAModel.cc

References fModelCSFiles, fModelDiffCSFiles, fModelMaterials, fModelParticles, and fModelScaleFactors.

Referenced by G4DNAPTBExcitationModel::Initialise(), G4DNAPTBElasticModel::Initialise(), and G4DNAPTBIonisationModel::Initialise().

+ Here is the caller graph for this function:

void G4VDNAModel::AddCrossSectionData ( G4String  materialName,
G4String  particleName,
G4String  fileCS,
G4double  scaleFactor 
)
protected

AddCrossSectionData Method used during the initialization of the model class to add a new material. It adds a material to the model and fills vectors with informations. Not every model needs differential cross sections.

Parameters
materialName
particleName
fileCS
scaleFactor

Definition at line 67 of file G4VDNAModel.cc.

View newest version in sPHENIX GitHub at line 67 of file G4VDNAModel.cc

References fModelCSFiles, fModelMaterials, fModelParticles, and fModelScaleFactors.

std::vector< G4String > G4VDNAModel::BuildApplyToMatVect ( const G4String materials)
protected

BuildApplyToMatVect Build the material name vector which is used to know the materials the user want to include in the model.

Parameters
materials
Returns
a vector with all the material names

Definition at line 139 of file G4VDNAModel.cc.

View newest version in sPHENIX GitHub at line 139 of file G4VDNAModel.cc

References mat, and G4TrackingService::materials.

Referenced by LoadCrossSectionData().

+ Here is the caller graph for this function:

virtual G4double G4VDNAModel::CrossSectionPerVolume ( const G4Material material,
const G4String materialName,
const G4ParticleDefinition p,
G4double  ekin,
G4double  emin,
G4double  emax 
)
pure virtual

CrossSectionPerVolume Every model must implement its own CrossSectionPerVolume method. It is used by the process to determine the step path and must return a cross section times a number of molecules per volume unit.

Parameters
material
materialName
p
ekin
emin
emax
Returns
crossSection*numberOfMoleculesPerVolumeUnit

Implemented in G4DNAPTBIonisationModel, G4DNAPTBElasticModel, G4DNAPTBExcitationModel, G4DNAVacuumModel, and G4DNADummyModel.

Referenced by G4DNAModelInterface::CrossSectionPerVolume().

+ Here is the caller graph for this function:

void G4VDNAModel::EnableForMaterialAndParticle ( const G4String materialName,
const G4String particleName 
)
protected

EnableMaterialAndParticle.

Parameters
materialName
particleNameMeant to fill fTableData with 0 for the specified material and particle, therefore allowing the ModelInterface class to proceed with the material and particle even if no data are registered here. The data should obviously be registered somewhere in the child class. This method is here to allow an easy use of the no-ModelInterface dna models within the ModelInterface system.

Definition at line 134 of file G4VDNAModel.cc.

View newest version in sPHENIX GitHub at line 134 of file G4VDNAModel.cc

References fTableData.

Referenced by G4DNADummyModel::Initialise(), and G4DNAVacuumModel::Initialise().

+ Here is the caller graph for this function:

G4double G4VDNAModel::GetHighELimit ( const G4String material,
const G4String particle 
)
inline

GetHighEnergyLimit.

Parameters
material
particle
Returns
fHighEnergyLimits[material][particle]

Definition at line 153 of file G4VDNAModel.hh.

View newest version in sPHENIX GitHub at line 153 of file G4VDNAModel.hh

References fHighEnergyLimits, material(), and particle.

Referenced by G4DNAPTBExcitationModel::CrossSectionPerVolume(), G4DNAPTBElasticModel::CrossSectionPerVolume(), G4DNAPTBIonisationModel::CrossSectionPerVolume(), G4DNAPTBElasticModel::SampleSecondaries(), and G4DNAPTBIonisationModel::SampleSecondaries().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4double G4VDNAModel::GetLowELimit ( const G4String material,
const G4String particle 
)
inline

GetLowEnergyLimit.

Parameters
material
particle
Returns
fLowEnergyLimits[material][particle]

Definition at line 161 of file G4VDNAModel.hh.

View newest version in sPHENIX GitHub at line 161 of file G4VDNAModel.hh

References fLowEnergyLimits, material(), and particle.

Referenced by G4DNAPTBExcitationModel::CrossSectionPerVolume(), G4DNAPTBElasticModel::CrossSectionPerVolume(), G4DNAPTBIonisationModel::CrossSectionPerVolume(), G4DNAPTBElasticModel::SampleSecondaries(), and G4DNAPTBIonisationModel::SampleSecondaries().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4String G4VDNAModel::GetName ( void  )
inline

GetName.

Returns
the name of the model

Definition at line 145 of file G4VDNAModel.hh.

View newest version in sPHENIX GitHub at line 145 of file G4VDNAModel.hh

References fName.

Referenced by IsMaterialDefine().

+ Here is the caller graph for this function:

TableMapData* G4VDNAModel::GetTableData ( )
inlineprotected

GetTableData.

Returns
a pointer to a map with the following structure: [materialName][particleName]=G4DNACrossSectionDataSet*

Definition at line 193 of file G4VDNAModel.hh.

View newest version in sPHENIX GitHub at line 193 of file G4VDNAModel.hh

References fTableData.

Referenced by G4DNAPTBExcitationModel::CrossSectionPerVolume(), G4DNAPTBElasticModel::CrossSectionPerVolume(), G4DNAPTBIonisationModel::CrossSectionPerVolume(), and RandomSelectShell().

+ Here is the caller graph for this function:

virtual void G4VDNAModel::Initialise ( const G4ParticleDefinition particle,
const G4DataVector cuts,
G4ParticleChangeForGamma fpChangeForGamme = nullptr 
)
pure virtual

Initialise Each model must implement an Initialize method.

Parameters
particle
cuts

Implemented in G4DNAPTBIonisationModel, G4DNAPTBElasticModel, G4DNAPTBExcitationModel, G4DNAVacuumModel, and G4DNADummyModel.

G4bool G4VDNAModel::IsMaterialDefine ( const G4String materialName)

IsMaterialDefine Check if the given material is defined in the simulation.

Parameters
materialName
Returns
true if the material is defined in the simulation

Definition at line 237 of file G4VDNAModel.cc.

View newest version in sPHENIX GitHub at line 237 of file G4VDNAModel.cc

References Acts::Test::at, G4Material::GetMaterialTable(), and GetName().

+ Here is the call graph for this function:

G4bool G4VDNAModel::IsMaterialExistingInModel ( const G4String materialName)

IsMaterialExistingInModel Check if the given material is defined in the current model class.

Parameters
materialName
Returns
true if the material is defined in the model

Definition at line 257 of file G4VDNAModel.cc.

View newest version in sPHENIX GitHub at line 257 of file G4VDNAModel.cc

References fTableData.

Referenced by IsParticleExistingInModelForMaterial().

+ Here is the caller graph for this function:

G4bool G4VDNAModel::IsParticleExistingInModelForMaterial ( const G4String particleName,
const G4String materialName 
)

IsParticleExistingInModelForMaterial To check two things: 1- is the material existing in model ? 2- if yes, is the particle defined for that material ?

Parameters
particleName
materialName
Returns
true if the particle/material couple is defined in the model

Definition at line 271 of file G4VDNAModel.cc.

View newest version in sPHENIX GitHub at line 271 of file G4VDNAModel.cc

References fTableData, and IsMaterialExistingInModel().

+ Here is the call graph for this function:

void G4VDNAModel::LoadCrossSectionData ( const G4String particleName)
protected

LoadCrossSectionData Method to loop on all the registered materials in the model and load the corresponding data.

Definition at line 75 of file G4VDNAModel.cc.

View newest version in sPHENIX GitHub at line 75 of file G4VDNAModel.cc

References BuildApplyToMatVect(), FatalException, fModelCSFiles, fModelDiffCSFiles, fModelMaterials, fModelParticles, fModelScaleFactors, fStringOfMaterials, G4Exception(), ReadAndSaveCSFile(), and ReadDiffCSFile().

Referenced by G4DNAPTBExcitationModel::Initialise(), G4DNAPTBElasticModel::Initialise(), and G4DNAPTBIonisationModel::Initialise().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4int G4VDNAModel::RandomSelectShell ( G4double  k,
const G4String particle,
const G4String materialName 
)
protected

RandomSelectShell Method to randomely select a shell from the data table uploaded. The size of the table (number of columns) is used to determine the total number of possible shells.

Parameters
k
particle
materialName
Returns
the selected shell

Definition at line 182 of file G4VDNAModel.cc.

View newest version in sPHENIX GitHub at line 182 of file G4VDNAModel.cc

References FatalException, G4VEMDataSet::FindValue(), G4Exception(), G4UniformRand, G4DNACrossSectionDataSet::GetComponent(), GetTableData(), n, G4DNACrossSectionDataSet::NumberOfComponents(), and pos().

Referenced by G4DNAPTBExcitationModel::SampleSecondaries(), and G4DNAPTBIonisationModel::SampleSecondaries().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4VDNAModel::ReadAndSaveCSFile ( const G4String materialName,
const G4String particleName,
const G4String file,
G4double  scaleFactor 
)
protected

ReadAndSaveCSFile Read and save a "simple" cross section file : use of G4DNACrossSectionDataSet->loadData()

Parameters
materialName
particleName
file
scaleFactor

Definition at line 174 of file G4VDNAModel.cc.

View newest version in sPHENIX GitHub at line 174 of file G4VDNAModel.cc

References eV, and fTableData.

Referenced by LoadCrossSectionData().

+ Here is the caller graph for this function:

void G4VDNAModel::ReadDiffCSFile ( const G4String materialName,
const G4String particleName,
const G4String path,
const G4double  scaleFactor 
)
protectedvirtual

ReadDiffCSFile Virtual method that need to be implemented if one wish to use the differential cross sections. The read method for that kind of information is not standardized yet.

Parameters
materialName
particleName
path
scaleFactor

Reimplemented in G4DNAPTBIonisationModel, and G4DNAPTBElasticModel.

Definition at line 126 of file G4VDNAModel.cc.

View newest version in sPHENIX GitHub at line 126 of file G4VDNAModel.cc

References FatalException, and G4Exception().

Referenced by LoadCrossSectionData().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual void G4VDNAModel::SampleSecondaries ( std::vector< G4DynamicParticle * > *  ,
const G4MaterialCutsCouple ,
const G4String materialName,
const G4DynamicParticle ,
G4ParticleChangeForGamma particleChangeForGamma,
G4double  tmin = 0,
G4double  tmax = DBL_MAX 
)
pure virtual

SampleSecondaries Each model must implement SampleSecondaries to decide if a particle will be created after the ModelInterface or if any charateristic of the incident particle will change.

Parameters
materialName
particleChangeForGamma
tmin
tmax

Implemented in G4DNAPTBIonisationModel, G4DNAPTBElasticModel, G4DNAPTBExcitationModel, G4DNAVacuumModel, and G4DNADummyModel.

Referenced by G4DNAModelInterface::SampleSecondaries().

+ Here is the caller graph for this function:

void G4VDNAModel::SetHighELimit ( const G4String material,
const G4String particle,
G4double  lim 
)
inline

SetHighEnergyLimit.

Parameters
material
particle
lim

Definition at line 169 of file G4VDNAModel.hh.

View newest version in sPHENIX GitHub at line 169 of file G4VDNAModel.hh

References fHighEnergyLimits, material(), and particle.

Referenced by G4DNADummyModel::Initialise(), G4DNAPTBExcitationModel::Initialise(), G4DNAPTBElasticModel::Initialise(), and G4DNAPTBIonisationModel::Initialise().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4VDNAModel::SetLowELimit ( const G4String material,
const G4String particle,
G4double  lim 
)
inline

SetLowEnergyLimit.

Parameters
material
particle
lim

Definition at line 177 of file G4VDNAModel.hh.

View newest version in sPHENIX GitHub at line 177 of file G4VDNAModel.hh

References fLowEnergyLimits, material(), and particle.

Referenced by G4DNADummyModel::Initialise(), G4DNAPTBExcitationModel::Initialise(), G4DNAPTBElasticModel::Initialise(), and G4DNAPTBIonisationModel::Initialise().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

std::map<G4String, std::map<G4String, G4double> > G4VDNAModel::fHighEnergyLimits
private

List the high energy limits.

Definition at line 301 of file G4VDNAModel.hh.

View newest version in sPHENIX GitHub at line 301 of file G4VDNAModel.hh

Referenced by GetHighELimit(), and SetHighELimit().

std::map<G4String, std::map<G4String, G4double> > G4VDNAModel::fLowEnergyLimits
private

List the low energy limits.

Definition at line 300 of file G4VDNAModel.hh.

View newest version in sPHENIX GitHub at line 300 of file G4VDNAModel.hh

Referenced by GetLowELimit(), and SetLowELimit().

std::vector<G4String> G4VDNAModel::fModelCSFiles
private

List the cross section data files.

Definition at line 296 of file G4VDNAModel.hh.

View newest version in sPHENIX GitHub at line 296 of file G4VDNAModel.hh

Referenced by AddCrossSectionData(), and LoadCrossSectionData().

std::vector<G4String> G4VDNAModel::fModelDiffCSFiles
private

List the differential corss section data files.

Definition at line 297 of file G4VDNAModel.hh.

View newest version in sPHENIX GitHub at line 297 of file G4VDNAModel.hh

Referenced by AddCrossSectionData(), and LoadCrossSectionData().

std::vector<G4String> G4VDNAModel::fModelMaterials
private

List the materials that can be activated (and will be by default) within the model.

Definition at line 294 of file G4VDNAModel.hh.

View newest version in sPHENIX GitHub at line 294 of file G4VDNAModel.hh

Referenced by AddCrossSectionData(), and LoadCrossSectionData().

std::vector<G4String> G4VDNAModel::fModelParticles
private

List the particles that can be activated within the model.

Definition at line 295 of file G4VDNAModel.hh.

View newest version in sPHENIX GitHub at line 295 of file G4VDNAModel.hh

Referenced by AddCrossSectionData(), and LoadCrossSectionData().

std::vector<G4double> G4VDNAModel::fModelScaleFactors
private

List the model scale factors (they could change with material)

Definition at line 298 of file G4VDNAModel.hh.

View newest version in sPHENIX GitHub at line 298 of file G4VDNAModel.hh

Referenced by AddCrossSectionData(), and LoadCrossSectionData().

G4String G4VDNAModel::fName
private

model name

Definition at line 303 of file G4VDNAModel.hh.

View newest version in sPHENIX GitHub at line 303 of file G4VDNAModel.hh

Referenced by GetName().

const G4String G4VDNAModel::fStringOfMaterials
private

fStringOfMaterials The user can decide to specify by hand which are the materials the be activated among those implemented in the model. If the user does then only the specified materials contained in this string variable will be activated. The string is like: mat1/mat2/mat3/mat4

Definition at line 286 of file G4VDNAModel.hh.

View newest version in sPHENIX GitHub at line 286 of file G4VDNAModel.hh

Referenced by LoadCrossSectionData().

TableMapData G4VDNAModel::fTableData
private

fTableData It contains the cross section data and can be used like: dataTable=fTableData[material][particle]

Definition at line 292 of file G4VDNAModel.hh.

View newest version in sPHENIX GitHub at line 292 of file G4VDNAModel.hh

Referenced by EnableForMaterialAndParticle(), GetTableData(), IsMaterialExistingInModel(), IsParticleExistingInModelForMaterial(), ReadAndSaveCSFile(), and ~G4VDNAModel().


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