ATLAS Offline Software
InDetToXAODSpacePointConversion.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef INDETTOXAOD_SPACEPOINT_CONVERSION_H
6 #define INDETTOXAOD_SPACEPOINT_CONVERSION_H
7 
9 
12 
15 
18 
21 
23 
25 #include "InDetIdentifier/SCT_ID.h"
27 
28 #include <unordered_map>
29 
30 namespace InDet {
31 
33  public AthReentrantAlgorithm {
34  public:
36  InDetToXAODSpacePointConversion(const std::string &name, ISvcLocator *pSvcLocator);
37 
38  //@name Usual algorithm methods
40  virtual StatusCode initialize() override;
41  virtual StatusCode execute(const EventContext& ctx) const override;
43 
44  private:
45  StatusCode convertPixel(const EventContext& ctx,
46  xAOD::PixelClusterContainer* cluster_xaod_container) const;
47  StatusCode convertStrip(const EventContext& ctx,
48  const Amg::Vector3D& vertex,
49  xAOD::StripClusterContainer* cluster_xaod_container,
50  std::unordered_map<Identifier, std::size_t>& mapClusters) const;
51  StatusCode convertStripOverlap(const EventContext& ctx,
52  const Amg::Vector3D& vertex,
53  xAOD::StripClusterContainer* cluster_xaod_container,
54  std::unordered_map<Identifier, std::size_t>& mapClusters) const;
55 
56  private:
57  SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData",
58  "SG key for beam spot" };
59 
60  SG::ReadHandleKey< ::SpacePointContainer > m_inSpacepointsPixel {this, "InputPixelSpacePointsName", "ITkPixelSpacePoints",
61  "Input Pixel space points container"};
62  SG::ReadHandleKey< ::SpacePointContainer > m_inSpacepointsStrip {this, "InputStripSpacePointsName", "ITkStripSpacePoints",
63  "Input Strip space points container"};
64  SG::ReadHandleKey< ::SpacePointOverlapCollection > m_inSpacepointsOverlap {this, "InputStripOverlapSpacePointsName", "ITkOverlapSpacePoints",
65  "Input Strip overlap space points container"};
66 
67  SG::WriteHandleKey< xAOD::PixelClusterContainer > m_outClustersPixel {this, "OutputPixelClustersName", "ITkPixelClusters",
68  "Output Pixel cluster container"};
69  SG::WriteHandleKey< xAOD::StripClusterContainer > m_outClustersStrip {this, "OutputStripClustersName", "ITkStripClusters",
70  "Output Strip cluster container"};
71 
72  SG::WriteHandleKey< xAOD::SpacePointContainer > m_outSpacepointsPixel {this, "OutputPixelSpacePointsName", "ITkPixelSpacePoints",
73  "Output Pixel space points container"};
74  SG::WriteHandleKey< xAOD::SpacePointContainer > m_outSpacepointsStrip {this, "OutputStripSpacePointsName", "ITkStripSpacePoints",
75  "Output Strip space points container"};
76  SG::WriteHandleKey< xAOD::SpacePointContainer > m_outSpacepointsOverlap {this, "OutputStripOverlapSpacePointsName", "ITkStripOverlapSpacePoints",
77  "Output Strip Overlap space points container"};
78 
79  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_pixelDetEleCollKey {this, "PixelDetEleCollKey", "ITkPixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"};
80  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_stripDetEleCollKey {this, "StripDetEleCollKey", "ITkStripDetectorElementCollection", "Key of SiDetectorElementCollection for Strip"};
81 
82  Gaudi::Property<bool> m_convertClusters {this, "ConvertClusters", false};
83  Gaudi::Property<bool> m_processPixel {this, "ProcessPixel", true};
84  Gaudi::Property<bool> m_processStrip {this, "ProcessStrip", true};
85 
86  const PixelID* m_pixelID {nullptr};
87  const SCT_ID* m_stripID {nullptr};
88  };
89 
90 }
91 
92 #endif
93 
InDet::InDetToXAODSpacePointConversion::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: InDetToXAODSpacePointConversion.h:57
PixelID.h
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
InDet::InDetToXAODSpacePointConversion::convertPixel
StatusCode convertPixel(const EventContext &ctx, xAOD::PixelClusterContainer *cluster_xaod_container) const
Definition: InDetToXAODSpacePointConversion.cxx:100
InDet::InDetToXAODSpacePointConversion::m_processStrip
Gaudi::Property< bool > m_processStrip
Definition: InDetToXAODSpacePointConversion.h:84
SCT_ID.h
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
InDet::InDetToXAODSpacePointConversion::InDetToXAODSpacePointConversion
InDetToXAODSpacePointConversion(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Definition: InDetToXAODSpacePointConversion.cxx:16
InDet::InDetToXAODSpacePointConversion::m_outSpacepointsStrip
SG::WriteHandleKey< xAOD::SpacePointContainer > m_outSpacepointsStrip
Definition: InDetToXAODSpacePointConversion.h:74
InDet::InDetToXAODSpacePointConversion::m_outClustersPixel
SG::WriteHandleKey< xAOD::PixelClusterContainer > m_outClustersPixel
Definition: InDetToXAODSpacePointConversion.h:67
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::InDetToXAODSpacePointConversion::m_inSpacepointsStrip
SG::ReadHandleKey< ::SpacePointContainer > m_inSpacepointsStrip
Definition: InDetToXAODSpacePointConversion.h:62
InDet::InDetToXAODSpacePointConversion::m_inSpacepointsPixel
SG::ReadHandleKey< ::SpacePointContainer > m_inSpacepointsPixel
Definition: InDetToXAODSpacePointConversion.h:60
InDet::InDetToXAODSpacePointConversion::m_pixelID
const PixelID * m_pixelID
Definition: InDetToXAODSpacePointConversion.h:86
InDet::InDetToXAODSpacePointConversion::convertStripOverlap
StatusCode convertStripOverlap(const EventContext &ctx, const Amg::Vector3D &vertex, xAOD::StripClusterContainer *cluster_xaod_container, std::unordered_map< Identifier, std::size_t > &mapClusters) const
Definition: InDetToXAODSpacePointConversion.cxx:266
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
SpacePointContainer.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
InDet::InDetToXAODSpacePointConversion::convertStrip
StatusCode convertStrip(const EventContext &ctx, const Amg::Vector3D &vertex, xAOD::StripClusterContainer *cluster_xaod_container, std::unordered_map< Identifier, std::size_t > &mapClusters) const
Definition: InDetToXAODSpacePointConversion.cxx:170
InDet::InDetToXAODSpacePointConversion::m_outSpacepointsPixel
SG::WriteHandleKey< xAOD::SpacePointContainer > m_outSpacepointsPixel
Definition: InDetToXAODSpacePointConversion.h:72
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
PixelClusterAuxContainer.h
InDet::InDetToXAODSpacePointConversion::m_outSpacepointsOverlap
SG::WriteHandleKey< xAOD::SpacePointContainer > m_outSpacepointsOverlap
Definition: InDetToXAODSpacePointConversion.h:76
InDet::InDetToXAODSpacePointConversion::m_outClustersStrip
SG::WriteHandleKey< xAOD::StripClusterContainer > m_outClustersStrip
Definition: InDetToXAODSpacePointConversion.h:69
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
PixelClusterContainer.h
SpacePointOverlapCollection.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
InDet::InDetToXAODSpacePointConversion::m_convertClusters
Gaudi::Property< bool > m_convertClusters
Definition: InDetToXAODSpacePointConversion.h:82
AthReentrantAlgorithm.h
SpacePointAuxContainer.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
SiDetectorElementCollection.h
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
StripClusterAuxContainer.h
SG::ReadCondHandleKey< InDet::BeamSpotData >
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
SpacePointContainer.h
SCT_ID
Definition: SCT_ID.h:68
InDet::InDetToXAODSpacePointConversion::m_inSpacepointsOverlap
SG::ReadHandleKey< ::SpacePointOverlapCollection > m_inSpacepointsOverlap
Definition: InDetToXAODSpacePointConversion.h:64
InDet::InDetToXAODSpacePointConversion::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: InDetToXAODSpacePointConversion.cxx:49
StripClusterContainer.h
InDet::InDetToXAODSpacePointConversion
Definition: InDetToXAODSpacePointConversion.h:33
InDet::InDetToXAODSpacePointConversion::m_pixelDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
Definition: InDetToXAODSpacePointConversion.h:79
BeamSpotData.h
InDet::InDetToXAODSpacePointConversion::m_processPixel
Gaudi::Property< bool > m_processPixel
Definition: InDetToXAODSpacePointConversion.h:83
PixelID
Definition: PixelID.h:67
InDet::InDetToXAODSpacePointConversion::m_stripDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_stripDetEleCollKey
Definition: InDetToXAODSpacePointConversion.h:80
InDet::InDetToXAODSpacePointConversion::m_stripID
const SCT_ID * m_stripID
Definition: InDetToXAODSpacePointConversion.h:87
InDet::InDetToXAODSpacePointConversion::initialize
virtual StatusCode initialize() override
Definition: InDetToXAODSpacePointConversion.cxx:21