ATLAS Offline Software
Loading...
Searching...
No Matches
JetTiledMap::TiledEtaPhiMap< POINT, DIST2 > Class Template Reference

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). More...

#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 !
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
size_t tileIndex_i (int ix, int iy) const
 retrieve the tile index from its integer coordinates.

Protected Attributes

double m_etarange {}
double m_halfetarange {}
double m_rmax {}
size_t m_ndivX =1
size_t m_ndivY =1
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.

◆ ~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;}
std::vector< tile_t > m_tiles

◆ 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.

An eta-phi map providing a relatively fast way of retrieving points at a given distance of a point in...

◆ 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=static_cast<int>(m_ndivX)-1;
124 int indy = int((M_PI-p.y())/m_sizeY);
125 if(indy>=static_cast<int>(m_ndivY)) indy=static_cast<int>(m_ndivY)-1;
126
127 return tileIndex_i(indx,indy);
128 }
size_t tileIndex_i(int ix, int iy) const
retrieve the tile index from its integer coordinates.

◆ 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.

109{} ;

◆ 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.

110{};

◆ m_ndivX

template<class POINT, class DIST2 = typename POINT::DR2>
size_t JetTiledMap::TiledEtaPhiMap< POINT, DIST2 >::m_ndivX =1
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 =1
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.

111{};

◆ 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.

115{};

◆ 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.

113{},m_sizeY{};

◆ 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.

113{},m_sizeY{};

◆ 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: