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

Z->mumu reconstruction scale-factors are delivered in eta-phi maps integrating out any pt-dependence. More...

#include <KinematicSystHandler.h>

Inheritance diagram for CP::PtKinematicSystHandler:
Collaboration diagram for CP::PtKinematicSystHandler:

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 syst_weight) 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...
 
 PtKinematicSystHandler (std::unique_ptr< HistHandler > pt_flatnesss, std::unique_ptr< HistHandler > energy_loss)
 Constructor having two histhandler objects inside. The. 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_flatness
 
std::unique_ptr< HistHandlerm_loss
 
float m_SystWeight
 

Detailed Description

Z->mumu reconstruction scale-factors are delivered in eta-phi maps integrating out any pt-dependence.

However, the scale-factors as a function of pt show a slight dependence on that variable. An extra binning along pt is not feasable, because of the low statistics in each bin. To account for something we might missed an additional histogram is saved in the scale-factor map showing the absolute deviation from the bin where the probe-distribution has its maximium. On the other hand high pt muons might hit the borders of the T&P method. Once in terms of statistics and once in terms of modeling where the muon might suffer from a so-called catastrophic energy-loss. To estimate this inefficiency the slope in the efficiency of high-pt muons in the drell-yan sample is determined in different spectrometer bins. The systematic designed for muons beyond 200 GeV in transverse momentum.

The two systematics are not applied simultaenously. The first systematic is preferred over the latter if its unvertainty is smaller than the total value of the latter itself.

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

◆ PtKinematicSystHandler()

CP::PtKinematicSystHandler::PtKinematicSystHandler ( std::unique_ptr< HistHandler pt_flatnesss,
std::unique_ptr< HistHandler energy_loss 
)

Constructor having two histhandler objects inside. The.

Definition at line 32 of file KinematicSystHandler.cxx.

32  :
33  m_flatness(),
34  m_loss(),
35  m_SystWeight(0){
36  m_flatness.swap(pt_flatnesss);
37  m_loss.swap(energy_loss);
38  }

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::PtKinematicSystHandler::GetKineDependent ( const xAOD::Muon mu,
float &  Eff 
) const
overridevirtual

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

We exceed the limits of the histogram

The eloss is going to take over now

Implements CP::IKinematicSystHandler.

Definition at line 40 of file KinematicSystHandler.cxx.

40  {
41  int bin_flat(-1), bin_loss(-1);
42  float syst = 0;
43  CorrectionCode cc_flat = m_flatness->FindBin(mu, bin_flat);
44  CorrectionCode cc_eloss = mu.pt() > 200.e3 ? m_loss->FindBin(mu, bin_loss) : cc_flat;
45 
46  float eloss_syst = bin_loss < 1 ? 1.e6 : std::abs( m_loss->GetBinContent(bin_loss) * mu.pt()/1.0e6);
48  if (cc_flat != CorrectionCode::Ok){
50  if (cc_eloss == CorrectionCode::Ok){
51  syst = eloss_syst;
52  eff *= 1 + m_SystWeight * std::abs(syst);
53  return cc_eloss;
54  } else return cc_flat;
55  } else {
56  // The eloss -systematic is valid and smaller than the error from the flatness
57  float abs_error = std::abs( m_flatness->GetBinError(bin_flat));
58  if (cc_eloss == CorrectionCode::Ok && mu.pt() > 200.e3 && (eloss_syst < abs_error || abs_error == 0 || mu.pt() > 500.e3)){
59  syst = eloss_syst;
60  // The flatness of the scale-factor is still more precise than the eloss. Assign this as an extra syst
61  } else {
62  syst = m_flatness->GetBinContent(bin_flat);
63  }
64  }
65  eff *= 1 + m_SystWeight * std::abs(syst);
66  return cc_flat;
67  }

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

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

Implements CP::IKinematicSystHandler.

Definition at line 73 of file KinematicSystHandler.cxx.

73  {
74  return m_flatness.get() != nullptr && m_loss.get() != nullptr;
75  }

◆ 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::PtKinematicSystHandler::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 69 of file KinematicSystHandler.cxx.

69  {
70  m_SystWeight = syst_weight;
71  }

Member Data Documentation

◆ m_flatness

std::unique_ptr<HistHandler> CP::PtKinematicSystHandler::m_flatness
private

Definition at line 76 of file KinematicSystHandler.h.

◆ m_loss

std::unique_ptr<HistHandler> CP::PtKinematicSystHandler::m_loss
private

Definition at line 77 of file KinematicSystHandler.h.

◆ m_SystWeight

float CP::PtKinematicSystHandler::m_SystWeight
private

Definition at line 78 of file KinematicSystHandler.h.


The documentation for this class was generated from the following files:
CP::IKinematicSystHandler::Pt
float Pt(const xAOD::Muon &mu) const
Definition: KinematicSystHandler.cxx:11
CP::PtKinematicSystHandler::m_SystWeight
float m_SystWeight
Definition: KinematicSystHandler.h:78
CP::IKinematicSystHandler::AbsEta
float AbsEta(const xAOD::Muon &mu) const
Definition: KinematicSystHandler.cxx:17
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::PtKinematicSystHandler::m_flatness
std::unique_ptr< HistHandler > m_flatness
Definition: KinematicSystHandler.h:76
CP::IKinematicSystHandler::Eta
float Eta(const xAOD::Muon &mu) const
Definition: KinematicSystHandler.cxx:8
dqt_zlumi_alleff_HIST.eff
int eff
Definition: dqt_zlumi_alleff_HIST.py:113
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
CP::PtKinematicSystHandler::m_loss
std::unique_ptr< HistHandler > m_loss
Definition: KinematicSystHandler.h:77