Skip to content

feat: part 2 of migration to GBTSv3#5328

Draft
jpreston-cern wants to merge 4 commits intoacts-project:mainfrom
jpreston-cern:GBTSv3_ACTS_refactor
Draft

feat: part 2 of migration to GBTSv3#5328
jpreston-cern wants to merge 4 commits intoacts-project:mainfrom
jpreston-cern:GBTSv3_ACTS_refactor

Conversation

@jpreston-cern
Copy link
Copy Markdown
Contributor

@jpreston-cern jpreston-cern commented Apr 9, 2026

This is the second part of the migration of GBBTSv3 to ACTS which focusses on efficiency improvements, specifically in the barrel.

Features include:

addition of extra check in barrel edge connections via validateTriplet which checks for Pt and d0 consistancy

updates to clone removal and addition of seed splitting which for long seeds (and low eta) splits them in two to help the CKF find the true track

more leniency in the tau ratio for edge connections that miss a layer (as we expect more detector effects for these edge connections)

General transition to ACTS units where applicable to make it easier for the user to understand config veriables

--- END COMMIT MESSAGE ---

@timadye @andiwand

NOTE: magic numbers are still present in this PR that are to do with geometry, a future PR will be designated to pull those out (and renamed to be more readable)

NOTE: this gives a slight difference in seeds compared to the the athena version due to differing levels of floating point precision

@github-actions github-actions bot added this to the next milestone Apr 9, 2026
@github-actions github-actions bot added Component - Core Affects the Core module Seeding labels Apr 9, 2026
/// 2*T).
double ptCoeff = 0.29997 * 1.9972 / 2.0;
/// Bfield in z
float Bz = 1.9972f * UnitConstants::T;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
float Bz = 1.9972f * UnitConstants::T;
float bz = 2 * UnitConstants::T;
  • for the other seeders we defaulted to 2T at some point as it looks a bit less arbitrary than 1.9972

/// Max seed eta value considered for splitting.
float maxSeedSplitEta = 0.6;
/// Max allowed curvature for seed self consistancy check.
// Units of inverse meters
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Units of inverse meters
/// Units of inverse meters

Comment on lines +113 to +115
/// Transverse momentum coefficient (~0.3*B/2 - assumes nominal field of
/// 2*T).
double ptCoeff = std::numeric_limits<float>::quiet_NaN();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what we do for the other seeders is to provide the b field as an input to the derived config, store it and use it for the computation of pT

struct DerivedConfig : public Config {
/// @brief Constructor for derived configuration with magnetic field
/// @param config Base configuration parameters to inherit
/// @param bFieldInZ Magnetic field strength in Z direction [T]
DerivedConfig(const Config& config, float bFieldInZ);
/// Magnetic field strength in Z direction
float bFieldInZ = std::numeric_limits<float>::quiet_NaN();

bool checkZ0BitMask(std::uint16_t z0BitMask, float z0, float minZ0,
float z0HistoCoeff) const;

float estimateCurvature(const std::array<const GbtsNode*, 3>&) const;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
float estimateCurvature(const std::array<const GbtsNode*, 3>&) const;
float estimateCurvature(const std::array<const GbtsNode*, 3>& nodes) const;

Comment on lines +254 to +255
const float tripletMinPt, const float tauRatio,
const float tauRatioCut) const;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const float tripletMinPt, const float tauRatio,
const float tauRatioCut) const;
float tripletMinPt, float tauRatio,
float tauRatioCut) const;


float u[2], v[2];

float x0 = sps[2]->x;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
float x0 = sps[2]->x;
const float x0 = sps[2]->x;

also below


float dy = sps[k]->y - y0;

float r2Inv = 1.0 / (dx * dx + dy * dy);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
float r2Inv = 1.0 / (dx * dx + dy * dy);
float r2Inv = 1 / (dx * dx + dy * dy);

or 1.0f to avoid float -> double -> float

const float tauRatio, const float tauRatioCut) const {
// conformal mapping with the center at the middle spacepoint

float u[2], v[2];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar as above


if (pT > 5 * tripletMinPt) { // relatively high-pT track

if (tauRatio > 0.9 * tauRatioCut) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (tauRatio > 0.9 * tauRatioCut) {
if (tauRatio > 0.9f * tauRatioCut) {


if (B != 0.0) { // straight-line track is OK

const float R = std::sqrt(1 + A * A) / B * Acts::UnitConstants::mm;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const float R = std::sqrt(1 + A * A) / B * Acts::UnitConstants::mm;
const float R = std::sqrt(1 + A * A) / B * static_cast<float>(Acts::UnitConstants::mm);

note that these constants are double and this might trigger a conversion chain hurting performance. in algorithmic code we usually don't worry about units and simply use the "standard" ones. only on the boundaries we do the conversions. so I think it is fair to simply drop them as mm = 1 and GeV = 1

also applies to other parts of the code

@jpreston-cern jpreston-cern force-pushed the GBTSv3_ACTS_refactor branch from 65cf457 to 847f3ce Compare April 9, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component - Core Affects the Core module Seeding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants