Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JHitR0.hh
Go to the documentation of this file.
1#ifndef __JTRIGGER__JHITR0__
2#define __JTRIGGER__JHITR0__
3
4#include "JTrigger/JHit.hh"
6
7
8/**
9 * \file
10 *
11 * Basic data structure for L0 hit.
12 * \author mdejong
13 */
14namespace JTRIGGER {}
15namespace JPP { using namespace JTRIGGER; }
16
17namespace JTRIGGER {
18
20
21
22 /**
23 * Reduced data structure for L0 hit.
24 */
25 class JHitR0 :
26 public JHit
27 {
28 public:
29
30 typedef JDAQHit::JPMT_t JPMT_t; //!< PMT channel in FPGA
31
32
33 /**
34 * Default constructor.
35 */
37 JHit(),
38 pmt (0)
39 {}
40
41
42 /**
43 * Constructor.
44 *
45 * \param id PMT identifier
46 * \param hit hit
47 */
48 JHitR0(const JPMT_t& id,
49 const JHit& hit) :
50 JHit(hit),
51 pmt (id)
52 {}
53
54
55 /**
56 * Get PMT.
57 *
58 * \return PMT
59 */
60 inline JPMT_t getPMT() const
61 {
62 return pmt;
63 }
64
65
66 /**
67 * Get count.
68 *
69 * \return count
70 */
71 inline int getN() const
72 {
73 return 1;
74 }
75
76
77 /**
78 * Get weight.\n
79 * The returned weight is set to one.
80 *
81 * \return 1
82 */
83 inline double getW() const
84 {
85 return 1.0;
86 }
87
88
89 /**
90 * Auxiliary data structure for sorting of hits.
91 */
92 static const struct compare {
93 /**
94 * Compare hits by PMT and time.
95 *
96 * \param first first hit
97 * \param second second hit
98 * \return true if first before second; else false
99 */
100 bool operator()(const JHitR0& first, const JHitR0& second) const
101 {
102 if (first.getPMT() == second.getPMT())
103 return first.getT() < second.getT();
104 else
105 return first.getPMT() < second.getPMT();
106 }
108
109
110 protected:
111 JPMT_t pmt; //!< PMT readout channel in FPGA
112 };
113}
114
115#endif
Basic data structure for time and time over threshold information of hit.
Reduced data structure for L0 hit.
Definition JHitR0.hh:27
JPMT_t pmt
PMT readout channel in FPGA.
Definition JHitR0.hh:111
double getW() const
Get weight.
Definition JHitR0.hh:83
JDAQHit::JPMT_t JPMT_t
PMT channel in FPGA.
Definition JHitR0.hh:30
JPMT_t getPMT() const
Get PMT.
Definition JHitR0.hh:60
static const struct JTRIGGER::JHitR0::compare compare
JHitR0(const JPMT_t &id, const JHit &hit)
Constructor.
Definition JHitR0.hh:48
JHitR0()
Default constructor.
Definition JHitR0.hh:36
int getN() const
Get count.
Definition JHitR0.hh:71
Hit data structure.
double getT() const
Get calibrated time of hit.
Hit data structure.
Definition JDAQHit.hh:35
unsigned char JPMT_t
PMT channel in FPGA.
Definition JDAQHit.hh:38
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary classes and methods for triggering.
Auxiliary data structure for sorting of hits.
Definition JHitR0.hh:92
bool operator()(const JHitR0 &first, const JHitR0 &second) const
Compare hits by PMT and time.
Definition JHitR0.hh:100