Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JTRIGGER::JHitToolkit< JHit, false > Struct Reference

Template specialisation of hit toolkit for JHit class. More...

#include <JHitToolkit.hh>

Inheritance diagram for JTRIGGER::JHitToolkit< JHit, false >:
JTRIGGER::JHitToolkit< JHitR0, false >

Public Member Functions

const JHitToolkit< JHit, false > & getToolkit () const
 Get toolkit.
 
bool operator() (const JHit &first, const JHit &second) const
 Compare time of two hits.
 

Static Public Member Functions

static double getT (const JHit &hit)
 Get time of hit.
 
static double getToT (const JHit &hit)
 Get time-over-threshold of hit.
 
static JHit getJHit (const JHit &hit)
 Construct JHit.
 
static JHit getHit (const JDAQHit &hit, const JCalibration &cal)
 Construct hit.
 
static JHit getEndMarker ()
 Get end marker.
 
static double getTimeDifference (const JHit &first, const JHit &second)
 Get time difference between two hits.
 
static JHit join (const JHit &first, const JHit &second)
 Join two hits.
 

Detailed Description

Template specialisation of hit toolkit for JHit class.

Definition at line 67 of file JHitToolkit.hh.

Member Function Documentation

◆ getToolkit()

const JHitToolkit< JHit, false > & JTRIGGER::JHitToolkit< JHit, false >::getToolkit ( ) const
inline

Get toolkit.

Returns
this hit toolkit

Definition at line 74 of file JHitToolkit.hh.

75 {
76 return *this;
77 }

◆ getT()

static double JTRIGGER::JHitToolkit< JHit, false >::getT ( const JHit & hit)
inlinestatic

Get time of hit.

Parameters
hithit
Returns
time of hit [ns]

Definition at line 86 of file JHitToolkit.hh.

87 {
88 return hit.getT();
89 }

◆ getToT()

static double JTRIGGER::JHitToolkit< JHit, false >::getToT ( const JHit & hit)
inlinestatic

Get time-over-threshold of hit.

Parameters
hithit
Returns
time-over-threshold of hit [ns]

Definition at line 98 of file JHitToolkit.hh.

99 {
100 return hit.getToT();
101 }

◆ getJHit()

static JHit JTRIGGER::JHitToolkit< JHit, false >::getJHit ( const JHit & hit)
inlinestatic

Construct JHit.

Parameters
hithit
Returns
hit

Definition at line 110 of file JHitToolkit.hh.

111 {
112 return hit;
113 }

◆ getHit()

static JHit JTRIGGER::JHitToolkit< JHit, false >::getHit ( const JDAQHit & hit,
const JCalibration & cal )
inlinestatic

Construct hit.

Parameters
hitDAQ hit
calcalibration
Returns
hit

Definition at line 123 of file JHitToolkit.hh.

124 {
125 return JHit(JTRIGGER::getTime(hit, cal), JTRIGGER::getToT(hit, cal));
126 }
Acoustics hit.

◆ getEndMarker()

static JHit JTRIGGER::JHitToolkit< JHit, false >::getEndMarker ( )
inlinestatic

Get end marker.

Returns
latest possible hit

Definition at line 134 of file JHitToolkit.hh.

135 {
136 return JHit(std::numeric_limits<double>::max());
137 }

◆ getTimeDifference()

static double JTRIGGER::JHitToolkit< JHit, false >::getTimeDifference ( const JHit & first,
const JHit & second )
inlinestatic

Get time difference between two hits.

Parameters
firstfirst hit
secondsecond hit
Returns
time second hit - time first hit [ns]

Definition at line 147 of file JHitToolkit.hh.

148 {
149 return getT(second) - getT(first);
150 }
static double getT(const JHit &hit)
Get time of hit.

◆ operator()()

bool JTRIGGER::JHitToolkit< JHit, false >::operator() ( const JHit & first,
const JHit & second ) const
inline

Compare time of two hits.

Parameters
firstfirst hit
secondsecond hit
Returns
true if second hit later; else false

Definition at line 160 of file JHitToolkit.hh.

161 {
162 return getT(first) < getT(second);
163 }

◆ join()

static JHit JTRIGGER::JHitToolkit< JHit, false >::join ( const JHit & first,
const JHit & second )
inlinestatic

Join two hits.

Parameters
firstfirst hit
secondsecond hit
Returns
joined hit

Definition at line 173 of file JHitToolkit.hh.

174 {
175 JHit hit(first);
176
177 hit.join(second);
178
179 return hit;
180 }

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