CMS 3D CMS Logo

Public Member Functions

ElementsInEllipse< T, C > Class Template Reference

#include <ElementsInEllipse.h>

List of all members.

Public Member Functions

 ElementsInEllipse ()
const std::pair
< edm::RefVector< C >
, edm::RefVector< C > > 
operator() (const T &axis, double rPhi, double rEta, const edm::RefVector< C > &elements) const
 ~ElementsInEllipse ()

Detailed Description

template<typename T, typename C>
class ElementsInEllipse< T, C >

Definition at line 9 of file ElementsInEllipse.h.


Constructor & Destructor Documentation

template<typename T, typename C>
ElementsInEllipse< T, C >::ElementsInEllipse ( ) [inline]

Definition at line 11 of file ElementsInEllipse.h.

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

Definition at line 12 of file ElementsInEllipse.h.

{}

Member Function Documentation

template<typename T, typename C>
const std::pair<edm::RefVector<C>, edm::RefVector<C> > ElementsInEllipse< T, C >::operator() ( const T axis,
double  rPhi,
double  rEta,
const edm::RefVector< C > &  elements 
) const [inline]

Definition at line 14 of file ElementsInEllipse.h.

                                                                                                                                                {
        edm::RefVector<C> elementsInEllipse;
        edm::RefVector<C> elementsOutEllipse;
        for(typename edm::RefVector<C>::const_iterator element = elements.begin(); element != elements.end(); ++element){
          double distance = ellipse(axis, (*element)->momentum(), rPhi, rEta);
          if(distance <= 1.)elementsInEllipse.push_back(*element);
          else elementsOutEllipse.push_back(*element);
        }
        std::pair<edm::RefVector<C>, edm::RefVector<C> > theInOutPair(elementsInEllipse, elementsOutEllipse);
        return theInOutPair;
      }