29 ATH_MSG_WARNING(
"InSituCalibStep::calibrate : Running over MC, will not calibrate unless expert option CalibrateMC is set to true");
35 return StatusCode::FAILURE;
37 return StatusCode::SUCCESS;
46 unsigned int rNumber = 0;
48 return StatusCode::FAILURE;
50 return StatusCode::SUCCESS;
51 unsigned int runNumber =
static_cast<unsigned int>(rNumber+0.5);
53 unsigned int periodInd = 9999;
57 if (firstRun<=runNumber && runNumber <= lastRun ){
68 return StatusCode::SUCCESS;
73 jet->setJetP4(jetStartP4);
78 double correction = c_rel/R_abs;
81 calibP4 = calibP4 * correction;
84 jet->setJetP4(calibP4);
86 return StatusCode::SUCCESS;
92 static std::atomic<unsigned int> eventInfoWarnings = 0;
95 eventObj = rhEvtInfo.
cptr();
99 if ( eventInfoWarnings < 20 )
100 ATH_MSG_ERROR(
" InSituCalibStep::calibrate : Failed to retrieve event information.");
101 return StatusCode::SUCCESS;
103 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
ToolHandleArray< JetHelper::IVarTool > m_histTool_Abs
Gaudi::Property< std::string > m_jetInScale
Gaudi::Property< bool > m_CalibrateMC
StatusCode retrieveEventInfo(unsigned int &r) const
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
virtual StatusCode calibrate(xAOD::JetContainer &) const override
Apply calibration to a jet container.
Gaudi::Property< std::string > m_jetOutScale
ToolHandleArray< JetHelper::IVarTool > m_histTool_EtaInter
SG::ReadHandleKey< xAOD::EventInfo > m_evtInfoKey
InSituCalibStep(const std::string &name="InSituCalibStep")
Constructor with parameters:
Gaudi::Property< std::vector< unsigned int > > m_RunNumBoundaries
Gaudi::Property< bool > m_isMC
Class JetContext Designed to read AOD information related to the event, N vertices,...
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
uint32_t runNumber() const
The current event's run number.
Jet_v1 Jet
Definition of the current "jet version".
EventInfo_v1 EventInfo
Definition of the latest event info 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.