52#ifndef XAOD_BPHYSHELPER_H
53#define XAOD_BPHYSHELPER_H
63#include "TLorentzVector.h"
64#include "TMatrixTSym.h"
150 const std::vector<TVector3>&
refTrks();
158 TLorentzVector
refTrk(
const size_t index,
const float mass);
236 std::vector<float>
py,
237 std::vector<float> pz);
295 TLorentzVector
totalP(std::span<const double> masses);
342 const std::vector<const xAOD::Muon*>&
muons();
343 const std::vector<const xAOD::Electron*>&
electrons();
738#define BPHYS_CHECK( EXP ) { if( ! EXP ) ATH_MSG_WARNING ( "Call of \"" << #EXP << "\" failed" ); }
xAOD::ElectronContainer * electronContainer
xAOD::MuonContainer * muonContainer
static const std::vector< const xAOD::Electron * > s_emptyVectorOfElectrons
bool setPtErr(const float val)
Set pT error.
int nMuons()
: Methods providing access to the linked muons
const std::vector< const xAOD::Muon * > & muons()
Returns linked muons.
bool cacheCascadeVertices()
: Cache cascade vertices
bool setElectrons(const std::vector< const xAOD::Electron * > &electrons, const xAOD::ElectronContainer *electronContainer)
float lxyzErr(const pv_type vertexType=BPhysHelper::PV_MIN_A0)
its error
float refTrkCharge(const size_t index) const
Returns charge of the i-th track.
float setZ0(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
longitudinal impact parameter
int nCascadeVertices()
: Links to cascade vertices
const xAOD::Vertex * origPv(const pv_type vertexType=BPhysHelper::PV_MIN_A0)
original PV
const xAOD::Vertex * cascadeVertex(const size_t index)
Returns pointer to a cascade vertex.
std::vector< const xAOD::Vertex * > m_cachedCascadeVertices
float z0(const pv_type vertexType=BPhysHelper::PV_MIN_A0)
longitudinal impact parameter
const xAOD::Vertex * m_b
Cached B decay xAOD vertex.
float lxyz(const pv_type vertexType=BPhysHelper::PV_MIN_A0)
decay distance
float a0xyErr(const pv_type vertexType=BPhysHelper::PV_MIN_A0)
rtansverse impact parameter error
bool cacheMuons()
: Cache linked muons
bool setLxyErr(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
its error
const TMatrixTSym< double > & covariance()
: Returns full covariance matrix
const std::vector< const xAOD::Vertex * > & precedingVertices()
Returns vector of pointers to preceding vertices.
bool setRefTrks()
: Sets refitted track momenta
bool setLxy(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
Set the transverse decay distance and its error measured between the refitted primary vertex of type ...
float lxy(const pv_type vertexType=BPhysHelper::PV_MIN_A0)
Get the transverse decay distance and its error measured between the refitted primary vertex of type ...
bool m_cascadeVerticesCached
static const std::vector< const xAOD::Muon * > s_emptyVectorOfMuons
static const unsigned int n_pv_types
TMatrixTSym< double > m_cachedCov
bool cacheRefTracks()
: Cache refitted tracks
static const std::vector< const xAOD::Vertex * > s_emptyVectorOfVertices
bool setMuons(const std::vector< const xAOD::Muon * > &muons, const xAOD::MuonContainer *muonContainer)
Set links to muons.
const xAOD::Vertex * precedingVertex(const size_t index)
Returns pointer to a preceding vertex.
std::vector< const xAOD::Electron * > m_cachedElectrons
float setZ0Err(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
longitudinal impact parameter error
const xAOD::Vertex * vtx() const
Getter method for the cached xAOD::Vertex.
const std::vector< const xAOD::Electron * > & electrons()
bool cachePrecedingVertices()
: Cache preceding vertices
static const std::string pv_type_str[]
static const TMatrixTSym< double > s_emptyMatrix
bool setPrecedingVertices(const std::vector< const xAOD::Vertex * > &vertices, const xAOD::VertexContainer *vertexContainer)
Sets links to preceding vertices.
float setA0(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
Set the 3D and transverse impact parameters and their error.
const std::vector< TVector3 > & refTrks()
Returns refitted track momenta.
bool setPv(const xAOD::Vertex *pv, const xAOD::VertexContainer *vertexContainer, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
Set the refitted collision vertex of type pv_type.
float z0Err(const pv_type vertexType=BPhysHelper::PV_MIN_A0)
longitudinal impact parameter error
const xAOD::Vertex * pv(const pv_type vertexType=BPhysHelper::PV_MIN_A0)
Get the refitted collision vertex of type pv_type.
TVector3 refTrk(const size_t index)
Returns i-th refitted track 3-momentum.
bool m_precedingVerticesCached
pv_type
: Enum type of the PV
float a0Err(const pv_type vertexType=BPhysHelper::PV_MIN_A0)
3D impact parameter error
BPhysHelper(const xAOD::Vertex *b)
: Main constructor
float setA0Err(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
3D impact parameter error
bool setCascadeVertices(const std::vector< const xAOD::Vertex * > &vertices, const xAOD::VertexContainer *vertexContainer)
Sets links to cascade vertices.
int nPrecedingVertices()
: Links to preceding vertices
float ptErr()
Returns pT error.
bool cacheCov()
: Cache covariance matrix
bool setRefitPVStatus(int code, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
Set the exitCode of the refitter for vertex of type pv_type.
std::vector< TVector3 > m_cachedRefTracks
const std::vector< const xAOD::Vertex * > & cascadeVertices()
Returns vector of pointers to cascade vertices.
float a0xy(const pv_type vertexType=BPhysHelper::PV_MIN_A0)
transverse impact parameter
TVector3 refTrkOriginP(const size_t index) const
Returns perigee 3-momentum of the original track corresponding i-th refitted track.
std::vector< const xAOD::Vertex * > m_cachedPrecedingVertices
float setA0xyErr(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
transverse impact parameter error
int nRefTrks()
Returns number of stored refitted track momenta.
std::vector< const xAOD::Muon * > m_cachedMuons
float setA0xy(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
transverse impact parameter
TVector3 totalP()
: Returns total 3-momentum calculated from the refitted tracks
int RefitPVStatus(const pv_type vertexType=BPhysHelper::PV_MIN_A0)
Get the exitCode of the refitter for vertex of type pv_type.
const xAOD::IParticle * refTrkOrigin(const size_t index) const
: Returns the original track (charged or neutral) corresponding to the i-th refitted track
int nRefTrksCascade()
Returns number of stored refitted tracks INCLUDING those from the linked cascade vertices.
bool setOrigPv(const xAOD::Vertex *pv, const xAOD::VertexContainer *vertexContainer, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
Set the original collision vertex of type pv_type.
float lxyErr(const pv_type vertexType=BPhysHelper::PV_MIN_A0)
its error
bool setLxyz(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
decay distance
static const std::vector< TVector3 > s_emptyVectorOfTVector3
bool setLxyzErr(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0)
its error
Class providing the definition of the 4-vector interface.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.
Muon_v1 Muon
Reference the current persistent version:
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".
Electron_v1 Electron
Definition of the current "egamma version".