GammaLib  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GCTAModelRadial.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  * GCTAModelRadial.hpp - Radial model abstract base class *
3  * ----------------------------------------------------------------------- *
4  * copyright (C) 2011-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 GCTAModelRadial.hpp
23  * @brief Abstract radial acceptance model class interface definition
24  * @author Juergen Knoedlseder
25  */
26 
27 #ifndef GCTAMODELRADIAL_HPP
28 #define GCTAMODELRADIAL_HPP
29 
30 /* __ Includes ___________________________________________________________ */
31 #include <string>
32 #include "GCTAModelSpatial.hpp"
33 #include "GModelPar.hpp"
34 
35 /* __ Forward declarations _______________________________________________ */
36 class GRan;
37 class GXmlElement;
38 class GCTAInstDir;
39 class GCTAObservation;
40 
41 
42 /***********************************************************************//**
43  * @class GCTAModelRadial
44  *
45  * @brief Abstract radial acceptance model class
46  *
47  * This class implements the radial component of the CTA radial acceptance
48  * model.
49  ***************************************************************************/
51 
52 public:
53  // Constructors and destructors
54  GCTAModelRadial(void);
55  GCTAModelRadial(const GCTAModelRadial& model);
56  virtual ~GCTAModelRadial(void);
57 
58  // Operators
59  virtual GCTAModelRadial& operator=(const GCTAModelRadial& model);
60 
61  // Implemented virtual methods
62  virtual double eval(const GCTAInstDir& dir,
63  const GEnergy& energy,
64  const GTime& time,
65  const bool& gradients = false) const;
66  virtual GCTAInstDir mc(const GEnergy& energy,
67  const GTime& time,
68  const GCTAObservation& obs,
69  GRan& ran) const;
70 
71  // Pure virtual methods
72  virtual void clear(void) = 0;
73  virtual GCTAModelRadial* clone(void) const = 0;
74  virtual std::string classname(void) const = 0;
75  virtual std::string type(void) const = 0;
76  virtual double omega(void) const = 0;
77  virtual double mc_max_value(const GCTAObservation& obs) const = 0;
78  virtual void read(const GXmlElement& xml) = 0;
79  virtual void write(GXmlElement& xml) const = 0;
80  virtual std::string print(const GChatter& chatter = NORMAL) const = 0;
81 
82  // Derived class pure virtual methods
83  virtual double eval(const double& offset,
84  const bool& gradients = false) const = 0;
85  virtual GCTAInstDir mc(GRan& ran) const = 0;
86 
87 protected:
88  // Protected methods
89  void init_members(void);
90  void copy_members(const GCTAModelRadial& model);
91  void free_members(void);
92 };
93 
94 #endif /* GCTAMODELRADIAL_HPP */
Abstract spatial model class.
virtual GCTAInstDir mc(const GEnergy &energy, const GTime &time, const GCTAObservation &obs, GRan &ran) const
Returns MC instrument direction.
void free_members(void)
Delete class members.
virtual void clear(void)=0
Clear object.
GCTAModelRadial(void)
Void constructor.
virtual std::string print(const GChatter &chatter=NORMAL) const =0
Print content of object.
XML element node class.
Definition: GXmlElement.hpp:48
Random number generator class.
Definition: GRan.hpp:44
void init_members(void)
Initialise class members.
Time class.
Definition: GTime.hpp:55
virtual GCTAModelRadial * clone(void) const =0
Clones object.
void copy_members(const GCTAModelRadial &model)
Copy class members.
Model parameter class interface definition.
GChatter
Definition: GTypemaps.hpp:33
virtual void write(GXmlElement &xml) const =0
virtual double mc_max_value(const GCTAObservation &obs) const =0
Abstract spatial model class interface definition.
CTA instrument direction class.
Definition: GCTAInstDir.hpp:63
virtual std::string classname(void) const =0
Return class name.
Abstract radial acceptance model class.
virtual void read(const GXmlElement &xml)=0
CTA observation class.
virtual std::string type(void) const =0
virtual double omega(void) const =0
virtual GCTAModelRadial & operator=(const GCTAModelRadial &model)
Assignment operator.
virtual ~GCTAModelRadial(void)
Destructor.
Class that handles energies in a unit independent way.
Definition: GEnergy.hpp:48
virtual double eval(const GCTAInstDir &dir, const GEnergy &energy, const GTime &time, const bool &gradients=false) const
Evaluate function.