7#ifndef TRIGGER_ANALYSIS_ALGORITHMS__TRIG_GLOBAL_EFFICIENCY_ALG_H
8#define TRIGGER_ANALYSIS_ALGORITHMS__TRIG_GLOBAL_EFFICIENCY_ALG_H
46 virtual StatusCode
initialize()
final override;
47 virtual StatusCode
execute(
const EventContext& ctx)
final override;
48 virtual StatusCode
finalize()
final override;
60 template <
typename ToolInterface,
typename SetToolPropertiesFn>
61 StatusCode
makeEgammaTools(std::vector<ToolHandle<ToolInterface> >& toolsFactory,
62 ToolHandleArray<ToolInterface>& effTools,
63 ToolHandleArray<ToolInterface>& sfTools,
64 const std::map<std::string, std::string>& legsPerKey,
65 const std::string& toolNamePrefix,
66 const std::string& toolNameSuffix,
67 const SetToolPropertiesFn& setToolProperties,
68 std::map<std::string, std::string>& legsPerTool);
73 Gaudi::Property<bool>
m_isRun3Geo {
this,
"isRun3Geo",
false,
"use Run 3 settings for efficiency correction tools?"};
82 Gaudi::Property<std::vector<std::string>>
m_trigList_2015 {
this,
"triggers_2015", {},
"2015 trigger selection list"};
83 Gaudi::Property<std::vector<std::string>>
m_trigList_2016 {
this,
"triggers_2016", {},
"2016 trigger selection list"};
84 Gaudi::Property<std::vector<std::string>>
m_trigList_2017 {
this,
"triggers_2017", {},
"2017 trigger selection list"};
85 Gaudi::Property<std::vector<std::string>>
m_trigList_2018 {
this,
"triggers_2018", {},
"2018 trigger selection list"};
86 Gaudi::Property<std::vector<std::string>>
m_trigList_2022 {
this,
"triggers_2022", {},
"2022 trigger selection list"};
87 Gaudi::Property<std::vector<std::string>>
m_trigList_2023 {
this,
"triggers_2023", {},
"2023 trigger selection list"};
88 Gaudi::Property<std::vector<std::string>>
m_trigList_2024 {
this,
"triggers_2024", {},
"2024 trigger selection list"};
89 Gaudi::Property<std::vector<std::string>>
m_trigList_2025 {
this,
"triggers_2025", {},
"2025 trigger selection list"};
92 Gaudi::Property<bool>
m_noFilter {
this,
"noFilter",
false,
"whether to not apply an event filter"};
97 Gaudi::Property<bool>
m_doMatchingOnly {
this,
"doMatchingOnly",
false,
"whether to disable efficiency SFs and apply matching only"};
100 Gaudi::Property<std::vector<std::string>>
m_separateMatchingTriggers {
this,
"separateMatchingTriggers", {},
"triggers to store individual trigger matching flags for"};
105 Gaudi::Property<std::string>
m_separateMatchingDecorSuffix {
this,
"separateMatchingDecorationSuffix",
"",
"suffix for the separate chain matching decorators"};
109 this,
"scaleFactorDecoration",
"",
"the decoration for the global trigger efficiency scale factor"
114 this,
"matchingDecoration",
"",
"the decoration for the global trigger matching decision"
119 this,
"electrons",
"",
"the electron container to use"
124 this,
"electronSelection",
"",
"the selection on the input electrons"
129 this,
"muons",
"",
"the muon container to use"
134 this,
"muonSelection",
"",
"the selection on the input muons"
139 this,
"photons",
"",
"the photon container to use"
144 this,
"photonSelection",
"",
"the selection on the input photons"
149 this,
"eventInfoContainer",
"EventInfo",
"the EventInfo container to decorate to"
163 Gaudi::Property<std::string>
m_campaign {
this,
"campaign",
"",
"the MC campaign to get the scale factors for"};
165 Gaudi::Property<std::string>
m_electronID {
this,
"electronID",
"",
"electron ID WP"};
167 Gaudi::Property<std::string>
m_electronIsol {
this,
"electronIsol",
"",
"electron Isolation WP"};
169 Gaudi::Property<std::string>
m_photonIsol {
this,
"photonIsol",
"",
"photon Isolation WP"};
171 Gaudi::Property<std::string>
m_muonID {
this,
"muonID",
"",
"muon ID/Quality WP"};
175 Gaudi::Property<int>
m_numToys {
this,
"numberOfToys", 0,
"number of toy experiments"};
the properties and persistent data for systematics aware filter reporters
a class managing the property to configure the list of systematics to process
a data handle for reading systematics varied input data
a data handle for reading systematically varied selection properties from objects
a data handle for reading systematics varied input data
SysListHandle m_systematicsList
asg::AnaToolHandle< ITrigGlobalEfficiencyCorrectionTool > m_tgecTool
Trigger Global Efficiency Correction Tool handle.
Gaudi::Property< std::vector< std::string > > m_trigList_2024
Gaudi::Property< std::string > m_campaign
MC campaign.
SysReadHandle< xAOD::EventInfo > m_eventInfoHandle
EventInfo to decorate.
Gaudi::Property< std::vector< std::string > > m_trigList_2018
virtual StatusCode finalize() final override
Gaudi::Property< std::string > m_electronIsol
electron Isolation
Gaudi::Property< std::vector< std::string > > m_trigList_2023
Gaudi::Property< std::string > m_separateMatchingDecorSuffix
separate chain matching decorator suffix
std::unordered_map< std::string, SysWriteDecorHandle< bool > > m_separateMatchingDecorators
Gaudi::Property< std::vector< std::string > > m_separateMatchingTriggers
store separate trigger matching flags for each trigger
Gaudi::Property< std::string > m_electronID
electron ID
ToolHandle< Trig::IMatchingTool > m_trigMatchingTool
trigger matching tool
Gaudi::Property< std::string > m_photonIsol
photon Isolation
std::vector< std::shared_ptr< void > > m_toolsCleanup
keeps the tools created via m_electronToolsFactory/m_photonToolsFactory alive in AnalysisBase
SysWriteDecorHandle< char > m_matchingDecoration
decoration of the global trigger matching flag
SysReadSelectionHandle m_muonSelection
input muon selection
Gaudi::Property< std::vector< std::string > > m_trigList_2017
Gaudi::Property< bool > m_noFilter
whether to not apply an event filter
Gaudi::Property< std::string > m_muonID
muon quality
unsigned long long m_nScaleFactorFailures
number of events for which the global trigger scale factor computation failed
Gaudi::Property< int > m_numToys
number of toy experiments to run to estimate the trigger combination efficiency, instead of using an ...
StatusCode makeEgammaTools(std::vector< ToolHandle< ToolInterface > > &toolsFactory, ToolHandleArray< ToolInterface > &effTools, ToolHandleArray< ToolInterface > &sfTools, const std::map< std::string, std::string > &legsPerKey, const std::string &toolNamePrefix, const std::string &toolNameSuffix, const SetToolPropertiesFn &setToolProperties, std::map< std::string, std::string > &legsPerTool)
create one efficiency and one scale factor tool per electron/photon trigger key
std::vector< ToolHandle< IAsgPhotonEfficiencyCorrectionTool > > m_photonToolsFactory
on-the-fly public tool creation for photons
SysReadSelectionHandle m_electronSelection
input electron selection
Gaudi::Property< std::vector< std::string > > m_trigList_2015
list of triggers or trigger chains
Gaudi::Property< bool > m_doMatchingOnly
whether to only run the global trigger matching, and not compute efficiency SFs
SysWriteDecorHandle< float > m_scaleFactorDecoration
decoration of the global trigger SF
TrigGlobalEfficiencyAlg(const std::string &name, ISvcLocator *pSvcLocator=nullptr)
Gaudi::Property< std::vector< std::string > > m_trigList_2022
virtual StatusCode initialize() final override
asg::AnaToolHandle< IMuonTriggerScaleFactors > m_muonTool
the muon trigger SF handle
SysReadSelectionHandle m_photonSelection
input photon selection
Gaudi::Property< std::vector< std::string > > m_trigList_2016
std::vector< ToolHandle< IAsgElectronEfficiencyCorrectionTool > > m_electronToolsFactory
on-the-fly public tool creation for electrons
Gaudi::Property< std::vector< std::string > > m_trigList_2025
std::unordered_map< std::string, bool > m_separateMatchingFlags
SysReadHandle< xAOD::PhotonContainer > m_photonsHandle
input photon collection
SysReadHandle< xAOD::ElectronContainer > m_electronsHandle
input electron collection
SysFilterReporterParams m_filterParams
the filter reporter params
Gaudi::Property< bool > m_isRun3Geo
whether to use Run 3 settings
SysReadHandle< xAOD::MuonContainer > m_muonsHandle
input muon collection
the (new) base class for EventLoop algorithms
virtual::StatusCode execute()
execute this algorithm
Select isolated Photons, Electrons and Muons.