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

Auxiliary class to build the supernova trigger dataset. More...

#include <JSupernova.hh>

Inheritance diagram for JSUPERNOVA::JDataSN:
std::vector< JCoincidenceSN >

Public Member Functions

 JDataSN (double window, int threshold=4)
 Default constructor Configures the trigger with a time window and the pretrigger threshold. More...
 
void operator() (vector< JHitR0 > in, int moduleID)
 Builds coincidences from calibrated hit data and loads them in the internal vector. More...
 
void operator() (const JDAQTimeslice *timeslice, const JModuleRouter &moduleRouter)
 Builds coincidences from a timeslice and loads them into the internal vector. More...
 

Public Attributes

int frameIndex
 
JDAQUTCExtended timeUTC
 

Private Attributes

int TMax_ns
 
int multiplicityThreshold
 

Detailed Description

Auxiliary class to build the supernova trigger dataset.

Definition at line 122 of file JSupernova.hh.

Constructor & Destructor Documentation

◆ JDataSN()

JSUPERNOVA::JDataSN::JDataSN ( double  window,
int  threshold = 4 
)
inline

Default constructor Configures the trigger with a time window and the pretrigger threshold.

Definition at line 137 of file JSupernova.hh.

138  : TMax_ns(window), multiplicityThreshold(threshold)
139  { };

Member Function Documentation

◆ operator()() [1/2]

void JSUPERNOVA::JDataSN::operator() ( vector< JHitR0 in,
int  moduleID 
)
inline

Builds coincidences from calibrated hit data and loads them in the internal vector.

Parameters
inhit data
moduleIDoptical module ID for the hit data

Definition at line 146 of file JSupernova.hh.

146  {
147 
148  if (in.size() > 1) {
149 
150  for (vector<JHitR0>::const_iterator p = in.begin(); p != in.end(); ) {
151 
153 
154  while (++q != in.end() && q->getT() - p->getT() <= TMax_ns ) {}
155 
156  int M = distance(p, q);
157 
158  if (M >= multiplicityThreshold)
159  { this->push_back(JCoincidenceSN(p->getT(), M, moduleID)); }
160 
161  p = q;
162 
163  }
164  }
165  }

◆ operator()() [2/2]

void JSUPERNOVA::JDataSN::operator() ( const JDAQTimeslice timeslice,
const JModuleRouter moduleRouter 
)
inline

Builds coincidences from a timeslice and loads them into the internal vector.

Double pulses are merged according to the coincidence time window.

Parameters
timesliceinput timeslice
moduleRouterdetector module router

Definition at line 175 of file JSupernova.hh.

175  {
176 
177  frameIndex = timeslice->getFrameIndex();
178  timeUTC = timeslice->getTimesliceStart();
179 
180  typedef JSuperFrame2D<JHitR0> JSuperFrame2D_t;
181 
182  typedef JSuperFrame1D<JHitR0> JSuperFrame1D_t;
183 
184  const JMatchL0<JHitR0> match(TMax_ns);
185 
186  for (JDAQTimeslice::const_iterator frame = timeslice->begin(); frame != timeslice->end(); ++frame) {
187 
188  int moduleID = frame->getModuleID();
189 
190  JSuperFrame2D_t& buffer = JSuperFrame2D_t::demultiplex(*frame, moduleRouter.getModule(moduleID));
191 
192  for (JSuperFrame2D_t::iterator i = buffer.begin(); i != buffer.end(); ++i) { i->join(match); }
193 
194  JSuperFrame1D_t& data = JSuperFrame1D_t::multiplex(buffer); data.pop_back();
195 
196  (*this)(data, moduleID);
197 
198  }
199 
200  sort(this->begin(), this->end());
201 
202  }

Member Data Documentation

◆ TMax_ns

int JSUPERNOVA::JDataSN::TMax_ns
private

Definition at line 126 of file JSupernova.hh.

◆ multiplicityThreshold

int JSUPERNOVA::JDataSN::multiplicityThreshold
private

Definition at line 127 of file JSupernova.hh.

◆ frameIndex

int JSUPERNOVA::JDataSN::frameIndex

Definition at line 130 of file JSupernova.hh.

◆ timeUTC

JDAQUTCExtended JSUPERNOVA::JDataSN::timeUTC

Definition at line 131 of file JSupernova.hh.


The documentation for this class was generated from the following file:
JSUPERNOVA::JDataSN::frameIndex
int frameIndex
Definition: JSupernova.hh:130
JDETECTOR::JModuleRouter::getModule
const JModule & getModule(const JObjectID &id) const
Get module parameters.
Definition: JModuleRouter.hh:89
KM3NETDAQ::JDAQChronometer::getTimesliceStart
JDAQUTCExtended getTimesliceStart() const
Get start of timeslice.
Definition: JDAQChronometer.hh:144
JTRIGGER::JSuperFrame1D
1-dimensional frame with time calibrated data from one optical module.
Definition: JSuperFrame1D.hh:35
std::vector
Definition: JSTDTypes.hh:12
KM3NETDAQ::JDAQChronometer::getFrameIndex
int getFrameIndex() const
Get frame index.
Definition: JDAQChronometer.hh:132
distance
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
Definition: PhysicsEvent.hh:434
JSUPERNOVA::JDataSN::TMax_ns
int TMax_ns
Definition: JSupernova.hh:126
JSUPERNOVA::JDataSN::timeUTC
JDAQUTCExtended timeUTC
Definition: JSupernova.hh:131
JTRIGGER::JMatchL0
L0 match criterion.
Definition: JMatchL0.hh:27
JTRIGGER::JSuperFrame2D
2-dimensional frame with time calibrated data from one optical module.
Definition: JSuperFrame2D.hh:41
JSUPERNOVA::JDataSN::multiplicityThreshold
int multiplicityThreshold
Definition: JSupernova.hh:127