1 #ifndef __JTRIGGER__JTRIGGERMXSHOWER__
2 #define __JTRIGGER__JTRIGGERMXSHOWER__
20 namespace JPP {
using namespace JTRIGGER; }
50 using namespace JMATH;
51 using namespace JTOOLS;
100 using namespace JTOOLS;
125 template<
class JElement_t>
128 std::back_insert_iterator<JTriggerOutput> out)
const
131 typedef typename JTimeslice_t::value_type
JFrame_t;
136 JTimeslice_t clone(inputL0, mapper);
138 for (JTriggerInput::const_iterator
root = inputL1.begin();
root != inputL1.end(); ++
root) {
142 const container_type& zip = mapper.getList(
root->getModuleID());
144 for (
typename container_type::const_iterator mod = zip.begin(); mod != zip.end(); ++mod) {
146 const double Tmin =
root->getT() + mod->Tmin_ns;
147 const double Tmax =
root->getT() + mod->Tmax_ns;
149 JFrame_t& frame = clone[mod->first];
151 if (!frame.empty()) {
153 frame.fast_forward(
root->getT() - TMaxEvent_ns);
155 for (
typename JFrame_t::const_iterator i = frame.get(); *i <= Tmax; ++i) {
158 buffer.push_back(
JHitR1(frame.getModuleID(),
171 JTriggerInput::iterator q =
clusterize(buffer.begin(), buffer.end(), match,
parameters.numberOfHits - 1);
Data frame with end marker.
Data structure for a composite optical module.
Shower trigger parameters.
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
double getIndexOfRefraction()
Get average index of refraction of water corresponding to group velocity.
static const JParameters_t & getParameters()
Get latest parameters.
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
static const int FACTORY_LIMIT
Bit indicating max nhits reached in trigger.
static const JModuleCounter getNumberOfModules
Function object to count unique modules.
Data structure for detector geometry and calibration.
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
double getDistance(const JFirst_t &first, const JSecond_t &second)
Get distance between objects.
double Tmin_ns
minimal time difference [ns]
Auxiliary class to match modules according maximal distance.
JModuleMapper< JAttributes > JModuleMapper_t
Type definition of module mapper.
std::vector< JHitR1 > buffer
static struct JTRIGGER::@80 clusterize
Anonymous structure for clustering of hits.
const JDAQChronometer & getDAQChronometer() const
Get DAQ chronometer.
JDAQTriggerMask & addTriggerBit(const unsigned int bit)
Add trigger bit.
const JPosition3D & getPosition() const
Get position.
void setAttributes(const JModule &first, const JModule &second, JAttributes_t &attributes)
Template method to set module attributes.
double Tmax_ns
maximal time difference [ns]
do JPlot2D f $WORKDIR detector root
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
void operator()(const JTriggerInput &inputL1, const JTimeslice< JElement_t > inputL0, std::back_insert_iterator< JTriggerOutput > out) const
Process trigger.
JParametersHelper< JParameters > parameters
Mapper for directly addressing of associated modules in the detector data structure.
Map of associated modules in detector.
const double getInverseSpeedOfLight()
Get inverse speed of light.
Reduced data structure for L1 hit.
JTriggerMXShower(const JParameters &input, const JDetector &detector)
Constructor.
Time slice with calibrated data.
JTriggerbit_t getTriggerBit()
Get the trigger bit.