GammaLib  1.7.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GCOMSelection.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  * GCOMSelection.hpp - COMPTEL selection set class *
3  * ----------------------------------------------------------------------- *
4  * copyright (C) 2017 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 GCOMSelection.hpp
23  * @brief COMPTEL selection set class definition
24  * @author Juergen Knoedlseder
25  */
26 
27 #ifndef GCOMSELECTION_HPP
28 #define GCOMSELECTION_HPP
29 
30 /* __ Includes ___________________________________________________________ */
31 #include <string>
32 #include "GBase.hpp"
33 
34 /* __ Forward declarations _______________________________________________ */
35 class GCOMEventAtom;
36 
37 /* __ Constants __________________________________________________________ */
38 
39 
40 /***********************************************************************//**
41  * @class GCOMSelection
42  *
43  * @brief COMPTEL selection set class
44  *
45  * This class implements a COMPTEL selection set.
46  ***************************************************************************/
47 class GCOMSelection : public GBase {
48 
49 public:
50  // Constructors and destructors
51  GCOMSelection(void);
52  GCOMSelection(const GCOMSelection& select);
53  virtual ~GCOMSelection(void);
54 
55  // Operators
56  GCOMSelection& operator=(const GCOMSelection& select);
57 
58  // Implemented pure virtual base class methods
59  virtual void clear(void);
60  virtual GCOMSelection* clone(void) const;
61  virtual std::string classname(void) const;
62  virtual std::string print(const GChatter& chatter = NORMAL) const;
63 
64  // Other methods
65  void init_statistics(void) const;
66  bool use_event(const GCOMEventAtom& event) const;
67 
68 protected:
69  // Protected methods
70  void init_members(void);
71  void copy_members(const GCOMSelection& select);
72  void free_members(void);
73 
74  // Protected members
75  double m_e1_min; //!< Minimum D1 energy deposit (MeV)
76  double m_e1_max; //!< Maximum D1 energy deposit (MeV)
77  double m_e2_min; //!< Minimum D2 energy deposit (MeV)
78  double m_e2_max; //!< Maximum D2 energy deposit (MeV)
79  double m_tof_min; //!< Minimum TOF window
80  double m_tof_max; //!< Maximum TOF window
81  double m_psd_min; //!< Minimum PSD window
82  double m_psd_max; //!< Maximum PSD window
83  double m_zeta_min; //!< Minimum Earth horizon angle - Phibar window
84  double m_zeta_max; //!< Maximum Earth horizon angle - Phibar window
85  int m_reflag_min; //!< Minimum rejection flag
86  int m_reflag_max; //!< Maximum rejection flag
87  int m_vetoflag_min; //!< Minimum veto flag
88  int m_vetoflag_max; //!< Maximum veto flag
89 
90  // Selection statistics
91  mutable int m_num_events_checked; //!< Number of checked events
92  mutable int m_num_events_used; //!< Number of used events
93  mutable int m_num_events_rejected; //!< Number of rejected events
94  mutable int m_num_e1_min; //!< Number of events below E1 threshold
95  mutable int m_num_e1_max; //!< Number of events above E1 threshold
96  mutable int m_num_e2_min; //!< Number of events below E2 threshold
97  mutable int m_num_e2_max; //!< Number of events above E2 threshold
98  mutable int m_num_tof_min; //!< Number of events below TOF threshold
99  mutable int m_num_tof_max; //!< Number of events above TOF threshold
100  mutable int m_num_psd_min; //!< Number of events below PSD threshold
101  mutable int m_num_psd_max; //!< Number of events above PSD threshold
102  mutable int m_num_zeta_min; //!< Number of events below Zeta threshold
103  mutable int m_num_zeta_max; //!< Number of events above Zeta threshold
104  mutable int m_num_reflag_min; //!< Number of events below rejection flag threshold
105  mutable int m_num_reflag_max; //!< Number of events above rejection flag threshold
106  mutable int m_num_vetoflag_min; //!< Number of events below rejection flag threshold
107  mutable int m_num_vetoflag_max; //!< Number of events above rejection flag threshold
108  mutable int m_num_no_scatter; //!< Number of events without scatter angle
109  mutable int m_num_invalid_modcom; //!< Number of events with invalid minitelescopes
110 };
111 
112 
113 /***********************************************************************//**
114  * @brief Return class name
115  *
116  * @return String containing the class name ("GCOMSelection").
117  ***************************************************************************/
118 inline
119 std::string GCOMSelection::classname(void) const
120 {
121  return ("GCOMSelection");
122 }
123 
124 #endif /* GCOMSELECTION_HPP */
void copy_members(const GCOMSelection &select)
Copy class members.
int m_vetoflag_max
Maximum veto flag.
int m_num_tof_max
Number of events above TOF threshold.
virtual std::string classname(void) const
Return class name.
int m_reflag_min
Minimum rejection flag.
Definition of interface for all GammaLib classes.
double m_psd_min
Minimum PSD window.
double m_e2_max
Maximum D2 energy deposit (MeV)
double m_e2_min
Minimum D2 energy deposit (MeV)
COMPTEL selection set class.
int m_reflag_max
Maximum rejection flag.
double m_psd_max
Maximum PSD window.
int m_vetoflag_min
Minimum veto flag.
double m_zeta_max
Maximum Earth horizon angle - Phibar window.
void free_members(void)
Delete class members.
int m_num_zeta_max
Number of events above Zeta threshold.
double m_zeta_min
Minimum Earth horizon angle - Phibar window.
Interface class for all GammaLib classes.
Definition: GBase.hpp:52
int m_num_reflag_max
Number of events above rejection flag threshold.
GCOMSelection(void)
Void constructor.
int m_num_e1_min
Number of events below E1 threshold.
void init_members(void)
Initialise class members.
void init_statistics(void) const
Initialise selection statistics.
GCOMSelection & operator=(const GCOMSelection &select)
Assignment operator.
virtual ~GCOMSelection(void)
Destructor.
GChatter
Definition: GTypemaps.hpp:33
virtual std::string print(const GChatter &chatter=NORMAL) const
Print COMPTEL selection set.
double m_e1_max
Maximum D1 energy deposit (MeV)
int m_num_e2_max
Number of events above E2 threshold.
double m_tof_max
Maximum TOF window.
int m_num_events_rejected
Number of rejected events.
virtual GCOMSelection * clone(void) const
Clone COMPTEL selection set.
int m_num_vetoflag_min
Number of events below rejection flag threshold.
int m_num_reflag_min
Number of events below rejection flag threshold.
bool use_event(const GCOMEventAtom &event) const
Check if event should be used.
int m_num_invalid_modcom
Number of events with invalid minitelescopes.
int m_num_events_checked
Number of checked events.
double m_tof_min
Minimum TOF window.
int m_num_tof_min
Number of events below TOF threshold.
virtual void clear(void)
Clear COMPTEL selection set.
int m_num_psd_max
Number of events above PSD threshold.
int m_num_no_scatter
Number of events without scatter angle.
int m_num_psd_min
Number of events below PSD threshold.
double m_e1_min
Minimum D1 energy deposit (MeV)
int m_num_zeta_min
Number of events below Zeta threshold.
int m_num_e2_min
Number of events below E2 threshold.
int m_num_events_used
Number of used events.
int m_num_vetoflag_max
Number of events above rejection flag threshold.
int m_num_e1_max
Number of events above E1 threshold.
COMPTEL event atom class.