ATLAS Offline Software
Loading...
Searching...
No Matches
PunchthroughUncertaintyComponent.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
7
8namespace jet
9{
10
12// //
13// Constructor/destructor/initialization //
14// //
16
23
25 : UncertaintyComponent(component)
26 , m_absEta(CompParametrization::isAbsEta(component.parametrization))
27{
28 ATH_MSG_DEBUG(Form("Creating PunchthroughUncertaintyComponent named %s",m_uncHistName.Data()));
29}
30
32 : UncertaintyComponent(toCopy)
33 , m_absEta(toCopy.m_absEta)
34{
35 ATH_MSG_DEBUG(Form("Creating copy of PunchthroughUncertaintyComponent named %s",m_uncHistName.Data()));
36}
37
42
43
45// //
46// Validity and uncertainty retrieval //
47// //
49
51{
52 return !m_validHist ? true : getValidBool(m_validHist->getValue(jet.pt()*m_energyScale,getNumSegments(jet),m_absEta ? fabs(jet.eta()) : jet.eta()));
53}
54
56{
57 return m_uncHist->getValue(jet.pt()*m_energyScale,getNumSegments(jet),m_absEta ? fabs(jet.eta()) : jet.eta());
58}
59
61{
62
63// std::cout << "Calling getNumSegments for component " << getName() << std::endl;
64
65 static const SG::AuxElement::Accessor<int> accNseg("GhostMuonSegmentCount");
66
67 if (!accNseg.isAvailable(jet))
68 {
69 ATH_MSG_ERROR("Failed to retrieve number of segments from the jet");
70 return -1;
71 }
72 return accNseg(jet);
73}
74
75} // end jet namespace
76
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:572
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
virtual bool getValidityImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
virtual PunchthroughUncertaintyComponent * clone() const
PunchthroughUncertaintyComponent(const ComponentHelper &component)
virtual double getUncertaintyImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
UncertaintyComponent(const ComponentHelper &component, const size_t numHist=1)
virtual bool getValidBool(const double validity) const
UncertaintyHistogram * m_validHist
UncertaintyHistogram * m_uncHist
Jet_v1 Jet
Definition of the current "jet version".
EventInfo_v1 EventInfo
Definition of the latest event info version.