Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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::G4MolecularDissociationTable ( )

Definition at line 47 of file G4MolecularDissociationTable.cc.

48 {
49  ;
50 }
G4MolecularDissociationTable::~G4MolecularDissociationTable ( )

Definition at line 54 of file G4MolecularDissociationTable.cc.

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

Here is the call graph for this function:

G4MolecularDissociationTable::G4MolecularDissociationTable ( const G4MolecularDissociationTable right)

Definition at line 81 of file G4MolecularDissociationTable.cc.

82 {
83  *this = right;
84 }

Member Function Documentation

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

Definition at line 133 of file G4MolecularDissociationTable.cc.

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

Here is the caller graph for this function:

void G4MolecularDissociationTable::CheckDataConsistency ( ) const

Definition at line 141 of file G4MolecularDissociationTable.cc.

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

Here is the call graph for this function:

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

Definition at line 100 of file G4MolecularDissociationTable.cc.

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

Here is the caller graph for this function:

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

Definition at line 110 of file G4MolecularDissociationTable.cc.

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

Definition at line 89 of file G4MolecularDissociationTable.cc.

90 {
91  if(this == &right) return *this;
92  fDissociationChannels = right.fDissociationChannels;
93  return *this;
94 }
void G4MolecularDissociationTable::Serialize ( std::ostream &  )

Definition at line 177 of file G4MolecularDissociationTable.cc.

178 {
179  // TODO
180 }

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