ATLAS Offline Software
Loading...
Searching...
No Matches
CP::dRJetAxisHandler Class Reference

#include <HistHandler.h>

Inheritance diagram for CP::dRJetAxisHandler:
Collaboration diagram for CP::dRJetAxisHandler:

Public Member Functions

 dRJetAxisHandler (columnar::ColumnarTool<> *parent)
CorrectionCode GetBinningParameter (columnar::MuonId mu, float &value) const override
virtual ~dRJetAxisHandler ()=default

Static Public Member Functions

static void set_close_jet_decorator (const std::string &decor_name)
static void set_use_2D_sf (const bool)

Public Attributes

columnar::MuonAccessor< floatm_acc
columnar::MuonAccessor< floatacc_dR_deriv {*this, "DFCommonJetDr"}

Private Attributes

bool m_use_2D_sf

Static Private Attributes

static std::string s_close_jet_decor ATLAS_THREAD_SAFE
static bool s_use_2D_sf ATLAS_THREAD_SAFE

Detailed Description

Definition at line 232 of file HistHandler.h.

Constructor & Destructor Documentation

◆ dRJetAxisHandler()

CP::dRJetAxisHandler::dRJetAxisHandler ( columnar::ColumnarTool<> * parent)

Definition at line 80 of file HistHandler.cxx.

80 :
81 AxisHandler(parent),
82 m_use_2D_sf(s_use_2D_sf),
83 m_acc(*this,s_close_jet_decor){}
AxisHandler(columnar::ColumnarTool<> *parent)
columnar::MuonAccessor< float > m_acc

◆ ~dRJetAxisHandler()

virtual CP::dRJetAxisHandler::~dRJetAxisHandler ( )
virtualdefault

Member Function Documentation

◆ GetBinningParameter()

CorrectionCode CP::dRJetAxisHandler::GetBinningParameter ( columnar::MuonId mu,
float & value ) const
overridevirtual

Implements CP::AxisHandler.

Definition at line 85 of file HistHandler.cxx.

85 {
86
87 static std::atomic<unsigned int> warned = {0};
88
89 if(!m_use_2D_sf) value = -2.;
90 else if (acc_dR_deriv.isAvailable(mu)){
91 value = acc_dR_deriv(mu);
92 }else if( m_acc.isAvailable(mu) ) {
93 // decoration available in DxAOD
94 value = m_acc(mu);
95 if (warned < 5){
96 Warning("MuonEfficiencyCorrections::dRJetAxisHandler()", "The DFCommonJetDr jet decoration is not available in the derivation will fall back to %s",s_close_jet_decor.c_str());
97 ++warned;
98 }
99 } else {
100 // decoration not available
101 value = -2.;
102 // We want these warnings to be printed few times per job, so that they're visible, then stop before log file's size blows up
103 if (warned<5){
104 Warning("MuonEfficiencyCorrections::dRJetAxisHandler()", "The %s decoration has not been found for the Muon. Isolation scale-factors are now also binned in #Delta R(jet,#mu)", s_close_jet_decor.c_str());
105 Warning("MuonEfficiencyCorrections::dRJetAxisHandler()", "using the closest calibrated AntiKt4EMTopo jet with p_{T}>20~GeV and surving the standard OR criteria.");
106 Warning("MuonEfficiencyCorrections::dRJetAxisHandler()", "You should decorate your muon appropiately before passing to the tool, and use dRJet = -1 in case there is no jet in an event.");
107 Warning("MuonEfficiencyCorrections::dRJetAxisHandler()", "For the time being the inclusive scale-factor is going to be returned.");
108 Warning("MuonEfficiencyCorrections::dRJetAxisHandler()", "In future derivations, muons will also be decorated centrally with DFCommonJetDr, for your benefit.");
109 Warning("MuonEfficiencyCorrections::dRJetAxisHandler()", "You can define custom jet decorations via the 'CloseJetDRDecorator' property of the MuonEfficiencyCorrections tool");
110 ++warned;
111 }
112 }
113 return CorrectionCode::Ok;
114 }
@ Ok
The correction was done successfully.
columnar::MuonAccessor< float > acc_dR_deriv

◆ set_close_jet_decorator()

void CP::dRJetAxisHandler::set_close_jet_decorator ( const std::string & decor_name)
static

Definition at line 69 of file HistHandler.cxx.

69 {
70 s_close_jet_decor = decor_name;
71 }

◆ set_use_2D_sf()

void CP::dRJetAxisHandler::set_use_2D_sf ( const bool in)
static

Definition at line 73 of file HistHandler.cxx.

74 {
75 s_use_2D_sf=in;
76 }

Member Data Documentation

◆ acc_dR_deriv

columnar::MuonAccessor<float> CP::dRJetAxisHandler::acc_dR_deriv {*this, "DFCommonJetDr"}

Definition at line 254 of file HistHandler.h.

254{*this, "DFCommonJetDr"};

◆ ATLAS_THREAD_SAFE [1/2]

std::string s_close_jet_decor CP::dRJetAxisHandler::ATLAS_THREAD_SAFE
staticprivate

Definition at line 246 of file HistHandler.h.

◆ ATLAS_THREAD_SAFE [2/2]

bool s_use_2D_sf CP::dRJetAxisHandler::ATLAS_THREAD_SAFE
staticprivate

Definition at line 248 of file HistHandler.h.

◆ m_acc

columnar::MuonAccessor<float> CP::dRJetAxisHandler::m_acc

Definition at line 253 of file HistHandler.h.

◆ m_use_2D_sf

bool CP::dRJetAxisHandler::m_use_2D_sf
private

Definition at line 250 of file HistHandler.h.


The documentation for this class was generated from the following files: