Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4DNAPTBExcitationModel Class Reference

The G4DNAPTBExcitationModel class This class implements the PTB excitation model. More...

#include <G4DNAPTBExcitationModel.hh>

+ Inheritance diagram for G4DNAPTBExcitationModel:

Public Member Functions

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

Additional Inherited Members

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

Detailed Description

The G4DNAPTBExcitationModel class This class implements the PTB excitation model.

Definition at line 53 of file G4DNAPTBExcitationModel.hh.

Constructor & Destructor Documentation

◆ G4DNAPTBExcitationModel()

G4DNAPTBExcitationModel::G4DNAPTBExcitationModel ( const G4String applyToMaterial = "all",
const G4ParticleDefinition p = 0,
const G4String nam = "DNAPTBExcitationModel" 
)

G4DNAPTBExcitationModel Constructor.

Parameters
applyToMaterial
p
nam

Definition at line 36 of file G4DNAPTBExcitationModel.cc.

38 : G4VDNAModel(nam, applyToMaterial)
39{
40 verboseLevel= 0;
41 // Verbosity scale:
42 // 0 = nothing
43 // 1 = warning for energy non-conservation
44 // 2 = details of energy budget
45 // 3 = calculation of cross sections, file openings, sampling of atoms
46 // 4 = entering in methods
47
48 // initialisation of mean energy loss for each material
49 tableMeanEnergyPTB["THF"] = 8.01*eV;
50 tableMeanEnergyPTB["PY"] = 7.61*eV;
51 tableMeanEnergyPTB["PU"] = 7.61*eV;
52 tableMeanEnergyPTB["TMP"] = 8.01*eV;
53
54 if( verboseLevel>0 )
55 {
56 G4cout << "PTB excitation model is constructed " << G4endl;
57 }
58}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
The G4VDNAModel class.
Definition: G4VDNAModel.hh:50

◆ ~G4DNAPTBExcitationModel()

G4DNAPTBExcitationModel::~G4DNAPTBExcitationModel ( )
virtual

~G4DNAPTBExcitationModel Destructor

Definition at line 62 of file G4DNAPTBExcitationModel.cc.

63{
64
65}

Member Function Documentation

◆ CrossSectionPerVolume()

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

CrossSectionPerVolume Retrieve the cross section corresponding to the current material, particle and energy.

Parameters
material
materialName
p
ekin
emin
emax
Returns
the cross section value

Implements G4VDNAModel.

Definition at line 195 of file G4DNAPTBExcitationModel.cc.

201{
202 if (verboseLevel > 3)
203 G4cout << "Calling CrossSectionPerVolume() of G4DNAPTBExcitationModel" << G4endl;
204
205 // Get the name of the current particle
206 G4String particleName = particleDefinition->GetParticleName();
207
208 // initialise variables
209 G4double lowLim = 0;
210 G4double highLim = 0;
211 G4double sigma=0;
212
213 // Get the low energy limit for the current particle
214 lowLim = GetLowELimit(materialName, particleName);
215
216 // Get the high energy limit for the current particle
217 highLim = GetHighELimit(materialName, particleName);
218
219 // Check that we are in the correct energy range
220 if (ekin >= lowLim && ekin < highLim)
221 {
222 // Get the map with all the data tables
223 TableMapData* tableData = GetTableData();
224
225 // Retrieve the cross section value
226 sigma = (*tableData)[materialName][particleName]->FindValue(ekin);
227
228 if (verboseLevel > 2)
229 {
230 G4cout << "__________________________________" << G4endl;
231 G4cout << "°°° G4DNAPTBExcitationModel - XS INFO START" << G4endl;
232 G4cout << "°°° Kinetic energy(eV)=" << ekin/eV << " particle : " << particleName << G4endl;
233 G4cout << "°°° Cross section per "<< materialName <<" molecule (cm^2)=" << sigma/cm/cm << G4endl;
234 G4cout << "°°° G4DNAPTBExcitationModel - XS INFO END" << G4endl;
235 }
236
237 }
238
239 // Return the cross section value
240 return sigma;
241}
double G4double
Definition: G4Types.hh:83
TableMapData * GetTableData()
GetTableData.
Definition: G4VDNAModel.hh:193
std::map< G4String, std::map< G4String, G4DNACrossSectionDataSet *, std::less< G4String > > > TableMapData
Definition: G4VDNAModel.hh:183
G4double GetHighELimit(const G4String &material, const G4String &particle)
GetHighEnergyLimit.
Definition: G4VDNAModel.hh:153
G4double GetLowELimit(const G4String &material, const G4String &particle)
GetLowEnergyLimit.
Definition: G4VDNAModel.hh:161

◆ Initialise()

void G4DNAPTBExcitationModel::Initialise ( const G4ParticleDefinition particle,
const G4DataVector = *(new G4DataVector()),
G4ParticleChangeForGamma fpChangeForGamme = nullptr 
)
virtual

Initialise Set the materials for which the model can be used and defined the energy limits.

Implements G4VDNAModel.

Definition at line 69 of file G4DNAPTBExcitationModel.cc.

71{
72 if (verboseLevel > 3)
73 G4cout << "Calling G4DNAPTBExcitationModel::Initialise()" << G4endl;
74
75 G4double scaleFactor = 1e-16*cm*cm;
76 G4double scaleFactorBorn = (1.e-22 / 3.343) * m*m;
77
79
80 //*******************************************************
81 // Cross section data
82 //*******************************************************
83
84 if(particle == electronDef)
85 {
86 G4String particleName = particle->GetParticleName();
87
89 particleName,
90 "dna/sigma_excitation_e-_PTB_THF",
91 scaleFactor);
92 SetLowELimit("THF", particleName, 9.*eV);
93 SetHighELimit("THF", particleName, 1.*keV);
94
96 particleName,
97 "dna/sigma_excitation_e-_PTB_PY",
98 scaleFactor);
99 SetLowELimit("PY", particleName, 9.*eV);
100 SetHighELimit("PY", particleName, 1.*keV);
101
103 particleName,
104 "dna/sigma_excitation_e-_PTB_PU",
105 scaleFactor);
106 SetLowELimit("PU", particleName, 9.*eV);
107 SetHighELimit("PU", particleName, 1.*keV);
108
110 particleName,
111 "dna/sigma_excitation_e-_PTB_TMP",
112 scaleFactor);
113 SetLowELimit("TMP", particleName, 9.*eV);
114 SetHighELimit("TMP", particleName, 1.*keV);
115
116 AddCrossSectionData("G4_WATER",
117 particleName,
118 "dna/sigma_excitation_e_born",
119 scaleFactorBorn);
120 SetLowELimit("G4_WATER", particleName, 9.*eV);
121 SetHighELimit("G4_WATER", particleName, 1.*keV);
122
123 // DNA materials
124 //
125 AddCrossSectionData("backbone_THF",
126 particleName,
127 "dna/sigma_excitation_e-_PTB_THF",
128 scaleFactor*33./30);
129 SetLowELimit("backbone_THF", particleName, 9.*eV);
130 SetHighELimit("backbone_THF", particleName, 1.*keV);
131
132 AddCrossSectionData("cytosine_PY",
133 particleName,
134 "dna/sigma_excitation_e-_PTB_PY",
135 scaleFactor*42./30);
136 SetLowELimit("cytosine_PY", particleName, 9.*eV);
137 SetHighELimit("cytosine_PY", particleName, 1.*keV);
138
139 AddCrossSectionData("thymine_PY",
140 particleName,
141 "dna/sigma_excitation_e-_PTB_PY",
142 scaleFactor*48./30);
143 SetLowELimit("thymine_PY", particleName, 9.*eV);
144 SetHighELimit("thymine_PY", particleName, 1.*keV);
145
146 AddCrossSectionData("adenine_PU",
147 particleName,
148 "dna/sigma_excitation_e-_PTB_PU",
149 scaleFactor*50./44);
150 SetLowELimit("adenine_PU", particleName, 9.*eV);
151 SetHighELimit("adenine_PU", particleName, 1.*keV);
152
153 AddCrossSectionData("guanine_PU",
154 particleName,
155 "dna/sigma_excitation_e-_PTB_PU",
156 scaleFactor*56./44);
157 SetLowELimit("guanine_PU", particleName, 9.*eV);
158 SetHighELimit("guanine_PU", particleName, 1.*keV);
159
160 AddCrossSectionData("backbone_TMP",
161 particleName,
162 "dna/sigma_excitation_e-_PTB_TMP",
163 scaleFactor*33./50);
164 SetLowELimit("backbone_TMP", particleName, 9.*eV);
165 SetHighELimit("backbone_TMP", particleName, 1.*keV);
166
167 // MPietrzak, adding paths for N2
169 particleName,
170 "dna/sigma_excitation_e-_PTB_N2",
171 scaleFactor);
172 SetLowELimit("N2", particleName, 13.*eV);
173 SetHighELimit("N2", particleName, 1.02*MeV);
174 // MPietrzak
175 }
176
177 //*******************************************************
178 // Load data
179 //*******************************************************
180
182
183 //*******************************************************
184 // Verbose
185 //*******************************************************
186
187 if( verboseLevel>0 )
188 {
189 G4cout << "PTB excitation model is initialized " << G4endl;
190 }
191}
static G4Electron * ElectronDefinition()
Definition: G4Electron.cc:88
const G4String & GetParticleName() const
void SetHighELimit(const G4String &material, const G4String &particle, G4double lim)
SetHighEnergyLimit.
Definition: G4VDNAModel.hh:169
void AddCrossSectionData(G4String materialName, G4String particleName, G4String fileCS, G4String fileDiffCS, G4double scaleFactor)
AddCrossSectionData Method used during the initialization of the model class to add a new material....
Definition: G4VDNAModel.cc:58
void SetLowELimit(const G4String &material, const G4String &particle, G4double lim)
SetLowEnergyLimit.
Definition: G4VDNAModel.hh:177
void LoadCrossSectionData(const G4String &particleName)
LoadCrossSectionData Method to loop on all the registered materials in the model and load the corresp...
Definition: G4VDNAModel.cc:75

◆ SampleSecondaries()

void G4DNAPTBExcitationModel::SampleSecondaries ( std::vector< G4DynamicParticle * > *  fvect,
const G4MaterialCutsCouple ,
const G4String materialName,
const G4DynamicParticle aDynamicParticle,
G4ParticleChangeForGamma particleChangeForGamma,
G4double  tmin,
G4double  tmax 
)
virtual

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.

Parameters
materialName
particleChangeForGamma
tmin
tmax

Implements G4VDNAModel.

Definition at line 245 of file G4DNAPTBExcitationModel.cc.

252{
253 if (verboseLevel > 3)
254 G4cout << "Calling SampleSecondaries() of G4DNAPTBExcitationModel" << G4endl;
255
256 // Get the incident particle kinetic energy
257 G4double k = aDynamicParticle->GetKineticEnergy();
258 //Get the particle name
259 const G4String& particleName = aDynamicParticle->GetDefinition()->GetParticleName();
260 // Get the energy limits
261 G4double lowLim = GetLowELimit(materialName, particleName);
262 G4double highLim = GetHighELimit(materialName, particleName);
263
264 // Check if we are in the correct energy range
265 if (k >= lowLim && k < highLim)
266 {
267 if(materialName=="N2")
268 {
269
270 // Retrieve the excitation energy for the current material
271 G4int level = RandomSelectShell(k,particleName,materialName);
272 G4double excitationEnergy = ptbExcitationStructure.ExcitationEnergy(level, materialName);
273
274 // Calculate the new energy of the particle
275 G4double newEnergy = k - excitationEnergy;
276
277 // Check that the new energy is above zero before applying it the particle.
278 // Otherwise, do nothing.
279 if (newEnergy > 0)
280 {
281 particleChangeForGamma->ProposeMomentumDirection(aDynamicParticle->GetMomentumDirection());
282 particleChangeForGamma->SetProposedKineticEnergy(newEnergy);
283 particleChangeForGamma->ProposeLocalEnergyDeposit(excitationEnergy);
284 G4double ioniThres = ptbIonisationStructure.IonisationEnergy(0,materialName);
285 // if excitation energy greater than ionisation threshold, then autoionisaiton
286 if((excitationEnergy>ioniThres)&&(G4UniformRand()<0.5))
287 {
288 particleChangeForGamma->ProposeLocalEnergyDeposit(ioniThres);
289 // energy of ejected electron
290 G4double secondaryKinetic = excitationEnergy - ioniThres;
291 // random direction
292 G4double cosTheta = 2*G4UniformRand() - 1., phi = CLHEP::twopi*G4UniformRand();
293 G4double sinTheta = std::sqrt(1. - cosTheta*cosTheta);
294 G4double ux = sinTheta*std::cos(phi),
295 uy = sinTheta*std::sin(phi),
296 uz = cosTheta;
297 G4ThreeVector deltaDirection(ux,uy,uz);
298 // Create the new particle with its characteristics
299 G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(),deltaDirection,secondaryKinetic) ;
300 fvect->push_back(dp);
301 }
302 } else {
303 G4ExceptionDescription description;
304 description<<"Kinetic energy <= 0 at "<<materialName<<" material !!!";
305 G4Exception("G4DNAPTBExcitationModel::SampleSecondaries","",FatalException,description);
306 }
307 } else if(materialName!="G4_WATER"){
308 // Retrieve the excitation energy for the current material
309 G4double excitationEnergy = tableMeanEnergyPTB[materialName];
310 // Calculate the new energy of the particle
311 G4double newEnergy = k - excitationEnergy;
312 // Check that the new energy is above zero before applying it the particle.
313 // Otherwise, do nothing.
314 if (newEnergy > 0){
315 particleChangeForGamma->ProposeMomentumDirection(aDynamicParticle->GetMomentumDirection());
316 particleChangeForGamma->SetProposedKineticEnergy(newEnergy);
317 particleChangeForGamma->ProposeLocalEnergyDeposit(excitationEnergy);
318 } else {
319 G4ExceptionDescription description;
320 description<<"Kinetic energy <= 0 at "<<materialName<<" material !!!";
321 G4Exception("G4DNAPTBExcitationModel::SampleSecondaries","",FatalException,description);
322 }
323 } else {
324 G4int level = RandomSelectShell(k,particleName, materialName);
325 G4double excitationEnergy = waterStructure.ExcitationEnergy(level);
326 G4double newEnergy = k - excitationEnergy;
327
328 if (newEnergy > 0){
329 particleChangeForGamma->ProposeMomentumDirection(aDynamicParticle->GetMomentumDirection());
330 particleChangeForGamma->SetProposedKineticEnergy(newEnergy);
331 particleChangeForGamma->ProposeLocalEnergyDeposit(excitationEnergy);
332 const G4Track * theIncomingTrack = particleChangeForGamma->GetCurrentTrack();
334 level,
335 theIncomingTrack);
336 } else {
337 G4ExceptionDescription description;
338 description<<"Kinetic energy <= 0 at "<<materialName<<" material !!!";
339 G4Exception("G4DNAPTBExcitationModel::SampleSecondaries","",FatalException,description);
340 }
341 }
342 }
343
344}
@ eExcitedMolecule
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:59
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
int G4int
Definition: G4Types.hh:85
#define G4UniformRand()
Definition: Randomize.hh:52
static G4DNAChemistryManager * Instance()
void CreateWaterMolecule(ElectronicModification, G4int, const G4Track *)
G4double ExcitationEnergy(G4int ExcLevel, const G4String &materialName)
G4double IonisationEnergy(G4int level, const G4String &materialName)
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
static G4Electron * Electron()
Definition: G4Electron.cc:93
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposeMomentumDirection(const G4ThreeVector &Pfinal)
G4int RandomSelectShell(G4double k, const G4String &particle, const G4String &materialName)
RandomSelectShell Method to randomely select a shell from the data table uploaded....
Definition: G4VDNAModel.cc:182
const G4Track * GetCurrentTrack() const
void ProposeLocalEnergyDeposit(G4double anEnergyPart)

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