14 return StatusCode::SUCCESS;
22 std::vector<std::unique_ptr<Muon::TgcPrepDataCollection>> prdCollections{};
30 std::unique_ptr<Muon::TgcPrepDataCollection>& coll = prdCollections[modHash];
32 coll = std::make_unique<Muon::TgcPrepDataCollection>(modHash);
36 Amg::Vector2D locPos = meas->localMeasurementPos().block<2,1>(0,0);
37 auto outPrd = std::make_unique<Muon::TgcPrepData>(meas->identify(),
40 std::vector<Identifier>{meas->identify()},
41 xAOD::toEigen(meas->localCovariance<1>()),
44 outPrd->setHashAndIndex(coll->identifyHash(), coll->size());
45 coll->push_back(std::move(outPrd));
51 auto outContainer = std::make_unique<Muon::TgcPrepDataContainer>(idHelper.
module_hash_max());
52 for (std::unique_ptr<Muon::TgcPrepDataCollection>& coll : prdCollections){
55 ATH_CHECK(outContainer->addCollection(coll.release(), hash));
59 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Handle class for recording to StoreGate.
This is a "hash" representation of an Identifier.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
const TgcReadoutElement * getTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
IdentifierHash identifyHash() const override final
Returns the IdentifierHash of the MuonStation, i.e.
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
size_type module_hash_max() const
the maximum hash value
SG::ReadHandleKey< xAOD::TgcStripContainer > m_readKey
virtual StatusCode execute(const EventContext &ctx) const override final
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_detMgrKey
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
virtual StatusCode initialize() override final
SG::WriteHandleKey< Muon::TgcPrepDataContainer > m_writeKey
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
Eigen::Matrix< double, 2, 1 > Vector2D
This header ties the generic definitions in this package.
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
TgcStripContainer_v1 TgcStripContainer