ATLAS Offline Software
SiTrackerSpacePointFinder.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef SiSpacePointFormation_SI_POINT_FINDER_H
8 #define SiSpacePointFormation_SI_POINT_FINDER_H
9 
14 #include "Identifier/Identifier.h"
28 
29 #include "GaudiKernel/ToolHandle.h"
30 //
31 #include "AthAllocators/DataPool.h"
32 
33 #include <string>
34 
37 class SpacePointContainer;
38 class SCT_ID;
39 class PixelID;
40 
41 namespace InDet {
42 
84 
85  public:
86 
91  SiTrackerSpacePointFinder(const std::string& name,
92  ISvcLocator* pSvcLocator);
93 
94  virtual ~SiTrackerSpacePointFinder() = default;
95 
96  virtual StatusCode initialize() override;
97 
98  virtual StatusCode execute (const EventContext& ctx) const override;
99 
100  virtual StatusCode finalize() override;
101 
103  virtual bool isClonable() const override { return true; };
105 
106  private:
108  struct SPFCache{
110  const EventContext& ctx;
112  SPFCache(const EventContext& inctx) : ctx(inctx), SCTCContainer(nullptr) { }
113  };
114 
115  // methods
116 
125 
130  void addSCT_SpacePoints
131  (const SCT_ClusterCollection* next,
133  const InDetDD::SiDetectorElementCollection* elements,
134  SpacePointCollection* spacepointCollection,
135  SpacePointOverlapCollection* spacepointOverlapCollection,
136  SPFCache&,
137  DataPool<SCT_SpacePoint>* dataItemsSCT) const;
139 
140  // data members
141 
146  SG::ReadHandleKey<SCT_ClusterContainer> m_Sct_clcontainerKey{this, "SCT_ClustersName", "SCT_Clusters", "SCT clContainer"};
147  SG::ReadHandleKey<PixelClusterContainer> m_Pixel_clcontainerKey{this, "PixelsClustersName", "PixelClusters", "Pixel clContainer"};
149 
154  SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
157  SG::ReadCondHandleKey<InDet::SiElementPropertiesTable> m_SCTPropertiesKey{this, "SCTPropertiesKey", "SCT_ElementPropertiesTable", "Key of input SiElementPropertiesTable for SCT"};
159  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
161 
166  SG::WriteHandleKey<SpacePointContainer> m_SpacePointContainer_SCTKey{this, "SpacePointsSCTName", "SCT_SpacePoints", "SpacePoint SCT container"};
167  SG::WriteHandleKey<SpacePointContainer> m_SpacePointContainerPixelKey{this, "SpacePointsPixelName", "PixelSpacePoints", "SpacePoint Pixel container"};
168  SG::WriteHandleKey<SpacePointOverlapCollection> m_spacepointoverlapCollectionKey{this, "SpacePointsOverlapName", "OverlapSpacePoints", "Space Point Overlap collection"};
170 
176  {this, "SpacePointCacheSCT", ""};
178  {this, "SpacePointCachePix", ""};
180 
185  ToolHandle< SiSpacePointMakerTool > m_SiSpacePointMakerTool{this, "SiSpacePointMakerTool", "InDet::SiSpacePointMakerTool"};
186  ToolHandle<GenericMonitoringTool> m_monTool{this, "monTool", "", "Monitoring tool"};
188 
193  const PixelID* m_idHelperPixel{nullptr};
194  const SCT_ID* m_idHelper{nullptr};
196 
201  BooleanProperty m_selectPixels{this, "ProcessPixels", true};
202  BooleanProperty m_selectSCTs{this, "ProcessSCTs", true};
203  BooleanProperty m_overlap
204  {this, "ProcessOverlaps", true, "process overlaps of SCT wafers"};
205  BooleanProperty m_allClusters
206  {this, "AllClusters", false, "process all clusters without limits"};
207  bool m_cachemode{false};
208  BooleanProperty m_useDataPoolWithCache
209  {this, "useDataPoolWithCache", false, "use DataPool With Cache"};
211 
221  {this, "OverlapLimitOpposite", 2.8, "overlap limit for opposite-neighbour"};
222  FloatProperty m_overlapLimitPhi
223  {this, "OverlapLimitPhi", 5.64, "overlap limit for phi-neighbours"};
224  FloatProperty m_overlapLimitEtaMin
225  {this, "OverlapLimitEtaMin", 1.68, "low overlap limit for eta-neighbours"};
226  FloatProperty m_overlapLimitEtaMax
227  {this, "OverlapLimitEtaMax", 3.0, "high overlap limit for eta-neighbours"};
229 
234  BooleanProperty m_overrideBS{this, "OverrideBeamSpot", false};
235  FloatProperty m_xVertex{this, "VertexX", 0.};
236  FloatProperty m_yVertex{this, "VertexY", 0.};
237  FloatProperty m_zVertex{this, "VertexZ", 0.};
239 
247  mutable std::atomic<int> m_numberOfEvents{0};
248  mutable std::atomic<int> m_numberOfPixel{0};
249  mutable std::atomic<int> m_numberOfSCT{0};
250  mutable std::atomic<int> m_sctCacheHits{0};
251  mutable std::atomic<int> m_pixCacheHits{0};
253 
254  };
255 
256 }
257 
258 #endif // SiSpacePointFormation_SI_POINT_FINDER_H
SiElementPropertiesTable.h
InDet::SiTrackerSpacePointFinder::m_xVertex
FloatProperty m_xVertex
Definition: SiTrackerSpacePointFinder.h:235
SiSpacePointMakerTool.h
InDet::SiTrackerSpacePointFinder::m_yVertex
FloatProperty m_yVertex
Definition: SiTrackerSpacePointFinder.h:236
SG::UpdateHandleKey
Property holding a SG store/key/clid from which an UpdateHandle is made.
Definition: UpdateHandleKey.h:40
InDetDD::SiDetectorElementCollection
Definition: SiDetectorElementCollection.h:30
python.TestDriveDummies.properties
dictionary properties
Definition: TestDriveDummies.py:14
InDet::SiTrackerSpacePointFinder::m_SCTPropertiesKey
SG::ReadCondHandleKey< InDet::SiElementPropertiesTable > m_SCTPropertiesKey
To get SCT neighbours.
Definition: SiTrackerSpacePointFinder.h:157
InDet::SiTrackerSpacePointFinder::m_cachemode
bool m_cachemode
used for online MT counters
Definition: SiTrackerSpacePointFinder.h:207
InDet::SiTrackerSpacePointFinder::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
For beam spot.
Definition: SiTrackerSpacePointFinder.h:155
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::SiTrackerSpacePointFinder::m_overrideBS
BooleanProperty m_overrideBS
Definition: SiTrackerSpacePointFinder.h:234
InDet::SiTrackerSpacePointFinder::m_pixCacheHits
std::atomic< int > m_pixCacheHits
Definition: SiTrackerSpacePointFinder.h:251
InDet::SiTrackerSpacePointFinder::m_Sct_clcontainerKey
SG::ReadHandleKey< SCT_ClusterContainer > m_Sct_clcontainerKey
Definition: SiTrackerSpacePointFinder.h:146
InDet::SiTrackerSpacePointFinder::m_zVertex
FloatProperty m_zVertex
Definition: SiTrackerSpacePointFinder.h:237
InDet::SCT_ClusterContainer
Trk::PrepRawDataContainer< SCT_ClusterCollection > SCT_ClusterContainer
Definition: SCT_ClusterContainer.h:27
InDet::SiTrackerSpacePointFinder::m_idHelperPixel
const PixelID * m_idHelperPixel
Definition: SiTrackerSpacePointFinder.h:193
InDet::SiTrackerSpacePointFinder::m_allClusters
BooleanProperty m_allClusters
Definition: SiTrackerSpacePointFinder.h:206
SpacePointOverlapCollection
Definition: SpacePointOverlapCollection.h:26
InDet::SiTrackerSpacePointFinder::m_SiSpacePointMakerTool
ToolHandle< SiSpacePointMakerTool > m_SiSpacePointMakerTool
Definition: SiTrackerSpacePointFinder.h:185
InDet::SiTrackerSpacePointFinder::SPFCache::ctx
const EventContext & ctx
Definition: SiTrackerSpacePointFinder.h:110
SG::ReadHandleKey< SCT_ClusterContainer >
InDet::SiTrackerSpacePointFinder::m_numberOfPixel
std::atomic< int > m_numberOfPixel
Definition: SiTrackerSpacePointFinder.h:248
InDet::SiTrackerSpacePointFinder::m_SpacePointContainer_SCTKey
SG::WriteHandleKey< SpacePointContainer > m_SpacePointContainer_SCTKey
Definition: SiTrackerSpacePointFinder.h:166
SpacePointContainer.h
InDet::SiTrackerSpacePointFinder::m_SpacePointCache_SCTKey
SG::UpdateHandleKey< SpacePointCache > m_SpacePointCache_SCTKey
Definition: SiTrackerSpacePointFinder.h:176
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
InDet::SiTrackerSpacePointFinder::m_overlapLimitPhi
FloatProperty m_overlapLimitPhi
Definition: SiTrackerSpacePointFinder.h:223
InDet::SiTrackerSpacePointFinder::SPFCache::SCTCContainer
const SCT_ClusterContainer * SCTCContainer
Definition: SiTrackerSpacePointFinder.h:111
InDet::SiTrackerSpacePointFinder::SiTrackerSpacePointFinder
SiTrackerSpacePointFinder(const SiTrackerSpacePointFinder &)=delete
InDet::SiTrackerSpacePointFinder::m_useDataPoolWithCache
BooleanProperty m_useDataPoolWithCache
Definition: SiTrackerSpacePointFinder.h:209
GeoPrimitives.h
SCT_ClusterCollection.h
GenericMonitoringTool.h
InDet::SiTrackerSpacePointFinder::SPFCache::SPFCache
SPFCache(const EventContext &inctx)
Definition: SiTrackerSpacePointFinder.h:112
InDet::SiTrackerSpacePointFinder::~SiTrackerSpacePointFinder
virtual ~SiTrackerSpacePointFinder()=default
InDet::SiTrackerSpacePointFinder::m_SpacePointContainerPixelKey
SG::WriteHandleKey< SpacePointContainer > m_SpacePointContainerPixelKey
Definition: SiTrackerSpacePointFinder.h:167
SG::WriteHandleKey< SpacePointContainer >
fillPileUpNoiseLumi.next
next
Definition: fillPileUpNoiseLumi.py:52
InDet::SiTrackerSpacePointFinder::m_spacepointoverlapCollectionKey
SG::WriteHandleKey< SpacePointOverlapCollection > m_spacepointoverlapCollectionKey
Definition: SiTrackerSpacePointFinder.h:168
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SpacePoint.h
InDet::SiTrackerSpacePointFinder::SPFCache::vertex
Amg::Vector3D vertex
Definition: SiTrackerSpacePointFinder.h:109
InDet::SiTrackerSpacePointFinder::m_SCTDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
For SCT alignment.
Definition: SiTrackerSpacePointFinder.h:159
SpacePointOverlapCollection.h
InDet::SiTrackerSpacePointFinder::m_sctCacheHits
std::atomic< int > m_sctCacheHits
Definition: SiTrackerSpacePointFinder.h:250
PixelClusterCollection.h
InDet::SiTrackerSpacePointFinder::addSCT_SpacePoints
void addSCT_SpacePoints(const SCT_ClusterCollection *next, const SiElementPropertiesTable *properties, const InDetDD::SiDetectorElementCollection *elements, SpacePointCollection *spacepointCollection, SpacePointOverlapCollection *spacepointOverlapCollection, SPFCache &, DataPool< SCT_SpacePoint > *dataItemsSCT) const
Definition: SiTrackerSpacePointFinder.cxx:369
InDet::SiTrackerSpacePointFinder::initialize
virtual StatusCode initialize() override
Definition: SiTrackerSpacePointFinder.cxx:46
DataPool.h
ReadCondHandleKey.h
InDet::SiTrackerSpacePointFinder::m_Pixel_clcontainerKey
SG::ReadHandleKey< PixelClusterContainer > m_Pixel_clcontainerKey
Definition: SiTrackerSpacePointFinder.h:147
AthReentrantAlgorithm.h
InDet::SiTrackerSpacePointFinder::m_numberOfSCT
std::atomic< int > m_numberOfSCT
Definition: SiTrackerSpacePointFinder.h:249
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
InDet::SiTrackerSpacePointFinder::SiTrackerSpacePointFinder
SiTrackerSpacePointFinder()=delete
PixelClusterContainer.h
InDet::SiTrackerSpacePointFinder
Definition: SiTrackerSpacePointFinder.h:83
InDet::SiTrackerSpacePointFinder::m_selectPixels
BooleanProperty m_selectPixels
Definition: SiTrackerSpacePointFinder.h:201
InDet::SiElementPropertiesTable
Definition: SiElementPropertiesTable.h:30
SiDetectorElementCollection.h
InDet::SiTrackerSpacePointFinder::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: SiTrackerSpacePointFinder.h:186
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDet::SiTrackerSpacePointFinder::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: SiTrackerSpacePointFinder.cxx:106
InDet::SiTrackerSpacePointFinder::m_idHelper
const SCT_ID * m_idHelper
Definition: SiTrackerSpacePointFinder.h:194
InDet::SiTrackerSpacePointFinder::m_selectSCTs
BooleanProperty m_selectSCTs
Definition: SiTrackerSpacePointFinder.h:202
SG::ReadCondHandleKey< InDet::BeamSpotData >
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
InDet::SiTrackerSpacePointFinder::m_overlapLimitOpposite
FloatProperty m_overlapLimitOpposite
Definition: SiTrackerSpacePointFinder.h:221
SiClusterContainer.h
InDet::SiTrackerSpacePointFinder::finalize
virtual StatusCode finalize() override
Definition: SiTrackerSpacePointFinder.cxx:353
SCT_ID
Definition: SCT_ID.h:68
InDet::SiTrackerSpacePointFinder::operator=
SiTrackerSpacePointFinder & operator=(const SiTrackerSpacePointFinder &)=delete
InDet::SiTrackerSpacePointFinder::m_overlapLimitEtaMin
FloatProperty m_overlapLimitEtaMin
Definition: SiTrackerSpacePointFinder.h:225
SpacePointCollection
Definition: SpacePointCollection.h:40
SCT_ClusterContainer.h
DataPool
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
Definition: DataPool.h:63
InDet::SiTrackerSpacePointFinder::isClonable
virtual bool isClonable() const override
Make this algorithm clonable.
Definition: SiTrackerSpacePointFinder.h:103
InDet::SiTrackerSpacePointFinder::m_overlapLimitEtaMax
FloatProperty m_overlapLimitEtaMax
Definition: SiTrackerSpacePointFinder.h:227
InDet::SiTrackerSpacePointFinder::m_SpacePointCache_PixKey
SG::UpdateHandleKey< SpacePointCache > m_SpacePointCache_PixKey
Definition: SiTrackerSpacePointFinder.h:178
SpacePointContainer
Definition: Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePointContainer.h:29
BeamSpotData.h
InDet::SiTrackerSpacePointFinder::SPFCache
This is a temporary object to aid reentrant coding.
Definition: SiTrackerSpacePointFinder.h:108
InDet::SCT_ClusterCollection
Trk::PrepRawDataCollection< SCT_Cluster > SCT_ClusterCollection
Definition: SCT_ClusterCollection.h:26
PixelID
Definition: PixelID.h:67
InDet::SiTrackerSpacePointFinder::m_overlap
BooleanProperty m_overlap
Definition: SiTrackerSpacePointFinder.h:204
InDet::SiTrackerSpacePointFinder::m_numberOfEvents
std::atomic< int > m_numberOfEvents
Definition: SiTrackerSpacePointFinder.h:247