7#ifndef XAODMISSINGET_VERSIONS_MISSINGETBASE_H
8#define XAODMISSINGET_VERSIONS_MISSINGETBASE_H
11#define EXTRACT_PX( _T_, _V_, _P_ ) \
12 _T_ _V_(_P_.p4().Px())
14#define EXTRACT_PY( _T_, _V_, _P_ ) \
15 _T_ _V_(_P_.p4().Py())
17#define EXTRACT_SCALED_PX( _T_, _V_, _P_, _S_ ) \
18 _T_ _V_(_P_.p4().Px()*_S_)
20#define EXTRACT_SCALED_PY( _T_, _V_, _P_, _S_ ) \
21 _T_ _V_(_P_.p4().Py()*_S_)
68 static constexpr double ceError = -9999999;
125 static double divide(
double x,
double y) {
return y != 0. ?
x/
y : 0.; }
381 template <
class E,
class F>
431{
return std::get<0>(l0) == std::get<0>(l1) && std::get<1>(l0) == std::get<1>(l1); }
437{
return std::get<0>(l0) == std::get<0>(l1) ? std::get<1>(l0) >= std::get<1>(l1) : std::get<0>(l0) > std::get<0>(l1); }
440{
return std::get<0>(l0) == std::get<0>(l1) ? std::get<1>(l0) <= std::get<1>(l1) : std::get<0>(l0) < std::get<0>(l1); }
443{
return std::get<0>(l0) == std::get<0>(l1) ? std::get<1>(l0) > std::get<1>(l1) : std::get<0>(l0) > std::get<0>(l1); }
446{
return std::get<0>(l0) == std::get<0>(l1) ? std::get<1>(l0) < std::get<1>(l1) : std::get<0>(l0) < std::get<0>(l1); }
bool operator<=(MissingETBase::Types::indexedlink_t l0, MissingETBase::Types::indexedlink_t l1)
bool operator>(MissingETBase::Types::indexedlink_t l0, MissingETBase::Types::indexedlink_t l1)
bool operator==(MissingETBase::Types::indexedlink_t l0, MissingETBase::Types::indexedlink_t l1)
bool operator<(MissingETBase::Types::indexedlink_t l0, MissingETBase::Types::indexedlink_t l1)
bool operator>=(MissingETBase::Types::indexedlink_t l0, MissingETBase::Types::indexedlink_t l1)
bool operator!=(MissingETBase::Types::indexedlink_t l0, MissingETBase::Types::indexedlink_t l1)
Helpers for treating a class enum as a bitmask.
static const std::string emptyString
Empty string indicator.
static constexpr double sumptError
Error constituent vector .
static const std::string unknownString
Unknown string indicator.
static constexpr double ceDefault
Default constituent vector .
static constexpr double cpxError
Error constituent vector .
static const std::string invalidString
Invalid string indicator.
static const constexpr double cpxDefault
Default constituent vector .
static constexpr double wetError
Error return value for kinematic weight .
static constexpr size_t unknownIndex
Unknown index indicator.
static const constexpr double wpxDefault
Default kinematic weight .
static constexpr double wpxError
Error return value for kinematic weight .
static constexpr double ceError
Error constituent vector .
static constexpr double cpyDefault
Default constituent vector .
static constexpr double wetDefault
Default kinematic weight .
static constexpr double cpyError
Error constituent vector .
static constexpr double sumptDefault
Default constituent sumpt.
static constexpr double wpyError
Error return value for kinematic weight .
static const std::string nullString
NULL string indicator.
static constexpr size_t invalidIndex
Invalid index indicator.
static constexpr double wpyDefault
Default kinematic weight .
static constexpr double precision
Maximum numerical distance up to which two double precision variables are considered to be identical.
static constexpr double cpzError
Error constituent vector .
static constexpr double cpzDefault
Default constituent vector .
uint64_t bitmask_t
Type for status word bit mask.
std::tuple< size_t, size_t > indexedlink_t
Type for links defined as index pairs.
std::vector< bitmask_t > bitmask_vector_t
Type for vector of status word bit masks.
General namespace for MET EDM software.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Numerical constants and operations.
static double sumptDefault()
Access default constituent vector sumpt.
static double cpyError()
Access error return value for constituent vector .
static double precision()
Access precision of numerical distance measure for equality.
static double wpxDefault()
Access default kinematic weight .
static double wpyError()
Access error return value for kinematic weight .
static double wpxError()
Access error return value for kinematic weight .
static double wetDefault()
Access default kinematic weight .
static double cpxError()
Access error return value for constituent vector .
static double cpxDefault()
Access default constituent vector .
static double divide(double x, double y)
Failsafe division.
static double cpzDefault()
Access default constituent vector .
static double cpyDefault()
Access default constituent vector .
static size_t unknownIndex()
Access unknown index indicator.
static double ceError()
Access error return value for constituent vector .
static bool isEqual(double x, double y)
Test of equality.
static size_t invalidIndex()
Access invalid index indicator.
static double cpzError()
Access error return value for constituent vector .
static double sumptError()
Access error return value for constituent vector sumpt.
static double wetError()
Access error return value for kinematic weight .
static double ceDefault()
Access default constituent vector .
static Types::indexedlink_t invalidLink()
Access invaalid link tag.
static double wpyDefault()
Access default kinematic weight .
static bool isTruthNonInt(Types::bitmask_t bits)
static Types::bitmask_t total(Region reg=Region::FullAcceptance)
Standard full reconstructed MET.
static Types::bitmask_t signal(Signal sig=(Signal::LCTopo|Signal::Track), Region reg=Region::FullAcceptance)
Bit mask for MET term from any (or mixed) signal objects.
static Types::bitmask_t caloLCTopo(Region reg=Region::FullAcceptance)
Bit pattern indicating a LCTopo MET term.
static Types::bitmask_t muon(Region reg=Region::FullAcceptance)
Standard MET term from reconstructed muons.
static Types::bitmask_t clusterEM(Region reg=Region::FullAcceptance)
Bit mask for MET term from EMTopo signal objects.
static Types::bitmask_t jet(Region reg=Region::FullAcceptance)
Standard MET term from reconstructed jets.
Category
Source category tag.
@ Calo
Indicator for MET terms reconstructed from calorimeter signals alone.
@ ID
Indicator for MET terms reconstructed from inner detector (ID) tracks alone.
@ UnknownCategory
Indicator for an unknown category.
@ Refined
Indicator for genuine reconstructed MET terms.
static bool isTauTerm(Types::bitmask_t bits, Region reg=Region::FullAcceptance)
static Types::bitmask_t idTrack(Region reg=Region::FullAcceptance)
Bit pattern indicating a ID Track MET term.
static Types::bitmask_t unknown()
static Types::bitmask_t truthInt(Region reg=Region::FullAcceptance)
Standard bit pattern indicating effective true MET.
static bool hasSignal(Types::bitmask_t bits, Signal sig)
static bool isSoftTerm(Types::bitmask_t bits, Region reg=Region::FullAcceptance)
static Types::bitmask_t caloEMTopo(Region reg=Region::FullAcceptance)
Bit pattern indicating a EMTopo MET term.
static bool isElectronTerm(Types::bitmask_t bits, Region reg=Region::FullAcceptance)
static bool hasType(Types::bitmask_t bits, Type type)
static Types::bitmask_t track(Region reg=Region::FullAcceptance)
Bit mask for MET term from Track signal objects.
TruthType
Truth type indicators.
@ Int
Indicator for MET from interacting particles within the nominal acceptance of the detector.
@ TruthMuons
Indicator for muons from MC truth (muons from the interaction)
@ NonInt
Indicator for MET from non-interacting particles generated in the collision.
@ UnknownTruth
Unknown truth type indicator.
@ IntOut
Indicator for MET contributions from particles outside of the acceptance of the detector (typically ...
static bool isTrackTerm(Types::bitmask_t bits, Region reg=Region::FullAcceptance)
static bool hasTruthType(Types::bitmask_t bits, TruthType type)
static Types::bitmask_t tau(Region reg=Region::FullAcceptance)
Standard MET term from reconstructed tau leptons.
static Types::bitmask_t electron(Region reg=Region::FullAcceptance)
Standard MET term from reconstructed electrons.
static Types::bitmask_t cluster(Region reg=Region::FullAcceptance)
Bit mask for MET term from any cluster signal objects.
static Types::bitmask_t softEvent(Region reg=Region::FullAcceptance)
Standard MET term from reconstructed soft event.
static bool isMuonTerm(Types::bitmask_t bits, Region reg=Region::FullAcceptance)
static bool isTruthInt(Types::bitmask_t bits, Region reg=Region::FullAcceptance)
static bool isTruthMuons(Types::bitmask_t bits, Region reg=Region::FullAcceptance)
static Types::bitmask_t photon(Region reg=Region::FullAcceptance)
Standard MET term from reconstructed photons.
@ Central
Indicator for MET contribution from the central region.
@ Forward
Indicator for MET contribution from the forward region.
@ FullAcceptance
Indicator for full detector acceptance contribution.
@ Endcap
Indicator for MET contribution from the endcap region.
@ UnknownRegion
Indicator for unknown region (same as full acceptance contribution)
static Types::bitmask_t truthNonInt()
Standard bit pattern indicating genuine true MET.
Signal
Signal contribution types.
@ LCTopo
Indicator for MET contribution from TopoClusters with LCW calibration applied.
@ Track
Indicator for MET contribution from reconstructed charged particle tracks.
@ EMTopo
Indicator for MET contribution from TopoClusters with EM (basic signal) calibration applied.
@ UnknownSignal
Unknown signal contribution.
static bool hasPattern(E bits, F mask)
Generic check for given pattern.
static Types::bitmask_t truthIntOut()
Standard bit pattern indicating a true MET contribution from particles outside of the detector accep...
static bool hasCategory(Types::bitmask_t bits, Category cat)
Check if bit pattern includes a given category.
static Types::bitmask_t truthMuons(Region reg=Region::FullAcceptance)
Standard bit pattern indicating the true muon contribution to MET truth.
static bool isTotalTerm(Types::bitmask_t bits, Region reg=Region::FullAcceptance)
static bool isJetTerm(Types::bitmask_t bits, Region reg=Region::FullAcceptance)
static bool isPhotonTerm(Types::bitmask_t bits, Region reg=Region::FullAcceptance)
static Types::bitmask_t clusterLC(Region reg=Region::FullAcceptance)
Bit mask for MET term from LCTopo (locally calibrated calorimeter cell clusters) signal objects.
Type
Physics contribution types category.
@ Electron
Indicator for the MET term from reconstructed or MC truth electrons.
@ Jet
Indicator for the MET term from reconstructed or MC truth particle jets.
@ SoftEvent
Indicator for the MET term from reconstructed soft event signals (tracks, clusters) or MC truth parti...
@ UnknownType
Indicator for an unknown MET term source.
@ Total
Indicator for the total reconstructed MET (sum of MET terms from reconstruction and MC truth particle...
@ Photon
Indicator for the MET term from reconstructed or MC truth electrons.
static bool isTruthIntOut(Types::bitmask_t bits)
String constants, tags, and handling.
static const std::string & emptyString()
Access empty string indicator.
static const std::string & unknownString()
Access unknown string indicator.
static const std::string & invalidString()
Access invalid string indicator.
static const std::string & nullString()
Access NULL string indicator.