ATLAS Offline Software
Loading...
Searching...
No Matches
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) (columnar::MuonId mu) const
 Typedef to prepare function pointers to the muon.

Public Member Functions

CorrectionCode GetKineDependent (columnar::MuonId mu, float &eff) const override
 Add an additional uncertainty to the muon depending on its kinematics.
void SetSystematicWeight (float syst_weight) override
 Set's the absolute scaling of the systematic.
bool initialize () override
 Initialize method to load the inputs and check that everything will work as expected.
 PtKinematicSystHandler (std::unique_ptr< HistHandler > pt_flatnesss, std::unique_ptr< HistHandler > energy_loss)
 Constructor having two histhandler objects inside. The.
KinVariable GetMuonVariableToUse (const std::string &name)
float Eta (columnar::MuonId mu) const
float Pt (columnar::MuonId mu) const
float PtGeV (columnar::MuonId mu) const
float AbsEta (columnar::MuonId mu) const

Public Attributes

columnar::MuonAccessor< columnar::ObjectColumnmuonsHandle {*this, "Muons"}
columnar::MuonAccessor< floatptAcc {*this, "pt"}
columnar::MuonAccessor< floatetaAcc {*this, "eta"}

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 73 of file KinematicSystHandler.h.

Member Typedef Documentation

◆ KinVariable

typedef float(IKinematicSystHandler::* CP::IKinematicSystHandler::KinVariable) (columnar::MuonId mu) const
inherited

Typedef to prepare function pointers to the muon.

Definition at line 50 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 }
std::unique_ptr< HistHandler > m_flatness
std::unique_ptr< HistHandler > m_loss

Member Function Documentation

◆ AbsEta()

float CP::IKinematicSystHandler::AbsEta ( columnar::MuonId mu) const
inherited

Definition at line 17 of file KinematicSystHandler.cxx.

17 {
18 return std::abs(mu(etaAcc));
19 }
columnar::MuonAccessor< float > etaAcc

◆ Eta()

float CP::IKinematicSystHandler::Eta ( columnar::MuonId mu) const
inherited

Definition at line 8 of file KinematicSystHandler.cxx.

8 {
9 return mu(etaAcc);
10 }

◆ GetKineDependent()

CorrectionCode CP::PtKinematicSystHandler::GetKineDependent ( columnar::MuonId 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(ptAcc) > 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(ptAcc)/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(ptAcc) > 200.e3 && (eloss_syst < abs_error || abs_error == 0 || mu(ptAcc) > 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 }
@ Ok
The correction was done successfully.
columnar::MuonAccessor< float > ptAcc

◆ 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 }
float PtGeV(columnar::MuonId mu) const
float Pt(columnar::MuonId mu) const
float AbsEta(columnar::MuonId mu) const
float Eta(columnar::MuonId mu) const

◆ 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 ( columnar::MuonId mu) const
inherited

Definition at line 11 of file KinematicSystHandler.cxx.

11 {
12 return mu(ptAcc);
13 }

◆ PtGeV()

float CP::IKinematicSystHandler::PtGeV ( columnar::MuonId mu) const
inherited

Definition at line 14 of file KinematicSystHandler.cxx.

14 {
15 return mu(ptAcc) / 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

◆ etaAcc

columnar::MuonAccessor<float> CP::IKinematicSystHandler::etaAcc {*this, "eta"}
inherited

Definition at line 60 of file KinematicSystHandler.h.

60{*this, "eta"};

◆ m_flatness

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

Definition at line 84 of file KinematicSystHandler.h.

◆ m_loss

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

Definition at line 85 of file KinematicSystHandler.h.

◆ m_SystWeight

float CP::PtKinematicSystHandler::m_SystWeight
private

Definition at line 86 of file KinematicSystHandler.h.

◆ muonsHandle

columnar::MuonAccessor<columnar::ObjectColumn> CP::IKinematicSystHandler::muonsHandle {*this, "Muons"}
inherited

Definition at line 58 of file KinematicSystHandler.h.

58{*this, "Muons"};

◆ ptAcc

columnar::MuonAccessor<float> CP::IKinematicSystHandler::ptAcc {*this, "pt"}
inherited

Definition at line 59 of file KinematicSystHandler.h.

59{*this, "pt"};

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