Jpp  15.0.0-rc.2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 80 of file JSupernova.hh.

Constructor & Destructor Documentation

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 94 of file JSupernova.hh.

94  {
95 
97 
98  typedef JDAQTriggeredHit hit_type;
99 
100  for (JDAQEvent::const_iterator<hit_type> hit = event.begin<hit_type>();
101  hit != event.end<hit_type>();
102  ++hit) {
103 
104  moduleSet.insert(hit->getModuleID());
105 
106  timeRange.include(getTime(*hit, hitRouter.getPMT(*hit)));
107 
108  }
109  }
static const JRange< double, std::less< double > > DEFAULT_RANGE
Default range.
Definition: JRange.hh:568
range_type include(argument_type x)
Include given value to range.
Definition: JRange.hh:398
Template const_iterator.
Definition: JDAQEvent.hh:68
double getTime(const Hit &hit)
Get true time of hit.
const_iterator< T > end() const
Get end of data.
JTimeRange timeRange
Definition: JSupernova.hh:83
const_iterator< T > begin() const
Get begin of data.
const JPMT & getPMT(const JDAQKeyHit &hit) const
Get PMT parameters.
JModuleSet moduleSet
Definition: JSupernova.hh:84

Member Function Documentation

double JSUPERNOVA::JVeto::getLength ( )
inline

Get length of veto time range.

Definition at line 115 of file JSupernova.hh.

115  {
116  return timeRange.getLength();
117  }
T getLength() const
Get length (difference between upper and lower limit).
Definition: JRange.hh:289
JTimeRange timeRange
Definition: JSupernova.hh:83
bool JSUPERNOVA::JVeto::operator() ( const JCoincidenceSN in) const
inline

Determines if a coincidence is vetoed.

Parameters
incoincidence under test

Definition at line 123 of file JSupernova.hh.

123  {
124  return timeRange(in.getTime()) &&
125  (moduleSet.find(in.getModule()) != moduleSet.end());
126  }
JTimeRange timeRange
Definition: JSupernova.hh:83
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:41
JModuleSet moduleSet
Definition: JSupernova.hh:84

Member Data Documentation

JTimeRange JSUPERNOVA::JVeto::timeRange
private

Definition at line 83 of file JSupernova.hh.

JModuleSet JSUPERNOVA::JVeto::moduleSet
private

Definition at line 84 of file JSupernova.hh.


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