ATLAS Offline Software
TrigTauMonitorSingleAlgorithm.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_TRIGTAUMONITORSINGLEALGORITHM_H
6 #define TRIGTAUMONITORING_TRIGTAUMONITORSINGLEALGORITHM_H
7 
8 #include "Gaudi/Parsers/Factory.h"
9 
11 
13 public:
14  TrigTauMonitorSingleAlgorithm(const std::string& name, ISvcLocator* pSvcLocator);
15  virtual StatusCode initialize() override;
16 
17 private:
18  // Enable total efficiency histograms
19  // Note: Should only be used when reprocessing EB or MC data. Comparisons of total efficiencies between chains on normal data-taking
20  // conditions would be meaningless, since different L1/HLT items can have different prescales, and are not within a Coherent-Prescale-Set
21  Gaudi::Property<bool> m_doTotalEfficiency{this, "DoTotalEfficiency", false, "Do total efficiency histograms"};
22 
23  // Require at least 1 offline Tau per event (will bias the variable distributions for background events)
24  Gaudi::Property<bool> m_requireOfflineTaus{this, "RequireOfflineTaus", true, "Require at leat 1 offline tau per event"};
25 
26  // Do offline taus variable distributions
27  Gaudi::Property<bool> m_doOfflineTausDistributions{this, "DoOfflineTausDistributions", true};
28 
29  // HLT TauID score monitoring
30  Gaudi::Property<std::map<std::string, std::map<std::string, std::pair<std::string, std::string>>>> m_monitoredHLTIdScores {this, "HLTTauIDScores", {}, "Pairs of the TauID score and signal-transformed scores for each HLT TauID algorithm to be monitored, for each reconstruction sequence (type, e.g. tracktwoMVA, tracktwoLLP, etc...)"};
31  std::map<std::string, std::map<std::string, std::pair<SG::AuxElement::ConstAccessor<float>, SG::AuxElement::ConstAccessor<float>>>> m_monitoredHLTIdAccessors;
32 
33  // Offline TauID score monitoring
34  Gaudi::Property<std::map<std::string, std::pair<std::string, std::string>>> m_monitoredOfflineIdScores {this, "OfflineTauIDScores", {}, "Pairs of the TauID score and signal-transformed scores for each Offline TauID algorithm to be monitored"};
35  std::map<std::string, std::pair<SG::AuxElement::ConstAccessor<float>, SG::AuxElement::ConstAccessor<float>>> m_monitoredOfflineIdAccessors;
36 
37  virtual StatusCode processEvent(const EventContext& ctx) const override;
38 
39  void fillHLTEfficiencies(const EventContext& ctx,const std::string& trigger, const bool l1_accept_flag, const std::vector<const xAOD::TauJet*>& offline_tau_vec, const std::vector<const xAOD::TauJet*>& online_tau_vec, const std::string& nProng) const;
40  void fillIDInputVars(const std::string& trigger, const std::vector<const xAOD::TauJet*>& tau_vec,const std::string& nProng, bool online) const;
41  void fillIDTrack(const std::string& trigger, const std::vector<const xAOD::TauJet*>& tau_vec, bool online) const;
42  void fillIDCluster(const std::string& trigger, const std::vector<const xAOD::TauJet*>& tau_vec, bool online) const;
43  void fillBasicVars(const EventContext& ctx, const std::string& trigger, const std::vector<const xAOD::TauJet*>& tau_vec, const std::string& nProng, bool online) const;
44  void fillIDScores(const std::string& trigger, const std::vector<const xAOD::TauJet*>& tau_vec, const std::string& nProng, bool online) const;
45 
46  std::vector<TLorentzVector> getRoIsVector(const EventContext& ctx, const std::string& trigger) const;
47 };
48 
49 #endif
TrigTauMonitorSingleAlgorithm::m_monitoredHLTIdScores
Gaudi::Property< std::map< std::string, std::map< std::string, std::pair< std::string, std::string > > > > m_monitoredHLTIdScores
Definition: TrigTauMonitorSingleAlgorithm.h:30
TrigTauMonitorSingleAlgorithm
Definition: TrigTauMonitorSingleAlgorithm.h:12
TrigTauMonitorSingleAlgorithm::fillIDInputVars
void fillIDInputVars(const std::string &trigger, const std::vector< const xAOD::TauJet * > &tau_vec, const std::string &nProng, bool online) const
Definition: TrigTauMonitorSingleAlgorithm.cxx:211
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
TrigTauMonitorSingleAlgorithm::TrigTauMonitorSingleAlgorithm
TrigTauMonitorSingleAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TrigTauMonitorSingleAlgorithm.cxx:8
TrigTauMonitorSingleAlgorithm::processEvent
virtual StatusCode processEvent(const EventContext &ctx) const override
Definition: TrigTauMonitorSingleAlgorithm.cxx:54
TrigTauMonitorSingleAlgorithm::m_monitoredOfflineIdScores
Gaudi::Property< std::map< std::string, std::pair< std::string, std::string > > > m_monitoredOfflineIdScores
Definition: TrigTauMonitorSingleAlgorithm.h:34
TrigTauMonitorSingleAlgorithm::fillIDCluster
void fillIDCluster(const std::string &trigger, const std::vector< const xAOD::TauJet * > &tau_vec, bool online) const
Definition: TrigTauMonitorSingleAlgorithm.cxx:351
TrigTauMonitorSingleAlgorithm::m_monitoredOfflineIdAccessors
std::map< std::string, std::pair< SG::AuxElement::ConstAccessor< float >, SG::AuxElement::ConstAccessor< float > > > m_monitoredOfflineIdAccessors
Definition: TrigTauMonitorSingleAlgorithm.h:35
TrigTauMonitorSingleAlgorithm::fillIDScores
void fillIDScores(const std::string &trigger, const std::vector< const xAOD::TauJet * > &tau_vec, const std::string &nProng, bool online) const
Definition: TrigTauMonitorSingleAlgorithm.cxx:445
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TrigTauMonitorBaseAlgorithm.h
TrigTauMonitorSingleAlgorithm::m_monitoredHLTIdAccessors
std::map< std::string, std::map< std::string, std::pair< SG::AuxElement::ConstAccessor< float >, SG::AuxElement::ConstAccessor< float > > > > m_monitoredHLTIdAccessors
Definition: TrigTauMonitorSingleAlgorithm.h:31
TrigTauMonitorSingleAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: TrigTauMonitorSingleAlgorithm.cxx:13
TrigTauMonitorSingleAlgorithm::getRoIsVector
std::vector< TLorentzVector > getRoIsVector(const EventContext &ctx, const std::string &trigger) const
Definition: TrigTauMonitorSingleAlgorithm.cxx:486
TrigTauMonitorSingleAlgorithm::m_requireOfflineTaus
Gaudi::Property< bool > m_requireOfflineTaus
Definition: TrigTauMonitorSingleAlgorithm.h:24
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
TrigTauMonitorBaseAlgorithm
Definition: TrigTauMonitorBaseAlgorithm.h:24
TrigTauMonitorSingleAlgorithm::m_doTotalEfficiency
Gaudi::Property< bool > m_doTotalEfficiency
Definition: TrigTauMonitorSingleAlgorithm.h:21
TrigTauMonitorSingleAlgorithm::m_doOfflineTausDistributions
Gaudi::Property< bool > m_doOfflineTausDistributions
Definition: TrigTauMonitorSingleAlgorithm.h:27
TrigTauMonitorSingleAlgorithm::fillIDTrack
void fillIDTrack(const std::string &trigger, const std::vector< const xAOD::TauJet * > &tau_vec, bool online) const
Definition: TrigTauMonitorSingleAlgorithm.cxx:280
TrigTauMonitorSingleAlgorithm::fillBasicVars
void fillBasicVars(const EventContext &ctx, const std::string &trigger, const std::vector< const xAOD::TauJet * > &tau_vec, const std::string &nProng, bool online) const
Definition: TrigTauMonitorSingleAlgorithm.cxx:403
TrigTauMonitorSingleAlgorithm::fillHLTEfficiencies
void fillHLTEfficiencies(const EventContext &ctx, const std::string &trigger, const bool l1_accept_flag, const std::vector< const xAOD::TauJet * > &offline_tau_vec, const std::vector< const xAOD::TauJet * > &online_tau_vec, const std::string &nProng) const
Definition: TrigTauMonitorSingleAlgorithm.cxx:142