ATLAS Offline Software
MatchingTool.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef TRIGGERMATCHINGTOOL_MATCHINGTOOL_H
8 #define TRIGGERMATCHINGTOOL_MATCHINGTOOL_H
9 
10 // Framework include(s):
11 #include "AsgTools/AsgTool.h"
12 #include "AsgTools/ToolHandle.h"
13 
19 
20 namespace Trig {
21 
22 class MatchingTool : public asg::AsgTool,
23  virtual public Trig::IMatchingTool {
25 
26 public:
27  friend class MatchingImplementation;
28  MatchingTool(const std::string& name);
29  ~MatchingTool();
30  StatusCode initialize() override;
31 
32  bool match(const std::vector<const xAOD::IParticle*>& recoObjects, const std::string& chain, double matchTreshold, bool rerun) const override;
33  bool match(const xAOD::IParticle& recoObjects, const std::string& chain, double matchTreshold, bool rerun) const override;
34 
35 protected:
36  const MatchingImplementation* impl() const override;
37 
38  bool matchSingleType(const std::vector<const xAOD::IParticle*>& subRecoObjects, Trig::Combination& comb, const std::string& chain, double threshold) const;
39 
40  bool matchCombination(const std::vector<const xAOD::IParticle*>& recoObjects, Trig::Combination& comb, const std::string& chain, double threshold) const;
41 
42 
43 #ifndef XAOD_STANDALONE
44  void updateThreshold(Gaudi::Details::PropertyBase& p);
45 #endif
46 
47 private:
48 
51  ToolHandle<Trig::TrigDecisionTool> m_trigDecTool;
52  ToolHandle<Trig::IMatchScoringTool> m_scoreTool{
53  this, "ScoringTool", "Trig::DRScoringTool","Tool to score pairs of particles"};
55 };
56 
57 }
58 
59 #endif
Combination.h
Trig::MatchingTool::m_impl
MatchingImplementation * m_impl
Definition: MatchingTool.h:49
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
TypeMap.h
Trig
The common trigger namespace for trigger analysis tools.
Definition: LArCellMonAlg.h:33
Trig::MatchingTool::match
bool match(const std::vector< const xAOD::IParticle * > &recoObjects, const std::string &chain, double matchTreshold, bool rerun) const override
multi-object trigger matching
Definition: MatchingTool.cxx:144
Trig::MatchingTool
Definition: MatchingTool.h:23
TrigDecisionTool.h
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
TypeMap
Definition: TypeMap.h:14
Trig::MatchingTool::updateThreshold
void updateThreshold(Gaudi::Details::PropertyBase &p)
Definition: MatchingTool.cxx:23
Trig::MatchingImplementation
Definition: MatchingImplementation.h:33
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
IMatchScoringTool.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Trig::Combination
Definition: Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Combination.h:55
Trig::MatchingTool::matchCombination
bool matchCombination(const std::vector< const xAOD::IParticle * > &recoObjects, Trig::Combination &comb, const std::string &chain, double threshold) const
Definition: MatchingTool.cxx:42
Trig::MatchingTool::m_typeMap
TypeMap m_typeMap
Definition: MatchingTool.h:50
Trig::MatchingTool::m_scoreTool
ToolHandle< Trig::IMatchScoringTool > m_scoreTool
Definition: MatchingTool.h:52
Trig::MatchingTool::impl
const MatchingImplementation * impl() const override
Definition: MatchingTool.cxx:175
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
threshold
Definition: chainparser.cxx:74
Trig::MatchingTool::MatchingTool
MatchingTool(const std::string &name)
Definition: MatchingTool.cxx:13
IMatchingTool.h
Trig::MatchingTool::~MatchingTool
~MatchingTool()
Definition: MatchingTool.cxx:29
Trig::MatchingTool::m_matchingThreshold
double m_matchingThreshold
Definition: MatchingTool.h:54
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
Trig::MatchingTool::matchSingleType
bool matchSingleType(const std::vector< const xAOD::IParticle * > &subRecoObjects, Trig::Combination &comb, const std::string &chain, double threshold) const
Definition: MatchingTool.cxx:70
Trig::MatchingTool::m_trigDecTool
ToolHandle< Trig::TrigDecisionTool > m_trigDecTool
Definition: MatchingTool.h:51
ToolHandle.h
AsgTool.h
Trig::MatchingTool::initialize
StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: MatchingTool.cxx:33
Trig::IMatchingTool
Definition: IMatchingTool.h:24