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::JBuildL2< JHitR2 > Class Template Reference

Template specialisation of L2 builder for JHitR1 data type. More...

#include <JBuildL2.hh>

Inheritance diagram for JTRIGGER::JBuildL2< JHitR2 >:
JTRIGGER::JL2Parameters JTRIGGER::JBuildHelper< JBuildL2< JHitR2 > > TObject

Public Types

typedef JHitR2 value_type
 

Public Member Functions

 JBuildL2 (const int numberOfHits, const double Tmax_ns, const double ctMin)
 Constructor. More...
 
 JBuildL2 (const JL2Parameters &parameters)
 Constructor. More...
 
template<class JElement_t , template< class, class > class JContainer_t, class JAllocator_t , class JOutput_t >
void operator() (const JSuperFrame2D< JElement_t > &super_frame, const JContainer_t< JElement_t, JAllocator_t > &input, JOutput_t out) const
 Build hits from calibrated data. More...
 
template<class JElement_t , 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() (const JDAQSuperFrame &input, const JModule &module, JOutput_t out) const
 Build hits from DAQ data. More...
 
void reset ()
 Reset L2 parameters. More...
 
bool equals (const JL2Parameters &parameters) const
 Equality. More...
 
bool is_valid () const
 Check validity. More...
 
 ClassDef (JL2Parameters, 1)
 
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

int numberOfHits
 minimal number of hits More...
 
double TMaxLocal_ns
 maximal time difference [ns] More...
 
double ctMin
 minimal cosine space angle between PMT axes More...
 

Detailed Description

template<>
class JTRIGGER::JBuildL2< JHitR2 >

Template specialisation of L2 builder for JHitR1 data type.

An L2 hit is a local coincidence between two or more hits from different PMTs within the same optical module satisfying:

Definition at line 346 of file JBuildL2.hh.

Member Typedef Documentation

Definition at line 354 of file JBuildL2.hh.

Constructor & Destructor Documentation

JTRIGGER::JBuildL2< JHitR2 >::JBuildL2 ( const int  numberOfHits,
const double  Tmax_ns,
const double  ctMin 
)
inline

Constructor.

Parameters
numberOfHitsminimal number of hits
Tmax_nsmaximal time difference [ns]
ctMinminimal cosine space angle between PMT axes

Definition at line 364 of file JBuildL2.hh.

366  :
367  JL2Parameters(numberOfHits, Tmax_ns, ctMin)
368  {}
double ctMin
minimal cosine space angle between PMT axes
JL2Parameters()
Default constructor.
int numberOfHits
minimal number of hits
JTRIGGER::JBuildL2< JHitR2 >::JBuildL2 ( const JL2Parameters parameters)
inline

Constructor.

Parameters
parametersL2 parameters

Definition at line 376 of file JBuildL2.hh.

376  :
377  JL2Parameters(parameters)
378  {}
JL2Parameters()
Default constructor.

Member Function Documentation

template<class JElement_t , template< class, class > class JContainer_t, class JAllocator_t , class JOutput_t >
void JTRIGGER::JBuildL2< JHitR2 >::operator() ( const JSuperFrame2D< JElement_t > &  super_frame,
const JContainer_t< JElement_t, JAllocator_t > &  input,
JOutput_t  out 
) const
inline

Build hits from calibrated data.

Only the input hits that satify the predefined requirements are copied from input to output. The requirements are checked using the calibrated data of each PMT inside the same module. The input data should be time sorted. The output data are time sorted.

Parameters
super_frameinput L0 data
inputinput L1 data
outoutput L2 data

Definition at line 394 of file JBuildL2.hh.

397  {
398  using namespace std;
399 
400  vector <JElement_t> buffer;
401  JBuildL2<JElement_t> build(*this);
402 
403  build(super_frame, input, back_inserter(buffer));
404 
405  JSuperFrameClone2D<JElement_t> clone(super_frame);
406 
407  for (typename vector<JElement_t>::const_iterator __p = buffer.begin(); __p != buffer.end(); ++__p) {
408 
409  JHitR2 hit(super_frame.getModuleID(),
410  super_frame.getPosition());
411 
412  clone.fast_forward(*__p);
413 
414  for (typename JSuperFrameClone2D<JElement_t>::const_iterator i = clone.begin(); i != clone.end(); ++i) {
415 
416  if (i->getTimeDifference(*__p) <= TMaxLocal_ns) {
417 
418  if (hit.getN() == 0)
419  hit.set(i->getJHit());
420  else
421  hit.add(i->getJHit());
422  }
423  }
424 
425  *out = hit;
426  ++out;
427  }
428  }
int getModuleID() const
Get module identifier.
std::vector< value_type >::const_iterator const_iterator
Clone of JSuperFrame2D.
Template L2 builder.
Definition: JBuildL2.hh:47
void set(const JHit &hit, const double weight=1.0)
Set hit.
Definition: JHitR1.hh:125
const JPosition3D & getPosition() const
Get position.
Definition: JPosition3D.hh:129
double TMaxLocal_ns
maximal time difference [ns]
Reduced data structure for L1 hit.
Definition: JHitR1.hh:31
template<class JElement_t , class JOutput_t >
void JTRIGGER::JBuildL2< JHitR2 >::operator() ( const JSuperFrame2D< JElement_t > &  input,
JOutput_t  out 
) const
inline

Build hits from calibrated data.

The calibrated data of each PMT inside the optical module are used to build L1 coincidences. The predefined requirements are then checked using the same calibrated data of each PMT. The output data are time sorted.

Parameters
inputinput L0 data
outoutput L1 data

Definition at line 442 of file JBuildL2.hh.

443  {
444  using namespace std;
445 
446  vector <JElement_t> buffer;
447  JBuildL1<JElement_t> build(this->TMaxLocal_ns, true);
448 
449  build(input, back_inserter(buffer));
450 
451  (*this)(input, buffer, out);
452  }
Template L1 hit builder.
Definition: JBuildL1.hh:76
double TMaxLocal_ns
maximal time difference [ns]
template<class JOutput_t >
void JTRIGGER::JBuildL2< JHitR2 >::operator() ( const JDAQSuperFrame input,
const JModule module,
JOutput_t  out 
) const
inline

Build hits from DAQ data.

The time calibration is applied and the requirements are applied to the calibrated data. The output data are time sorted.

Parameters
inputDAQ super frame
modulemodule
outoutput L2 data

Definition at line 466 of file JBuildL2.hh.

469  {
470  if (!input.empty()) {
471  (*this)(JSuperFrame2D<JHit>::demultiplex(input, module), out);
472  }
473  }
static JSuperFrame2D< JElement_t > demultiplex
Demultiplexer.
void JTRIGGER::JL2Parameters::reset ( )
inlineinherited

Reset L2 parameters.

Definition at line 71 of file JTriggerParameters.hh.

72  {
73  numberOfHits = 0;
74  TMaxLocal_ns = 0.0;
75  ctMin = 1.0;
76  }
double ctMin
minimal cosine space angle between PMT axes
int numberOfHits
minimal number of hits
double TMaxLocal_ns
maximal time difference [ns]
bool JTRIGGER::JL2Parameters::equals ( const JL2Parameters parameters) const
inlineinherited

Equality.

Parameters
parametersL2 parameters
Returns
true if equals; else false

Definition at line 85 of file JTriggerParameters.hh.

86  {
87  return (this->numberOfHits == parameters.numberOfHits &&
88  this->TMaxLocal_ns == parameters.TMaxLocal_ns &&
89  this->ctMin == parameters.ctMin);
90  }
double ctMin
minimal cosine space angle between PMT axes
int numberOfHits
minimal number of hits
double TMaxLocal_ns
maximal time difference [ns]
bool JTRIGGER::JL2Parameters::is_valid ( ) const
inlineinherited

Check validity.

Returns
true if not-equal to default value; else false

Definition at line 98 of file JTriggerParameters.hh.

99  {
100  return !this->equals(JL2Parameters());
101  }
bool equals(const JL2Parameters &parameters) const
Equality.
JL2Parameters()
Default constructor.
JTRIGGER::JL2Parameters::ClassDef ( JL2Parameters  ,
 
)
inherited
void JTRIGGER::JBuildHelper< JBuildL2< JHitR2 > >::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< JBuildL2< JHitR2 > >::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< JBuildL2< JHitR2 > >::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

int JTRIGGER::JL2Parameters::numberOfHits
inherited

minimal number of hits

Definition at line 106 of file JTriggerParameters.hh.

double JTRIGGER::JL2Parameters::TMaxLocal_ns
inherited

maximal time difference [ns]

Definition at line 107 of file JTriggerParameters.hh.

double JTRIGGER::JL2Parameters::ctMin
inherited

minimal cosine space angle between PMT axes

Definition at line 108 of file JTriggerParameters.hh.


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