Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Public Attributes | List of all members
JTRIGGER::JBuildL1< JElement_t > Class Template Reference

Template L1 hit builder. More...

#include <JBuildL1.hh>

Inheritance diagram for JTRIGGER::JBuildL1< JElement_t >:
JTRIGGER::JBuildL1Parameters JTRIGGER::JHitToolkit< JElement_t > JTRIGGER::JBuildHelper< JBuildL1< JElement_t > >

Public Types

typedef JElement_t value_type
 

Public Member Functions

 JBuildL1 (const double Tmax_ns, const bool combine)
 Constructor. More...
 
 JBuildL1 (const JTriggerParameters &parameters)
 Constructor. More...
 
 JBuildL1 (const JBuildL1Parameters &parameters)
 Constructor. More...
 
template<class JOutput_t >
void operator() (const JSuperFrame2D< JElement_t > &input, JOutput_t out) const
 Build hits from calibrated data. More...
 
template<class JOutput_t >
void operator() (typename JSuperFrame2D< JElement_t >::const_iterator __begin, typename JSuperFrame2D< JElement_t >::const_iterator __end, JOutput_t out) const
 Build hits from set of frames with calibrated data. More...
 
template<class JOutput_t >
void operator() (const JSuperFrame1D< JElement_t > &input, JOutput_t out) const
 Build hits from calibrated data. More...
 
template<class JOutput_t >
void operator() (const JDAQSuperFrame &input, const JModule &module, JOutput_t out) const
 Build hits from DAQ data. More...
 
void operator() (const JDAQTimeslice &timeslice, const JModuleRouter &router, JOutput_t out) const
 Build hits from uncalibrated DAQ data. More...
 
void operator() (const JDAQEvent &event, const JModuleRouter &router, bool snapshot, JOutput_t out) const
 Build hits from uncalibrated DAQ data. More...
 
void operator() (const JDAQEvent &event, const JModuleRouter &router, JOutput_t out) const
 Build hits from uncalibrated DAQ data. More...
 

Public Attributes

double TMaxLocal_ns
 
bool combineL1
 

Detailed Description

template<class JElement_t>
class JTRIGGER::JBuildL1< JElement_t >

Template L1 hit builder.

An L1 hit is a local coincidence between two different PMTs within the same optical module.

Definition at line 76 of file JBuildL1.hh.

Member Typedef Documentation

template<class JElement_t>
typedef JElement_t JTRIGGER::JBuildL1< JElement_t >::value_type

Definition at line 85 of file JBuildL1.hh.

Constructor & Destructor Documentation

template<class JElement_t>
JTRIGGER::JBuildL1< JElement_t >::JBuildL1 ( const double  Tmax_ns,
const bool  combine 
)
inline

Constructor.

Parameters
Tmax_nsmaximal time difference of L1 [ns]
combinecombine multiple L1 within given time window

Definition at line 94 of file JBuildL1.hh.

95  :
96  JBuildL1Parameters(Tmax_ns, combine)
97  {}
JBuildL1Parameters(const double Tmax_ns, const bool combine)
Constructor.
Definition: JBuildL1.hh:47
JRange< T, JComparator_t > combine(const JRange< T, JComparator_t > &first, const JRange< T, JComparator_t > &second)
Combine ranges.
Definition: JRange.hh:590
template<class JElement_t>
JTRIGGER::JBuildL1< JElement_t >::JBuildL1 ( const JTriggerParameters parameters)
inline

Constructor.

Parameters
parameterstrigger parameters

Definition at line 105 of file JBuildL1.hh.

105  :
106  JBuildL1Parameters(parameters)
107  {}
JBuildL1Parameters(const double Tmax_ns, const bool combine)
Constructor.
Definition: JBuildL1.hh:47
template<class JElement_t>
JTRIGGER::JBuildL1< JElement_t >::JBuildL1 ( const JBuildL1Parameters parameters)
inline

Constructor.

Parameters
parametersbuild L1 parameters

Definition at line 115 of file JBuildL1.hh.

115  :
116  JBuildL1Parameters(parameters)
117  {}
JBuildL1Parameters(const double Tmax_ns, const bool combine)
Constructor.
Definition: JBuildL1.hh:47

Member Function Documentation

template<class JElement_t>
template<class JOutput_t >
void JTRIGGER::JBuildL1< JElement_t >::operator() ( const JSuperFrame2D< JElement_t > &  input,
JOutput_t  out 
) const
inline

Build hits from calibrated data.

The output data are time sorted.

Parameters
inputinput L0 data
outoutput L1 data

Definition at line 129 of file JBuildL1.hh.

130  {
131  (*this)(input.begin(), input.end(), out);
132  }
template<class JElement_t>
template<class JOutput_t >
void JTRIGGER::JBuildL1< JElement_t >::operator() ( typename JSuperFrame2D< JElement_t >::const_iterator  __begin,
typename JSuperFrame2D< JElement_t >::const_iterator  __end,
JOutput_t  out 
) const
inline

Build hits from set of frames with calibrated data.

The output data are time sorted.

Parameters
__beginbegin of input L0 data
__endend of input L0 data
outoutput L1 data

Definition at line 145 of file JBuildL1.hh.

148  {
149  (*this)(JSuperFrame1D<JElement_t>::multiplex(__begin, __end), out);
150  }
static JSuperFrame1D< JElement_t, JAllocator_t > multiplex
Multiplexer.
template<class JElement_t>
template<class JOutput_t >
void JTRIGGER::JBuildL1< JElement_t >::operator() ( const JSuperFrame1D< JElement_t > &  input,
JOutput_t  out 
) const
inline

Build hits from calibrated data.

The output data are time sorted.

Parameters
inputinput L0 data
outoutput L1 data

Definition at line 162 of file JBuildL1.hh.

163  {
164  int n = (int) input.size() - 1; // remove end marker
165 
166  for (typename JSuperFrame1D<JElement_t>::const_iterator q = input.begin(), p = q++; n != 0; ++q, --n) {
167 
168  if (this->getTimeDifference(*p,*q) <= TMaxLocal_ns) {
169 
170  *out = *p;
171  ++out;
172 
173  if (combineL1) {
174  for (++q, --n; this->getTimeDifference(*p,*q) <= TMaxLocal_ns; ++q, --n) {}
175  }
176  }
177 
178  p = q;
179  }
180  }
1-dimensional frame with time calibrated data from one optical module.
template<class JElement_t>
template<class JOutput_t >
void JTRIGGER::JBuildL1< JElement_t >::operator() ( const JDAQSuperFrame input,
const JModule module,
JOutput_t  out 
) const
inline

Build hits from DAQ data.

The time calibration is applied. The output data are time sorted.

Parameters
inputDAQ super frame
modulemodule
outoutput L1 data

Definition at line 194 of file JBuildL1.hh.

197  {
198  if (!input.empty()) {
199  (*this)(JSuperFrame2D<JElement_t>::demultiplex(input, module), out);
200  }
201  }
static JSuperFrame2D< JElement_t > demultiplex
Demultiplexer.
void JTRIGGER::JBuildHelper< JBuildL1< JElement_t > >::operator() ( const JDAQTimeslice timeslice,
const JModuleRouter router,
JOutput_t  out 
) const
inlineinherited

Build hits from uncalibrated DAQ data.

The time calibration is applied. Note that the output data are not time sorted.

Parameters
timesliceDAQ time slice
routermodule router
outoutput data

Definition at line 57 of file JBuildHelper.hh.

60  {
61  for (JDAQTimeslice::const_iterator i = timeslice.begin(); i != timeslice.end(); ++i) {
62  if (router.hasModule(i->getModuleID())) {
63  static_cast<const JBuild_t&>(*this)(*i, router.getModule(i->getModuleID()), out);
64  }
65  }
66  }
void JTRIGGER::JBuildHelper< JBuildL1< JElement_t > >::operator() ( const JDAQEvent event,
const JModuleRouter router,
bool  snapshot,
JOutput_t  out 
) const
inlineinherited

Build hits from uncalibrated DAQ data.

The time calibration is applied. Note that the output data are not time sorted.

Parameters
eventDAQ event
routermodule router
snapshotuse shapshot hits (else use triggered hits)
outoutput data

Definition at line 81 of file JBuildHelper.hh.

85  {
86  static_cast<const JBuild_t&>(*this)(JDAQTimeslice(event, snapshot), router, out);
87  }
Structure to store the ToT mean and standard deviation of the hits produced by a nanobeacon in a sour...
void JTRIGGER::JBuildHelper< JBuildL1< JElement_t > >::operator() ( const JDAQEvent event,
const JModuleRouter router,
JOutput_t  out 
) const
inlineinherited

Build hits from uncalibrated DAQ data.

The snapshot data of the DAQ event are used. The time calibration is applied. Note that the output data are not time sorted.

Parameters
eventDAQ event
routermodule router
outoutput data

Definition at line 102 of file JBuildHelper.hh.

105  {
106  static_cast<const JBuild_t&>(*this)(JDAQTimeslice(event, true), router, out);
107  }
Structure to store the ToT mean and standard deviation of the hits produced by a nanobeacon in a sour...

Member Data Documentation

double JTRIGGER::JBuildL1Parameters::TMaxLocal_ns
inherited

Definition at line 65 of file JBuildL1.hh.

bool JTRIGGER::JBuildL1Parameters::combineL1
inherited

Definition at line 66 of file JBuildL1.hh.


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