ATLAS Offline Software
TopTriggerCPTools.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 #ifndef TOPCPTOOLS_TOPTRIGGERCPTOOLS_H_
6 #define TOPCPTOOLS_TOPTRIGGERCPTOOLS_H_
7 
8 // Include what you use
9 #include <unordered_map>
10 #include <string>
11 #include <vector>
12 
13 // Framework include(s):
14 #include "AsgTools/AsgTool.h"
15 #include "AsgTools/ToolHandle.h"
17 #include "AsgTools/AnaToolHandle.h"
18 
19 // Trigger include(s):
26 // Need to have these tools held in the class
30 
31 namespace top {
32  class TopConfig;
33 
34  class TriggerCPTools final: public asg::AsgTool {
35  public:
36  explicit TriggerCPTools(const std::string& name);
37  virtual ~TriggerCPTools() {}
38 
40  private:
41  std::shared_ptr<top::TopConfig> m_config;
42 
43  ToolHandle<TrigConf::ITrigConfigTool> m_trigConfTool;
44  ToolHandle<Trig::TrigDecisionTool> m_trigDecisionTool;
45  ToolHandle<Trig::IMatchingTool> m_trigMatchTool;
46  ToolHandle<Trig::IMatchScoringTool> m_trigScoringTool;
47  ToolHandle<Trig::ITrigTauMatchingTool> m_trigMatchTauTool;
48  ToolHandle<ITrigGlobalEfficiencyCorrectionTool> m_globalTriggerEffTool;
49  ToolHandle<ITrigGlobalEfficiencyCorrectionTool> m_globalTriggerEffToolLoose;
51  std::string mapWorkingPoints(const std::string& type);
52  // check of the trigger names are one of the supported
53  std::string PhotonKeys(const std::unordered_map<std::string, std::vector<std::pair<std::string, int> > >& map) const;
54  // check if the photon isolation is supported by the global triggers
55  StatusCode CheckPhotonIsolation(const std::string& isol) const;
56 
57  // Tool handles for the CP tools, need to be members here, or inaccessible to global trigger tool
60  std::vector<asg::AnaToolHandle<IAsgElectronEfficiencyCorrectionTool> > m_electronToolsFactory;
61  std::vector<asg::AnaToolHandle<IAsgElectronEfficiencyCorrectionTool> > m_electronToolsFactoryLoose;
62  std::vector<asg::AnaToolHandle<IAsgPhotonEfficiencyCorrectionTool> > m_photonToolsFactory;
63  std::vector<asg::AnaToolHandle<IAsgPhotonEfficiencyCorrectionTool> > m_photonToolsFactoryLoose;
64  };
65 } // namespace top
66 
67 #endif // TOPCPTOOLS_TOPTRIGGERCPTOOLS_H_
top::TriggerCPTools::m_electronToolsFactory
std::vector< asg::AnaToolHandle< IAsgElectronEfficiencyCorrectionTool > > m_electronToolsFactory
Definition: TopTriggerCPTools.h:60
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
asg::AnaToolHandle< CP::IMuonTriggerScaleFactors >
top::TriggerCPTools::m_config
std::shared_ptr< top::TopConfig > m_config
Definition: TopTriggerCPTools.h:41
top::TriggerCPTools::m_trigScoringTool
ToolHandle< Trig::IMatchScoringTool > m_trigScoringTool
Definition: TopTriggerCPTools.h:46
top
TopConfig A simple configuration that is NOT a singleton.
Definition: AnalysisTrackingHelper.cxx:58
top::TriggerCPTools::m_trigDecisionTool
ToolHandle< Trig::TrigDecisionTool > m_trigDecisionTool
Definition: TopTriggerCPTools.h:44
IAsgElectronEfficiencyCorrectionTool.h
ITrigConfigTool.h
ITrigGlobalEfficiencyCorrectionTool.h
top::TriggerCPTools::m_photonToolsFactory
std::vector< asg::AnaToolHandle< IAsgPhotonEfficiencyCorrectionTool > > m_photonToolsFactory
Definition: TopTriggerCPTools.h:62
top::TriggerCPTools::m_trigConfTool
ToolHandle< TrigConf::ITrigConfigTool > m_trigConfTool
Definition: TopTriggerCPTools.h:43
top::TriggerCPTools::m_globalTriggerEffToolLoose
ToolHandle< ITrigGlobalEfficiencyCorrectionTool > m_globalTriggerEffToolLoose
Definition: TopTriggerCPTools.h:49
top::TriggerCPTools::m_muonToolLoose
asg::AnaToolHandle< CP::IMuonTriggerScaleFactors > m_muonToolLoose
Definition: TopTriggerCPTools.h:59
top::TriggerCPTools::m_electronToolsFactoryLoose
std::vector< asg::AnaToolHandle< IAsgElectronEfficiencyCorrectionTool > > m_electronToolsFactoryLoose
Definition: TopTriggerCPTools.h:61
TrigDecisionTool.h
top::TriggerCPTools::PhotonKeys
std::string PhotonKeys(const std::unordered_map< std::string, std::vector< std::pair< std::string, int > > > &map) const
Definition: TopTriggerCPTools.cxx:555
IAsgPhotonEfficiencyCorrectionTool.h
ToolHandleArray.h
IMatchScoringTool.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
top::TriggerCPTools::m_photonToolsFactoryLoose
std::vector< asg::AnaToolHandle< IAsgPhotonEfficiencyCorrectionTool > > m_photonToolsFactoryLoose
Definition: TopTriggerCPTools.h:63
top::TriggerCPTools::~TriggerCPTools
virtual ~TriggerCPTools()
Definition: TopTriggerCPTools.h:37
IMuonTriggerScaleFactors.h
top::TriggerCPTools::m_muonTool
asg::AnaToolHandle< CP::IMuonTriggerScaleFactors > m_muonTool
Definition: TopTriggerCPTools.h:58
top::TriggerCPTools::TriggerCPTools
TriggerCPTools(const std::string &name)
Definition: TopTriggerCPTools.cxx:38
AnaToolHandle.h
top::TriggerCPTools
Definition: TopTriggerCPTools.h:34
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
ITrigTauMatching.h
top::TriggerCPTools::mapWorkingPoints
std::string mapWorkingPoints(const std::string &type)
Definition: TopTriggerCPTools.cxx:523
top::TriggerCPTools::m_trigMatchTauTool
ToolHandle< Trig::ITrigTauMatchingTool > m_trigMatchTauTool
Definition: TopTriggerCPTools.h:47
IMatchingTool.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
top::TriggerCPTools::initialize
StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: TopTriggerCPTools.cxx:52
top::TriggerCPTools::initialiseGlobalTriggerEff
StatusCode initialiseGlobalTriggerEff()
Definition: TopTriggerCPTools.cxx:142
ToolHandle.h
AsgTool.h
top::TriggerCPTools::m_trigMatchTool
ToolHandle< Trig::IMatchingTool > m_trigMatchTool
Definition: TopTriggerCPTools.h:45
top::TriggerCPTools::CheckPhotonIsolation
StatusCode CheckPhotonIsolation(const std::string &isol) const
Definition: TopTriggerCPTools.cxx:583
top::TriggerCPTools::m_globalTriggerEffTool
ToolHandle< ITrigGlobalEfficiencyCorrectionTool > m_globalTriggerEffTool
Definition: TopTriggerCPTools.h:48