6#include <TLorentzVector.h>
10namespace HLT {
namespace MET {
18 m_p4(tlv.Px(), tlv.Py(), tlv.Pz(), tlv.E() )
23 particle.e(), particle.
eta(), particle.
phi(), particle.m() ) )
37 int sgn = (
p > 0) - (
p < 0);
38 p = sgn * sqrt(
p*
p - mass*mass);
40 double pt =
p/std::cosh(
eta);
53 double et,
double eta,
double phi,
double mass)
67 double val =
m_p4.Phi();
70 return TVector2::Phi_0_2pi(val);
77 return (thePt == 0 ? 0 :
py() / thePt );
83 return (thePt == 0 ? 1 :
px() / thePt );
90 return (thePt == 0 ? 0 :
pz() / thePt );
93 double thePt2 =
pt2();
100 return sqrt(1 +
pz()*
pz() / thePt2);
163 SignedKinematics::operator ROOT::Math::PxPyPzEVector()
const {
169 m_p4.SetPx(
px()+other.px() );
170 m_p4.SetPy(
py()+other.py() );
171 m_p4.SetPz(
pz()+other.pz() );
177 m_p4.SetPx(
px()-other.px() );
178 m_p4.SetPy(
py()-other.py() );
179 m_p4.SetPz(
pz()-other.pz() );
Class to describe the kinematics of an object that can have negative energies.
double et() const
(signed) et
static SignedKinematics fromEtEtaPhi(double et, double eta, double phi)
Factory function to construct from et, eta, phi (massless)
double sinPhi() const
Provide accessors for sin and cos phi.
double eta() const
Direction.
double sinhEta() const
Provide accessors for sinh and cosh eta.
SignedKinematics & operator+=(const SignedKinematics &other)
Add another SignedKinematics to this.
double m2() const
The squared mass. There is no guarantee that this will be > 0.
double absP() const
unsigned momentum
double p() const
Momentum values (signed) momentum.
double absPt() const
unsigned pt
SignedKinematics & operator-=(const SignedKinematics &other)
Subtract a SignedKinematics from this (exact opposite of the above function.
double absEnergy() const
unsigned energy
static SignedKinematics fromEnergyEtaPhi(double energy, double eta, double phi)
Factory function to construct from energy, eta, phi (massless)
static SignedKinematics fromEtEtaPhiM(double et, double eta, double phi, double mass)
Factory function to construct from et eta, phi and m.
double energy() const
Energy values (signed) energy.
double absEt() const
Unsigned et.
ROOT::Math::PxPyPzEVector m_p4
The actual kinematics.
static SignedKinematics fromEnergyEtaPhiM(double energy, double eta, double phi, double mass)
Factory function to construct from energy eta, phi and m.
int sign() const
The sign of the kinematics.
double pt() const
(signed) pt
Class providing the definition of the 4-vector interface.
METComponent operator+(const METComponent &lhs, const METComponent &rhs)
PufitGrid operator-(const PufitGrid &lhs, const PufitGrid &rhs)
Elementwise subtraction.
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...