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