ATLAS Offline Software
InDetToXAODSpacePointConversion.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
10 
13 #include "AthAllocators/DataPool.h"
14 
15 namespace InDet {
16 
18  ISvcLocator *pSvcLocator)
19  : AthReentrantAlgorithm(name, pSvcLocator)
20  {}
21 
23  {
24  ATH_MSG_DEBUG("Initializing " << name() << " ...");
25 
27 
31 
35 
38 
41 
43  ATH_CHECK(detStore()->retrieve(m_pixelID,"PixelID"));
44  ATH_CHECK(detStore()->retrieve(m_stripID,"SCT_ID"));
45  }
46 
47  return StatusCode::SUCCESS;
48  }
49 
51  {
52  ATH_MSG_DEBUG("Executing " << name() << " ...");
53 
54  // Conds
56  const InDet::BeamSpotData* beamSpot = *beamSpotHandle;
57  auto vertex = beamSpot->beamVtx().position();
58 
59  // Cluster Containers if requested
60  std::unique_ptr< xAOD::PixelClusterContainer > pixel_cluster_xaod_container = std::make_unique< xAOD::PixelClusterContainer >();
61  std::unique_ptr< xAOD::PixelClusterAuxContainer > pixel_cluster_xaod_aux_container = std::make_unique< xAOD::PixelClusterAuxContainer >();
62  pixel_cluster_xaod_container->setStore( pixel_cluster_xaod_aux_container.get() );
63 
64  std::unique_ptr< xAOD::StripClusterContainer > strip_cluster_xaod_container = std::make_unique< xAOD::StripClusterContainer >();
65  std::unique_ptr< xAOD::StripClusterAuxContainer > strip_cluster_xaod_aux_container = std::make_unique< xAOD::StripClusterAuxContainer >();
66  strip_cluster_xaod_container->setStore( strip_cluster_xaod_aux_container.get() );
67 
68  // Convert
69  if (m_processPixel.value()) {
70  ATH_CHECK( convertPixel(ctx, pixel_cluster_xaod_container.get()) );
71  }
72 
73  if (m_processStrip.value()) {
74  std::unordered_map<Identifier, std::size_t> mapClusters{};
76  strip_cluster_xaod_container.get(),
77  mapClusters) );
79  strip_cluster_xaod_container.get(),
80  mapClusters) );
81  }
82 
83  // Save optional clusters
84  if (m_convertClusters) {
85  if (m_processPixel.value()) {
87  ATH_CHECK( pixel_cluster_xaod_handle.record( std::move(pixel_cluster_xaod_container),
88  std::move(pixel_cluster_xaod_aux_container) ) );
89  }
90 
91  if (m_processStrip.value()) {
93  ATH_CHECK( strip_cluster_xaod_handle.record( std::move(strip_cluster_xaod_container),
94  std::move(strip_cluster_xaod_aux_container) ) );
95  }
96  }
97 
98  return StatusCode::SUCCESS;
99  }
100 
102  xAOD::PixelClusterContainer* cluster_xaod_container) const
103  {
104  static const SG::AuxElement::Accessor< ElementLink< ::SpacePointCollection > > linkAcc("pixelSpacePointLink");
105 
106  const InDetDD::SiDetectorElementCollection* pixElements = nullptr;
107  if (m_convertClusters) {
109  if (not pixelDetEleHandle.isValid()) {
110  ATH_MSG_FATAL(m_pixelDetEleCollKey.fullKey() << " is not available.");
111  return StatusCode::FAILURE;
112  }
113  pixElements = pixelDetEleHandle.cptr();
114  }
115 
116  // Input
118  ATH_CHECK( pixel_handle.isValid() );
119  const ::SpacePointContainer* pixel_container = pixel_handle.cptr();
120 
121  // Output
122  std::unique_ptr< xAOD::SpacePointContainer > pixel_xaod_container = std::make_unique< xAOD::SpacePointContainer >(SG::VIEW_ELEMENTS, SG::ALWAYS_TRACK_INDICES);
123  std::unique_ptr< xAOD::SpacePointAuxContainer > pixel_xaod_aux_container = std::make_unique< xAOD::SpacePointAuxContainer >();
124  pixel_xaod_container->setStore( pixel_xaod_aux_container.get() );
125 
126  size_t nsp = 0;
127  for (const ::SpacePointCollection *spc : *pixel_container) {
128  nsp += spc->size();
129  }
131  pixel_xaod_container->push_new (nsp, [&pool](){return pool.nextElementPtr();});
132  size_t isp = 0;
133 
134  // Conversion
135  for (const ::SpacePointCollection *spc : *pixel_container) {
136  for (const Trk::SpacePoint *sp : *spc) {
137  const InDet::PixelSpacePoint *indetSP = dynamic_cast<const InDet::PixelSpacePoint *>(sp);
138 
139  xAOD::SpacePoint* pixel_sp = pixel_xaod_container->at (isp++);
141 
142  // Also make cluster object, if requested
143  if (m_convertClusters) {
144  const std::pair<const Trk::PrepRawData*, const Trk::PrepRawData*>& clusterList = sp->clusterList();
145  const InDet::PixelCluster* theCluster = dynamic_cast<const InDet::PixelCluster*>(clusterList.first);
146  if (theCluster == nullptr) {
147  ATH_MSG_FATAL("Cannot cast InDet::PixelCluster");
148  }
149 
150  auto clusterId = clusterList.first->identify();
151  const InDetDD::SiDetectorElement *element = pixElements->getDetectorElement(m_pixelID->wafer_hash(m_pixelID->wafer_id(clusterId)));
152  if ( element == nullptr ) {
153  ATH_MSG_FATAL( "Invalid pixel detector element for cluster identifier " << clusterId );
154  return StatusCode::FAILURE;
155  }
156 
157  xAOD::PixelCluster * pixelCl = new xAOD::PixelCluster();
158  cluster_xaod_container->push_back(pixelCl);
159  ATH_CHECK( TrackingUtilities::convertInDetToXaodCluster(*theCluster, *element, *pixelCl) );
160  pixel_sp->setMeasurements( {cluster_xaod_container->back()} );
161  }
162 
163  // Add link to this space point
164  ElementLink< ::SpacePointCollection > link(indetSP, *spc);
165  linkAcc(*pixel_sp) = link;
166  }
167  }
168 
169  // Store
171  ATH_CHECK( pixel_xaod_handle.record( std::move(pixel_xaod_container), std::move(pixel_xaod_aux_container) ) );
172 
173  return StatusCode::SUCCESS;
174  }
175 
177  const Amg::Vector3D& vertex,
178  xAOD::StripClusterContainer* cluster_xaod_container,
179  std::unordered_map<Identifier, std::size_t>& mapClusters) const
180  {
181  const InDetDD::SiDetectorElementCollection* stripElements = nullptr;
182  if (m_convertClusters) {
184  if (not stripDetEleHandle.isValid()) {
185  ATH_MSG_FATAL(m_stripDetEleCollKey.fullKey() << " is not available.");
186  return StatusCode::FAILURE;
187  }
188  stripElements = stripDetEleHandle.cptr();
189  }
190 
191  static const SG::AuxElement::Accessor< ElementLink< ::SpacePointCollection > > linkAcc("sctSpacePointLink");
192 
193  // Input
195  ATH_CHECK( strip_handle.isValid() );
196  const ::SpacePointContainer* strip_container = strip_handle.cptr();
197 
198  // Output
199  std::unique_ptr< xAOD::SpacePointContainer > strip_xaod_container = std::make_unique< xAOD::SpacePointContainer >();
200  std::unique_ptr< xAOD::SpacePointAuxContainer > strip_xaod_aux_container = std::make_unique< xAOD::SpacePointAuxContainer >();
201  strip_xaod_container->setStore( strip_xaod_aux_container.get() );
202 
203  strip_xaod_container->reserve(strip_container->size());
204  strip_xaod_aux_container->reserve(strip_container->size());
205 
206  // Conversion
207  for (const ::SpacePointCollection *spc : *strip_container) {
208  for (const Trk::SpacePoint *sp : *spc) {
209  const InDet::SCT_SpacePoint *indetSP = dynamic_cast<const InDet::SCT_SpacePoint *>(sp);
210 
211  strip_xaod_container->push_back( new xAOD::SpacePoint() );
212  ATH_CHECK( TrackingUtilities::convertTrkToXaodStripSpacePoint(*indetSP, vertex, *strip_xaod_container->back()) );
213 
214  // Also make cluster object, if requested
215  if (m_convertClusters) {
216  const std::pair<const Trk::PrepRawData*, const Trk::PrepRawData*>& clusterList = sp->clusterList();
217  const InDet::SCT_Cluster* theCluster1 = dynamic_cast<const InDet::SCT_Cluster*>(clusterList.first);
218  const InDet::SCT_Cluster* theCluster2 = dynamic_cast<const InDet::SCT_Cluster*>(clusterList.second);
219  if (theCluster1 == nullptr or
220  theCluster2 == nullptr) {
221  ATH_MSG_FATAL("Cannot cast InDet::SCT_Cluster");
222  }
223 
224  auto clusterId1 = clusterList.first->identify();
225  auto clusterId2 = clusterList.second->identify();
226  const InDetDD::SiDetectorElement *element1 = stripElements->getDetectorElement(m_stripID->wafer_hash(m_stripID->wafer_id(clusterId1)));
227  const InDetDD::SiDetectorElement *element2 = stripElements->getDetectorElement(m_stripID->wafer_hash(m_stripID->wafer_id(clusterId2)));
228  if ( element1 == nullptr ) {
229  ATH_MSG_FATAL( "Invalid strip detector element for cluster (1) identifiers " << clusterId1 );
230  return StatusCode::FAILURE;
231  }
232  if ( element2 == nullptr ) {
233  ATH_MSG_FATAL( "Invalid strip detector element for cluster (2) identifiers " << clusterId2 );
234  return StatusCode::FAILURE;
235  }
236  //tries to insert an entry with key clusterId. Returns false and does nothing if the key already exists.
237  auto insertEntry = [&mapClusters, cluster_xaod_container](const auto & clusterId)-> bool{
238  const auto & [p,inserted] = mapClusters.try_emplace(clusterId, cluster_xaod_container->size());
239  return inserted;
240  };
241  // if cluster is not there, add entry and add cluster to container
242  if (insertEntry(clusterId1)){
243  xAOD::StripCluster * stripCl1 = new xAOD::StripCluster();
244  cluster_xaod_container->push_back(stripCl1);
245  ATH_CHECK( TrackingUtilities::convertInDetToXaodCluster(*theCluster1, *element1, *stripCl1) );
246  }
247  if (insertEntry(clusterId2)) {
248  xAOD::StripCluster * stripCl2 = new xAOD::StripCluster();
249  cluster_xaod_container->push_back(stripCl2);
250  ATH_CHECK( TrackingUtilities::convertInDetToXaodCluster(*theCluster2, *element2, *stripCl2) );
251  }
252  // Get the clusters so that we can add a link to them
253  xAOD::StripCluster * stripCl1 = cluster_xaod_container->at(mapClusters[clusterId1]);
254  xAOD::StripCluster * stripCl2 = cluster_xaod_container->at(mapClusters[clusterId2]);
255  strip_xaod_container->back()->setMeasurements( {stripCl1, stripCl2} );
256  }
257 
258  // Add link to this space point
259  ElementLink< ::SpacePointCollection > link(indetSP, *spc);
260  linkAcc(*strip_xaod_container->back()) = link;
261  }
262  }
263 
264  // Store
266  ATH_CHECK( strip_xaod_handle.record( std::move(strip_xaod_container), std::move(strip_xaod_aux_container) ) );
267 
268  return StatusCode::SUCCESS;
269  }
270 
271 
273  const Amg::Vector3D& vertex,
274  xAOD::StripClusterContainer* cluster_xaod_container,
275  std::unordered_map<Identifier, std::size_t>& mapClusters) const
276  {
277  const InDetDD::SiDetectorElementCollection* stripElements = nullptr;
278  if (m_convertClusters) {
280  if (not stripDetEleHandle.isValid()) {
281  ATH_MSG_FATAL(m_stripDetEleCollKey.fullKey() << " is not available.");
282  return StatusCode::FAILURE;
283  }
284  stripElements = stripDetEleHandle.cptr();
285  }
286 
287  // Inputs
289  ATH_CHECK( strip_overlap_handle.isValid() );
290  const ::SpacePointOverlapCollection* strip_overlap_container = strip_overlap_handle.cptr();
291 
292  // Outputs
293  std::unique_ptr< xAOD::SpacePointContainer > strip_overlap_xaod_container = std::make_unique< xAOD::SpacePointContainer >();
294  std::unique_ptr< xAOD::SpacePointAuxContainer > strip_overlap_xaod_aux_container = std::make_unique< xAOD::SpacePointAuxContainer >();
295  strip_overlap_xaod_container->setStore( strip_overlap_xaod_aux_container.get() );
296 
297  strip_overlap_xaod_container->reserve(strip_overlap_container->size());
298  strip_overlap_xaod_aux_container->reserve(strip_overlap_container->size());
299 
300  // Conversion
301  static const SG::AuxElement::Accessor< ElementLink< ::SpacePointOverlapCollection > > stripSpacePointLinkAcc("stripOverlapSpacePointLink");
302 
303  for (const Trk::SpacePoint *sp : *strip_overlap_container) {
304  const InDet::SCT_SpacePoint *indetSP = dynamic_cast<const InDet::SCT_SpacePoint *>(sp);
305 
306  strip_overlap_xaod_container->push_back( new xAOD::SpacePoint() );
307  ATH_CHECK( TrackingUtilities::convertTrkToXaodStripSpacePoint(*indetSP, vertex, *strip_overlap_xaod_container->back()) );
308 
309  // Also make cluster object, if requested
310  if (m_convertClusters) {
311  const std::pair<const Trk::PrepRawData*, const Trk::PrepRawData*>& clusterList = sp->clusterList();
312  const InDet::SCT_Cluster* theCluster1 = dynamic_cast<const InDet::SCT_Cluster*>(clusterList.first);
313  const InDet::SCT_Cluster* theCluster2 = dynamic_cast<const InDet::SCT_Cluster*>(clusterList.second);
314  if (theCluster1 == nullptr or
315  theCluster2 == nullptr) {
316  ATH_MSG_FATAL("Cannot cast InDet::SCT_Cluster");
317  }
318 
319  auto clusterId1 = clusterList.first->identify();
320  auto clusterId2 = clusterList.second->identify();
321  const InDetDD::SiDetectorElement *element1 = stripElements->getDetectorElement(m_stripID->wafer_hash(m_stripID->wafer_id(clusterId1)));
322  const InDetDD::SiDetectorElement *element2 = stripElements->getDetectorElement(m_stripID->wafer_hash(m_stripID->wafer_id(clusterId2)));
323 
324  if ( element1 == nullptr ) {
325  ATH_MSG_FATAL( "Invalid strip detector element for cluster (1) identifiers " << clusterId1 );
326  return StatusCode::FAILURE;
327  }
328  if ( element2 == nullptr ) {
329  ATH_MSG_FATAL( "Invalid strip detector element for cluster (2) identifiers " << clusterId2 );
330  return StatusCode::FAILURE;
331  }
332  //tries to insert an entry with key clusterId. Returns false and does nothing if the key already exists.
333  auto insertEntry = [&mapClusters, cluster_xaod_container](const auto & clusterId)-> bool{
334  const auto & [p,inserted] = mapClusters.try_emplace(clusterId, cluster_xaod_container->size());
335  return inserted;
336  };
337  if (insertEntry(clusterId1)) {
338  xAOD::StripCluster * stripCl1 = new xAOD::StripCluster();
339  cluster_xaod_container->push_back(stripCl1);
340  ATH_CHECK( TrackingUtilities::convertInDetToXaodCluster(*theCluster1, *element1, *stripCl1) );
341  }
342  if (insertEntry(clusterId2)) {
343  xAOD::StripCluster * stripCl2 = new xAOD::StripCluster();
344  cluster_xaod_container->push_back(stripCl2);
345  ATH_CHECK( TrackingUtilities::convertInDetToXaodCluster(*theCluster2, *element2, *stripCl2) );
346  }
347 
348  xAOD::StripCluster * stripCl1 = cluster_xaod_container->at(mapClusters[clusterId1]);
349  xAOD::StripCluster * stripCl2 = cluster_xaod_container->at(mapClusters[clusterId2]);
350  strip_overlap_xaod_container->back()->setMeasurements( {stripCl1, stripCl2} );
351  }
352 
353  ElementLink< ::SpacePointOverlapCollection > TrkLink(sp, *strip_overlap_container);
354  stripSpacePointLinkAcc( *strip_overlap_xaod_container->back() ) = TrkLink;
355  }
356 
357  // Store
359  ATH_CHECK( strip_overlap_xaod_handle.record( std::move(strip_overlap_xaod_container), std::move(strip_overlap_xaod_aux_container) ) );
360 
361  return StatusCode::SUCCESS;
362  }
363 
364 }
DataVector::reserve
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
InDet::InDetToXAODSpacePointConversion::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: InDetToXAODSpacePointConversion.h:57
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
InDet::InDetToXAODSpacePointConversion::convertPixel
StatusCode convertPixel(const EventContext &ctx, xAOD::PixelClusterContainer *cluster_xaod_container) const
Definition: InDetToXAODSpacePointConversion.cxx:101
Trk::SpacePoint
Definition: Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:35
InDet::InDetToXAODSpacePointConversion::m_processStrip
Gaudi::Property< bool > m_processStrip
Definition: InDetToXAODSpacePointConversion.h:84
TrackingUtilities::convertInDetToXaodCluster
StatusCode convertInDetToXaodCluster(const InDet::PixelCluster &indetCluster, const InDetDD::SiDetectorElement &element, xAOD::PixelCluster &xaodCluster)
Definition: ClusterConversionUtilities.cxx:74
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
InDet::InDetToXAODSpacePointConversion::InDetToXAODSpacePointConversion
InDetToXAODSpacePointConversion(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Definition: InDetToXAODSpacePointConversion.cxx:17
InDet::InDetToXAODSpacePointConversion::m_outSpacepointsStrip
SG::WriteHandleKey< xAOD::SpacePointContainer > m_outSpacepointsStrip
Definition: InDetToXAODSpacePointConversion.h:74
InDetDD::SiDetectorElementCollection
Definition: SiDetectorElementCollection.h:27
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
InDet::InDetToXAODSpacePointConversion::m_outClustersPixel
SG::WriteHandleKey< xAOD::PixelClusterContainer > m_outClustersPixel
Definition: InDetToXAODSpacePointConversion.h:67
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.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
pool
pool namespace
Definition: libname.h:15
SG::ALWAYS_TRACK_INDICES
@ ALWAYS_TRACK_INDICES
Always track indices, regardless of the setting of the ownership policy.
Definition: IndexTrackingPolicy.h:43
SG::ReadCondHandle::isValid
bool isValid()
Definition: ReadCondHandle.h:210
InDet::InDetToXAODSpacePointConversion::m_pixelID
const PixelID * m_pixelID
Definition: InDetToXAODSpacePointConversion.h:86
xAOD::SpacePoint_v1
Definition: SpacePoint_v1.h:29
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:272
InDet::PixelSpacePoint
Definition: PixelSpacePoint.h:31
TrackingUtilities::convertTrkToXaodPixelSpacePoint
StatusCode convertTrkToXaodPixelSpacePoint(const InDet::PixelSpacePoint &trkSpacePoint, xAOD::SpacePoint &xaodSpacePoint)
Definition: SpacePointConversionUtilities.cxx:12
PrepRawData.h
PixelID::wafer_id
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
Definition: PixelID.h:360
DataVector::push_new
size_type push_new(size_type n, F alloc)
Create and add a number of new elements to the end of the container.
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:274
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:176
xAOD::StripCluster
StripCluster_v1 StripCluster
Define the version of the strip cluster class.
Definition: StripCluster.h:13
xAOD::AuxContainerBase::reserve
virtual void reserve(size_t size) override
Reserve a given size for the arrays.
Definition: AuxContainerBase.cxx:535
SCT_ClusterCollection.h
InDet::InDetToXAODSpacePointConversion::m_outSpacepointsPixel
SG::WriteHandleKey< xAOD::SpacePointContainer > m_outSpacepointsPixel
Definition: InDetToXAODSpacePointConversion.h:72
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
PixelID::wafer_hash
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
Definition: PixelID.h:383
InDet::InDetToXAODSpacePointConversion::m_outSpacepointsOverlap
SG::WriteHandleKey< xAOD::SpacePointContainer > m_outSpacepointsOverlap
Definition: InDetToXAODSpacePointConversion.h:76
xAOD::PixelCluster
PixelCluster_v1 PixelCluster
Define the version of the pixel cluster class.
Definition: Event/xAOD/xAODInDetMeasurement/xAODInDetMeasurement/PixelCluster.h:13
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
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::StripCluster_v1
Definition: StripCluster_v1.h:17
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SCT_ID::wafer_hash
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
Definition: SCT_ID.h:492
xAOD::SpacePoint_v1::setMeasurements
void setMeasurements(std::vector< const xAOD::UncalibratedMeasurement * > &&value)
Sets the index of the measurements.
PixelClusterCollection.h
InDet::SCT_Cluster
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SCT_Cluster.h:34
DataVector::back
const T * back() const
Access the last element in the collection as an rvalue.
DataVector
Derived DataVector<T>.
Definition: DataVector.h:795
InDet::InDetToXAODSpacePointConversion::m_convertClusters
Gaudi::Property< bool > m_convertClusters
Definition: InDetToXAODSpacePointConversion.h:82
ClusterConversionUtilities.h
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
DataPool.h
TrackingUtilities::convertTrkToXaodStripSpacePoint
StatusCode convertTrkToXaodStripSpacePoint(const InDet::SCT_SpacePoint &trkSpacePoint, const Amg::Vector3D &vertex, xAOD::SpacePoint &xaodSpacePoint)
Definition: SpacePointConversionUtilities.cxx:43
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
SiCluster.h
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
InDet::SCT_SpacePoint
Definition: SCT_SpacePoint.h:31
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDet::PixelCluster
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/PixelCluster.h:49
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:73
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
InDet::BeamSpotData
Definition: BeamSpotData.h:21
xAOD::PixelCluster_v1
Definition: PixelCluster_v1.h:17
xAOD::SpacePointContainer
SpacePointContainer_v1 SpacePointContainer
Define the version of the space point container.
Definition: Event/xAOD/xAODInDetMeasurement/xAODInDetMeasurement/SpacePointContainer.h:14
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
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:50
DataPool
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
Definition: DataPool.h:63
python.BuildSignatureFlags.beamSpot
AthConfigFlags beamSpot(AthConfigFlags flags, str instanceName, str recoMode)
Definition: BuildSignatureFlags.py:491
InDet::InDetToXAODSpacePointConversion::m_pixelDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
Definition: InDetToXAODSpacePointConversion.h:79
SpacePointConversionUtilities.h
DataVector::at
const T * at(size_type n) const
Access an element, as an rvalue.
SCT_ID::wafer_id
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
Definition: SCT_ID.h:464
InDet::InDetToXAODSpacePointConversion::m_processPixel
Gaudi::Property< bool > m_processPixel
Definition: InDetToXAODSpacePointConversion.h:83
InDet::InDetToXAODSpacePointConversion::m_stripDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_stripDetEleCollKey
Definition: InDetToXAODSpacePointConversion.h:80
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
InDetDD::SiDetectorElementCollection::getDetectorElement
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
Definition: SiDetectorElementCollection.cxx:9
InDet::InDetToXAODSpacePointConversion::m_stripID
const SCT_ID * m_stripID
Definition: InDetToXAODSpacePointConversion.h:87
InDetToXAODSpacePointConversion.h
InDet::InDetToXAODSpacePointConversion::initialize
virtual StatusCode initialize() override
Definition: InDetToXAODSpacePointConversion.cxx:22
SG::ReadCondHandle::cptr
const_pointer_type cptr()
Definition: ReadCondHandle.h:71