Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JTRIGGER::JHitR0 Class Reference

Reduced data structure for L0 hit. More...

#include <JHitR0.hh>

Inheritance diagram for JTRIGGER::JHitR0:
JTRIGGER::JHit

Classes

struct  compare
 Auxiliary data structure for sorting of hits. More...
 

Public Types

typedef JDAQHit::JPMT_t JPMT_t
 PMT channel in FPGA.
 

Public Member Functions

 JHitR0 ()
 Default constructor.
 
 JHitR0 (const JPMT_t &id, const JHit &hit)
 Constructor.
 
JPMT_t getPMT () const
 Get PMT.
 
int getN () const
 Get count.
 
double getW () const
 Get weight.
 
const JHitgetHit () const
 Get hit.
 
 operator double () const
 Type conversion.
 
double getT () const
 Get calibrated time of hit.
 
double getToT () const
 Get calibrated time over threshold of hit.
 
double getT1 () const
 Get leading edge of hit.
 
double getT2 () const
 Get trailing edge of hit.
 
void join (const JHit &hit)
 Join hit.
 

Static Public Member Functions

static bool getSlewing ()
 Get slewing option.
 
static void setSlewing (const bool slewing)
 Set slewing option.
 

Static Public Attributes

static const struct JTRIGGER::JHitR0::compare compare
 

Static Protected Member Functions

static bool & get_slewing ()
 Get reference to slewing parameter.
 

Protected Attributes

JPMT_t pmt
 PMT readout channel in FPGA.
 
double t
 time of leading edge [ns]
 
double tot
 time-over-threshold [ns]
 

Detailed Description

Reduced data structure for L0 hit.

Definition at line 25 of file JHitR0.hh.

Member Typedef Documentation

◆ JPMT_t

PMT channel in FPGA.

Definition at line 30 of file JHitR0.hh.

Constructor & Destructor Documentation

◆ JHitR0() [1/2]

JTRIGGER::JHitR0::JHitR0 ( )
inline

Default constructor.

Definition at line 36 of file JHitR0.hh.

36 :
37 JHit(),
38 pmt (0)
39 {}
JPMT_t pmt
PMT readout channel in FPGA.
Definition JHitR0.hh:111
JHit()
Default constructor.

◆ JHitR0() [2/2]

JTRIGGER::JHitR0::JHitR0 ( const JPMT_t & id,
const JHit & hit )
inline

Constructor.

Parameters
idPMT identifier
hithit

Definition at line 48 of file JHitR0.hh.

49 :
50 JHit(hit),
51 pmt (id)
52 {}

Member Function Documentation

◆ getPMT()

JPMT_t JTRIGGER::JHitR0::getPMT ( ) const
inline

Get PMT.

Returns
PMT

Definition at line 60 of file JHitR0.hh.

61 {
62 return pmt;
63 }

◆ getN()

int JTRIGGER::JHitR0::getN ( ) const
inline

Get count.

Returns
count

Definition at line 71 of file JHitR0.hh.

72 {
73 return 1;
74 }

◆ getW()

double JTRIGGER::JHitR0::getW ( ) const
inline

Get weight.


The returned weight is set to one.

Returns
1

Definition at line 83 of file JHitR0.hh.

84 {
85 return 1.0;
86 }

◆ getHit()

const JHit & JTRIGGER::JHit::getHit ( ) const
inlineinherited

Get hit.

Returns
hit

Definition at line 99 of file JTrigger/JHit.hh.

100 {
101 return static_cast<const JHit&>(*this);
102 }

◆ getSlewing()

static bool JTRIGGER::JHit::getSlewing ( )
inlinestaticinherited

Get slewing option.

Returns
slewing option

Definition at line 110 of file JTrigger/JHit.hh.

111 {
112 return get_slewing();
113 }
static bool & get_slewing()
Get reference to slewing parameter.

◆ setSlewing()

static void JTRIGGER::JHit::setSlewing ( const bool slewing)
inlinestaticinherited

Set slewing option.

Parameters
slewingslewing option

Definition at line 121 of file JTrigger/JHit.hh.

122 {
123 get_slewing() = slewing;
124 }

◆ operator double()

JTRIGGER::JHit::operator double ( ) const
inlineinherited

Type conversion.

Returns
time [ns]

Definition at line 132 of file JTrigger/JHit.hh.

133 {
134 return t;
135 }
double t
time of leading edge [ns]

◆ getT()

double JTRIGGER::JHit::getT ( ) const
inlineinherited

Get calibrated time of hit.

Returns
time [ns]

Definition at line 143 of file JTrigger/JHit.hh.

144 {
145 if (!getSlewing())
146 return t;
147 else
148 return t - getRiseTime(tot);
149 }
static bool getSlewing()
Get slewing option.
double tot
time-over-threshold [ns]
static const JGetRiseTime getRiseTime
Function object for rise time evaluation.

◆ getToT()

double JTRIGGER::JHit::getToT ( ) const
inlineinherited

Get calibrated time over threshold of hit.

Returns
time over threshold [ns]

Definition at line 157 of file JTrigger/JHit.hh.

158 {
159 return tot;
160 }

◆ getT1()

double JTRIGGER::JHit::getT1 ( ) const
inlineinherited

Get leading edge of hit.

Note that no slewing correction is applied.

Returns
time [ns]

Definition at line 170 of file JTrigger/JHit.hh.

171 {
172 return t;
173 }

◆ getT2()

double JTRIGGER::JHit::getT2 ( ) const
inlineinherited

Get trailing edge of hit.

Note that no slewing correction is applied.

Returns
time [ns]

Definition at line 183 of file JTrigger/JHit.hh.

184 {
185 return t + tot;
186 }

◆ join()

void JTRIGGER::JHit::join ( const JHit & hit)
inlineinherited

Join hit.

Note that:

  • leading edge of this hit is maintained;
  • time over threshold of this hit is set to the difference between the trailing edge of given hit and leading edge of this hit;
Parameters
hithit

Definition at line 198 of file JTrigger/JHit.hh.

199 {
200 this->tot = hit.getT2() - this->getT1();
201 }
double getT1() const
Get leading edge of hit.

◆ get_slewing()

static bool & JTRIGGER::JHit::get_slewing ( )
inlinestaticprotectedinherited

Get reference to slewing parameter.

Returns
reference to slewing parameter

Definition at line 213 of file JTrigger/JHit.hh.

214 {
215 static bool slewing = true;
216
217 return slewing;
218 }

Member Data Documentation

◆ compare

const struct JTRIGGER::JHitR0::compare JTRIGGER::JHitR0::compare
static

◆ pmt

JPMT_t JTRIGGER::JHitR0::pmt
protected

PMT readout channel in FPGA.

Definition at line 111 of file JHitR0.hh.

◆ t

double JTRIGGER::JHit::t
protectedinherited

time of leading edge [ns]

Definition at line 204 of file JTrigger/JHit.hh.

◆ tot

double JTRIGGER::JHit::tot
protectedinherited

time-over-threshold [ns]

Definition at line 205 of file JTrigger/JHit.hh.


The documentation for this class was generated from the following file: