ATLAS Offline Software
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
JetTiledMap::TiledEtaPhiMap< POINT, DIST2 > Class Template Reference

#include <TiledEtaPhiMap.h>

Collaboration diagram for JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >:

Public Types

typedef Tile< POINT, DIST2 > tile_t
 

Public Member Functions

 TiledEtaPhiMap ()
 
virtual ~TiledEtaPhiMap ()
 
void init (double rmax)
 
void insert (POINT &p)
 
std::vector< POINT > pointsInDr (POINT &p, double r) const
 retrieve all points within deltaR of p. WARNING !! wrong results if r>rmax ! More...
 
virtual void clear ()
 
virtual void reset ()
 
unsigned int size () const
 
void setEtaRange (double r)
 

Protected Member Functions

size_t tileIndex (POINT &p) const
 index of the tile containing p More...
 
size_t tileIndex_i (int ix, int iy) const
 retrieve the tile index from its integer coordinates. More...
 

Protected Attributes

double m_etarange {}
 
double m_halfetarange {}
 
double m_rmax {}
 
size_t m_ndivX {}
 
size_t m_ndivY {}
 
double m_sizeX {}
 
double m_sizeY {}
 
unsigned int m_size {}
 
std::vector< tile_tm_tiles
 

Detailed Description

template<class POINT, class DIST2 = typename POINT::DR2>
class JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >

An eta-phi map providing a relatively fast way of retrieving points at a given distance of a point in the plan (cylinder in this case). It works by simply dividing the plan in rectangular tiles of identical size and restricting the search only in a tile and its neighbours. IMPORTANT : the search is accurate only up to distance rmax where rmax is given to the init() function.

Definition at line 85 of file TiledEtaPhiMap.h.

Member Typedef Documentation

◆ tile_t

template<class POINT , class DIST2 = typename POINT::DR2>
typedef Tile<POINT, DIST2> JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >::tile_t

Definition at line 87 of file TiledEtaPhiMap.h.

Constructor & Destructor Documentation

◆ TiledEtaPhiMap()

template<class POINT , class DIST2 = typename POINT::DR2>
JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >::TiledEtaPhiMap ( )
inline

Definition at line 90 of file TiledEtaPhiMap.h.

90 : m_etarange(10.0), m_halfetarange(5.), m_size(0) {};

◆ ~TiledEtaPhiMap()

template<class POINT , class DIST2 = typename POINT::DR2>
virtual JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >::~TiledEtaPhiMap ( )
inlinevirtual

Definition at line 91 of file TiledEtaPhiMap.h.

91 {}

Member Function Documentation

◆ clear()

template<class POINT , class DIST2 = typename POINT::DR2>
virtual void JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >::clear ( )
virtual

◆ init()

template<class POINT , class DIST2 = typename POINT::DR2>
void JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >::init ( double  rmax)

◆ insert()

template<class POINT , class DIST2 = typename POINT::DR2>
void JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >::insert ( POINT &  p)

◆ pointsInDr()

template<class POINT , class DIST2 = typename POINT::DR2>
std::vector<POINT> JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >::pointsInDr ( POINT &  p,
double  r 
) const

retrieve all points within deltaR of p. WARNING !! wrong results if r>rmax !

◆ reset()

template<class POINT , class DIST2 = typename POINT::DR2>
virtual void JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >::reset ( )
inlinevirtual

Definition at line 101 of file TiledEtaPhiMap.h.

101 {m_tiles.clear();m_size=0;}

◆ setEtaRange()

template<class POINT , class DIST2 = typename POINT::DR2>
void JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >::setEtaRange ( double  r)
inline

Definition at line 105 of file TiledEtaPhiMap.h.

◆ size()

template<class POINT , class DIST2 = typename POINT::DR2>
unsigned int JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >::size ( ) const
inline

Definition at line 103 of file TiledEtaPhiMap.h.

103 {return m_size;} ;

◆ tileIndex()

template<class POINT , class DIST2 = typename POINT::DR2>
size_t JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >::tileIndex ( POINT &  p) const
inlineprotected

index of the tile containing p

Definition at line 119 of file TiledEtaPhiMap.h.

119  {
120 
121  int indx = int( (p.x()+m_halfetarange)/m_sizeX) ;
122  if(indx<0) indx=0;
123  if(indx>=static_cast<int>(m_ndivX)) indx=m_ndivX-1;
124  int indy = int((M_PI-p.y())/m_sizeY);
125  if(indy>=static_cast<int>(m_ndivY)) indy=m_ndivY-1;
126 
127  return tileIndex_i(indx,indy);
128  }

◆ tileIndex_i()

template<class POINT , class DIST2 = typename POINT::DR2>
size_t JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >::tileIndex_i ( int  ix,
int  iy 
) const
inlineprotected

retrieve the tile index from its integer coordinates.

Definition at line 131 of file TiledEtaPhiMap.h.

131 {return ix*m_ndivY + iy;};

Member Data Documentation

◆ m_etarange

template<class POINT , class DIST2 = typename POINT::DR2>
double JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >::m_etarange {}
protected

Definition at line 109 of file TiledEtaPhiMap.h.

◆ m_halfetarange

template<class POINT , class DIST2 = typename POINT::DR2>
double JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >::m_halfetarange {}
protected

Definition at line 110 of file TiledEtaPhiMap.h.

◆ m_ndivX

template<class POINT , class DIST2 = typename POINT::DR2>
size_t JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >::m_ndivX {}
protected

Definition at line 112 of file TiledEtaPhiMap.h.

◆ m_ndivY

template<class POINT , class DIST2 = typename POINT::DR2>
size_t JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >::m_ndivY {}
protected

Definition at line 112 of file TiledEtaPhiMap.h.

◆ m_rmax

template<class POINT , class DIST2 = typename POINT::DR2>
double JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >::m_rmax {}
protected

Definition at line 111 of file TiledEtaPhiMap.h.

◆ m_size

template<class POINT , class DIST2 = typename POINT::DR2>
unsigned int JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >::m_size {}
protected

Definition at line 115 of file TiledEtaPhiMap.h.

◆ m_sizeX

template<class POINT , class DIST2 = typename POINT::DR2>
double JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >::m_sizeX {}
protected

Definition at line 113 of file TiledEtaPhiMap.h.

◆ m_sizeY

template<class POINT , class DIST2 = typename POINT::DR2>
double JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >::m_sizeY {}
protected

Definition at line 113 of file TiledEtaPhiMap.h.

◆ m_tiles

template<class POINT , class DIST2 = typename POINT::DR2>
std::vector<tile_t> JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >::m_tiles
protected

Definition at line 133 of file TiledEtaPhiMap.h.


The documentation for this class was generated from the following file:
beamspotman.r
def r
Definition: beamspotman.py:676
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
JetTiledMap::TiledEtaPhiMap::m_sizeY
double m_sizeY
Definition: TiledEtaPhiMap.h:113
M_PI
#define M_PI
Definition: ActiveFraction.h:11
JetTiledMap::TiledEtaPhiMap::m_halfetarange
double m_halfetarange
Definition: TiledEtaPhiMap.h:110
JetTiledMap::TiledEtaPhiMap::tileIndex_i
size_t tileIndex_i(int ix, int iy) const
retrieve the tile index from its integer coordinates.
Definition: TiledEtaPhiMap.h:131
JetTiledMap::TiledEtaPhiMap::m_etarange
double m_etarange
Definition: TiledEtaPhiMap.h:109
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
JetTiledMap::TiledEtaPhiMap::m_ndivX
size_t m_ndivX
Definition: TiledEtaPhiMap.h:112
JetTiledMap::TiledEtaPhiMap::m_sizeX
double m_sizeX
Definition: TiledEtaPhiMap.h:113
JetTiledMap::TiledEtaPhiMap::m_size
unsigned int m_size
Definition: TiledEtaPhiMap.h:115
JetTiledMap::TiledEtaPhiMap::m_ndivY
size_t m_ndivY
Definition: TiledEtaPhiMap.h:112
JetTiledMap::TiledEtaPhiMap::m_tiles
std::vector< tile_t > m_tiles
Definition: TiledEtaPhiMap.h:131