CMS 3D CMS Logo

Public Member Functions

ElementsInCone< T, M, C > Class Template Reference

#include <ElementsInCone.h>

List of all members.

Public Member Functions

 ElementsInCone ()
const edm::RefVector< C > operator() (const T &coneAxis, const M &coneMetric, double coneSize, const edm::RefVector< 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.

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

Definition at line 13 of file ElementsInCone.h.

{}  

Member Function Documentation

template<typename T, typename M, typename C>
const edm::RefVector<C> ElementsInCone< T, M, C >::operator() ( const T coneAxis,
const M &  coneMetric,
double  coneSize,
const edm::RefVector< C > &  elements 
) const [inline]

Definition at line 14 of file ElementsInCone.h.

                                                                                                                                {
      edm::RefVector<C> elementsInCone;
      for(typename edm::RefVector<C>::const_iterator element=elements.begin();element!=elements.end();++element) {
        double distance = coneMetric(coneAxis,(*element)->momentum());
        if (distance<=coneSize)elementsInCone.push_back(*element);
      }
      return elementsInCone;      
    }