ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
CP::dRJetAxisHandler Class Reference

#include <HistHandler.h>

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

Public Member Functions

 dRJetAxisHandler ()
 
CorrectionCode GetBinningParameter (const xAOD::Muon &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)
 

Private Attributes

SG::AuxElement::ConstAccessor< float > m_acc
 
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 222 of file HistHandler.h.

Constructor & Destructor Documentation

◆ dRJetAxisHandler()

CP::dRJetAxisHandler::dRJetAxisHandler ( )

Definition at line 80 of file HistHandler.cxx.

80  :
81  m_acc(s_close_jet_decor),
82  m_use_2D_sf(s_use_2D_sf){}

◆ ~dRJetAxisHandler()

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

Member Function Documentation

◆ GetBinningParameter()

CorrectionCode CP::dRJetAxisHandler::GetBinningParameter ( const xAOD::Muon mu,
float &  value 
) const
overridevirtual

Implements CP::AxisHandler.

Definition at line 84 of file HistHandler.cxx.

84  {
85 
86  static std::atomic<unsigned int> warned = {0};
87  static const SG::AuxElement::ConstAccessor<float> acc_dR_deriv("DFCommonJetDr");
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  }

◆ 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

◆ ATLAS_THREAD_SAFE [1/2]

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

Definition at line 236 of file HistHandler.h.

◆ ATLAS_THREAD_SAFE [2/2]

bool s_use_2D_sf CP::dRJetAxisHandler::ATLAS_THREAD_SAFE
staticprivate

Definition at line 238 of file HistHandler.h.

◆ m_acc

SG::AuxElement::ConstAccessor<float> CP::dRJetAxisHandler::m_acc
private

Definition at line 240 of file HistHandler.h.

◆ m_use_2D_sf

bool CP::dRJetAxisHandler::m_use_2D_sf
private

Definition at line 241 of file HistHandler.h.


The documentation for this class was generated from the following files:
athena.value
value
Definition: athena.py:124
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
CP::dRJetAxisHandler::m_use_2D_sf
bool m_use_2D_sf
Definition: HistHandler.h:241
CP::dRJetAxisHandler::m_acc
SG::AuxElement::ConstAccessor< float > m_acc
Definition: HistHandler.h:240
CP::CorrectionCode::Ok
@ Ok
The correction was done successfully.
Definition: CorrectionCode.h:38
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53