fisx
fisx_shell.h
1 #/*##########################################################################
2 #
3 # The fisx library for X-Ray Fluorescence
4 #
5 # Copyright (c) 2014-2016 European Synchrotron Radiation Facility
6 #
7 # This file is part of the fisx X-ray developed by V.A. Sole
8 #
9 # Permission is hereby granted, free of charge, to any person obtaining a copy
10 # of this software and associated documentation files (the "Software"), to deal
11 # in the Software without restriction, including without limitation the rights
12 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 # copies of the Software, and to permit persons to whom the Software is
14 # furnished to do so, subject to the following conditions:
15 #
16 # The above copyright notice and this permission notice shall be included in
17 # all copies or substantial portions of the Software.
18 #
19 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 # THE SOFTWARE.
26 #
27 #############################################################################*/
28 #ifndef FISX_SHELL_H
29 #define FISX_SHELL_H
30 #include <string>
31 #include <ctype.h>
32 #include <vector>
33 #include <map>
34 
35 
36 namespace fisx
37 {
38 
39 class Shell
40 {
41 public:
42  Shell(); // Do not use, just to be able to fit into a map container
43 
47  Shell(std::string name);
48  // ~Shell();
49 
56  void setRadiativeTransitions(std::map<std::string, double>);
57 
61  void setRadiativeTransitions(std::vector<std::string>, std::vector<double> values);
62 
66  void setRadiativeTransitions(const char *strings[], const double *values, int nValues);
67 
75  void setNonradiativeTransitions(std::vector<std::string>, std::vector<double> values);
76  void setNonradiativeTransitions(std::map<std::string, double> values);
77  void setNonradiativeTransitions(const char *strings[], const double *values, int nValues);
78 
82  const std::map<std::string, double> & getAugerRatios() const;
83 
87  const std::map<std::string, std::map<std::string, double> > & getCosterKronigRatios() const;
88 
92  const std::map<std::string, double> & getFluorescenceRatios() const;
93 
94  const std::map<std::string, double> & getRadiativeTransitions() const;
95  const std::map<std::string, double> & getNonradiativeTransitions() const;
96 
102  std::map<std::string, double> getDirectVacancyTransferRatios(const std::string& destination) const;
103 
112  void setShellConstants(std::map<std::string, double>);
113  const std::map<std::string, double> & getShellConstants() const;
114  bool StringToInteger(const std::string& str, int & number);
115 
116  double getFluorescenceYield() const;
117 
118 private:
119  std::string name;
120  int shellMainIndex;
121  int subshellIndex;
122  void _updateNonradiativeRatios();
123  void _updateFluorescenceRatios();
124  std::string toUpperCaseString(const std::string & str);
125  // double omega;
126  // double* ck;
127  // double bindingEnergy;
128  // map of the form {"omega": fluorescence_yield,
129  // "fij": Coster-Kronig yield fij}
130  std::map<std::string, double> shellConstants;
131  std::map<std::string, double> radiativeTransitions;
132  std::map<std::string, double> nonradiativeTransitions;
133  std::map<std::string, double> augerRatios;
134  std::map<std::string, std::map<std::string, double> > costerKronigRatios;
135  std::map<std::string, double> fluorescenceRatios;
136 };
137 
138 } // namespace fisx
139 
140 #endif // FISX_SHELL_H
void setShellConstants(std::map< std::string, double >)
Definition: fisx_shell.cpp:640
Definition: fisx_element.cpp:34
const std::map< std::string, double > & getAugerRatios() const
Definition: fisx_shell.cpp:311
Definition: fisx_shell.h:39
std::map< std::string, double > getDirectVacancyTransferRatios(const std::string &destination) const
Definition: fisx_shell.cpp:517
const std::map< std::string, double > & getFluorescenceRatios() const
Definition: fisx_shell.cpp:320
void setNonradiativeTransitions(std::vector< std::string >, std::vector< double > values)
Definition: fisx_shell.cpp:144
const std::map< std::string, std::map< std::string, double > > & getCosterKronigRatios() const
Definition: fisx_shell.cpp:316
void setRadiativeTransitions(std::map< std::string, double >)
Definition: fisx_shell.cpp:261