ATLAS Offline Software
BJetThreeValueCheck.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 #include "BJetThreeValueCheck.h"
7 
9  const std::string& type,
10  const std::string& name,
11  const IInterface* parent ) :
13  m_acc(nullptr)
14 {
15 }
16 
18  if (m_cFraction < 0 || 1 < m_cFraction) {
19  ATH_MSG_ERROR("c-jet fraction for b-tagger likelihood ratio calculation should be between 0 and 1!");
20  ATH_MSG_ERROR("c-jet fraction requested: " << m_cFraction);
21  return StatusCode::FAILURE;
22  }
23  if ( not m_monTool.name().empty() ) {
24  ATH_CHECK( m_monTool.retrieve() );
25  ATH_MSG_DEBUG("MonTool name: " << m_monTool);
26  }
27  m_acc.reset(new Accessors {
28  std::string(m_bName),
29  std::string(m_cName),
30  std::string(m_uName)});
31  return StatusCode::SUCCESS;
32 }
33 
35 {
36  float b = m_acc->b(btag);
37  float c = m_acc->c(btag);
38  float u = m_acc->u(btag);
39  float f = m_cFraction;
40  float llr = safeLogRatio(b, f*c + (1-f)*u);
42  return llr > m_threshold;
43 }
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
TrigDefs::Group
Group
Properties of a chain group.
Definition: GroupProperties.h:13
BJetThreeValueCheck::m_cFraction
Gaudi::Property< float > m_cFraction
Definition: BJetThreeValueCheck.h:32
BJetThreeValueCheck::m_threshold
Gaudi::Property< float > m_threshold
Definition: BJetThreeValueCheck.h:34
safeLogRatio
float safeLogRatio(float num, float denom)
Definition: safeLogRatio.cxx:9
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:446
BJetThreeValueCheck::m_acc
std::unique_ptr< Accessors > m_acc
Definition: BJetThreeValueCheck.h:36
BJetThreeValueCheck::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: BJetThreeValueCheck.h:38
BJetThreeValueCheck::passThreshold
virtual bool passThreshold(const SG::AuxElement &) const override
Definition: BJetThreeValueCheck.cxx:34
BJetThreeValueCheck::BJetThreeValueCheck
BJetThreeValueCheck(const std::string &type, const std::string &name, const IInterface *parent)
Definition: BJetThreeValueCheck.cxx:8
BJetThreeValueCheck::m_bName
Gaudi::Property< std::string > m_bName
Definition: BJetThreeValueCheck.h:26
BJetThreeValueCheck.h
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:83
BJetThreeValueCheck::m_cName
Gaudi::Property< std::string > m_cName
Definition: BJetThreeValueCheck.h:28
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
BJetThreeValueCheck::Accessors
Definition: BJetThreeValueCheck.h:21
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
BJetThreeValueCheck::m_uName
Gaudi::Property< std::string > m_uName
Definition: BJetThreeValueCheck.h:30
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
BJetThreeValueCheck::m_llrName
Gaudi::Property< std::string > m_llrName
Definition: BJetThreeValueCheck.h:40
BJetThreeValueCheck::initialize
virtual StatusCode initialize() override
Definition: BJetThreeValueCheck.cxx:17
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
safeLogRatio.h
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
AthAlgTool
Definition: AthAlgTool.h:26
python.compressB64.c
def c
Definition: compressB64.py:93