ATLAS Offline Software
TrigTauMonitorTandPAlgorithm.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGTAUMONITORING_TRIGTAUMONITORTANDPALGORITHM_H
6 #define TRIGTAUMONITORING_TRIGTAUMONITORTANDPALGORITHM_H
7 
9 
11 public:
12  TrigTauMonitorTandPAlgorithm(const std::string& name, ISvcLocator* pSvcLocator);
13  virtual StatusCode initialize() override;
14 
15 private:
16  // Require at least 1 offline Tau per event (will bias the variable distributions for background events)
17  Gaudi::Property<bool> m_requireOfflineTaus{this, "RequireOfflineTaus", true, "Require at leat 1 offline tau per event"};
18 
19  // Get offline electrons that pass the quality selection cuts
20  std::vector<const xAOD::Electron*> getOfflineElectrons(const EventContext& ctx, const float threshold = 0.0) const;
21 
22  // Get offline muons that pass the quality selection cuts
23  std::vector<const xAOD::Muon*> getOfflineMuons(const EventContext& ctx, const float threshold = 0.0) const;
24 
25  // Get online electrons
26  std::vector<const xAOD::Electron*> getOnlineElectrons(const std::string& trigger) const;
27 
28  // Get online muons
29  std::vector<const xAOD::Muon*> getOnlineMuons(const std::string& trigger) const;
30 
31  virtual StatusCode processEvent(const EventContext& ctx) const override;
32 
33  void fillTAndPHLTEfficiencies(const EventContext& ctx, const std::string& trigger, const std::vector<const xAOD::IParticle*>& offline_lep_vec, const std::vector<const xAOD::IParticle*>& online_lep_vec, const std::vector<const xAOD::TauJet*>& offline_tau_vec, const std::vector<const xAOD::TauJet*>& online_tau_vec) const;
34  void fillTagAndProbeVars(const std::string& trigger, const std::vector<const xAOD::TauJet*>& tau_vec, const std::vector<const xAOD::IParticle*>& lep_vec) const;
35 
36  // StorageGate keys
37  SG::ReadHandleKey<xAOD::ElectronContainer> m_offlineElectronKey{this, "offlineElectronKey", "Electrons", "Offline Electron key for tau-e chains"};
38  SG::ReadHandleKey<xAOD::MuonContainer> m_offlineMuonKey{this, "offlineMuonKey", "Muons", "Offline Muon key for tau-mu chains"};
39 
40  SG::ReadHandleKey<xAOD::ElectronContainer> m_hltElectronKey{this, "hltElectronKey", "HLT_egamma_Electrons_GSF", "HLT Electrons key for tau-e chains"};
41  SG::ReadHandleKey<xAOD::MuonContainer> m_hltMuonKey{this, "hltMuonKey", "HLT_MuonsIso", "HLT Muons key for tau-mu chains"};
42 };
43 
44 #endif
TrigTauMonitorTandPAlgorithm::m_hltElectronKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_hltElectronKey
Definition: TrigTauMonitorTandPAlgorithm.h:40
TrigTauMonitorTandPAlgorithm::fillTagAndProbeVars
void fillTagAndProbeVars(const std::string &trigger, const std::vector< const xAOD::TauJet * > &tau_vec, const std::vector< const xAOD::IParticle * > &lep_vec) const
Definition: TrigTauMonitorTandPAlgorithm.cxx:222
TrigTauMonitorTandPAlgorithm::getOfflineElectrons
std::vector< const xAOD::Electron * > getOfflineElectrons(const EventContext &ctx, const float threshold=0.0) const
Definition: TrigTauMonitorTandPAlgorithm.cxx:26
SG::ReadHandleKey< xAOD::ElectronContainer >
TrigTauMonitorTandPAlgorithm::processEvent
virtual StatusCode processEvent(const EventContext &ctx) const override
Definition: TrigTauMonitorTandPAlgorithm.cxx:104
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TrigTauMonitorTandPAlgorithm::m_offlineMuonKey
SG::ReadHandleKey< xAOD::MuonContainer > m_offlineMuonKey
Definition: TrigTauMonitorTandPAlgorithm.h:38
TrigTauMonitorTandPAlgorithm::getOnlineElectrons
std::vector< const xAOD::Electron * > getOnlineElectrons(const std::string &trigger) const
Definition: TrigTauMonitorTandPAlgorithm.cxx:74
TrigTauMonitorTandPAlgorithm::m_requireOfflineTaus
Gaudi::Property< bool > m_requireOfflineTaus
Definition: TrigTauMonitorTandPAlgorithm.h:17
TrigTauMonitorTandPAlgorithm::m_offlineElectronKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_offlineElectronKey
Definition: TrigTauMonitorTandPAlgorithm.h:37
TrigTauMonitorTandPAlgorithm::fillTAndPHLTEfficiencies
void fillTAndPHLTEfficiencies(const EventContext &ctx, const std::string &trigger, const std::vector< const xAOD::IParticle * > &offline_lep_vec, const std::vector< const xAOD::IParticle * > &online_lep_vec, const std::vector< const xAOD::TauJet * > &offline_tau_vec, const std::vector< const xAOD::TauJet * > &online_tau_vec) const
Definition: TrigTauMonitorTandPAlgorithm.cxx:173
TrigTauMonitorBaseAlgorithm.h
TrigTauMonitorTandPAlgorithm::TrigTauMonitorTandPAlgorithm
TrigTauMonitorTandPAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TrigTauMonitorTandPAlgorithm.cxx:8
TrigTauMonitorTandPAlgorithm::getOfflineMuons
std::vector< const xAOD::Muon * > getOfflineMuons(const EventContext &ctx, const float threshold=0.0) const
Definition: TrigTauMonitorTandPAlgorithm.cxx:50
TrigTauMonitorTandPAlgorithm::m_hltMuonKey
SG::ReadHandleKey< xAOD::MuonContainer > m_hltMuonKey
Definition: TrigTauMonitorTandPAlgorithm.h:41
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
threshold
Definition: chainparser.cxx:74
TrigTauMonitorBaseAlgorithm
Definition: TrigTauMonitorBaseAlgorithm.h:24
TrigTauMonitorTandPAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: TrigTauMonitorTandPAlgorithm.cxx:13
TrigTauMonitorTandPAlgorithm::getOnlineMuons
std::vector< const xAOD::Muon * > getOnlineMuons(const std::string &trigger) const
Definition: TrigTauMonitorTandPAlgorithm.cxx:89
TrigTauMonitorTandPAlgorithm
Definition: TrigTauMonitorTandPAlgorithm.h:10