ATLAS Offline Software
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  base_class(CPP_exothip, skimtool, interface),
26  m_trigDec("Trig::TrigDecisionTool/TrigDecisionTool")
27 
28 {
29  declareProperty("HTTRTHitsCounter", m_trnnoutContName);
30  declareProperty("MinHTRatioWedge", m_minHTratioWedge);
31 }
32 
34 {
35  ATH_MSG_VERBOSE("initialize() ...");
36  ATH_CHECK(m_trigDec.retrieve());
37 
38  ATH_MSG_INFO("Retrieved tool: " << m_trigDec);
39  return StatusCode::SUCCESS;
40 }
41 
43 
44  ATH_MSG_VERBOSE("finalize() ...");
45  ATH_MSG_INFO("Processed " << m_ntot << " events, " << m_npass << " events passed filter ");
46 
47  return StatusCode::SUCCESS;
48 }
49 
51 
52  m_ntot++;
53 
54  auto trig_fht_wedge = std::make_unique<std::vector<float>>();
55 
56  const xAOD::TrigRNNOutputContainer* trnnoutCont = 0;
57  StatusCode sc = evtStore()->retrieve( trnnoutCont, m_trnnoutContName);
58  if (sc.isFailure()){
59  ATH_MSG_FATAL("No HTTRT collection with name " << m_trnnoutContName << " found in StoreGate!");
60  return false;
61  }
62 
63  for (const xAOD::TrigRNNOutput* trnnout : *trnnoutCont){
64  trig_fht_wedge->push_back(trnnout->rnnDecision().at(3));
65  }
66 
67  for (float value : *trig_fht_wedge) {
68  if (static_cast<double>(value) > m_minHTratioWedge) {
69  m_npass++;
70  return true;
71  }
72  }
73 
74  return false;
75 }
76 
77 
78 
79 
80 
81 
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
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:33
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:42
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
Definition: DESDM_EXOTHIP_SkimmingTool.cxx:50