ATLAS Offline Software
Loading...
Searching...
No Matches
VP1RawDataColl_MDT_RDO.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
7// //
8// Implementation of class VP1RawDataColl_MDT_RDO //
9// //
10// Author: Riccardo Maria BIANCHI <riccardo.maria.bianchi>
11// Initial version: January 2024 //
12// //
14
19
24
26
28
29//____________________________________________________________________
34
35//____________________________________________________________________
43
44
45//____________________________________________________________________
47 : VP1RawDataCollBase(common,key), m_d(new Imp)
48{
49 connect(common->controller(), SIGNAL(mdtAllowedADCChanged(const VP1Interval&)),
50 this, SLOT(setMdtAllowedADC(const VP1Interval&)));
51 setMdtAllowedADC(common->controller()->mdtAllowedADC());
52 connect(common->controller(), SIGNAL(mdtAllowedTDCChanged(const VP1Interval&)),
53 this, SLOT(setMdtAllowedTDC(const VP1Interval&)));
54 setMdtAllowedTDC(common->controller()->mdtAllowedTDC());
55 connect(common->controller(), SIGNAL(mdtExcludeMaskedChanged(bool)),
56 this, SLOT(setMdtExcludeMasked(bool)));
57 setMdtExcludeMasked(common->controller()->mdtExcludeMasked());
58}
59
60//____________________________________________________________________
65
66//____________________________________________________________________
71
72//____________________________________________________________________
75 message("Muon geometry not configured in job");
76 return false;
77 }
78
79 // // From:
80 // https://acode-browser1.usatlas.bnl.gov/lxr/source/athena/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/ReadMdtDigit.cxx#0055
81
82 // get the detMgr
83 // TODO: we should probably simplify by moving to:
84 // const MuonGM::MuonDetectorManager * detmgr = VP1DetInfo::muonDetMgr();
86 "MuonDetectorManager"};
87 detMgrKey.initialize().ignore();
89
90 SG::ReadHandleKey<MdtDigitContainer> digitContainerKey{"MDT_DIGITS"};
91 digitContainerKey.initialize().ignore();
92
93 const EventContext& ctx = Gaudi::Hive::currentContext();
94
95 SG::ReadHandle<MdtDigitContainer> container(digitContainerKey, ctx);
96 if (!container.isValid()) {
97 std::cout << "Could not find MdtDigitContainer called " << container.name()
98 << " in store " << container.store() << std::endl;
99 }
100 // ATH_MSG_DEBUG("Found MdtDigitContainer called " << container.name() << " in store " << container.store());
101
102 // Iterate on the collections
103 for (const MdtDigitCollection* coll : *container) {
105 for (const MdtDigit* digit : *coll) {
106 const Identifier digitId{digit->identify()};
107
108
109 if (digit)
110 addHandle(new VP1RawDataHandle_MDT_RDO(this, digit));
111 }
112 }
113
114 // recheckCutStatusOfAllHandles();
115 return true;
116}
117
118//____________________________________________________________________
120{
121 const auto* digit = static_cast<const VP1RawDataHandle_MDT_RDO*>(handle);
122 return (!m_d->excludeMasked || !digit->isMasked()) &&
123 m_d->mdtAllowedADC.contains(digit->amplitude()) &&
124 m_d->mdtAllowedTDC.contains(digit->time());
125}
126
128{
129 if (m_d->mdtAllowedADC == range)
130 return;
131 m_d->mdtAllowedADC = range;
133}
134
136{
137 if (m_d->mdtAllowedTDC == range)
138 return;
139 m_d->mdtAllowedTDC = range;
141}
142
144{
145 if (m_d->excludeMasked == exclude)
146 return;
147 m_d->excludeMasked = exclude;
148 if (exclude)
150 else
152}
Use IdentifiableContainer with MdtDigitCollection.
StatusCode initialize(bool used=true)
Property holding a SG store/key/clid from which a ReadHandle is made.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
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 *)
static QStringList availableCollections(IVP1System *)
void assignDefaultMaterial(SoMaterial *) const
void setMdtAllowedADC(const VP1Interval &)
VP1RawDataColl_MDT_RDO(VP1RawDataCommonData *, const QString &key)
bool cut(VP1RawDataHandleBase *)
void setMdtAllowedTDC(const VP1Interval &)
QStringList getKeys() const
std::set< std::string > exclude
list of directories to be excluded
Definition hcg.cxx:100