Falaise  4.0.1
SuperNEMO Software Toolkit
gg_hit.h
Go to the documentation of this file.
1 /// \file falaise/TrackerPreClustering/gg_hit.h
2 /* Author(s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2012-03-30
4  * Last modified: 2014-02-07
5  *
6  * Copyright 2012-2014 F. Mauger
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or (at
11  * your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  * Boston, MA 02110-1301, USA.
22  *
23  * Description:
24  *
25  * Tracker Pre-Clustering algorithm.
26  *
27  */
28 
29 #ifndef FALAISE_TRACKERPRECLUSTERING_GG_HIT_H
30 #define FALAISE_TRACKERPRECLUSTERING_GG_HIT_H 1
31 
32 // Third party:
33 // - Boost:
34 #include <boost/cstdint.hpp>
35 
36 namespace TrackerPreClustering {
37 
38 /// \brief Mock Geiger hit (inspired by NEMO-3 and SuperNEMO Geiger hit datamodels)
39 struct gg_hit {
40  /// Set default attribute values
41  void set_defaults();
42 
43  /// Return hit Id
44  int32_t get_id() const;
45 
46  /// Check if a geometry Id is available
47  bool has_geom_id() const;
48 
49  /// Return the module Id
50  int32_t get_module() const;
51 
52  /// Return the tracking chamber side Id
53  int32_t get_side() const;
54 
55  /// Return the cell layer Id
56  int32_t get_layer() const;
57 
58  /// Return the cell row Id
59  int32_t get_row() const;
60 
61  /// Default constructor
62  gg_hit();
63 
64  /// Reset attributes
65  void reset();
66 
67  /// Check if X-Y position is available
68  bool has_xy() const;
69 
70  /// Return the X position of the hit cell
71  double get_x() const;
72 
73  /// Return the Y position of the hit cell
74  double get_y() const;
75 
76  /// Check if longitudinal Z position and associated error are available
77  bool has_zdz() const;
78 
79  /// Return the Z position of the hit
80  double get_z() const;
81 
82  /// Return the error on Z position of the hit
83  double get_dz() const;
84 
85  /// Check if drift radius and associated error are available
86  bool has_rdr() const;
87 
88  /// Return the drift radius
89  double get_r() const;
90 
91  /// Return the error on drift radius
92  double get_dr() const;
93 
94  /// Check if the hit is sterile
95  bool is_sterile() const;
96 
97  /// Check if the hit is delayed
98  bool is_delayed() const;
99 
100  /// Check if the hit is prompt (not delayed)
101  bool is_prompt() const;
102 
103  /// Check if the hit is noisy
104  bool is_noisy() const;
105 
106  /// Check if the hit is peripheral (far from the anode central wire)
107  bool is_peripheral() const;
108 
109  /// Check if top cathode signal is missing
110  bool is_missing_top_cathode() const;
111 
112  /// Check if bottom cathode signal is missing
113  bool is_missing_bottom_cathode() const;
114 
115  /// Check if the delayed time is available
116  bool has_delayed_time() const;
117 
118  /// Return the delayed time
119  double get_delayed_time() const;
120 
121  /// Return the error in delayed time
122  double get_delayed_time_error() const;
123 
124  // Attributes:
125  int32_t id; /// Unique ID of the hit
126  int32_t module; /// Geometry ID : module number
127  int32_t side; /// Geometry ID : tracker side number
128  int32_t layer; /// Geometry ID : tracking layer number
129  int32_t row; /// Geometry ID : cell row number
130  bool sterile; /// Sterile flag
131  bool delayed; /// Delayed flag
132  bool peripheral; /// Peripheral flag
133  bool noisy; /// Noisy flag
134  bool missing_top_cathode; /// Missing top cathode flag
135  bool missing_bottom_cathode; /// Missing bottom cathode flag
136  double x, y; /// Position of the anode wire in module coordinates system
137  double z, dz; /// Longitudinal position of the hit along the anode wire
138  double r, dr; /// Transverse drift distance
139  double delayed_time; /// Delayed time for a delayed hit
140  double delayed_time_error; /// Delayed time error for a delayed hit
141 };
142 
143 } // end of namespace TrackerPreClustering
144 
145 #endif // FALAISE_TRACKERPRECLUSTERING_GG_HIT_H
146 
147 /*
148 ** Local Variables: --
149 ** mode: c++ --
150 ** c-file-style: "gnu" --
151 ** tab-width: 2 --
152 ** End: --
153 */
double get_z() const
Return the Z position of the hit.
double z
Position of the anode wire in module coordinates system.
Definition: gg_hit.h:137
bool sterile
Geometry ID : cell row number.
Definition: gg_hit.h:130
double delayed_time
Transverse drift distance.
Definition: gg_hit.h:139
int32_t id
Definition: gg_hit.h:125
double get_delayed_time() const
Return the delayed time.
bool is_sterile() const
Check if the hit is sterile.
Mock Geiger hit (inspired by NEMO-3 and SuperNEMO Geiger hit datamodels)
Definition: gg_hit.h:39
double get_y() const
Return the Y position of the hit cell.
bool has_zdz() const
Check if longitudinal Z position and associated error are available.
double y
Definition: gg_hit.h:136
void reset()
Reset attributes.
int32_t get_layer() const
Return the cell layer Id.
double r
Longitudinal position of the hit along the anode wire.
Definition: gg_hit.h:138
void set_defaults()
Set default attribute values.
bool is_missing_bottom_cathode() const
Check if bottom cathode signal is missing.
double get_dz() const
Return the error on Z position of the hit.
int32_t row
Geometry ID : tracking layer number.
Definition: gg_hit.h:129
bool missing_top_cathode
Noisy flag.
Definition: gg_hit.h:134
double get_dr() const
Return the error on drift radius.
double get_r() const
Return the drift radius.
bool is_noisy() const
Check if the hit is noisy.
double delayed_time_error
Delayed time for a delayed hit.
Definition: gg_hit.h:140
double dr
Definition: gg_hit.h:138
bool has_rdr() const
Check if drift radius and associated error are available.
bool has_delayed_time() const
Check if the delayed time is available.
bool peripheral
Delayed flag.
Definition: gg_hit.h:132
bool delayed
Sterile flag.
Definition: gg_hit.h:131
int32_t side
Geometry ID : module number.
Definition: gg_hit.h:127
double get_delayed_time_error() const
Return the error in delayed time.
bool missing_bottom_cathode
Missing top cathode flag.
Definition: gg_hit.h:135
bool has_geom_id() const
Check if a geometry Id is available.
double dz
Definition: gg_hit.h:137
bool is_missing_top_cathode() const
Check if top cathode signal is missing.
int32_t get_module() const
Return the module Id.
int32_t module
Unique ID of the hit.
Definition: gg_hit.h:126
bool is_peripheral() const
Check if the hit is peripheral (far from the anode central wire)
double x
Missing bottom cathode flag.
Definition: gg_hit.h:136
int32_t layer
Geometry ID : tracker side number.
Definition: gg_hit.h:128
bool is_prompt() const
Check if the hit is prompt (not delayed)
Definition: event_display.h:40
int32_t get_row() const
Return the cell row Id.
int32_t get_side() const
Return the tracking chamber side Id.
int32_t get_id() const
Return hit Id.
bool noisy
Peripheral flag.
Definition: gg_hit.h:133
gg_hit()
Default constructor.
double get_x() const
Return the X position of the hit cell.
bool has_xy() const
Check if X-Y position is available.
bool is_delayed() const
Check if the hit is delayed.