5#if defined(FLATTEN) && defined(__GNUC__)
7#pragma GCC optimize "-fno-var-tracking-assignments"
17 const std::string& name,
18 const IInterface* parent)
19 : base_class(
type, name, parent)
30 m_internalRoi.emplace(0, -4.5, 4.5, 0, -std::numbers::pi, std::numbers::pi, 0, -150.0,150.0);
39 std::vector<Acts::Experimental::GbtsLayerDescription> layers;
40 layers.reserve(pVL->size());
44 const Acts::Experimental::GbtsLayerType
type = s.m_type == 0 ? Acts::Experimental::GbtsLayerType::Barrel : Acts::Experimental::GbtsLayerType::Endcap;
45 layers.emplace_back(s.m_subdet,
type, s.m_refCoord, s.m_minBound, s.m_maxBound);
55 auto layerConnectionMap = Acts::Experimental::GbtsLayerConnectionMap::fromFile(
m_finderCfg.connectorInputFile,
m_finderCfg.lrtMode);
59 layerConnectionMap.etaBinWidth =
m_finderCfg.etaBinWidthOverride;
64 auto gbtsGeo = std::make_shared<Acts::Experimental::GbtsGeometry>(layers, layerConnectionMap);
66 m_finder = Acts::Experimental::GraphBasedTrackSeeder(
67 Acts::Experimental::GraphBasedTrackSeeder::DerivedConfig(
m_finderCfg),
68 gbtsGeo,
logger().cloneWithSuffix(
"gbtsFinder"));
72 return StatusCode::SUCCESS;
77 const EventContext& ctx,
78 const std::vector<const xAOD::SpacePointContainer*>& spacePointCollections,
79 const Eigen::Vector3f& beamSpotPos,
float bFieldInZ,
85 const Acts::Experimental::GraphBasedTrackSeeder::Options options(bFieldInZ);
88 std::vector<const xAOD::SpacePoint*> tmpSpacePoints;
93 tmpSpacePoints.emplace_back(
sp);
99 std::vector<std::vector<Acts::Experimental::GbtsNode>> nodeStorage{};
102 for (
auto& v : nodeStorage) {
107 for(std::size_t idx = 0; idx < tmpSpacePoints.size(); ++idx){
110 const std::vector<xAOD::DetectorIDHashType>& elementlist =
sp->elementIdList();
112 const bool isPixel(elementlist.size() == 1);
114 const short layer = (isPixel ?
m_pix_h2l :
m_sct_h2l)->
operator[](
static_cast<int>(elementlist[0]));
116 Acts::Experimental::GbtsNode&
node = nodeStorage[layer].emplace_back(layer);
118 const float new_x =
static_cast<float>(
sp->x() - beamSpotPos[0]);
119 const float new_y =
static_cast<float>(
sp->y() - beamSpotPos[1]);
122 node.z =
static_cast<float>(
sp->z());
123 node.r = std::hypot(new_x, new_y);
124 node.phi = std::atan2(new_y, new_x);
127 const float new_x =
static_cast<float>(
sp->x());
128 const float new_y =
static_cast<float>(
sp->y());
129 node.x =
static_cast<float>(
sp->x());
130 node.y =
static_cast<float>(
sp->y());
131 node.z =
static_cast<float>(
sp->z());
132 node.r = std::hypot(new_x, new_y);
133 node.phi = std::atan2(
sp->y(),
sp->x());
147 Acts::SeedContainer2 seeds;
151 seedContainer.
reserve(seedContainer.
size() + seeds.size(), 7.0f);
152 for (
auto seed : seeds) {
155 [&](
const Acts::SpacePointIndex2 spIndex) {
156 return tmpSpacePoints[spIndex];
161 return StatusCode::SUCCESS;
215 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
std::unique_ptr< const Acts::Logger > makeActsAthenaLogger(IMessageSvc *svc, const std::string &name, int level, std::optional< std::string > parent_name)
float widthInEta() const
Returns the width of the cluster in phi (x) and eta (y) directions, respectively.
ConstVectorMap< N > localPosition() const
Returns the local position of the measurement.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
SpacePointContainer_v1 SpacePointContainer
Define the version of the space point container.
PixelCluster_v1 PixelCluster
Define the version of the pixel cluster class.
Seed push_back(SpacePointRange spacePoints, float quality, float vertexZ)
void reserve(std::size_t size, float averageSpacePoints=3) noexcept
std::size_t size() const noexcept