Go to the documentation of this file. 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 ;
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
bool operator()(const JCluster &cluster) const
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
vector< vector< JCluster >::iterator > end_iterators
iterators pointing to the first element whose multiplicity is lower than the index
functor that compares the multiplicity of a JCluster to some fixed given multiplicity.
void reset(const JDAQSuperFrame &frame, const JModule &module)
This is a way to re-use the allocated memory.
A JHitL1 with a multiplicity.
unsigned int getNclusters(const unsigned int multiplicity) const
return the number of clusters with exactly the given multiplicity
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for L1 build parameters.
vector< JCluster >::const_iterator end_m(unsigned int multiplicity) const
returns end iterator for clusters with exactly the given multiplicity
MinimalMultiplicityFunctor(const unsigned int _m)
JClusterBuilder(const double window, const bool combine)
default constructor
Data structure for a composite optical module.
JClusterBuilder(const JDAQSuperFrame &frame, const JModule &module, const double window, const bool combine)
constructor
Local coincidence cluster builder.
vector< JCluster >::const_iterator begin_m(unsigned int multiplicity) const
returns begin iterator for clusters with exactly the given multiplicity
Data frame of one optical module.
unsigned int getMultiplicity() const
Returns the multiplicity evaluated at the last call to setMultiplicity.
vector< JCluster >::const_iterator begin_inclusive_m(unsigned int multiplicity) const
returns begin iterator for clusters with at least the given multiplicity
unsigned int getInclusiveNclusters(const unsigned int multiplicity) const
return the number of clusters with at least the given multiplicity
Data structure for L1 hit.
const unsigned int max_multiplicity
the highest allowed value for the multiplicity