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

Extra systematic assigned for the TTVA non-closure. More...

#include <KinematicSystHandler.h>

Inheritance diagram for CP::TTVAClosureSysHandler:
Collaboration diagram for CP::TTVAClosureSysHandler:

Public Types

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

Public Member Functions

 TTVAClosureSysHandler (std::unique_ptr< HistHandler > HistHandler)
 
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...
 
CorrectionCode GetKineDependent (const xAOD::Muon &mu, float &Eff) const override
 Add an additional uncertainty to the muon depending on its kinematics. More...
 
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

Extra systematic assigned for the TTVA non-closure.

Definition at line 99 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

◆ TTVAClosureSysHandler()

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

Definition at line 79 of file KinematicSystHandler.cxx.

79  :
80  m_Handler(),
81  m_SystWeight(0) {
82  m_Handler.swap(HistHandler);
83  }

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::TTVAClosureSysHandler::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 86 of file KinematicSystHandler.cxx.

86  {
87  int binsys = -1;
88  CorrectionCode cc = m_Handler->FindBin(mu, binsys);
89  if (cc != CorrectionCode::Ok) {
90  return cc;
91  }
92  Eff *= (1. + m_SystWeight * std::abs(m_Handler->GetBinContent(binsys)));
93  return CorrectionCode::Ok;
94  }

◆ 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::TTVAClosureSysHandler::initialize ( )
overridevirtual

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

Implements CP::IKinematicSystHandler.

Definition at line 85 of file KinematicSystHandler.cxx.

85 { return m_Handler.get() != nullptr; }

◆ 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::TTVAClosureSysHandler::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 84 of file KinematicSystHandler.cxx.

84 {m_SystWeight = SystWeight;}

Member Data Documentation

◆ m_Handler

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

Definition at line 107 of file KinematicSystHandler.h.

◆ m_SystWeight

float CP::TTVAClosureSysHandler::m_SystWeight
private

Definition at line 108 of file KinematicSystHandler.h.


The documentation for this class was generated from the following files:
CP::TTVAClosureSysHandler::m_SystWeight
float m_SystWeight
Definition: KinematicSystHandler.h:108
CP::IKinematicSystHandler::Pt
float Pt(const xAOD::Muon &mu) const
Definition: KinematicSystHandler.cxx:11
CP::TTVAClosureSysHandler::m_Handler
std::unique_ptr< HistHandler > m_Handler
Definition: KinematicSystHandler.h:107
HistHandler
utility class to avoid having to determine the input histo at every single call to the tool Remembers...
CP::IKinematicSystHandler::AbsEta
float AbsEta(const xAOD::Muon &mu) const
Definition: KinematicSystHandler.cxx:17
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
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