GammaLib 2.0.0
Loading...
Searching...
No Matches
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 ***************************************************************************/
41class GLATEfficiency : public GBase {
42
43public:
44 // Constructors and destructors
45 GLATEfficiency(void);
46 explicit GLATEfficiency(const std::vector<double>& pars);
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
61private:
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 ***************************************************************************/
84inline
85std::string GLATEfficiency::classname(void) const
86{
87 return ("GLATEfficiency");
88}
89
90#endif /* GLATEFFICIENCY_HPP */
Definition of interface for all GammaLib classes.
GChatter
Definition GTypemaps.hpp:33
@ NORMAL
Definition GTypemaps.hpp:36
Interface class for all GammaLib classes.
Definition GBase.hpp:52
Interface for the Fermi/LAT efficiency factor functor.
double m_b1
Energy domain 2 offset.
double m_b2
Energy domain 3 offset.
void copy_members(const GLATEfficiency &eff)
Copy class members.
std::vector< double > pars(void) const
Return efficiency parameters.
std::string print(const GChatter &chatter=NORMAL) const
Print efficiency factors.
double m_b0
Energy domain 1 offset.
double operator()(const double &logE) const
Functor operator.
void clear(void)
Clear efficiency factor functor.
double m_logEb2
Separation of energy domains 2/3.
GLATEfficiency * clone(void) const
Clone efficiency factor functor.
double m_a1
Energy domain 2 scale.
virtual ~GLATEfficiency(void)
Destructor.
double m_logEb1
Separation of energy domains 1/2.
void free_members(void)
Delete class members.
double m_a2
Energy domain 3 scale.
GLATEfficiency(void)
Void constructor.
double m_a0
Energy domain 1 scale.
std::string classname(void) const
Return class name.
GLATEfficiency & operator=(const GLATEfficiency &eff)
Assignment operator.
void init_members(void)
Initialise class members.