Jpp 20.0.0-195-g190c9e876
the software that should make you happy
Loading...
Searching...
No Matches
JTRIGGER::JTimeSlewing_t Struct Reference

Auxiliary function object for time-slewing correction. More...

#include <JTimeSlewing.hh>

Inheritance diagram for JTRIGGER::JTimeSlewing_t:
JTRIGGER::JTimeSlewing<-1 > JTRIGGER::JTimeSlewing< type > std::vector< double >

Public Member Functions

double operator() (const double tot_ns, const int type) const
 Get time-slewing correction for a given time-over-threshold according given type.
 
double operator() (const double tot_ns) const
 Get time offset for a given time-over-threshold.
 

Private Attributes

const JTimeSlewing< 1 > p01
 
const JTimeSlewing< 38 > p38
 
const JTimeSlewing< 41 > p41
 
const JTimeSlewing< 67 > p67
 

Detailed Description

Auxiliary function object for time-slewing correction.

Definition at line 1419 of file JTimeSlewing.hh.

Member Function Documentation

◆ operator()() [1/2]

double JTRIGGER::JTimeSlewing_t::operator() ( const double tot_ns,
const int type ) const
inline

Get time-slewing correction for a given time-over-threshold according given type.

Parameters
tot_nstime-over-threshold [ns]
typetype
Returns
transit time [ns]

Definition at line 1431 of file JTimeSlewing.hh.

1432 {
1433 switch (type) {
1434 case 1:
1435 return p01(tot_ns);
1436
1437 case 38:
1438 return p38(tot_ns);
1439
1440 case 41:
1441 return p41(tot_ns);
1442
1443 case 67:
1444 return p67(tot_ns);
1445
1446 default:
1447 return (*this)(tot_ns);
1448 };
1449 }
const JTimeSlewing< 1 > p01
const JTimeSlewing< 41 > p41
const JTimeSlewing< 67 > p67
const JTimeSlewing< 38 > p38

◆ operator()() [2/2]

template<int type = 0>
double JTRIGGER::JTimeSlewing< type >::operator() ( const double tot_ns) const
inlineinherited

Get time offset for a given time-over-threshold.

Parameters
tot_nstime-over-threshold [ns]
Returns
rise time [ns]

Definition at line 32 of file JTimeSlewing.hh.

33 {
34 const int i = (int) tot_ns;
35
36 if (i < 0)
37 return *(this->begin());
38 else if (i >= (int) this->size())
39 return *(this->rbegin());
40 else
41 return (*this)[i];
42 }

Member Data Documentation

◆ p01

const JTimeSlewing< 1> JTRIGGER::JTimeSlewing_t::p01
private

Definition at line 1452 of file JTimeSlewing.hh.

◆ p38

const JTimeSlewing<38> JTRIGGER::JTimeSlewing_t::p38
private

Definition at line 1453 of file JTimeSlewing.hh.

◆ p41

const JTimeSlewing<41> JTRIGGER::JTimeSlewing_t::p41
private

Definition at line 1454 of file JTimeSlewing.hh.

◆ p67

const JTimeSlewing<67> JTRIGGER::JTimeSlewing_t::p67
private

Definition at line 1455 of file JTimeSlewing.hh.


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