|
ATLAS Offline Software
|
Go to the documentation of this file.
35 , m_scaleVar(CompScaleVar::UNKNOWN)
36 , m_topology(JetTopology::UNKNOWN)
40 , m_numExpectedHist(0)
42 , m_validHist(nullptr)
50 , m_uncHistName(!component.uncNames.
empty()?component.uncNames.at(0):
"NONE")
51 , m_validHistName(component.validName)
52 , m_scaleVar(component.scaleVar)
53 , m_topology(component.topology)
54 , m_energyScale(component.energyScale)
56 , m_splitNumber(component.splitNum)
58 , m_validHist(nullptr)
62 ATH_MSG_FATAL(
"Cannot create an UncertaintyComponent with an empty uncHistName");
64 ATH_MSG_FATAL(
"Cannot create an UncertaintyComponent scaling an UNKNOWN variable");
65 if (numHist != component.
uncNames.size())
70 :
asg::AsgMessaging(Form(
"%s_copy",toCopy.m_uncHistName.
Data()))
71 , m_isInit(toCopy.m_isInit)
72 , m_uncHistName(toCopy.m_uncHistName)
73 , m_validHistName(toCopy.m_validHistName)
74 , m_scaleVar(toCopy.m_scaleVar)
75 , m_topology(toCopy.m_topology)
76 , m_energyScale(toCopy.m_energyScale)
77 , m_interpolate(toCopy.m_interpolate)
78 , m_splitNumber(toCopy.m_splitNumber)
80 , m_validHist(nullptr)
102 return StatusCode::FAILURE;
110 return StatusCode::FAILURE;
118 return StatusCode::FAILURE;
130 return StatusCode::SUCCESS;
149 return !(fabs(
histo->GetMinimum()) > 1.e-8 || fabs(
histo->GetMaximum()) > 1.e-8);
203 double splitFactor = 1;
213 const double minPt =
histo->GetXaxis()->GetBinLowEdge(1);
214 const double maxPt =
histo->GetXaxis()->GetBinLowEdge(
histo->GetNbinsX()+1);
217 const double slope = 1./(
log(maxPt)-
log(minPt));
218 const double intercept = -slope*
log(minPt);
220 splitFactor = slope*
log(valPt <= minPt ? minPt+1.e-3 : valPt >= maxPt ? maxPt-1.
e-3 : valPt)+intercept;
228 const double minEta = 0;
229 const double maxEta = 4.5;
232 const double slope = 1./(
maxEta - minEta);
233 const double intercept = -slope*minEta;
248 const double minPt =
histo->GetXaxis()->GetBinLowEdge(1);
249 const double maxPt =
histo->GetXaxis()->GetBinLowEdge(
histo->GetNbinsX()+1);
252 const double minEta = 0;
253 const double maxEta = 4.5;
256 const double slopePt = 1./(
log(maxPt)-
log(minPt));
257 const double slopeEta = 1./(
maxEta-minEta);
259 const double fixedPt = valPt <= minPt ? minPt+1.e-3 : valPt >= maxPt ? maxPt - 1.e-3 : valPt;
262 splitFactor = (slopePt*(
log(fixedPt)-
log(minPt)) + slopeEta*(fixedEta-minEta))/2.;
269 const double minPt =
histo->GetXaxis()->GetBinLowEdge(1);
270 const double maxPt =
histo->GetXaxis()->GetBinLowEdge(
histo->GetNbinsX()+1);
273 const double minEta = 0;
274 const double maxEta = 4.5;
277 const double slopePt = 1./(
log(maxPt)-
log(minPt));
278 const double slopeEta = 1./(
maxEta-minEta);
280 const double fixedPt = valPt <= minPt ? minPt+1.e-3 : valPt >= maxPt ? maxPt - 1.e-3 : valPt;
283 splitFactor = (slopePt*(
log(fixedPt)-
log(minPt)) + slopeEta*(
maxEta-fixedEta))/2.;
289 splitFactor = sqrt(1-splitFactor*splitFactor);
303 if (validity < 1.e-5 && validity > -1.
e-5)
return false;
304 if (validity < 1+1.e-5 && validity > 1-1.
e-5)
return true;
323 return scaleTAMoment(
jet);
348 return scaleTAMoment(
jet)/
jet.pt();
374 return scaleTAMoment(
jet)/
jet.e();
virtual bool getValidityImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const =0
virtual double getMassOverPt(const xAOD::Jet &jet, const CompMassDef::TypeEnum massDef) const
virtual double getMassOverE(const xAOD::Jet &jet, const CompMassDef::TypeEnum massDef) const
const float m_energyScale
virtual double getSplitFactor(const xAOD::Jet &jet) const
const Interpolate::TypeEnum m_interpolate
const TH1 * getHisto() const
std::vector< TString > uncNames
virtual ~UncertaintyComponent()
const TString m_uncHistName
bool operator==(const UncertaintyComponent &componentA, const UncertaintyComponent &componentB)
Helper class to provide constant type-safe access to aux data.
virtual StatusCode initialize(TFile *histFile)
virtual bool getValidBool(const double validity) const
virtual StatusCode initialize(TFile *histFile)
#define JESUNC_ERROR_CODE
const TString m_validHistName
#define JESUNC_SAFE_DELETE(T)
bool operator<(const UncertaintyComponent &componentA, const UncertaintyComponent &componentB)
TString getJetScaleString(const TypeEnum type)
UncertaintyHistogram * m_validHist
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual TString getName() const
virtual bool isAlwaysZero() const
JetFourMomAccessor is an extension of JetAttributeAccessor::AccessorWrapper<xAOD::JetFourMom_t> Acces...
virtual double getAbsMass(const xAOD::Jet &jet, const CompMassDef::TypeEnum massDef) const
virtual double getUncertaintyImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const =0
Class describing the basic event information.
#define JESUNC_NO_DEFAULT_CONSTRUCTOR
virtual TString getValidName() const
const CompScaleVar::TypeEnum m_scaleVar
float interpolate(const CaloRec::Array< 2 > &a, float x, unsigned int degree, unsigned int ycol=1, const CaloRec::Array< 1 > ®ions=CaloRec::Array< 1 >(), int n_points=-1, bool fixZero=false)
Polynomial interpolation in a table.
virtual double getUncertainty(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
bool absEta(const xAOD::TauJet &tau, double &out)
UncertaintyComponent(const ComponentHelper &component, const size_t numHist=1)
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
UncertaintyHistogram * m_uncHist
virtual bool getValidUncertainty(double &unc, const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
TString enumToString(const TypeEnum type)
virtual bool getValidity(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
float Interpolate(const float &xval, const std::vector< float > &xtabulated, const std::vector< float > &ytabulated)
Interpolation function.