27 return StatusCode::SUCCESS;
36 return StatusCode::FAILURE;
41 ATH_MSG_FATAL(
"Could not retrieve xAOD::EventShape::Density from xAOD::EventShape "<<
m_rhoKey.key());
42 return StatusCode::FAILURE;
53 jet->setJetP4(jetStartP4);
61 calibP4 = jetStartP4 - rho*jetareaP4;
63 ATH_MSG_VERBOSE(
" Applying postive-only area-subtraction calibration to jet " <<
jet->index() <<
" with pT = " << 0.001*
jet->pt() <<
" GeV");
64 const double pT_det = jetStartP4.pt();
65 const double E_det = jetStartP4.e();
67 const double area_SF = (pT_det-rho*jetareaP4.pt()<=0 || E_det-rho*jetareaP4.e()<=0) ? 10/pT_det : (pT_det-rho*jetareaP4.pt())/pT_det;
68 calibP4 = jetStartP4*area_SF;
72 puCorrectedAcc(*
jet) = 1 ;
75 jet->setJetP4( calibP4 );
77 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
This header defines wrapper classes around SG::AuxElement::Accessor used internally in the Jet EDM.
PileupAreaCalibStep(const std::string &name="PileupAreaCalibStep")
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
virtual StatusCode calibrate(xAOD::JetContainer &jetCont) const override
Apply calibration to a jet container.
SG::ReadHandleKey< xAOD::EventShape > m_rhoKey
Gaudi::Property< std::string > m_jetInScale
Gaudi::Property< bool > m_useFull4vectorArea
Gaudi::Property< std::string > m_jetOutScale
SG::Accessor< T, ALLOC > Accessor
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
bool getDensity(EventDensityID id, double &v) const
Get a density variable from the object.
void getAttribute(const SG::AuxElement &p, TYPE &v) const
void setAttribute(SG::AuxElement &p, const TYPE &v) const
Jet_v1 Jet
Definition of the current "jet version".
EventShape_v1 EventShape
Definition of the current event format version.
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.