ATLAS Offline Software
Loading...
Searching...
No Matches
Muon::MmRdoToPrepDataToolMT Class Reference

#include <MmRdoToPrepDataToolMT.h>

Inheritance diagram for Muon::MmRdoToPrepDataToolMT:
Collaboration diagram for Muon::MmRdoToPrepDataToolMT:

Public Member Functions

virtual ~MmRdoToPrepDataToolMT ()=default
 default destructor
virtual StatusCode initialize () override
 standard Athena-Algorithm method
virtual StatusCode decode (const EventContext &ctx, const std::vector< IdentifierHash > &idVect) const override
 Decode method - declared in Muon::IMuonRdoToPrepDataTool.
virtual StatusCode decode (const EventContext &ctx, const std::vector< uint32_t > &robIds) const override
virtual StatusCode provideEmptyContainer (const EventContext &ctx) const override
StatusCode processCollection (const EventContext &ctx, Muon::MMPrepDataContainer *mmPrepDataContainer, xAOD::MMClusterContainer *xAODContainer, const std::vector< IdentifierHash > &idsToDecode, const MM_RawDataCollection *rdoColl) const

Protected Member Functions

Muon::MMPrepDataContainersetupMM_PrepDataContainer (const EventContext &ctx) const
xAOD::MMClusterContainersetupxAODPrepDataContainer (SG::WriteHandle< xAOD::MMClusterContainer > &outputContainer) const
const MM_RawDataContainergetRdoContainer (const EventContext &ctx) const
void processRDOContainer (const EventContext &ctx, Muon::MMPrepDataContainer *mmPrepDataContainer, xAOD::MMClusterContainer *xAODContainer, const std::vector< IdentifierHash > &idsToDecode) const

Protected Attributes

SG::ReadCondHandleKey< MuonGM::MuonDetectorManagerm_muDetMgrKey
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc
SG::WriteHandleKey< Muon::MMPrepDataContainerm_writeKey
 MdtPrepRawData containers.
SG::ReadHandleKey< MM_RawDataContainerm_readKey
SG::UpdateHandleKey< MMPrepDataCollection_Cachem_updateKey
 This is the key for the cache for the MM PRD containers, can be empty.
Gaudi::Property< bool > m_merge {this, "MergePrds", true}
ToolHandle< IMMClusterBuilderToolm_clusterBuilderTool
ToolHandle< INSWCalibToolm_calibTool {this, "NSWCalibTool", ""}
Gaudi::Property< float > m_singleStripChargeCut
SG::WriteHandleKey< xAOD::MMClusterContainerm_xAODKey
Gaudi::Property< bool > m_useNewGeo
const MuonGMR4::MuonDetectorManagerm_detMgrR4 {nullptr}

Detailed Description

Definition at line 25 of file MmRdoToPrepDataToolMT.h.

Constructor & Destructor Documentation

◆ ~MmRdoToPrepDataToolMT()

virtual Muon::MmRdoToPrepDataToolMT::~MmRdoToPrepDataToolMT ( )
virtualdefault

default destructor

Member Function Documentation

◆ decode() [1/2]

StatusCode Muon::MmRdoToPrepDataToolMT::decode ( const EventContext & ctx,
const std::vector< IdentifierHash > & idVect ) const
overridevirtual

Decode method - declared in Muon::IMuonRdoToPrepDataTool.

Definition at line 268 of file MmRdoToPrepDataToolMT.cxx.

269 {
270
271 // is idVect a right thing to use here? to be reviewed maybe
272 ATH_MSG_DEBUG("Size of the RDO container to be decoded: " << idVect.size());
273
274 MMPrepDataContainer* mmPrepDataContainer = setupMM_PrepDataContainer(ctx);
275
276 if (!mmPrepDataContainer) {
277 return StatusCode::FAILURE;
278 }
279
280 SG::WriteHandle<xAOD::MMClusterContainer> outputContainer{};
281 xAOD::MMClusterContainer* xAODContainer{nullptr};
282 if (!m_xAODKey.empty()) {
283 outputContainer = SG::WriteHandle{m_xAODKey, ctx};
284 ATH_CHECK(outputContainer.record(std::make_unique<xAOD::MMClusterContainer>(),
285 std::make_unique<xAOD::MMClusterAuxContainer>()));
286 xAODContainer = outputContainer.ptr();
287 }
288
289 processRDOContainer(ctx, mmPrepDataContainer, xAODContainer, idVect);
290
291 return StatusCode::SUCCESS;
292}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
SG::WriteHandleKey< xAOD::MMClusterContainer > m_xAODKey
void processRDOContainer(const EventContext &ctx, Muon::MMPrepDataContainer *mmPrepDataContainer, xAOD::MMClusterContainer *xAODContainer, const std::vector< IdentifierHash > &idsToDecode) const
Muon::MMPrepDataContainer * setupMM_PrepDataContainer(const EventContext &ctx) const
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
pointer_type ptr()
Dereference the pointer.
MuonPrepDataContainerT< MMPrepData > MMPrepDataContainer
MMClusterContainer_v1 MMClusterContainer

◆ decode() [2/2]

StatusCode Muon::MmRdoToPrepDataToolMT::decode ( const EventContext & ctx,
const std::vector< uint32_t > & robIds ) const
overridevirtual

Definition at line 294 of file MmRdoToPrepDataToolMT.cxx.

295 {
296 ATH_MSG_FATAL("ROB based decoding is not supported....");
297 return StatusCode::FAILURE;
298}
#define ATH_MSG_FATAL(x)

◆ getRdoContainer()

const MM_RawDataContainer * Muon::MmRdoToPrepDataToolMT::getRdoContainer ( const EventContext & ctx) const
protected

Definition at line 231 of file MmRdoToPrepDataToolMT.cxx.

231 {
232 auto rdoContainerHandle = SG::makeHandle(m_readKey, ctx);
233 if (rdoContainerHandle.isValid()) {
234 ATH_MSG_DEBUG("MM_getRdoContainer success");
235 return rdoContainerHandle.cptr();
236 }
237 ATH_MSG_WARNING("Retrieval of MM_RawDataContainer failed !");
238
239 return nullptr;
240}
#define ATH_MSG_WARNING(x)
SG::ReadHandleKey< MM_RawDataContainer > m_readKey
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())

◆ initialize()

StatusCode Muon::MmRdoToPrepDataToolMT::initialize ( )
overridevirtual

standard Athena-Algorithm method

Definition at line 26 of file MmRdoToPrepDataToolMT.cxx.

26 {
27 ATH_MSG_DEBUG(" in initialize()");
28 ATH_CHECK(m_idHelperSvc.retrieve());
29 // check if the initialization of the data container is success
30 ATH_CHECK(m_writeKey.initialize());
31 ATH_CHECK(m_readKey.initialize());
32 ATH_CHECK(m_muDetMgrKey.initialize());
33 ATH_CHECK(m_calibTool.retrieve());
34 ATH_CHECK(m_updateKey.initialize(!m_updateKey.key().empty()));
35 ATH_CHECK(m_xAODKey.initialize(!m_xAODKey.empty()));
36 if (m_useNewGeo) {
38 }
39 return StatusCode::SUCCESS;
40}
const MuonGMR4::MuonDetectorManager * m_detMgrR4
SG::WriteHandleKey< Muon::MMPrepDataContainer > m_writeKey
MdtPrepRawData containers.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Gaudi::Property< bool > m_useNewGeo
ToolHandle< INSWCalibTool > m_calibTool
SG::UpdateHandleKey< MMPrepDataCollection_Cache > m_updateKey
This is the key for the cache for the MM PRD containers, can be empty.
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_muDetMgrKey
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ processCollection()

StatusCode Muon::MmRdoToPrepDataToolMT::processCollection ( const EventContext & ctx,
Muon::MMPrepDataContainer * mmPrepDataContainer,
xAOD::MMClusterContainer * xAODContainer,
const std::vector< IdentifierHash > & idsToDecode,
const MM_RawDataCollection * rdoColl ) const

reconstruct the clusters

Definition at line 42 of file MmRdoToPrepDataToolMT.cxx.

46 {
47 ATH_MSG_DEBUG(" ***************** Start of process MM Collection");
48 const MmIdHelper& id_helper = m_idHelperSvc->mmIdHelper();
49 // protect for large splashes
50 bool merge = m_merge || rdoColl->size() > 100;
51
52 const IdentifierHash hash = rdoColl->identifierHash();
53
54 // check if we actually want to decode this RDO collection
55 if (!idsToDecode.empty() and std::find(idsToDecode.begin(), idsToDecode.end(),
56 hash) == idsToDecode.end()) {
57 ATH_MSG_DEBUG("Hash ID " << hash << " not in input list, ignore");
58 return StatusCode::SUCCESS;
59 } else
60 ATH_MSG_DEBUG("Going to decode " << hash);
61
62 // check if the collection already exists, otherwise add it
63 if (mmPrepDataContainer->indexFindPtr(hash) != nullptr) {
64
65 ATH_MSG_DEBUG("In processCollection: collection already contained in the MM PrepData container");
66 return StatusCode::SUCCESS;
67 }
68
69 // Get write handle for this collection
70 MMPrepDataContainer::IDC_WriteHandle lock = mmPrepDataContainer->getWriteHandle(hash);
71 // Check if collection already exists (via the cache, i.e. in online trigger
72 // mode)
73 if (lock.OnlineAndPresentInAnotherView()) {
74 ATH_MSG_DEBUG("In processCollection: collection already available in the MM PrepData container (via cache)");
75 return StatusCode::SUCCESS;
76 }
77 auto prdColl = std::make_unique<MMPrepDataCollection>(hash);
78
79 // set the offline identifier of the collection Id
80 IdContext context = id_helper.module_context();
81 Identifier moduleId{};
82 if (id_helper.get_id(hash, moduleId, &context) != 0) {
83 ATH_MSG_ERROR("Could not convert the hash Id: " << hash << " to identifier");
84 } else {
85 ATH_MSG_DEBUG(" dump moduleId " << moduleId);
86 prdColl->setIdentifier(moduleId);
87 }
88
89 const MuonGM::MuonDetectorManager* MuonDetMgr{};
90 ATH_CHECK(SG::get(MuonDetMgr, m_muDetMgrKey, ctx));
91
92 std::vector<MMPrepData> MMprds;
93 // convert the RDO collection to a PRD collection
94 for (const MM_RawData* rdo : *rdoColl) {
95 ATH_MSG_DEBUG("Adding a new MM PrepRawData");
96
97 const Identifier rdoId = rdo->identify();
98 // ATH_MSG_ALWAYS(" dump rdo " << m_idHelperSvc->toString(rdoId) << " pdo " << rdo->charge()
99 // << " time " << rdo->time() << " relBCID " << rdo->relBcid());
100
101 int channel = rdo->channel();
102 std::vector<Identifier> rdoList;
103 Identifier prdId = id_helper.channelID(rdoId, id_helper.multilayer(rdoId), id_helper.gasGap(rdoId), channel);
104 ATH_MSG_DEBUG(" channel RDO " << channel << " channel from rdoID " << id_helper.channel(rdoId));
105 rdoList.push_back(prdId);
106
107 // get the local and global positions
108 const MuonGM::MMReadoutElement* detEl = MuonDetMgr->getMMReadoutElement(prdId);
109 Amg::Vector2D localPos{Amg::Vector2D::Zero()};
110
111 bool getLocalPos = detEl->stripPosition(prdId, localPos);
112 if (!getLocalPos) {
113 if (msgLvl(MSG::DEBUG)) { // We should still keep this a warning and fix it properly but silence it for now (ATLASRECTS-7520)
114 ATH_MSG_WARNING("Could not get the local strip position for "<< m_idHelperSvc->toString(prdId));
115 }
116 continue;
117 }
118
119 Amg::Vector3D globalPos{Amg::Vector3D::Zero()};
120 bool getGlobalPos = detEl->stripGlobalPosition(prdId, globalPos);
121 if (!getGlobalPos) {
122 ATH_MSG_WARNING("Could not get the global strip position for MM");
123 continue;
124 }
125 NSWCalib::CalibratedStrip calibStrip;
126 ATH_CHECK(m_calibTool->calibrateStrip(ctx, rdo, calibStrip));
127 if (calibStrip.charge < 0) {
128 if (!hitNegativeCharge || msgLvl(MSG::DEBUG)) {
129 ATH_MSG_DEBUG("One MM RDO or more, such as one with pdo = "<< rdo->charge()
130 << " counts, corresponds to a negative charge ("<< calibStrip.charge << "). Skipping these RDOs");
131 hitNegativeCharge = true;
132 }
133 continue;
134 }
135
136 Trk::LocalDirection localDir;
137 const Trk::PlaneSurface& psurf = detEl->surface(prdId);
138 Amg::Vector2D lpos{Amg::Vector2D::Zero()};
139 psurf.globalToLocal(globalPos, globalPos, lpos);
140 psurf.globalToLocalDirection(globalPos, localDir);
141
142 ATH_MSG_DEBUG(" Surface centre x " << Amg::toString(psurf.center()));
143 ATH_MSG_DEBUG(" localPos x " <<Amg::toString(localPos)<< " localPos y " << Amg::toString(lpos));
144
145 Amg::Vector3D gdir = psurf.transform().linear() * Amg::Vector3D::UnitY();
146 ATH_MSG_DEBUG(" MM detector surface direction phi "<< gdir.phi() << " global radius hit " << globalPos.perp()
147 << " phi pos " << globalPos.phi() << " global z "<< globalPos.z());
148
149 auto cov = Amg::MatrixX(2, 2);
150 cov.setIdentity();
151 (cov)(0, 0) = calibStrip.resTransDistDrift;
152 (cov)(1, 1) = calibStrip.resLongDistDrift;
153 localPos.x() += calibStrip.dx;
154
155 if (!merge) {
156 // storage will be handeled by Store Gate
157 auto mpd = std::make_unique<MMPrepData>(prdId, hash,
158 std::move(localPos), std::move(rdoList), std::move(cov),
159 detEl,
160 calibStrip.time, calibStrip.charge, calibStrip.distDrift);
162
163 prdColl->push_back(std::move(mpd));
164
165 } else {
166 if (calibStrip.charge < m_singleStripChargeCut) {
167 // ATH_MSG_ALWAYS("Strip with charge " << calibStrip.charge << " below the cut of " << m_singleStripChargeCut << ", skipping it");
168 continue;
169 }
170 // ATH_MSG_ALWAYS("producing prd with charge " << calibStrip.charge << " time " << calibStrip.time);
171 MMPrepData mpd(prdId, hash, std::move(localPos), std::move(rdoList),
172 std::move(cov), detEl, calibStrip.time, calibStrip.charge,
173 calibStrip.distDrift);
174 // set the hash of the MMPrepData such that it contains the correct value
175 // in case it gets used in SimpleMMClusterBuilderTool::getClusters
176 mpd.setHashAndIndex(hash, 0);
178 MMprds.push_back(std::move(mpd));
179 }
180 }
181
182 if (merge) {
183 std::vector<std::unique_ptr<MMPrepData>> clusters;
184
186 ATH_CHECK(m_clusterBuilderTool->getClusters(ctx, std::move(MMprds), clusters));
187
188 for (std::unique_ptr<MMPrepData>& prdN : clusters) {
189 prdN->setHashAndIndex(prdColl->identifyHash(), prdColl->size());
190 prdColl->push_back(std::move(prdN));
191 }
192 } // merge
193
194 if (xAODContainer) {
195 // Lambda to fill xprd from prd
196 std::vector<const MMPrepData*> sortMe{prdColl->begin(), prdColl->end()};
197 std::ranges::sort(sortMe, IdentifierByDetElSorter{m_idHelperSvc.get()});
198 for (const MMPrepData* prd : sortMe) {
199 xAOD::MMCluster* cluster{xAODContainer->push_back(std::make_unique<xAOD::MMCluster>())};
200 cluster->setIdentifier(prd->identify().get_compact());
201 cluster->setMeasurement(m_idHelperSvc->detElementHash(prd->identify()),
202 xAOD::MeasVector<1>{prd->localPosition().x()},
203 xAOD::MeasMatrix<1>{prd->localCovariance()(0, 0)});
204 cluster->setGasGap(id_helper.gasGap(prd->identify()));
205 cluster->setChannelNumber(id_helper.channel(prd->identify()));
206 cluster->setTime(prd->time());
207 cluster->setCharge(prd->charge());
208 cluster->setDriftDist(prd->driftDist());
209 cluster->setAngle(prd->angle());
210 cluster->setChiSqProb(prd->chisqProb());
211 cluster->setAuthor(prd->author());
212 cluster->setQuality(prd->quality());
213 cluster->setStripNumbers(prd->stripNumbers());
214 cluster->setStripTimes(prd->stripTimes());
215 cluster->setStripCharges(prd->stripCharges());
216 cluster->setStripDriftDist(prd->stripDriftDist());
217 cluster->setStripDriftErrors(prd->stripDriftErrors());
218 if (m_detMgrR4) {
219 cluster->setReadoutElement(m_detMgrR4->getMmReadoutElement(prd->identify()));
220 }
221 }
222 }
223 // now write the collection
224 ATH_CHECK(lock.addOrDelete(std::move(prdColl)));
225 ATH_MSG_DEBUG("PRD hash " << hash << " has been moved to container");
226
227 return StatusCode::SUCCESS;
228}
#define ATH_MSG_ERROR(x)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
IDC_WriteHandle getWriteHandle(IdentifierHash hash)
virtual const T * indexFindPtr(IdentifierHash hashId) const override final
return pointer on the found entry or null if out of range using hashed index - fast version,...
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channel) const
int channel(const Identifier &id) const override
int gasGap(const Identifier &id) const override
get the hashes
int multilayer(const Identifier &id) const
virtual bool stripPosition(const Identifier &id, Amg::Vector2D &pos) const override final
strip position – local or global If the strip number is outside the range of valid strips,...
bool stripGlobalPosition(const Identifier &id, Amg::Vector3D &gpos) const
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
const MMReadoutElement * getMMReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
virtual int get_id(const IdentifierHash &hash_id, Identifier &id, const IdContext *context=0) const override
Create compact id from hash id (return == 0 for OK)
IdContext module_context() const
id for module
ToolHandle< IMMClusterBuilderTool > m_clusterBuilderTool
Gaudi::Property< float > m_singleStripChargeCut
Gaudi::Property< bool > m_merge
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const override final
Specified for PlaneSurface: GlobalToLocal method without dynamic memory allocation - boolean checks i...
void globalToLocalDirection(const Amg::Vector3D &glodir, Trk::LocalDirection &locdir) const
This method transforms the global direction to a local direction wrt the plane.
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
const Amg::Vector3D & center() const
Returns the center position of the Surface.
void setDriftDist(float value)
Sets the drift distance.
void setStripDriftDist(const std::vector< float > &stripDriftDist)
void setReadoutElement(const MuonGMR4::MmReadoutElement *readoutEle)
set the pointer to the MmReadoutElement
void setStripDriftErrors(const std::vector< DriftCov_t > &stripDriftErrors)
void setStripNumbers(const std::vector< uint16_t > &stripNumbers)
void setStripCharges(const std::vector< int > &stripCharges)
void setAuthor(Author author)
void setChiSqProb(float value)
Sets the microTPC chisq probability.
void setTime(uint16_t value)
Sets the TDC counts.
void setAngle(float value)
Sets the microTPC angle.
void setQuality(Quality quality)
void setStripTimes(const std::vector< int16_t > &stripTimes)
void setChannelNumber(uint16_t strip)
void setGasGap(uint8_t gap)
void setCharge(uint32_t value)
Sets the calibrated charge.
void setMeasurement(const DetectorIDHashType idHash, MeasVector< N > locPos, MeasMatrix< N > locCov)
Sets IdentifierHash, local position and local covariance of the measurement.
void setIdentifier(const DetectorIdentType measId)
Sets the full Identifier of the measurement.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
merge(input_file_pattern, output_file)
Merge many input LHE files into a single output file.
Definition LHE.py:29
Eigen::Matrix< float, N, N > MeasMatrix
Eigen::Matrix< float, N, 1 > MeasVector
Abrivation of the Matrix & Covariance definitions.
MMCluster_v1 MMCluster

◆ processRDOContainer()

void Muon::MmRdoToPrepDataToolMT::processRDOContainer ( const EventContext & ctx,
Muon::MMPrepDataContainer * mmPrepDataContainer,
xAOD::MMClusterContainer * xAODContainer,
const std::vector< IdentifierHash > & idsToDecode ) const
protected

Definition at line 242 of file MmRdoToPrepDataToolMT.cxx.

245 {
246 ATH_MSG_DEBUG("In processRDOContainer");
247 const MM_RawDataContainer* rdoContainer = getRdoContainer(ctx);
248 if (!rdoContainer) {
249 return;
250 }
251
252 for (const MM_RawDataCollection* rdoColl : *rdoContainer) {
253
254 if (rdoColl->empty()){
255 continue;
256 }
257 ATH_MSG_DEBUG("New RDO collection with " << rdoColl->size() << "MM Hits");
258
259 if (processCollection(ctx, mmPrepDataContainer, xAODContainer, idsToDecode, rdoColl).isFailure()) {
261 "processCsm returns a bad StatusCode - keep going for new data "
262 "collections in this event");
263 }
264 }
265}
const MM_RawDataContainer * getRdoContainer(const EventContext &ctx) const
StatusCode processCollection(const EventContext &ctx, Muon::MMPrepDataContainer *mmPrepDataContainer, xAOD::MMClusterContainer *xAODContainer, const std::vector< IdentifierHash > &idsToDecode, const MM_RawDataCollection *rdoColl) const

◆ provideEmptyContainer()

StatusCode Muon::MmRdoToPrepDataToolMT::provideEmptyContainer ( const EventContext & ctx) const
overridevirtual

Definition at line 299 of file MmRdoToPrepDataToolMT.cxx.

299 {
300 if (!m_xAODKey.empty()) {
301 SG::WriteHandle writeHandle{m_xAODKey, ctx};
302 ATH_CHECK(writeHandle.record(std::make_unique<xAOD::MMClusterContainer>(),
303 std::make_unique<xAOD::MMClusterAuxContainer>()));
304 }
305
306 return setupMM_PrepDataContainer(ctx) ? StatusCode::SUCCESS
307 : StatusCode::FAILURE;
308}

◆ setupMM_PrepDataContainer()

MMPrepDataContainer * Muon::MmRdoToPrepDataToolMT::setupMM_PrepDataContainer ( const EventContext & ctx) const
protected

Definition at line 311 of file MmRdoToPrepDataToolMT.cxx.

311 {
312
313 SG::WriteHandle handle{m_writeKey, ctx};
314 if (m_updateKey.key().empty()) {
315 // No external cache, just record the container
317 handle.record(std::make_unique<MMPrepDataContainer>(
318 m_idHelperSvc->mmIdHelper().module_hash_max()));
319
320 if (status.isFailure() || !handle.isValid()) {
322 "Could not record container of MicroMega PrepData Container at "
323 << m_writeKey.key());
324 return nullptr;
325 }
326 } else {
327 // use the cache to get the container
328 SG::UpdateHandle update(m_updateKey, ctx);
329 if (!update.isValid()) {
330 ATH_MSG_FATAL("Invalid UpdateHandle " << m_updateKey.key());
331 return nullptr;
332 }
333 StatusCode status = handle.record(std::make_unique<MMPrepDataContainer>(update.ptr()));
334 if (status.isFailure() || !handle.isValid()) {
336 "Could not record container of MM PrepData Container using cache "
337 << m_updateKey.key() << " - "
338 << m_writeKey.key());
339 return nullptr;
340 }
341 ATH_MSG_DEBUG("Created container using cache for "
342 << m_updateKey.key());
343 }
344 return handle.ptr();
345}
virtual bool isValid() override final
Can the handle be successfully dereferenced?
::StatusCode StatusCode
StatusCode definition for legacy code.
status
Definition merge.py:16

◆ setupxAODPrepDataContainer()

xAOD::MMClusterContainer * Muon::MmRdoToPrepDataToolMT::setupxAODPrepDataContainer ( SG::WriteHandle< xAOD::MMClusterContainer > & outputContainer) const
protected

Member Data Documentation

◆ m_calibTool

ToolHandle<INSWCalibTool> Muon::MmRdoToPrepDataToolMT::m_calibTool {this, "NSWCalibTool", ""}
protected

Definition at line 83 of file MmRdoToPrepDataToolMT.h.

83{this, "NSWCalibTool", ""};

◆ m_clusterBuilderTool

ToolHandle<IMMClusterBuilderTool> Muon::MmRdoToPrepDataToolMT::m_clusterBuilderTool
protected
Initial value:
{
this, "ClusterBuilderTool",
"Muon::SimpleMMClusterBuilderTool/SimpleMMClusterBuilderTool"}

Definition at line 80 of file MmRdoToPrepDataToolMT.h.

80 {
81 this, "ClusterBuilderTool",
82 "Muon::SimpleMMClusterBuilderTool/SimpleMMClusterBuilderTool"};

◆ m_detMgrR4

const MuonGMR4::MuonDetectorManager* Muon::MmRdoToPrepDataToolMT::m_detMgrR4 {nullptr}
protected

Definition at line 98 of file MmRdoToPrepDataToolMT.h.

98{nullptr};

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> Muon::MmRdoToPrepDataToolMT::m_idHelperSvc
protected
Initial value:
{
this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}

Definition at line 65 of file MmRdoToPrepDataToolMT.h.

65 {
66 this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};

◆ m_merge

Gaudi::Property<bool> Muon::MmRdoToPrepDataToolMT::m_merge {this, "MergePrds", true}
protected

Definition at line 78 of file MmRdoToPrepDataToolMT.h.

78{this, "MergePrds", true};

◆ m_muDetMgrKey

SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> Muon::MmRdoToPrepDataToolMT::m_muDetMgrKey
protected
Initial value:
{
this, "DetectorManagerKey", "MuonDetectorManager",
"Key of input MuonDetectorManager condition data"}

Definition at line 61 of file MmRdoToPrepDataToolMT.h.

61 {
62 this, "DetectorManagerKey", "MuonDetectorManager",
63 "Key of input MuonDetectorManager condition data"};

◆ m_readKey

SG::ReadHandleKey<MM_RawDataContainer> Muon::MmRdoToPrepDataToolMT::m_readKey
protected
Initial value:
{
this, "InputCollection", "MMRDO"}

Definition at line 71 of file MmRdoToPrepDataToolMT.h.

71 {
72 this, "InputCollection", "MMRDO"};

◆ m_singleStripChargeCut

Gaudi::Property<float> Muon::MmRdoToPrepDataToolMT::m_singleStripChargeCut
protected
Initial value:
{
this, "singleStripChargeCut",
FLT_MIN }

Definition at line 87 of file MmRdoToPrepDataToolMT.h.

87 {
88 this, "singleStripChargeCut",
89 FLT_MIN /*6241 * 0.4*/}; // 0.4 fC from BB5 cosmics

◆ m_updateKey

SG::UpdateHandleKey<MMPrepDataCollection_Cache> Muon::MmRdoToPrepDataToolMT::m_updateKey
protected
Initial value:
{
this, "PrdCacheKey", "",
"Optional external cache for the MM PRD container"}

This is the key for the cache for the MM PRD containers, can be empty.

Definition at line 75 of file MmRdoToPrepDataToolMT.h.

75 {
76 this, "PrdCacheKey", "",
77 "Optional external cache for the MM PRD container"};

◆ m_useNewGeo

Gaudi::Property<bool> Muon::MmRdoToPrepDataToolMT::m_useNewGeo
protected
Initial value:
{this, "UseR4DetMgr", false,
"Switch between the legacy and the new geometry"}

Definition at line 95 of file MmRdoToPrepDataToolMT.h.

95 {this, "UseR4DetMgr", false,
96 "Switch between the legacy and the new geometry"};

◆ m_writeKey

SG::WriteHandleKey<Muon::MMPrepDataContainer> Muon::MmRdoToPrepDataToolMT::m_writeKey
protected
Initial value:
{
this, "OutputCollection", "MM_Measurements"}

MdtPrepRawData containers.

Definition at line 69 of file MmRdoToPrepDataToolMT.h.

69 {
70 this, "OutputCollection", "MM_Measurements"};

◆ m_xAODKey

SG::WriteHandleKey<xAOD::MMClusterContainer> Muon::MmRdoToPrepDataToolMT::m_xAODKey
protected
Initial value:
{
this, "xAODKey", "",
"If empty, do not produce xAOD, otherwise this is the key of the output "
"xAOD MDT PRD container"}

Definition at line 90 of file MmRdoToPrepDataToolMT.h.

90 {
91 this, "xAODKey", "",
92 "If empty, do not produce xAOD, otherwise this is the key of the output "
93 "xAOD MDT PRD container"};

The documentation for this class was generated from the following files: