File SingleSeedVertexFinder.hpp
-
namespace Acts
Note
This file is foreseen for the
Geometry
module to replaceExtent
-
template<typename spacepoint_t>
class SingleSeedVertexFinder - #include <Acts/Vertexing/SingleSeedVertexFinder.hpp>
Implements the vertex finder based on the track seeds 0.
Assumes there is only 1 vertex and that it has a high multiplicity
Sorts out all the input spacepoints based on their distance to the z-axis
Create seeds from 3 spacepoints with a small deviation from a straigh line
Find a point with a minimal distance from either planes (minimalizeWRT=”planes”) or rays (minimalizeWRT=”rays”) defined by the seeds
Returns the point position as the vertex
Public Functions
-
SingleSeedVertexFinder(const Config &cfg, std::unique_ptr<const Logger> lgr = getDefaultLogger("SingleSeedVertexFinder", Logging::INFO))
Constructor.
- Parameters
cfg – Configuration object
lgr – Logging instance
-
~SingleSeedVertexFinder() = default
Destructor.
-
inline const Config &config() const
Const access to the config.
-
Acts::Result<Acts::Vector3> findVertex(const std::vector<spacepoint_t> &spacepoints) const
Finds the vertex based on the provided spacepoints.
- Parameters
spacepoints – Vector of the input spacepoints; they do not need to be sorted anyhow
- Returns
Position of the vertex
Private Functions
-
Acts::Vector3 findClosestPointFromPlanes(const std::vector<Triplet> &triplets) const
Find a point (=the vertex) that has minimum chi^2 with respect to all planes defined by the triplets.
- Parameters
triplets – Vector of all valid triplets
- Returns
Position {x,y,z} of the vertex
-
Acts::Vector3 findClosestPointFromRays(const std::vector<Triplet> &triplets) const
Find a point (=the vertex) that has minimum chi^2 with respect to all rays fitted through the triplets.
- Parameters
triplets – Vector of all valid triplets
- Returns
Position {x,y,z} of the vertex
-
std::vector<Triplet> findTriplets(const Acts::SingleSeedVertexFinder<spacepoint_t>::SortedSpacepoints &sortedSpacepoints) const
Makes triplets from the provided vectors of near, middle, and far spacepoints; for each slice of phi; and for each slice of z.
- Parameters
sortedSpacepoints – Struct of the sorted spacepointss
- Returns
Vector of valid triplets
-
Acts::SingleSeedVertexFinder<spacepoint_t>::SortedSpacepoints sortSpacepoints(const std::vector<spacepoint_t> &spacepoints) const
Sorts spacepoints into a separate vectors for near, middle, and far spacepoints; for each slice of phi; and for each slice of z.
- Parameters
spacepoints – Vector of the input spacepoints;
- Returns
Struct of the sorted spacepoints
-
bool tripletValidationAndUpdate(Triplet &triplet) const
Validate the triplet based on “maxXYdeviation”, “maxXYZdeviation”, “maxZPosition”, and “maxRPosition”.
- Parameters
triplet – A single triplet to be validated
- Returns
True if the deviations and fitted ray are within the configured ranges If “minimalizeWRT”==”rays”, then the fitted ray is also saved to the triplet for later
Private Members
Private Static Functions
-
struct Config
- #include <Acts/Vertexing/SingleSeedVertexFinder.hpp>
Configuration struct.
Public Members
-
Acts::ActsScalar maxAbsZ = 450. * Acts::UnitConstants::mm
maximum |z| to consider, z slices will be done within the range (-maxAbsZ,maxAbsZ) values of maxAbsZ, maxZPosition, rMaxFar, and minTheta should be set reasonably with respect to each other
-
std::uint32_t maxIterations = 20
maximum number of iterations when discarding triplets with the largest chi^2
-
Acts::ActsScalar maxPhideviation = 0.08
maximum deviation in phi between the near and middle spacepoints or middle and far spacepoints
-
Acts::ActsScalar maxRPosition = 10.f * Acts::UnitConstants::mm
maximum R position of the vertex at the point closest to the Z axis
-
Acts::ActsScalar maxXYdeviation = 0.08
maximum deviation in X-Y between the first 2 spacepoints and the last 2 spacepoints
-
Acts::ActsScalar maxXYZdeviation = 0.08
maximum deviation in 3D between the first 2 spacepoints and the last 2 spacepoints
-
Acts::ActsScalar maxZPosition = 200.f * Acts::UnitConstants::mm
maximum Z position of the vertex at the point closest to the Z axis
-
std::string minimalizeWRT = "planes"
chi^2 minimalization will happen with respect to “planes” or “rays”
-
Acts::ActsScalar minTheta = 1.
minimum angle between Z axis and a triplet, effectively removing triplets with large |eta|
-
Acts::ActsScalar minVtxShift = 0.3f * Acts::UnitConstants::mm
if the vertex estimation moves less than this, stop iterations
-
std::uint32_t numPhiSlices = 60
number of phi slices, at least 3 to avoid duplicities it should be less than 2*pi/maxPhideviation in order not to loop over triplets that will be rejected by maxPhideviation anyway
-
std::uint32_t numZSlices = 150
number of z slices
-
Acts::ActsScalar removeFraction = 0.10
each iteration, discard this fraction of triplets with the largest chi^2
-
Acts::ActsScalar rMaxFar = 320.f * Acts::UnitConstants::mm
-
Acts::ActsScalar rMaxMiddle = 190.f * Acts::UnitConstants::mm
-
Acts::ActsScalar rMaxNear = 60.f * Acts::UnitConstants::mm
-
Acts::ActsScalar rMinFar = 280.f * Acts::UnitConstants::mm
-
Acts::ActsScalar rMinMiddle = 150.f * Acts::UnitConstants::mm
-
Acts::ActsScalar rMinNear = 20.f * Acts::UnitConstants::mm
thresholds for near, middle, and far spacepoints
-
Acts::ActsScalar useFracPhiSlices = 0.5
use only a fraction of available phi slices to speed up calculations;
-
Acts::ActsScalar useFracZSlices = 0.5
use only a fraction of available z slices to speed up calculations;
-
Acts::ActsScalar maxAbsZ = 450. * Acts::UnitConstants::mm
-
struct SortedSpacepoints
Struct to store sorted spacepoints for each layer (near, middle, and far), for each slice of phi, and for each slice of z.
Public Functions
-
inline SortedSpacepoints(const int phiSize, const int zSize)
-
inline std::vector<std::pair<spacepoint_t const*, Acts::ActsScalar>> &addSP(int layer, int phi, int z)
Provides non-const vector of spacepoints for a given layer, phi slice, and z slice.
- Parameters
layer – Index of the layer (near=0, middle=1, far=2)
phi – Index of the phi slice
z – Index of the z slice
- Returns
Non-const vector of spacepoints
-
inline const std::vector<std::pair<spacepoint_t const*, Acts::ActsScalar>> &getSP(int layer, int phi, int z) const
Provides const vector of spacepoints for a given layer, phi slice, and z slice.
- Parameters
layer – Index of the layer (near=0, middle=1, far=2)
phi – Index of the phi slice
z – Index of the z slice
- Returns
Const vector of spacepoints
Public Members
-
std::array<std::vector<std::vector<std::vector<std::pair<spacepoint_t const*, Acts::ActsScalar>>>>, 3> sortedSP
-
inline SortedSpacepoints(const int phiSize, const int zSize)
-
struct Triplet
Struct to store spacepoint combinations from near, middle, and far parts of the detector. Also stores straight line fit through the spacepoints in case minimalizeWRT==”rays”, so it’s not fitted twice.
Public Functions
-
inline Triplet(const spacepoint_t &aa, const spacepoint_t &bb, const spacepoint_t &cc)
-
inline Triplet(const spacepoint_t &aa, const spacepoint_t &bb, const spacepoint_t &cc)
-
template<typename spacepoint_t>