CMS 3D CMS Logo

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

#include <ElementsInEllipse.h>

Public Member Functions

 ElementsInEllipse ()
 
 ElementsInEllipseRef ()
 
const std::pair
< edm::RefVector< C >
, edm::RefVector< C > > 
operator() (const T &axis, double rPhi, double rEta, const edm::RefVector< C > &elements) const
 
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 ()
 
 ~ElementsInEllipseRef ()
 

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 {}
template<typename T, typename C>
ElementsInEllipse< T, C >::~ElementsInEllipseRef ( )
inline

Definition at line 12 of file ElementsInEllipseRef.h.

12 {}

Member Function Documentation

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

Definition at line 11 of file ElementsInEllipseRef.h.

11 {}
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 ElementsInEllipseRef.h.

14  {
15  edm::RefVector<C> elementsInEllipse;
16  edm::RefVector<C> elementsOutEllipse;
17  for(typename edm::RefVector<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<edm::RefVector<C>, edm::RefVector<C> > theInOutPair(elementsInEllipse, elementsOutEllipse);
23  return theInOutPair;
24  }
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:253
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:248
void push_back(value_type const &ref)
Add a Ref&lt;C, T&gt; to the RefVector.
Definition: RefVector.h:69
double ellipse(const T1 &t1, const T2 &t2, double rPhi, double rEta)
Definition: Ellipse.h:9
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  }
dictionary elements
double ellipse(const T1 &t1, const T2 &t2, double rPhi, double rEta)
Definition: Ellipse.h:9