Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
DESDM_EXOTHIP_SkimmingTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // DESDM_EXOTHIP_SkimmingTool.cxx, (c) ATLAS Detector software
8 // Author: Priyanka Kumari (pkumari@cern.ch)
9 // follows closely DerivationFrameworkExamples
10 
14 
15 #include <vector>
16 #include <string>
17 #include <algorithm>
18 
19 // Constructor
20 
22  const std::string& skimtool,
23  const IInterface* interface ) :
24 
25  AthAlgTool(CPP_exothip, skimtool, interface),
26  m_trigDec("Trig::TrigDecisionTool/TrigDecisionTool")
27 
28 {
29  declareInterface<DerivationFramework::ISkimmingTool>(this);
30  declareProperty("HTTRTHitsCounter", m_trnnoutContName);
31  declareProperty("MinHTRatioWedge", m_minHTratioWedge);
32 }
33 
35 {
36  ATH_MSG_VERBOSE("initialize() ...");
37  ATH_CHECK(m_trigDec.retrieve());
38 
39  ATH_MSG_INFO("Retrieved tool: " << m_trigDec);
40  return StatusCode::SUCCESS;
41 }
42 
44 
45  ATH_MSG_VERBOSE("finalize() ...");
46  ATH_MSG_INFO("Processed " << m_ntot << " events, " << m_npass << " events passed filter ");
47 
48  return StatusCode::SUCCESS;
49 }
50 
52 
53  m_ntot++;
54 
55  auto trig_fht_wedge = std::make_unique<std::vector<float>>();
56 
57  const xAOD::TrigRNNOutputContainer* trnnoutCont = 0;
58  StatusCode sc = evtStore()->retrieve( trnnoutCont, m_trnnoutContName);
59  if (sc.isFailure()){
60  ATH_MSG_FATAL("No HTTRT collection with name " << m_trnnoutContName << " found in StoreGate!");
61  return false;
62  }
63 
64  for (const xAOD::TrigRNNOutput* trnnout : *trnnoutCont){
65  trig_fht_wedge->push_back(trnnout->rnnDecision().at(3));
66  }
67 
68  for (float value : *trig_fht_wedge) {
69  if (static_cast<double>(value) > m_minHTratioWedge) {
70  m_npass++;
71  return true;
72  }
73  }
74 
75  return false;
76 }
77 
78 
79 
80 
81 
82 
xAOD::TrigRNNOutput_v2
Definition: TrigRNNOutput_v2.h:24
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DerivationFramework::DESDM_EXOTHIP_SkimmingTool::m_minHTratioWedge
double m_minHTratioWedge
Definition: DESDM_EXOTHIP_SkimmingTool.h:52
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
DerivationFramework::DESDM_EXOTHIP_SkimmingTool::m_trnnoutContName
std::string m_trnnoutContName
Definition: DESDM_EXOTHIP_SkimmingTool.h:46
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
DESDM_EXOTHIP_SkimmingTool.h
athena.value
value
Definition: athena.py:124
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
DerivationFramework::DESDM_EXOTHIP_SkimmingTool::initialize
virtual StatusCode initialize() override
Definition: DESDM_EXOTHIP_SkimmingTool.cxx:34
DerivationFramework::DESDM_EXOTHIP_SkimmingTool::DESDM_EXOTHIP_SkimmingTool
DESDM_EXOTHIP_SkimmingTool(const std::string &CPP_exothip, const std::string &skimtool, const IInterface *interface)
Definition: DESDM_EXOTHIP_SkimmingTool.cxx:21
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DerivationFramework::DESDM_EXOTHIP_SkimmingTool::finalize
virtual StatusCode finalize() override
Definition: DESDM_EXOTHIP_SkimmingTool.cxx:43
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
TrigRNNOutput.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
TrigRNNOutputContainer.h
DerivationFramework::DESDM_EXOTHIP_SkimmingTool::eventPassesFilter
virtual bool eventPassesFilter() const override
Check that the current event passes this filter.
Definition: DESDM_EXOTHIP_SkimmingTool.cxx:51
AthAlgTool
Definition: AthAlgTool.h:26