CMS 3D CMS Logo

List of all members | Public Member Functions
ElementsInEllipse< T, C > Class Template Reference

#include <ElementsInEllipse.h>

Public Member Functions

 ElementsInEllipse ()
 
const std::pair< std::vector< edm::Ptr< C > >, std::vector< edm::Ptr< C > > > operator() (const T &axis, double rPhi, double rEta, const std::vector< edm::Ptr< 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.

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

Definition at line 12 of file ElementsInEllipse.h.

12 {}

Member Function Documentation

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

Definition at line 14 of file ElementsInEllipse.h.

14  {
15  std::vector<edm::Ptr<C> > elementsInEllipse;
16  std::vector<edm::Ptr<C> > elementsOutEllipse;
17  for(typename std::vector<edm::Ptr<C> >::const_iterator element = elements.begin(); element != elements.end(); ++element){
18  double distance = ellipse(axis, (*element)->momentum(), rPhi, rEta);
19  if(distance <= 1.)elementsInEllipse.push_back(*element);
20  else elementsOutEllipse.push_back(*element);
21  }
22  std::pair<std::vector<edm::Ptr<C> >, std::vector<edm::Ptr<C> > > theInOutPair(elementsInEllipse, elementsOutEllipse);
23  return theInOutPair;
24  }
double ellipse(const T1 &t1, const T2 &t2, double rPhi, double rEta)
Definition: Ellipse.h:9