Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SingleSeedVertexFinderTests.cpp File Reference
#include <boost/test/unit_test.hpp>
#include "Acts/Definitions/Algebra.hpp"
#include "Acts/Definitions/Units.hpp"
#include "Acts/Vertexing/SingleSeedVertexFinder.hpp"
#include <cmath>
#include <iostream>
#include <random>
#include <vector>
+ Include dependency graph for SingleSeedVertexFinderTests.cpp:

Go to the source code of this file.

Classes

struct  SpacePoint4SSVFT
 SpacePoint definition to be used for the unit tests. Implements all the relevant methods. More...
 

Functions

double getRndDouble (std::mt19937 &gen, double from, double to)
 Provides random double number between $from and $to.
 
int getRndInt (std::mt19937 &gen, int from, int to)
 Provides random integer number between $from and $to.
 
std::vector< doublemakePlaneFromTriplet (SpacePoint4SSVFT aa, SpacePoint4SSVFT bb, SpacePoint4SSVFT cc)
 Calculates equation of the plane (alpha*x + beta*y + gamma*z + delta = 0), given the three points.
 
 BOOST_AUTO_TEST_CASE (single_seed_vertex_finder_small_planes_test)
 Unit test for SingleSeedVertexFinder. Fits a set of the spacepoints with planes and compare the result to the easy-to-calculate expected result.
 
 BOOST_AUTO_TEST_CASE (single_seed_vertex_finder_small_rays_test)
 Unit test for SingleSeedVertexFinder. Fits a set of the spacepoints with straigh lines and compare the result to the easy-to-calculate expected result.
 
 BOOST_AUTO_TEST_CASE (single_seed_vertex_finder_full_planes_test)
 Unit test for SingleSeedVertexFinder. Generates real-looking sets of the spacepoints, then fits them with planes, finds a vertex, and then verifies the reconstructed vertex is actually near the original one.
 
 BOOST_AUTO_TEST_CASE (single_seed_vertex_finder_full_rays_test)
 Unit test for SingleSeedVertexFinder. Generates real-looking sets of the spacepoints, then fits them with rays, finds a vertex, and then verifies the reconstructed vertex is actually near the original one.
 

Function Documentation

BOOST_AUTO_TEST_CASE ( single_seed_vertex_finder_small_planes_test  )

Unit test for SingleSeedVertexFinder. Fits a set of the spacepoints with planes and compare the result to the easy-to-calculate expected result.

Definition at line 70 of file SingleSeedVertexFinderTests.cpp.

View newest version in sPHENIX GitHub at line 70 of file SingleSeedVertexFinderTests.cpp

References test_fpe::count, Acts::UnitConstants::e, Acts::SingleSeedVertexFinder< spacepoint_t >::findVertex(), Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxAbsZ, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxIterations, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxPhideviation, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxRPosition, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxXYdeviation, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxXYZdeviation, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxZPosition, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::minimalizeWRT, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::minTheta, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::minVtxShift, Acts::UnitConstants::mm, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::numPhiSlices, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::numZSlices, Acts::Test::pos, telescope_simulation::positions, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::removeFraction, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMaxFar, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMaxMiddle, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMaxNear, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMinFar, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMinMiddle, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMinNear, ambiguity_solver_full_chain::t1, ambiguity_solver_full_chain::t2, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::useFracPhiSlices, and Acts::SingleSeedVertexFinder< spacepoint_t >::Config::useFracZSlices.

+ Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( single_seed_vertex_finder_small_rays_test  )

Unit test for SingleSeedVertexFinder. Fits a set of the spacepoints with straigh lines and compare the result to the easy-to-calculate expected result.

Definition at line 148 of file SingleSeedVertexFinderTests.cpp.

View newest version in sPHENIX GitHub at line 148 of file SingleSeedVertexFinderTests.cpp

References test_fpe::count, Acts::UnitConstants::e, Acts::SingleSeedVertexFinder< spacepoint_t >::findVertex(), Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxAbsZ, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxIterations, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxPhideviation, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxRPosition, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxXYdeviation, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxXYZdeviation, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxZPosition, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::minimalizeWRT, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::minTheta, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::minVtxShift, Acts::UnitConstants::mm, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::numPhiSlices, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::numZSlices, Acts::Test::pos, telescope_simulation::positions, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::removeFraction, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMaxFar, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMaxMiddle, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMaxNear, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMinFar, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMinMiddle, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMinNear, ambiguity_solver_full_chain::t1, ambiguity_solver_full_chain::t2, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::useFracPhiSlices, and Acts::SingleSeedVertexFinder< spacepoint_t >::Config::useFracZSlices.

+ Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( single_seed_vertex_finder_full_planes_test  )

Unit test for SingleSeedVertexFinder. Generates real-looking sets of the spacepoints, then fits them with planes, finds a vertex, and then verifies the reconstructed vertex is actually near the original one.

Definition at line 224 of file SingleSeedVertexFinderTests.cpp.

View newest version in sPHENIX GitHub at line 224 of file SingleSeedVertexFinderTests.cpp

References autodiff::detail::copysign(), test_fpe::count, event, Acts::SingleSeedVertexFinder< spacepoint_t >::findVertex(), gen(), getRndDouble(), getRndInt(), i, makePlaneFromTriplet(), Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxAbsZ, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxIterations, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxPhideviation, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxRPosition, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxXYdeviation, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxXYZdeviation, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxZPosition, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::minimalizeWRT, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::minTheta, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::minVtxShift, Acts::UnitConstants::mm, nEvents, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::numPhiSlices, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::numZSlices, physmon_track_finding_ttbar::r, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::removeFraction, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMaxFar, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMaxMiddle, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMaxNear, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMinFar, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMinMiddle, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMinNear, ambiguity_solver_full_chain::t1, ambiguity_solver_full_chain::t2, ActsTests::PropagationDatasets::theta, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::useFracPhiSlices, and Acts::SingleSeedVertexFinder< spacepoint_t >::Config::useFracZSlices.

+ Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( single_seed_vertex_finder_full_rays_test  )

Unit test for SingleSeedVertexFinder. Generates real-looking sets of the spacepoints, then fits them with rays, finds a vertex, and then verifies the reconstructed vertex is actually near the original one.

Definition at line 356 of file SingleSeedVertexFinderTests.cpp.

View newest version in sPHENIX GitHub at line 356 of file SingleSeedVertexFinderTests.cpp

References autodiff::detail::copysign(), test_fpe::count, event, Acts::SingleSeedVertexFinder< spacepoint_t >::findVertex(), gen(), getRndDouble(), getRndInt(), Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxAbsZ, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxIterations, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxPhideviation, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxRPosition, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxXYdeviation, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxXYZdeviation, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::maxZPosition, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::minimalizeWRT, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::minTheta, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::minVtxShift, Acts::UnitConstants::mm, nEvents, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::numPhiSlices, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::numZSlices, physmon_track_finding_ttbar::r, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::removeFraction, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMaxFar, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMaxMiddle, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMaxNear, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMinFar, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMinMiddle, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::rMinNear, ambiguity_solver_full_chain::t1, ambiguity_solver_full_chain::t2, Acts::SingleSeedVertexFinder< spacepoint_t >::Config::useFracPhiSlices, and Acts::SingleSeedVertexFinder< spacepoint_t >::Config::useFracZSlices.

+ Here is the call graph for this function:

double getRndDouble ( std::mt19937 &  gen,
double  from,
double  to 
)

Provides random double number between $from and $to.

Parameters
genrandom number generator
fromlower threshold
toupper threshold
Returns
random number in [from,to)

Definition at line 37 of file SingleSeedVertexFinderTests.cpp.

View newest version in sPHENIX GitHub at line 37 of file SingleSeedVertexFinderTests.cpp

References gen().

Referenced by BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int getRndInt ( std::mt19937 &  gen,
int  from,
int  to 
)

Provides random integer number between $from and $to.

Parameters
genrandom number generator
fromlower threshold
toupper threshold
Returns
random number in [from,to)

Definition at line 46 of file SingleSeedVertexFinderTests.cpp.

View newest version in sPHENIX GitHub at line 46 of file SingleSeedVertexFinderTests.cpp

References gen().

Referenced by BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::vector<double> makePlaneFromTriplet ( SpacePoint4SSVFT  aa,
SpacePoint4SSVFT  bb,
SpacePoint4SSVFT  cc 
)

Calculates equation of the plane (alpha*x + beta*y + gamma*z + delta = 0), given the three points.

Parameters
a,b,cThe three points
Returns
Parameters of the plane {alpha,beta,gamma,delta}

Definition at line 53 of file SingleSeedVertexFinderTests.cpp.

View newest version in sPHENIX GitHub at line 53 of file SingleSeedVertexFinderTests.cpp

References KFPMath::a, KFPMath::b, Acts::PhysicalConstants::c, physmon_vertexing::delta, SpacePoint4SSVFT::x(), SpacePoint4SSVFT::y(), and SpacePoint4SSVFT::z().

Referenced by BOOST_AUTO_TEST_CASE(), and Acts::SingleSeedVertexFinder< spacepoint_t >::findClosestPointFromPlanes().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: