![]() |
ATLAS Offline Software
|
2D look up table for iParticles More...
#include <IParticlesLookUpTable.h>
Public Member Functions | |
IParticlesLookUpTable (unsigned int nbins=50, float minPt=1e-3) | |
constructor taking the desired binsize More... | |
void | init (const DataVector< T > &particles) |
initialize the look up table with an iParticle container More... | |
void | clear () |
clear the look up table More... | |
template<class O > | |
bool | iParticlesInCone (float eta, float phi, float dr, O &output) const |
collect IParticles in a given cone More... | |
bool | isInitialized () const |
return whether table is initialized More... | |
Private Member Functions | |
float | phiInRange (float phi) const |
hepler function to ensure phi is within +-Pi More... | |
int | phiIndex (float phi) const |
calculate phi index for a given phi More... | |
void | addEntry (int i, std::vector< const T * > &output) const |
add an entry into a vector of pointers More... | |
void | addEntry (int i, std::vector< ElementLink< DataVector< T > > > &output) const |
add an entry into a vector of ElementLinks More... | |
Private Attributes | |
const DataVector< T > * | m_container |
int | m_nphiBins |
float | m_phiBinSize |
number of bins More... | |
float | m_minPt |
bin size More... | |
std::vector< std::vector< int > > | m_phiBinnedLookUpTable |
cut on minimum Pt for the considered particles More... | |
Static Private Attributes | |
static constexpr float | m_2PI = 2*M_PI |
define 2*Pi More... | |
2D look up table for iParticles
Definition at line 17 of file IParticlesLookUpTable.h.
|
inline |
|
private |
add an entry into a vector of pointers
Definition at line 153 of file IParticlesLookUpTable.h.
|
private |
add an entry into a vector of ElementLinks
Definition at line 158 of file IParticlesLookUpTable.h.
void xAOD::IParticlesLookUpTable< T >::clear |
clear the look up table
Definition at line 73 of file IParticlesLookUpTable.h.
void xAOD::IParticlesLookUpTable< T >::init | ( | const DataVector< T > & | particles | ) |
initialize the look up table with an iParticle container
resize hash table
loop over iparticles and copy them into the look-up struct use hashing for phi look-up and sorting for eta look-up
Definition at line 78 of file IParticlesLookUpTable.h.
bool xAOD::IParticlesLookUpTable< T >::iParticlesInCone | ( | float | eta, |
float | phi, | ||
float | dr, | ||
O & | output | ||
) | const |
collect IParticles in a given cone
check if initialized
comparison functions for upper and lower bound
get phi hash ranges
Definition at line 104 of file IParticlesLookUpTable.h.
bool xAOD::IParticlesLookUpTable< T >::isInitialized |
|
inlineprivate |
|
inlineprivate |
|
staticconstexprprivate |
define 2*Pi
Definition at line 42 of file IParticlesLookUpTable.h.
|
private |
Definition at line 61 of file IParticlesLookUpTable.h.
|
private |
bin size
Definition at line 64 of file IParticlesLookUpTable.h.
|
private |
Definition at line 62 of file IParticlesLookUpTable.h.
|
private |
cut on minimum Pt for the considered particles
Definition at line 65 of file IParticlesLookUpTable.h.
|
private |
number of bins
Definition at line 63 of file IParticlesLookUpTable.h.