Import Geant4 11.2.0.beta source tree
This commit is contained in:
@@ -29,126 +29,111 @@
|
||||
//
|
||||
// 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.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:
|
||||
// Authors of this class:
|
||||
// M.C. Bordage, M. Terrissol, S. Edel, J. Bordes, S. Incerti
|
||||
//
|
||||
// 15.01.2014: creation
|
||||
//
|
||||
// Based on the study by S. Zein et. al. Nucl. Inst. Meth. B 488 (2021) 70-82
|
||||
// 1/2/2023 : Hoang added modification
|
||||
|
||||
#ifndef G4DNACPA100ElasticModel_h
|
||||
#define G4DNACPA100ElasticModel_h 1
|
||||
|
||||
#include <map>
|
||||
#include "G4DNACrossSectionDataSet.hh"
|
||||
#include "G4VEmModel.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4ParticleChangeForGamma.hh"
|
||||
#include "G4LogLogInterpolation.hh"
|
||||
//#include "G4DNACPA100LogLogInterpolation.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4ParticleChangeForGamma.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
#include "G4VDNAModel.hh"
|
||||
|
||||
class G4DNACPA100ElasticModel : public G4VEmModel
|
||||
#include <map>
|
||||
|
||||
class G4DNACPA100ElasticModel : public G4VDNAModel
|
||||
{
|
||||
using TriDimensionMap =
|
||||
std::map<std::size_t, std::map<const G4ParticleDefinition*,
|
||||
std::map<G4double, std::map<G4double, G4double>>>>;
|
||||
using VecMap =
|
||||
std::map<std::size_t,
|
||||
std::map<const G4ParticleDefinition*, std::map<G4double, std::vector<G4double>>>>;
|
||||
|
||||
public:
|
||||
public:
|
||||
explicit G4DNACPA100ElasticModel(const G4ParticleDefinition* p = nullptr,
|
||||
const G4String& nam = "DNACPA100ElasticModel");
|
||||
|
||||
G4DNACPA100ElasticModel(const G4ParticleDefinition* p = 0,
|
||||
const G4String& nam = "DNACPA100ElasticModel");
|
||||
~G4DNACPA100ElasticModel() override = default;
|
||||
|
||||
virtual ~G4DNACPA100ElasticModel();
|
||||
void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
|
||||
|
||||
virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
|
||||
G4double CrossSectionPerVolume(const G4Material* material, const G4ParticleDefinition* p,
|
||||
G4double ekin, G4double emin, G4double emax) override;
|
||||
|
||||
virtual G4double CrossSectionPerVolume(const G4Material* material,
|
||||
const G4ParticleDefinition* p,
|
||||
G4double ekin,
|
||||
G4double emin,
|
||||
G4double emax);
|
||||
void SampleSecondaries(std::vector<G4DynamicParticle*>*, const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*, G4double tmin, G4double maxEnergy) override;
|
||||
|
||||
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*,
|
||||
G4double tmin,
|
||||
G4double maxEnergy);
|
||||
|
||||
inline void SelectStationary(G4bool input);
|
||||
inline void SelectStationary(G4bool input);
|
||||
|
||||
protected:
|
||||
G4DNACPA100ElasticModel& operator=(const G4DNACPA100ElasticModel& right) = delete;
|
||||
|
||||
G4ParticleChangeForGamma* fParticleChangeForGamma;
|
||||
G4DNACPA100ElasticModel(const G4DNACPA100ElasticModel&) = delete;
|
||||
|
||||
private:
|
||||
|
||||
G4bool statCode;
|
||||
inline G4double GetElasticLevel(const std::size_t& l)
|
||||
{
|
||||
return fLevels[l];
|
||||
}
|
||||
|
||||
// Water density table
|
||||
const std::vector<G4double>* fpMolWaterDensity;
|
||||
private:
|
||||
G4ParticleChangeForGamma* fParticleChangeForGamma = nullptr;
|
||||
G4bool statCode = false;
|
||||
G4bool isInitialised = false;
|
||||
G4int verboseLevel = 0;
|
||||
|
||||
G4bool isInitialised;
|
||||
G4int verboseLevel;
|
||||
|
||||
// Cross section
|
||||
|
||||
typedef std::map<G4String,G4String,std::less<G4String> > MapFile;
|
||||
MapFile tableFile;
|
||||
G4double Theta(const G4ParticleDefinition* p, G4double k, G4double integrDiff,
|
||||
const std::size_t& materialID);
|
||||
|
||||
typedef std::map<G4String,G4DNACrossSectionDataSet*,std::less<G4String> > MapData;
|
||||
MapData tableData;
|
||||
|
||||
// Final state
|
||||
G4double LinLinInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
|
||||
|
||||
//G4double DifferentialCrossSection(G4ParticleDefinition * aParticleDefinition, G4double k, G4double theta);
|
||||
G4double LinLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
|
||||
|
||||
G4double Theta(G4ParticleDefinition * aParticleDefinition, G4double k, G4double integrDiff);
|
||||
|
||||
G4double LinLinInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
|
||||
G4double LogLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
|
||||
|
||||
G4double LinLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
|
||||
|
||||
G4double LogLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
|
||||
|
||||
G4double QuadInterpolator(G4double e11,
|
||||
G4double e12,
|
||||
G4double e21,
|
||||
G4double e22,
|
||||
G4double x11,
|
||||
G4double x12,
|
||||
G4double x21,
|
||||
G4double x22,
|
||||
G4double t1,
|
||||
G4double t2,
|
||||
G4double t,
|
||||
G4double e);
|
||||
G4double QuadInterpolator(G4double e11, G4double e12, G4double e21, G4double e22, G4double x11,
|
||||
G4double x12, G4double x21, G4double x22, G4double t1, G4double t2,
|
||||
G4double t, G4double e);
|
||||
|
||||
typedef std::map<G4double, std::map<G4double, G4double> > TriDimensionMap;
|
||||
G4double fKillBelowEnergy = 0.;
|
||||
TriDimensionMap diffCrossSectionData;
|
||||
VecMap eValuesVect;
|
||||
std::map<std::size_t, std::map<const G4ParticleDefinition*, std::vector<G4double>>> tValuesVec;
|
||||
|
||||
TriDimensionMap eDiffCrossSectionData;
|
||||
std::vector<G4double> eTdummyVec;
|
||||
G4double RandomizeCosTheta(G4double k, const std::size_t& materialID);
|
||||
|
||||
typedef std::map<G4double, std::vector<G4double> > VecMap;
|
||||
VecMap eVecm;
|
||||
|
||||
G4double RandomizeCosTheta(G4double k);
|
||||
|
||||
//
|
||||
|
||||
G4DNACPA100ElasticModel & operator=(const G4DNACPA100ElasticModel &right);
|
||||
G4DNACPA100ElasticModel(const G4DNACPA100ElasticModel&);
|
||||
void ReadDiffCSFile(const std::size_t& id, const G4ParticleDefinition* p, const G4String& file,
|
||||
const G4double&) override;
|
||||
|
||||
const G4Material* fpGuanine = nullptr;
|
||||
const G4Material* fpG4_WATER = nullptr;
|
||||
const G4Material* fpDeoxyribose = nullptr;
|
||||
const G4Material* fpCytosine = nullptr;
|
||||
const G4Material* fpThymine = nullptr;
|
||||
const G4Material* fpAdenine = nullptr;
|
||||
const G4Material* fpPhosphate = nullptr;
|
||||
const G4ParticleDefinition* fpParticle = nullptr;
|
||||
|
||||
G4DNACPA100ElasticModel* fpModelData = nullptr;
|
||||
|
||||
std::map<std::size_t /*MatIndex*/, G4double> fLevels;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline void G4DNACPA100ElasticModel::SelectStationary (G4bool input)
|
||||
{
|
||||
statCode = input;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline void G4DNACPA100ElasticModel::SelectStationary(G4bool input)
|
||||
{
|
||||
statCode = input;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,102 +29,75 @@
|
||||
//
|
||||
// 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.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:
|
||||
// Authors of this class:
|
||||
// M.C. Bordage, M. Terrissol, S. Edel, J. Bordes, S. Incerti
|
||||
//
|
||||
// 15.01.2014: creation
|
||||
//
|
||||
// Based on the study by S. Zein et. al. Nucl. Inst. Meth. B 488 (2021) 70-82
|
||||
// 1/2/2023 : Hoang added modification for DNA cross sections
|
||||
|
||||
#ifndef G4DNACPA100ExcitationModel_h
|
||||
#define G4DNACPA100ExcitationModel_h 1
|
||||
|
||||
#include "G4VEmModel.hh"
|
||||
#include "G4DNACPA100ExcitationStructure.hh"
|
||||
#include "G4DNACrossSectionDataSet.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4LogLogInterpolation.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4ParticleChangeForGamma.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
|
||||
#include "G4DNACrossSectionDataSet.hh"
|
||||
#include "G4LogLogInterpolation.hh"
|
||||
//#include "G4DNACPA100LogLogInterpolation.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4DNACPA100WaterExcitationStructure.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4VDNAModel.hh"
|
||||
|
||||
class G4DNACPA100ExcitationModel : public G4VEmModel
|
||||
class G4DNACPA100ExcitationModel : public G4VDNAModel
|
||||
{
|
||||
public:
|
||||
explicit G4DNACPA100ExcitationModel(const G4ParticleDefinition* p = nullptr,
|
||||
const G4String& nam = "DNACPA100ExcitationModel");
|
||||
|
||||
public:
|
||||
~G4DNACPA100ExcitationModel() override = default;
|
||||
|
||||
G4DNACPA100ExcitationModel(const G4ParticleDefinition* p = 0,
|
||||
const G4String& nam = "DNACPA100ExcitationModel");
|
||||
void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
|
||||
|
||||
virtual ~G4DNACPA100ExcitationModel();
|
||||
G4double CrossSectionPerVolume(const G4Material* material, const G4ParticleDefinition* p,
|
||||
G4double ekin, G4double emin, G4double emax) override;
|
||||
|
||||
virtual void Initialise(const G4ParticleDefinition*, const G4DataVector& = *(new G4DataVector()) );
|
||||
void SampleSecondaries(std::vector<G4DynamicParticle*>*, const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*, G4double tmin, G4double maxEnergy) override;
|
||||
|
||||
virtual G4double CrossSectionPerVolume( const G4Material* material,
|
||||
const G4ParticleDefinition* p,
|
||||
G4double ekin,
|
||||
G4double emin,
|
||||
G4double emax);
|
||||
inline void SelectStationary(G4bool input);
|
||||
|
||||
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*,
|
||||
G4double tmin,
|
||||
G4double maxEnergy);
|
||||
G4DNACPA100ExcitationModel& operator=(const G4DNACPA100ExcitationModel& right) = delete;
|
||||
|
||||
inline void SelectStationary(G4bool input);
|
||||
|
||||
protected:
|
||||
|
||||
G4ParticleChangeForGamma* fParticleChangeForGamma;
|
||||
|
||||
private:
|
||||
|
||||
G4bool statCode;
|
||||
|
||||
// Water density table
|
||||
const std::vector<G4double>* fpMolWaterDensity;
|
||||
|
||||
std::map<G4String,G4double,std::less<G4String> > lowEnergyLimit;
|
||||
std::map<G4String,G4double,std::less<G4String> > highEnergyLimit;
|
||||
|
||||
G4bool isInitialised;
|
||||
G4int verboseLevel;
|
||||
|
||||
// Cross section
|
||||
|
||||
typedef std::map<G4String,G4String,std::less<G4String> > MapFile;
|
||||
MapFile tableFile;
|
||||
|
||||
typedef std::map<G4String,G4DNACrossSectionDataSet*,std::less<G4String> > MapData;
|
||||
MapData tableData;
|
||||
|
||||
// Partial cross section
|
||||
|
||||
G4int RandomSelect(G4double energy,const G4String& particle );
|
||||
|
||||
// Final state
|
||||
|
||||
G4DNACPA100WaterExcitationStructure waterStructure;
|
||||
|
||||
//
|
||||
|
||||
G4DNACPA100ExcitationModel & operator=(const G4DNACPA100ExcitationModel &right);
|
||||
G4DNACPA100ExcitationModel(const G4DNACPA100ExcitationModel&);
|
||||
G4DNACPA100ExcitationModel(const G4DNACPA100ExcitationModel&) = delete;
|
||||
G4int verboseLevel = 0;
|
||||
|
||||
private:
|
||||
G4ParticleChangeForGamma* fParticleChangeForGamma = nullptr;
|
||||
G4bool statCode = false;
|
||||
G4bool isInitialised = false;
|
||||
G4DNACPA100ExcitationStructure eStructure;
|
||||
const G4Material* fpGuanine = nullptr;
|
||||
const G4Material* fpG4_WATER = nullptr;
|
||||
const G4Material* fpDeoxyribose = nullptr;
|
||||
const G4Material* fpCytosine = nullptr;
|
||||
const G4Material* fpThymine = nullptr;
|
||||
const G4Material* fpAdenine = nullptr;
|
||||
const G4Material* fpPhosphate = nullptr;
|
||||
const G4ParticleDefinition* fpParticle = nullptr;
|
||||
G4DNACPA100ExcitationModel* fpModelData = nullptr;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline void G4DNACPA100ExcitationModel::SelectStationary (G4bool input)
|
||||
{
|
||||
statCode = input;
|
||||
}
|
||||
inline void G4DNACPA100ExcitationModel::SelectStationary(G4bool input)
|
||||
{
|
||||
statCode = input;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
|
||||
+93
-113
@@ -29,173 +29,153 @@
|
||||
//
|
||||
// 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.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:
|
||||
// Authors of this class:
|
||||
// M.C. Bordage, M. Terrissol, S. Edel, J. Bordes, S. Incerti
|
||||
//
|
||||
// 15.01.2014: creation
|
||||
//
|
||||
// Based on the study by S. Zein et. al. Nucl. Inst. Meth. B 488 (2021) 70-82
|
||||
// 1/2/2023 : Hoang added modification for DNA cross sections
|
||||
|
||||
#ifndef G4DNACPA100IonisationModel_h
|
||||
#define G4DNACPA100IonisationModel_h 1
|
||||
|
||||
#include "G4VEmModel.hh"
|
||||
#include "G4ParticleChangeForGamma.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
|
||||
#include "G4DNACPA100IonisationStructure.hh"
|
||||
#include "G4DNACrossSectionDataSet.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Proton.hh"
|
||||
|
||||
#include "G4LogLogInterpolation.hh"
|
||||
//#include "G4DNACPA100LogLogInterpolation.hh"
|
||||
|
||||
#include "G4DNACPA100WaterIonisationStructure.hh"
|
||||
#include "G4VAtomDeexcitation.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4ParticleChangeForGamma.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
#include "G4VAtomDeexcitation.hh"
|
||||
#include "G4VDNAModel.hh"
|
||||
|
||||
|
||||
class G4DNACPA100IonisationModel : public G4VEmModel
|
||||
class G4DNACPA100IonisationModel : public G4VDNAModel
|
||||
{
|
||||
using TriDimensionMap =
|
||||
std::map<std::size_t,
|
||||
std::map<const G4ParticleDefinition*,
|
||||
std::map<G4int, std::map<G4double, std::map<G4double, G4double>>>>>;
|
||||
using VecMap =
|
||||
std::map<std::size_t,
|
||||
std::map<const G4ParticleDefinition*, std::map<G4double, std::vector<G4double>>>>;
|
||||
using VecMapWithShell =
|
||||
std::map<std::size_t,
|
||||
std::map<const G4ParticleDefinition*,
|
||||
std::map<G4double, std::map<G4double, std::vector<G4double>>>>>;
|
||||
using PartKineticInMat =
|
||||
const std::tuple<std::size_t /*Mat*/, G4double /*Energy*/, G4int /*shell*/>&;
|
||||
|
||||
public:
|
||||
public:
|
||||
explicit G4DNACPA100IonisationModel(const G4ParticleDefinition* p = nullptr,
|
||||
const G4String& nam = "DNACPA100IonisationModel");
|
||||
|
||||
G4DNACPA100IonisationModel(const G4ParticleDefinition* p = 0,
|
||||
const G4String& nam = "DNACPA100IonisationModel");
|
||||
~G4DNACPA100IonisationModel() override = default;
|
||||
|
||||
virtual ~G4DNACPA100IonisationModel();
|
||||
void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
|
||||
|
||||
virtual void Initialise(const G4ParticleDefinition*, const G4DataVector& = *(new G4DataVector()));
|
||||
G4double CrossSectionPerVolume(const G4Material* material, const G4ParticleDefinition* p,
|
||||
G4double ekin, G4double emin, G4double emax) override;
|
||||
|
||||
virtual G4double CrossSectionPerVolume( const G4Material* material,
|
||||
const G4ParticleDefinition* p,
|
||||
G4double ekin,
|
||||
G4double emin,
|
||||
G4double emax);
|
||||
void SampleSecondaries(std::vector<G4DynamicParticle*>*, const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*, G4double tmin, G4double maxEnergy) override;
|
||||
|
||||
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*,
|
||||
G4double tmin,
|
||||
G4double maxEnergy);
|
||||
|
||||
G4double DifferentialCrossSection(G4ParticleDefinition * aParticleDefinition, G4double k, G4double energyTransfer, G4int shell);
|
||||
G4double DifferentialCrossSection(PartKineticInMat info, const G4double& energyTransfer);
|
||||
|
||||
inline void SelectFasterComputation(G4bool input);
|
||||
// G4double DifferentialCrossSection(const G4double& k,
|
||||
// const G4double& energyTransfer, const G4int&
|
||||
// ionizationLevelIndex, const std::size_t& materialID);
|
||||
|
||||
inline void SelectUseDcs(G4bool input);
|
||||
inline void SelectFasterComputation(G4bool input);
|
||||
|
||||
inline void SelectStationary(G4bool input);
|
||||
inline void SelectUseDcs(G4bool input);
|
||||
|
||||
protected:
|
||||
inline void SelectStationary(G4bool input);
|
||||
|
||||
G4ParticleChangeForGamma* fParticleChangeForGamma;
|
||||
G4DNACPA100IonisationModel& operator=(const G4DNACPA100IonisationModel& right) = delete;
|
||||
G4DNACPA100IonisationModel(const G4DNACPA100IonisationModel&) = delete;
|
||||
void ReadDiffCSFile(const std::size_t& materialID, const G4ParticleDefinition* p,
|
||||
const G4String& file, const G4double& scaleFactor) override;
|
||||
|
||||
private:
|
||||
protected:
|
||||
G4ParticleChangeForGamma* fParticleChangeForGamma = nullptr;
|
||||
|
||||
G4bool statCode;
|
||||
private:
|
||||
G4bool statCode = false;
|
||||
G4bool fasterCode = true;
|
||||
G4bool useDcs = false;
|
||||
|
||||
G4bool fasterCode;
|
||||
G4bool useDcs;
|
||||
// const std::vector<G4double>* fpMolMaterialDensity;
|
||||
|
||||
// Water density table
|
||||
const std::vector<G4double>* fpMolWaterDensity;
|
||||
// Deexcitation manager to produce fluo photons and e-
|
||||
G4VAtomDeexcitation* fAtomDeexcitation = nullptr;
|
||||
|
||||
// Deexcitation manager to produce fluo photons and e-
|
||||
G4VAtomDeexcitation* fAtomDeexcitation;
|
||||
G4bool isInitialised = false;
|
||||
G4int verboseLevel = 0;
|
||||
|
||||
std::map<G4String,G4double,std::less<G4String> > lowEnergyLimit;
|
||||
std::map<G4String,G4double,std::less<G4String> > highEnergyLimit;
|
||||
G4DNACPA100IonisationStructure iStructure;
|
||||
|
||||
G4bool isInitialised;
|
||||
G4int verboseLevel;
|
||||
|
||||
// Cross section
|
||||
G4double RandomizeEjectedElectronEnergy(PartKineticInMat info);
|
||||
|
||||
typedef std::map<G4String,G4String,std::less<G4String> > MapFile;
|
||||
MapFile tableFile;
|
||||
G4double RandomizeEjectedElectronEnergyFromCumulatedDcs(PartKineticInMat info);
|
||||
|
||||
typedef std::map<G4String,G4DNACrossSectionDataSet*,std::less<G4String> > MapData;
|
||||
MapData tableData;
|
||||
|
||||
// Final state
|
||||
|
||||
G4DNACPA100WaterIonisationStructure waterStructure;
|
||||
G4double RandomizeEjectedElectronEnergyFromanalytical(PartKineticInMat info);
|
||||
|
||||
G4double RandomizeEjectedElectronEnergy(G4ParticleDefinition * aParticleDefinition, G4double incomingParticleEnergy, G4int shell) ;
|
||||
G4double RandomTransferedEnergy(PartKineticInMat info);
|
||||
|
||||
G4double RandomizeEjectedElectronEnergyFromCumulatedDcs(G4ParticleDefinition * aParticleDefinition, G4double incomingParticleEnergy, G4int shell) ;
|
||||
void RandomizeEjectedElectronDirection(G4ParticleDefinition* aParticleDefinition,
|
||||
G4double incomingParticleEnergy,
|
||||
G4double outgoingParticleEnergy, G4double& cosTheta,
|
||||
G4double& phi);
|
||||
|
||||
G4double RandomizeEjectedElectronEnergyFromCompositionSampling(G4ParticleDefinition * aParticleDefinition, G4double incomingParticleEnergy, G4int shell) ;
|
||||
G4double Interpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
|
||||
|
||||
G4double RandomTransferedEnergy(G4ParticleDefinition * aParticleDefinition, G4double incomingParticleEnergy, G4int shell) ;
|
||||
G4double QuadInterpolator(G4double e11, G4double e12, G4double e21, G4double e22, G4double x11,
|
||||
G4double x12, G4double x21, G4double x22, G4double t1, G4double t2,
|
||||
G4double t, G4double e);
|
||||
|
||||
void RandomizeEjectedElectronDirection(G4ParticleDefinition * aParticleDefinition, G4double incomingParticleEnergy, G4double
|
||||
outgoingParticleEnergy, G4double & cosTheta, G4double & phi );
|
||||
|
||||
G4double Interpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
|
||||
|
||||
G4double QuadInterpolator( G4double e11,
|
||||
G4double e12,
|
||||
G4double e21,
|
||||
G4double e22,
|
||||
G4double x11,
|
||||
G4double x12,
|
||||
G4double x21,
|
||||
G4double x22,
|
||||
G4double t1,
|
||||
G4double t2,
|
||||
G4double t,
|
||||
G4double e);
|
||||
|
||||
typedef std::map<G4double, std::map<G4double, G4double> > TriDimensionMap;
|
||||
|
||||
TriDimensionMap eDiffCrossSectionData[6];
|
||||
TriDimensionMap eNrjTransfData[6]; // for cumulated dcs
|
||||
|
||||
std::vector<G4double> eTdummyVec;
|
||||
|
||||
typedef std::map<G4double, std::vector<G4double> > VecMap;
|
||||
|
||||
VecMap eVecm;
|
||||
|
||||
VecMap eProbaShellMap[6]; // for cumulated dcs
|
||||
|
||||
// Partial cross section
|
||||
|
||||
G4int RandomSelect(G4double energy,const G4String& particle );
|
||||
|
||||
//
|
||||
|
||||
G4DNACPA100IonisationModel & operator=(const G4DNACPA100IonisationModel &right);
|
||||
G4DNACPA100IonisationModel(const G4DNACPA100IonisationModel&);
|
||||
TriDimensionMap diffCrossSectionData, fEnergySecondaryData;
|
||||
std::map<std::size_t, std::map<const G4ParticleDefinition*, std::vector<G4double>>>
|
||||
fTMapWithVec;
|
||||
VecMap fEMapWithVector;
|
||||
VecMapWithShell fProbaShellMap;
|
||||
|
||||
const G4Material* fpGuanine = nullptr;
|
||||
const G4Material* fpG4_WATER = nullptr;
|
||||
const G4Material* fpDeoxyribose = nullptr;
|
||||
const G4Material* fpCytosine = nullptr;
|
||||
const G4Material* fpThymine = nullptr;
|
||||
const G4Material* fpAdenine = nullptr;
|
||||
const G4Material* fpPhosphate = nullptr;
|
||||
const G4ParticleDefinition* fpParticle = nullptr;
|
||||
G4DNACPA100IonisationModel* fpModelData = nullptr;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline void G4DNACPA100IonisationModel::SelectFasterComputation (G4bool input)
|
||||
{
|
||||
fasterCode = input;
|
||||
}
|
||||
inline void G4DNACPA100IonisationModel::SelectFasterComputation(G4bool input)
|
||||
{
|
||||
fasterCode = input;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline void G4DNACPA100IonisationModel::SelectUseDcs (G4bool input)
|
||||
{
|
||||
useDcs = input;
|
||||
}
|
||||
inline void G4DNACPA100IonisationModel::SelectUseDcs(G4bool input)
|
||||
{
|
||||
useDcs = input;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline void G4DNACPA100IonisationModel::SelectStationary (G4bool input)
|
||||
{
|
||||
statCode = input;
|
||||
}
|
||||
inline void G4DNACPA100IonisationModel::SelectStationary(G4bool input)
|
||||
{
|
||||
statCode = input;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
|
||||
+38
-55
@@ -31,7 +31,6 @@
|
||||
#include "G4VEmModel.hh"
|
||||
#include "G4ParticleChangeForGamma.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4DNAGenericIonsManager.hh"
|
||||
@@ -39,94 +38,78 @@
|
||||
|
||||
class G4DNADingfelderChargeIncreaseModel : public G4VEmModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
G4DNADingfelderChargeIncreaseModel(const G4ParticleDefinition* p = 0,
|
||||
explicit G4DNADingfelderChargeIncreaseModel(const G4ParticleDefinition* p = nullptr,
|
||||
const G4String& nam = "DNADingfelderChargeIncreaseModel");
|
||||
|
||||
virtual ~G4DNADingfelderChargeIncreaseModel();
|
||||
|
||||
virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
|
||||
|
||||
virtual G4double CrossSectionPerVolume(const G4Material* material,
|
||||
~G4DNADingfelderChargeIncreaseModel() override = default;
|
||||
void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
|
||||
G4double CrossSectionPerVolume(const G4Material* material,
|
||||
const G4ParticleDefinition* p,
|
||||
G4double ekin,
|
||||
G4double emin,
|
||||
G4double emax);
|
||||
|
||||
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
G4double emax) override;
|
||||
void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*,
|
||||
G4double tmin,
|
||||
G4double maxEnergy);
|
||||
|
||||
inline void SelectStationary(G4bool input);
|
||||
|
||||
G4double maxEnergy) override;
|
||||
inline void SelectStationary(G4bool input);
|
||||
protected:
|
||||
|
||||
G4ParticleChangeForGamma* fParticleChangeForGamma;
|
||||
|
||||
G4ParticleChangeForGamma* fParticleChangeForGamma = nullptr;
|
||||
private:
|
||||
|
||||
// Water density table
|
||||
const std::vector<G4double>* fpMolWaterDensity;
|
||||
const std::vector<G4double>* fpMolWaterDensity = nullptr;
|
||||
|
||||
std::map<G4String,G4double,std::less<G4String> > lowEnergyLimit;
|
||||
std::map<G4String,G4double,std::less<G4String> > highEnergyLimit;
|
||||
|
||||
G4bool isInitialised, statCode;
|
||||
G4int verboseLevel;
|
||||
G4bool isInitialised = false, statCode = false;
|
||||
// Verbosity scale:
|
||||
// 0 = nothing
|
||||
// 1 = warning for energy non-conservation
|
||||
// 2 = details of energy budget
|
||||
// 3 = calculation of cross sections, file openings, sampling of atoms
|
||||
// 4 = entering in methods
|
||||
G4int verboseLevel = 0;
|
||||
|
||||
// Partial cross section
|
||||
|
||||
G4double PartialCrossSection(G4double energy, G4int level, const G4ParticleDefinition* particle);
|
||||
G4double PartialCrossSection(const G4double& energy, const G4int& level, const G4ParticleDefinition* particle);
|
||||
|
||||
G4double Sum(G4double energy, const G4ParticleDefinition* particle);
|
||||
G4double Sum(const G4double& energy, const G4ParticleDefinition* particle);
|
||||
|
||||
G4int RandomSelect(G4double energy, const G4ParticleDefinition* particle);
|
||||
G4int RandomSelect(const G4double& energy, const G4ParticleDefinition* particle);
|
||||
|
||||
G4int numberOfPartialCrossSections[2]; // 2 is the particle type index
|
||||
|
||||
G4double f0[2][2];
|
||||
G4double a0[2][2];
|
||||
G4double a1[2][2];
|
||||
G4double b0[2][2];
|
||||
G4double b1[2][2];
|
||||
G4double c0[2][2];
|
||||
G4double d0[2][2];
|
||||
G4double x0[2][2];
|
||||
G4double x1[2][2];
|
||||
G4int numberOfPartialCrossSections[2] = {0}; // 2 is the particle type index
|
||||
G4double f0[2][2] = {{0, 0},{0, 0}};
|
||||
G4double a0[2][2] = {{0, 0},{0, 0}};
|
||||
G4double a1[2][2] = {{0, 0},{0, 0}};
|
||||
G4double b0[2][2] = {{0, 0},{0, 0}};
|
||||
G4double b1[2][2] = {{0, 0},{0, 0}};
|
||||
G4double c0[2][2] = {{0, 0},{0, 0}};
|
||||
G4double d0[2][2] = {{0, 0},{0, 0}};
|
||||
G4double x0[2][2] = {{0, 0},{0, 0}};
|
||||
G4double x1[2][2] = {{0, 0},{0, 0}};
|
||||
|
||||
// Final state
|
||||
|
||||
G4int NumberOfFinalStates(G4ParticleDefinition* particleDefinition, G4int finalStateIndex);
|
||||
|
||||
G4ParticleDefinition* OutgoingParticleDefinition(G4ParticleDefinition* particleDefinition, G4int finalStateIndex);
|
||||
|
||||
G4double WaterBindingEnergyConstant(G4ParticleDefinition * aParticleDefinition, G4int finalStateIndex);
|
||||
|
||||
G4double OutgoingParticleBindingEnergyConstant(G4ParticleDefinition* particleDefinition, G4int finalStateIndex);
|
||||
|
||||
G4double IncomingParticleBindingEnergyConstant(G4ParticleDefinition* particleDefinition, G4int finalStateIndex);
|
||||
|
||||
//
|
||||
|
||||
G4DNADingfelderChargeIncreaseModel & operator=(const G4DNADingfelderChargeIncreaseModel &right);
|
||||
G4DNADingfelderChargeIncreaseModel(const G4DNADingfelderChargeIncreaseModel&);
|
||||
|
||||
G4DNADingfelderChargeIncreaseModel & operator=(const G4DNADingfelderChargeIncreaseModel &right)= delete;
|
||||
G4DNADingfelderChargeIncreaseModel(const G4DNADingfelderChargeIncreaseModel&) = delete;
|
||||
// Reusable particle definitions
|
||||
G4ParticleDefinition* hydrogenDef;
|
||||
G4ParticleDefinition* alphaPlusPlusDef;
|
||||
G4ParticleDefinition* alphaPlusDef;
|
||||
G4ParticleDefinition* heliumDef;
|
||||
G4ParticleDefinition* hydrogenDef = nullptr;
|
||||
G4ParticleDefinition* alphaPlusPlusDef = nullptr;
|
||||
G4ParticleDefinition* alphaPlusDef = nullptr;
|
||||
G4ParticleDefinition* heliumDef = nullptr;
|
||||
|
||||
};
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline void G4DNADingfelderChargeIncreaseModel::SelectStationary (G4bool input)
|
||||
{
|
||||
statCode = input;
|
||||
statCode = input;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// Contact authors: S. Meylan, C. Villagrasa
|
||||
//
|
||||
// email: sylvain.meylan@symalgo-tech.com, carmen.villagrasa@irsn.fr
|
||||
|
||||
#ifndef G4DNADUMMYMODEL_HH
|
||||
#define G4DNADUMMYMODEL_HH
|
||||
|
||||
#include "G4VDNAModel.hh"
|
||||
#include "G4VEmModel.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4ParticleChangeForGamma.hh"
|
||||
|
||||
class G4DNADummyModel : public G4VDNAModel
|
||||
{
|
||||
public:
|
||||
G4DNADummyModel(const G4String& applyToMaterial,
|
||||
const G4ParticleDefinition* p,
|
||||
const G4String& nam,
|
||||
G4VEmModel* emModel);
|
||||
~G4DNADummyModel();
|
||||
|
||||
virtual void Initialise(const G4ParticleDefinition* particle, const G4DataVector& = *(new G4DataVector()), G4ParticleChangeForGamma* changeForGamme=nullptr);
|
||||
|
||||
virtual G4double CrossSectionPerVolume(const G4Material* material,
|
||||
const G4String& materialName,
|
||||
const G4ParticleDefinition* p,
|
||||
G4double ekin,
|
||||
G4double emin,
|
||||
G4double emax);
|
||||
|
||||
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4String& materialName,
|
||||
const G4DynamicParticle*,
|
||||
G4ParticleChangeForGamma *particleChangeForGamma,
|
||||
G4double tmin,
|
||||
G4double tmax);
|
||||
|
||||
const G4VEmModel* GetEmModel() const {return fpEmModel;}
|
||||
G4VEmModel* GetEmModel() {return fpEmModel;}
|
||||
|
||||
private:
|
||||
G4VEmModel* fpEmModel;
|
||||
const G4ParticleDefinition* fpParticleDef;
|
||||
const std::vector<double>* fMaterialMolPerVol;
|
||||
|
||||
G4double GetNumMoleculePerVolumeUnitForMaterial(const G4Material *mat);
|
||||
};
|
||||
|
||||
#endif // G4DNADUMMYMODEL_HH
|
||||
@@ -57,11 +57,11 @@ class G4DNAEventScheduler : public IEventScheduler
|
||||
using MolType = const G4MolecularConfiguration*;
|
||||
using MapList = std::map<MolType, size_t>;
|
||||
using MapCounter = std::map<MolType, G4int>;
|
||||
G4DNAEventScheduler(const G4DNABoundingBox& boundingBox, G4int pixel);
|
||||
G4DNAEventScheduler();
|
||||
~G4DNAEventScheduler() override;
|
||||
G4DNAEventScheduler(const G4DNAEventScheduler&) = delete;
|
||||
G4DNAEventScheduler& operator=(const G4DNAEventScheduler& right) = delete;
|
||||
void Initialize();
|
||||
void Initialize(const G4DNABoundingBox& boundingBox, G4int pixel);
|
||||
void InitializeInMesh();
|
||||
void Voxelizing();
|
||||
void ReVoxelizing(G4int);
|
||||
@@ -106,11 +106,10 @@ class G4DNAEventScheduler : public IEventScheduler
|
||||
G4double fGlobalTime = 1 * CLHEP::picosecond;
|
||||
G4double fJumpingNumber = 0;
|
||||
G4double fReactionNumber = 0;
|
||||
G4int fPixel;
|
||||
G4int fPixel = 0;
|
||||
G4bool fIsChangeMesh = false;
|
||||
G4bool fSetChangeMesh = true;
|
||||
G4int fStepNumberInMesh = 0;
|
||||
G4double fInitialPixels;
|
||||
G4double fTransferTime = 0.;
|
||||
const G4double C = 20;
|
||||
const G4double D = G4H2O2::Definition()->GetDiffusionCoefficient(); // this is the biggest D
|
||||
|
||||
@@ -27,150 +27,134 @@
|
||||
// Contact authors: S. Meylan, C. Villagrasa
|
||||
//
|
||||
// email: sylvain.meylan@symalgo-tech.com, carmen.villagrasa@irsn.fr
|
||||
// updated : Hoang Tran : 6/1/2023 clean code
|
||||
|
||||
#ifndef G4DNAMODELINTERFACE_HH
|
||||
#define G4DNAMODELINTERFACE_HH
|
||||
|
||||
#include <map>
|
||||
#include "G4DNACrossSectionDataSet.hh"
|
||||
#include "G4VEmModel.hh"
|
||||
#include "G4VDNAModel.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4ParticleChangeForGamma.hh"
|
||||
#include "G4LogLogInterpolation.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4DNADummyModel.hh"
|
||||
|
||||
#include <map>
|
||||
class G4ParticleChangeForGamma;
|
||||
class G4VDNAModel;
|
||||
class G4DNAModelInterface : public G4VEmModel
|
||||
{
|
||||
using MaterialParticleModelTable =
|
||||
std::map<std::size_t /*MatID*/, std::map<const G4ParticleDefinition*, G4VEmModel*>>;
|
||||
//should have only one model
|
||||
public:
|
||||
/*!
|
||||
* \brief G4DNAModelManager
|
||||
* Constructor
|
||||
* \param nam
|
||||
*/
|
||||
explicit G4DNAModelInterface(const G4String& nam);
|
||||
|
||||
public:
|
||||
/*!
|
||||
* \brief ~G4DNAModelManager
|
||||
* Destructor
|
||||
*/
|
||||
~G4DNAModelInterface() override = default;
|
||||
|
||||
/*!
|
||||
* \brief G4DNAModelManager
|
||||
* Constructor
|
||||
* \param nam
|
||||
*/
|
||||
G4DNAModelInterface(const G4String& nam);
|
||||
/*!
|
||||
* \brief Initialise
|
||||
* Initialise method to call all the initialise methods of the registered models
|
||||
* \param particle
|
||||
* \param cuts
|
||||
*/
|
||||
void Initialise(const G4ParticleDefinition* particle, const G4DataVector& cuts) override;
|
||||
|
||||
/*!
|
||||
* \brief ~G4DNAModelManager
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~G4DNAModelInterface();
|
||||
/*!
|
||||
* \brief CrossSectionPerVolume
|
||||
* Method called by the process and used to call the CrossSectionPerVolume method of the
|
||||
* registered models. The method also calculates through G4DNAMolecularMaterial the number of
|
||||
* molecule per volume unit for the current material or (component of a composite material).
|
||||
* \param material
|
||||
* \param p
|
||||
* \param ekin
|
||||
* \param emin
|
||||
* \param emax
|
||||
* \return the final cross section value times with the number of molecule per volume unit
|
||||
*/
|
||||
G4double CrossSectionPerVolume(const G4Material* material, const G4ParticleDefinition* p,
|
||||
G4double ekin, G4double emin, G4double emax) override;
|
||||
|
||||
/*!
|
||||
* \brief Initialise
|
||||
* Initialise method to call all the initialise methods of the registered models
|
||||
* \param particle
|
||||
* \param cuts
|
||||
*/
|
||||
virtual void Initialise(const G4ParticleDefinition* particle, const G4DataVector& cuts);
|
||||
/*!
|
||||
* \brief SampleSecondaries
|
||||
* Used to call the SampleSecondaries method of the registered models. A sampling is done to
|
||||
* select a component if the material is a composite one. \param fVect \param couple \param
|
||||
* aDynamicElectron \param tmin \param tmax
|
||||
*/
|
||||
void SampleSecondaries(std::vector<G4DynamicParticle*>* fVect, const G4MaterialCutsCouple* couple,
|
||||
const G4DynamicParticle* aDynamicElectron, G4double tmin, G4double tmax) override;
|
||||
|
||||
/*!
|
||||
* \brief CrossSectionPerVolume
|
||||
* Method called by the process and used to call the CrossSectionPerVolume method of the registered models.
|
||||
* The method also calculates through G4DNAMolecularMaterial the number of molecule per volume unit for the current
|
||||
* material or (component of a composite material).
|
||||
* \param material
|
||||
* \param p
|
||||
* \param ekin
|
||||
* \param emin
|
||||
* \param emax
|
||||
* \return the final cross section value times with the number of molecule per volume unit
|
||||
*/
|
||||
virtual G4double CrossSectionPerVolume(const G4Material* material,
|
||||
const G4ParticleDefinition* p,
|
||||
G4double ekin,
|
||||
G4double emin,
|
||||
G4double emax);
|
||||
/*!
|
||||
* \brief RegisterModel
|
||||
* Method used to associate a model with the interaction
|
||||
* \param model
|
||||
*/
|
||||
void RegisterModel(G4VEmModel* model);
|
||||
/*!
|
||||
* \brief GetSelectedMaterial
|
||||
* To allow the user to retrieve the selected material in case of a composite material.
|
||||
* \return the last selected material by SampleSecondaries.
|
||||
*/
|
||||
inline std::size_t GetSelectedMaterial()
|
||||
{
|
||||
return fSampledMat;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief SampleSecondaries
|
||||
* Used to call the SampleSecondaries method of the registered models. A sampling is done to select
|
||||
* a component if the material is a composite one.
|
||||
* \param fVect
|
||||
* \param couple
|
||||
* \param aDynamicElectron
|
||||
* \param tmin
|
||||
* \param tmax
|
||||
*/
|
||||
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*fVect,
|
||||
const G4MaterialCutsCouple* couple,
|
||||
const G4DynamicParticle* aDynamicElectron,
|
||||
G4double tmin,
|
||||
G4double tmax);
|
||||
void StreamInfo(std::ostream& os) const;
|
||||
|
||||
/*!
|
||||
* \brief RegisterModel
|
||||
* Method used to associate a model with the interaction
|
||||
* \param model
|
||||
*/
|
||||
void RegisterModel(G4VDNAModel* model);
|
||||
private:
|
||||
/*!
|
||||
* \brief BuildMaterialParticleModelTable
|
||||
* Method used to build a map allowing the code to quickly retrieve the good model for a
|
||||
* particle/material couple \param p
|
||||
*/
|
||||
void BuildMaterialParticleModelTable(const G4ParticleDefinition* p);
|
||||
|
||||
void RegisterModel(G4VEmModel* model, const G4ParticleDefinition* particle);
|
||||
void BuildMaterialMolPerVolTable();
|
||||
|
||||
/*!
|
||||
* \brief GetSelectedMaterial
|
||||
* To allow the user to retrieve the selected material in case of a composite material.
|
||||
* \return the last selected material by SampleSecondaries.
|
||||
*/
|
||||
G4String GetSelectedMaterial(){return fSampledMat;}
|
||||
/*!
|
||||
* \brief InsertModelInTable
|
||||
* Used to put a model in the table after performing some checks.
|
||||
* \param matName
|
||||
* \param pName
|
||||
*/
|
||||
void InsertModelInTable(const std::size_t& matID, const G4ParticleDefinition* p);
|
||||
|
||||
private:
|
||||
/*!
|
||||
* \brief GetDNAModel
|
||||
* \param material
|
||||
* \param particle
|
||||
* \param ekin
|
||||
* \return G4VDNAModel*
|
||||
* Return the model corresponding to the material, particle and energy specified.
|
||||
* This method will check the energy range of the models to find to good one for the current ekin.
|
||||
*/
|
||||
G4VEmModel* SelectModel(
|
||||
const std::size_t& material, const G4ParticleDefinition* particle, const G4double& ekin);
|
||||
|
||||
const G4String fName; ///< name of the interaction
|
||||
G4double GetNumMoleculePerVolumeUnitForMaterial(const G4Material* mat);
|
||||
G4double GetNumMolPerVolUnitForComponentInComposite(
|
||||
const G4Material* component, const G4Material* composite);
|
||||
|
||||
G4ParticleChangeForGamma* fpParticleChangeForGamma; ///< pointer used to change the characteristics of the current particle
|
||||
// copy constructor and hide assignment operator
|
||||
G4DNAModelInterface(const G4DNAModelInterface&) = delete; // prevent copy-construction
|
||||
G4DNAModelInterface& operator=(const G4DNAModelInterface& right) = delete; // prevent assignement
|
||||
const G4String fName; ///< name of the interaction
|
||||
G4ParticleChangeForGamma* fpParticleChangeForGamma = nullptr;
|
||||
std::vector<G4VEmModel*> fRegisteredModels; ///< vector containing all the registered models
|
||||
|
||||
std::vector<G4VDNAModel*> fRegisteredModels; ///< vector containing all the registered models
|
||||
|
||||
std::map<const G4String, G4double> fMaterialCS; ///< map used to share information between CrossSectionPerVolume and SampleSecondaries
|
||||
|
||||
G4double fCSsumTot; ///< value which contains the sum of all the component cross sections in case of a composite material
|
||||
|
||||
G4String fSampledMat; ///< for the user to retrieve selected material/component
|
||||
|
||||
typedef std::map<const G4String ,std::map<const G4String , std::vector<G4VDNAModel*> > > MaterialParticleModelTable;
|
||||
MaterialParticleModelTable fMaterialParticleModelTable; ///< map: [materialName][particleName] = vector of models
|
||||
|
||||
std::map<G4String, const std::vector<double>* > fMaterialMolPerVol;
|
||||
|
||||
/*!
|
||||
* \brief BuildMaterialParticleModelTable
|
||||
* Method used to build a map allowing the code to quickly retrieve the good model for a particle/material couple
|
||||
* \param p
|
||||
*/
|
||||
void BuildMaterialParticleModelTable(const G4ParticleDefinition *p);
|
||||
|
||||
void BuildMaterialMolPerVolTable();
|
||||
|
||||
/*!
|
||||
* \brief InsertModelInTable
|
||||
* Used to put a model in the table after performing some checks.
|
||||
* \param matName
|
||||
* \param pName
|
||||
*/
|
||||
void InsertModelInTable(const G4String& matName, const G4String& pName);
|
||||
|
||||
/*!
|
||||
* \brief GetDNAModel
|
||||
* \param material
|
||||
* \param particle
|
||||
* \param ekin
|
||||
* \return G4VDNAModel*
|
||||
* Return the model corresponding to the material, particle and energy specified.
|
||||
* This method will check the energy range of the models to find to good one for the current ekin.
|
||||
*/
|
||||
G4VDNAModel* GetDNAModel(const G4String& material, const G4String& particle, G4double ekin);
|
||||
|
||||
G4double GetNumMoleculePerVolumeUnitForMaterial(const G4Material *mat);
|
||||
G4double GetNumMolPerVolUnitForComponentInComposite(const G4Material *component, const G4Material* composite);
|
||||
|
||||
// copy constructor and hide assignment operator
|
||||
G4DNAModelInterface(const G4DNAModelInterface&); // prevent copy-construction
|
||||
G4DNAModelInterface & operator=(const G4DNAModelInterface &right); // prevent assignement
|
||||
std::map<std::size_t, G4double> fMaterialCS; ///< map used to share information between
|
||||
///< CrossSectionPerVolume and SampleSecondaries
|
||||
G4double fCSsumTot = 0; ///< value which contains the sum of all the component cross sections in
|
||||
///< case of a composite material
|
||||
std::size_t fSampledMat = 0; ///< for the user to retrieve selected material/component
|
||||
MaterialParticleModelTable fMaterialParticleModelTable;
|
||||
std::map<std::size_t, const std::vector<G4double>*> fMaterialMolPerVol;
|
||||
G4Material* fpG4_WATER = nullptr;
|
||||
};
|
||||
|
||||
#endif // G4DNAMODELINTERFACE_HH
|
||||
#endif // G4DNAMODELINTERFACE_HH
|
||||
|
||||
@@ -28,18 +28,18 @@
|
||||
// M. Bug et al, Rad. Phys and Chem. 130, 459-479 (2017)
|
||||
//
|
||||
|
||||
|
||||
#ifndef G4DNAPTBElasticModel_h
|
||||
#define G4DNAPTBElasticModel_h 1
|
||||
|
||||
#include <map>
|
||||
#include "G4DNACrossSectionDataSet.hh"
|
||||
#include "G4VDNAModel.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4ParticleChangeForGamma.hh"
|
||||
#include "G4LogLogInterpolation.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4ParticleChangeForGamma.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
#include "G4VDNAModel.hh"
|
||||
|
||||
#include <map>
|
||||
|
||||
/*!
|
||||
* \brief The G4DNAPTBElasticModel class
|
||||
@@ -47,182 +47,179 @@
|
||||
*/
|
||||
class G4DNAPTBElasticModel : public G4VDNAModel
|
||||
{
|
||||
public:
|
||||
using TriDimensionMap = std::map<std::size_t,
|
||||
std::map<const G4ParticleDefinition*, std::map<G4double, std::map<G4double, G4double>>>>;
|
||||
using VecMap = std::map<std::size_t,
|
||||
std::map<const G4ParticleDefinition*, std::map<G4double, std::vector<G4double>>>>;
|
||||
/*!
|
||||
* \brief G4DNAPTBElasticModel
|
||||
* Constructor
|
||||
* \param applyToMaterial
|
||||
* \param p
|
||||
* \param nam
|
||||
*/
|
||||
G4DNAPTBElasticModel(const G4String& applyToMaterial = "all",
|
||||
const G4ParticleDefinition* p = nullptr, const G4String& nam = "DNAPTBElasticModel");
|
||||
|
||||
public:
|
||||
/*!
|
||||
* \brief ~G4DNAPTBElasticModel
|
||||
* Destructor
|
||||
*/
|
||||
~G4DNAPTBElasticModel() override = default;
|
||||
|
||||
/*!
|
||||
* \brief G4DNAPTBElasticModel
|
||||
* Constructor
|
||||
* \param applyToMaterial
|
||||
* \param p
|
||||
* \param nam
|
||||
*/
|
||||
G4DNAPTBElasticModel(const G4String &applyToMaterial = "all", const G4ParticleDefinition* p = 0,
|
||||
const G4String& nam = "DNAPTBElasticModel");
|
||||
/*!
|
||||
* \brief Initialise
|
||||
* Mandatory method for every model class. The material/particle for which the model
|
||||
* can be used have to be added here through the AddCrossSectionData method.
|
||||
* Then the LoadCrossSectionData method must be called to trigger the load process.
|
||||
* Scale factors to be applied to the cross section can be defined here.
|
||||
*/
|
||||
void Initialise(const G4ParticleDefinition* particle, const G4DataVector&) override;
|
||||
|
||||
/*!
|
||||
* \brief ~G4DNAPTBElasticModel
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~G4DNAPTBElasticModel();
|
||||
/*!
|
||||
* \brief CrossSectionPerVolume
|
||||
* This method is mandatory for any model class. It finds and return the cross section value
|
||||
* for the current material, particle and energy values.
|
||||
* The number of molecule per volume is not used here but in the G4DNAModelInterface class.
|
||||
* \param material
|
||||
* \param materialName
|
||||
* \param p
|
||||
* \param ekin
|
||||
* \param emin
|
||||
* \param emax
|
||||
* \return the cross section value
|
||||
*/
|
||||
G4double CrossSectionPerVolume(const G4Material* material, const G4ParticleDefinition* p,
|
||||
G4double ekin, G4double emin, G4double emax) override;
|
||||
|
||||
/*!
|
||||
* \brief Initialise
|
||||
* Mandatory method for every model class. The material/particle for which the model
|
||||
* can be used have to be added here through the AddCrossSectionData method.
|
||||
* Then the LoadCrossSectionData method must be called to trigger the load process.
|
||||
* Scale factors to be applied to the cross section can be defined here.
|
||||
*/
|
||||
virtual void Initialise(const G4ParticleDefinition* particle, const G4DataVector&, G4ParticleChangeForGamma* fpChangeForGamme=nullptr);
|
||||
/*!
|
||||
* \brief SampleSecondaries
|
||||
* Method called after CrossSectionPerVolume if the process is the one which is selected
|
||||
* (according to the sampling on the calculated path length). Here, the characteristics of the
|
||||
* incident and created (if any) particle(s) are set (energy, momentum ...). \param materialName
|
||||
* \param particleChangeForGamma
|
||||
* \param tmin
|
||||
* \param tmax
|
||||
*/
|
||||
void SampleSecondaries(std::vector<G4DynamicParticle*>*, const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*, G4double tmin, G4double tmax) override;
|
||||
|
||||
/*!
|
||||
* \brief CrossSectionPerVolume
|
||||
* This method is mandatory for any model class. It finds and return the cross section value
|
||||
* for the current material, particle and energy values.
|
||||
* The number of molecule per volume is not used here but in the G4DNAModelInterface class.
|
||||
* \param material
|
||||
* \param materialName
|
||||
* \param p
|
||||
* \param ekin
|
||||
* \param emin
|
||||
* \param emax
|
||||
* \return the cross section value
|
||||
*/
|
||||
virtual G4double CrossSectionPerVolume(const G4Material* material,
|
||||
const G4String& materialName,
|
||||
const G4ParticleDefinition* p,
|
||||
G4double ekin,
|
||||
G4double emin,
|
||||
G4double emax);
|
||||
protected:
|
||||
G4ParticleChangeForGamma* fParticleChangeForGamma = nullptr;
|
||||
|
||||
/*!
|
||||
* \brief SampleSecondaries
|
||||
* Method called after CrossSectionPerVolume if the process is the one which is selected (according to the sampling on the calculated path length).
|
||||
* Here, the characteristics of the incident and created (if any) particle(s) are set (energy, momentum ...).
|
||||
* \param materialName
|
||||
* \param particleChangeForGamma
|
||||
* \param tmin
|
||||
* \param tmax
|
||||
*/
|
||||
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4String& materialName,
|
||||
const G4DynamicParticle*,
|
||||
G4ParticleChangeForGamma *particleChangeForGamma,
|
||||
G4double tmin,
|
||||
G4double tmax);
|
||||
private:
|
||||
G4int verboseLevel = 0; ///< verbose level
|
||||
// Verbosity scale:
|
||||
// 0 = nothing
|
||||
// 1 = warning for energy non-conservation
|
||||
// 2 = details of energy budget
|
||||
// 3 = calculation of cross sections, file openings, sampling of atoms
|
||||
// 4 = entering in methods
|
||||
G4double fKillBelowEnergy = 0.;
|
||||
///< energy kill limit
|
||||
TriDimensionMap diffCrossSectionData;
|
||||
///< A map: [materialName][particleName]=DiffCrossSectionTable
|
||||
VecMap eValuesVect;
|
||||
/*!< map with vectors containing all the output energy (E) of the diff. file */
|
||||
std::map<std::size_t, std::map<const G4ParticleDefinition*, std::vector<G4double>>> tValuesVec;
|
||||
///< map with vectors containing all the incident (T) energy of the dif. file
|
||||
|
||||
protected:
|
||||
G4Material* fpGuanine_PU = nullptr;
|
||||
G4Material* fpTHF = nullptr;
|
||||
G4Material* fpPY = nullptr;
|
||||
G4Material* fpPU = nullptr;
|
||||
G4Material* fpTMP = nullptr;
|
||||
G4Material* fpG4_WATER = nullptr;
|
||||
G4Material* fpBackbone_THF = nullptr;
|
||||
G4Material* fpCytosine_PY = nullptr;
|
||||
G4Material* fpThymine_PY = nullptr;
|
||||
G4Material* fpAdenine_PU = nullptr;
|
||||
G4Material* fpBackbone_TMP = nullptr;
|
||||
G4Material* fpN2 = nullptr;
|
||||
G4DNAPTBElasticModel* fpModelData = nullptr;
|
||||
|
||||
/*!
|
||||
* \brief ReadDiffCSFile
|
||||
* Method to read the differential cross section files. This method is not standard yet so every
|
||||
* model must implement its own. \param materialName \param particleName \param file
|
||||
*/
|
||||
void ReadDiffCSFile(const std::size_t& materialID, const G4ParticleDefinition* particleName,
|
||||
const G4String& file, const G4double&) override;
|
||||
|
||||
/*!
|
||||
* \brief Theta
|
||||
* To return an angular theta value from the differential file. This method uses interpolations to
|
||||
* calculate the theta value. \param fParticleDefinition \param k \param integrDiff \param
|
||||
* materialName \return a theta value
|
||||
*/
|
||||
G4double Theta(
|
||||
const G4ParticleDefinition* p, G4double k, G4double integrDiff, const std::size_t& materialID);
|
||||
|
||||
private:
|
||||
/*!
|
||||
* \brief LinLinInterpolate
|
||||
* \param e1
|
||||
* \param e2
|
||||
* \param e
|
||||
* \param xs1
|
||||
* \param xs2
|
||||
* \return
|
||||
*/
|
||||
G4double LinLinInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
|
||||
|
||||
G4int verboseLevel; ///< verbose level
|
||||
std::map<G4String, double > killBelowEnergyTable; ///< map to save the different energy kill limits for the materials
|
||||
G4double fKillBelowEnergy; ///< energy kill limit
|
||||
/*!
|
||||
* \brief LinLogInterpolate
|
||||
* \param e1
|
||||
* \param e2
|
||||
* \param e
|
||||
* \param xs1
|
||||
* \param xs2
|
||||
* \return
|
||||
*/
|
||||
G4double LinLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
|
||||
|
||||
typedef std::map<G4String, std::map<G4String, std::map<double, std::map<double, double> > > > TriDimensionMap;
|
||||
TriDimensionMap diffCrossSectionData; ///< A map: [materialName][particleName]=DiffCrossSectionTable
|
||||
/*!
|
||||
* \brief LogLogInterpolate
|
||||
* \param e1
|
||||
* \param e2
|
||||
* \param e
|
||||
* \param xs1
|
||||
* \param xs2
|
||||
* \return
|
||||
*/
|
||||
G4double LogLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
|
||||
|
||||
typedef std::map<G4String, std::map<G4String, std::map<double, std::vector<double> > > > VecMap;
|
||||
VecMap eValuesVect; /*!< map with vectors containing all the output energy (E) of the differential file */
|
||||
std::map<G4String, std::map<G4String, std::vector<double> > > tValuesVec; ///< map with vectors containing all the incident (T) energy of the differential file
|
||||
/*!
|
||||
* \brief QuadInterpolator
|
||||
* \param e11
|
||||
* \param e12
|
||||
* \param e21
|
||||
* \param e22
|
||||
* \param x11
|
||||
* \param x12
|
||||
* \param x21
|
||||
* \param x22
|
||||
* \param t1
|
||||
* \param t2
|
||||
* \param t
|
||||
* \param e
|
||||
* \return
|
||||
*/
|
||||
G4double QuadInterpolator(G4double e11, G4double e12, G4double e21, G4double e22, G4double x11,
|
||||
G4double x12, G4double x21, G4double x22, G4double t1, G4double t2, G4double t, G4double e);
|
||||
|
||||
/*!
|
||||
* \brief ReadDiffCSFile
|
||||
* Method to read the differential cross section files. This method is not standard yet so every model must implement its own.
|
||||
* \param materialName
|
||||
* \param particleName
|
||||
* \param file
|
||||
*/
|
||||
void ReadDiffCSFile(const G4String &materialName, const G4String &particleName, const G4String &file, const G4double);
|
||||
/*!
|
||||
* \brief RandomizeCosTheta
|
||||
* \param k
|
||||
* \param materialName
|
||||
* \return
|
||||
*/
|
||||
G4double RandomizeCosTheta(const G4double& k, const std::size_t& materialName);
|
||||
|
||||
/*!
|
||||
* \brief Theta
|
||||
* To return an angular theta value from the differential file. This method uses interpolations to calculate
|
||||
* the theta value.
|
||||
* \param fParticleDefinition
|
||||
* \param k
|
||||
* \param integrDiff
|
||||
* \param materialName
|
||||
* \return a theta value
|
||||
*/
|
||||
G4double Theta(G4ParticleDefinition * fParticleDefinition, G4double k, G4double integrDiff, const G4String &materialName);
|
||||
|
||||
/*!
|
||||
* \brief LinLinInterpolate
|
||||
* \param e1
|
||||
* \param e2
|
||||
* \param e
|
||||
* \param xs1
|
||||
* \param xs2
|
||||
* \return
|
||||
*/
|
||||
G4double LinLinInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
|
||||
|
||||
/*!
|
||||
* \brief LinLogInterpolate
|
||||
* \param e1
|
||||
* \param e2
|
||||
* \param e
|
||||
* \param xs1
|
||||
* \param xs2
|
||||
* \return
|
||||
*/
|
||||
G4double LinLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
|
||||
|
||||
/*!
|
||||
* \brief LogLogInterpolate
|
||||
* \param e1
|
||||
* \param e2
|
||||
* \param e
|
||||
* \param xs1
|
||||
* \param xs2
|
||||
* \return
|
||||
*/
|
||||
G4double LogLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
|
||||
|
||||
/*!
|
||||
* \brief QuadInterpolator
|
||||
* \param e11
|
||||
* \param e12
|
||||
* \param e21
|
||||
* \param e22
|
||||
* \param x11
|
||||
* \param x12
|
||||
* \param x21
|
||||
* \param x22
|
||||
* \param t1
|
||||
* \param t2
|
||||
* \param t
|
||||
* \param e
|
||||
* \return
|
||||
*/
|
||||
G4double QuadInterpolator(G4double e11,
|
||||
G4double e12,
|
||||
G4double e21,
|
||||
G4double e22,
|
||||
G4double x11,
|
||||
G4double x12,
|
||||
G4double x21,
|
||||
G4double x22,
|
||||
G4double t1,
|
||||
G4double t2,
|
||||
G4double t,
|
||||
G4double e);
|
||||
|
||||
/*!
|
||||
* \brief RandomizeCosTheta
|
||||
* \param k
|
||||
* \param materialName
|
||||
* \return
|
||||
*/
|
||||
G4double RandomizeCosTheta(G4double k, const G4String &materialName);
|
||||
|
||||
// copy constructor and hide assignment operator
|
||||
G4DNAPTBElasticModel(G4DNAPTBElasticModel &); // prevent copy-construction
|
||||
G4DNAPTBElasticModel & operator=(const G4DNAPTBElasticModel &right); // prevent assignement
|
||||
// copy constructor and hide assignment operator
|
||||
G4DNAPTBElasticModel(G4DNAPTBElasticModel&) = delete; // prevent copy-construction
|
||||
G4DNAPTBElasticModel& operator=(
|
||||
const G4DNAPTBElasticModel& right) = delete; // prevent assignement
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,53 +31,49 @@
|
||||
#ifndef G4DNAPTBExcitationModel_h
|
||||
#define G4DNAPTBExcitationModel_h 1
|
||||
|
||||
#include "G4VDNAModel.hh"
|
||||
#include "G4ParticleChangeForGamma.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
|
||||
#include "G4DNACrossSectionDataSet.hh"
|
||||
#include "G4LogLogInterpolation.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4NistManager.hh"
|
||||
|
||||
#include "G4DNAWaterExcitationStructure.hh"
|
||||
|
||||
#include "G4DNAPTBExcitationStructure.hh"
|
||||
#include "G4DNAPTBIonisationStructure.hh"
|
||||
|
||||
#include "G4DNAWaterExcitationStructure.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4LogLogInterpolation.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4ParticleChangeForGamma.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4VDNAModel.hh"
|
||||
/*!
|
||||
* \brief The G4DNAPTBExcitationModel class
|
||||
* This class implements the PTB excitation model.
|
||||
*/
|
||||
class G4Material;
|
||||
class G4DNAPTBExcitationModel : public G4VDNAModel
|
||||
{
|
||||
public:
|
||||
using MapMeanEnergy = std::map<std::size_t, G4double>;
|
||||
/*!
|
||||
* \brief G4DNAPTBExcitationModel
|
||||
* Constructor
|
||||
* \param applyToMaterial
|
||||
* \param p
|
||||
* \param nam
|
||||
*/
|
||||
G4DNAPTBExcitationModel(const G4String& applyToMaterial = "all",
|
||||
const G4ParticleDefinition* p = nullptr, const G4String& nam = "DNAPTBExcitationModel");
|
||||
|
||||
public:
|
||||
|
||||
/*!
|
||||
* \brief G4DNAPTBExcitationModel
|
||||
* Constructor
|
||||
* \param applyToMaterial
|
||||
* \param p
|
||||
* \param nam
|
||||
*/
|
||||
G4DNAPTBExcitationModel(const G4String &applyToMaterial = "all", const G4ParticleDefinition* p = 0,
|
||||
const G4String& nam = "DNAPTBExcitationModel");
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* \brief ~G4DNAPTBExcitationModel
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~G4DNAPTBExcitationModel();
|
||||
~G4DNAPTBExcitationModel() override = default;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* \brief Initialise
|
||||
* Set the materials for which the model can be used and defined the energy limits
|
||||
*/
|
||||
virtual void Initialise(const G4ParticleDefinition* particle, const G4DataVector& = *(new G4DataVector()), G4ParticleChangeForGamma* fpChangeForGamme=nullptr);
|
||||
void Initialise(const G4ParticleDefinition* particle, const G4DataVector&) override;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* \brief CrossSectionPerVolume
|
||||
* Retrieve the cross section corresponding to the current material, particle and energy
|
||||
* \param material
|
||||
@@ -88,47 +84,54 @@ public:
|
||||
* \param emax
|
||||
* \return the cross section value
|
||||
*/
|
||||
virtual G4double CrossSectionPerVolume(const G4Material* material,
|
||||
const G4String& materialName,
|
||||
const G4ParticleDefinition* p,
|
||||
G4double ekin,
|
||||
G4double emin,
|
||||
G4double emax);
|
||||
G4double CrossSectionPerVolume(const G4Material* material, const G4ParticleDefinition* p,
|
||||
G4double ekin, G4double emin, G4double emax) override;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* \brief SampleSecondaries
|
||||
* If the model is selected for the ModelInterface then the SampleSecondaries method will be called.
|
||||
* The method sets the incident particle characteristics after the ModelInterface.
|
||||
* \param materialName
|
||||
* \param particleChangeForGamma
|
||||
* \param tmin
|
||||
* \param tmax
|
||||
* If the model is selected for the ModelInterface then the SampleSecondaries method will be
|
||||
* called. The method sets the incident particle characteristics after the ModelInterface. \param
|
||||
* materialName \param particleChangeForGamma \param tmin \param tmax
|
||||
*/
|
||||
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4String& materialName,
|
||||
const G4DynamicParticle*,
|
||||
G4ParticleChangeForGamma *particleChangeForGamma,
|
||||
G4double tmin,
|
||||
G4double tmax);
|
||||
void SampleSecondaries(std::vector<G4DynamicParticle*>*, const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*, G4double tmin, G4double tmax) override;
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
G4int verboseLevel; ///< verbose level
|
||||
G4ParticleChangeForGamma* fParticleChangeForGamma = nullptr;
|
||||
|
||||
private:
|
||||
G4int verboseLevel = 0; ///< verbose level
|
||||
// Verbosity scale:
|
||||
// 0 = nothing
|
||||
// 1 = warning for energy non-conservation
|
||||
// 2 = details of energy budget
|
||||
// 3 = calculation of cross sections, file openings, sampling of atoms
|
||||
// 4 = entering in methods
|
||||
G4DNAWaterExcitationStructure waterStructure;
|
||||
|
||||
G4DNAPTBExcitationStructure ptbExcitationStructure;
|
||||
G4DNAPTBIonisationStructure ptbIonisationStructure;
|
||||
|
||||
typedef std::map<G4String,G4double,std::less<G4String> > MapMeanEnergy;
|
||||
MapMeanEnergy tableMeanEnergyPTB; ///< map: [materialName]=energyValue
|
||||
|
||||
|
||||
MapMeanEnergy fTableMeanEnergyPTB; ///< map: [materialName]=energyValue
|
||||
|
||||
// copy constructor and hide assignment operator
|
||||
G4DNAPTBExcitationModel(const G4DNAPTBExcitationModel&); // prevent copy-construction
|
||||
G4DNAPTBExcitationModel & operator=(const G4DNAPTBExcitationModel &right); // prevent assignement
|
||||
G4DNAPTBExcitationModel(const G4DNAPTBExcitationModel&) = delete; // prevent copy-construction
|
||||
G4DNAPTBExcitationModel& operator=(
|
||||
const G4DNAPTBExcitationModel& right) = delete; // prevent assignement
|
||||
|
||||
G4Material* fpGuanine_PU = nullptr;
|
||||
G4Material* fpTHF = nullptr;
|
||||
G4Material* fpPY = nullptr;
|
||||
G4Material* fpPU = nullptr;
|
||||
G4Material* fpTMP = nullptr;
|
||||
G4Material* fpG4_WATER = nullptr;
|
||||
G4Material* fpBackbone_THF = nullptr;
|
||||
G4Material* fpCytosine_PY = nullptr;
|
||||
G4Material* fpThymine_PY = nullptr;
|
||||
G4Material* fpAdenine_PU = nullptr;
|
||||
G4Material* fpBackbone_TMP = nullptr;
|
||||
G4Material* fpN2 = nullptr;
|
||||
G4DNAPTBExcitationModel* fpModelData = nullptr;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,20 +31,17 @@
|
||||
#ifndef G4DNAPTBIONISATIONMODEL_h
|
||||
#define G4DNAPTBIONISATIONMODEL_h 1
|
||||
|
||||
#include "G4VDNAModel.hh"
|
||||
#include "G4DNACrossSectionDataSet.hh"
|
||||
#include "G4DNAGenericIonsManager.hh"
|
||||
#include "G4DNAPTBAugerModel.hh"
|
||||
#include "G4DNAPTBIonisationStructure.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4LogLogInterpolation.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4ParticleChangeForGamma.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
|
||||
#include "G4DNACrossSectionDataSet.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4DNAGenericIonsManager.hh"
|
||||
|
||||
#include "G4LogLogInterpolation.hh"
|
||||
|
||||
#include "G4DNAPTBIonisationStructure.hh"
|
||||
#include "G4DNAPTBAugerModel.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4VDNAModel.hh"
|
||||
|
||||
/*!
|
||||
* \brief The G4DNAPTBIonisationModel class
|
||||
@@ -52,156 +49,169 @@
|
||||
*/
|
||||
class G4DNAPTBIonisationModel : public G4VDNAModel
|
||||
{
|
||||
public:
|
||||
using TriDimensionMap =
|
||||
std::map<std::size_t, std::map<const G4ParticleDefinition*,
|
||||
std::map<G4double, std::map<G4double, std::map<G4double, G4double>>>>>;
|
||||
using VecMap = std::map<std::size_t,
|
||||
std::map<const G4ParticleDefinition*, std::map<G4double, std::vector<G4double>>>>;
|
||||
using VecMapWithShell =
|
||||
std::map<std::size_t, std::map<const G4ParticleDefinition*,
|
||||
std::map<G4double, std::map<G4double, std::vector<G4double>>>>>;
|
||||
/*!
|
||||
* \brief G4DNAPTBIonisationModel
|
||||
* Constructor
|
||||
* \param applyToMaterial
|
||||
* \param p
|
||||
* \param nam
|
||||
* \param isAuger
|
||||
*/
|
||||
explicit G4DNAPTBIonisationModel(const G4String& applyToMaterial = "all",
|
||||
const G4ParticleDefinition* p = nullptr, const G4String& nam = "DNAPTBIonisationModel",
|
||||
const G4bool isAuger = true);
|
||||
|
||||
public:
|
||||
/*!
|
||||
* \brief G4DNAPTBIonisationModel
|
||||
* Constructor
|
||||
* \param applyToMaterial
|
||||
* \param p
|
||||
* \param nam
|
||||
* \param isAuger
|
||||
*/
|
||||
G4DNAPTBIonisationModel(const G4String &applyToMaterial = "all",
|
||||
const G4ParticleDefinition* p = 0,
|
||||
const G4String &nam = "DNAPTBIonisationModel",
|
||||
const G4bool isAuger=true);
|
||||
/*!
|
||||
* \brief ~G4DNAPTBIonisationModel
|
||||
* Destructor
|
||||
*/
|
||||
~G4DNAPTBIonisationModel() override = default;
|
||||
|
||||
/*!
|
||||
* \brief ~G4DNAPTBIonisationModel
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~G4DNAPTBIonisationModel();
|
||||
/*!
|
||||
* \brief Initialise
|
||||
* Method called once at the beginning of the simulation. It is used to setup the list of the
|
||||
* materials managed by the model and the energy limits. All the materials are setup but only a
|
||||
* part of them can be activated by the user through the constructor.
|
||||
*/
|
||||
void Initialise(const G4ParticleDefinition* particle, const G4DataVector& data) override;
|
||||
|
||||
/*!
|
||||
* \brief Initialise
|
||||
* Method called once at the beginning of the simulation. It is used to setup the list of the materials managed by the model
|
||||
* and the energy limits. All the materials are setup but only a part of them can be activated by the user through the constructor.
|
||||
*/
|
||||
virtual void Initialise(const G4ParticleDefinition* particle, const G4DataVector& = *(new G4DataVector()), G4ParticleChangeForGamma* fpChangeForGamme=nullptr);
|
||||
/*!
|
||||
* \brief CrossSectionPerVolume
|
||||
* Mandatory for every model the CrossSectionPerVolume method is in charge of returning the
|
||||
* cross section value corresponding to the material, particle and energy current values.
|
||||
* \param material
|
||||
* \param materialName
|
||||
* \param p
|
||||
* \param ekin
|
||||
* \param emin
|
||||
* \param emax
|
||||
* \return the cross section value
|
||||
*/
|
||||
G4double CrossSectionPerVolume(const G4Material* material, const G4ParticleDefinition* p,
|
||||
G4double ekin, G4double emin, G4double emax) override;
|
||||
|
||||
/*!
|
||||
* \brief CrossSectionPerVolume
|
||||
* Mandatory for every model the CrossSectionPerVolume method is in charge of returning the
|
||||
* cross section value corresponding to the material, particle and energy current values.
|
||||
* \param material
|
||||
* \param materialName
|
||||
* \param p
|
||||
* \param ekin
|
||||
* \param emin
|
||||
* \param emax
|
||||
* \return the cross section value
|
||||
*/
|
||||
virtual G4double CrossSectionPerVolume(const G4Material* material,
|
||||
const G4String& materialName,
|
||||
const G4ParticleDefinition* p,
|
||||
G4double ekin,
|
||||
G4double emin,
|
||||
G4double emax);
|
||||
/*!
|
||||
* \brief SampleSecondaries
|
||||
* If the model is selected for the ModelInterface then SampleSecondaries will be called.
|
||||
* The method sets the characteristics of the particles implied with the physical process after
|
||||
* the ModelInterface (energy, momentum...). This method is mandatory for every model. \param
|
||||
* materialName \param particleChangeForGamma \param tmin \param tmax
|
||||
*/
|
||||
void SampleSecondaries(std::vector<G4DynamicParticle*>*, const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*, G4double tmin, G4double tmax) override;
|
||||
|
||||
/*!
|
||||
* \brief SampleSecondaries
|
||||
* If the model is selected for the ModelInterface then SampleSecondaries will be called.
|
||||
* The method sets the characteristics of the particles implied with the physical process after the ModelInterface (energy, momentum...).
|
||||
* This method is mandatory for every model.
|
||||
* \param materialName
|
||||
* \param particleChangeForGamma
|
||||
* \param tmin
|
||||
* \param tmax
|
||||
*/
|
||||
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4String& materialName,
|
||||
const G4DynamicParticle*,
|
||||
G4ParticleChangeForGamma *particleChangeForGamma,
|
||||
G4double tmin,
|
||||
G4double tmax);
|
||||
G4ParticleChangeForGamma* fParticleChangeForGamma = nullptr;
|
||||
|
||||
protected:
|
||||
private:
|
||||
std::unique_ptr<G4DNAPTBAugerModel>
|
||||
fpDNAPTBAugerModel; ///< PTB Auger model instanciated in the constructor and deleted in the
|
||||
///< destructor of the class
|
||||
G4int verboseLevel = 0; ///< verbose level
|
||||
G4DNAPTBIonisationStructure
|
||||
ptbStructure; /*!< ptbStructure class which contains the shell binding energies */
|
||||
TriDimensionMap diffCrossSectionData;
|
||||
TriDimensionMap fEnergySecondaryData;
|
||||
std::map<std::size_t, std::map<const G4ParticleDefinition*, std::vector<G4double>>> fTMapWithVec;
|
||||
VecMap fEMapWithVector;
|
||||
VecMapWithShell fProbaShellMap;
|
||||
|
||||
private:
|
||||
G4double RandomizeEjectedElectronEnergy(const G4ParticleDefinition* aP,
|
||||
G4double incomingParticleEnergy, G4int shell, const std::size_t& materialName);
|
||||
G4double DifferentialCrossSection(const G4ParticleDefinition* p, G4double k,
|
||||
G4double energyTransfer, G4int shell, const std::size_t& materialName);
|
||||
|
||||
G4DNAPTBAugerModel* fDNAPTBAugerModel; ///< PTB Auger model instanciated in the constructor and deleted in the destructor of the class
|
||||
/*!
|
||||
* \brief RandomizeEjectedElectronEnergyFromCumulated
|
||||
* Uses the cumulated tables to find the energy of the ejected particle (electron)
|
||||
* \param particleDefinition
|
||||
* \param k
|
||||
* \param shell
|
||||
* \param materialName
|
||||
* \return the ejected electron energy
|
||||
*/
|
||||
G4double RandomizeEjectedElectronEnergyFromCumulated(
|
||||
const G4ParticleDefinition*, G4double k, G4int shell, const std::size_t& materialID);
|
||||
|
||||
G4int verboseLevel; ///< verbose level
|
||||
/*!
|
||||
* \brief RandomizeEjectedElectronDirection
|
||||
* Method to calculate the ejected electron direction
|
||||
* \param aParticleDefinition
|
||||
* \param incomingParticleEnergy
|
||||
* \param outgoingParticleEnergy
|
||||
* \param cosTheta
|
||||
* \param phi
|
||||
*/
|
||||
void RandomizeEjectedElectronDirection(const G4ParticleDefinition*,
|
||||
G4double incomingParticleEnergy, G4double outgoingParticleEnergy, G4double& cosTheta,
|
||||
G4double& phi);
|
||||
/*!
|
||||
* \brief ReadDiffCSFile
|
||||
* Method to read the differential cross section files.
|
||||
* \param materialName
|
||||
* \param particleName
|
||||
* \param file
|
||||
* \param scaleFactor
|
||||
*/
|
||||
void ReadDiffCSFile(const std::size_t& materialName, const G4ParticleDefinition* p,
|
||||
const G4String& file, const G4double& scaleFactor) override;
|
||||
|
||||
G4DNAPTBIonisationStructure ptbStructure; /*!< ptbStructure class which contains the shell binding energies */
|
||||
/*!
|
||||
* \brief QuadInterpolator
|
||||
* \param e11
|
||||
* \param e12
|
||||
* \param e21
|
||||
* \param e22
|
||||
* \param xs11
|
||||
* \param xs12
|
||||
* \param xs21
|
||||
* \param xs22
|
||||
* \param t1
|
||||
* \param t2
|
||||
* \param t
|
||||
* \param e
|
||||
* \return the interpolated value
|
||||
*/
|
||||
G4double QuadInterpolator(G4double e11, G4double e12, G4double e21, G4double e22, G4double xs11,
|
||||
G4double xs12, G4double xs21, G4double xs22, G4double t1, G4double t2, G4double t, G4double e);
|
||||
/*!
|
||||
* \brief LogLogInterpolate
|
||||
* \param e1
|
||||
* \param e2
|
||||
* \param e
|
||||
* \param xs1
|
||||
* \param xs2
|
||||
* \return the interpolate value
|
||||
*/
|
||||
G4double LogLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
|
||||
|
||||
typedef std::map<G4String, std::map<G4String, std::map<double, std::map<double, std::map<double, double> > > > > TriDimensionMap;
|
||||
TriDimensionMap diffCrossSectionData;
|
||||
TriDimensionMap fEnergySecondaryData;
|
||||
std::map<G4String, std::map<G4String, std::vector<double> > > fTMapWithVec;
|
||||
typedef std::map<G4String, std::map<G4String, std::map<double, std::vector<double> > > > VecMap;
|
||||
VecMap fEMapWithVector;
|
||||
typedef std::map<G4String, std::map<G4String, std::map<double, std::map<double, std::vector<double> > > > > VecMapWithShell;
|
||||
VecMapWithShell fProbaShellMap;
|
||||
// copy constructor and hide assignment operator
|
||||
G4DNAPTBIonisationModel(const G4DNAPTBIonisationModel&) = delete; // prevent copy-construction
|
||||
G4DNAPTBIonisationModel& operator=(
|
||||
const G4DNAPTBIonisationModel& right) = delete; // prevent assignement
|
||||
|
||||
G4double RandomizeEjectedElectronEnergy(G4ParticleDefinition * aParticleDefinition, G4double incomingParticleEnergy, G4int shell, const G4String& materialName);
|
||||
double DifferentialCrossSection(G4ParticleDefinition * aParticleDefinition, G4double k, G4double energyTransfer, G4int shell, const G4String &materialName);
|
||||
G4Material* fpGuanine_PU = nullptr;
|
||||
G4Material* fpTHF = nullptr;
|
||||
G4Material* fpPY = nullptr;
|
||||
G4Material* fpPU = nullptr;
|
||||
G4Material* fpTMP = nullptr;
|
||||
G4Material* fpG4_WATER = nullptr;
|
||||
G4Material* fpBackbone_THF = nullptr;
|
||||
G4Material* fpCytosine_PY = nullptr;
|
||||
G4Material* fpThymine_PY = nullptr;
|
||||
G4Material* fpAdenine_PU = nullptr;
|
||||
G4Material* fpBackbone_TMP = nullptr;
|
||||
G4Material* fpN2 = nullptr;
|
||||
G4DNAPTBIonisationModel* fpModelData = nullptr;
|
||||
|
||||
/*!
|
||||
* \brief RandomizeEjectedElectronEnergyFromCumulated
|
||||
* Uses the cumulated tables to find the energy of the ejected particle (electron)
|
||||
* \param particleDefinition
|
||||
* \param k
|
||||
* \param shell
|
||||
* \param materialName
|
||||
* \return the ejected electron energy
|
||||
*/
|
||||
G4double RandomizeEjectedElectronEnergyFromCumulated(G4ParticleDefinition *particleDefinition, G4double k, G4int shell, const G4String& materialName);
|
||||
|
||||
/*!
|
||||
* \brief RandomizeEjectedElectronDirection
|
||||
* Method to calculate the ejected electron direction
|
||||
* \param aParticleDefinition
|
||||
* \param incomingParticleEnergy
|
||||
* \param outgoingParticleEnergy
|
||||
* \param cosTheta
|
||||
* \param phi
|
||||
*/
|
||||
void RandomizeEjectedElectronDirection(G4ParticleDefinition * aParticleDefinition, G4double incomingParticleEnergy, G4double
|
||||
outgoingParticleEnergy, G4double & cosTheta, G4double & phi );
|
||||
/*!
|
||||
* \brief ReadDiffCSFile
|
||||
* Method to read the differential cross section files.
|
||||
* \param materialName
|
||||
* \param particleName
|
||||
* \param file
|
||||
* \param scaleFactor
|
||||
*/
|
||||
void ReadDiffCSFile(const G4String &materialName, const G4String &particleName, const G4String &file, const G4double scaleFactor);
|
||||
|
||||
/*!
|
||||
* \brief QuadInterpolator
|
||||
* \param e11
|
||||
* \param e12
|
||||
* \param e21
|
||||
* \param e22
|
||||
* \param xs11
|
||||
* \param xs12
|
||||
* \param xs21
|
||||
* \param xs22
|
||||
* \param t1
|
||||
* \param t2
|
||||
* \param t
|
||||
* \param e
|
||||
* \return the interpolated value
|
||||
*/
|
||||
G4double QuadInterpolator(G4double e11, G4double e12, G4double e21, G4double e22, G4double xs11, G4double xs12, G4double xs21, G4double xs22, G4double t1, G4double t2, G4double t, G4double e);
|
||||
/*!
|
||||
* \brief LogLogInterpolate
|
||||
* \param e1
|
||||
* \param e2
|
||||
* \param e
|
||||
* \param xs1
|
||||
* \param xs2
|
||||
* \return the interpolate value
|
||||
*/
|
||||
G4double LogLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
|
||||
|
||||
// copy constructor and hide assignment operator
|
||||
G4DNAPTBIonisationModel(const G4DNAPTBIonisationModel&); // prevent copy-construction
|
||||
G4DNAPTBIonisationModel & operator=(const G4DNAPTBIonisationModel &right); // prevent assignement
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
+102
-119
@@ -23,6 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Created by Z. Francis, S. Incerti 2010
|
||||
//
|
||||
// Modified for inverse rudd function sampling 26.10.2010
|
||||
// Rewitten by V.Ivanchenko 21.05.2023
|
||||
//
|
||||
|
||||
#ifndef G4DNARuddIonisationExtendedModel_h
|
||||
@@ -32,6 +36,7 @@
|
||||
#include "G4ParticleChangeForGamma.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
|
||||
#include "G4EmCorrections.hh"
|
||||
#include "G4DNAGenericIonsManager.hh"
|
||||
#include "G4DNACrossSectionDataSet.hh"
|
||||
#include "G4Electron.hh"
|
||||
@@ -41,151 +46,129 @@
|
||||
#include "G4DNAWaterIonisationStructure.hh"
|
||||
#include "G4VAtomDeexcitation.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4DNARuddIonisationExtendedModel : public G4VEmModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
G4DNARuddIonisationExtendedModel(const G4ParticleDefinition* p = 0,
|
||||
explicit G4DNARuddIonisationExtendedModel(const G4ParticleDefinition* p = nullptr,
|
||||
const G4String& nam = "DNARuddIonisationExtendedModel");
|
||||
|
||||
virtual ~G4DNARuddIonisationExtendedModel();
|
||||
~G4DNARuddIonisationExtendedModel() override;
|
||||
|
||||
virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
|
||||
void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
|
||||
|
||||
virtual G4double CrossSectionPerVolume( const G4Material* material,
|
||||
const G4ParticleDefinition* p,
|
||||
G4double ekin,
|
||||
G4double emin,
|
||||
G4double emax);
|
||||
G4double CrossSectionPerVolume(const G4Material* material,
|
||||
const G4ParticleDefinition* p,
|
||||
G4double ekin,
|
||||
G4double emin,
|
||||
G4double emax) override;
|
||||
|
||||
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*,
|
||||
G4double tmin,
|
||||
G4double maxEnergy);
|
||||
void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*,
|
||||
G4double tmin,
|
||||
G4double maxEnergy) override;
|
||||
|
||||
inline void SelectStationary(G4bool input);
|
||||
void SelectStationary(G4bool val) { statCode = val; };
|
||||
|
||||
protected:
|
||||
// method for unit tests
|
||||
G4double ComputeProbabilityFunction(const G4ParticleDefinition*, G4double kine,
|
||||
G4double deltae, G4int shell);
|
||||
|
||||
G4ParticleChangeForGamma* fParticleChangeForGamma = nullptr;
|
||||
G4DNARuddIonisationExtendedModel & operator=
|
||||
(const G4DNARuddIonisationExtendedModel &right) = delete;
|
||||
G4DNARuddIonisationExtendedModel(const G4DNARuddIonisationExtendedModel&) = delete;
|
||||
|
||||
private:
|
||||
|
||||
G4bool statCode;
|
||||
void SetParticle(const G4ParticleDefinition*);
|
||||
|
||||
G4int SelectShell(G4double energy);
|
||||
|
||||
G4double SampleElectronEnergy(G4double kine, G4double bindingEnergy, G4int shell);
|
||||
|
||||
G4double ProbabilityFunction(G4double kine, G4double deltae,
|
||||
G4double bindingEnergy, G4int shell);
|
||||
|
||||
G4double S_1s(G4double t,
|
||||
G4double energyTransferred,
|
||||
G4double slaterEffectiveChg,
|
||||
G4double shellNumber);
|
||||
|
||||
G4double S_2s(G4double t,
|
||||
G4double energyTransferred,
|
||||
G4double slaterEffectiveChg,
|
||||
G4double shellNumber);
|
||||
|
||||
|
||||
G4double S_2p(G4double t,
|
||||
G4double energyTransferred,
|
||||
G4double slaterEffectiveChg,
|
||||
G4double shellNumber);
|
||||
|
||||
G4double Rh(G4double t,
|
||||
G4double energyTransferred,
|
||||
G4double slaterEffectiveChg,
|
||||
G4double shellNumber);
|
||||
|
||||
G4double CorrectionFactor(G4double kine, G4int shell);
|
||||
|
||||
protected:
|
||||
|
||||
G4ParticleChangeForGamma* fParticleChangeForGamma{nullptr};
|
||||
|
||||
private:
|
||||
|
||||
// idx = 0 - hydrogen
|
||||
// idx = 1 - proton
|
||||
// idx = 2%26 - ions idx=Z
|
||||
// idx = -1 - alpha+
|
||||
// idx = -1 - helium
|
||||
static const G4int RUDDZMAX = 27;
|
||||
static G4DNACrossSectionDataSet* xsdata[RUDDZMAX];
|
||||
static G4DNACrossSectionDataSet* xsalphaplus;
|
||||
static G4DNACrossSectionDataSet* xshelium;
|
||||
|
||||
// Water density table
|
||||
const std::vector<G4double>* fpWaterDensity = nullptr;
|
||||
static const std::vector<G4double>* fpWaterDensity;
|
||||
|
||||
//deexcitation manager to produce fluo photns and e-
|
||||
G4VAtomDeexcitation* fAtomDeexcitation;
|
||||
G4DNACrossSectionDataSet* xscurrent{nullptr};
|
||||
const G4ParticleDefinition* fParticle{nullptr};
|
||||
G4EmCorrections* fEmCorrections;
|
||||
G4Pow* fGpow;
|
||||
|
||||
//deexcitation manager to produce fluo photons and e-
|
||||
G4VAtomDeexcitation* fAtomDeexcitation{nullptr};
|
||||
|
||||
std::map<G4String,G4double,std::less<G4String> > lowEnergyLimit;
|
||||
std::map<G4String,G4double,std::less<G4String> > highEnergyLimit;
|
||||
|
||||
// ZF: 26-10-2010
|
||||
std::map<G4double,G4double> lowEnergyLimitForA, lowEnergyLimitOfModelForA, killBelowEnergyForA;
|
||||
// tracking cut and low-energy limit of proton x-section table
|
||||
G4double fLowestEnergy;
|
||||
// scaled low-energy limit of ion x-section table
|
||||
G4double fLimitEnergy;
|
||||
|
||||
G4bool isInitialised;
|
||||
G4bool isIon = false;
|
||||
G4int verboseLevel;
|
||||
|
||||
// Cross section
|
||||
G4DNACrossSectionDataSet* mainTable = nullptr;
|
||||
G4DNACrossSectionDataSet* currentTable = nullptr;
|
||||
const G4ParticleDefinition* currParticle = nullptr;
|
||||
G4double fMass{0.0};
|
||||
G4double fAmass{0.0};
|
||||
G4double fMassRate{1.0};
|
||||
G4double fElow{0.0};
|
||||
|
||||
typedef std::map<G4String,G4String,std::less<G4String> > MapFile;
|
||||
MapFile tableFile;
|
||||
G4double slaterEffectiveCharge[3] = {0.0};
|
||||
G4double sCoefficient[3] = {0.0};
|
||||
G4double fTemp[5] = {0.0};
|
||||
|
||||
typedef std::map<G4String,G4DNACrossSectionDataSet*,std::less<G4String> > MapData;
|
||||
MapData tableData;
|
||||
|
||||
// Final state
|
||||
|
||||
G4int idx{-1};
|
||||
G4int verbose{0};
|
||||
|
||||
G4bool isIon{false};
|
||||
G4bool isFirst{false};
|
||||
G4bool isHelium{false};
|
||||
G4bool statCode{false};
|
||||
G4bool useDNAWaterStructure{true};
|
||||
|
||||
// energy levels of water molecule
|
||||
G4DNAWaterIonisationStructure waterStructure;
|
||||
|
||||
G4double RandomizeEjectedElectronEnergy(G4ParticleDefinition* particleDefinition,
|
||||
G4double incomingParticleEnergy,
|
||||
G4int shell);
|
||||
|
||||
G4double RejectionFunction(G4ParticleDefinition* particle,
|
||||
G4double k,
|
||||
G4double proposed_ws,
|
||||
G4int ionizationLevelIndex);
|
||||
|
||||
G4double ProposedSampledEnergy(G4ParticleDefinition* particle,
|
||||
G4double k,
|
||||
G4int ionizationLevelIndex);
|
||||
|
||||
G4double CorrectionFactor(G4ParticleDefinition* particleDefinition, G4double k, G4int shell);
|
||||
|
||||
G4double S_1s(G4double t,
|
||||
G4double energyTransferred,
|
||||
G4double slaterEffectiveChg,
|
||||
G4double shellNumber);
|
||||
|
||||
G4double S_2s(G4double t,
|
||||
G4double energyTransferred,
|
||||
G4double slaterEffectiveChg,
|
||||
G4double shellNumber);
|
||||
|
||||
|
||||
G4double S_2p(G4double t,
|
||||
G4double energyTransferred,
|
||||
G4double slaterEffectiveChg,
|
||||
G4double shellNumber);
|
||||
|
||||
G4double R(G4double t,
|
||||
G4double energyTransferred,
|
||||
G4double slaterEffectiveChg,
|
||||
G4double shellNumber) ;
|
||||
|
||||
G4double slaterEffectiveCharge[3];
|
||||
G4double sCoefficient[3];
|
||||
G4double localMinEnergy = 0.0;
|
||||
G4double currentScaledEnergy = 0.0;
|
||||
G4double massC12 = 0.0;
|
||||
|
||||
// Partial cross section
|
||||
|
||||
G4double PartialCrossSection(const G4Track& track);
|
||||
|
||||
G4double Sum(G4double energy, const G4String& particle);
|
||||
|
||||
G4int RandomSelect(G4double energy);
|
||||
|
||||
G4ParticleDefinition* GetDNAIonParticleDefinition(const G4ParticleDefinition* particleDefinition);
|
||||
|
||||
//
|
||||
|
||||
G4DNARuddIonisationExtendedModel & operator=(const G4DNARuddIonisationExtendedModel &right);
|
||||
G4DNARuddIonisationExtendedModel(const G4DNARuddIonisationExtendedModel&);
|
||||
|
||||
// Reusable particle definitions
|
||||
G4ParticleDefinition* protonDef = nullptr;
|
||||
G4ParticleDefinition* hydrogenDef = nullptr;
|
||||
G4ParticleDefinition* alphaPlusPlusDef = nullptr;
|
||||
G4ParticleDefinition* alphaPlusDef = nullptr;
|
||||
G4ParticleDefinition* heliumDef = nullptr;
|
||||
|
||||
G4ParticleDefinition* carbonDef = nullptr;
|
||||
G4ParticleDefinition* nitrogenDef = nullptr;
|
||||
G4ParticleDefinition* oxygenDef = nullptr;
|
||||
G4ParticleDefinition* siliconDef = nullptr;
|
||||
G4ParticleDefinition* ironDef = nullptr;
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline void G4DNARuddIonisationExtendedModel::SelectStationary (G4bool input)
|
||||
{
|
||||
statCode = input;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,15 +28,14 @@
|
||||
#ifndef G4DNAVacuumModel_h
|
||||
#define G4DNAVacuumModel_h 1
|
||||
|
||||
#include "G4VDNAModel.hh"
|
||||
#include "G4DNACrossSectionDataSet.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4LogLogInterpolation.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4ParticleChangeForGamma.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
|
||||
#include "G4DNACrossSectionDataSet.hh"
|
||||
#include "G4LogLogInterpolation.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4VDNAModel.hh"
|
||||
|
||||
/*!
|
||||
* \brief The G4DNAVacuumModel class
|
||||
@@ -45,32 +44,30 @@
|
||||
*/
|
||||
class G4DNAVacuumModel : public G4VDNAModel
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* \brief G4DNAVacuumModel
|
||||
* Constructor
|
||||
* \param applyToMaterial
|
||||
* \param p
|
||||
* \param nam
|
||||
*/
|
||||
G4DNAVacuumModel(const G4String& applyToMaterial = "all", const G4ParticleDefinition* p = nullptr,
|
||||
const G4String& nam = "DNAPTBVacuumModel");
|
||||
|
||||
public:
|
||||
|
||||
/*!
|
||||
* \brief G4DNAVacuumModel
|
||||
* Constructor
|
||||
* \param applyToMaterial
|
||||
* \param p
|
||||
* \param nam
|
||||
*/
|
||||
G4DNAVacuumModel(const G4String &applyToMaterial = "all", const G4ParticleDefinition* p = 0,
|
||||
const G4String& nam = "DNAPTBVacuumModel");
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* \brief ~G4DNAVacuumModel
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~G4DNAVacuumModel();
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* \brief Initialise
|
||||
* Registers the G4_Galactic material as "void material" for every particle
|
||||
*/
|
||||
virtual void Initialise(const G4ParticleDefinition*, const G4DataVector& = *(new G4DataVector()), G4ParticleChangeForGamma* fpChangeForGamme=nullptr);
|
||||
void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* \brief CrossSectionPerVolume
|
||||
* \param material
|
||||
* \param materialName
|
||||
@@ -81,36 +78,23 @@ public:
|
||||
* \return cross section value
|
||||
*/
|
||||
virtual G4double CrossSectionPerVolume(const G4Material* material,
|
||||
const G4String& materialName,
|
||||
const G4ParticleDefinition* p,
|
||||
G4double ekin,
|
||||
G4double emin,
|
||||
G4double emax);
|
||||
const G4ParticleDefinition* p, G4double ekin, G4double emin, G4double emax) override;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* \brief SampleSecondaries
|
||||
* \param materialName
|
||||
* \param particleChangeForGamma
|
||||
* \param tmin
|
||||
* \param tmax
|
||||
*/
|
||||
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4String& materialName,
|
||||
const G4DynamicParticle*,
|
||||
G4ParticleChangeForGamma *particleChangeForGamma,
|
||||
G4double tmin,
|
||||
G4double tmax);
|
||||
void SampleSecondaries(std::vector<G4DynamicParticle*>*, const G4MaterialCutsCouple*, const G4DynamicParticle*, G4double tmin, G4double tmax) override;
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
G4int verboseLevel; ///< verbose level
|
||||
private:
|
||||
G4int verboseLevel = 0; ///< verbose level
|
||||
|
||||
// copy constructor and hide assignment operator
|
||||
G4DNAVacuumModel(const G4DNAVacuumModel&); // prevent copy-construction
|
||||
G4DNAVacuumModel & operator=(const G4DNAVacuumModel &right); // prevent assignement
|
||||
G4DNAVacuumModel(const G4DNAVacuumModel&) = delete; // prevent copy-construction
|
||||
G4DNAVacuumModel& operator=(const G4DNAVacuumModel& right) = delete; // prevent assignement
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -32,275 +32,275 @@
|
||||
#define G4VDNAModel_HH
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4503)
|
||||
# pragma warning(disable : 4503)
|
||||
#endif
|
||||
|
||||
#include "G4DNACrossSectionDataSet.hh"
|
||||
#include "G4DNAMolecularMaterial.hh"
|
||||
#include "G4LogLogInterpolation.hh"
|
||||
#include "G4VEmModel.hh"
|
||||
|
||||
#include "G4DNAMaterialManager.hh"
|
||||
/*! \class G4VDNAModel
|
||||
* \brief 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.
|
||||
* The goal is to allow the use of the material management system with little code interferences
|
||||
* within the model classes.
|
||||
*/
|
||||
class G4VDNAModel
|
||||
class G4VDNAModel : public G4VEmModel
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* \brief G4VDNAModel
|
||||
* Constructeur of the G4VDNAModel class.
|
||||
* \param nam
|
||||
* \param applyToMaterial
|
||||
*/
|
||||
G4VDNAModel(const G4String& nam, const G4String& applyToMaterial = "");
|
||||
|
||||
public:
|
||||
/*!
|
||||
* \brief G4VDNAModel
|
||||
* Constructeur of the G4VDNAModel class.
|
||||
* \param nam
|
||||
* \param applyToMaterial
|
||||
*/
|
||||
G4VDNAModel(const G4String& nam, const G4String& applyToMaterial);
|
||||
/*!
|
||||
* \brief ~G4VDNAModel
|
||||
*/
|
||||
virtual ~G4VDNAModel();
|
||||
|
||||
/*!
|
||||
* \brief ~G4VDNAModel
|
||||
*/
|
||||
virtual ~G4VDNAModel();
|
||||
/*!
|
||||
* \brief Initialise
|
||||
* Each model must implement an Initialize method.
|
||||
* \param particle
|
||||
* \param cuts
|
||||
*/
|
||||
virtual void Initialise(const G4ParticleDefinition* particle, const G4DataVector& cuts) = 0;
|
||||
|
||||
/*!
|
||||
* \brief Initialise
|
||||
* Each model must implement an Initialize method.
|
||||
* \param particle
|
||||
* \param cuts
|
||||
*/
|
||||
virtual void Initialise(const G4ParticleDefinition* particle,
|
||||
const G4DataVector& cuts,
|
||||
G4ParticleChangeForGamma* fpChangeForGamme=nullptr) =0;
|
||||
/*!
|
||||
* \brief 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. \param material \param materialName \param p \param ekin
|
||||
* \param emin
|
||||
* \param emax
|
||||
* \return crossSection*numberOfMoleculesPerVolumeUnit
|
||||
*/
|
||||
virtual G4double CrossSectionPerVolume(const G4Material* material, const G4ParticleDefinition* p,
|
||||
G4double ekin, G4double emin, G4double emax) = 0;
|
||||
|
||||
/*!
|
||||
* \brief 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. \param
|
||||
* materialName \param particleChangeForGamma \param tmin \param tmax
|
||||
*/
|
||||
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*, const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*, G4double tmin = 0, G4double tmax = DBL_MAX) = 0;
|
||||
|
||||
/*!
|
||||
* \brief 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.
|
||||
* \param material
|
||||
* \param materialName
|
||||
* \param p
|
||||
* \param ekin
|
||||
* \param emin
|
||||
* \param emax
|
||||
* \return crossSection*numberOfMoleculesPerVolumeUnit
|
||||
*/
|
||||
virtual G4double CrossSectionPerVolume(const G4Material* material,
|
||||
const G4String& materialName,
|
||||
const G4ParticleDefinition* p,
|
||||
G4double ekin,
|
||||
G4double emin,
|
||||
G4double emax) = 0;
|
||||
/*!
|
||||
* \brief IsMaterialDefine
|
||||
* Check if the given material is defined in the simulation
|
||||
* \param materialName
|
||||
* \return true if the material is defined in the simulation
|
||||
*/
|
||||
G4bool IsMaterialDefine(const size_t& materialID);
|
||||
|
||||
/*!
|
||||
* \brief 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.
|
||||
* \param materialName
|
||||
* \param particleChangeForGamma
|
||||
* \param tmin
|
||||
* \param tmax
|
||||
*/
|
||||
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4String& materialName,
|
||||
const G4DynamicParticle*,
|
||||
G4ParticleChangeForGamma *particleChangeForGamma,
|
||||
G4double tmin = 0,
|
||||
G4double tmax = DBL_MAX) = 0;
|
||||
/*!
|
||||
* \brief IsParticleExistingInModelForMaterial
|
||||
* To check two things:
|
||||
* 1- is the material existing in model ?
|
||||
* 2- if yes, is the particle defined for that material ?
|
||||
* \param particleName
|
||||
* \param materialName
|
||||
* \return true if the particle/material couple is defined in the model
|
||||
*/
|
||||
G4bool IsParticleExistingInModelForMaterial(
|
||||
const G4ParticleDefinition* particleName, const size_t& materialID);
|
||||
|
||||
/*!
|
||||
* \brief IsMaterialDefine
|
||||
* Check if the given material is defined in the simulation
|
||||
* \param materialName
|
||||
* \return true if the material is defined in the simulation
|
||||
*/
|
||||
G4bool IsMaterialDefine(const G4String &materialName);
|
||||
/*!
|
||||
* \brief GetName
|
||||
* \return the name of the model
|
||||
*/
|
||||
G4String GetName()
|
||||
{
|
||||
return fName;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief IsMaterialExistingInModel
|
||||
* Check if the given material is defined in the current model class
|
||||
* \param materialName
|
||||
* \return true if the material is defined in the model
|
||||
*/
|
||||
G4bool IsMaterialExistingInModel(const G4String &materialName);
|
||||
/*!
|
||||
* \brief GetHighEnergyLimit
|
||||
* \param material
|
||||
* \param particle
|
||||
* \return fHighEnergyLimits[material][particle]
|
||||
*/
|
||||
G4double GetHighELimit(const size_t& materialID, const G4ParticleDefinition* particle)
|
||||
{
|
||||
return fHighEnergyLimits[materialID][particle];
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief IsParticleExistingInModelForMaterial
|
||||
* To check two things:
|
||||
* 1- is the material existing in model ?
|
||||
* 2- if yes, is the particle defined for that material ?
|
||||
* \param particleName
|
||||
* \param materialName
|
||||
* \return true if the particle/material couple is defined in the model
|
||||
*/
|
||||
G4bool IsParticleExistingInModelForMaterial(const G4String &particleName, const G4String &materialName);
|
||||
/*!
|
||||
* \brief GetLowEnergyLimit
|
||||
* \param material
|
||||
* \param particle
|
||||
* \return fLowEnergyLimits[material][particle]
|
||||
*/
|
||||
G4double GetLowELimit(const size_t& materialID, const G4ParticleDefinition* particle)
|
||||
{
|
||||
return fLowEnergyLimits[materialID][particle];
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief GetName
|
||||
* \return the name of the model
|
||||
*/
|
||||
G4String GetName(){return fName;}
|
||||
/*!
|
||||
* \brief SetHighEnergyLimit
|
||||
* \param material
|
||||
* \param particle
|
||||
* \param lim
|
||||
*/
|
||||
void SetHighELimit(const size_t& materialID, const G4ParticleDefinition* particle, G4double lim)
|
||||
{
|
||||
fHighEnergyLimits[materialID][particle] = lim;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief GetHighEnergyLimit
|
||||
* \param material
|
||||
* \param particle
|
||||
* \return fHighEnergyLimits[material][particle]
|
||||
*/
|
||||
G4double GetHighELimit(const G4String& material, const G4String& particle) {return fHighEnergyLimits[material][particle];}
|
||||
/*!
|
||||
* \brief SetLowEnergyLimit
|
||||
* \param material
|
||||
* \param particle
|
||||
* \param lim
|
||||
*/
|
||||
void SetLowELimit(const size_t& materialID, const G4ParticleDefinition* particle, G4double lim)
|
||||
{
|
||||
fLowEnergyLimits[materialID][particle] = lim;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief GetLowEnergyLimit
|
||||
* \param material
|
||||
* \param particle
|
||||
* \return fLowEnergyLimits[material][particle]
|
||||
*/
|
||||
G4double GetLowELimit(const G4String& material, const G4String& particle) {return fLowEnergyLimits[material][particle];}
|
||||
protected:
|
||||
G4bool isInitialised = false;
|
||||
|
||||
/*!
|
||||
* \brief SetHighEnergyLimit
|
||||
* \param material
|
||||
* \param particle
|
||||
* \param lim
|
||||
*/
|
||||
void SetHighELimit(const G4String& material, const G4String& particle, G4double lim) {fHighEnergyLimits[material][particle]=lim;}
|
||||
// typedef used to ease the data container reading
|
||||
//
|
||||
using MaterialParticleMapData = std::map<size_t /*MaterialsID*/,
|
||||
std::map<const G4ParticleDefinition*, std::unique_ptr<G4DNACrossSectionDataSet>>>;
|
||||
|
||||
/*!
|
||||
* \brief SetLowEnergyLimit
|
||||
* \param material
|
||||
* \param particle
|
||||
* \param lim
|
||||
*/
|
||||
void SetLowELimit(const G4String& material, const G4String& particle, G4double lim) {fLowEnergyLimits[material][particle]=lim;}
|
||||
// Getters
|
||||
//
|
||||
/*!
|
||||
* \brief GetTableData
|
||||
* \return a pointer to a map with the following structure:
|
||||
* [materialName][particleName]=G4DNACrossSectionDataSet*
|
||||
*/
|
||||
MaterialParticleMapData* GetData()
|
||||
{
|
||||
return &fData;
|
||||
}
|
||||
|
||||
protected:
|
||||
// Setters
|
||||
// ... no setters
|
||||
|
||||
// typedef used to ease the data container reading
|
||||
//
|
||||
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;
|
||||
/*!
|
||||
* \brief BuildApplyToMatVect
|
||||
* Build the material name vector which is used to know the materials the user want to include in
|
||||
* the model. \param materials \return a vector with all the material names
|
||||
*/
|
||||
std::vector<G4String> BuildApplyToMatVect(const G4String& materials);
|
||||
|
||||
// Getters
|
||||
//
|
||||
/*!
|
||||
* \brief GetTableData
|
||||
* \return a pointer to a map with the following structure: [materialName][particleName]=G4DNACrossSectionDataSet*
|
||||
*/
|
||||
TableMapData* GetTableData(){return &fTableData;}
|
||||
/*!
|
||||
* \brief ReadAndSaveCSFile
|
||||
* Read and save a "simple" cross section file : use of G4DNACrossSectionDataSet->loadData()
|
||||
* \param materialName
|
||||
* \param particleName
|
||||
* \param file
|
||||
* \param scaleFactor
|
||||
*/
|
||||
void ReadAndSaveCSFile(const size_t& materialID, const G4ParticleDefinition* p,
|
||||
const G4String& file, const G4double& scaleFactor);
|
||||
|
||||
// Setters
|
||||
// ... no setters
|
||||
/*!
|
||||
* \brief 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. \param k \param particle \param materialName \return the selected shell
|
||||
*/
|
||||
G4int RandomSelectShell(
|
||||
const G4double& k, const G4ParticleDefinition* particle, const size_t& materialName);
|
||||
|
||||
/*!
|
||||
* \brief BuildApplyToMatVect
|
||||
* Build the material name vector which is used to know the materials the user want to include in the model.
|
||||
* \param materials
|
||||
* \return a vector with all the material names
|
||||
*/
|
||||
std::vector<G4String> BuildApplyToMatVect(const G4String &materials);
|
||||
/*!
|
||||
* \brief 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. \param materialName \param
|
||||
* particleName \param fileCS \param fileDiffCS \param scaleFactor
|
||||
*/
|
||||
void AddCrossSectionData(const size_t& materialName, const G4ParticleDefinition* particleName,
|
||||
const G4String& fileCS, const G4String& fileDiffCS, const G4double& scaleFactor);
|
||||
|
||||
/*!
|
||||
* \brief ReadAndSaveCSFile
|
||||
* Read and save a "simple" cross section file : use of G4DNACrossSectionDataSet->loadData()
|
||||
* \param materialName
|
||||
* \param particleName
|
||||
* \param file
|
||||
* \param scaleFactor
|
||||
*/
|
||||
void ReadAndSaveCSFile(const G4String &materialName, const G4String &particleName, const G4String &file, G4double scaleFactor);
|
||||
/*!
|
||||
* \brief 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. \param materialName \param particleName \param fileCS \param scaleFactor
|
||||
*/
|
||||
void AddCrossSectionData(const size_t& materialName, const G4ParticleDefinition* particleName,
|
||||
const G4String& fileCS, const G4double& scaleFactor);
|
||||
|
||||
/*!
|
||||
* \brief 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.
|
||||
* \param k
|
||||
* \param particle
|
||||
* \param materialName
|
||||
* \return the selected shell
|
||||
*/
|
||||
G4int RandomSelectShell(G4double k, const G4String &particle, const G4String &materialName);
|
||||
/*!
|
||||
* \brief LoadCrossSectionData
|
||||
* Method to loop on all the registered materials in the model and load the corresponding data.
|
||||
*/
|
||||
void LoadCrossSectionData(const G4ParticleDefinition* particleName);
|
||||
|
||||
/*!
|
||||
* \brief 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.
|
||||
* \param materialName
|
||||
* \param particleName
|
||||
* \param fileCS
|
||||
* \param fileDiffCS
|
||||
* \param scaleFactor
|
||||
*/
|
||||
void AddCrossSectionData(G4String materialName, G4String particleName, G4String fileCS, G4String fileDiffCS, G4double scaleFactor);
|
||||
/*!
|
||||
* \brief 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.
|
||||
* \param materialName
|
||||
* \param particleName
|
||||
* \param path
|
||||
* \param scaleFactor
|
||||
*/
|
||||
virtual void ReadDiffCSFile(const size_t& materialName, const G4ParticleDefinition* particleName,
|
||||
const G4String& path, const G4double& scaleFactor);
|
||||
|
||||
/*!
|
||||
* \brief 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.
|
||||
* \param materialName
|
||||
* \param particleName
|
||||
* \param fileCS
|
||||
* \param scaleFactor
|
||||
*/
|
||||
void AddCrossSectionData(G4String materialName, G4String particleName, G4String fileCS, G4double scaleFactor);
|
||||
/*!
|
||||
* \brief EnableMaterialAndParticle
|
||||
* \param materialName
|
||||
* \param particleName
|
||||
* Meant 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.
|
||||
*/
|
||||
void EnableForMaterialAndParticle(const size_t& materialID, const G4ParticleDefinition* p);
|
||||
|
||||
/*!
|
||||
* \brief LoadCrossSectionData
|
||||
* Method to loop on all the registered materials in the model and load the corresponding data.
|
||||
*/
|
||||
void LoadCrossSectionData(const G4String &particleName);
|
||||
private:
|
||||
|
||||
/*!
|
||||
* \brief 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.
|
||||
* \param materialName
|
||||
* \param particleName
|
||||
* \param path
|
||||
* \param scaleFactor
|
||||
*/
|
||||
virtual void ReadDiffCSFile(const G4String& materialName,
|
||||
const G4String& particleName,
|
||||
const G4String& path,
|
||||
const G4double scaleFactor);
|
||||
/*!
|
||||
* \brief IsMaterialExistingInModel
|
||||
* Check if the given material is defined in the current model class
|
||||
* \param materialName
|
||||
* \return true if the material is defined in the model
|
||||
*/
|
||||
G4bool IsMaterialExistingInModel(const size_t& materialID);
|
||||
|
||||
/*!
|
||||
* \brief EnableMaterialAndParticle
|
||||
* \param materialName
|
||||
* \param particleName
|
||||
* Meant 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.
|
||||
*/
|
||||
void EnableForMaterialAndParticle(const G4String& materialName, const G4String& particleName);
|
||||
G4String fName; ///< model name
|
||||
/*!
|
||||
* \brief 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
|
||||
*/
|
||||
const G4String fStringOfMaterials;
|
||||
|
||||
private:
|
||||
/*!
|
||||
* \brief 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
|
||||
*/
|
||||
const G4String fStringOfMaterials;
|
||||
/*!
|
||||
* \brief fTableData
|
||||
* It contains the cross section data and can be used like:
|
||||
* dataTable=fTableData[material][particle]
|
||||
*/
|
||||
MaterialParticleMapData fData;
|
||||
|
||||
/*!
|
||||
* \brief fTableData
|
||||
* It contains the cross section data and can be used like: dataTable=fTableData[material][particle]
|
||||
*/
|
||||
TableMapData fTableData;
|
||||
std::vector<size_t> fModelMaterials; ///< List the materials that can be activated (and will be
|
||||
///< by default) within the model.
|
||||
std::vector<const G4ParticleDefinition*>
|
||||
fModelParticles; ///< List the particles that can be activated within the model
|
||||
std::vector<G4String> fModelCSFiles; ///< List the cross section data files
|
||||
std::vector<G4String> fModelDiffCSFiles; ///< List the differential corss section data files
|
||||
std::vector<G4double>
|
||||
fModelScaleFactors; ///< List the model scale factors (they could change with material)
|
||||
|
||||
std::vector<G4String> fModelMaterials; ///< List the materials that can be activated (and will be by default) within the model.
|
||||
std::vector<G4String> fModelParticles; ///< List the particles that can be activated within the model
|
||||
std::vector<G4String> fModelCSFiles; ///< List the cross section data files
|
||||
std::vector<G4String> fModelDiffCSFiles; ///< List the differential corss section data files
|
||||
std::vector<G4double> fModelScaleFactors; ///< 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
|
||||
std::map<size_t, std::map<const G4ParticleDefinition*, G4double>>
|
||||
fLowEnergyLimits; ///< List the low energy limits
|
||||
std::map<size_t, std::map<const G4ParticleDefinition*, G4double>>
|
||||
fHighEnergyLimits; ///< List the high energy limits
|
||||
};
|
||||
|
||||
#endif // G4VDNAModel_HH
|
||||
#endif // G4VDNAModel_HH
|
||||
|
||||
Reference in New Issue
Block a user