All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CRTHit.hh
Go to the documentation of this file.
1 /**
2  * \class CRTData
3  *
4  * \ingroup crt
5  *
6  * \brief CRT Hit Info
7  *
8  * \author $Author: David Lorca $
9  *
10  */
11 
12 #ifndef CRTHit_hh_
13 #define CRTHit_hh_
14 
15 #include <cstdint>
16 #include <vector>
17 #include <map>
18 #include <string>
19 #include <utility>
20 
21 namespace sbn::crt {
22 
23  struct CRTHit{
24 
25  std::vector<uint8_t> feb_id; ///< FEB address
26  std::map< uint8_t, std::vector<std::pair<int,float> > > pesmap; ///< Saves signal hit information (FEB, local-channel and PE) .
27  float peshit; ///< Total photo-electron (PE) in a crt hit.
28 
29  uint64_t ts0_s; ///< Second-only part of timestamp T0.
30  double ts0_s_corr; ///< [Honestly, not sure at this point, it was there since long time (BB)]
31 
32  double ts0_ns; ///< Timestamp T0 (from White Rabbit), in UTC absolute time scale in nanoseconds from the Epoch.
33  double ts0_ns_corr; ///< [Honestly, not sure at this point, it was there since long time (BB)]
34  double ts1_ns; ///< Timestamp T1 ([signal time w.r.t. Trigger time]), in UTC absolute time scale in nanoseconds from the Epoch.
35 
36  int plane; ///< Name of the CRT wall (in the form of numbers).
37 
38  float x_pos; ///< position in x-direction (cm).
39  float x_err; ///< position uncertainty in x-direction (cm).
40  float y_pos; ///< position in y-direction (cm).
41  float y_err; ///< position uncertainty in y-direction (cm).
42  float z_pos; ///< position in z-direction (cm).
43  float z_err; ///< position uncertainty in z-direction (cm).
44 
45  std::string tagger; ///< Name of the CRT wall (in the form of strings).
46 
47  CRTHit() {}
48 
49  int64_t ts0() const { return static_cast<int64_t>(ts0_s) * 1'000'000'000LL + static_cast<int64_t>(ts0_ns); }
50  int64_t ts1() const { return static_cast<int64_t>(ts0_s) * 1'000'000'000LL + static_cast<int64_t>(ts1_ns); }
51 
52  };
53 
54 } // namespace sbn::crt
55 
56 #endif
int64_t ts0() const
Definition: CRTHit.hh:49
float z_err
position uncertainty in z-direction (cm).
Definition: CRTHit.hh:43
float x_err
position uncertainty in x-direction (cm).
Definition: CRTHit.hh:39
std::map< uint8_t, std::vector< std::pair< int, float > > > pesmap
Saves signal hit information (FEB, local-channel and PE) .
Definition: CRTHit.hh:26
std::vector< uint8_t > feb_id
FEB address.
Definition: CRTHit.hh:25
double ts1_ns
Timestamp T1 ([signal time w.r.t. Trigger time]), in UTC absolute time scale in nanoseconds from the ...
Definition: CRTHit.hh:34
int plane
Name of the CRT wall (in the form of numbers).
Definition: CRTHit.hh:36
float peshit
Total photo-electron (PE) in a crt hit.
Definition: CRTHit.hh:27
float y_err
position uncertainty in y-direction (cm).
Definition: CRTHit.hh:41
double ts0_ns_corr
[Honestly, not sure at this point, it was there since long time (BB)]
Definition: CRTHit.hh:33
double ts0_s_corr
[Honestly, not sure at this point, it was there since long time (BB)]
Definition: CRTHit.hh:30
uint64_t ts0_s
Second-only part of timestamp T0.
Definition: CRTHit.hh:29
float z_pos
position in z-direction (cm).
Definition: CRTHit.hh:42
double ts0_ns
Timestamp T0 (from White Rabbit), in UTC absolute time scale in nanoseconds from the Epoch...
Definition: CRTHit.hh:32
float y_pos
position in y-direction (cm).
Definition: CRTHit.hh:40
float x_pos
position in x-direction (cm).
Definition: CRTHit.hh:38
process_name crt
std::string tagger
Name of the CRT wall (in the form of strings).
Definition: CRTHit.hh:45