Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Make seeding config more understandable #2652

Merged
merged 34 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
656c8b3
make seed finder config comments more understandable
LuisFelipeCoelho Nov 13, 2023
0d2c771
format
LuisFelipeCoelho Nov 13, 2023
d10f885
format
LuisFelipeCoelho Nov 13, 2023
326f465
refactor seed filter config
LuisFelipeCoelho Nov 13, 2023
d1086a8
change seed confRange config
LuisFelipeCoelho Nov 13, 2023
cb4f2fb
Update SeedFinderOrthogonalConfig.hpp
LuisFelipeCoelho Nov 13, 2023
aea08ee
Update Core/include/Acts/Seeding/SeedFilterConfig.hpp
LuisFelipeCoelho Nov 13, 2023
9a778eb
Update Core/include/Acts/Seeding/SeedConfirmationRangeConfig.hpp
LuisFelipeCoelho Nov 13, 2023
e8de800
Update Core/include/Acts/Seeding/SeedFilterConfig.hpp
LuisFelipeCoelho Nov 13, 2023
2724204
Update Core/include/Acts/Seeding/SeedFinderConfig.hpp
LuisFelipeCoelho Nov 13, 2023
f25cd01
Update Core/include/Acts/Seeding/SeedFinderOrthogonalConfig.hpp
LuisFelipeCoelho Nov 13, 2023
66faf6d
Update Core/include/Acts/Seeding/SeedFinderConfig.hpp
LuisFelipeCoelho Nov 13, 2023
c53d927
Update SeedFinderOrthogonalConfig.hpp
LuisFelipeCoelho Nov 13, 2023
5979b67
Merge branch 'main' into refactor-comments
LuisFelipeCoelho Nov 13, 2023
fdd1c1e
Merge branch 'main' into refactor-comments
LuisFelipeCoelho Nov 14, 2023
0d6d8ba
fix mistake
LuisFelipeCoelho Nov 14, 2023
2ba4c44
doxygen style
LuisFelipeCoelho Nov 14, 2023
e036e9c
fix spelling
LuisFelipeCoelho Nov 14, 2023
cea0b67
Merge branch 'main' into refactor-comments
LuisFelipeCoelho Nov 14, 2023
4858378
Merge branch 'main' into refactor-comments
LuisFelipeCoelho Nov 15, 2023
033fb69
Merge branch 'main' into refactor-comments
LuisFelipeCoelho Nov 15, 2023
ce26b7d
Merge branch 'main' into refactor-comments
LuisFelipeCoelho Nov 20, 2023
6b81bb1
fix format
LuisFelipeCoelho Nov 21, 2023
a7e8f07
Merge branch 'main' into refactor-comments
LuisFelipeCoelho Nov 27, 2023
744519a
format
LuisFelipeCoelho Nov 27, 2023
6dfc590
Merge branch 'main' into refactor-comments
LuisFelipeCoelho Nov 28, 2023
0d35e2d
Update Core/include/Acts/Seeding/SeedFilterConfig.hpp
LuisFelipeCoelho Nov 29, 2023
c561d52
Update Core/include/Acts/Seeding/SeedConfirmationRangeConfig.hpp
LuisFelipeCoelho Nov 29, 2023
ab3db64
Merge branch 'main' into refactor-comments
paulgessinger Dec 4, 2023
eb5a4b1
Update Core/include/Acts/Seeding/SeedFinderOrthogonalConfig.hpp
LuisFelipeCoelho Dec 5, 2023
25d347d
Merge branch 'main' into refactor-comments
LuisFelipeCoelho Dec 5, 2023
3da0df7
Merge branch 'main' into refactor-comments
paulgessinger Dec 5, 2023
4d8efc5
Merge branch 'main' into refactor-comments
kodiakhq[bot] Dec 5, 2023
c3b546c
Merge branch 'main' into refactor-comments
kodiakhq[bot] Dec 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 27 additions & 13 deletions Core/include/Acts/Seeding/SeedConfirmationRangeConfig.hpp
LuisFelipeCoelho marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,50 @@

namespace Acts {

// defaults experimental cuts to no operation in both seeding algorithms
/// defaults experimental cuts to no operation in both seeding algorithms
inline bool noopExperimentCuts(float /*bottomRadius*/, float /*cotTheta*/) {
return true;
}

/// @brief contains parameters for seed confirmation
/// @brief Contains parameters for quality seed confirmation
/// @note Requirements on the number of compatible space-points and impact parameters can be defined
/// for different (r, z) regions of the detector (e.g. forward or central
/// region) by SeedConfirmationRange. Seeds are classified as "high-quality"
/// seeds and normal quality seeds. Normal quality seeds are only selected if
/// no other "high-quality" seed has been found for that inner-middle doublet.
/// For optimization reasons, the algorithm only calls the seed confirmation
/// for a certain inner-middle doublet, in case a configurable minimum number
/// of inner-middle-outer triplets have been found.
struct SeedConfirmationRangeConfig {
// z minimum and maximum of middle component of the seed used to define the
// region of the detector for seed confirmation
/// Minimum z position of middle component of the seed used to
/// split the region of the detector for seed confirmation
float zMinSeedConf =
std::numeric_limits<float>::lowest(); // Acts::UnitConstants::mm

/// Maximum z position of middle component of the seed used to
/// split the region of the detector for seed confirmation
float zMaxSeedConf =
std::numeric_limits<float>::max(); // Acts::UnitConstants::mm
// radius of bottom component of seed that is used to define the number of
// compatible top required

/// Radius position of inner seed component that is used to
/// split the region of the detector for seed confirmation
float rMaxSeedConf =
std::numeric_limits<float>::max(); // Acts::UnitConstants::mm

// number of compatible top SPs of seed if bottom radius is larger than
// rMaxSeedConf
/// Minimum number of compatible outer space-points required in quality seed
/// confirmation if inner space-points radius is larger than rMaxSeedConf
std::size_t nTopForLargeR = 0;
// number of compatible top SPs of seed if bottom radius is smaller than
// rMaxSeedConf
/// Minimum number of compatible outer space-points required in quality seed
/// confirmation if inner space-points radius is smaller than rMaxSeedConf
std::size_t nTopForSmallR = 0;

// minimum radius for bottom SP in seed confirmation
/// Minimum radius for inner seed component required in quality seed
/// confirmation
float seedConfMinBottomRadius = 60. * Acts::UnitConstants::mm;
// maximum zOrigin in seed confirmation
/// Maximum longitudinal impact parameter of seed required in quality seed
/// confirmation
float seedConfMaxZOrigin = 150. * Acts::UnitConstants::mm;
// minimum impact parameter for seed confirmation
/// Minimum impact parameter of seed required in quality seed confirmation
float minImpactSeedConf = 1. * Acts::UnitConstants::mm;
};

Expand Down
80 changes: 49 additions & 31 deletions Core/include/Acts/Seeding/SeedFilterConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,55 +16,73 @@
#include <stdexcept>

namespace Acts {

/// @brief Structure that holds configuration parameters for the seed filter algorithm
struct SeedFilterConfig {
// the allowed delta between two inverted seed radii for them to be considered
// compatible.
/// Allowed difference in curvature (inverted seed radii) between two
/// compatible seeds
float deltaInvHelixDiameter = 0.00003 * 1. / Acts::UnitConstants::mm;
// the transverse impact parameters (d0) is multiplied by this factor and
// subtracted from weight
/// Minimum distance between compatible outer space-points to be considered.
/// This is used to avoid counting space-points from the same layer
float deltaRMin = 5. * Acts::UnitConstants::mm;
/// Seed weight/score is increased by this value if a compatible seed has been
/// found. This is the c1 factor in the seed score calculation (w = c1 * Nt -
/// c2 * d0 - c3 * z0)
float compatSeedWeight = 200.;
/// The transverse impact parameters (d0) is multiplied by this factor and
/// subtracted from weight. This is the c2 factor in the seed score
/// calculation (w = c1 * Nt - c2 * d0 - c3 * z0)
float impactWeightFactor = 1.;
// the logitudinal impact parameters (z0) is multiplied by this factor and
// subtracted from weight
/// The logitudinal impact parameters (z0) is multiplied by this factor and
/// subtracted from weight. This is the c3 factor in the seed score
/// calculation (w = c1 * Nt - c2 * d0 - c3 * z0)
float zOriginWeightFactor = 1.;
// seed weight increased by this value if a compatible seed has been found.
float compatSeedWeight = 200.;
// minimum distance between compatible seeds to be considered for weight boost
float deltaRMin = 5. * Acts::UnitConstants::mm;
// in dense environments many seeds may be found per middle space point.
// only seeds with the highest weight will be kept if this limit is reached.
/// Maximum number (minus one) of accepted seeds per middle space-point
/// In dense environments many seeds may be found per middle space-point
/// Only seeds with the highest weight will be kept if this limit is reached
unsigned int maxSeedsPerSpM = 10;
// how often do you want to increase the weight of a seed for finding a
// compatible seed?
/// Maximum limit to number of compatible space-point used in score
/// calculation. We increase by c1 the weight calculation for each compatible
/// space-point until we reach compatSeedLimit
std::size_t compatSeedLimit = 2;
// Tool to apply experiment specific cuts on collected middle space points

// increment in seed weight if the number of compatible seeds is larger than
// numSeedIncrement, this is used in case of high occupancy scenarios if we
// want to increase the weight of the seed by seedWeightIncrement when the
// number of compatible seeds is higher than a certain value
/// Increment in seed weight if the number of compatible seeds is larger than
/// numSeedIncrement, this is used in case of high occupancy scenarios if we
/// want to increase the weight of the seed by seedWeightIncrement when the
/// number of compatible seeds is higher than a certain value
float seedWeightIncrement = 0;
float numSeedIncrement = std::numeric_limits<float>::infinity();

// seedConfirmation enables seed confirmation cuts - keep seeds if they have
// specific values of impact parameter, z-origin and number of compatible
// seeds inside a pre-defined range that also depends on the region of the
// detector (i.e. forward or central region) defined by SeedConfirmationRange
/// Seeding parameters used for quality seed confirmation

/// Enable quality seed confirmation, this is different than default seeding
/// confirmation because it can also be defined for different (r, z) regions
/// of the detector (e.g. forward or central region) by SeedConfirmationRange.
/// Seeds are classified as "high-quality" seeds and normal quality seeds.
/// Normal quality seeds are only selected if no other "high-quality" seed
/// has been found for that inner-middle doublet.
bool seedConfirmation = false;
// contains parameters for central seed confirmation
/// Contains parameters for central seed confirmation
SeedConfirmationRangeConfig centralSeedConfirmationRange;
// contains parameters for forward seed confirmation
/// Contains parameters for forward seed confirmation
SeedConfirmationRangeConfig forwardSeedConfirmationRange;

// maximum number of lower quality seeds in seed confirmation
/// If seedConfirmation is true we classify seeds as "high-quality" seeds.
/// Seeds that are not confirmed as "high-quality" are only selected if no
/// other "high-quality" seed has been found for that inner-middle doublet
/// Maximum number of normal seeds (not classified as "high-quality" seeds)
/// in seed confirmation
std::size_t maxSeedsPerSpMConf = std::numeric_limits<std::size_t>::max();
// maximum number of quality seeds for each middle-bottom SP-dublet in seed
// confirmation if the limit is reached we check if there is a lower quality
// seed to be replaced
/// Maximum number of "high-quality" seeds for each inner-middle SP-dublet in
/// seed confirmation. If the limit is reached we check if there is a normal
/// quality seed to be replaced
std::size_t maxQualitySeedsPerSpMConf =
std::numeric_limits<std::size_t>::max();

// use deltaR between top and middle SP instead of top radius to search for
// compatible SPs
/// Other parameters

/// Use deltaR between top and middle SP instead of top radius to search for
/// compatible SPs
bool useDeltaRorTopRadius = false;

bool isInInternalUnits = false;
Expand Down
Loading
Loading