27 #ifndef GCTAEDISP2D_HPP
28 #define GCTAEDISP2D_HPP
103 const double&
theta = 0.0,
104 const double& phi = 0.0,
105 const double& zenith = 0.0,
106 const double& azimuth = 0.0)
const;
116 const double&
theta = 0.0,
117 const double& phi = 0.0,
118 const double& zenith = 0.0,
119 const double& azimuth = 0.0)
const;
121 const double&
theta = 0.0,
122 const double& phi = 0.0,
123 const double& zenith = 0.0,
124 const double& azimuth = 0.0)
const;
126 const double&
theta = 0.0,
127 const double& phi = 0.0,
128 const double& zenith = 0.0,
129 const double& azimuth = 0.0)
const;
133 const double&
theta)
const;
137 void fetch(
void)
const;
143 const bool& clobber =
false)
const;
151 double migra(
const int& imigra)
const;
152 double theta(
const int& itheta)
const;
154 const double& phi = 0.0,
155 const double& zenith = 0.0,
156 const double& azimuth = 0.0)
const;
158 const double& phi = 0.0,
159 const double& zenith = 0.0,
160 const double& azimuth = 0.0)
const;
168 const int& itheta)
const;
174 const double& wgt_el,
175 const double& wgt_er,
176 const double& wgt_tl,
177 const double& wgt_tr,
178 const int& offset)
const;
183 const double& wgt_el,
184 const double& wgt_er,
185 const double& wgt_tl,
186 const double& wgt_tr,
187 const double& migra)
const;
194 const double& limit)
const;
198 const double& limit)
const;
206 const double& total)
const;
213 const double& theta) :
217 double eval(
const double& log10Ereco);
262 return (
"GCTAEdisp2D");
int m_inx_etrue
True energy index.
void normalize_table(void)
Normalize energy dispersion table.
CTA 2D energy dispersion class.
std::string print(const GChatter &chatter=NORMAL) const
Print energy dispersion information.
GEnergy m_etrue
True photon energy.
GFilename filename(void) const
Return filename.
GEnergy etrue(const int &ietrue) const
Get true energy.
Energy value class definition.
const GCTAEdisp2D * m_parent
Pointer to parent class.
double smoothed_array_value(const int &inx, const GNdarray &array, const int &nodes, const double &limit) const
Get smoothed array value.
std::string classname(void) const
Return class name.
double theta(const int &itheta) const
Get offset angle in radiaus.
GCTAEdisp2D(void)
Void constructor.
void set_max_edisp(void)
Set array of maximum energy dispersion values.
Abstract base class for the CTA energy dispersion.
double m_last_theta_etrue
edisp_ereco_kern(const GCTAEdisp2D *parent, const GEnergy &etrue, const double &theta)
bool m_ereco_bounds_computed
double m_last_theta_ereco
Random number generator class.
double migra(const int &imigra) const
Get migration.
void copy_members(const GCTAEdisp2D &edisp)
Copy class members.
virtual ~GCTAEdisp2D(void)
Destructor.
GCTAResponseTable m_edisp
Edisp response table.
void fetch(void) const
Fetch energy dispersion.
GEnergy mc(GRan &ran, const GEnergy &etrue, const double &theta=0.0, const double &phi=0.0, const double &zenith=0.0, const double &azimuth=0.0) const
Simulate energy dispersion.
GEbounds etrue_bounds(const GEnergy &ereco, const double &theta=0.0, const double &phi=0.0, const double &zenith=0.0, const double &azimuth=0.0) const
Return true energy interval that contains the energy dispersion.
bool m_etrue_bounds_computed
double m_theta_max
Maximum theta (radians)
bool m_fetched
Signals that Edisp has been fetched.
void write(GFitsBinTable &table) const
Write energy dispersion into FITS binary table.
void compute_ereco_bounds(const double &theta=0.0, const double &phi=0.0, const double &zenith=0.0, const double &azimuth=0.0) const
Compute vector of reconstructed energy bounds.
CTA response table class definition.
void load(const GFilename &filename)
Load energy dispersion from FITS file.
Energy boundaries container class.
Single parameter function abstract base class definition.
void set_table(void)
Set table.
double eval(const double &log10Ereco)
Integration kernel for GCTAEdisp2D::edisp_ereco_kern class.
int table_stride(const int &axis) const
Return stride of response table axis.
void smooth_table(void)
Smoothed energy dispersion table.
double m_logEsrc_min
Minimum logE (log10(E/TeV))
void get_mean_rms(const GNdarray &array, double *mean, double *rms) const
Compute mean and root mean square of migration array.
Fast Fourier Transformation class.
Abstract interface for FITS table.
GEbounds ereco_bounds(const GEnergy &etrue, const double &theta=0.0, const double &phi=0.0, const double &zenith=0.0, const double &azimuth=0.0) const
Return observed energy interval that contains the energy dispersion.
Abstract CTA energy dispersion base class definition.
void save(const GFilename &filename, const bool &clobber=false) const
Save energy dispersion table into FITS file.
N-dimensional array class.
double get_max_edisp(const GEnergy &etrue, const double &theta) const
Get maximum energy dispersion value.
GNdarray smooth_array(const GNdarray &array, const int &nstart, const int &nstop, const double &limit) const
Smoothed array.
void compute_etrue_bounds(const double &theta=0.0, const double &phi=0.0, const double &zenith=0.0, const double &azimuth=0.0) const
Compute vector of true energy boundaries.
const GCTAResponseTable & table(void) const
Return response table.
double m_logEsrc_max
Maximum logE (log10(E/TeV))
void free_members(void)
Delete class members.
std::vector< GEbounds > m_ereco_bounds
void clear(void)
Clear energy dispersion.
double m_theta_min
Minimum theta (radians)
std::vector< double > m_max_edisp
Maximum Edisp.
GCTAEdisp2D * clone(void) const
Clone energy dispersion.
const std::string extname_cta_edisp2d
void init_members(void)
Initialise class members.
int m_inx_theta
Theta index.
GFilename m_filename
Name of Edisp response file.
double table_value(const int &base_ll, const int &base_lr, const int &base_rl, const int &base_rr, const double &wgt_el, const double &wgt_er, const double &wgt_tl, const double &wgt_tr, const int &offset) const
Return bi-linearly interpolate table value for given migration bin.
int table_index(const int &ietrue, const int &imigra, const int &itheta) const
Return index of response table element.
int m_inx_migra
Migration index.
GNdarray gaussian_array(const double &mean, const double &rms, const double &total) const
Return Gaussian approximation of energy dispersion array.
Single parameter function abstract base class.
CTA response table class.
double operator()(const GEnergy &ereco, const GEnergy &etrue, const double &theta=0.0, const double &phi=0.0, const double &zenith=0.0, const double &azimuth=0.0) const
Return energy dispersion in units of MeV .
double m_migra_min
Minimum migration.
void get_moments(const int &itheta, GNdarray *mean, GNdarray *rms, GNdarray *total) const
Compute moments.
double prob_erecobin(const GEnergy &ereco_min, const GEnergy &ereco_max, const GEnergy &etrue, const double &theta) const
Return energy dispersion probability for reconstructed energy interval.
GCTAEdisp2D & operator=(const GCTAEdisp2D &edisp)
Assignment operator.
double m_theta
Offset angle.
void read(const GFitsTable &table)
Read energy dispersion from FITS table.
double m_migra_max
Maximum migration.
Filename class interface definition.
Class that handles energies in a unit independent way.
std::vector< GEbounds > m_etrue_bounds
void set_boundaries(void)
Set energy dispersion boundaries.