ATLAS Offline Software
Loading...
Searching...
No Matches
DiTauWPDecorator.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7//=================================PUBLIC-PART==================================
8//______________________________________________________________________________
9DiTauWPDecorator::DiTauWPDecorator( const std::string& type, const std::string& name, const IInterface * parent) :
10 DiTauToolBase(type, name, parent)
11{
12 declareInterface<DiTauToolBase > (this);
13}
14
15//______________________________________________________________________________
17
18//______________________________________________________________________________
20{
21 if (!m_ditauContainerName.empty() && m_decorWPs.empty()) {
22 ATH_MSG_ERROR("DiTauContainerName is provided but DecorWPNames is empty");
23 return StatusCode::FAILURE;
24 }
25
26 for (size_t wpIndex=0; wpIndex < m_decorWPs.size(); ++wpIndex) {
28 }
29
30 return StatusCode::SUCCESS;
31}
32
33StatusCode DiTauWPDecorator::executeObj( xAOD::DiTauJet &xDiTau, const EventContext& /*ctx*/) const
34{
36 float score = acc_score(xDiTau);
37
38 // Decorate other WPs
39 for (size_t wpIndex=0; wpIndex < m_decorWPs.size(); ++wpIndex) {
40 const SG::Accessor<char>& decorator = m_charDecors[wpIndex];
41 decorator(xDiTau) = passOmniWP(score,m_decorWPCuts[wpIndex]);
42 }
43
44 return StatusCode::SUCCESS;
45}
46
47bool DiTauWPDecorator::passOmniWP(float score, float wp_thrshold ) const{
48 return score > wp_thrshold;
49}
50
51
52
53
#define ATH_MSG_ERROR(x)
DiTauToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Gaudi::Property< std::vector< float > > m_decorWPCuts
Gaudi::Property< std::vector< std::string > > m_decorWPs
bool passOmniWP(float score, float wp_thrshold) const
Gaudi::Property< std::string > m_scoreName
virtual ~DiTauWPDecorator()
DiTauWPDecorator(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode executeObj(xAOD::DiTauJet &xDiTau, const EventContext &ctx) const override
Execute - called for each Ditau jet.
virtual StatusCode initialize() override
Tool initializer.
Gaudi::Property< std::string > m_ditauContainerName
std::vector< SG::AuxElement::Accessor< char > > m_charDecors
Helper class to provide type-safe access to aux data.
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:572
Helper class to provide constant type-safe access to aux data.
DiTauJet_v1 DiTauJet
Definition of the current version.
Definition DiTauJet.h:17