Analysis Software
Documentation for sPHENIX simulation software
|
#include <acts/blob/sPHENIX/Core/include/Acts/Utilities/BinUtility.hpp>
Public Member Functions | |
BinUtility () | |
Constructor for equidistant. | |
BinUtility (const Transform3 &tForm) | |
BinUtility (const BinningData &bData, const Transform3 &tForm=Transform3::Identity()) | |
BinUtility (size_t bins, float min, float max, BinningOption opt=open, BinningValue value=binX, const Transform3 &tForm=Transform3::Identity()) | |
BinUtility (std::vector< float > &bValues, BinningOption opt=open, BinningValue value=binPhi, const Transform3 &tForm=Transform3::Identity()) | |
BinUtility (const BinUtility &sbu)=default | |
BinUtility (BinUtility &&sbu)=default | |
BinUtility & | operator= (const BinUtility &sbu) |
BinUtility & | operator= (BinUtility &&)=default |
BinUtility & | operator+= (const BinUtility &gbu) |
~BinUtility ()=default | |
Virtual Destructor. | |
bool | operator== (const BinUtility &other) const |
Equality operator. | |
const std::vector< BinningData > & | binningData () const |
Return the binning data vector. | |
size_t | bins () const |
Return the total number of bins. | |
std::array< size_t, 3 > | binTriple (const Vector3 &position) const |
size_t | bin (const Vector3 &position, size_t ba=0) const |
int | nextDirection (const Vector3 &position, const Vector3 &direction, size_t ba=0) const |
size_t | bin (const Vector2 &lposition, size_t ba=0) const |
bool | inside (const Vector3 &position) const |
bool | inside (const Vector2 &lposition) const |
size_t | dimensions () const |
size_t | max (size_t ba=0) const |
size_t | bins (size_t ba) const |
const Transform3 & | transform () const |
BinningValue | binningValue (size_t ba=0) const |
size_t | serialize (const std::array< size_t, 3 > &bin) const |
std::ostream & | toStream (std::ostream &sl, const std::string &indent="") const |
std::string | toString (const std::string &indent="") const |
Private Attributes | |
std::vector< BinningData > | m_binningData |
Transform3 | m_transform |
vector of BinningData | |
Transform3 | m_itransform |
shared transform | |
The BinUtility class that translated global and local position into a bins of a BinnedArray, most performant is equidistant binning without a transform, however, optionally a transform can be provided, e.g. for binning on shifted object, the transform is usually shared with the geometric object the Array is defined on, for performance reasons, also the inverse transform is stored.
Definition at line 36 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 36 of file BinUtility.hpp
|
inline |
Constructor for equidistant.
Definition at line 39 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 39 of file BinUtility.hpp
References m_binningData.
|
inline |
Constructor with only a Transform3
tForm | is the local to global transform |
Definition at line 49 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 49 of file BinUtility.hpp
References m_binningData.
|
inline |
Constructor from BinningData directly
bData | is the provided binning data |
tForm | is the (optional) transform |
Definition at line 58 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 58 of file BinUtility.hpp
References m_binningData.
|
inline |
Constructor for equidistant
bins | is the number of bins |
min | in the minimal value |
max | is the maximal value |
opt | is the binning option : open, closed |
value | is the binninb value : binX, binY, binZ, etc. |
tForm | is the (optional) transform |
Definition at line 73 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 73 of file BinUtility.hpp
References m_binningData, and value.
|
inline |
Constructor for arbitrary
bValues | is the boundary values of the binning |
opt | is the binning option : open, closed |
value | is the binninb value : binX, binY, binZ, etc. |
tForm | is the (optional) transform |
Definition at line 87 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 87 of file BinUtility.hpp
References m_binningData, and value.
|
default |
Copy constructor
sbu | is the source bin utility |
|
default |
|
default |
Virtual Destructor.
|
inline |
Bin from a 3D vector (already in binning frame)
position | is the 3D position to be evaluated |
ba | is the bin dimension |
Definition at line 172 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 172 of file BinUtility.hpp
References m_binningData, and m_itransform.
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), main(), pybook(), pydump(), pyfact(), pyfill(), pyhist(), pynull(), pyoper(), pyplot(), and ActsFatras::Channelizer::segments().
|
inline |
Bin from a 2D vector (following local parameters defintitions)
You need to make sure that the local position is actually in the binning frame of the BinUtility
lposition | is the local position to be set |
ba | is the bin dimension |
Definition at line 208 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 208 of file BinUtility.hpp
References m_binningData.
|
inline |
Return the binning data vector.
Definition at line 141 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 141 of file BinUtility.hpp
References m_binningData.
Referenced by Acts::adjustBinUtility(), BOOST_AUTO_TEST_CASE(), Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::createGrid2D(), Acts::createGrid3D(), Acts::isEqual(), ActsExamples::DigitizationAlgorithm::localParameters(), operator+=(), operator==(), ActsFatras::Channelizer::segments(), ActsExamples::ModuleClusters::squash(), Acts::to_json(), and ActsExamples::RootMaterialWriter::writeMaterial().
|
inline |
The type/value of the binning
ba | is the binaccessor |
Definition at line 284 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 284 of file BinUtility.hpp
References m_binningData.
|
inline |
Return the total number of bins.
Definition at line 144 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 144 of file BinUtility.hpp
References bins().
Referenced by Acts::AccumulatedSurfaceMaterial::AccumulatedSurfaceMaterial(), bins(), Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::from_json(), max(), and ActsExamples::RootMaterialWriter::writeMaterial().
|
inline |
Number of bins
ba | is the binaccessor |
Definition at line 267 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 267 of file BinUtility.hpp
References bins(), and m_binningData.
|
inline |
Bin-triple fast access
position | is the 3D position to be evaluated |
transform or not
now get the bins
return the triple
Definition at line 153 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 153 of file BinUtility.hpp
References m_binningData, m_itransform, and position.
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().
|
inline |
First bin maximal value
Definition at line 248 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 248 of file BinUtility.hpp
References m_binningData.
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), Acts::VolumeMaterialMapper::checkAndInsert(), Acts::from_json(), and ActsFatras::Channelizer::segments().
|
inline |
Check if bin is inside from Vector2 - optional transform applied
position | is the global position to be evaluated |
transform or not
Definition at line 218 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 218 of file BinUtility.hpp
References Acts::BinningData::inside(), m_binningData, m_itransform, and position.
|
inline |
Check if bin is inside from Vector2 - no optional transform applied
lposition | is the local position to be evaluated |
Definition at line 235 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 235 of file BinUtility.hpp
References m_binningData.
|
inline |
First bin maximal value
ba | is the binaccessor |
Definition at line 255 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 255 of file BinUtility.hpp
References bins(), and m_binningData.
Referenced by Acts::InterpolatedMaterialMap< Mapper_t >::toStream().
|
inline |
Return the other direction for fast interlinking
position | is the global position for the next search |
direction | is the global position for the next search |
ba | is the bin accessor |
Definition at line 189 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 189 of file BinUtility.hpp
References m_binningData.
Referenced by Acts::Layer::nextLayer().
|
inline |
Operator+= to make multidimensional BinUtility
gbu | is the additional BinUtility to be chosen |
Definition at line 119 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 119 of file BinUtility.hpp
References binningData(), m_binningData, m_itransform, m_transform, and transform().
|
inline |
Assignment operator
sbu | is the source bin utility |
Definition at line 105 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 105 of file BinUtility.hpp
References m_binningData, m_itransform, and m_transform.
|
default |
|
inline |
Equality operator.
Definition at line 135 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 135 of file BinUtility.hpp
References binningData(), m_binningData, and m_transform.
|
inline |
Serialize the bin triple
bin | is the bin to be serialized |
Definition at line 295 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 295 of file BinUtility.hpp
References m_binningData.
|
inline |
Output Method for std::ostream, to be overloaded by child classes
sl | is the ostream to be dumped into |
indent | the current indentation |
Definition at line 312 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 312 of file BinUtility.hpp
References Acts::enumerate(), and m_binningData.
Referenced by Acts::operator<<(), and toString().
|
inline |
Output into a string
indent | the current indentation |
Definition at line 328 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 328 of file BinUtility.hpp
References toStream().
|
inline |
Transform applied to global positions before lookup
Definition at line 277 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 277 of file BinUtility.hpp
References m_transform.
Referenced by Acts::createGrid2D(), Acts::createGrid3D(), operator+=(), and Acts::to_json().
|
private |
Definition at line 335 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 335 of file BinUtility.hpp
Referenced by bin(), binningData(), binningValue(), bins(), binTriple(), BinUtility(), dimensions(), inside(), max(), nextDirection(), operator+=(), operator=(), operator==(), serialize(), and toStream().
|
private |
shared transform
Definition at line 337 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 337 of file BinUtility.hpp
Referenced by bin(), binTriple(), inside(), operator+=(), and operator=().
|
private |
vector of BinningData
Definition at line 336 of file BinUtility.hpp.
View newest version in sPHENIX GitHub at line 336 of file BinUtility.hpp
Referenced by operator+=(), operator=(), operator==(), and transform().