|
| MomentumAccessors () noexcept |
|
template<typename MyMomentumAccessors , typename... Args> |
| MomentumAccessors (std::in_place_type_t< MyMomentumAccessors >, Args &&... args) |
|
template<typename MyMomentumAccessors , typename... Args> |
void | reset (std::in_place_type_t< MyMomentumAccessors >, Args &&... args) |
|
double | pt (ObjectId< CI, CM > object) const |
| the various momentum accessors More...
|
|
double | eta (ObjectId< CI, CM > object) const |
|
double | phi (ObjectId< CI, CM > object) const |
|
double | m (ObjectId< CI, CM > object) const |
|
double | e (ObjectId< CI, CM > object) const |
|
double | rapidity (ObjectId< CI, CM > object) const |
|
template<ContainerIdConcept CI, typename CM = ColumnarModeDefault>
class columnar::MomentumAccessors< CI, CM >
a handle to hold a IMomentumAccessors object
In principle the user could also hold a (smart) pointer to the underlying IMomentumAccessors
, but having it in a class like this allows some refactoring in the future. Currently the expectation is that momentum accessors will not be widely used, but if it is I can then refactor this class without affecting the users.
The implementation of this is essentially this is a variation on a type-erased interface. There are a number of variations and optimizations that could be done here. Most notably if one tried hard enough one could probably avoid the ContainerId
template parameter for the virtual interface, which would cut down on the code bloat. However that would need some infrastructure support which is not available (as of 24 Jul 25).
I'm not quite clear whether it would be a good idea to hide the underlying momentum accessors
Note that this is also always guaranteed to be valid, defaulting to the IParticle
implementation (which is not available in columnar mode).
Definition at line 289 of file MomentumAccessors.h.