ATLAS Offline Software
|
Multiple grids combined into one. More...
#include <PufitMultiGrid.h>
Classes | |
class | Tower |
Tower in the multi-grid. More... | |
Public Member Functions | |
PufitMultiGrid (double maxEta, std::size_t nEtaTowers, std::size_t nPhiTowers, bool displaceEta=false, bool displacePhi=false) | |
Create a new tower grid. More... | |
PufitMultiGrid (const GridParameters ¶meters) | |
Construct a grid from the provided parameters. More... | |
PufitMultiGrid (const PufitMultiGrid &other) | |
Copy constructor. More... | |
PufitMultiGrid & | operator= (const PufitMultiGrid &other) |
Assignment operator. More... | |
void | reset () |
Reset the internal storage. More... | |
Tower & | operator[] (const std::pair< std::size_t, std::size_t > &indices) |
Access stored value by eta/phi index (access is bounds checked) More... | |
const Tower & | operator[] (const std::pair< std::size_t, std::size_t > &indices) const |
Access stored value by eta/phi index (access is bounds checked) More... | |
Tower & | operator[] (std::size_t index) |
Access stored value by global index number (access is bounds checked) More... | |
const Tower & | operator[] (std::size_t index) const |
Access stored value by global index number (access is bounds checked) More... | |
std::vector< Tower >::iterator | begin () |
Access by iterator. More... | |
std::vector< Tower >::const_iterator | begin () const |
Access by iterator. More... | |
std::vector< Tower >::iterator | end () |
Iterator end point. More... | |
std::vector< Tower >::const_iterator | end () const |
Iterator end point. More... | |
PufitMultiGrid & | operator+= (const PufitMultiGrid &other) |
Add a whole grid into this. More... | |
PufitMultiGrid & | operator-= (const PufitMultiGrid &other) |
Subtract a whole grid from this. More... | |
std::size_t | getIndex (double eta, double phi, bool &outOfRange) const |
Get the index for the given eta, phi values. More... | |
std::size_t | getEtaIndex (double eta, bool &outOfRange) const |
Get the eta index for the given value. More... | |
std::size_t | getPhiIndex (double phi) const |
Get the phi index for the given value. More... | |
std::size_t | globalIndex (std::size_t iEta, std::size_t iPhi) const |
Convert eta and phi to a global index. More... | |
std::pair< std::size_t, std::size_t > | etaPhiIndex (std::size_t index) const |
Convert a global index to an eta/phi index pair. More... | |
double | centralEta (std::size_t iEta) const |
Central eta coordinate of the given eta index. More... | |
double | centralPhi (std::size_t iPhi) const |
Central phi coordinate of the given phi. More... | |
const GridParameters & | parameters () const |
The grid parameters. More... | |
double | maxEta () const |
The maximum eta range for the grid. More... | |
std::size_t | nEtaTowers () const |
The number of eta bins. More... | |
std::size_t | nPhiTowers () const |
The number of phi bins. More... | |
std::size_t | nTowers () const |
The number of bins. More... | |
bool | displaceEta () const |
Whether or not this is displaced in eta. More... | |
bool | displacePhi () const |
Whether or not this is displaced in phi. More... | |
GridDisplacement | displacement () const |
The grid displacement. More... | |
double | etaWidth () const |
The bin width in eta. More... | |
double | phiWidth () const |
The bin width in phi. More... | |
Static Public Attributes | |
constexpr static std::size_t | All = (1 << N) - 1 |
Maximum value representable by N bits. More... | |
constexpr static std::size_t | NCategories = N |
The number of separate categories in the grid. More... | |
Private Attributes | |
const GridParameters | m_params |
The grid's parameters. More... | |
Multiple grids combined into one.
This class allows representing N different categories in a single grid.
Definition at line 62 of file PufitMultiGrid.h.
HLT::MET::PufitMultiGrid< N >::PufitMultiGrid | ( | double | maxEta, |
std::size_t | nEtaTowers, | ||
std::size_t | nPhiTowers, | ||
bool | displaceEta = false , |
||
bool | displacePhi = false |
||
) |
Create a new tower grid.
maxEta | The maximum eta range for the grid |
nEtaTowers | The number of eta towers |
nPhiTowers | The number of phi towers |
displaceEta | Whether to displace eta |
displacePhi | Whether to displace phi |
HLT::MET::PufitMultiGrid< N >::PufitMultiGrid | ( | const GridParameters & | parameters | ) |
Construct a grid from the provided parameters.
HLT::MET::PufitMultiGrid< N >::PufitMultiGrid | ( | const PufitMultiGrid< N > & | other | ) |
Copy constructor.
std::vector<Tower>::iterator HLT::MET::PufitMultiGrid< N >::begin | ( | ) |
Access by iterator.
std::vector<Tower>::const_iterator HLT::MET::PufitMultiGrid< N >::begin | ( | ) | const |
Access by iterator.
|
inherited |
|
inherited |
Central phi coordinate of the given phi.
Definition at line 133 of file PeriodicGridBase.cxx.
|
inherited |
|
inherited |
The grid displacement.
Definition at line 145 of file PeriodicGridBase.cxx.
|
inherited |
std::vector<Tower>::iterator HLT::MET::PufitMultiGrid< N >::end | ( | ) |
Iterator end point.
std::vector<Tower>::const_iterator HLT::MET::PufitMultiGrid< N >::end | ( | ) | const |
Iterator end point.
|
inherited |
Convert a global index to an eta/phi index pair.
Definition at line 124 of file PeriodicGridBase.cxx.
|
inherited |
|
inherited |
Get the eta index for the given value.
eta | The eta value | |
[out] | outOfRange | Set to true if outside of the eta range |
If it's out of range the returned index will be nEta
Definition at line 87 of file PeriodicGridBase.cxx.
|
inherited |
Get the index for the given eta, phi values.
eta | The eta value | |
phi | The phi value | |
[out] | outOfRange | Set to true if outside of the eta range |
If it's out of range the returned index will be nTowers
Definition at line 79 of file PeriodicGridBase.cxx.
|
inherited |
|
inherited |
Convert eta and phi to a global index.
Definition at line 120 of file PeriodicGridBase.cxx.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
PufitMultiGrid& HLT::MET::PufitMultiGrid< N >::operator+= | ( | const PufitMultiGrid< N > & | other | ) |
Add a whole grid into this.
PufitMultiGrid& HLT::MET::PufitMultiGrid< N >::operator-= | ( | const PufitMultiGrid< N > & | other | ) |
Subtract a whole grid from this.
PufitMultiGrid& HLT::MET::PufitMultiGrid< N >::operator= | ( | const PufitMultiGrid< N > & | other | ) |
Assignment operator.
other | The grid whose towers to take |
Take the tower energies/masking from the other grid.
Tower& HLT::MET::PufitMultiGrid< N >::operator[] | ( | const std::pair< std::size_t, std::size_t > & | indices | ) |
Access stored value by eta/phi index (access is bounds checked)
const Tower& HLT::MET::PufitMultiGrid< N >::operator[] | ( | const std::pair< std::size_t, std::size_t > & | indices | ) | const |
Access stored value by eta/phi index (access is bounds checked)
Tower& HLT::MET::PufitMultiGrid< N >::operator[] | ( | std::size_t | index | ) |
Access stored value by global index number (access is bounds checked)
const Tower& HLT::MET::PufitMultiGrid< N >::operator[] | ( | std::size_t | index | ) | const |
Access stored value by global index number (access is bounds checked)
|
inherited |
|
inherited |
void HLT::MET::PufitMultiGrid< N >::reset | ( | ) |
Reset the internal storage.
|
staticconstexpr |
Maximum value representable by N bits.
Definition at line 71 of file PufitMultiGrid.h.
|
privateinherited |
The grid's parameters.
Definition at line 191 of file PeriodicGridBase.h.
|
staticconstexpr |
The number of separate categories in the grid.
Definition at line 73 of file PufitMultiGrid.h.