|
ATLAS Offline Software
|
Go to the documentation of this file.
15 return mu.pt() / 1.e3;
18 return std::abs(
mu.eta());
41 int bin_flat(-1), bin_loss(-1);
46 float eloss_syst = bin_loss < 1 ? 1.e6 : std::abs(
m_loss->GetBinContent(bin_loss) *
mu.pt()/1.0e6);
54 }
else return cc_flat;
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)){
128 m_uncertVar(nullptr),
129 m_polySelVar(nullptr),
132 if (InDir_2Stations && InDir_2Stations!= InDir_3Stations) {
139 Error(
"BadMuonSysVetoHandler()",
"No TDirectory is given");
142 TIter
next(InDir->GetListOfKeys());
143 while (TObject*
obj =
next()) {
144 std::string ObjName =
obj->GetName();
145 float lowRange(-1.e20), highRange(1.e20);
146 if (ObjName.find(
"TF1") == std::string::npos) {
150 InDir->GetObject(ObjName.c_str(), TF);
164 if (!LowRange_str.empty()) {
165 lowRange =
atof(LowRange_str.c_str()) /
std::pow(10, LowRange_str.size() -1);
167 if (!HighRange_str.empty()) {
168 highRange =
atof(HighRange_str.c_str()) /
std::pow(10, LowRange_str.size() -1);
170 systPolynomials.insert(std::pair<
Ranges, std::unique_ptr<TF1>>(
Ranges(lowRange, highRange), std::unique_ptr<TF1>(TF)));
180 float RelHighPtSys = 0.;
181 if (
mu.pt() >= 100.e3) {
186 RelHighPtSys = Poly->Eval((this->*
m_uncertVar)(mu));
190 RelHighPtSys = 0.005;
202 Error(
"BadMuonVetoSystHandler::initialize()",
"No polynomials");
215 Error(
"BadMuonVetoSystHandler()",
"Something went wrong with the initialization");
220 Error(
"BadMuonSysVetoHandler()",
"Precisionlayers unkown");
222 }
else if (nprecisionLayers >= 3) {
225 Poly = BinnedPoly.second.get();
229 }
else if (nprecisionLayers == 2) {
232 Poly = BinnedPoly.second.get();
241 while (!sstr.empty() && sstr[0] ==
'_') {
244 size_t pos = sstr.find(
"_");
245 std::string
Property =
pos != std::string::npos ? sstr.substr(0,
pos) : sstr;
246 if (
pos != std::string::npos) {
247 sstr = sstr.substr(
Property.size() + 1, sstr.size());
AthROOTErrorHandlerSvc: Replaces ROOT's standard error handler in order to detect Problematic ROOT is...
KinVariable GetMuonVariableToUse(const std::string &name)
void fillMap(TDirectory *InDir, std::map< Ranges, std::unique_ptr< TF1 >> &systPolynomials)
std::pair< float, float > Ranges
CorrectionCode GetKineDependent(const xAOD::Muon &mu, float &Eff) const override
Add an additional uncertainty to the muon depending on its kinematics.
PrimodialPtSystematic(std::unique_ptr< HistHandler > HistHandler)
float(IKinematicSystHandler::* KinVariable)(const xAOD::Muon &mu) const
Typedef to prepare function pointers to the muon.
std::map< Ranges, std::unique_ptr< TF1 > > m_syst2Stations
std::string getNextProperty(std::string &sstr) const
virtual ~BadMuonVetoSystHandler()
float Pt(const xAOD::Muon &mu) const
bool initialize() override
Initialize method to load the inputs and check that everything will work as expected.
Support class for PropertyMgr.
Select isolated Photons, Electrons and Muons.
void SetSystematicWeight(float syst_weight) override
Set's the absolute scaling of the systematic.
CP::CorrectionCode findAppropiatePolynomial(const xAOD::Muon &mu, TF1 *&Poly) const
@ OutOfValidityRange
Input object is out of validity range.
@ Error
Some error happened during the object correction.
CorrectionCode GetKineDependent(const xAOD::Muon &mu, float &Eff) const override
Add an additional uncertainty to the muon depending on its kinematics.
std::unique_ptr< HistHandler > m_Handler
float AbsEta(const xAOD::Muon &mu) const
BadMuonVetoSystHandler(TDirectory *InDir_3Stations, TDirectory *InDir_2Stations=nullptr)
double atof(std::string_view str)
Converts a string into a double / float.
std::unique_ptr< HistHandler > m_Handler
bool initialize() override
Initialize method to load the inputs and check that everything will work as expected.
CorrectionCode GetKineDependent(const xAOD::Muon &mu, float &eff) const override
Add an additional uncertainty to the muon depending on its kinematics.
float PtGeV(const xAOD::Muon &mu) const
@ Ok
The correction was done successfully.
std::unique_ptr< HistHandler > m_flatness
PtKinematicSystHandler(std::unique_ptr< HistHandler > pt_flatnesss, std::unique_ptr< HistHandler > energy_loss)
Constructor having two histhandler objects inside. The.
CorrectionCode GetKineDependent(const xAOD::Muon &mu, float &Eff) const override
Add an additional uncertainty to the muon depending on its kinematics.
bool initialize() override
Initialize method to load the inputs and check that everything will work as expected.
Return value from object correction CP tools.
float Eta(const xAOD::Muon &mu) const
void SetSystematicWeight(float SystWeight) override
Set's the absolute scaling of the systematic.
std::map< Ranges, std::unique_ptr< TF1 > > m_syst3Stations
bool initialize() override
Initialize method to load the inputs and check that everything will work as expected.
constexpr int pow(int base, int exp) noexcept
TTVAClosureSysHandler(std::unique_ptr< HistHandler > HistHandler)
std::unique_ptr< HistHandler > m_loss
void SetSystematicWeight(float SystWeight) override
Set's the absolute scaling of the systematic.
void SetSystematicWeight(float SystWeight) override
Set's the absolute scaling of the systematic.
@ numberOfPrecisionLayers
layers with at least 3 hits [unit8_t].