CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
ElementsInCone< T, M, C > Class Template Reference

#include <ElementsInCone.h>

Public Member Functions

 ElementsInCone ()
 
const std::vector< edm::Ptr< C > > operator() (const T &coneAxis, const M &coneMetric, double coneSize, std::vector< edm::Ptr< C > > elements) const
 
 ~ElementsInCone ()
 

Detailed Description

template<typename T, typename M, typename C>
class ElementsInCone< T, M, C >

Definition at line 10 of file ElementsInCone.h.

Constructor & Destructor Documentation

template<typename T, typename M, typename C>
ElementsInCone< T, M, C >::ElementsInCone ( )
inline

Definition at line 12 of file ElementsInCone.h.

12 {}
template<typename T, typename M, typename C>
ElementsInCone< T, M, C >::~ElementsInCone ( )
inline

Definition at line 13 of file ElementsInCone.h.

13 {}

Member Function Documentation

template<typename T, typename M, typename C>
const std::vector<edm::Ptr<C> > ElementsInCone< T, M, C >::operator() ( const T coneAxis,
const M &  coneMetric,
double  coneSize,
std::vector< edm::Ptr< C > >  elements 
) const
inline

Definition at line 14 of file ElementsInCone.h.

14  {
15  std::vector<edm::Ptr<C> > elementsInCone;
16  for(typename std::vector<edm::Ptr<C> >::const_iterator element=elements.begin();element!=elements.end();++element) {
17  double distance = coneMetric(coneAxis,(*element)->momentum());
18  if (distance<=coneSize)elementsInCone.push_back(*element);
19  }
20  return elementsInCone;
21  }
dictionary elements