|
ATLAS Offline Software
|
Go to the documentation of this file.
18 :
asg::AsgTool(myname) {
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;
State
enum of possible signal states.
Helper class to provide constant type-safe access to aux data.
const std::string & key() const
Return the StoreGate ID for the referenced object.
xAOD::JetFourMom_t clusterOriginCorrection(const xAOD::Jet &jet, const xAOD::Vertex &vx)
returns 4-vector of the jet relative to the vertex
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Helpers to calculate corrected 4-vectors w.r.t to a given orign.
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
ElementLink implementation for ROOT usage.
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
Class describing a Vertex.
#define ATH_MSG_WARNING(x)
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.