Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
JTRIGGER::JTimeConverter Class Reference

Auxiliary class to convert DAQ/trigger hit time to/from Monte Carlo hit time. More...

#include <JTimeConverter.hh>

Public Member Functions

 JTimeConverter ()
 Default constructor. More...
 
 JTimeConverter (const Evt &event, const JDAQChronometer &chronometer)
 Constructor. More...
 
double getTime () const
 Get DAQ/trigger minus Monte Carlo hit time. More...
 
double putTime () const
 Get Monte Carlo minus DAQ/trigger hit time. More...
 
double getTime (const double t0) const
 Get Monte Carlo hit time. More...
 
double putTime (const double t0) const
 Get DAQ hit time. More...
 
double getTime (const JHit &hit) const
 Get Monte Carlo hit time. More...
 
double getTime (const JHitL1 &hit) const
 Get Monte Carlo hit time. More...
 
double getTime (const JDAQHit &hit, const JCalibration &calibration) const
 Get Monte Carlo hit time. More...
 
double putTime (const Hit &hit) const
 Get DAQ hit time. More...
 

Protected Attributes

double __t0
 
double __t1
 

Detailed Description

Auxiliary class to convert DAQ/trigger hit time to/from Monte Carlo hit time.

Definition at line 36 of file JTimeConverter.hh.

Constructor & Destructor Documentation

JTRIGGER::JTimeConverter::JTimeConverter ( )
inline

Default constructor.

Definition at line 42 of file JTimeConverter.hh.

42  :
43  __t0(0.0),
44  __t1(0.0)
45  {}
JTRIGGER::JTimeConverter::JTimeConverter ( const Evt &  event,
const JDAQChronometer chronometer 
)
inline

Constructor.

Parameters
eventMonte Carlo event
chronometerDAQ chronometer

Definition at line 54 of file JTimeConverter.hh.

55  :
56  __t0(event.mc_t),
57  __t1(getTimeOfRTS(chronometer))
58  {}
Structure to store the ToT mean and standard deviation of the hits produced by a nanobeacon in a sour...
double getTimeOfRTS(const JDAQChronometer &chronometer)
Get time of last RTS in ns since start of run for a given chronometer.

Member Function Documentation

double JTRIGGER::JTimeConverter::getTime ( ) const
inline

Get DAQ/trigger minus Monte Carlo hit time.

Returns
time difference [ns]

Definition at line 66 of file JTimeConverter.hh.

67  {
68  return __t1 - __t0;
69  }
double JTRIGGER::JTimeConverter::putTime ( ) const
inline

Get Monte Carlo minus DAQ/trigger hit time.

Returns
time difference [ns]

Definition at line 77 of file JTimeConverter.hh.

78  {
79  return __t0 - __t1;
80  }
double JTRIGGER::JTimeConverter::getTime ( const double  t0) const
inline

Get Monte Carlo hit time.

Parameters
t0DAQ/trigger hit time [ns]
Returns
Monte Carlo hit time [ns]

Definition at line 89 of file JTimeConverter.hh.

90  {
91  return t0 + __t1 - __t0;
92  }
double JTRIGGER::JTimeConverter::putTime ( const double  t0) const
inline

Get DAQ hit time.

Parameters
t0Monte Carlo hit time [ns]
Returns
DAQ/trigger hit time [ns]

Definition at line 101 of file JTimeConverter.hh.

102  {
103  return t0 - __t1 + __t0;
104  }
double JTRIGGER::JTimeConverter::getTime ( const JHit hit) const
inline

Get Monte Carlo hit time.

Parameters
hittrigger hit
Returns
Monte Carlo hit time [ns]

Definition at line 113 of file JTimeConverter.hh.

114  {
115  return this->getTime(hit.getT());
116  }
double getT() const
Get calibrated time of hit.
Definition: JHit.hh:143
double getTime() const
Get DAQ/trigger minus Monte Carlo hit time.
double JTRIGGER::JTimeConverter::getTime ( const JHitL1 hit) const
inline

Get Monte Carlo hit time.

Parameters
hittrigger hit
Returns
Monte Carlo hit time [ns]

Definition at line 125 of file JTimeConverter.hh.

126  {
127  return this->getTime(hit.getT());
128  }
double getT(const unsigned int i) const
Get time of hit i.
Definition: JHitL1.hh:181
double getTime() const
Get DAQ/trigger minus Monte Carlo hit time.
double JTRIGGER::JTimeConverter::getTime ( const JDAQHit hit,
const JCalibration calibration 
) const
inline

Get Monte Carlo hit time.

Parameters
hitDAQ hit
calibrationPMT calibration
Returns
Monte Carlo hit time [ns]

Definition at line 138 of file JTimeConverter.hh.

139  {
140  return this->getTime(JDETECTOR::getTime(hit.getT(), calibration));
141  }
double getTime(const T &t1, const JCalibration &cal)
Get calibrated time.
double getTime() const
Get DAQ/trigger minus Monte Carlo hit time.
double JTRIGGER::JTimeConverter::putTime ( const Hit &  hit) const
inline

Get DAQ hit time.

Parameters
hitMonte Carlo hit time [ns]
Returns
DAQ hit time [ns]

Definition at line 150 of file JTimeConverter.hh.

151  {
152  return this->putTime(JAANET::getTime(hit));
153  }
double putTime() const
Get Monte Carlo minus DAQ/trigger hit time.
double getTime(const Hit &hit)
Get true time of hit.

Member Data Documentation

double JTRIGGER::JTimeConverter::__t0
protected

Definition at line 157 of file JTimeConverter.hh.

double JTRIGGER::JTimeConverter::__t1
protected

Definition at line 158 of file JTimeConverter.hh.


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