ATLAS Offline Software
MuonSpacePointMakerAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef MUONSPACEPOINTFORMATION_MUONSPACEPOINTMAKERALG_H
5 #define MUONSPACEPOINTFORMATION_MUONSPACEPOINTMAKERALG_H
6 
11 
12 
21 
22 
23 namespace MuonR4{
25  public:
26  MuonSpacePointMakerAlg(const std::string& name, ISvcLocator* pSvcLocator);
27 
29 
30  StatusCode execute(const EventContext& ctx) const override;
31  StatusCode initialize() override;
32 
33  private:
36  std::vector<MuonSpacePoint> etaHits{};
37  std::vector<MuonSpacePoint> phiHits{};
38  };
39 
41  using PreSortedSpacePointMap = std::map<const MuonGMR4::MuonChamber*, spacePointsPerChamber, ChamberSorter>;
42  using SpacePointBucketVec = std::vector<MuonSpacePointBucket>;
43 
44  template <class ContType> StatusCode loadContainerAndSort(const EventContext& ctx,
47 
48  void distributePointsAndStore(const EventContext& ctx,
49  spacePointsPerChamber&& hitsPerChamber,
50  MuonSpacePointContainer& finalContainer) const;
51 
52  void distributePointsAndStore(const EventContext& ctx,
53  std::vector<MuonSpacePoint>&& spacePoints,
54  SpacePointBucketVec& splittedContainer) const;
55 
56 
58  "Key to the uncalibrated Drift circle measurements"};
59 
60  SG::ReadHandleKey<xAOD::RpcMeasurementContainer> m_rpcKey{this, "RpcKey", "xRpcMeasurements",
61  "Key to the uncalibrated 1D rpc hits"};
62 
64  "Key to the uncalibrated 1D tgc hits"};
65 
66  SG::ReadHandleKey<xAOD::MMClusterContainer> m_mmKey{this, "MmKey", "xAODMMClusters",
67  "Key to the uncalibrated 1D Mm hits"};
68 
69  SG::ReadHandleKey<xAOD::sTgcMeasContainer> m_stgcKey{this, "sTgcKey", "xAODsTgcMeasurements"};
70 
71 
72  SG::ReadHandleKey<ActsGeometryContext> m_geoCtxKey{this, "AlignmentKey", "ActsAlignment", "cond handle key"};
73 
74  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
75 
76  SG::WriteHandleKey<MuonSpacePointContainer> m_writeKey{this, "WriteKey", "MuonSpacePoints"};
77 
78  Gaudi::Property<double> m_spacePointWindow{this, "spacePointWindowSize", 2.*Gaudi::Units::m,
79  "Maximal size of a space point bucket"};
80 
81  Gaudi::Property<double> m_spacePointOverlap{this, "spacePointOverlap", 25.*Gaudi::Units::cm,
82  "Hits that are within <spacePointOverlap> of the bucket margin. "
83  "Are copied to the next bucket"};
84  };
85 }
86 
87 
88 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
MuonR4::MuonSpacePointMakerAlg::m_writeKey
SG::WriteHandleKey< MuonSpacePointContainer > m_writeKey
Definition: MuonSpacePointMakerAlg.h:76
MuonR4::MuonSpacePointMakerAlg::m_tgcKey
SG::ReadHandleKey< xAOD::TgcStripContainer > m_tgcKey
Definition: MuonSpacePointMakerAlg.h:63
MuonR4::MuonSpacePointMakerAlg::spacePointsPerChamber::etaHits
std::vector< MuonSpacePoint > etaHits
Definition: MuonSpacePointMakerAlg.h:36
MuonR4::MuonSpacePointMakerAlg::~MuonSpacePointMakerAlg
~MuonSpacePointMakerAlg()=default
MuonR4::MuonSpacePointMakerAlg::m_mdtKey
SG::ReadHandleKey< xAOD::MdtDriftCircleContainer > m_mdtKey
Definition: MuonSpacePointMakerAlg.h:57
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
MuonR4::MuonSpacePointMakerAlg::initialize
StatusCode initialize() override
Definition: MuonSpacePointMakerAlg.cxx:17
sTgcMeasContainer.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
RpcMeasurementContainer.h
MuonR4::MuonSpacePointMakerAlg::MuonSpacePointMakerAlg
MuonSpacePointMakerAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: MuonSpacePointMakerAlg.cxx:13
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
MuonR4::MuonSpacePointMakerAlg
Definition: MuonSpacePointMakerAlg.h:24
MuonR4::MuonSpacePointMakerAlg::spacePointsPerChamber::phiHits
std::vector< MuonSpacePoint > phiHits
Definition: MuonSpacePointMakerAlg.h:37
TgcStripContainer.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MuonR4::MuonSpacePointMakerAlg::loadContainerAndSort
StatusCode loadContainerAndSort(const EventContext &ctx, const SG::ReadHandleKey< ContType > &key, PreSortedSpacePointMap &fillContainer) const
Definition: MuonSpacePointMakerAlg.cxx:29
MuonDetectorManager.h
MMClusterContainer.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
MuonR4::MuonSpacePointMakerAlg::m_mmKey
SG::ReadHandleKey< xAOD::MMClusterContainer > m_mmKey
Definition: MuonSpacePointMakerAlg.h:66
ReadCondHandleKey.h
AthReentrantAlgorithm.h
MdtDriftCircleContainer.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
NSWL1::PadTriggerAdapter::fillContainer
StatusCode fillContainer(const std::unique_ptr< Muon::NSW_PadTriggerDataContainer > &out, const std::vector< std::unique_ptr< NSWL1::PadTrigger >> &triggers, const uint32_t l1id)
Definition: PadTriggerAdapter.cxx:17
MuonR4::MuonSpacePointMakerAlg::execute
StatusCode execute(const EventContext &ctx) const override
Definition: MuonSpacePointMakerAlg.cxx:116
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
MuonR4
The CsvMuonSimHitDumper reads a Simulation Hit container for muons and dumps information to csv files...
Definition: MuonSpacePoint.h:11
MuonR4::MuonSpacePointMakerAlg::distributePointsAndStore
void distributePointsAndStore(const EventContext &ctx, spacePointsPerChamber &&hitsPerChamber, MuonSpacePointContainer &finalContainer) const
Definition: MuonSpacePointMakerAlg.cxx:134
MuonSpacePointContainer.h
MuonR4::MuonSpacePointMakerAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonSpacePointMakerAlg.h:74
MuonR4::MuonSpacePointMakerAlg::m_stgcKey
SG::ReadHandleKey< xAOD::sTgcMeasContainer > m_stgcKey
Definition: MuonSpacePointMakerAlg.h:69
MuonR4::MuonSpacePointMakerAlg::spacePointsPerChamber
Helper struct to collect all space points per chamber.
Definition: MuonSpacePointMakerAlg.h:35
MuonR4::MuonSpacePointMakerAlg::m_spacePointWindow
Gaudi::Property< double > m_spacePointWindow
Definition: MuonSpacePointMakerAlg.h:78
MuonR4::MuonSpacePointMakerAlg::m_spacePointOverlap
Gaudi::Property< double > m_spacePointOverlap
Definition: MuonSpacePointMakerAlg.h:81
IMuonIdHelperSvc.h
MuonR4::MuonSpacePointMakerAlg::m_rpcKey
SG::ReadHandleKey< xAOD::RpcMeasurementContainer > m_rpcKey
Definition: MuonSpacePointMakerAlg.h:60
MuonR4::MuonSpacePointMakerAlg::SpacePointBucketVec
std::vector< MuonSpacePointBucket > SpacePointBucketVec
Definition: MuonSpacePointMakerAlg.h:42
MuonR4::MuonSpacePointMakerAlg::PreSortedSpacePointMap
std::map< const MuonGMR4::MuonChamber *, spacePointsPerChamber, ChamberSorter > PreSortedSpacePointMap
Definition: MuonSpacePointMakerAlg.h:41
MuonGMR4::MuonDetectorManager::ChamberSorter
Helper struct to ensur that the sorting of the MuonChambers remains constants across the jobs.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonDetectorManager.h:100
MuonR4::MuonSpacePointMakerAlg::m_geoCtxKey
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
Definition: MuonSpacePointMakerAlg.h:72
ServiceHandle< Muon::IMuonIdHelperSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37