ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
Acts
ActsGeometry
ActsGeometry
DetectorElementToActsGeometryIdMap.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 ACTSTRK_DETECTORELEMENTTOACTSGEOMETRYIDMAP_H
5
#define ACTSTRK_DETECTORELEMENTTOACTSGEOMETRYIDMAP_H
6
#include "
xAODMeasurementBase/MeasurementDefs.h
"
7
#include "Acts/Geometry/GeometryIdentifier.hpp"
8
#include "Acts/Utilities/Helpers.hpp"
9
#include <unordered_map>
10
11
namespace
ActsTrk
{
12
using
DetectorElementKey
=
unsigned
int;
13
constexpr
unsigned
int
DETELEMENT_TYPE_SHIFT
= 28;
14
constexpr
unsigned
int
DETELEMENT_HASH_MASK
= ~(1u<<31|1u<<30|1u<<29|1u<<28);
15
inline
16
DetectorElementKey
makeDetectorElementKey
(
xAOD::UncalibMeasType
meas_type,
unsigned
int
identifier_hash) {
17
assert(
sizeof
(
xAOD::UncalibMeasType
) <=
sizeof
(std::size_t) );
18
assert(
static_cast<
std::size_t
>
( Acts::toUnderlying(meas_type)&((~
DETELEMENT_HASH_MASK
)>>
DETELEMENT_TYPE_SHIFT
)) ==
static_cast<
std::size_t
>
(meas_type));
19
assert( (identifier_hash &
DETELEMENT_HASH_MASK
) == identifier_hash);
20
return
(Acts::toUnderlying(meas_type) <<
DETELEMENT_TYPE_SHIFT
) | (identifier_hash &
DETELEMENT_HASH_MASK
);
21
}
22
struct
DetectorElementToActsGeometryIdMap
: std::unordered_map<ActsTrk::DetectorElementKey,
23
Acts::GeometryIdentifier>
24
{
25
// utilities to abstract what is actually stored
26
static
const
Acts::GeometryIdentifier &
makeValue
(
const
Acts::GeometryIdentifier &
geo_id
) {
27
return
geo_id
;
28
}
29
static
const
Acts::GeometryIdentifier &
getValue
(
const
value_type &element) {
30
return
element.second;
31
}
32
};
33
}
34
35
#endif
MeasurementDefs.h
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition
MdtCalibInput.h:31
ActsTrk::DETELEMENT_HASH_MASK
constexpr unsigned int DETELEMENT_HASH_MASK
Definition
DetectorElementToActsGeometryIdMap.h:14
ActsTrk::DETELEMENT_TYPE_SHIFT
constexpr unsigned int DETELEMENT_TYPE_SHIFT
Definition
DetectorElementToActsGeometryIdMap.h:13
ActsTrk::makeDetectorElementKey
DetectorElementKey makeDetectorElementKey(xAOD::UncalibMeasType meas_type, unsigned int identifier_hash)
Definition
DetectorElementToActsGeometryIdMap.h:16
ActsTrk::DetectorElementKey
unsigned int DetectorElementKey
Definition
DetectorElementToActsGeometryIdMap.h:12
geo_id
Definition
geo_id.py:1
xAOD::UncalibMeasType
UncalibMeasType
Define the type of the uncalibrated measurement.
Definition
MeasurementDefs.h:24
ActsTrk::DetectorElementToActsGeometryIdMap
Definition
DetectorElementToActsGeometryIdMap.h:24
ActsTrk::DetectorElementToActsGeometryIdMap::makeValue
static const Acts::GeometryIdentifier & makeValue(const Acts::GeometryIdentifier &geo_id)
Definition
DetectorElementToActsGeometryIdMap.h:26
ActsTrk::DetectorElementToActsGeometryIdMap::getValue
static const Acts::GeometryIdentifier & getValue(const value_type &element)
Definition
DetectorElementToActsGeometryIdMap.h:29
Generated on
for ATLAS Offline Software by
1.17.0