ctlike.hpp
2.94 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
/***************************************************************************
* ctlike - CTA maximum likelihood tool *
* ----------------------------------------------------------------------- *
* copyright (C) 2010-2011 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 ctlike.hpp
* @brief CTA maximum likelihood tool definition
* @author J. Knodlseder
*/
#ifndef CTLIKE_HPP
#define CTLIKE_HPP
/* __ Includes ___________________________________________________________ */
#include <string>
#include "GammaLib.hpp"
#include "GCTALib.hpp"
/* __Definitions _________________________________________________________ */
#define CTLIKE_NAME "ctlike"
#define CTLIKE_VERSION "00-01-00"
/***********************************************************************//**
* @class ctlike
*
* @brief CTA maximum likelihood tool interface defintion.
***************************************************************************/
class ctlike : public GApplication {
public:
// Constructors and destructors
ctlike(void);
ctlike(int argc, char *argv[]);
~ctlike(void);
// Methods
void run(void);
void get_parameters(void);
void optimize_lm(void);
void unbinned(const std::string& evfile);
void binned(const std::string& cntmap);
protected:
// Protected methods
void init_members(void);
void free_members(void);
// User parameters
std::string m_method; //!< Likelihood fitting method (binned/unbinned)
std::string m_stat; //!< Optimisation statistics (poisson/gaussian)
bool m_refit; //!< Refitting
std::string m_caldb; //!< Calibration database
std::string m_irf; //!< Instrument response functions
std::string m_srcmdl; //!< Source model XML file
std::string m_outmdl; //!< Source model output XML file
GModels m_models; //!< Source models
GObservations m_obs; //!< Observations
// Unbinned likelihood parameters
std::string m_evfile; //!< Events file
// Binned likelihood parameters
std::string m_cntmap; //!< Counts map
// Internal parameters
int m_max_iter; //!< Maximum number of iterations
double m_logL; //!< Maximum log likelihood
GOptimizer* m_opt; //!< Optimizer
};
#endif /* CTLIKE_HPP */