Initialise Each model must implement an Initialize method.
65{
66 if (isInitialised) {
67 return;
68 }
69 if (verboseLevel > 3) {
70 G4cout <<
"Calling G4DNACPA100ExcitationModel::Initialise()" <<
G4endl;
71 }
72
74 if (p != fpParticle) {
75 std::ostringstream oss;
76 oss << " Model is not applied for this particle " << p->GetParticleName();
78 oss.str().c_str());
79 }
80
82
83 if (path == nullptr) {
85 "G4LEDATA environment variable not set.");
86 return;
87 }
88
89 std::size_t index;
90 if (fpG4_WATER != nullptr) {
92 fLevels[index] = 1.214e-4;
94 "dna/sigmadiff_cumulated_elastic_e_cpa100", 1e-20 * m * m);
97 }
98 if (fpGuanine != nullptr) {
100 fLevels[index] = 1.4504480e-05;
102 "dna/sigmadiff_cumulated_elastic_e_cpa100_guanine", 1 * cm * cm);
105 }
106 if (fpDeoxyribose != nullptr) {
108 fLevels[index] = 1.6343100e-05;
110 "dna/sigmadiff_cumulated_elastic_e_cpa100_deoxyribose", 1 * cm * cm);
113 }
114 if (fpCytosine != nullptr) {
116 fLevels[index] = 1.9729660e-05;
118 "dna/sigmadiff_cumulated_elastic_e_cpa100_cytosine", 1 * cm * cm);
121 }
122 if (fpThymine != nullptr) {
124 fLevels[index] = 1.7381300e-05;
126 "dna/sigmadiff_cumulated_elastic_e_cpa100_thymine", 1 * cm * cm);
129 }
130 if (fpAdenine != nullptr) {
132 fLevels[index] = 1.6221800e-05;
134 "dna/sigmadiff_cumulated_elastic_e_cpa100_adenine", 1 * cm * cm);
137 }
138 if (fpPhosphate != nullptr) {
140 fLevels[index] = 2.2369600e-05;
142 "dna/sigmadiff_cumulated_elastic_e_cpa100_phosphoric_acid", 1 * cm * cm);
145 }
146
147
150 fpModelData = this;
151 }
152 else {
155 if (dataModel == nullptr) {
156 G4cout <<
"G4DNACPA100ElasticModel::CrossSectionPerVolume:: not good modelData" <<
G4endl;
158 "no modelData is registered");
159 }
160 else {
161 fpModelData = dataModel;
162 }
163 }
164
166 isInitialised = true;
167}
const char * G4FindDataDir(const char *)
static G4DNAMaterialManager * Instance()
void SetMasterDataModel(const DNAModelType &t, G4VEmModel *m)
G4VEmModel * GetModel(const DNAModelType &t)
std::size_t GetIndex() const
void LoadCrossSectionData(const G4ParticleDefinition *particleName)
LoadCrossSectionData Method to loop on all the registered materials in the model and load the corresp...
void SetLowELimit(const size_t &materialID, const G4ParticleDefinition *particle, G4double lim)
SetLowEnergyLimit.
void SetHighELimit(const size_t &materialID, const G4ParticleDefinition *particle, G4double lim)
SetHighEnergyLimit.
void AddCrossSectionData(const size_t &materialName, const G4ParticleDefinition *particleName, const G4String &fileCS, const G4String &fileDiffCS, const G4double &scaleFactor)
AddCrossSectionData Method used during the initialization of the model class to add a new material....
G4ParticleChangeForGamma * GetParticleChangeForGamma()