GammaLib  2.1.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GCTAPsf.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  * GCTAPsf.hpp - CTA point spread function base class *
3  * ----------------------------------------------------------------------- *
4  * copyright (C) 2012-2016 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 GCTAPsf.hpp
23  * @brief CTA point spread function base class definition
24  * @author Juergen Knoedlseder
25  */
26 
27 #ifndef GCTAPSF_HPP
28 #define GCTAPSF_HPP
29 
30 /* __ Includes ___________________________________________________________ */
31 #include <string>
32 #include "GBase.hpp"
33 
34 /* __ Forward declarations _______________________________________________ */
35 class GFilename;
36 class GRan;
37 
38 
39 /***********************************************************************//**
40  * @class GCTAPsf
41  *
42  * @brief Abstract base class for the CTA point spread function
43  *
44  * This class implements the abstract base class for the CTA point spread
45  * function.
46  ***************************************************************************/
47 class GCTAPsf : public GBase {
48 
49 public:
50  // Constructors and destructors
51  GCTAPsf(void);
52  GCTAPsf(const GCTAPsf& psf);
53  virtual ~GCTAPsf(void);
54 
55  // Pure virtual operators
56  virtual double operator()(const double& delta,
57  const double& logE,
58  const double& theta = 0.0,
59  const double& phi = 0.0,
60  const double& zenith = 0.0,
61  const double& azimuth = 0.0,
62  const bool& etrue = true) const = 0;
63 
64  // Operators
65  GCTAPsf& operator=(const GCTAPsf& psf);
66 
67  // Pure virtual methods
68  virtual void clear(void) = 0;
69  virtual GCTAPsf* clone(void) const = 0;
70  virtual std::string classname(void) const = 0;
71  virtual void load(const GFilename& filename) = 0;
72  virtual GFilename filename(void) const = 0;
73  virtual double mc(GRan& ran,
74  const double& logE,
75  const double& theta = 0.0,
76  const double& phi = 0.0,
77  const double& zenith = 0.0,
78  const double& azimuth = 0.0,
79  const bool& etrue = true) const = 0;
80  virtual double delta_max(const double& logE,
81  const double& theta = 0.0,
82  const double& phi = 0.0,
83  const double& zenith = 0.0,
84  const double& azimuth = 0.0,
85  const bool& etrue = true) const = 0;
86  virtual double containment_radius(const double& fraction,
87  const double& logE,
88  const double& theta = 0.0,
89  const double& phi = 0.0,
90  const double& zenith = 0.0,
91  const double& azimuth = 0.0,
92  const bool & etrue = true) const = 0;
93  virtual std::string print(const GChatter& chatter = NORMAL) const = 0;
94 
95 protected:
96  // Methods
97  void init_members(void);
98  void copy_members(const GCTAPsf& psf);
99  void free_members(void);
100 };
101 
102 #endif /* GCTAPSF_HPP */
void free_members(void)
Delete class members.
Definition: GCTAPsf.cpp:164
virtual double mc(GRan &ran, const double &logE, const double &theta=0.0, const double &phi=0.0, const double &zenith=0.0, const double &azimuth=0.0, const bool &etrue=true) const =0
virtual std::string classname(void) const =0
Return class name.
Definition of interface for all GammaLib classes.
Abstract base class for the CTA point spread function.
Definition: GCTAPsf.hpp:47
virtual void clear(void)=0
Clear object.
Random number generator class.
Definition: GRan.hpp:44
GCTAPsf & operator=(const GCTAPsf &psf)
Assignment operator.
Definition: GCTAPsf.cpp:106
virtual double delta_max(const double &logE, const double &theta=0.0, const double &phi=0.0, const double &zenith=0.0, const double &azimuth=0.0, const bool &etrue=true) const =0
void init_members(void)
Initialise class members.
Definition: GCTAPsf.cpp:142
void copy_members(const GCTAPsf &psf)
Copy class members.
Definition: GCTAPsf.cpp:154
virtual double containment_radius(const double &fraction, const double &logE, const double &theta=0.0, const double &phi=0.0, const double &zenith=0.0, const double &azimuth=0.0, const bool &etrue=true) const =0
GCTAPsf(void)
Void constructor.
Definition: GCTAPsf.cpp:53
Filename class.
Definition: GFilename.hpp:62
Interface class for all GammaLib classes.
Definition: GBase.hpp:52
virtual GFilename filename(void) const =0
GChatter
Definition: GTypemaps.hpp:33
virtual std::string print(const GChatter &chatter=NORMAL) const =0
Print content of object.
virtual GCTAPsf * clone(void) const =0
Clones object.
virtual ~GCTAPsf(void)
Destructor.
Definition: GCTAPsf.cpp:84
virtual void load(const GFilename &filename)=0
virtual double operator()(const double &delta, const double &logE, const double &theta=0.0, const double &phi=0.0, const double &zenith=0.0, const double &azimuth=0.0, const bool &etrue=true) const =0