1 #ifndef __JCLUSTERBUILDER__
2 #define __JCLUSTERBUILDER__
73 static_cast<JModule>(*this) = module ;
84 multiplicity = max( (
unsigned int)0,multiplicity) ;
85 multiplicity = min(max_multiplicity,multiplicity) ;
86 return end_iterators[multiplicity+1] ;
92 multiplicity = max( (
unsigned int)0,multiplicity) ;
93 multiplicity = min(max_multiplicity,multiplicity) ;
94 return end_iterators[multiplicity] ;
99 return end_iterators[max_multiplicity+1] ;
104 return end_m(multiplicity) ;
109 return distance( begin_m(multiplicity), end_m(multiplicity) ) ;
114 return distance( begin_inclusive_m(multiplicity), end_inclusive_m(multiplicity) ) ;
125 for(
unsigned int m=max_multiplicity; m>0; --m ) {
146 const unsigned int m ;
Basic data structure for L0 hit.
Basic data structure for L1 hit.
Data structure for optical module.
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
Data structure for a composite optical module.
functor that compares the multiplicity of a JCluster to some fixed given multiplicity.
MinimalMultiplicityFunctor(const unsigned int _m)
bool operator()(const JCluster &cluster) const
Local coincidence cluster builder.
vector< vector< JCluster >::iterator > end_iterators
iterators pointing to the first element whose multiplicity is lower than the index
const unsigned int max_multiplicity
the highest allowed value for the multiplicity
JClusterBuilder(const double window, const bool combine)
default constructor
void setEndIterators()
Use std::partition to sort the clusters in order of decreasing multiplicity.
vector< JCluster >::const_iterator end_inclusive_m(unsigned int multiplicity) const
returns end iterator for clusters with at least the given multiplicity
void reset(const JDAQSuperFrame &frame, const JModule &module)
This is a way to re-use the allocated memory.
vector< JCluster >::const_iterator end_m(unsigned int multiplicity) const
returns end iterator for clusters with exactly the given multiplicity
unsigned int getInclusiveNclusters(const unsigned int multiplicity) const
return the number of clusters with at least the given multiplicity
vector< JCluster >::const_iterator begin_inclusive_m(unsigned int multiplicity) const
returns begin iterator for clusters with at least the given multiplicity
vector< JCluster >::const_iterator begin_m(unsigned int multiplicity) const
returns begin iterator for clusters with exactly the given multiplicity
JClusterBuilder(const JDAQSuperFrame &frame, const JModule &module, const double window, const bool combine)
constructor
unsigned int getNclusters(const unsigned int multiplicity) const
return the number of clusters with exactly the given multiplicity
A JHitL1 with a multiplicity.
unsigned int getMultiplicity() const
Returns the multiplicity evaluated at the last call to setMultiplicity.
Data structure for L1 hit.
Data frame of one optical module.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary classes and methods for triggering.
Auxiliary data structure for L1 build parameters.