Jpp
Public Member Functions | Private Attributes | List of all members
JSUPERNOVA::JVeto Class Reference

Auxiliary class to define a veto time window on a set of optical modules. More...

#include <JSupernova.hh>

Public Member Functions

 JVeto (const JDAQEvent &event, const JDAQHitRouter &hitRouter)
 Default constructor. More...
 
double getLength ()
 Get length of veto time range. More...
 
bool operator() (const JCoincidenceSN &in) const
 Determines if a coincidence is vetoed. More...
 

Private Attributes

JTimeRange timeRange
 
JModuleSet moduleSet
 

Detailed Description

Auxiliary class to define a veto time window on a set of optical modules.

Definition at line 68 of file JSupernova.hh.

Constructor & Destructor Documentation

◆ JVeto()

JSUPERNOVA::JVeto::JVeto ( const JDAQEvent event,
const JDAQHitRouter hitRouter 
)
inline

Default constructor.

Parameters
eventDAQ event
hitRouterhit router as source of hit time calibration

Definition at line 82 of file JSupernova.hh.

82  {
83 
85 
86  typedef JDAQTriggeredHit JHit_t;
87 
88  for (JDAQEvent::const_iterator<JHit_t> hit = event.begin<JHit_t>();
89  hit != event.end<JHit_t>();
90  ++hit) {
91 
92  moduleSet.insert(hit->getModuleID());
93 
94  timeRange.include(getTime(*hit, hitRouter.getPMT(*hit)));
95 
96  }
97  }

Member Function Documentation

◆ getLength()

double JSUPERNOVA::JVeto::getLength ( )
inline

Get length of veto time range.

Definition at line 103 of file JSupernova.hh.

103  {
104  return timeRange.getLength();
105  }

◆ operator()()

bool JSUPERNOVA::JVeto::operator() ( const JCoincidenceSN in) const
inline

Determines if a coincidence is vetoed.

Parameters
incoincidence under test

Definition at line 111 of file JSupernova.hh.

111  {
112  return timeRange(in.getTime()) &&
113  (moduleSet.find(in.getModule()) != moduleSet.end());
114  }

Member Data Documentation

◆ timeRange

JTimeRange JSUPERNOVA::JVeto::timeRange
private

Definition at line 71 of file JSupernova.hh.

◆ moduleSet

JModuleSet JSUPERNOVA::JVeto::moduleSet
private

Definition at line 72 of file JSupernova.hh.


The documentation for this class was generated from the following file:
JTOOLS::JRange::include
range_type include(argument_type x)
Include given value to range.
Definition: JRange.hh:388
KM3NETDAQ::JDAQEvent::begin
const_iterator< T > begin() const
Get begin of data.
JTOOLS::JRange::getLength
T getLength() const
Get length (difference between upper and lower limit).
Definition: JRange.hh:302
JTOOLS::JRange< double >::DEFAULT_RANGE
static const JRange< double, std::less< double > > DEFAULT_RANGE
Default range.
Definition: JRange.hh:558
KM3NETDAQ::JDAQEvent::end
const_iterator< T > end() const
Get end of data.
KM3NETDAQ::JDAQTriggeredHit
DAQ triggered hit.
Definition: JDAQTriggeredHit.hh:25
KM3NETDAQ::JDAQEvent::const_iterator
Template const_iterator.
Definition: JDAQEvent.hh:69
JAANET::getTime
double getTime(const Hit &hit)
Get true time of hit.
Definition: JAAnetToolkit.hh:87
JSUPERNOVA::JVeto::timeRange
JTimeRange timeRange
Definition: JSupernova.hh:71
JSUPERNOVA::JVeto::moduleSet
JModuleSet moduleSet
Definition: JSupernova.hh:72