1 #ifndef ElementsInConeRef_h
2 #define ElementsInConeRef_h
9 template <
typename T,
typename M,
typename C>
18 double distance = coneMetric(coneAxis,(*element)->momentum());
19 if (distance<=coneSize)elementsInCone.
push_back(*element);
21 return elementsInCone;
25 template <
typename T,
typename M>
30 const std::vector<std::pair<math::XYZPoint,float> >
operator()(
const T& coneAxis,
const M& coneMetric,
double coneSize,
const std::vector<std::pair<math::XYZPoint,float> >&
elements)
const{
31 std::vector<std::pair<math::XYZPoint,float> > elementsInCone;
32 for(
typename std::vector<std::pair<math::XYZPoint,float> >::const_iterator element=
elements.begin();element!=
elements.end();++element) {
33 double distance = coneMetric(coneAxis,(*element).first);
34 if (distance<=coneSize)elementsInCone.push_back(*element);
36 return elementsInCone;
const std::vector< std::pair< math::XYZPoint, float > > operator()(const T &coneAxis, const M &coneMetric, double coneSize, const std::vector< std::pair< math::XYZPoint, float > > &elements) const
const edm::RefVector< C > operator()(const T &coneAxis, const M &coneMetric, double coneSize, const edm::RefVector< C > &elements) const
const_iterator end() const
Termination of iteration.
const_iterator begin() const
Initialize an iterator over the RefVector.
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.