GammaLib 2.0.0
Loading...
Searching...
No Matches
GCTABackground.hpp
Go to the documentation of this file.
1/***************************************************************************
2 * GCTABackground.hpp - CTA background model base class *
3 * ----------------------------------------------------------------------- *
4 * copyright (C) 2014-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 GCTABackground.hpp
23 * @brief CTA background model base class definition
24 * @author Juergen Knoedlseder
25 */
26
27#ifndef GCTABACKGROUND_HPP
28#define GCTABACKGROUND_HPP
29
30/* __ Includes ___________________________________________________________ */
31#include <string>
32#include "GBase.hpp"
33
34/* __ Forward declarations _______________________________________________ */
35class GRan;
36class GEnergy;
37class GTime;
38class GFilename;
39class GCTAInstDir;
41
42
43/***********************************************************************//**
44 * @class GCTABackground
45 *
46 * @brief Abstract base class for the CTA background model
47 ***************************************************************************/
48class GCTABackground : public GBase {
49
50public:
51 // Constructors and destructors
52 GCTABackground(void);
54 virtual ~GCTABackground(void);
55
56 // Pure virtual operators
57 virtual double operator()(const double& logE,
58 const double& detx,
59 const double& dety) const = 0;
60
61 // Operators
63
64 // Pure virtual methods
65 virtual void clear(void) = 0;
66 virtual GCTABackground* clone(void) const = 0;
67 virtual std::string classname(void) const = 0;
68 virtual void load(const GFilename& filename) = 0;
69 virtual GFilename filename(void) const = 0;
70 virtual GCTAInstDir mc(const GEnergy& energy,
71 const GTime& time,
72 GRan& ran) const = 0;
73 virtual const GModelSpectralNodes& spectrum(void) const = 0;
74 virtual double rate_ebin(const GCTAInstDir& dir,
75 const GEnergy& emin,
76 const GEnergy& emax) const = 0;
77 virtual std::string print(const GChatter& chatter = NORMAL) const = 0;
78
79protected:
80 // Methods
81 void init_members(void);
82 void copy_members(const GCTABackground& bgd);
83 void free_members(void);
84};
85
86#endif /* GCTABACKGROUND_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
Abstract base class for the CTA background model.
virtual GFilename filename(void) const =0
void init_members(void)
Initialise class members.
virtual double operator()(const double &logE, const double &detx, const double &dety) const =0
virtual GCTAInstDir mc(const GEnergy &energy, const GTime &time, GRan &ran) const =0
GCTABackground & operator=(const GCTABackground &bgd)
Assignment operator.
virtual std::string print(const GChatter &chatter=NORMAL) const =0
Print content of object.
virtual std::string classname(void) const =0
Return class name.
GCTABackground(void)
Void constructor.
virtual void clear(void)=0
Clear object.
virtual ~GCTABackground(void)
Destructor.
virtual const GModelSpectralNodes & spectrum(void) const =0
void copy_members(const GCTABackground &bgd)
Copy class members.
virtual double rate_ebin(const GCTAInstDir &dir, const GEnergy &emin, const GEnergy &emax) const =0
void free_members(void)
Delete class members.
virtual GCTABackground * clone(void) const =0
Clones object.
virtual void load(const GFilename &filename)=0
CTA instrument direction class.
Class that handles energies in a unit independent way.
Definition GEnergy.hpp:48
Filename class.
Definition GFilename.hpp:62
Spectral nodes model class.
Random number generator class.
Definition GRan.hpp:44
Time class.
Definition GTime.hpp:55