|
Crombie Tools
|
#include <EtaPhiMap.h>
Public Member Functions | |
| EtaPhiMap (double spacing, double maxeta=5.0, std::function< double(const T *)> eta=[](const T *p){ return p->eta();}, std::function< double(const T *)> phi=[](const T *p){ return p->phi();}) | |
| template<typename C > | |
| void | AddParticles (C &collection) |
| Add a collection of particles to the grid. Call once per event, because this gets cleared. More... | |
| std::vector< const T * > | GetParticles (double eta, double phi, double dr) const |
| Get particles within dr of a given eta, phi. More... | |
Private Member Functions | |
| unsigned | bin (double eta, double phi) const |
| Get the bin number. More... | |
| unsigned | bin (unsigned eta_bin, unsigned phi_bin) const |
| void | clear () |
| Reset the particles in each grid point. More... | |
| unsigned | etabin (double eta) const |
| Get eta bin. More... | |
| unsigned | phibin (double phi) const |
| Get phi bin. More... | |
Private Attributes | |
| double | _maxeta |
| Max eta of grid (has overflow and underflow bins) More... | |
| double | _spacing |
| Spacing of each grid. More... | |
| std::function< double(const T *)> | geteta |
| Function for getting eta from pointers. More... | |
| std::function< double(const T *)> | getphi |
| Function for getting phi from pointers. More... | |
| unsigned | n_etabins |
| Number of eta bins. More... | |
| unsigned | n_phibins |
| Number of phi bins. More... | |
| std::vector< std::vector< const T * > > | particles |
| Stores all of the particles. More... | |
Definition at line 13 of file EtaPhiMap.h.
|
inline |
Definition at line 15 of file EtaPhiMap.h.
References EtaPhiMap< T >::_maxeta, EtaPhiMap< T >::_spacing, EtaPhiMap< T >::AddParticles(), EtaPhiMap< T >::geteta, EtaPhiMap< T >::GetParticles(), EtaPhiMap< T >::getphi, EtaPhiMap< T >::n_etabins, EtaPhiMap< T >::n_phibins, and EtaPhiMap< T >::particles.
Add a collection of particles to the grid. Call once per event, because this gets cleared.
Definition at line 65 of file EtaPhiMap.h.
References EtaPhiMap< T >::bin(), EtaPhiMap< T >::clear(), EtaPhiMap< T >::geteta, EtaPhiMap< T >::getphi, and EtaPhiMap< T >::particles.
Referenced by EtaPhiMap< T >::EtaPhiMap().
|
private |
Get the bin number.
Definition at line 111 of file EtaPhiMap.h.
References EtaPhiMap< T >::etabin(), and EtaPhiMap< T >::phibin().
Referenced by EtaPhiMap< T >::AddParticles(), and EtaPhiMap< T >::GetParticles().
|
private |
Definition at line 116 of file EtaPhiMap.h.
References EtaPhiMap< T >::n_etabins.
|
private |
Reset the particles in each grid point.
Definition at line 132 of file EtaPhiMap.h.
References EtaPhiMap< T >::particles.
Referenced by EtaPhiMap< T >::AddParticles().
|
private |
Get eta bin.
Definition at line 121 of file EtaPhiMap.h.
References EtaPhiMap< T >::_spacing, and EtaPhiMap< T >::n_etabins.
Referenced by EtaPhiMap< T >::bin(), and EtaPhiMap< T >::GetParticles().
| std::vector< const T * > EtaPhiMap< T >::GetParticles | ( | double | eta, |
| double | phi, | ||
| double | dr | ||
| ) | const |
Get particles within dr of a given eta, phi.
Definition at line 79 of file EtaPhiMap.h.
References EtaPhiMap< T >::bin(), deltaR2(), EtaPhiMap< T >::etabin(), EtaPhiMap< T >::geteta, EtaPhiMap< T >::getphi, EtaPhiMap< T >::n_phibins, EtaPhiMap< T >::particles, and EtaPhiMap< T >::phibin().
Referenced by EtaPhiMap< T >::EtaPhiMap().
|
private |
Get phi bin.
Definition at line 126 of file EtaPhiMap.h.
References EtaPhiMap< T >::_spacing.
Referenced by EtaPhiMap< T >::bin(), and EtaPhiMap< T >::GetParticles().
|
private |
Max eta of grid (has overflow and underflow bins)
Definition at line 40 of file EtaPhiMap.h.
Referenced by EtaPhiMap< T >::EtaPhiMap().
|
private |
Spacing of each grid.
Definition at line 38 of file EtaPhiMap.h.
Referenced by EtaPhiMap< T >::etabin(), EtaPhiMap< T >::EtaPhiMap(), and EtaPhiMap< T >::phibin().
|
private |
Function for getting eta from pointers.
Definition at line 47 of file EtaPhiMap.h.
Referenced by EtaPhiMap< T >::AddParticles(), EtaPhiMap< T >::EtaPhiMap(), and EtaPhiMap< T >::GetParticles().
|
private |
Function for getting phi from pointers.
Definition at line 48 of file EtaPhiMap.h.
Referenced by EtaPhiMap< T >::AddParticles(), EtaPhiMap< T >::EtaPhiMap(), and EtaPhiMap< T >::GetParticles().
|
private |
Number of eta bins.
Definition at line 43 of file EtaPhiMap.h.
Referenced by EtaPhiMap< T >::bin(), EtaPhiMap< T >::etabin(), and EtaPhiMap< T >::EtaPhiMap().
|
private |
Number of phi bins.
Definition at line 45 of file EtaPhiMap.h.
Referenced by EtaPhiMap< T >::EtaPhiMap(), and EtaPhiMap< T >::GetParticles().
|
private |
Stores all of the particles.
Definition at line 36 of file EtaPhiMap.h.
Referenced by EtaPhiMap< T >::AddParticles(), EtaPhiMap< T >::clear(), EtaPhiMap< T >::EtaPhiMap(), and EtaPhiMap< T >::GetParticles().