Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
source
processes
electromagnetic
dna
molecules
management
include
G4MolecularDecayTable.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
44
class
G4MolecularDecayChannel
;
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
88
class
G4MolecularDecayTable
89
{
90
91
public
:
92
93
G4MolecularDecayTable
();
94
~G4MolecularDecayTable
();
95
G4MolecularDecayTable
(
const
G4MolecularDecayTable
&);
96
G4MolecularDecayTable
&
operator=
(
const
G4MolecularDecayTable
&
right
);
97
98
public
:
99
100
//°°°°°°°°°°°°°°°°°°
101
// Create the table
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
107
void
AddeConfToExcitedState
(
const
G4String
&,
const
G4ElectronOccupancy
&);
108
void
AddDecayChannel
(
const
G4String
&,
const
G4MolecularDecayChannel
*);
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
129
inline
const
statesMap
&
G4MolecularDecayTable::GetExcitedStateMaps
()
const
130
{
131
return
fExcitedStatesMap;
132
}
133
134
inline
const
channelsMap
&
G4MolecularDecayTable::GetDecayChannelsMap
()
const
135
{
136
return
fDecayChannelsMap;
137
}
138
139
#endif
140
141
142
143
144
145
146
147
Generated on Sat May 25 2013 14:33:31 for Geant4 by
1.8.4