8#include "GaudiKernel/SystemOfUnits.h"
16 : base_class(
type, name, parent),
42 return StatusCode::FAILURE;
47 return StatusCode::FAILURE;
49 ATH_MSG_ERROR(
"Must not set IDWP or HighPtIDWP if using IDMethod=0");
50 return StatusCode::FAILURE;
54 return StatusCode::FAILURE;
73 return StatusCode::FAILURE;
82 return StatusCode::FAILURE;
92 if(p.first.empty() || p.second.empty()) {
93 ATH_MSG_ERROR(
"Invalid score variable names; skipping this entry for the monitoring!");
100 return StatusCode::SUCCESS;
114 std::map<std::string, Monitored::Scalar<float>> monitoredIdVariables;
116 monitoredIdVariables.emplace(key +
"_TauJetScoreAccepted_0p",
Monitored::Scalar<float>(key +
"_TauJetScoreAccepted_0p", -1));
117 monitoredIdVariables.emplace(key +
"_TauJetScoreTransAccepted_0p",
Monitored::Scalar<float>(key +
"_TauJetScoreTransAccepted_0p", -1));
118 monitoredIdVariables.emplace(key +
"_TauJetScoreAccepted_1p",
Monitored::Scalar<float>(key +
"_TauJetScoreAccepted_1p", -1));
119 monitoredIdVariables.emplace(key +
"_TauJetScoreTransAccepted_1p",
Monitored::Scalar<float>(key +
"_TauJetScoreTransAccepted_1p", -1));
120 monitoredIdVariables.emplace(key +
"_TauJetScoreAccepted_mp",
Monitored::Scalar<float>(key +
"_TauJetScoreAccepted_mp", -1));
121 monitoredIdVariables.emplace(key +
"_TauJetScoreTransAccepted_mp",
Monitored::Scalar<float>(key +
"_TauJetScoreTransAccepted_mp", -1));
124 std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>> monVars = {
125 std::ref(NInputTaus), std::ref(passedCuts), std::ref(PtAccepted), std::ref(NTracksAccepted), std::ref(NIsoTracksAccepted)
127 for(
auto& [key, var] : monitoredIdVariables) monVars.push_back(std::ref(var));
136 ATH_MSG_DEBUG(
"AcceptAll property is set: taking all events");
140 ATH_MSG_DEBUG(
"Input RoI eta: " << input.roi->eta() <<
", phi: " << input.roi->phi() <<
", z: " << input.roi->zed());
143 NInputTaus = TauContainer->
size();
148 float pT =
Tau->pt();
157 PtAccepted = pT / Gaudi::Units::GeV;
163 int numTrack = 0, numIsoTrack = 0;
175 numTrack =
Tau->nTracks();
176 numIsoTrack =
Tau->nTracksIsolation();
197 NTracksAccepted = numTrack;
198 NIsoTracksAccepted = numIsoTrack;
220 ATH_MSG_ERROR(
" RNNJetScoreSigTrans not available. Make sure the TauWPDecorator is run for the RNN Tau ID!");
230 if(!p.first.isAvailable(*
Tau))
231 ATH_MSG_WARNING(
"TauID Score " <<
m_monitoredIdScores.value().at(key).first <<
" is not available. Make sure the correct inferences are included in the chain reconstruction sequence!");
233 if(!p.second.isAvailable(*
Tau))
234 ATH_MSG_WARNING(
"TauID ScoreSigTrans " <<
m_monitoredIdScores.value().at(key).second <<
" is not available. Make sure the correct inferences are included in the chain reconstruction sequence!");
236 ATH_MSG_DEBUG(
" TauID \"" << key <<
"\" ScoreSigTrans: " << p.second(*
Tau));
239 if(
Tau->nTracks() == 0) {
240 monitoredIdVariables.at(key +
"_TauJetScoreAccepted_0p") = p.first(*
Tau);
241 monitoredIdVariables.at(key +
"_TauJetScoreTransAccepted_0p") = p.second(*
Tau);
242 }
else if(
Tau->nTracks() == 1) {
243 monitoredIdVariables.at(key +
"_TauJetScoreAccepted_1p") = p.first(*
Tau);
244 monitoredIdVariables.at(key +
"_TauJetScoreTransAccepted_1p") = p.second(*
Tau);
246 monitoredIdVariables.at(key +
"_TauJetScoreAccepted_mp") = p.first(*
Tau);
247 monitoredIdVariables.at(key +
"_TauJetScoreTransAccepted_mp") = p.second(*
Tau);
275 return StatusCode::SUCCESS;
#define ATH_MSG_WARNING(x)
Header file to be included by clients of the Monitored infrastructure.
size_type size() const noexcept
Returns the number of elements in the collection.
Group of local monitoring quantities and retain correlation when filling histograms
Declare a monitored scalar variable.
Helper class to provide constant type-safe access to aux data.
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
@ RNNJetScoreSigTrans
RNN score which is signal transformed/flattened.
IsTauFlag
Enum for IsTau flags.
TauJet_v3 TauJet
Definition of the current "tau version".
TauJetContainer_v3 TauJetContainer
Definition of the current "taujet container version".