#include <UncertaintyComponent.h>
Inherits asg::AsgMessaging.
Inherited by jet::ClosebyUncertaintyComponent, jet::CombinedMassUncertaintyComponent, jet::ELogMassEtaUncertaintyComponent, jet::ELogMassUncertaintyComponent, jet::FlavourUncertaintyComponent, jet::LargeRTopologyUncertaintyComponent, jet::PerJetFlavourUncertaintyComponent, jet::PileupUncertaintyComponent, jet::PtAbsMassEtaUncertaintyComponent, jet::PtAbsMassUncertaintyComponent, jet::PtEtaUncertaintyComponent, jet::PtLogPtMassForTagSFUncertaintyComponent, jet::PtMassEtaUncertaintyComponent, jet::PtMassUncertaintyComponent, jet::PtUncertaintyComponent, and jet::PunchthroughUncertaintyComponent.
|
| std::string | m_nm |
| | Message source name.
|
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| | MsgStream instance (a std::cout like with print-out levels)
|
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| | MessageSvc pointer.
|
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| | Current logging level.
|
| std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| | Messaging initialized (initMessaging)
|
Definition at line 24 of file UncertaintyComponent.h.
◆ UncertaintyComponent() [1/3]
| jet::UncertaintyComponent::UncertaintyComponent |
( |
const ComponentHelper & | component, |
|
|
const size_t | numHist = 1 ) |
Definition at line 47 of file UncertaintyComponent.cxx.
48 : asg::AsgMessaging(component.name.Data())
50 ,
m_uncHistName(!component.uncNames.empty()?component.uncNames.at(0):
"NONE")
59{
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())
66 ATH_MSG_FATAL(
"Expected " << numHist <<
" uncertainty histograms, but received " << component.uncNames.size() <<
" : " <<
m_uncHistName.Data());
67}
const JetTopology::TypeEnum m_topology
const Interpolate::TypeEnum m_interpolate
const float m_energyScale
const TString m_uncHistName
UncertaintyHistogram * m_validHist
const CompScaleVar::TypeEnum m_scaleVar
const TString m_validHistName
UncertaintyHistogram * m_uncHist
◆ UncertaintyComponent() [2/3]
Definition at line 69 of file UncertaintyComponent.cxx.
70 : asg::AsgMessaging(Form("%s_copy",toCopy.m_uncHistName.Data()))
81{
82
83 if (toCopy.m_uncHist)
84 m_uncHist =
new UncertaintyHistogram(*toCopy.m_uncHist);
85 if (toCopy.m_validHist)
86 m_validHist =
new UncertaintyHistogram(*toCopy.m_validHist);
87}
◆ ~UncertaintyComponent()
| jet::UncertaintyComponent::~UncertaintyComponent |
( |
| ) |
|
|
virtual |
◆ UncertaintyComponent() [3/3]
| jet::UncertaintyComponent::UncertaintyComponent |
( |
const std::string & | name = "" | ) |
|
|
private |
Definition at line 30 of file UncertaintyComponent.cxx.
31 : asg::AsgMessaging(name)
43{
45}
#define JESUNC_NO_DEFAULT_CONSTRUCTOR
◆ clone()
Implemented in jet::ClosebyUncertaintyComponent, jet::CombinedMassUncertaintyComponent, jet::ELogMassEtaUncertaintyComponent, jet::ELogMassUncertaintyComponent, jet::FlavourUncertaintyComponent, jet::LargeRTopologyUncertaintyComponent, jet::PerJetFlavourUncertaintyComponent, jet::PileupUncertaintyComponent, jet::PtAbsMassEtaUncertaintyComponent, jet::PtAbsMassUncertaintyComponent, jet::PtEtaUncertaintyComponent, jet::PtLogPtMassForTagSFUncertaintyComponent, jet::PtMassEtaUncertaintyComponent, jet::PtMassUncertaintyComponent, jet::PtUncertaintyComponent, and jet::PunchthroughUncertaintyComponent.
◆ getAbsMass()
Definition at line 309 of file UncertaintyComponent.cxx.
310{
311
314
315
317 if (
scale.isAvailable(jet))
318 return scale(jet).M();
319
320
321 SG::AuxElement::ConstAccessor<float> scaleTAMoment("JetTrackAssistedMassCalibrated");
323 return scaleTAMoment(jet);
324
325
328
329
332}
#define JESUNC_ERROR_CODE
virtual double m() const
The invariant mass of the particle.
TString getJetScaleString(const TypeEnum type)
TString enumToString(const TypeEnum type)
◆ getMassOverE()
Definition at line 360 of file UncertaintyComponent.cxx.
361{
362
364 return jet.
m()/jet.
e();
365
366
368 if (
scale.isAvailable(jet))
370
371
372 SG::AuxElement::ConstAccessor<float> scaleTAMoment("JetTrackAssistedMassCalibrated");
374 return scaleTAMoment(jet)/jet.
e();
375
376
378 return jet.
m()/jet.
e();
379
380
383
384}
virtual double e() const
The total energy of the particle.
◆ getMassOverPt()
Definition at line 334 of file UncertaintyComponent.cxx.
335{
336
338 return jet.
m()/jet.
pt();
339
340
342 if (
scale.isAvailable(jet))
344
345
346 SG::AuxElement::ConstAccessor<float> scaleTAMoment("JetTrackAssistedMassCalibrated");
348 return scaleTAMoment(jet)/jet.
pt();
349
350
352 return jet.
m()/jet.
pt();
353
354
357
358}
virtual double pt() const
The transverse momentum ( ) of the particle.
◆ getName()
| virtual TString jet::UncertaintyComponent::getName |
( |
| ) |
const |
|
inlinevirtual |
◆ getScaleVar()
◆ getSplitFactor()
| double jet::UncertaintyComponent::getSplitFactor |
( |
const xAOD::Jet & | jet | ) |
const |
|
protectedvirtual |
Definition at line 196 of file UncertaintyComponent.cxx.
197{
198
200 return 1;
201
202
203 double splitFactor = 1;
205
207 {
208
209
210
211
212
213 const double minPt =
histo->GetXaxis()->GetBinLowEdge(1);
214 const double maxPt =
histo->GetXaxis()->GetBinLowEdge(
histo->GetNbinsX()+1);
216
217 const double slope = 1./(
log(maxPt)-
log(minPt));
218 const double intercept = -slope*
log(minPt);
219
220 splitFactor = slope*
log(valPt <= minPt ? minPt+1.e-3 : valPt >= maxPt ? maxPt-1.e-3 : valPt)+intercept;
221 }
223 {
224
225
226
227
228 const double minEta = 0;
229 const double maxEta = 4.5;
231
232 const double slope = 1./(
maxEta - minEta);
233 const double intercept = -slope*minEta;
234
236 }
238 {
239
240
241
242
243
244
245
246
247
248 const double minPt =
histo->GetXaxis()->GetBinLowEdge(1);
249 const double maxPt =
histo->GetXaxis()->GetBinLowEdge(
histo->GetNbinsX()+1);
251
252 const double minEta = 0;
253 const double maxEta = 4.5;
255
256 const double slopePt = 1./(
log(maxPt)-
log(minPt));
257 const double slopeEta = 1./(
maxEta-minEta);
258
259 const double fixedPt = valPt <= minPt ? minPt+1.e-3 : valPt >= maxPt ? maxPt - 1.e-3 : valPt;
261
262 splitFactor = (slopePt*(
log(fixedPt)-
log(minPt)) + slopeEta*(fixedEta-minEta))/2.;
263 }
265 {
266
267
268
269 const double minPt =
histo->GetXaxis()->GetBinLowEdge(1);
270 const double maxPt =
histo->GetXaxis()->GetBinLowEdge(
histo->GetNbinsX()+1);
272
273 const double minEta = 0;
274 const double maxEta = 4.5;
276
277 const double slopePt = 1./(
log(maxPt)-
log(minPt));
278 const double slopeEta = 1./(
maxEta-minEta);
279
280 const double fixedPt = valPt <= minPt ? minPt+1.e-3 : valPt >= maxPt ? maxPt - 1.e-3 : valPt;
282
283 splitFactor = (slopePt*(
log(fixedPt)-
log(minPt)) + slopeEta*(
maxEta-fixedEta))/2.;
284 }
285
286
287
289 splitFactor = sqrt(1-splitFactor*splitFactor);
290
291 return splitFactor;
292}
virtual double eta() const
The pseudorapidity ( ) of the particle.
bool absEta(const xAOD::TauJet &tau, float &out)
◆ getTopology()
◆ getUncertainty()
Definition at line 169 of file UncertaintyComponent.cxx.
170{
172 {
175 }
177}
virtual double getUncertaintyImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const =0
virtual double getSplitFactor(const xAOD::Jet &jet) const
◆ getUncertaintyImpl()
| virtual double jet::UncertaintyComponent::getUncertaintyImpl |
( |
const xAOD::Jet & | jet, |
|
|
const xAOD::EventInfo & | eInfo ) const |
|
protectedpure virtual |
Implemented in jet::ClosebyUncertaintyComponent, jet::CombinedMassUncertaintyComponent, jet::ELogMassEtaUncertaintyComponent, jet::ELogMassUncertaintyComponent, jet::FlavourUncertaintyComponent, jet::LargeRTopologyUncertaintyComponent, jet::PerJetFlavourUncertaintyComponent, jet::PileupUncertaintyComponent, jet::PtAbsMassEtaUncertaintyComponent, jet::PtAbsMassUncertaintyComponent, jet::PtEtaUncertaintyComponent, jet::PtLogPtMassForTagSFUncertaintyComponent, jet::PtMassEtaUncertaintyComponent, jet::PtMassUncertaintyComponent, jet::PtUncertaintyComponent, and jet::PunchthroughUncertaintyComponent.
◆ getValidBool()
| bool jet::UncertaintyComponent::getValidBool |
( |
const double | validity | ) |
const |
|
protectedvirtual |
Definition at line 301 of file UncertaintyComponent.cxx.
302{
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;
306 return false;
307}
virtual TString getValidName() const
◆ getValidity()
Definition at line 159 of file UncertaintyComponent.cxx.
160{
162 {
164 return false;
165 }
167}
virtual bool getValidityImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const =0
◆ getValidityImpl()
Implemented in jet::ClosebyUncertaintyComponent, jet::CombinedMassUncertaintyComponent, jet::ELogMassEtaUncertaintyComponent, jet::ELogMassUncertaintyComponent, jet::FlavourUncertaintyComponent, jet::LargeRTopologyUncertaintyComponent, jet::PerJetFlavourUncertaintyComponent, jet::PileupUncertaintyComponent, jet::PtAbsMassEtaUncertaintyComponent, jet::PtAbsMassUncertaintyComponent, jet::PtEtaUncertaintyComponent, jet::PtLogPtMassForTagSFUncertaintyComponent, jet::PtMassEtaUncertaintyComponent, jet::PtMassUncertaintyComponent, jet::PtUncertaintyComponent, and jet::PunchthroughUncertaintyComponent.
◆ getValidName()
| virtual TString jet::UncertaintyComponent::getValidName |
( |
| ) |
const |
|
inlinevirtual |
◆ getValidUncertainty()
| bool jet::UncertaintyComponent::getValidUncertainty |
( |
double & | unc, |
|
|
const xAOD::Jet & | jet, |
|
|
const xAOD::EventInfo & | eInfo ) const |
|
virtual |
Definition at line 179 of file UncertaintyComponent.cxx.
180{
182 {
184 return true;
185 }
186 return false;
187}
virtual double getUncertainty(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
virtual bool getValidity(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
◆ initialize()
| StatusCode jet::UncertaintyComponent::initialize |
( |
TFile * | histFile | ) |
|
|
virtual |
◆ initMessaging()
| void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
40{
42
43 if (
m_lvl == MSG::NIL) {
47 }
48}
std::string m_nm
Message source name.
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
std::atomic< MSG::Level > m_lvl
Current logging level.
IMessageSvc * getMessageSvc(bool quiet=false)
◆ isAlwaysZero()
| bool jet::UncertaintyComponent::isAlwaysZero |
( |
| ) |
const |
|
virtual |
◆ msg() [1/2]
| MsgStream & asg::AsgMessaging::msg |
( |
| ) |
const |
|
inherited |
The standard message stream.
- Returns
- A reference to the default message stream of this object.
Definition at line 49 of file AsgMessaging.cxx.
49 {
50#ifndef XAOD_STANDALONE
51 return ::AthMessaging::msg();
52#else
53 return m_msg;
54#endif
55 }
◆ msg() [2/2]
| MsgStream & asg::AsgMessaging::msg |
( |
const MSG::Level | lvl | ) |
const |
|
inherited |
The standard message stream.
- Parameters
-
| lvl | The message level to set the stream to |
- Returns
- A reference to the default message stream, set to level "lvl"
Definition at line 57 of file AsgMessaging.cxx.
57 {
58#ifndef XAOD_STANDALONE
59 return ::AthMessaging::msg( lvl );
60#else
61 m_msg << lvl;
62 return m_msg;
63#endif
64 }
◆ msgLvl()
| bool asg::AsgMessaging::msgLvl |
( |
const MSG::Level | lvl | ) |
const |
|
inherited |
Test the output level of the object.
- Parameters
-
| lvl | The message level to test against |
- Returns
- boolean Indicting if messages at given level will be printed
-
true If messages at level "lvl" will be printed
Definition at line 41 of file AsgMessaging.cxx.
41 {
42#ifndef XAOD_STANDALONE
43 return ::AthMessaging::msgLvl( lvl );
44#else
45 return m_msg.msgLevel( lvl );
46#endif
47 }
◆ setLevel()
| void AthMessaging::setLevel |
( |
MSG::Level | lvl | ) |
|
|
inherited |
◆ ATLAS_THREAD_SAFE
| std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_energyScale
| const float jet::UncertaintyComponent::m_energyScale {} |
|
protected |
◆ m_imsg
| std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_interpolate
◆ m_isInit
| bool jet::UncertaintyComponent::m_isInit {} |
|
protected |
◆ m_lvl
| std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_msg_tls
| boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_nm
| std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_numExpectedHist
| int jet::UncertaintyComponent::m_numExpectedHist {} |
|
protected |
◆ m_scaleVar
◆ m_splitNumber
| const int jet::UncertaintyComponent::m_splitNumber {} |
|
protected |
◆ m_topology
◆ m_uncHist
◆ m_uncHistName
| const TString jet::UncertaintyComponent::m_uncHistName |
|
protected |
◆ m_validHist
◆ m_validHistName
| const TString jet::UncertaintyComponent::m_validHistName |
|
protected |
The documentation for this class was generated from the following files: