GammaLib 2.0.0
Loading...
Searching...
No Matches
GCTAResponse.hpp
Go to the documentation of this file.
1/***************************************************************************
2 * GCTAResponse.hpp - CTA response abstract base class *
3 * ----------------------------------------------------------------------- *
4 * copyright (C) 2010-2020 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 GCTAResponse.hpp
23 * @brief CTA response abstract base class definition
24 * @author Juergen Knoedlseder
25 */
26
27#ifndef GCTARESPONSE_HPP
28#define GCTARESPONSE_HPP
29
30/* __ Includes ___________________________________________________________ */
31#include <string>
32#include "GResponse.hpp"
33
34/* __ Type definitions ___________________________________________________ */
35
36/* __ Forward declarations _______________________________________________ */
37class GModelSky;
38class GEnergy;
39class GTime;
40class GEvent;
41class GPhoton;
42class GSource;
43class GObservation;
44class GXmlElement;
45
46
47/***********************************************************************//**
48 * @class GCTAResponse
49 *
50 * @brief CTA instrument response function class
51 *
52 * This class defines the interface for the CTA response function. It
53 * provides an abstract base class to CTA response function classes.
54 ***************************************************************************/
55class GCTAResponse : public GResponse {
56
57public:
58 // Constructors and destructors
59 GCTAResponse(void);
60 GCTAResponse(const GCTAResponse& rsp);
61 virtual ~GCTAResponse(void);
62
63 // Operators
64 virtual GCTAResponse& operator=(const GCTAResponse & rsp);
65
66 // Pure virtual methods
67 virtual void clear(void) = 0;
68 virtual GCTAResponse* clone(void) const = 0;
69 virtual std::string classname(void) const = 0;
70 virtual bool is_valid(void) const = 0;
71 virtual bool use_edisp(void) const = 0;
72 virtual bool use_tdisp(void) const = 0;
73 virtual bool apply_edisp(void) const = 0;
74 virtual void apply_edisp(const bool& apply_edisp) const = 0;
75 virtual double irf(const GEvent& event,
76 const GPhoton& photon,
77 const GObservation& obs) const = 0;
78 virtual double nroi(const GModelSky& model,
79 const GEnergy& obsEng,
80 const GTime& obsTime,
81 const GObservation& obs) const = 0;
82 virtual GEbounds ebounds(const GEnergy& obsEng) const = 0;
83 virtual void read(const GXmlElement& xml) = 0;
84 virtual void write(GXmlElement& xml) const = 0;
85 virtual std::string print(const GChatter& chatter = NORMAL) const = 0;
86
87protected:
88 // Protected methods
89 void init_members(void);
90 void copy_members(const GCTAResponse& rsp);
91 void free_members(void);
92};
93
94#endif /* GCTARESPONSE_HPP */
Abstract response base class definition.
GChatter
Definition GTypemaps.hpp:33
@ NORMAL
Definition GTypemaps.hpp:36
CTA instrument response function class.
virtual double irf(const GEvent &event, const GPhoton &photon, const GObservation &obs) const =0
virtual std::string print(const GChatter &chatter=NORMAL) const =0
Print content of object.
virtual void read(const GXmlElement &xml)=0
void init_members(void)
Initialise class members.
virtual GCTAResponse & operator=(const GCTAResponse &rsp)
Assignment operator.
virtual bool use_tdisp(void) const =0
virtual std::string classname(void) const =0
Return class name.
virtual bool apply_edisp(void) const =0
virtual GEbounds ebounds(const GEnergy &obsEng) const =0
virtual bool is_valid(void) const =0
virtual GCTAResponse * clone(void) const =0
Clones object.
virtual ~GCTAResponse(void)
Destructor.
virtual void write(GXmlElement &xml) const =0
void free_members(void)
Delete class members.
void copy_members(const GCTAResponse &rsp)
Copy class members.
GCTAResponse(void)
Void constructor.
virtual void clear(void)=0
Clear object.
virtual double nroi(const GModelSky &model, const GEnergy &obsEng, const GTime &obsTime, const GObservation &obs) const =0
virtual void apply_edisp(const bool &apply_edisp) const =0
virtual bool use_edisp(void) const =0
Energy boundaries container class.
Definition GEbounds.hpp:60
Class that handles energies in a unit independent way.
Definition GEnergy.hpp:48
Abstract interface for the event classes.
Definition GEvent.hpp:71
Sky model class.
Abstract observation base class.
Class that handles photons.
Definition GPhoton.hpp:47
Abstract instrument response base class.
Definition GResponse.hpp:77
Class that handles gamma-ray sources.
Definition GSource.hpp:53
Time class.
Definition GTime.hpp:55
XML element node class.