ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonReconstruction
MuonPatternFinders
MuonPatternFinderTools
MuonHoughPatternTools
src
MuonLayerHoughAlg.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 "
MuonLayerHoughAlg.h
"
6
7
#include "
StoreGate/ReadHandle.h
"
8
#include "
MuonPrepRawData/CscPrepDataCollection.h
"
9
#include "
MuonPrepRawData/MMPrepDataCollection.h
"
10
#include "
MuonPrepRawData/MdtPrepDataCollection.h
"
11
#include "
MuonPrepRawData/MuonPrepDataContainer.h
"
12
#include "
MuonPrepRawData/RpcPrepDataCollection.h
"
13
#include "
MuonPrepRawData/TgcPrepDataCollection.h
"
14
#include "
MuonPrepRawData/sTgcPrepDataCollection.h
"
15
16
StatusCode
MuonLayerHoughAlg::initialize
() {
17
if
(
m_layerTool
.empty()) {
18
ATH_MSG_ERROR
(
"MuonLayerScanTool property is empty"
);
19
return
StatusCode::FAILURE;
20
}
21
ATH_CHECK
(
m_layerTool
.retrieve());
22
ATH_CHECK
(
m_printer
.retrieve());
23
ATH_CHECK
(
m_keyRpc
.initialize(!
m_keyRpc
.empty()));
24
ATH_CHECK
(
m_keyMdt
.initialize(!
m_keyMdt
.empty()));
25
ATH_CHECK
(
m_keyTgc
.initialize(!
m_keyTgc
.empty()));
26
ATH_CHECK
(
m_keyCsc
.initialize(!
m_keyCsc
.empty()));
27
ATH_CHECK
(
m_keysTgc
.initialize(!
m_keysTgc
.empty()));
28
ATH_CHECK
(
m_keyMM
.initialize(!
m_keyMM
.empty()));
29
ATH_CHECK
(
m_combis
.initialize());
30
ATH_CHECK
(
m_houghDataPerSectorVecKey
.initialize());
31
32
return
StatusCode::SUCCESS;
33
}
34
35
StatusCode
MuonLayerHoughAlg::execute
(
const
EventContext& ctx)
const
{
36
const
Muon::RpcPrepDataContainer
* rpcPrds{
nullptr
};
37
const
Muon::MdtPrepDataContainer
* mdtPrds{
nullptr
};
38
const
Muon::TgcPrepDataContainer
* tgcPrds{
nullptr
};
39
const
Muon::CscPrepDataContainer
* cscPrds{
nullptr
};
40
const
Muon::sTgcPrepDataContainer
* stgcPrds{
nullptr
};
41
const
Muon::MMPrepDataContainer
* mmPrds{
nullptr
};
42
ATH_CHECK
(
SG::get
( mdtPrds,
m_keyMdt
, ctx));
43
ATH_CHECK
(
SG::get
( rpcPrds,
m_keyRpc
, ctx));
44
ATH_CHECK
(
SG::get
( tgcPrds,
m_keyTgc
, ctx));
45
ATH_CHECK
(
SG::get
( cscPrds,
m_keyCsc
, ctx));
46
ATH_CHECK
(
SG::get
( stgcPrds,
m_keysTgc
, ctx));
47
ATH_CHECK
(
SG::get
( mmPrds,
m_keyMM
, ctx));
48
49
50
51
ATH_MSG_VERBOSE
(
"calling layer tool "
);
52
auto
[combis, houghDataPerSectorVec] =
m_layerTool
->find(mdtPrds, cscPrds, tgcPrds, rpcPrds, stgcPrds, mmPrds, ctx);
53
SG::WriteHandle
Handle(
m_combis
, ctx);
54
if
(combis) {
55
ATH_CHECK
(Handle.
record
(std::move(combis)));
56
}
else
{
57
ATH_MSG_VERBOSE
(
"CombinationCollection "
<<
m_combis
<<
" is empty, recording"
);
58
ATH_CHECK
(Handle.
record
(std::make_unique<MuonPatternCombinationCollection>()));
59
}
60
61
// write hough data to SG
62
SG::WriteHandle
handle{
m_houghDataPerSectorVecKey
, ctx};
63
if
(houghDataPerSectorVec) {
64
ATH_CHECK
(handle.record(std::move(houghDataPerSectorVec)));
65
}
else
{
66
ATH_MSG_VERBOSE
(
"HoughDataPerSectorVec "
<<
m_houghDataPerSectorVecKey
<<
" is empty, recording"
);
67
ATH_CHECK
(handle.record(std::make_unique<Muon::HoughDataPerSectorVec>()));
68
}
69
return
StatusCode::SUCCESS;
70
}
// execute
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x,...)
Definition
AthMsgStreamMacros.h:47
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x,...)
Definition
AthMsgStreamMacros.h:42
CscPrepDataCollection.h
MMPrepDataCollection.h
MdtPrepDataCollection.h
MuonLayerHoughAlg.h
MuonPrepDataContainer.h
RpcPrepDataCollection.h
ReadHandle.h
Handle class for reading from StoreGate.
TgcPrepDataCollection.h
MuonLayerHoughAlg::m_keyRpc
SG::ReadHandleKey< Muon::RpcPrepDataContainer > m_keyRpc
Definition
MuonLayerHoughAlg.h:25
MuonLayerHoughAlg::m_houghDataPerSectorVecKey
SG::WriteHandleKey< Muon::HoughDataPerSectorVec > m_houghDataPerSectorVecKey
Definition
MuonLayerHoughAlg.h:32
MuonLayerHoughAlg::m_combis
SG::WriteHandleKey< MuonPatternCombinationCollection > m_combis
Definition
MuonLayerHoughAlg.h:31
MuonLayerHoughAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition
MuonLayerHoughAlg.cxx:35
MuonLayerHoughAlg::m_printer
PublicToolHandle< Muon::MuonEDMPrinterTool > m_printer
Definition
MuonLayerHoughAlg.h:34
MuonLayerHoughAlg::m_keyMM
SG::ReadHandleKey< Muon::MMPrepDataContainer > m_keyMM
Definition
MuonLayerHoughAlg.h:29
MuonLayerHoughAlg::m_layerTool
ToolHandle< Muon::IMuonHoughPatternFinderTool > m_layerTool
Definition
MuonLayerHoughAlg.h:35
MuonLayerHoughAlg::m_keyMdt
SG::ReadHandleKey< Muon::MdtPrepDataContainer > m_keyMdt
Definition
MuonLayerHoughAlg.h:27
MuonLayerHoughAlg::m_keyTgc
SG::ReadHandleKey< Muon::TgcPrepDataContainer > m_keyTgc
Definition
MuonLayerHoughAlg.h:24
MuonLayerHoughAlg::m_keyCsc
SG::ReadHandleKey< Muon::CscPrepDataContainer > m_keyCsc
Definition
MuonLayerHoughAlg.h:26
MuonLayerHoughAlg::initialize
virtual StatusCode initialize() override
Definition
MuonLayerHoughAlg.cxx:16
MuonLayerHoughAlg::m_keysTgc
SG::ReadHandleKey< Muon::sTgcPrepDataContainer > m_keysTgc
Definition
MuonLayerHoughAlg.h:28
SG::WriteHandle
Definition
StoreGate/StoreGate/WriteHandle.h:73
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
Muon::RpcPrepDataContainer
MuonPrepDataContainerT< RpcPrepData > RpcPrepDataContainer
Definition
MuonPrepDataContainer.h:95
Muon::TgcPrepDataContainer
MuonPrepDataContainerT< TgcPrepData > TgcPrepDataContainer
Definition
MuonPrepDataContainer.h:96
Muon::MdtPrepDataContainer
MuonPrepDataContainerT< MdtPrepData > MdtPrepDataContainer
Definition
MuonPrepDataContainer.h:94
Muon::sTgcPrepDataContainer
MuonPrepDataContainerT< sTgcPrepData > sTgcPrepDataContainer
Definition
MuonPrepDataContainer.h:100
Muon::MMPrepDataContainer
MuonPrepDataContainerT< MMPrepData > MMPrepDataContainer
Definition
MuonPrepDataContainer.h:99
Muon::CscPrepDataContainer
MuonPrepDataContainerT< CscPrepData > CscPrepDataContainer
Definition
MuonPrepDataContainer.h:97
SG::get
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
Definition
ReadCondHandle.h:281
sTgcPrepDataCollection.h
Generated on
for ATLAS Offline Software by
1.17.0