GResponse.hpp
6.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/***************************************************************************
* GResponse.hpp - Response abstract base class *
* ----------------------------------------------------------------------- *
* copyright : (C) 2008 by Jurgen Knodlseder *
* ----------------------------------------------------------------------- *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
/**
* @file GResponse.hpp
* @brief GResponse class definition.
* @author J. Knodlseder
*/
#ifndef GRESPONSE_HPP
#define GRESPONSE_HPP
/* __ Includes ___________________________________________________________ */
#include "GSkyDir.hpp"
/* __ Namespaces _________________________________________________________ */
/***************************************************************************
* GResponse class definition *
***************************************************************************/
/**
* @class GResponse
*
* @brief Abstract interface for the instrument response function classes.
*
* @author J. Knodlseder
*/
class GResponse {
public:
/// Constructor
GResponse();
/// Copy constructor
GResponse(const GResponse& rsp);
/// Destructor
virtual ~GResponse();
/// Assignment operator
virtual GResponse& operator= (const GResponse& rsp);
/// Pure virtual method to define the interface for the member function
/// returning the instrument response function value
/// @param obsDir Observed photon direction
/// @param obsEng Observed energy of photon
/// @param srcDir True photon direction
/// @param srcEng True energy of photon
/// @param instPntDir Instrument pointing direction (e.g. z-axis)
/// @param instPosAng Instrument position angle
/// @param time Photon arrival time
virtual double irf(const GSkyDir& obsDir, const double& obsEng,
const GSkyDir& srcDir, const double& srcEng,
const GSkyDir& instPntDir, const double& instPosAng,
const double& time) = 0;
/// Pure virtual method to define the interface for the member function
/// returning the point spread function value
/// @param obsDir Observed photon direction
/// @param obsEng Observed energy of photon
/// @param srcDir True photon direction
/// @param srcEng True energy of photon
/// @param instPntDir Instrument pointing direction (e.g. z-axis)
/// @param instPosAng Instrument position angle
/// @param time Photon arrival time
virtual double psf(const GSkyDir& obsDir, const double& obsEng,
const GSkyDir& srcDir, const double& srcEng,
const GSkyDir& instPntDir, const double& instPosAng,
const double& time) = 0;
/// Pure virtual method to define the interface for the member function
/// returning the effective area value
/// @param obsDir Observed photon direction
/// @param obsEng Observed energy of photon
/// @param srcDir True photon direction
/// @param srcEng True energy of photon
/// @param instPntDir Instrument pointing direction (e.g. z-axis)
/// @param instPosAng Instrument position angle
/// @param time Photon arrival time
virtual double aeff(const GSkyDir& obsDir, const double& obsEng,
const GSkyDir& srcDir, const double& srcEng,
const GSkyDir& instPntDir, const double& instPosAng,
const double& time) = 0;
/// Pure virtual method to define the interface for the member function
/// returning the energy dispersion value
/// @param obsDir Observed photon direction
/// @param obsEng Observed energy of photon
/// @param srcDir True photon direction
/// @param srcEng True energy of photon
/// @param instPntDir Instrument pointing direction (e.g. z-axis)
/// @param instPosAng Instrument position angle
/// @param time Photon arrival time
virtual double edisp(const GSkyDir& obsDir, const double& obsEng,
const GSkyDir& srcDir, const double& srcEng,
const GSkyDir& instPntDir, const double& instPosAng,
const double& time) = 0;
/// Pure virtual method to define the calibration database
/// @param caldb Calibration database to be used
virtual void set_caldb(const std::string& caldb) = 0;
/// Pure virtual method to load the instrument response from the calibration
/// database
/// @param rspname Name of the instrument response
// virtual void load(std::string rspname) = 0;
/// Pure virtual method to save the instrument response into the calibration
/// database
/// @param rspname Name of the instrument response
// virtual void save(std::string rspname) const = 0;
/// Pure virtual method to clone the response instance
virtual GResponse* clone(void) const = 0;
protected:
/// Name of or path to the calibration database
std::string m_caldb;
/// Name of the instrument response
std::string m_rspname;
/// Protected method that initialises protected members of the class
void init_members(void);
/// Protected method that copies protected members of the class
void copy_members(const GResponse& rsp);
/// Protected method that frees memory allocated by instances of the class
void free_members(void);
private:
};
/***************************************************************************
* Inline methods *
***************************************************************************/
#endif /* GRESPONSE_HPP */