1#ifndef __JTRIGGER__JTRIGGERMXSHOWER__
2#define __JTRIGGER__JTRIGGERMXSHOWER__
70 if (d <= 0.5 * parameters.DMax_m)
72 else if (d <= parameters.DMax_m)
158 template<
class JElement_t>
161 std::back_insert_iterator<JTriggerOutput> out)
const
164 typedef typename JTimeslice_t::value_type
JFrame_t;
169 JTimeslice_t clone(inputL0,
mapper);
171 for (JTriggerInput::const_iterator
root = inputL1.begin();
root != inputL1.end(); ++
root) {
177 for (
typename container_type::const_iterator mod = zip.begin(); mod != zip.end(); ++mod) {
179 const double Tmin =
root->getT() + mod->Tmin_ns;
180 const double Tmax =
root->getT() + mod->Tmax_ns;
182 JFrame_t& frame = clone[mod->first];
184 if (!frame.empty()) {
188 for (
typename JFrame_t::const_iterator i = frame.get(); *i <= Tmax; ++i) {
246 if (!this->empty()) {
250 for (const_iterator u = this->begin(); u != this->end(); ++u) {
253 const double t0 =
root.getT() - u->getLength() * U;
258 for (T p = __begin; p != __end; ++p) {
260 const double t1 = p->getT() - p0.
getDistance(*p) * U;
262 if (fabs(t1 - t0) <=
parameters.TMaxExtra_ns) {
264 m.insert(p->getModuleID());
269 m.size() >= (
size_t)
parameters.numberOfModules) {
Algorithms for hit clustering and sorting.
Data structure for detector geometry and calibration.
Match operator for Cherenkov light from shower in any direction.
Map of associated modules in detector.
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
Mapper for directly addressing of associated modules in the detector data structure.
const container_type & getList(const JObjectID &id) const
Get list with module data matching given module.
Data structure for a composite optical module.
const JPosition3D & getPosition() const
Get position.
Data structure for vector in three dimensions.
double getDistance(const JVector3D &pos) const
Get distance to point.
Data frame with end marker.
Reduced data structure for L1 hit.
Time slice with calibrated data.
void operator()(const JTriggerInput &inputL1, const JTimeslice< JElement_t > inputL0, std::back_insert_iterator< JTriggerOutput > out) const
Process trigger.
JModuleMapper< JAttributes > JModuleMapper_t
Type definition of module mapper.
std::vector< JHitR1 > buffer
JParametersHelper< JParameters > parameters
JTriggerMXShower(const JParameters &input, const JDetector &detector)
Constructor.
bool check(const JHitR1 &root, T __begin, T __end) const
Check event.
const JDAQChronometer & getDAQChronometer() const
Get DAQ chronometer.
double getDistance(const JFirst_t &first, const JSecond_t &second)
Get distance between objects.
double getIndexOfRefraction()
Get average index of refraction of water corresponding to group velocity.
const double getInverseSpeedOfLight()
Get inverse speed of light.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary classes and methods for triggering.
JHitIterator_t clusterize(JHitIterator_t __begin, JHitIterator_t __end, const JMatch_t &match, const int Nmin=1)
Partition data according given binary match operator.
static const JModuleCounter getNumberOfModules
Function object to count unique modules.
void setAttributes(const JModule &first, const JModule &second, JAttributes &attributes)
Set module attributes.
Auxiliary class to match modules according maximal distance.
double Tmin_ns
minimal time difference [ns]
double Tmax_ns
maximal time difference [ns]
Wrapper class to share parameters.
static const JParameters_t & getParameters()
Get latest parameters.
Shower trigger parameters.
static const int FACTORY_LIMIT
Bit indicating max nhits reached in trigger.