ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
DeltaRDistanceFunctor< T, U > Class Template Reference

#include <DistanceFunctor.h>

Inheritance diagram for DeltaRDistanceFunctor< T, U >:
Collaboration diagram for DeltaRDistanceFunctor< T, U >:

Public Member Functions

virtual ~DeltaRDistanceFunctor ()
 
float operator() (const T *t, const U *u) const
 
float distance (const T *t, const U *u) const
 

Static Public Member Functions

static float deltaR (const T *t, const U *u)
 

Private Member Functions

virtual float calculateDistance (const T *t, const U *u) const
 

Detailed Description

template<typename T, typename U>
class DeltaRDistanceFunctor< T, U >

Definition at line 30 of file DistanceFunctor.h.

Constructor & Destructor Documentation

◆ ~DeltaRDistanceFunctor()

template<typename T , typename U >
virtual DeltaRDistanceFunctor< T, U >::~DeltaRDistanceFunctor ( )
inlinevirtual

Definition at line 34 of file DistanceFunctor.h.

34 {;}

Member Function Documentation

◆ calculateDistance()

template<typename T , typename U >
virtual float DeltaRDistanceFunctor< T, U >::calculateDistance ( const T *  t,
const U *  u 
) const
inlineprivatevirtual

Implements DistanceFunctor< T, U >.

Definition at line 51 of file DistanceFunctor.h.

51  {
53  }

◆ deltaR()

template<typename T , typename U >
static float DeltaRDistanceFunctor< T, U >::deltaR ( const T *  t,
const U *  u 
)
inlinestatic

Definition at line 36 of file DistanceFunctor.h.

36  {
37 
38  if(!t || !u)
39  return -1.;
40 
41  float phiDiff = t->phi() - u->phi();
42  while(phiDiff < -M_PI) phiDiff += 2. * M_PI;
43  while(phiDiff >= M_PI) phiDiff -= 2. * M_PI;
44  float etaDiff = t->eta() - u->eta();
45  return sqrt(phiDiff * phiDiff + etaDiff * etaDiff);
46 
47  }

◆ distance()

template<typename T , typename U >
float DistanceFunctor< T, U >::distance ( const T *  t,
const U *  u 
) const
inlineinherited

Definition at line 18 of file DistanceFunctor.h.

18  {
19  return (*this)(t, u);
20  }

◆ operator()()

template<typename T , typename U >
float DistanceFunctor< T, U >::operator() ( const T *  t,
const U *  u 
) const
inlineinherited

Definition at line 14 of file DistanceFunctor.h.

14  {
15  return calculateDistance(t, u);
16  }

The documentation for this class was generated from the following file:
DistanceFunctor::calculateDistance
virtual float calculateDistance(const T *t, const U *u) const =0
M_PI
#define M_PI
Definition: ActiveFraction.h:11
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
DeltaRDistanceFunctor::deltaR
static float deltaR(const T *t, const U *u)
Definition: DistanceFunctor.h:36