ATLAS Offline Software
Loading...
Searching...
No Matches
BJetTwoValueCheck.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 "BJetTwoValueCheck.h"
7
9 const std::string& type,
10 const std::string& name,
11 const IInterface* parent ) :
12 AthAlgTool( type, name, parent ),
13 m_acc(nullptr)
14{
15}
16
18 m_acc.reset(new Accessors {
19 std::string(m_numName),
20 std::string(m_denomName)});
21 if ( not m_monTool.name().empty() ) {
22 ATH_CHECK( m_monTool.retrieve() );
23 ATH_MSG_DEBUG("MonTool name: " << m_monTool);
24 }
25 return StatusCode::SUCCESS;
26}
27
29{
30 float n = m_acc->n(bjet);
31 float d = m_acc->d(bjet);
32 float llr = safeLogRatio(n, d);
34 return llr > m_threshold;
35}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
Header file to be included by clients of the Monitored infrastructure.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
std::unique_ptr< Accessors > m_acc
Gaudi::Property< float > m_threshold
virtual StatusCode initialize() override
BJetTwoValueCheck(const std::string &type, const std::string &name, const IInterface *parent)
Gaudi::Property< std::string > m_llrName
Gaudi::Property< std::string > m_denomName
virtual bool passThreshold(const xAOD::Jet &) const override
Gaudi::Property< std::string > m_numName
ToolHandle< GenericMonitoringTool > m_monTool
Group of local monitoring quantities and retain correlation when filling histograms
Declare a monitored scalar variable.
Jet_v1 Jet
Definition of the current "jet version".
float safeLogRatio(float num, float denom)