Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4MolecularDissociationTable.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // Contact: Mathieu Karamitros (kara (AT) cenbg . in2p3 . fr)
27 //
28 // WARNING : This class is released as a prototype.
29 // It might strongly evolve or even disapear in the next releases.
30 //
31 // ----------------------------------------------------------------
32 // GEANT 4 class header file
33 //
34 // History: first implementation, Alfonso Mantero 4 Mar 2009
35 // ----------------------------------------------------------------
36 //
37 #ifndef G4MolecularDecayTable_h
38 #define G4MolecularDecayTable_h 1
39 
40 #include <map>
41 #include <vector>
42 #include "G4ElectronOccupancy.hh"
43 
45 
46 //°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
47 struct eOccComp
48 {
49  bool operator() (const G4ElectronOccupancy& occ1, const G4ElectronOccupancy& occ2) const
50  {
51 
52  if (occ1.GetTotalOccupancy() != occ2.GetTotalOccupancy())
53  {
54  return occ1.GetTotalOccupancy()<occ2.GetTotalOccupancy();
55  }
56  else
57  {
58 
59  for (G4int i=0; i<occ1.GetSizeOfOrbit();)
60  {
61 
62  if (occ1.GetOccupancy(i) != occ2.GetOccupancy(i))
63  {
64  return occ1.GetOccupancy(i) < occ2.GetOccupancy(i);
65  }
66  else
67  {
68 
69  i++;
70  if (i >= occ1.GetSizeOfOrbit()) return false;
71  }
72 
73  }
74  }
75  return false;
76  }
77 };
78 
79 //°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
80 typedef std::map<G4ElectronOccupancy, G4String, eOccComp> statesMap;
81 typedef std::map<G4String, std::vector<const G4MolecularDecayChannel*>, std::less <G4String> > channelsMap;
82 
83 /** Class Description
84  * G4MolecularDecayTable operates as a container of deexcitation modes
85  * for excited or ionized molecules
86  */
87 
89 {
90 
91 public:
92 
97 
98 public:
99 
100  //°°°°°°°°°°°°°°°°°°
101  // Create the table
102  ////
103  // methods to construct the table "interactively"
104  void AddExcitedState(const G4String&); // creates an empty excited state
105 
106  // creates or adds to an existing excited state an electronic configuration
109  void CheckDataConsistency() ;
110  // Checks that probabilities sum up to 100% for each excited state
111 
112 //------------Inline fuctions------------
113 // Get methods to retrieve data
114 
115  const std::vector<const G4MolecularDecayChannel*>* GetDecayChannels(const G4ElectronOccupancy*) const ;
116  const std::vector<const G4MolecularDecayChannel*>* GetDecayChannels(const G4String&) const ;
117 
118  const G4String& GetExcitedState(const G4ElectronOccupancy*) const ;
119  const G4ElectronOccupancy& GetElectronOccupancy (const G4String&) const ;
120 
121  inline const statesMap& GetExcitedStateMaps() const;
122  inline const channelsMap& GetDecayChannelsMap() const;
123 
124 private:
125  statesMap fExcitedStatesMap ;
126  channelsMap fDecayChannelsMap ;
127 };
128 
130 {
131  return fExcitedStatesMap;
132 }
133 
135 {
136  return fDecayChannelsMap;
137 }
138 
139 #endif
140 
141 
142 
143 
144 
145 
146 
147 
G4int GetTotalOccupancy() const
void AddDecayChannel(const G4String &, const G4MolecularDecayChannel *)
G4int GetSizeOfOrbit() const
int G4int
Definition: G4Types.hh:78
G4MolecularDecayTable & operator=(const G4MolecularDecayTable &right)
G4int GetOccupancy(G4int orbit) const
std::map< G4ElectronOccupancy, G4String, eOccComp > statesMap
const G4String & GetExcitedState(const G4ElectronOccupancy *) const
void AddExcitedState(const G4String &)
const G4ElectronOccupancy & GetElectronOccupancy(const G4String &) const
const channelsMap & GetDecayChannelsMap() const
void AddeConfToExcitedState(const G4String &, const G4ElectronOccupancy &)
bool operator()(const G4ElectronOccupancy &occ1, const G4ElectronOccupancy &occ2) const
const std::vector< const G4MolecularDecayChannel * > * GetDecayChannels(const G4ElectronOccupancy *) const
const statesMap & GetExcitedStateMaps() const
std::map< G4String, std::vector< const G4MolecularDecayChannel * >, std::less< G4String > > channelsMap