Jpp
Public Types | Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
JTRIGGER::JHitR0 Class Reference

Reduced data structure for L0 hit. More...

#include <JHitR0.hh>

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

Public Types

typedef JDAQHit::JPMT_t JPMT_t
 PMT channel in FPGA. More...
 

Public Member Functions

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

Static Public Member Functions

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

Static Protected Member Functions

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

Protected Attributes

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

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  {}

◆ 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  }

◆ getW()

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

Get weight.

The returned weight is set to one.

Returns
1

Definition at line 72 of file JHitR0.hh.

73  {
74  return 1.0;
75  }

◆ getHit()

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

Get hit.

Returns
hit

Definition at line 99 of file 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 JHit.hh.

111  {
112  return get_slewing();
113  }

◆ setSlewing()

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

Set slewing option.

Parameters
slewingslewing option

Definition at line 121 of file 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 JHit.hh.

133  {
134  return t;
135  }

◆ getT()

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

Get calibrated time of hit.

Returns
time [ns]

Definition at line 143 of file JHit.hh.

144  {
145  if (!getSlewing())
146  return t;
147  else
148  return t - getRiseTime(tot);
149  }

◆ 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 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 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 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 JHit.hh.

199  {
200  this->tot = hit.getT2() - this->getT1();
201  }

◆ 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 JHit.hh.

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

Member Data Documentation

◆ pmt

JPMT_t JTRIGGER::JHitR0::pmt
protected

PMT readout channel in FPGA.

Definition at line 78 of file JHitR0.hh.

◆ t

double JTRIGGER::JHit::t
protectedinherited

time of leading edge [ns]

Definition at line 204 of file JHit.hh.

◆ tot

double JTRIGGER::JHit::tot
protectedinherited

time-ver-threshold [ns]

Definition at line 205 of file JHit.hh.


The documentation for this class was generated from the following file:
JTRIGGER::JHit::get_slewing
static bool & get_slewing()
Get reference to slewing parameter.
Definition: JHit.hh:213
JTRIGGER::JHit::tot
double tot
time-ver-threshold [ns]
Definition: JHit.hh:205
JTRIGGER::JHitR0::pmt
JPMT_t pmt
PMT readout channel in FPGA.
Definition: JHitR0.hh:78
JTRIGGER::JHit::getSlewing
static bool getSlewing()
Get slewing option.
Definition: JHit.hh:110
JTRIGGER::JHit::getT2
double getT2() const
Get trailing edge of hit.
Definition: JHit.hh:183
JTRIGGER::getRiseTime
static const JGetRiseTime getRiseTime
Function object for rise time evaluation.
Definition: JGetRiseTime.hh:313
JTRIGGER::JHit::JHit
JHit()
Default constructor.
Definition: JHit.hh:28
JTRIGGER::JHit::t
double t
time of leading edge [ns]
Definition: JHit.hh:204
JTRIGGER::JHit::getT1
double getT1() const
Get leading edge of hit.
Definition: JHit.hh:170