Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisFelipeCoelho committed Nov 13, 2023
1 parent 656c8b3 commit 0d2c771
Show file tree
Hide file tree
Showing 2 changed files with 251 additions and 204 deletions.
229 changes: 128 additions & 101 deletions Core/include/Acts/Seeding/SeedFinderConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,59 +25,73 @@ template <typename SpacePoint>
struct SeedFinderConfig {
std::shared_ptr<Acts::SeedFilter<SpacePoint>> seedFilter;

/*
* Seeding parameters used in the space-point grid creation and bin finding
*/

// Geometry Settings + Detector ROI
// Limiting location of all measurements + used in grid creation
float phiMin = -M_PI;
float phiMax = M_PI;
float zMin = -2800 * Acts::UnitConstants::mm;
float zMax = 2800 * Acts::UnitConstants::mm;
float rMax = 600 * Acts::UnitConstants::mm;
// WARNING: if rMin is smaller than impactMax, the bin size will be 2*pi,
// which will make seeding very slow!
float rMin = 33 * Acts::UnitConstants::mm;

// Vector containg the z-bin edges for non equidistant binning in z
std::vector<float> zBinEdges;

// Number of z bins to skip during the search for middle space-points. This is useful for removing the outermost bins and speeding up seeding. Should be used in conjunction with zBinsCustomLooping (skipZMiddleBinSearch determines the first N bins in zBinsCustomLooping to be avoided).
std::size_t skipZMiddleBinSearch = 0;
// Order of z bins to loop over when searching for SPs
std::vector<std::size_t> zBinsCustomLooping = {};

// Radial bin size used in space-point grid
float binSizeR = 1. * Acts::UnitConstants::mm;

/*
* Seeding parameters used to define the region of interest for middle space-point
*/

// Radial range for middle space-point
// The range can be defined manualy with (rMinMiddle, rMaxMiddle). If useVariableMiddleSPRange is set to false and the vector rRangeMiddleSP is empty, we use (rMinMiddle, rMaxMiddle) to cut the middle space-points
float rMinMiddle = 60.f * Acts::UnitConstants::mm;
float rMaxMiddle = 120.f * Acts::UnitConstants::mm;
// If useVariableMiddleSPRange is set to false, the vector rRangeMiddleSP can be used to define a fixed r range for each z bin: {{rMin, rMax}, ...}
bool useVariableMiddleSPRange = false;
// Range defined in vector for each z bin
std::vector<std::vector<float>> rRangeMiddleSP;
// If useVariableMiddleSPRange is true, the radial range will be calculated based on the maximum and minimum r values of the space-points in the event and a deltaR (deltaRMiddleMinSPRange, deltaRMiddleMaxSPRange)
float deltaRMiddleMinSPRange = 10. * Acts::UnitConstants::mm;
float deltaRMiddleMaxSPRange = 10. * Acts::UnitConstants::mm;

// Vector containing minimum and maximum z boundaries for cutting middle space-points
std::pair<float, float> zOutermostLayers{-2700 * Acts::UnitConstants::mm,
2700 * Acts::UnitConstants::mm};

/*
* Seeding parameters used to define the cuts on space-point doublets
*/

// Minimum radial distance between two doublet components (prefere deltaRMinTopSP and deltaRMinBottomSP to set separate values for outer and inner space-points)
/*
* Seeding parameters used in the space-point grid creation and bin finding
*/

// Geometry Settings + Detector ROI
// Limiting location of all measurements + used in grid creation
float phiMin = -M_PI;
float phiMax = M_PI;
float zMin = -2800 * Acts::UnitConstants::mm;
float zMax = 2800 * Acts::UnitConstants::mm;
float rMax = 600 * Acts::UnitConstants::mm;
// WARNING: if rMin is smaller than impactMax, the bin size will be 2*pi,
// which will make seeding very slow!
float rMin = 33 * Acts::UnitConstants::mm;

// Vector containg the z-bin edges for non equidistant binning in z
std::vector<float> zBinEdges;

// Number of z bins to skip during the search for middle space-points. This is
// useful for removing the outermost bins and speeding up seeding. Should be
// used in conjunction with zBinsCustomLooping (skipZMiddleBinSearch
// determines the first N bins in zBinsCustomLooping to be avoided).
std::size_t skipZMiddleBinSearch = 0;
// Order of z bins to loop over when searching for SPs
std::vector<std::size_t> zBinsCustomLooping = {};

// Radial bin size used in space-point grid
float binSizeR = 1. * Acts::UnitConstants::mm;

/*
* Seeding parameters used to define the region of interest for middle
* space-point
*/

// Radial range for middle space-point
// The range can be defined manualy with (rMinMiddle, rMaxMiddle). If
// useVariableMiddleSPRange is set to false and the vector rRangeMiddleSP is
// empty, we use (rMinMiddle, rMaxMiddle) to cut the middle space-points
float rMinMiddle = 60.f * Acts::UnitConstants::mm;
float rMaxMiddle = 120.f * Acts::UnitConstants::mm;
// If useVariableMiddleSPRange is set to false, the vector rRangeMiddleSP can
// be used to define a fixed r range for each z bin: {{rMin, rMax}, ...}
bool useVariableMiddleSPRange = false;
// Range defined in vector for each z bin
std::vector<std::vector<float>> rRangeMiddleSP;
// If useVariableMiddleSPRange is true, the radial range will be calculated
// based on the maximum and minimum r values of the space-points in the event
// and a deltaR (deltaRMiddleMinSPRange, deltaRMiddleMaxSPRange)
float deltaRMiddleMinSPRange = 10. * Acts::UnitConstants::mm;
float deltaRMiddleMaxSPRange = 10. * Acts::UnitConstants::mm;

// Vector containing minimum and maximum z boundaries for cutting middle
// space-points
std::pair<float, float> zOutermostLayers{-2700 * Acts::UnitConstants::mm,
2700 * Acts::UnitConstants::mm};

/*
* Seeding parameters used to define the cuts on space-point doublets
*/

// Minimum radial distance between two doublet components (prefere
// deltaRMinTopSP and deltaRMinBottomSP to set separate values for outer and
// inner space-points)
float deltaRMin = 5 * Acts::UnitConstants::mm;
// Maximum radial distance between two doublet components (prefere deltaRMaxTopSP and deltaRMacBottomSP to set separate values for outer and inner space-points)
// Maximum radial distance between two doublet components (prefere
// deltaRMaxTopSP and deltaRMacBottomSP to set separate values for outer and
// inner space-points)
float deltaRMax = 270 * Acts::UnitConstants::mm;
// Minimum radial distance between middle-outer doublet components
float deltaRMinTopSP = std::numeric_limits<float>::quiet_NaN();
Expand All @@ -87,58 +101,70 @@ struct SeedFinderConfig {
float deltaRMinBottomSP = std::numeric_limits<float>::quiet_NaN();
// Maximum radial distance between inner-middle doublet components
float deltaRMaxBottomSP = std::numeric_limits<float>::quiet_NaN();

// Maximum value of z-distance between space-points in doublet
float deltaZMax =
std::numeric_limits<float>::infinity() * Acts::UnitConstants::mm;

// Maximum allowed cotTheta between two space-points in doublet, used to check if forward angle is within bounds
float cotThetaMax = 10.01788; // equivalent to 3 eta (pseudorapidity)
// Maximum allowed cotTheta between two space-points in doublet, used to check
// if forward angle is within bounds
float cotThetaMax = 10.01788; // equivalent to 3 eta (pseudorapidity)

// Limiting location of collision region in z-axis used to check if doublet
// origin is within reasonable bounds
float collisionRegionMin = -150 * Acts::UnitConstants::mm;
float collisionRegionMax = +150 * Acts::UnitConstants::mm;

// Limiting location of collision region in z-axis used to check if doublet origin is within reasonable bounds
float collisionRegionMin = -150 * Acts::UnitConstants::mm;
float collisionRegionMax = +150 * Acts::UnitConstants::mm;

// Enable cut on the compatibility between interaction point and doublet, this is an useful approximation to speed up the seeding
// Enable cut on the compatibility between interaction point and doublet, this
// is an useful approximation to speed up the seeding
bool interactionPointCut = false;

/*
* Seeding parameters used to define the cuts on space-point triplets
*/

// Minimum transverse momentum (pT) used to check the r-z slope compatibility of triplets with maximum multiple scattering effect (produced by the minimum allowed pT particle) + a certain uncertainty term. Check the documentation for more information https://acts.readthedocs.io/en/latest/core/reconstruction/pattern_recognition/seeding.html
float minPt = 400. * Acts::UnitConstants::MeV;
// Number of sigmas of scattering angle to be considered in the minimum pT scattering term
float sigmaScattering = 5;
// Term that accounts for the thickness of scattering medium in radiation lengths in the Lynch \& Dahl correction to the Highland equation
// default is 5%
// TODO: necessary to make amount of material dependent on detector region?
float radLengthPerSeed = 0.05;
// Maximum transverse momentum for scattering calculation
float maxPtScattering = 10 * Acts::UnitConstants::GeV;
// Maximum value of impact parameter estimation of the seed candidates
float impactMax = 20. * Acts::UnitConstants::mm;
// Parameter which can loosen the tolerance of the track seed to form to a
// helix, useful for (e.g.) misaligned seeding
float helixCut = 1.;

/*
* Seeding parameters used for quality seed confirmation
*/

// Enable quality seed confirmation, this is different than default seeding confiramtion because it can also be defined for different (r, z) regions of the detector. We also classify seeds as "high-quality" seeds, and seeds that are not confirmed as "high-quality" are only selected if no other "high-quality" seeds has been found for that inner-middle doublet
bool seedConfirmation = false;
// parameters for central seed confirmation
SeedConfirmationRangeConfig centralSeedConfirmationRange;
// parameters for forward seed confirmation
SeedConfirmationRangeConfig forwardSeedConfirmationRange;
// Maximum number (minus one) of accepted seeds per middle space-point
unsigned int maxSeedsPerSpM = 5;

/*
* Other parameters
*/


/*
* Seeding parameters used to define the cuts on space-point triplets
*/

// Minimum transverse momentum (pT) used to check the r-z slope compatibility
// of triplets with maximum multiple scattering effect (produced by the
// minimum allowed pT particle) + a certain uncertainty term. Check the
// documentation for more information
// https://acts.readthedocs.io/en/latest/core/reconstruction/pattern_recognition/seeding.html
float minPt = 400. * Acts::UnitConstants::MeV;
// Number of sigmas of scattering angle to be considered in the minimum pT
// scattering term
float sigmaScattering = 5;
// Term that accounts for the thickness of scattering medium in radiation lengths in the Lynch \& Dahl correction to the Highland equation
// default is 5%
// TODO: necessary to make amount of material dependent on detector region?
float radLengthPerSeed = 0.05;
// Maximum transverse momentum for scattering calculation
float maxPtScattering = 10 * Acts::UnitConstants::GeV;
// Maximum value of impact parameter estimation of the seed candidates
float impactMax = 20. * Acts::UnitConstants::mm;
// Parameter which can loosen the tolerance of the track seed to form to a
// helix, useful for (e.g.) misaligned seeding
float helixCut = 1.;

/*
* Seeding parameters used for quality seed confirmation
*/

// Enable quality seed confirmation, this is different than default seeding
// confiramtion because it can also be defined for different (r, z) regions of
// the detector. We also classify seeds as "high-quality" seeds, and seeds
// that are not confirmed as "high-quality" are only selected if no other
// "high-quality" seeds has been found for that inner-middle doublet
bool seedConfirmation = false;
// parameters for central seed confirmation
SeedConfirmationRangeConfig centralSeedConfirmationRange;
// parameters for forward seed confirmation
SeedConfirmationRangeConfig forwardSeedConfirmationRange;
// Maximum number (minus one) of accepted seeds per middle space-point
unsigned int maxSeedsPerSpM = 5;

/*
* Other parameters
*/

// alignment uncertainties, used for uncertainties in the
// non-measurement-plane of the modules
// which otherwise would be 0
Expand Down Expand Up @@ -178,9 +204,10 @@ struct SeedFinderConfig {
Delegate<Acts::Vector3(const SpacePoint&)> getStripCenterDistance;
// Returns position of the center of the top strip.
Delegate<Acts::Vector3(const SpacePoint&)> getTopStripCenterPosition;
// Tolerance parameter used to check the compatibility of space-point coordinates in
// xyz. This is only used in a detector specific check for strip modules
float toleranceParam = 1.1 * Acts::UnitConstants::mm;
// Tolerance parameter used to check the compatibility of space-point
// coordinates in xyz. This is only used in a detector specific check for
// strip modules
float toleranceParam = 1.1 * Acts::UnitConstants::mm;

bool isInInternalUnits = false;

Expand Down
Loading

0 comments on commit 0d2c771

Please sign in to comment.