|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef PROMPT_PROMPTUTILS_H
6 #define PROMPT_PROMPTUTILS_H
25 #include "GaudiKernel/MsgStream.h"
30 #include "TStopwatch.h"
56 struct SortByIDTrackPt
65 std::cerr <<
"getVar - received a null object" << std::endl;
74 if(!
acc.isAvailable(*
obj)) {
90 if(!
acc.isAvailable(
obj)) {
101 class TimerScopeHelper
120 template<
class T>
bool operator()(
const T &lhs,
const T &rhs)
122 double val_rhs = 0.0;
123 double val_lhs = 0.0;
125 if(!lhs.getVar(
m_var, val_lhs) || !rhs.getVar(
m_var, val_rhs)) {
126 m_msg << MSG::WARNING <<
"SortObjectByVar - missing var" << std::endl;
130 return val_lhs > val_rhs;
133 return val_lhs < val_rhs;
147 #endif //PROMPT_PROMPTUTILS_H
TimerScopeHelper(TStopwatch &timer)
virtual double pt() const override final
The transverse momentum ( ) of the particle.
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
bool GetAuxVar(const T1 &obj, T2 &value, const std::string &var_name)
double getVertexFitProb(const xAOD::Vertex *vtx)
Helper class to provide type-safe access to aux data.
bool getVar(T1 &obj, T2 &value, const std::string &var_name)
std::string trkAsStr(const xAOD::TrackParticle *trk)
std::string vtxAsStr(const xAOD::Vertex *vtx, bool print_tracks=false)
Class providing the definition of the 4-vector interface.
std::string PrintResetStopWatch(TStopwatch &watch)
def timer(name, disabled=False)
bool operator()(const T &lhs, const T &rhs)
double getNormDist(const Amg::Vector3D &PrimVtx, const Amg::Vector3D &SecVtx, const std::vector< float > &ErrorMatrix, MsgStream &msg)
double getDistance(const xAOD::Vertex *vtx1, const xAOD::Vertex *vtx2)
@ SecVtx
Secondary vertex.
CalibratedSpacePoint::Covariance_t inverse(const CalibratedSpacePoint::Covariance_t &mat)
Inverts the parsed matrix.
std::string printPromptVertexAsStr(const xAOD::Vertex *vtx, MsgStream &msg)
std::string truthAsStr(const xAOD::IParticle &particle)
Eigen::Matrix< double, 3, 1 > Vector3D
Class describing a Vertex.
void fillTH1(TH1 *h, double val, double weight=1.0)
Class describing a TrackParticle.
bool operator()(const xAOD::TrackParticle *lhs, const xAOD::TrackParticle *rhs)
Base class for elements of a container that can have aux data.