ATLAS Offline Software
Loading...
Searching...
No Matches
MdtRdoToMdtPrepDataTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONMDT_CONVTOOLSR4_MDTRDOTOMDTPREPDATATOOL_H
6#define MUONMDT_CONVTOOLSR4_MDTRDOTOMDTPREPDATATOOL_H
7
12
14
18
21
24
27
30
33
34namespace MuonR4 {
38 class MdtRdoToMdtPrepDataTool : public extends<AthAlgTool, Muon::IMuonRdoToPrepDataTool> {
39 public:
40 using base_class::base_class;
41
45 virtual StatusCode initialize() override;
47 virtual StatusCode decode(const EventContext& ctx, const std::vector<IdentifierHash>& idVect) const override;
48 // new decode method for Rob based readout
49 virtual StatusCode decode(const EventContext& ctx, const std::vector<uint32_t>& robIds) const override;
50 // method to return empty container
51 virtual StatusCode provideEmptyContainer(const EventContext& ctx) const override;
52
53 protected:
55 using DigitPtr_t = std::unique_ptr<MdtDigit>;
56 using TwinDigit_t = std::array<DigitPtr_t, 2>;
58 using DigitVec_t = std::vector<DigitPtr_t>;
59
87
88 HandleCache setupHandleCache(const EventContext& ctx) const;
89 private:
94 void processDigit(const EventContext& ctx, DigitPtr_t&& digit, HandleCache& hCache) const;
95
96 void processDigit(const EventContext& ctx, TwinDigit_t&& digit, HandleCache& cache) const;
97
98
99 StatusCode processCsm(const EventContext& ctx, const MdtCsm* rdoColl, HandleCache& hCache) const;
100 StatusCode processCsmTwin(const EventContext& ctx, const MdtCsm* rdoColl, HandleCache& hCache) const;
101
102 StatusCode processPRDHashes(const EventContext& ctx, const std::vector<IdentifierHash>& chamberHashInRobs, HandleCache& hCache) const;
103
105 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
106 ToolHandle<IMdtCalibrationTool> m_calibrationTool{this, "CalibrationTool", "MdtCalibrationTool"};
107 ToolHandle<Muon::IMDT_RDO_Decoder> m_mdtDecoder{this, "Decoder", "Muon::MdtRDO_Decoder/MdtRDO_Decoder"};
109
110 // read handles
111 SG::ReadHandleKey<ActsTrk::GeometryContext> m_geoCtxKey{this, "AlignmentKey", "ActsAlignment", "Stored alignment"};
113
114 // read condition handle keys
115 SG::ReadCondHandleKey<Muon::TwinTubeMap> m_twinTubeKey{this, "TwinTubeKey", "MdtTwinTubeMap"};
116 SG::ReadCondHandleKey<MuonMDT_CablingMap> m_cablingKey{this, "ReadKey", "MuonMDT_CablingMap", "Key of MuonMDT_CablingMap"};
117
118 // properties
119 Gaudi::Property<int> m_adcCut{this, "AdcCut", 50, "Minimal cut on the adc to convert it into a prepdata object"};
120 Gaudi::Property<bool> m_calibratePrepData{this, "CalibratePrepData", true};
121 Gaudi::Property<bool> m_useTwin{this, "UseTwin", true};
122 // xAOD PRDs
123 SG::WriteHandleKey<xAOD::MdtDriftCircleContainer> m_xAODKey{this, "xAODKey", "xMdtDriftCircles", "If empty, do not produce xAOD, otherwise this is the key of the output xAOD MDT PRD container"};
124 SG::WriteHandleKey<xAOD::MdtTwinDriftCircleContainer> m_xAODTwinKey{this, "xAODTwinKey", "xMdtTwinDriftCircles", "If empty, do not produce xAOD, otherwise this is the key of the output xAOD MDT PRD container"};
125 };
126} // namespace Muon
127
128#endif
Property holding a SG store/key/clid from which a WriteHandle is made.
MDT RDOs : Chamber Service Module, container of AmtHits of a single Mdt chamber.
Definition MdtCsm.h:22
Tool to produce MDT PRDs for Run 4.
SG::ReadCondHandleKey< MuonMDT_CablingMap > m_cablingKey
ToolHandle< IMdtCalibrationTool > m_calibrationTool
const MuonGMR4::MuonDetectorManager * m_detMgrR4
virtual StatusCode initialize() override
standard Athena-Algorithm method
~MdtRdoToMdtPrepDataTool()=default
default destructor
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
tools and services
HandleCache setupHandleCache(const EventContext &ctx) const
ToolHandle< Muon::IMDT_RDO_Decoder > m_mdtDecoder
virtual StatusCode decode(const EventContext &ctx, const std::vector< IdentifierHash > &idVect) const override
Decode method - declared in Muon::IMuonRdoToPrepDataTool.
SG::ReadCondHandleKey< Muon::TwinTubeMap > m_twinTubeKey
SG::WriteHandleKey< xAOD::MdtTwinDriftCircleContainer > m_xAODTwinKey
std::array< DigitPtr_t, 2 > TwinDigit_t
std::unique_ptr< MdtDigit > DigitPtr_t
Abrivate the digit pointer.
void processDigit(const EventContext &ctx, DigitPtr_t &&digit, HandleCache &hCache) const
Process a digit to be converted to a 1D measurement.
StatusCode processCsm(const EventContext &ctx, const MdtCsm *rdoColl, HandleCache &hCache) const
StatusCode processPRDHashes(const EventContext &ctx, const std::vector< IdentifierHash > &chamberHashInRobs, HandleCache &hCache) const
SG::ReadHandleKey< ActsTrk::GeometryContext > m_geoCtxKey
SG::WriteHandleKey< xAOD::MdtDriftCircleContainer > m_xAODKey
StatusCode processCsmTwin(const EventContext &ctx, const MdtCsm *rdoColl, HandleCache &hCache) const
SG::ReadHandleKey< MdtCsmContainer > m_rdoContainerKey
std::vector< DigitPtr_t > DigitVec_t
Store the digits per chamber to ensure sorting.
virtual StatusCode provideEmptyContainer(const EventContext &ctx) const override
Gaudi::Property< bool > m_calibratePrepData
toggle on/off calibration of MdtPrepData
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
This header ties the generic definitions in this package.
MdtDriftCircleAuxContainer_v1 MdtDriftCircleAuxContainer
MdtTwinDriftCircleContainer_v1 MdtTwinDriftCircleContainer
MdtDriftCircleContainer_v1 MdtDriftCircleContainer
MdtTwinDriftCircleAuxContainer_v1 MdtTwinDriftCircleAuxContainer
std::vector< DigitVec_t > digitsForCnv
Temporary collection to be cleaned afterwards.
PrdTwinCont_t prdTwinContainer
The container to hold the twin prep data measurements.
const Muon::TwinTubeMap * twinTubeMap
Cabling map to tell which tube is short circuted at the HV side with another one to form a twin tube ...
xAOD::FillContainer< xAOD::MdtDriftCircleContainer, xAOD::MdtDriftCircleAuxContainer > PrdCont_t
Use the fill container backend to have a valid container for filling.
bool isValid
Flag stating whether the cache is successfully initialized or not.
PrdCont_t prdContainer
The container to hold all 1D tube measurements.
std::map< IdentifierHash, std::vector< TwinDigit_t > > twinDigitsForCnv
Temporary collection of twin digits for conversion.
xAOD::FillContainer< xAOD::MdtTwinDriftCircleContainer, xAOD::MdtTwinDriftCircleAuxContainer > PrdTwinCont_t
const ActsTrk::GeometryContext * gctx
Geometry context to align the tubes within ATLAS.