ATLAS Offline Software
Loading...
Searching...
No Matches
columnar::Detail::FullMomentumAccessorsPtEtaPhiM< CoreAccessors > Class Template Reference

generic columnar momentum accessors that use a pt, eta, phi, m representation underneath More...

#include <MomentumAccessors.h>

Inheritance diagram for columnar::Detail::FullMomentumAccessorsPtEtaPhiM< CoreAccessors >:
Collaboration diagram for columnar::Detail::FullMomentumAccessorsPtEtaPhiM< CoreAccessors >:

Public Types

using CI = CoreAccessors::CI
using CM = typename CoreAccessors::CM

Public Member Functions

double e (ObjectId< CI, CM > object) const
double rapidity (ObjectId< CI, CM > object) const

Detailed Description

template<typename CoreAccessors>
class columnar::Detail::FullMomentumAccessorsPtEtaPhiM< CoreAccessors >

generic columnar momentum accessors that use a pt, eta, phi, m representation underneath

This takes a template parameter for the implementation of a class that provides the accessors for pt, eta, phi, and m. That then allows to specialize it for different particle types which may have different implementations of the pt, eta, phi, and m accessors. Particularly m is different for each particle, but some particles may also vary other implementations, e.g. calorimeter eta for electrons and photons, or dressed properties for jets.

Definition at line 124 of file MomentumAccessors.h.

Member Typedef Documentation

◆ CI

template<typename CoreAccessors>
using columnar::Detail::FullMomentumAccessorsPtEtaPhiM< CoreAccessors >::CI = CoreAccessors::CI

Definition at line 127 of file MomentumAccessors.h.

◆ CM

template<typename CoreAccessors>
using columnar::Detail::FullMomentumAccessorsPtEtaPhiM< CoreAccessors >::CM = typename CoreAccessors::CM

Definition at line 128 of file MomentumAccessors.h.

Member Function Documentation

◆ e()

template<typename CoreAccessors>
double columnar::Detail::FullMomentumAccessorsPtEtaPhiM< CoreAccessors >::e ( ObjectId< CI, CM > object) const
inline

Definition at line 132 of file MomentumAccessors.h.

133 {
134 const double myPt = this->pt (object);
135 const double myEta = this->eta (object);
136 const double myM = this->m (object);
137
138 // not reading phi, not part of the energy calculation
140 return myP4.energy();
141 }
Scalar eta() const
pseudorapidity method
generic columnar momentum accessors that use a pt, eta, phi, m representation underneath

◆ rapidity()

template<typename CoreAccessors>
double columnar::Detail::FullMomentumAccessorsPtEtaPhiM< CoreAccessors >::rapidity ( ObjectId< CI, CM > object) const
inline

Definition at line 143 of file MomentumAccessors.h.

144 {
145 const double myEta = this->eta(object);
146 const double myM = this->m(object);
147 if (myM == 0)
148 return myEta; // for massless particles, rapidity is the same as eta
149 const double myPt = this->pt(object);
150
151 // not reading phi, not part of the rapidity calculation
153 return myP4.Rapidity();
154 }

The documentation for this class was generated from the following file: