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

#include <G4DNAPTBExcitationStructure.hh>

Public Member Functions

 G4DNAPTBExcitationStructure ()
 
virtual ~G4DNAPTBExcitationStructure ()=default
 
G4double ExcitationEnergy (G4int ExcLevel, const G4String &materialName)
 
G4int NumberOfExcLevels (const G4String &materialName)
 

Detailed Description

Definition at line 35 of file G4DNAPTBExcitationStructure.hh.

Constructor & Destructor Documentation

◆ G4DNAPTBExcitationStructure()

G4DNAPTBExcitationStructure::G4DNAPTBExcitationStructure ( )

Definition at line 29 of file G4DNAPTBExcitationStructure.cc.

30{
31
32// taken directly from PTra code by MPietrzak
33 energyConstant["N2"].push_back( 1.85*eV);
34 energyConstant["N2"].push_back( 2.15*eV);
35 energyConstant["N2"].push_back( 8.00*eV);
36 energyConstant["N2"].push_back( 8.50*eV);
37 energyConstant["N2"].push_back( 8.60*eV);
38 energyConstant["N2"].push_back(11.05*eV);
39 energyConstant["N2"].push_back(11.79*eV);
40 energyConstant["N2"].push_back(11.90*eV);
41 energyConstant["N2"].push_back(12.25*eV);
42 energyConstant["N2"].push_back(12.50*eV);
43 energyConstant["N2"].push_back(13.01*eV);
44 energyConstant["N2"].push_back(13.19*eV);
45 energyConstant["N2"].push_back(13.30*eV);
46 energyConstant["N2"].push_back(14.33*eV);
47 energyConstant["N2"].push_back(14.84*eV);
48 energyConstant["N2"].push_back(15.18*eV);
49 energyConstant["N2"].push_back(15.70*eV);
50 energyConstant["N2"].push_back(15.75*eV);
51 energyConstant["N2"].push_back(15.86*eV);
52 energyConstant["N2"].push_back(17.36*eV);
53 energyConstant["N2"].push_back(17.95*eV);
54 energyConstant["N2"].push_back(19.77*eV);
55 energyConstant["N2"].push_back(20.79*eV);
56 energyConstant["N2"].push_back(20.87*eV);
57 energyConstant["N2"].push_back(22.27*eV);
58 energyConstant["N2"].push_back(22.83*eV);
59 energyConstant["N2"].push_back(37.19*eV);
60 energyConstant["N2"].push_back(38.67*eV);
61 energyConstant["N2"].push_back(39.23*eV);
62
63
64 for(const auto& [name,levels] : energyConstant)
65 {
66 nExcLevels[name] = (G4int)levels.size();
67 }
68}
int G4int
Definition: G4Types.hh:85
const char * name(G4int ptype)

◆ ~G4DNAPTBExcitationStructure()

virtual G4DNAPTBExcitationStructure::~G4DNAPTBExcitationStructure ( )
virtualdefault

Member Function Documentation

◆ ExcitationEnergy()

G4double G4DNAPTBExcitationStructure::ExcitationEnergy ( G4int  ExcLevel,
const G4String materialName 
)

Definition at line 71 of file G4DNAPTBExcitationStructure.cc.

72{
73 G4String matNameModif = ReplaceMaterial(materialName);
74
75 // check if the material exist in the map
76 if(energyConstant.find(matNameModif)==energyConstant.end())
77 {
78 std::ostringstream oss;
79 oss << "Material name was not found in energyConstantMap. Problematic material is: "<<matNameModif;
80 G4Exception("G4DNAPTBExcitationStructure::ExcitationEnergy","em0002",
81 FatalException, oss.str().c_str());
82 }
83
84 G4double excitation = 0.;
85
86 if (ExcLevel >=0 && ExcLevel < nExcLevels[matNameModif]) excitation = energyConstant[matNameModif][ExcLevel];
87
88 return excitation;
89}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:59
double G4double
Definition: G4Types.hh:83

Referenced by G4DNAPTBExcitationModel::SampleSecondaries().

◆ NumberOfExcLevels()

G4int G4DNAPTBExcitationStructure::NumberOfExcLevels ( const G4String materialName)

Definition at line 91 of file G4DNAPTBExcitationStructure.cc.

92{
93 G4String matNameModif = ReplaceMaterial(materialName);
94
95 // check if the material exist in the map
96 if(nExcLevels.find(matNameModif)==nExcLevels.end())
97 {
98 std::ostringstream oss;
99 oss << "Material name was not found in energyConstantMap. Problematic material is: "<<matNameModif;
100 G4Exception("G4DNAPTBNDExcitationStructure::NumberOfExcLevels","em0002",
101 FatalException, oss.str().c_str());
102 }
103
104 return nExcLevels[matNameModif];
105}

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