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

The PrimodialPtSystematic was the former PtKinematicSystHandler. More...

#include <KinematicSystHandler.h>

Inheritance diagram for CP::PrimodialPtSystematic:
Collaboration diagram for CP::PrimodialPtSystematic:

Public Types

typedef float(IKinematicSystHandler::* KinVariable) (const xAOD::Muon &mu) const
 Typedef to prepare function pointers to the muon. More...
 

Public Member Functions

CorrectionCode GetKineDependent (const xAOD::Muon &mu, float &Eff) const override
 Add an additional uncertainty to the muon depending on its kinematics. More...
 
void SetSystematicWeight (float SystWeight) override
 Set's the absolute scaling of the systematic. More...
 
bool initialize () override
 Initialize method to load the inputs and check that everything will work as expected. More...
 
 PrimodialPtSystematic (std::unique_ptr< HistHandler > HistHandler)
 
KinVariable GetMuonVariableToUse (const std::string &name)
 
float Eta (const xAOD::Muon &mu) const
 
float Pt (const xAOD::Muon &mu) const
 
float PtGeV (const xAOD::Muon &mu) const
 
float AbsEta (const xAOD::Muon &mu) const
 

Private Attributes

std::unique_ptr< HistHandlerm_Handler
 
float m_SystWeight
 

Detailed Description

The PrimodialPtSystematic was the former PtKinematicSystHandler.

It's kept for backwards compability to run MuonEfficiencyScaleFactors on files before the Moriond_2019 release.

Definition at line 84 of file KinematicSystHandler.h.

Member Typedef Documentation

◆ KinVariable

typedef float(IKinematicSystHandler::* CP::IKinematicSystHandler::KinVariable) (const xAOD::Muon &mu) const
inherited

Typedef to prepare function pointers to the muon.

Definition at line 45 of file KinematicSystHandler.h.

Constructor & Destructor Documentation

◆ PrimodialPtSystematic()

CP::PrimodialPtSystematic::PrimodialPtSystematic ( std::unique_ptr< HistHandler HistHandler)

Definition at line 98 of file KinematicSystHandler.cxx.

98  :
99  m_Handler(),
100  m_SystWeight(0) {
101  m_Handler.swap(Handler);
102  }

Member Function Documentation

◆ AbsEta()

float CP::IKinematicSystHandler::AbsEta ( const xAOD::Muon mu) const
inherited

Definition at line 17 of file KinematicSystHandler.cxx.

17  {
18  return std::abs(mu.eta());
19  }

◆ Eta()

float CP::IKinematicSystHandler::Eta ( const xAOD::Muon mu) const
inherited

Definition at line 8 of file KinematicSystHandler.cxx.

8  {
9  return mu.eta();
10  }

◆ GetKineDependent()

CorrectionCode CP::PrimodialPtSystematic::GetKineDependent ( const xAOD::Muon mu,
float &  Eff 
) const
overridevirtual

Add an additional uncertainty to the muon depending on its kinematics.

Implements CP::IKinematicSystHandler.

Definition at line 103 of file KinematicSystHandler.cxx.

103  {
104  // Account for catastrophic energy loss for very high
105  // pt's
106  if (mu.pt() <= 200.e3) return CorrectionCode::Ok;
107 
108  int binsys = -1;
109  CorrectionCode cc = m_Handler->FindBin(mu, binsys);
110  if (cc != CorrectionCode::Ok) {
111  return cc;
112  }
113  Eff *= (1. + m_SystWeight * std::abs(m_Handler->GetBinContent(binsys)) * mu.pt() / 1.0e6);
114  return CorrectionCode::Ok;
115  }

◆ GetMuonVariableToUse()

IKinematicSystHandler::KinVariable CP::IKinematicSystHandler::GetMuonVariableToUse ( const std::string &  name)
inherited

Definition at line 21 of file KinematicSystHandler.cxx.

21  {
22  if (name == "pt") return &IKinematicSystHandler::Pt;
23  if (name == "ptGeV") return &IKinematicSystHandler::PtGeV;
24  if (name == "eta") return &IKinematicSystHandler::Eta;
25  if (name == "AbsEta") return &IKinematicSystHandler::AbsEta;
26  return nullptr;
27  }

◆ initialize()

bool CP::PrimodialPtSystematic::initialize ( )
overridevirtual

Initialize method to load the inputs and check that everything will work as expected.

Implements CP::IKinematicSystHandler.

Definition at line 119 of file KinematicSystHandler.cxx.

119  {
120  return m_Handler.get() != nullptr;
121  }

◆ Pt()

float CP::IKinematicSystHandler::Pt ( const xAOD::Muon mu) const
inherited

Definition at line 11 of file KinematicSystHandler.cxx.

11  {
12  return mu.pt();
13  }

◆ PtGeV()

float CP::IKinematicSystHandler::PtGeV ( const xAOD::Muon mu) const
inherited

Definition at line 14 of file KinematicSystHandler.cxx.

14  {
15  return mu.pt() / 1.e3;
16  }

◆ SetSystematicWeight()

void CP::PrimodialPtSystematic::SetSystematicWeight ( float  SystWeight)
overridevirtual

Set's the absolute scaling of the systematic.

For daily puposes it's usually either 1 or -1 indicating if the instance is an upwards or downwards variation.

Implements CP::IKinematicSystHandler.

Definition at line 116 of file KinematicSystHandler.cxx.

116  {
117  m_SystWeight = SystWeight;
118  }

Member Data Documentation

◆ m_Handler

std::unique_ptr<HistHandler> CP::PrimodialPtSystematic::m_Handler
private

Definition at line 93 of file KinematicSystHandler.h.

◆ m_SystWeight

float CP::PrimodialPtSystematic::m_SystWeight
private

Definition at line 94 of file KinematicSystHandler.h.


The documentation for this class was generated from the following files:
Handler
AthROOTErrorHandlerSvc: Replaces ROOT's standard error handler in order to detect Problematic ROOT is...
Definition: AthROOTErrorHandlerSvc.cxx:9
CP::IKinematicSystHandler::Pt
float Pt(const xAOD::Muon &mu) const
Definition: KinematicSystHandler.cxx:11
CP::PrimodialPtSystematic::m_SystWeight
float m_SystWeight
Definition: KinematicSystHandler.h:94
CP::IKinematicSystHandler::AbsEta
float AbsEta(const xAOD::Muon &mu) const
Definition: KinematicSystHandler.cxx:17
CP::PrimodialPtSystematic::m_Handler
std::unique_ptr< HistHandler > m_Handler
Definition: KinematicSystHandler.h:93
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
CP::IKinematicSystHandler::PtGeV
float PtGeV(const xAOD::Muon &mu) const
Definition: KinematicSystHandler.cxx:14
CP::CorrectionCode::Ok
@ Ok
The correction was done successfully.
Definition: CorrectionCode.h:38
CP::IKinematicSystHandler::Eta
float Eta(const xAOD::Muon &mu) const
Definition: KinematicSystHandler.cxx:8
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
python.handimod.cc
int cc
Definition: handimod.py:523