ATLAS Offline Software
Loading...
Searching...
No Matches
SpacePointWriter.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3 */
4#ifndef MUONACTSDUMP_SPACEPOINTWRITER_H
5#define MUONACTSDUMP_SPACEPOINTWRITER_H
6
7
13
14
17
19
20#include "Acts/Geometry/GeometryIdentifier.hpp"
21
22namespace MuonValR4{
30 public:
32 virtual StatusCode initialize() override final;
33 virtual StatusCode execute(const EventContext& ctx) override final;
34 virtual StatusCode finalize() override final;
35 private:
38 std::uint32_t encodeId(const MuonR4::SpacePoint& spacePoint,
39 std::uint32_t gasGap) const;
41 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
42
44 PublicToolHandle<ActsTrk::ITrackingGeometryTool> m_trackingGeometryTool{this, "TrackingGeometryTool", ""};
45
46 SG::ReadHandleKeyArray<MuonR4::SpacePointContainer> m_spacePointKeys{this, "SpacePointKeys", {"MuonSpacePoints", "NswSpacePoints"} };
47
49 MuonVal::MuonTesterTree m_tree{"MuonSpacePoints", "ActsMuonSpacePointDump"};
51 MuonVal::ScalarBranch<std::uint32_t>& m_eventId{m_tree.newScalar<std::uint32_t>("event_id")};
52
54 using GeoId_t = Acts::GeometryIdentifier::Value;
55 MuonVal::VectorBranch<GeoId_t>& m_geometryId{m_tree.newVector<GeoId_t>("spacePoint_geometryId")};
57 MuonVal::VectorBranch<std::uint16_t>& m_bucketId{m_tree.newVector<std::uint16_t>("spacePoint_bucketId")};
59 MuonVal::VectorBranch<std::uint32_t>& m_muonId{m_tree.newVector<std::uint32_t>("spacePoint_muonId")};
67 MuonVal::VectorBranch<float>& m_covLoc0{m_tree.newVector<float>( "spacePoint_covLoc0")};
69 MuonVal::VectorBranch<float>& m_covLoc1{m_tree.newVector<float>( "spacePoint_covLoc1")};
71 MuonVal::VectorBranch<float>& m_covT{m_tree.newVector<float>( "spacePoint_covT")};
73 MuonVal::VectorBranch<float>& m_driftR{m_tree.newVector<float>( "spacePoint_driftRadius")};
75 MuonVal::VectorBranch<float>& m_time{m_tree.newVector<float>( "spacePoint_time")};
78 MuonVal::CoordSystemsBranch m_toMeasFrame{m_tree, "spacePoint_toSectorFrame"};
79 };
80}
81
82#endif
AthHistogramAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
The muon space point is the combination of two uncalibrated measurements one of them measures the eta...
Algorithm to write the Space points in a format that can later be read by the Acts Examples framework...
MuonVal::UnitThreeVectorBranch m_sensorDirection
Orientation of the wire or strip.
virtual StatusCode initialize() override final
MuonVal::VectorBranch< float > & m_time
Recorded measurement time.
MuonVal::VectorBranch< std::uint32_t > & m_muonId
Identifier encoding the staion name && the coordinates measured by the space point.
MuonVal::UnitThreeVectorBranch m_toNextSensor
Vector pointing to the next channel in the same measurement plane.
MuonVal::MuonTesterTree m_tree
instance to the Event tree
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
The tool handle of the tracking geometry tool.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Service handle towards the IdHelper svc.
MuonVal::VectorBranch< float > & m_covLoc0
Covariance value along the non-bending direction.
MuonVal::VectorBranch< float > & m_covT
Time covariance value.
MuonVal::VectorBranch< std::uint16_t > & m_bucketId
Bucket counter in the event.
MuonVal::ThreeVectorBranch m_localPosition
Position of the measurement.
Acts::GeometryIdentifier::Value GeoId_t
Geometry identifier of the associated surface.
MuonVal::VectorBranch< GeoId_t > & m_geometryId
SG::ReadHandleKeyArray< MuonR4::SpacePointContainer > m_spacePointKeys
virtual StatusCode finalize() override final
MuonVal::VectorBranch< float > & m_covLoc1
Covaraiance value along the bending direction.
MuonVal::ScalarBranch< std::uint32_t > & m_eventId
The event number in this event.
AthHistogramAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
MuonVal::CoordSystemsBranch m_toMeasFrame
Coordinate transformation from the local measurement's frame to the common sector frame.
std::uint32_t encodeId(const MuonR4::SpacePoint &spacePoint, std::uint32_t gasGap) const
Encode the space point's identifier into the Identifier understood by ActsExamples.
MuonVal::VectorBranch< float > & m_driftR
Drift radius of the straw measurements.
virtual StatusCode execute(const EventContext &ctx) override final
Execute method.
Helper class to dump the Amg::Transformations into 4 three vector branches.
Lightweight algorithm to read xAOD MDT sim hits and (fast-digitised) drift circles from SG and fill a...
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray