ATLAS Offline Software
TrigGlobalEfficiencyAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #ifndef TRIGGER_ANALYSIS_ALGORITHMS__TRIG_GLOBAL_EFFICIENCY_ALG_H
8 #define TRIGGER_ANALYSIS_ALGORITHMS__TRIG_GLOBAL_EFFICIENCY_ALG_H
9 
10 // Algorithm includes
18 
19 // Framework includes
23 #include <xAODMuon/MuonContainer.h>
25 #include <AsgTools/AsgTool.h>
26 #include <AsgTools/ToolHandle.h>
28 #include <AsgTools/AnaToolHandle.h>
29 
30 // Trigger includes
37 
38 namespace CP
39 {
41  public:
42  TrigGlobalEfficiencyAlg(const std::string& name, ISvcLocator* pSvcLocator = nullptr);
43 
44  virtual StatusCode initialize() final override;
45  virtual StatusCode execute() final override;
46  virtual StatusCode finalize() final override;
47 
48  private:
50 
52  Gaudi::Property<bool> m_isRun3Geo {this, "isRun3Geo", false, "use Run 3 settings for efficiency correction tools?"};
53 
55  ToolHandle<Trig::IMatchingTool> m_trigMatchingTool;
56 
59 
61  Gaudi::Property<std::vector<std::string>> m_trigList_2015 {this, "triggers_2015", {}, "2015 trigger selection list"};
62  Gaudi::Property<std::vector<std::string>> m_trigList_2016 {this, "triggers_2016", {}, "2016 trigger selection list"};
63  Gaudi::Property<std::vector<std::string>> m_trigList_2017 {this, "triggers_2017", {}, "2017 trigger selection list"};
64  Gaudi::Property<std::vector<std::string>> m_trigList_2018 {this, "triggers_2018", {}, "2018 trigger selection list"};
65  Gaudi::Property<std::vector<std::string>> m_trigList_2022 {this, "triggers_2022", {}, "2022 trigger selection list"};
66  Gaudi::Property<std::vector<std::string>> m_trigList_2023 {this, "triggers_2023", {}, "2023 trigger selection list"};
67  Gaudi::Property<std::vector<std::string>> m_trigList_2024 {this, "triggers_2024", {}, "2024 trigger selection list"};
68  Gaudi::Property<std::vector<std::string>> m_trigList_2025 {this, "triggers_2025", {}, "2025 trigger selection list"};
69 
71  Gaudi::Property<bool> m_noFilter {this, "noFilter", false, "whether to not apply an event filter"};
73  SysFilterReporterParams m_filterParams {this, "global trigger matching"};
74 
76  Gaudi::Property<bool> m_doMatchingOnly {this, "doMatchingOnly", false, "whether to disable efficiency SFs and apply matching only"};
77 
80  this, "scaleFactorDecoration", "", "the decoration for the global trigger efficiency scale factor"
81  };
82 
85  this, "matchingDecoration", "", "the decoration for the global trigger matching decision"
86  };
87 
90  this, "electrons", "", "the electron container to use"
91  };
92 
95  this, "electronSelection", "", "the selection on the input electrons"
96  };
97 
100  this, "muons", "", "the muon container to use"
101  };
102 
105  this, "muonSelection", "", "the selection on the input muons"
106  };
107 
110  this, "photons", "", "the photon container to use"
111  };
112 
115  this, "photonSelection", "", "the selection on the input photons"
116  };
117 
120  this, "eventInfoContainer", "EventInfo", "the EventInfo container to decorate to"
121  };
122 
123 
127  std::vector<asg::AnaToolHandle<IAsgElectronEfficiencyCorrectionTool> > m_electronToolsFactory;
129  std::vector<asg::AnaToolHandle<IAsgPhotonEfficiencyCorrectionTool> > m_photonToolsFactory;
130 
132  Gaudi::Property<std::string> m_electronID {this, "electronID", "", "electron ID WP"};
134  Gaudi::Property<std::string> m_electronIsol {this, "electronIsol", "", "electron Isolation WP"};
136  Gaudi::Property<std::string> m_photonIsol {this, "photonIsol", "", "photon Isolation WP"};
138  Gaudi::Property<std::string> m_muonID {this, "muonID", "", "muon ID/Quality WP"};
139 
140  }; // class TrigGlobalEfficiencyAlg
141 } // namespace CP
142 
143 #endif /* TRIGGER_ANALYSIS_ALGORITHMS__TRIG_GLOBAL_EFFICIENCY_ALG_H */
PropertyWrapper.h
asg::AnaToolHandle< ITrigGlobalEfficiencyCorrectionTool >
CP::SysListHandle
a class managing the property to configure the list of systematics to process
Definition: SysListHandle.h:33
SysWriteDecorHandle.h
CP::TrigGlobalEfficiencyAlg::m_muonTool
asg::AnaToolHandle< IMuonTriggerScaleFactors > m_muonTool
the muon trigger SF handle
Definition: TrigGlobalEfficiencyAlg.h:125
CP::TrigGlobalEfficiencyAlg::m_systematicsList
SysListHandle m_systematicsList
Definition: TrigGlobalEfficiencyAlg.h:49
IAsgElectronEfficiencyCorrectionTool.h
ITrigGlobalEfficiencyCorrectionTool.h
CP::TrigGlobalEfficiencyAlg::m_scaleFactorDecoration
SysWriteDecorHandle< float > m_scaleFactorDecoration
decoration of the global trigger SF
Definition: TrigGlobalEfficiencyAlg.h:79
CP::TrigGlobalEfficiencyAlg::m_photonToolsFactory
std::vector< asg::AnaToolHandle< IAsgPhotonEfficiencyCorrectionTool > > m_photonToolsFactory
RAII on-the-fly tool creation for photons.
Definition: TrigGlobalEfficiencyAlg.h:129
CP::TrigGlobalEfficiencyAlg::m_isRun3Geo
Gaudi::Property< bool > m_isRun3Geo
whether to use Run 3 settings
Definition: TrigGlobalEfficiencyAlg.h:52
CP::TrigGlobalEfficiencyAlg::m_photonIsol
Gaudi::Property< std::string > m_photonIsol
photon Isolation
Definition: TrigGlobalEfficiencyAlg.h:136
CP::TrigGlobalEfficiencyAlg::m_muonSelection
SysReadSelectionHandle m_muonSelection
input muon selection
Definition: TrigGlobalEfficiencyAlg.h:104
IAsgPhotonEfficiencyCorrectionTool.h
CP::SysReadHandle< xAOD::ElectronContainer >
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
CP::TrigGlobalEfficiencyAlg::m_electronSelection
SysReadSelectionHandle m_electronSelection
input electron selection
Definition: TrigGlobalEfficiencyAlg.h:94
CP::TrigGlobalEfficiencyAlg::m_photonSelection
SysReadSelectionHandle m_photonSelection
input photon selection
Definition: TrigGlobalEfficiencyAlg.h:114
SysReadHandle.h
CP::TrigGlobalEfficiencyAlg::m_doMatchingOnly
Gaudi::Property< bool > m_doMatchingOnly
whether to only run the global trigger matching, and not compute efficiency SFs
Definition: TrigGlobalEfficiencyAlg.h:76
CP::TrigGlobalEfficiencyAlg::m_trigMatchingTool
ToolHandle< Trig::IMatchingTool > m_trigMatchingTool
trigger matching tool
Definition: TrigGlobalEfficiencyAlg.h:55
ImportData.h
AsgMessaging.h
SysWriteHandle.h
AnaAlgorithm.h
CP::TrigGlobalEfficiencyAlg::m_trigList_2016
Gaudi::Property< std::vector< std::string > > m_trigList_2016
Definition: TrigGlobalEfficiencyAlg.h:62
CP::TrigGlobalEfficiencyAlg::initialize
virtual StatusCode initialize() final override
Definition: TrigGlobalEfficiencyAlg.cxx:20
ToolHandleArray.h
EL::AnaAlgorithm
the (new) base class for EventLoop algorithms
Definition: AnaAlgorithm.h:73
CP::TrigGlobalEfficiencyAlg::m_tgecTool
asg::AnaToolHandle< ITrigGlobalEfficiencyCorrectionTool > m_tgecTool
Trigger Global Efficiency Correction Tool handle.
Definition: TrigGlobalEfficiencyAlg.h:58
ElectronContainer.h
CP::TrigGlobalEfficiencyAlg::m_electronToolsFactory
std::vector< asg::AnaToolHandle< IAsgElectronEfficiencyCorrectionTool > > m_electronToolsFactory
RAII on-the-fly tool creation for electrons.
Definition: TrigGlobalEfficiencyAlg.h:127
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CP::TrigGlobalEfficiencyAlg::m_trigList_2017
Gaudi::Property< std::vector< std::string > > m_trigList_2017
Definition: TrigGlobalEfficiencyAlg.h:63
IMuonTriggerScaleFactors.h
CP::TrigGlobalEfficiencyAlg::m_eventInfoHandle
SysReadHandle< xAOD::EventInfo > m_eventInfoHandle
EventInfo to decorate.
Definition: TrigGlobalEfficiencyAlg.h:119
AnaToolHandle.h
CP::TrigGlobalEfficiencyAlg::m_trigList_2025
Gaudi::Property< std::vector< std::string > > m_trigList_2025
Definition: TrigGlobalEfficiencyAlg.h:68
SysFilterReporterParams.h
CP::TrigGlobalEfficiencyAlg::m_electronsHandle
SysReadHandle< xAOD::ElectronContainer > m_electronsHandle
input electron collection
Definition: TrigGlobalEfficiencyAlg.h:89
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
SysReadSelectionHandle.h
CP::TrigGlobalEfficiencyAlg::m_trigList_2023
Gaudi::Property< std::vector< std::string > > m_trigList_2023
Definition: TrigGlobalEfficiencyAlg.h:66
EventInfo.h
CP::TrigGlobalEfficiencyAlg::m_muonID
Gaudi::Property< std::string > m_muonID
muon quality
Definition: TrigGlobalEfficiencyAlg.h:138
MuonContainer.h
CP::TrigGlobalEfficiencyAlg::finalize
virtual StatusCode finalize() final override
Definition: TrigGlobalEfficiencyAlg.cxx:275
IMatchingTool.h
CP::TrigGlobalEfficiencyAlg::m_matchingDecoration
SysWriteDecorHandle< char > m_matchingDecoration
decoration of the global trigger matching flag
Definition: TrigGlobalEfficiencyAlg.h:84
CP::TrigGlobalEfficiencyAlg::m_photonsHandle
SysReadHandle< xAOD::PhotonContainer > m_photonsHandle
input photon collection
Definition: TrigGlobalEfficiencyAlg.h:109
CP::TrigGlobalEfficiencyAlg::m_trigList_2018
Gaudi::Property< std::vector< std::string > > m_trigList_2018
Definition: TrigGlobalEfficiencyAlg.h:64
CP::TrigGlobalEfficiencyAlg::execute
virtual StatusCode execute() final override
Definition: TrigGlobalEfficiencyAlg.cxx:210
CP::TrigGlobalEfficiencyAlg::m_noFilter
Gaudi::Property< bool > m_noFilter
whether to not apply an event filter
Definition: TrigGlobalEfficiencyAlg.h:71
CP::TrigGlobalEfficiencyAlg::m_filterParams
SysFilterReporterParams m_filterParams
the filter reporter params
Definition: TrigGlobalEfficiencyAlg.h:73
CP::SysReadSelectionHandle
a data handle for reading systematically varied selection properties from objects
Definition: SysReadSelectionHandle.h:32
CP::SysFilterReporterParams
the properties and persistent data for systematics aware filter reporters
Definition: SysFilterReporterParams.h:38
CP::TrigGlobalEfficiencyAlg::m_electronID
Gaudi::Property< std::string > m_electronID
electron ID
Definition: TrigGlobalEfficiencyAlg.h:132
CP::TrigGlobalEfficiencyAlg::m_muonsHandle
SysReadHandle< xAOD::MuonContainer > m_muonsHandle
input muon collection
Definition: TrigGlobalEfficiencyAlg.h:99
ToolHandle.h
CP::TrigGlobalEfficiencyAlg::m_trigList_2024
Gaudi::Property< std::vector< std::string > > m_trigList_2024
Definition: TrigGlobalEfficiencyAlg.h:67
CP::SysWriteDecorHandle< float >
AsgTool.h
CP::TrigGlobalEfficiencyAlg::m_electronIsol
Gaudi::Property< std::string > m_electronIsol
electron Isolation
Definition: TrigGlobalEfficiencyAlg.h:134
CP::TrigGlobalEfficiencyAlg::TrigGlobalEfficiencyAlg
TrigGlobalEfficiencyAlg(const std::string &name, ISvcLocator *pSvcLocator=nullptr)
Definition: TrigGlobalEfficiencyAlg.cxx:13
PhotonContainer.h
CP::TrigGlobalEfficiencyAlg
Definition: TrigGlobalEfficiencyAlg.h:40
CP::TrigGlobalEfficiencyAlg::m_trigList_2015
Gaudi::Property< std::vector< std::string > > m_trigList_2015
list of triggers or trigger chains
Definition: TrigGlobalEfficiencyAlg.h:61
CP::TrigGlobalEfficiencyAlg::m_trigList_2022
Gaudi::Property< std::vector< std::string > > m_trigList_2022
Definition: TrigGlobalEfficiencyAlg.h:65