GammaLib 2.0.0
Loading...
Searching...
No Matches
GCTAEdisp.hpp
Go to the documentation of this file.
1/***************************************************************************
2 * GCTAEdisp.hpp - Abstract CTA energy dispersion base class *
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 GCTAEdisp.hpp
23 * @brief Abstract CTA energy dispersion base class definition
24 * @author Juergen Knoedlseder
25 */
26
27#ifndef GCTAEDISP_HPP
28#define GCTAEDISP_HPP
29
30/* __ Includes ___________________________________________________________ */
31#include <string>
32#include "GBase.hpp"
33#include "GEbounds.hpp"
34#include "GFilename.hpp"
35
36/* __ Forward declarations _______________________________________________ */
37class GRan;
38class GEnergy;
39
40
41/***********************************************************************//**
42 * @class GCTAEdisp
43 *
44 * @brief Abstract base class for the CTA energy dispersion
45 *
46 * This class implements the abstract base class for the CTA energy
47 * dispersion.
48 ***************************************************************************/
49class GCTAEdisp : public GBase {
50
51public:
52 // Constructors and destructors
53 GCTAEdisp(void);
54 GCTAEdisp(const GCTAEdisp& edisp);
55 virtual ~GCTAEdisp(void);
56
57 // Pure virtual operators
58 virtual double operator()(const GEnergy& ereco,
59 const GEnergy& etrue,
60 const double& theta = 0.0,
61 const double& phi = 0.0,
62 const double& zenith = 0.0,
63 const double& azimuth = 0.0) const = 0;
64
65 // Operators
66 GCTAEdisp& operator=(const GCTAEdisp& edisp);
67
68 // Pure virtual methods
69 virtual void clear(void) = 0;
70 virtual GCTAEdisp* clone(void) const = 0;
71 virtual std::string classname(void) const = 0;
72 virtual void load(const GFilename& filename) = 0;
73 virtual GFilename filename(void) const = 0;
74 virtual GEnergy mc(GRan& ran,
75 const GEnergy& etrue,
76 const double& theta = 0.0,
77 const double& phi = 0.0,
78 const double& zenith = 0.0,
79 const double& azimuth = 0.0) const = 0;
80 virtual GEbounds ereco_bounds(const GEnergy& etrue,
81 const double& theta = 0.0,
82 const double& phi = 0.0,
83 const double& zenith = 0.0,
84 const double& azimuth = 0.0) const = 0;
85 virtual GEbounds etrue_bounds(const GEnergy& ereco,
86 const double& theta = 0.0,
87 const double& phi = 0.0,
88 const double& zenith = 0.0,
89 const double& azimuth = 0.0) const = 0;
90 virtual double prob_erecobin(const GEnergy& ereco_min,
91 const GEnergy& ereco_max,
92 const GEnergy& etrue,
93 const double& theta) const = 0;
94 virtual std::string print(const GChatter& chatter = NORMAL) const = 0;
95
96protected:
97 // Methods
98 void init_members(void);
99 void copy_members(const GCTAEdisp& edisp);
100 void free_members(void);
101};
102
103#endif /* GCTAEDISP_HPP */
Definition of interface for all GammaLib classes.
Energy boundaries class interface definition.
Filename class interface definition.
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 energy dispersion.
Definition GCTAEdisp.hpp:49
virtual std::string classname(void) const =0
Return class name.
virtual GEnergy mc(GRan &ran, const GEnergy &etrue, const double &theta=0.0, const double &phi=0.0, const double &zenith=0.0, const double &azimuth=0.0) const =0
virtual void load(const GFilename &filename)=0
void copy_members(const GCTAEdisp &edisp)
Copy class members.
virtual std::string print(const GChatter &chatter=NORMAL) const =0
Print content of object.
virtual ~GCTAEdisp(void)
Destructor.
Definition GCTAEdisp.cpp:84
GCTAEdisp & operator=(const GCTAEdisp &edisp)
Assignment operator.
GCTAEdisp(void)
Void constructor.
Definition GCTAEdisp.cpp:53
virtual GCTAEdisp * clone(void) const =0
Clones object.
virtual double operator()(const GEnergy &ereco, const GEnergy &etrue, const double &theta=0.0, const double &phi=0.0, const double &zenith=0.0, const double &azimuth=0.0) const =0
virtual GFilename filename(void) const =0
virtual double prob_erecobin(const GEnergy &ereco_min, const GEnergy &ereco_max, const GEnergy &etrue, const double &theta) const =0
virtual GEbounds etrue_bounds(const GEnergy &ereco, const double &theta=0.0, const double &phi=0.0, const double &zenith=0.0, const double &azimuth=0.0) const =0
virtual GEbounds ereco_bounds(const GEnergy &etrue, const double &theta=0.0, const double &phi=0.0, const double &zenith=0.0, const double &azimuth=0.0) const =0
void free_members(void)
Delete class members.
virtual void clear(void)=0
Clear object.
void init_members(void)
Initialise class members.
Energy boundaries container class.
Definition GEbounds.hpp:60
Class that handles energies in a unit independent way.
Definition GEnergy.hpp:48
Filename class.
Definition GFilename.hpp:62
Random number generator class.
Definition GRan.hpp:44