Analysis Software
Documentation for sPHENIX simulation software
|
#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>
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< 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. | |
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. | |
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.
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.
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.
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.
Provides random double number between $from and $to.
gen | random number generator |
from | lower threshold |
to | upper threshold |
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().
int getRndInt | ( | std::mt19937 & | gen, |
int | from, | ||
int | to | ||
) |
Provides random integer number between $from and $to.
gen | random number generator |
from | lower threshold |
to | upper threshold |
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().
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.
a,b,c | The three points |
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().