CMS 3D CMS Logo

Public Member Functions

TauConeIsolationAlgo< T, C, M > Class Template Reference

#include <TauConeIsolationAlgo.h>

List of all members.

Public Member Functions

const edm::RefVector< C > operator() (const T &coneAxis, double coneSize, const edm::RefVector< C > &elements, const M &metric) const
 TauConeIsolationAlgo ()
 ~TauConeIsolationAlgo ()

Detailed Description

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

Definition at line 9 of file TauConeIsolationAlgo.h.


Constructor & Destructor Documentation

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

Definition at line 11 of file TauConeIsolationAlgo.h.

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

Definition at line 12 of file TauConeIsolationAlgo.h.

{}

Member Function Documentation

template<typename T , typename C , typename M >
const edm::RefVector< C > TauConeIsolationAlgo< T, C, M >::operator() ( const T coneAxis,
double  coneSize,
const edm::RefVector< C > &  elements,
const M &  metric 
) const

Definition at line 18 of file TauConeIsolationAlgo.h.

References edm::RefVector< C, T, F >::begin(), edm::RefVector< C, T, F >::end(), and edm::RefVector< C, T, F >::push_back().

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

    if ( distance <= coneSize ) {
      elementsInCone.push_back(*element);
    }
  }

  return elementsInCone;
}