ATLAS Offline Software
Loading...
Searching...
No Matches
PileupCalibStep.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef JETCALIBTOOLS_PILEUPCALIBSTEP_H
6#define JETCALIBTOOLS_PILEUPCALIBSTEP_H 1
7
8/* PileupAreaResidualCalibStep performs the first step of the jet calibration
9 *
10 * - area subtraction in the form pT_corr = pT - rho x pT_area
11 * - residual correction (1D version)
12 *
13 */
14
18
19#include "AsgTools/AsgTool.h"
20#include "AsgTools/ToolHandle.h"
26
28 virtual public IJetCalibStep
29{
30
32
33 public:
34 PileupCalibStep(const std::string& name="PileupCalibStep");
35
36 virtual StatusCode initialize() override;
37
38 // Apply calibration to jet
39 virtual StatusCode calibrate(xAOD::JetContainer& jetCont) const override;
40
41 private:
42
43 double getResidualOffset(const xAOD::Jet& jet, const JetHelper::JetContext& jc, double mu, double NPV) const;
44
45 Gaudi::Property<bool> m_isData{this, "IsData", false, ""};
46 Gaudi::Property<bool> m_doJetArea{this, "DoJetArea", false, "should the area correction be applied?"};
47 Gaudi::Property<bool> m_doResidual{this, "DoResidual", true, "should the residual correction be applied?"};
48
49 Gaudi::Property<bool> m_doSequentialResidual{this, "DoSequentialResidual", false, "apply residual correction sequentially"};
50 Gaudi::Property<bool> m_doMuOnly{this, "ApplyOnlyMuResidual", false, "only mu residual correction will be applied"};
51 Gaudi::Property<bool> m_doNPVOnly{this, "ApplyOnlyNPVResidual", false, "only NPV residual correction will be applied"};
52
55 SG::ReadHandleKey<xAOD::VertexContainer> m_pvKey{this, "VertexContainer", "PrimaryVertices"};
56 SG::ReadDecorHandleKey<xAOD::EventInfo> m_muKey {this, "averageInteractionsPerCrossingKey",
57 "EventInfo.averageInteractionsPerCrossing","Decoration for Average Interaction Per Crossing"};
58
60 ToolHandle<JetHelper::IVarTool> m_histTool_mu = {this , "histTool_mu", "HistoInput1D", "mu histo reader" };
61 ToolHandle<JetHelper::IVarTool> m_histTool_NPV = {this , "histTool_NPV", "HistoInput1D", "npv histo reader" };
62
64 Gaudi::Property<float> m_NPV_ref{this , "DefaultNPVRef", -99., ""};
65 Gaudi::Property<float> m_mu_ref{this , "DefaultMuRef", -99., ""};
66 Gaudi::Property<float> m_muSF{this , "MuScaleFactor", 1., ""};
67
69 Gaudi::Property<std::string> m_jetInScale {this, "InScale", "JetConstitScaleMomentum", "Starting jet scale" };
70 Gaudi::Property<std::string> m_jetOutScale {this, "OutScale", "JetPileupScaleMomentum", "Ending jet scale" };
71 Gaudi::Property<std::string> m_jetAreaOutScale {this, "OutScaleJetArea", "JetRhoAreaScaleMomentum", "Intermediate jet scale"};
72
73 static constexpr float m_GeV = 1000;
74
75};
76
77#endif
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
Class JetContext Designed to read AOD information related to the event, N vertices,...
Definition JetContext.h:27
Gaudi::Property< float > m_muSF
static constexpr float m_GeV
Gaudi::Property< float > m_mu_ref
virtual StatusCode calibrate(xAOD::JetContainer &jetCont) const override
Apply calibration to a jet container.
PileupCalibStep(const std::string &name="PileupCalibStep")
Gaudi::Property< std::string > m_jetOutScale
Gaudi::Property< bool > m_doMuOnly
Gaudi::Property< bool > m_doJetArea
Gaudi::Property< bool > m_doNPVOnly
ToolHandle< JetHelper::IVarTool > m_histTool_mu
Histograms with PU residual correction factors.
Gaudi::Property< std::string > m_jetInScale
In and out scales.
Gaudi::Property< std::string > m_jetAreaOutScale
double getResidualOffset(const xAOD::Jet &jet, const JetHelper::JetContext &jc, double mu, double NPV) const
Gaudi::Property< float > m_NPV_ref
Properties.
Gaudi::Property< bool > m_isData
Gaudi::Property< bool > m_doSequentialResidual
Gaudi::Property< bool > m_doResidual
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
SG::ReadHandleKey< xAOD::EventShape > m_rhoKey
Event properties.
SG::ReadHandleKey< xAOD::VertexContainer > m_pvKey
ToolHandle< JetHelper::IVarTool > m_histTool_NPV
SG::ReadDecorHandleKey< xAOD::EventInfo > m_muKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
Jet_v1 Jet
Definition of the current "jet version".
JetContainer_v1 JetContainer
Definition of the current "jet container version".