#ifndef __JBUILDL1__ #define __JBUILDL1__ #include #include #include #include #include #include "JTools/JMergeSort.hh" #include "JTrigger/JTriggerException.hh" #include "JTrigger/JHitToolkit.hh" #include "JTrigger/JSuperFrame.hh" #include "JTrigger/JHitL1.hh" #include "JGeometry3D/JAxis3D.hh" namespace JTRIGGER { namespace { using JTOOLS::copy; using JTOOLS::merge; using JTOOLS::JMergeSort; using JGEOMETRY3D::JAxis3D; } /** * Template L1 builder. * An L1 hit is a local coincidence between two different PMTs in the same optical module. * * Note that this class heavily uses internal buffers. * This class should therefore be used as an I/O operator, rather than a constructor. * * The input data consists of a single super frame, containing time sorted frames for each PMT from one optical module. * Each data frame should be terminated with an appriopriate end marker. */ template class JBuildL1 : public JHitToolkit { public: /** * Constructor. * * \param Tmax_ns maximal time difference of L1 [ns] * \param combine combine multiple L1 within given time window */ JBuildL1(const double Tmax_ns, const bool combine = false) : TMaxLocal_ns(Tmax_ns), combineL1(combine) {} /** * Build L1 from super frame. * * \param super_frame input data * \param out output data */ template