ATLAS Offline Software
Loading...
Searching...
No Matches
VP1RawDataColl_RPC_Digit.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
8#include "RpcDigitCuts.h"
12#include "VP1Utils/VP1DetInfo.h"
17
22
24 VP1RawDataCommonData* common, const QString& key)
25 : VP1RawDataCollBase(common, key), m_cuts(std::make_unique<RpcDigitCuts>())
26{
29 setRpcShowEta(common->controller()->rpcShowEta());
32 setRpcShowPhi(common->controller()->rpcShowPhi());
35 setRpcShowPrimarySide(common->controller()->rpcShowPrimarySide());
38 setRpcShowOppositeSide(common->controller()->rpcShowOppositeSide());
41 setRpcKeepMissingToT(common->controller()->rpcKeepMissingToT());
44 setRpcAllowedTime(common->controller()->rpcAllowedTime());
47 setRpcAllowedToT(common->controller()->rpcAllowedToT());
48}
49
51
56
58{
59 const auto* helper = VP1DetInfo::rpcIDHelper();
60 const auto* manager = VP1DetInfo::muonDetMgr();
61 if (!VP1JobConfigInfo::hasMuonGeometry() || !helper || !manager) {
62 message("RPC geometry or identifier helper unavailable");
63 return false;
64 }
65 SG::ReadHandleKey<RpcDigitContainer> key{text().toStdString()};
66 if (key.initialize().isFailure())
67 return false;
68 SG::ReadHandle<RpcDigitContainer> container(key, Gaudi::Hive::currentContext());
69 if (!container.isValid()) {
70 message("Could not retrieve RPC digit container " + text());
71 return false;
72 }
73 unsigned skipped = 0;
74 for (const auto* collection : *container) {
75 if (!collection)
76 continue;
77 for (const RpcDigit* digit : *collection) {
78 if (!digit || !helper->valid(digit->identify()) ||
79 !manager->getRpcReadoutElement(digit->identify())) {
80 ++skipped;
81 continue;
82 }
83 addHandle(new VP1RawDataHandle_RPC_Digit(this, digit));
84 }
85 }
86 if (skipped)
87 message(QString("Skipped %1 RPC digits with invalid identifiers or missing geometry").arg(skipped));
88 return true;
89}
90
92{
93 const auto* digit = static_cast<const VP1RawDataHandle_RPC_Digit*>(handle);
94 return m_cuts->accepts(digit->measuresPhi(), digit->time(), digit->timeOverThreshold(), digit->oppositeSide());
95}
96
98{
99 if (m_cuts->showEta == enabled)
100 return;
101 m_cuts->showEta = enabled;
102 if (enabled)
104 else
106}
107
109{
110 if (m_cuts->showPhi == enabled)
111 return;
112 m_cuts->showPhi = enabled;
113 if (enabled)
115 else
117}
118
120{
121 if (m_cuts->showPrimarySide == enabled)
122 return;
123 m_cuts->showPrimarySide = enabled;
124 if (enabled)
126 else
128}
129
131{
132 if (m_cuts->showOppositeSide == enabled)
133 return;
134 m_cuts->showOppositeSide = enabled;
135 if (enabled)
137 else
139}
140
142{
143 if (m_cuts->keepMissingToT == enabled)
144 return;
145 m_cuts->keepMissingToT = enabled;
146 if (enabled)
148 else
150}
151
153{
154 if (m_cuts->timeRange == range)
155 return;
156 m_cuts->timeRange = range;
158}
159
161{
162 if (m_cuts->totRange == range)
163 return;
164 m_cuts->totRange = range;
166}
Handle class for reading from StoreGate.
Use IdentifiableContainer with RpcDigitCollection.
Property holding a SG store/key/clid from which a ReadHandle is made.
static const RpcIdHelper * rpcIDHelper()
static const MuonGM::MuonDetectorManager * muonDetMgr()
void message(const QString &) const
static bool hasMuonGeometry()
static void setMaterialParametersFromRGB(SoMaterial *m, const int r, const int g, const int b, const double &brightness=0.0, const double &transp=0.0)
void recheckCutStatusOfAllNotVisibleHandles()
VP1RawDataCollBase(VP1RawDataCommonData *, const QString &key)
void addHandle(VP1RawDataHandleBase *)
std::unique_ptr< RpcDigitCuts > m_cuts
void assignDefaultMaterial(SoMaterial *) const override
static QStringList availableCollections(IVP1System *)
void setRpcAllowedTime(const VP1Interval &)
void setRpcAllowedToT(const VP1Interval &)
bool cut(VP1RawDataHandleBase *) override
VP1RawDataColl_RPC_Digit(VP1RawDataCommonData *, const QString &key)
~VP1RawDataColl_RPC_Digit() override
void rpcShowEtaChanged(bool)
void rpcShowPhiChanged(bool)
void rpcShowPrimarySideChanged(bool)
void rpcShowOppositeSideChanged(bool)
void rpcAllowedToTChanged(const VP1Interval &)
void rpcKeepMissingToTChanged(bool)
void rpcAllowedTimeChanged(const VP1Interval &)
QStringList getKeys() const
SoMaterial * material() const
QString text() const
STL namespace.