 |
ATLAS Offline Software
|
Go to the documentation of this file.
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(
ptAcc)/1.0e6);
54 }
else return cc_flat;
57 float abs_error = std::abs(
m_flatness->GetBinError(bin_flat));
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.;
186 RelHighPtSys = Poly->Eval((this->*
m_uncertVar)(mu.getXAODObject()));
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(columnar::MuonId mu, float &Eff) const override
Add an additional uncertainty to the muon depending on its kinematics.
PrimodialPtSystematic(std::unique_ptr< HistHandler > HistHandler)
float AbsEta(columnar::MuonId mu) const
std::map< Ranges, std::unique_ptr< TF1 > > m_syst2Stations
std::string getNextProperty(std::string &sstr) const
virtual ~BadMuonVetoSystHandler()
float(IKinematicSystHandler::* KinVariable)(columnar::MuonId mu) const
Typedef to prepare function pointers to the muon.
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
float Eta(columnar::MuonId mu) const
@ OutOfValidityRange
Input object is out of validity range.
@ Error
Some error happened during the object correction.
float Pt(columnar::MuonId mu) const
std::unique_ptr< HistHandler > m_Handler
columnar::MuonAccessor< float > ptAcc
CorrectionCode GetKineDependent(columnar::MuonId mu, float &Eff) const override
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.
BadMuonVetoSystHandler(TDirectory *InDir_3Stations, TDirectory *InDir_2Stations=nullptr)
columnar::MuonAccessor< float > etaAcc
CorrectionCode GetKineDependent(columnar::MuonId mu, float &eff) const override
Add an additional uncertainty to the muon depending on its kinematics.
double atof(std::string_view str)
Converts a string into a double / float.
std::unique_ptr< HistHandler > m_Handler
a class representing a single object (electron, muons, etc.)
bool initialize() override
Initialize method to load the inputs and check that everything will work as expected.
@ Ok
The correction was done successfully.
std::unique_ptr< HistHandler > m_flatness
float PtGeV(columnar::MuonId mu) const
PtKinematicSystHandler(std::unique_ptr< HistHandler > pt_flatnesss, std::unique_ptr< HistHandler > energy_loss)
Constructor having two histhandler objects inside. The.
bool initialize() override
Initialize method to load the inputs and check that everything will work as expected.
Return value from object correction CP tools.
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].