ATLAS Offline Software
Loading...
Searching...
No Matches
LorentzHelper.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
7
9
11
12#include "Math/Vector4D.h"
18
19ROOT::Math::PxPyPzMVector GetPxPyPzMfromTruth(
21 ROOT::Math::PxPyPzMVector MassSafeVector(
25 TruthParticle->m());
26 return MassSafeVector;
27}
28
29ROOT::Math::PtEtaPhiMVector GetPtEtaPhiMfromTruth(
31 ROOT::Math::PtEtaPhiMVector MassSafeVector(
35 TruthParticle->m());
36 return MassSafeVector;
37}
38
39ROOT::Math::PtEtaPhiEVector GetPtEtaPhiEfromTruth(
41 asg::msgUserCode::ANA_MSG_WARNING(
42 "LorentzHelper WARNING: We can't guarantee the mass from this 4-vector "
43 "is correct, consider using GetPtEtaPhiMfromTruth");
44 ROOT::Math::PtEtaPhiEVector EnergySafeVector(
48 TruthParticle->e());
49 return EnergySafeVector;
50}
51
52ROOT::Math::PxPyPzEVector GetPxPyPzEfromTruth(
54 asg::msgUserCode::ANA_MSG_WARNING(
55 "LorentzHelper WARNING: We can't guarantee the mass from this 4-vector "
56 "is correct, consider using GetPxPyPzMfromTruth");
57 ROOT::Math::PxPyPzEVector EnergySafeVector(
61 TruthParticle->e());
62 return EnergySafeVector;
63}
macros for messaging and checking status codes
ROOT::Math::PxPyPzEVector GetPxPyPzEfromTruth(const xAOD::TruthParticle *TruthParticle)
ROOT::Math::PtEtaPhiEVector GetPtEtaPhiEfromTruth(const xAOD::TruthParticle *TruthParticle)
ROOT::Math::PtEtaPhiMVector GetPtEtaPhiMfromTruth(const xAOD::TruthParticle *TruthParticle)
ROOT::Math::PxPyPzMVector GetPxPyPzMfromTruth(const xAOD::TruthParticle *TruthParticle)
virtual double m() const
mass
virtual double pz() const
z component of momentum
virtual double e() const
energy
virtual double pt() const
transverse momentum
virtual double phi() const
phi in [-pi,pi[
virtual double px() const
x component of momentum
virtual double eta() const
pseudo rapidity
virtual double py() const
y component of momentum
TruthParticle_v1 TruthParticle
Typedef to implementation.