1 #ifndef ElementsInCone_h
2 #define ElementsInCone_h
9 template <
typename T,
typename M,
typename C>
15 std::vector<edm::Ptr<C> > elementsInCone;
17 double distance = coneMetric(coneAxis,(*element)->momentum());
18 if (distance<=coneSize)elementsInCone.push_back(*element);
20 return elementsInCone;
32 template <
typename T,
typename M>
37 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{
38 std::vector<std::pair<math::XYZPoint,float> > elementsInCone;
39 for(
typename std::vector<std::pair<math::XYZPoint,float> >::const_iterator element=
elements.begin();element!=
elements.end();++element) {
40 double distance = coneMetric(coneAxis,(*element).first);
41 if (distance<=coneSize)elementsInCone.push_back(*element);
43 return elementsInCone;
const std::vector< edm::Ptr< C > > operator()(const T &coneAxis, const M &coneMetric, double coneSize, std::vector< edm::Ptr< C > > elements) const
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