GammaLib  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 _______________________________________________ */
37 class GModelSky;
38 class GEnergy;
39 class GTime;
40 class GEvent;
41 class GPhoton;
42 class GSource;
43 class GObservation;
44 class 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  ***************************************************************************/
55 class GCTAResponse : public GResponse {
56 
57 public:
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 
87 protected:
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 */
virtual bool is_valid(void) const =0
Abstract interface for the event classes.
Definition: GEvent.hpp:71
XML element node class.
Definition: GXmlElement.hpp:48
virtual bool apply_edisp(void) const =0
Time class.
Definition: GTime.hpp:55
void copy_members(const GCTAResponse &rsp)
Copy class members.
virtual double nroi(const GModelSky &model, const GEnergy &obsEng, const GTime &obsTime, const GObservation &obs) const =0
virtual GCTAResponse * clone(void) const =0
Clones object.
void init_members(void)
Initialise class members.
Class that handles photons.
Definition: GPhoton.hpp:47
virtual GCTAResponse & operator=(const GCTAResponse &rsp)
Assignment operator.
virtual ~GCTAResponse(void)
Destructor.
Energy boundaries container class.
Definition: GEbounds.hpp:60
virtual void clear(void)=0
Clear object.
virtual bool use_tdisp(void) const =0
void free_members(void)
Delete class members.
GChatter
Definition: GTypemaps.hpp:33
Abstract observation base class.
virtual std::string classname(void) const =0
Return class name.
virtual void read(const GXmlElement &xml)=0
CTA instrument response function class.
GCTAResponse(void)
Void constructor.
Abstract response base class definition.
Sky model class.
Definition: GModelSky.hpp:122
virtual GEbounds ebounds(const GEnergy &obsEng) const =0
virtual bool use_edisp(void) const =0
virtual std::string print(const GChatter &chatter=NORMAL) const =0
Print content of object.
virtual double irf(const GEvent &event, const GPhoton &photon, const GObservation &obs) const =0
virtual void write(GXmlElement &xml) const =0
Abstract instrument response base class.
Definition: GResponse.hpp:77
Class that handles gamma-ray sources.
Definition: GSource.hpp:53
Class that handles energies in a unit independent way.
Definition: GEnergy.hpp:48