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

#include <G4MolecularDissociationTable.hh>

Public Member Functions

 G4MolecularDissociationTable ()
 
 ~G4MolecularDissociationTable ()
 
 G4MolecularDissociationTable (const G4MolecularDissociationTable &)
 
G4MolecularDissociationTableoperator= (const G4MolecularDissociationTable &right)
 
void AddChannel (const G4MolecularConfiguration *molConf, const G4MolecularDissociationChannel *channel)
 
void CheckDataConsistency () const
 
const std::vector< const G4MolecularDissociationChannel * > * GetDecayChannels (const G4MolecularConfiguration *) const
 
const std::vector< const G4MolecularDissociationChannel * > * GetDecayChannels (const G4String &excitedStateLabel) const
 
void Serialize (std::ostream &)
 

Detailed Description

Class Description G4MolecularDecayTable operates as a container of deexcitation modes for excited or ionized molecules

Definition at line 78 of file G4MolecularDissociationTable.hh.

Constructor & Destructor Documentation

◆ G4MolecularDissociationTable() [1/2]

G4MolecularDissociationTable::G4MolecularDissociationTable ( )

Definition at line 46 of file G4MolecularDissociationTable.cc.

47{
48 ;
49}

◆ ~G4MolecularDissociationTable()

G4MolecularDissociationTable::~G4MolecularDissociationTable ( )

Definition at line 53 of file G4MolecularDissociationTable.cc.

54{
55 ChannelMap::iterator it_map = fDissociationChannels.begin();
56
57 for (; it_map != fDissociationChannels.end(); it_map++)
58 {
59 vector<const G4MolecularDissociationChannel*>& decayChannels = it_map
60 ->second;
61 if (!decayChannels.empty())
62 {
63 for (int i = 0; i < (int) decayChannels.size(); i++)
64 {
65 if (decayChannels[i])
66 {
67 delete decayChannels[i];
68 decayChannels[i] = 0;
69 }
70 }
71 decayChannels.clear();
72 }
73 }
74 fDissociationChannels.clear();
75}

◆ G4MolecularDissociationTable() [2/2]

G4MolecularDissociationTable::G4MolecularDissociationTable ( const G4MolecularDissociationTable right)

Definition at line 79 of file G4MolecularDissociationTable.cc.

81{
82 *this = right;
83}

Member Function Documentation

◆ AddChannel()

void G4MolecularDissociationTable::AddChannel ( const G4MolecularConfiguration molConf,
const G4MolecularDissociationChannel channel 
)

Definition at line 131 of file G4MolecularDissociationTable.cc.

134{
135 fDissociationChannels[molConf].push_back(channel);
136}

Referenced by G4MoleculeDefinition::AddDecayChannel().

◆ CheckDataConsistency()

void G4MolecularDissociationTable::CheckDataConsistency ( ) const

Definition at line 140 of file G4MolecularDissociationTable.cc.

141{
142 ChannelMap::const_iterator channelsIter;
143
144 for(channelsIter = fDissociationChannels.begin();
145 channelsIter != fDissociationChannels.end(); ++channelsIter)
146 {
147
148 const vector<const G4MolecularDissociationChannel*>& decayVect =
149 channelsIter->second;
150 G4double sum = 0;
151
152 G4double max = decayVect.size();
153
154 for(size_t i = 0; i < max; i++)
155 {
156 const G4MolecularDissociationChannel* decay = decayVect[i];
157 const G4double prob = decay->GetProbability();
158 sum += prob;
159 }
160
161 if(sum != 1)
162 {
164 errMsg << "The probabilities for deecitation of molecular configuration "
165 << channelsIter->first->GetName()
166 << " with label :" << channelsIter->first->GetLabel()
167 << " don't sum up to 1";
168 G4Exception("G4MolecularDissociationTable::CheckDataConsistency",
169 "BRANCHING_RATIOS_CONSISTENCY",
171 errMsg);
172 }
173 }
174}
@ FatalErrorInArgument
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
double G4double
Definition: G4Types.hh:83
ParticleList decay(Cluster *const c)
Carries out a cluster decay.
T max(const T t1, const T t2)
brief Return the largest of the two arguments

◆ GetDecayChannels() [1/2]

const vector< const G4MolecularDissociationChannel * > * G4MolecularDissociationTable::GetDecayChannels ( const G4MolecularConfiguration conf) const

Definition at line 98 of file G4MolecularDissociationTable.cc.

100{
101 ChannelMap::const_iterator it_exstates = fDissociationChannels.find(conf);
102 if (it_exstates == fDissociationChannels.end()) return 0;
103 return &(it_exstates->second);
104}

Referenced by G4MoleculeDefinition::GetDecayChannels().

◆ GetDecayChannels() [2/2]

const vector< const G4MolecularDissociationChannel * > * G4MolecularDissociationTable::GetDecayChannels ( const G4String excitedStateLabel) const

Definition at line 109 of file G4MolecularDissociationTable.cc.

110{
111 for(ChannelMap::const_iterator it = fDissociationChannels.begin() ;
112 it!=fDissociationChannels.end() ; ++it
113 )
114 {
115 if(it->first->GetLabel() == exState) return &(it->second);
116 }
117 return 0;
118}

◆ operator=()

G4MolecularDissociationTable & G4MolecularDissociationTable::operator= ( const G4MolecularDissociationTable right)

Definition at line 88 of file G4MolecularDissociationTable.cc.

89{
90 if(this == &right) return *this;
91 fDissociationChannels = right.fDissociationChannels;
92 return *this;
93}

◆ Serialize()

void G4MolecularDissociationTable::Serialize ( std::ostream &  )

Definition at line 176 of file G4MolecularDissociationTable.cc.

177{
178 // TODO
179}

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