GammaLib  2.1.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GLATEfficiency.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  * GLATEfficiency.hpp - Fermi/LAT IRF efficiency factor functor *
3  * ----------------------------------------------------------------------- *
4  * copyright (C) 2012-2018 by Juergen Knoedlseder *
5  * ----------------------------------------------------------------------- *
6  * *
7  * This program is free software: you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation, either version 3 of the License, or *
10  * (at your option) any later version. *
11  * *
12  * This program is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License *
18  * along with this program. If not, see <http://www.gnu.org/licenses/>. *
19  * *
20  ***************************************************************************/
21 /**
22  * @file GLATEfficiency.hpp
23  * @brief Fermi/LAT IRF efficiency factor functor class definition
24  * @author Juergen Knoedlseder
25  */
26 
27 #ifndef GLATEFFICIENCY_HPP
28 #define GLATEFFICIENCY_HPP
29 
30 /* __ Includes ___________________________________________________________ */
31 #include <string>
32 #include <vector>
33 #include "GBase.hpp"
34 
35 
36 /***********************************************************************//**
37  * @class GLATEfficiency
38  *
39  * @brief Interface for the Fermi/LAT efficiency factor functor
40  ***************************************************************************/
41 class GLATEfficiency : public GBase {
42 
43 public:
44  // Constructors and destructors
45  GLATEfficiency(void);
46  explicit GLATEfficiency(const std::vector<double>& pars);
47  GLATEfficiency(const GLATEfficiency& eff);
48  virtual ~GLATEfficiency(void);
49 
50  // Operators
52  double operator()(const double& logE) const;
53 
54  // Methods
55  void clear(void);
56  GLATEfficiency* clone(void) const;
57  std::string classname(void) const;
58  std::vector<double> pars(void) const;
59  std::string print(const GChatter& chatter = NORMAL) const;
60 
61 private:
62  // Methods
63  void init_members(void);
64  void copy_members(const GLATEfficiency& eff);
65  void free_members(void);
66 
67  // Protected members
68  double m_a0; //!< Energy domain 1 scale
69  double m_a1; //!< Energy domain 2 scale
70  double m_a2; //!< Energy domain 3 scale
71  double m_b0; //!< Energy domain 1 offset
72  double m_b1; //!< Energy domain 2 offset
73  double m_b2; //!< Energy domain 3 offset
74  double m_logEb1; //!< Separation of energy domains 1/2
75  double m_logEb2; //!< Separation of energy domains 2/3
76 };
77 
78 
79 /***********************************************************************//**
80  * @brief Return class name
81  *
82  * @return String containing the class name ("GLATEfficiency").
83  ***************************************************************************/
84 inline
85 std::string GLATEfficiency::classname(void) const
86 {
87  return ("GLATEfficiency");
88 }
89 
90 #endif /* GLATEFFICIENCY_HPP */
double m_logEb2
Separation of energy domains 2/3.
double m_a1
Energy domain 2 scale.
std::string classname(void) const
Return class name.
GLATEfficiency & operator=(const GLATEfficiency &eff)
Assignment operator.
virtual ~GLATEfficiency(void)
Destructor.
Definition of interface for all GammaLib classes.
std::vector< double > pars(void) const
Return efficiency parameters.
Interface for the Fermi/LAT efficiency factor functor.
GLATEfficiency(void)
Void constructor.
GLATEfficiency * clone(void) const
Clone efficiency factor functor.
double m_a2
Energy domain 3 scale.
void init_members(void)
Initialise class members.
double operator()(const double &logE) const
Functor operator.
Interface class for all GammaLib classes.
Definition: GBase.hpp:52
std::string print(const GChatter &chatter=NORMAL) const
Print efficiency factors.
void copy_members(const GLATEfficiency &eff)
Copy class members.
GChatter
Definition: GTypemaps.hpp:33
double m_b2
Energy domain 3 offset.
void clear(void)
Clear efficiency factor functor.
double m_logEb1
Separation of energy domains 1/2.
double m_b0
Energy domain 1 offset.
double m_b1
Energy domain 2 offset.
double m_a0
Energy domain 1 scale.
void free_members(void)
Delete class members.