ATLAS Offline Software
Loading...
Searching...
No Matches
KinematicSystHandler.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4
5#ifndef MUONEFFICIENCYCORRECTION_SYSTHANDLER_H
6#define MUONEFFICIENCYCORRECTION_SYSTHANDLER_H
7
8// EDM include(s):
9#include "xAODMuon/Muon.h"
10
15
20
21// further ROOT includes
22#include <TFile.h>
23#include <TDirectory.h>
24#include <TH1.h>
25#include <TF1.h>
26
27// STL includes
28#include <string>
29#include <iostream>
30#include <memory>
31#include <map>
32#include <cmath>
33
34namespace CP {
35
36 //Interface class to retrieve the Muon dependent systematics
38 public:
40 virtual CorrectionCode GetKineDependent(columnar::MuonId mu, float& Eff) const = 0;
43 virtual void SetSystematicWeight(float SystWeight) = 0;
44
46 virtual bool initialize() = 0;
47 virtual ~IKinematicSystHandler() =default;
48
51 KinVariable GetMuonVariableToUse(const std::string &name);
52
53 float Eta(columnar::MuonId mu) const;
54 float Pt(columnar::MuonId mu) const;
55 float PtGeV(columnar::MuonId mu) const;
56 float AbsEta(columnar::MuonId mu) const;
57
61 };
62
74 public:
75 CorrectionCode GetKineDependent(columnar::MuonId mu, float& eff) const override;
76
77 void SetSystematicWeight(float syst_weight) override;
78
79 bool initialize() override;
80
82 PtKinematicSystHandler(std::unique_ptr<HistHandler> pt_flatnesss, std::unique_ptr<HistHandler> energy_loss);
83 private:
84 std::unique_ptr<HistHandler> m_flatness;
85 std::unique_ptr<HistHandler> m_loss;
87 };
88
91
93 public:
94 CorrectionCode GetKineDependent(columnar::MuonId mu, float& Eff) const override;
95
96 void SetSystematicWeight(float SystWeight) override;
97
98 bool initialize() override;
99 PrimodialPtSystematic(std::unique_ptr<HistHandler> HistHandler);
100 private:
101 std::unique_ptr<HistHandler> m_Handler;
103 };
104
108 public:
109 TTVAClosureSysHandler(std::unique_ptr<HistHandler> HistHandler);
110
111 void SetSystematicWeight( float SystWeight) override;
112 bool initialize() override;
113 CorrectionCode GetKineDependent(columnar::MuonId mu, float& Eff) const override;
114 private:
115 std::unique_ptr<HistHandler> m_Handler;
117 };
118
120 public:
121 CorrectionCode GetKineDependent(columnar::MuonId mu, float& Eff) const override;
122 void SetSystematicWeight(float SystWeight)override;
123
124 bool initialize() override;
125 BadMuonVetoSystHandler(TDirectory* InDir_3Stations, TDirectory* InDir_2Stations = nullptr);
126 virtual ~BadMuonVetoSystHandler();
127
128 private:
129 typedef std::pair<float, float> Ranges;
130
131 CP::CorrectionCode findAppropiatePolynomial(const xAOD::Muon& mu, TF1* &Poly) const;
132
133 std::string getNextProperty(std::string &sstr) const;
134 void fillMap(TDirectory* InDir, std::map<Ranges, std::unique_ptr<TF1>>& systPolynomials);
135
136 std::map<Ranges, std::unique_ptr<TF1>> m_syst3Stations;
137 std::map<Ranges, std::unique_ptr<TF1>> m_syst2Stations;
138
142 };
143
144} /* namespace CP */
145
146#endif /* EFFICIENCYSCALEFACTOR_H_ */
@ Eta
Definition RPCdef.h:8
std::map< Ranges, std::unique_ptr< TF1 > > m_syst2Stations
void fillMap(TDirectory *InDir, std::map< Ranges, std::unique_ptr< TF1 > > &systPolynomials)
bool initialize() override
Initialize method to load the inputs and check that everything will work as expected.
CP::CorrectionCode findAppropiatePolynomial(const xAOD::Muon &mu, TF1 *&Poly) const
BadMuonVetoSystHandler(TDirectory *InDir_3Stations, TDirectory *InDir_2Stations=nullptr)
std::map< Ranges, std::unique_ptr< TF1 > > m_syst3Stations
std::pair< float, float > Ranges
void SetSystematicWeight(float SystWeight) override
Set's the absolute scaling of the systematic.
CorrectionCode GetKineDependent(columnar::MuonId mu, float &Eff) const override
Add an additional uncertainty to the muon depending on its kinematics.
std::string getNextProperty(std::string &sstr) const
Return value from object correction CP tools.
float(IKinematicSystHandler::* KinVariable)(columnar::MuonId mu) const
Typedef to prepare function pointers to the muon.
float PtGeV(columnar::MuonId mu) const
float Pt(columnar::MuonId mu) const
virtual void SetSystematicWeight(float SystWeight)=0
Set's the absolute scaling of the systematic.
columnar::MuonAccessor< float > ptAcc
virtual bool initialize()=0
Initialize method to load the inputs and check that everything will work as expected.
virtual ~IKinematicSystHandler()=default
columnar::MuonAccessor< float > etaAcc
columnar::MuonAccessor< columnar::ObjectColumn > muonsHandle
KinVariable GetMuonVariableToUse(const std::string &name)
float AbsEta(columnar::MuonId mu) const
virtual CorrectionCode GetKineDependent(columnar::MuonId mu, float &Eff) const =0
Add an additional uncertainty to the muon depending on its kinematics.
CorrectionCode GetKineDependent(columnar::MuonId mu, float &Eff) const override
Add an additional uncertainty to the muon depending on its kinematics.
std::unique_ptr< HistHandler > m_Handler
void SetSystematicWeight(float SystWeight) override
Set's the absolute scaling of the systematic.
PrimodialPtSystematic(std::unique_ptr< HistHandler > HistHandler)
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.
void SetSystematicWeight(float syst_weight) override
Set's the absolute scaling of the systematic.
std::unique_ptr< HistHandler > m_flatness
CorrectionCode GetKineDependent(columnar::MuonId mu, float &eff) const override
Add an additional uncertainty to the muon depending on its kinematics.
std::unique_ptr< HistHandler > m_loss
bool initialize() override
Initialize method to load the inputs and check that everything will work as expected.
TTVAClosureSysHandler(std::unique_ptr< HistHandler > HistHandler)
bool initialize() override
Initialize method to load the inputs and check that everything will work as expected.
CorrectionCode GetKineDependent(columnar::MuonId mu, float &Eff) const override
Add an additional uncertainty to the muon depending on its kinematics.
void SetSystematicWeight(float SystWeight) override
Set's the absolute scaling of the systematic.
std::unique_ptr< HistHandler > m_Handler
the base class for all columnar components
Select isolated Photons, Electrons and Muons.
ObjectId< ContainerId::muon > MuonId
Definition MuonDef.h:25
AccessorTemplate< ContainerId::muon, CT, ColumnAccessMode::input, CM > MuonAccessor
Definition MuonDef.h:27
Muon_v1 Muon
Reference the current persistent version: