ctools  2.0.0
 All Classes Namespaces Files Functions Variables Macros Pages
ctprob.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  * ctprob - Computes event probability for a given model *
3  * ----------------------------------------------------------------------- *
4  * copyright (C) 2017-2022 by Leonardo Di Venere *
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 ctprob.hpp
23  * @brief Event probability computation tool interface definition
24  * @author Leonardo Di Venere
25  */
26 
27 #ifndef CTPROB_HPP
28 #define CTPROB_HPP
29 
30 /* __ Includes ___________________________________________________________ */
31 #include <vector>
32 #include <string>
33 #include "GammaLib.hpp"
34 #include "GCTALib.hpp"
35 #include "ctobservation.hpp"
36 
37 /* __Definitions _________________________________________________________ */
38 #define CTPROB_NAME "ctprob"
39 
40 
41 /***********************************************************************//**
42  * @class ctprob
43  *
44  * @brief Event probability computation tool
45  ***************************************************************************/
46 class ctprob : public ctobservation {
47 
48 public:
49  // Constructors and destructors
50  ctprob(void);
51  explicit ctprob(const GObservations& obs);
52  ctprob(int argc, char *argv[]);
53  ctprob(const ctprob& app);
54  virtual ~ctprob(void);
55 
56  // Operators
57  ctprob& operator=(const ctprob& app);
58 
59  // Methods
60  void clear(void);
61  void process(void);
62  void save(void);
63  void publish(const std::string& name = "");
64 
65 protected:
66  // Protected methods
67  void init_members(void);
68  void copy_members(const ctprob& app);
69  void free_members(void);
70  void get_parameters(void);
71  void evaluate_probability(GCTAObservation* obs);
72 
73  // User parameters
74  bool m_apply_edisp; //!< Apply energy dispersion?
75  bool m_publish; //!< Publish event list?
76  GChatter m_chatter; //!< Chattiness
77 };
78 
79 #endif /* CTPROB_HPP */
void copy_members(const ctprob &app)
Copy class members.
Definition: ctprob.cpp:379
void clear(void)
Clear ctprob tool.
Definition: ctprob.cpp:178
Event probability computation tool.
Definition: ctprob.hpp:46
bool m_publish
Publish event list?
Definition: ctprob.hpp:75
void init_members(void)
Initialise class members.
Definition: ctprob.cpp:362
const GObservations & obs(void) const
Return observation container.
ctprob(void)
Void constructor.
Definition: ctprob.cpp:52
void free_members(void)
Delete class members.
Definition: ctprob.cpp:394
bool m_apply_edisp
Apply energy dispersion?
Definition: ctprob.hpp:74
void get_parameters(void)
Get application parameters.
Definition: ctprob.cpp:407
Observation tool base class interface definition.
Base class for observation tools.
void evaluate_probability(GCTAObservation *obs)
Evaluate probability for events.
Definition: ctprob.cpp:463
void save(void)
Save the selected event list(s)
Definition: ctprob.cpp:279
virtual ~ctprob(void)
Destructor.
Definition: ctprob.cpp:121
ctprob & operator=(const ctprob &app)
Assignment operator.
Definition: ctprob.cpp:143
GChatter m_chatter
Chattiness.
Definition: ctprob.hpp:76
void process(void)
Process the ctprob tool.
Definition: ctprob.cpp:208
void publish(const std::string &name="")
Publish event lists.
Definition: ctprob.cpp:304