29 ATH_MSG_ERROR(
"JetOriginCorrectionTool needs to have its input jet container configured!");
30 return StatusCode::FAILURE;
45 return StatusCode::SUCCESS;
64 if (!handle.isValid()){
67 <<
": filling jet with -1");
70 scaleMomentumPtHandle(*j) = -1;
71 scaleMomentumPhiHandle(*j) = -1;
72 scaleMomentumEtaHandle(*j) = -1;
73 scaleMomentumMHandle(*j) = -1;
75 return StatusCode::SUCCESS;
78 const auto *vxContainer = handle.cptr();
92 if (!eInfo.isValid()){
95 }
else if (PVIndexAccessor.
isAvailable(*(eInfo.cptr()))) {
96 PVindex = PVIndexAccessor(*(eInfo.cptr()));
99 if (PVindex < 0 ||
static_cast<size_t>(PVindex) >= vxContainer->size()){
101 << PVindex <<
" is out of bounds. Filling jet with -1"
105 scaleMomentumPtHandle(*j) = -1;
106 scaleMomentumPhiHandle(*j) = -1;
107 scaleMomentumEtaHandle(*j) = -1;
108 scaleMomentumMHandle(*j) = -1;
110 return StatusCode::SUCCESS;
129 scaleMomentumPtHandle(*
jet) = fv.pt();
130 scaleMomentumPhiHandle(*
jet) = fv.phi();
131 scaleMomentumEtaHandle(*
jet) = fv.eta();
132 scaleMomentumMHandle(*
jet) = fv.M();
137 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Helpers to calculate corrected 4-vectors w.r.t to a given orign.
ElementLink implementation for ROOT usage.
SG::ConstAccessor< T, ALLOC > ConstAccessor
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
Handle class for adding a decoration to an object.
State
enum of possible signal states.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
xAOD::JetFourMom_t clusterOriginCorrection(const xAOD::Jet &jet, const xAOD::Vertex &vx)
returns 4-vector of the jet relative to the vertex
Jet_v1 Jet
Definition of the current "jet version".
Vertex_v1 Vertex
Define the latest version of the vertex class.
JetContainer_v1 JetContainer
Definition of the current "jet container version".
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.