test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ElementsInAnnulus.h
Go to the documentation of this file.
1 #ifndef ElementsInAnnulus_h
2 #define ElementsInAnnulus_h
3 
8 
9 template <typename T, typename M, typename N, typename C>
11  public:
14  const std::vector<edm::Ptr<C> > operator()(const T& coneAxis,const M& innerconeMetric,double innerconeSize,const N& outerconeMetric,double outerconeSize,const std::vector<edm::Ptr<C> >& elements)const{
15  std::vector<edm::Ptr<C> > elementsInBand;
16  for(typename std::vector<edm::Ptr<C> >::const_iterator element=elements.begin();element!=elements.end();++element) {
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);
20  }
21  return elementsInBand;
22  }
23 };
24 template <typename T, typename M, typename N>
25  class ElementsInAnnulus<T, M, N, std::pair<math::XYZPoint,float> > {
26  public:
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);
35  }
36  return elementsInBand;
37  }
38 };
39 
40 #endif
41 
dictionary elements
const std::vector< edm::Ptr< C > > operator()(const T &coneAxis, const M &innerconeMetric, double innerconeSize, const N &outerconeMetric, double outerconeSize, const std::vector< edm::Ptr< C > > &elements) const
#define N
Definition: blowfish.cc:9
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
long double T