ATLAS Offline Software
Loading...
Searching...
No Matches
TGCSimulation.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "TGCSimulation.h"
6
10
11namespace L0Muon {
12
14 ATH_CHECK(m_keyTgcRdo.initialize());
15 ATH_CHECK(m_outputKey.initialize());
19 if (!m_monTool.empty()) ATH_CHECK(m_monTool.retrieve());
20 return StatusCode::SUCCESS;
21}
22
23StatusCode TGCSimulation::execute(const EventContext& ctx) const {
24 const TgcRdoContainer* tgcRdoContainer{};
25 ATH_CHECK(SG::get(tgcRdoContainer, m_keyTgcRdo, ctx));
26
27 auto nTgcRdoCollections = Monitored::Scalar<unsigned int>(
28 "nTgcRdoCollections", tgcRdoContainer->size());
29 Monitored::Group(m_monTool, nTgcRdoCollections);
30
31 TgcL0CandidateContainer candidates;
32 ATH_CHECK(m_candidateBuilderTool->build(*tgcRdoContainer, candidates, ctx));
33 ATH_CHECK(m_innerCoincidenceTool->apply(candidates, ctx));
34
37 output{};
38 ATH_CHECK(m_trackSelectorTool->select(candidates, *output, ctx));
39 ATH_CHECK(output.record(m_outputKey, ctx));
40 return StatusCode::SUCCESS;
41}
42
43} // namespace L0Muon
#define ATH_CHECK
Evaluate an expression and check for errors.
Handle class for reading from StoreGate.
size_t size() const
Duplicate of fullSize for backwards compatability.
ToolHandle< GenericMonitoringTool > m_monTool
ToolHandle< ITgcL0CandidateBuilderTool > m_candidateBuilderTool
StatusCode initialize() override
SG::ReadHandleKey< TgcRdoContainer > m_keyTgcRdo
ToolHandle< ITgcL0InnerCoincidenceTool > m_innerCoincidenceTool
SG::WriteHandleKey< xAOD::TGCCandDataContainer > m_outputKey
ToolHandle< ITgcL0TrackSelectorTool > m_trackSelectorTool
StatusCode execute(const EventContext &ctx) const override
Group of local monitoring quantities and retain correlation when filling histograms
Declare a monitored scalar variable.
std::vector< TgcL0Candidate > TgcL0CandidateContainer
Event-local candidate collection.
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
TGCCandDataAuxContainer_v1 TGCCandDataAuxContainer