|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef TRIGTAUMONITORING_TRIGTAUMONITORBASEALGORITHM_H
6 #define TRIGTAUMONITORING_TRIGTAUMONITORBASEALGORITHM_H
18 #include "Gaudi/Parsers/Factory.h"
19 #include "GaudiKernel/SystemOfUnits.h"
32 Gaudi::Property<std::vector<std::string>>
m_triggers{
this,
"TriggerList", {}};
48 std::vector<const xAOD::TauJet*>
getOnlineTausAll(
const std::string& trigger,
bool include_0P=
true)
const;
49 std::tuple<std::vector<const xAOD::TauJet*>, std::vector<const xAOD::TauJet*>, std::vector<const xAOD::TauJet*>>
getOnlineTaus(
const std::string& trigger)
const;
53 std::pair<std::vector<const xAOD::TauJet*>, std::vector<const xAOD::TauJet*>>
getOfflineTaus(
const EventContext& ctx,
const float threshold = 20.0)
const;
56 std::vector<const xAOD::eFexTauRoI*>
getL1eTAUs(
const EventContext& ctx,
const std::string& l1_item)
const;
57 std::vector<const xAOD::jFexTauRoI*>
getL1jTAUs(
const EventContext& ctx,
const std::string& l1_item)
const;
58 std::vector<std::pair<const xAOD::eFexTauRoI*, const xAOD::jFexTauRoI*>>
getL1cTAUs(
const EventContext& ctx,
const std::string& l1_item)
const;
59 std::vector<const xAOD::EmTauRoI*>
getL1LegacyTAUs(
const EventContext& ctx,
const std::string& l1_item)
const;
65 inline double dR(
const double eta1,
const double phi1,
const double eta2,
const double phi2)
const
67 double deta = std::fabs(
eta1 -
eta2);
69 return std::sqrt(deta*deta + dphi*dphi);
72 template <
typename T1 = xAOD::IParticle,
typename T2 = xAOD::IParticle>
75 for(
auto tau_2 : tau_vec) {
76 if(tau->p4().DeltaR(tau_2->p4()) <
threshold)
return true;
81 inline bool matchObjects(
const TLorentzVector& tau,
const std::vector<TLorentzVector>& tau_vec,
float threshold)
const
83 for(
auto& tau_2 : tau_vec) {
84 if(tau.DeltaR(tau_2) <
threshold)
return true;
89 template <
typename T1 = xAOD::IParticle,
typename T2 = xAOD::eFexTauRoI>
92 return dR(tau_1->eta(), tau_1->phi(), tau_2->eta(), tau_2->phi()) <
threshold;
95 template <
typename T1 = xAOD::IParticle,
typename T2 = xAOD::IParticle>
102 TLorentzVector true_tau_p4;
103 true_tau_p4.SetPtEtaPhiM(acc_ptvis(*true_tau), acc_etavis(*true_tau), acc_phivis(*true_tau), acc_mvis(*true_tau));
105 for(
auto tau : tau_vec) {
106 if(true_tau_p4.DeltaR(tau->p4()) <
threshold)
return true;
111 std::vector<const xAOD::TauJet*>
classifyTausAll(
const std::vector<const xAOD::TauJet*>& taus,
const float threshold = 0.0)
const;
112 std::pair<std::vector<const xAOD::TauJet*>, std::vector<const xAOD::TauJet*>>
classifyOfflineTaus(
const std::vector<const xAOD::TauJet*>& taus,
const float threshold = 0.0)
const;
113 std::tuple<std::vector<const xAOD::TauJet*>, std::vector<const xAOD::TauJet*>, std::vector<const xAOD::TauJet*>>
classifyOnlineTaus(
const std::vector<const xAOD::TauJet*>& taus,
const float threshold = 0.0)
const;
bool matchObjects(const TLorentzVector &tau, const std::vector< TLorentzVector > &tau_vec, float threshold) const
SG::ReadHandleKey< xAOD::TauJetContainer > m_hltTauJetKey
bool matchObjects(const T1 *tau_1, const T2 *tau_2, float threshold) const
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
std::map< std::string, TrigTauInfo > m_trigInfo
virtual StatusCode initialize() override
initialize
SG::ReadDecorHandleKey< xAOD::jFexTauRoIContainer > m_phase1l1jTauRoIThresholdPatternsKey
T wrapToPi(T phi)
Wrap angle in radians to [-pi, pi].
SG::ReadHandleKey< xAOD::eFexTauRoIContainer > m_phase1l1eTauRoIKey
std::map< std::string, TrigTauInfo > & getTrigInfoMap()
std::vector< std::pair< const xAOD::eFexTauRoI *, const xAOD::jFexTauRoI * > > getL1cTAUs(const EventContext &ctx, const std::string &l1_item) const
SG::ReadDecorHandleKey< xAOD::eFexTauRoIContainer > m_phase1l1cTauRoIDecorKey
std::tuple< std::vector< const xAOD::TauJet * >, std::vector< const xAOD::TauJet * >, std::vector< const xAOD::TauJet * > > classifyOnlineTaus(const std::vector< const xAOD::TauJet * > &taus, const float threshold=0.0) const
setEt setPhi setE277 setWeta2 eta1
std::vector< const xAOD::TauJet * > classifyTausAll(const std::vector< const xAOD::TauJet * > &taus, const float threshold=0.0) const
Gaudi::Property< bool > m_L1_select_by_et_only
Helper class to provide constant type-safe access to aux data.
SG::ReadDecorHandleKey< xAOD::eFexTauRoIContainer > m_phase1l1eTauRoIThresholdPatternsKey
std::vector< const xAOD::eFexTauRoI * > getL1eTAUs(const EventContext &ctx, const std::string &l1_item) const
Property holding a SG store/key/clid from which a ReadHandle is made.
Gaudi::Property< std::map< std::string, float > > m_L1_Phase1_thresholds
Gaudi::Property< bool > m_do_variable_plots
Base class for Athena Monitoring Algorithms.
SG::ReadHandleKey< xAOD::jFexTauRoIContainer > m_phase1l1jTauRoIKey
std::vector< const xAOD::TauJet * > getOnlineTausAll(const std::string &trigger, bool include_0P=true) const
std::pair< std::vector< const xAOD::TauJet * >, std::vector< const xAOD::TauJet * > > classifyOfflineTaus(const std::vector< const xAOD::TauJet * > &taus, const float threshold=0.0) const
Gaudi::Property< std::map< std::string, uint64_t > > m_L1_Phase1_threshold_patterns
SG::ReadHandleKey< xAOD::EmTauRoIContainer > m_legacyl1TauRoIKey
TrigTauMonitorBaseAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
::StatusCode StatusCode
StatusCode definition for legacy code.
bool matchTruthObjects(const T1 *true_tau, const std::vector< const T2 * > &tau_vec, float threshold) const
std::pair< std::vector< const xAOD::TauJet * >, std::vector< const xAOD::TauJet * > > getOfflineTaus(const EventContext &ctx, const float threshold=20.0) const
SG::ReadHandleKey< xAOD::eFexTauRoIContainer > m_phase1l1cTauRoIKey
Header file to be included by clients of the Monitored infrastructure.
double dR(const double eta1, const double phi1, const double eta2, const double phi2) const
Helper for azimuthal angle calculations.
Gaudi::Property< bool > m_do_efficiency_plots
SG::ReadHandleKey< xAOD::TauJetContainer > m_offlineTauJetKey
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
SG::ReadHandleKey< xAOD::TauJetContainer > m_hltTauJetCaloMVAOnlyKey
virtual StatusCode processEvent(const EventContext &ctx) const =0
std::vector< const xAOD::jFexTauRoI * > getL1jTAUs(const EventContext &ctx, const std::string &l1_item) const
bool matchObjects(const T1 *tau, const std::vector< const T2 * > &tau_vec, float threshold) const
std::vector< const xAOD::EmTauRoI * > getL1LegacyTAUs(const EventContext &ctx, const std::string &l1_item) const
SG::ReadDecorHandleKey< xAOD::eFexTauRoIContainer > m_phase1l1cTauRoIThresholdPatternsKey
Gaudi::Property< std::vector< std::string > > m_triggers
const SG::ReadHandleKey< xAOD::TauJetContainer > & getOnlineContainerKey(const std::string &trigger) const
const TrigTauInfo & getTrigInfo(const std::string &trigger) const
SG::ReadDecorHandleKey< xAOD::EventInfo > m_eventInfoDecorKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
std::tuple< std::vector< const xAOD::TauJet * >, std::vector< const xAOD::TauJet * >, std::vector< const xAOD::TauJet * > > getOnlineTaus(const std::string &trigger) const
SG::ReadHandleKey< xAOD::TauJetContainer > m_hltTauJetLRTKey
std::vector< const xAOD::TauJet * > getOfflineTausAll(const EventContext &ctx, const float threshold=20.0) const
SG::ReadHandleKey< xAOD::TauJetContainer > m_hltTauJetLLPKey