Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GsfComponentMergingTests.cpp File Reference
#include <boost/test/unit_test.hpp>
#include "Acts/Definitions/Algebra.hpp"
#include "Acts/Definitions/TrackParametrization.hpp"
#include "Acts/Definitions/Units.hpp"
#include "Acts/EventData/detail/TransformationBoundToFree.hpp"
#include "Acts/EventData/detail/TransformationFreeToBound.hpp"
#include "Acts/Geometry/GeometryContext.hpp"
#include "Acts/Surfaces/CylinderBounds.hpp"
#include "Acts/Surfaces/CylinderSurface.hpp"
#include "Acts/Surfaces/DiscSurface.hpp"
#include "Acts/Surfaces/PerigeeSurface.hpp"
#include "Acts/Surfaces/PlaneSurface.hpp"
#include "Acts/Surfaces/Surface.hpp"
#include "Acts/Surfaces/SurfaceBounds.hpp"
#include "Acts/Utilities/GaussianMixtureReduction.hpp"
#include "Acts/Utilities/Identity.hpp"
#include "Acts/Utilities/Intersection.hpp"
#include "Acts/Utilities/Result.hpp"
#include "Acts/Utilities/detail/periodic.hpp"
#include <algorithm>
#include <array>
#include <cmath>
#include <cstddef>
#include <functional>
#include <initializer_list>
#include <memory>
#include <random>
#include <stdexcept>
#include <tuple>
#include <utility>
#include <vector>
#include <Eigen/Eigenvalues>
+ Include dependency graph for GsfComponentMergingTests.cpp:

Go to the source code of this file.

Classes

struct  DummyComponent< D >
 
class  MultivariateNormalDistribution< T, D >
 

Macros

#define CHECK_CLOSE_MATRIX(a, b, t)   BOOST_CHECK(((a - b).array().abs() < t).all())
 

Typedefs

using LocPosArray = std::array< std::pair< double, double >, 4 >
 

Functions

template<int D>
auto sampleFromMultivariate (const std::vector< DummyComponent< D >> &cmps, std::size_t n_samples, std::mt19937 &gen)
 
template<int D>
auto mean (const std::vector< ActsVector< D >> &samples) -> ActsVector< D >
 
template<int D>
auto circularMean (const std::vector< ActsVector< D >> &samples) -> ActsVector< D >
 
template<int D, typename subtract_t = std::minus<ActsVector<D>>>
auto boundCov (const std::vector< ActsVector< D >> &samples, const ActsVector< D > &mu, const subtract_t &sub=subtract_t{}) -> ActsSquareMatrix< D >
 
BoundVector meanFromFree (std::vector< DummyComponent< eBoundSize >> cmps, const Surface &surface)
 
template<typename angle_description_t >
void test_surface (const Surface &surface, const angle_description_t &desc, const LocPosArray &loc_pos, double expectedError)
 
 BOOST_AUTO_TEST_CASE (test_with_data)
 
 BOOST_AUTO_TEST_CASE (test_with_data_circular)
 
 BOOST_AUTO_TEST_CASE (test_plane_surface)
 
 BOOST_AUTO_TEST_CASE (test_cylinder_surface)
 
 BOOST_AUTO_TEST_CASE (test_disc_surface)
 
 BOOST_AUTO_TEST_CASE (test_perigee_surface)
 

Macro Definition Documentation

#define CHECK_CLOSE_MATRIX (   a,
  b,
  t 
)    BOOST_CHECK(((a - b).array().abs() < t).all())

Definition at line 45 of file GsfComponentMergingTests.cpp.

View newest version in sPHENIX GitHub at line 45 of file GsfComponentMergingTests.cpp

Referenced by BOOST_AUTO_TEST_CASE(), and test_surface().

Typedef Documentation

using LocPosArray = std::array<std::pair<double, double>, 4>

Definition at line 212 of file GsfComponentMergingTests.cpp.

View newest version in sPHENIX GitHub at line 212 of file GsfComponentMergingTests.cpp

Function Documentation

BOOST_AUTO_TEST_CASE ( test_with_data  )

Definition at line 257 of file GsfComponentMergingTests.cpp.

View newest version in sPHENIX GitHub at line 257 of file GsfComponentMergingTests.cpp

References boundCov(), CHECK_CLOSE_MATRIX, Acts::UnitConstants::e, Acts::detail::gaussianMixtureMeanCov(), gen(), mean(), and sampleFromMultivariate().

+ Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_with_data_circular  )

Definition at line 280 of file GsfComponentMergingTests.cpp.

View newest version in sPHENIX GitHub at line 280 of file GsfComponentMergingTests.cpp

References KFPMath::a, KFPMath::b, boundCov(), CHECK_CLOSE_MATRIX, circularMean(), Acts::detail::difference_periodic(), Acts::UnitConstants::e, Acts::detail::gaussianMixtureMeanCov(), gen(), i, and sampleFromMultivariate().

+ Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_plane_surface  )

Definition at line 314 of file GsfComponentMergingTests.cpp.

View newest version in sPHENIX GitHub at line 314 of file GsfComponentMergingTests.cpp

References Acts::UnitConstants::e, merge_hashes::p, writeMapConfig::surface, and test_surface().

+ Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_cylinder_surface  )

Definition at line 325 of file GsfComponentMergingTests.cpp.

View newest version in sPHENIX GitHub at line 325 of file GsfComponentMergingTests.cpp

References Acts::UnitConstants::e, merge_hashes::p, physmon_track_finding_ttbar::r, writeMapConfig::surface, and test_surface().

+ Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_disc_surface  )

Definition at line 344 of file GsfComponentMergingTests.cpp.

View newest version in sPHENIX GitHub at line 344 of file GsfComponentMergingTests.cpp

References Acts::UnitConstants::e, merge_hashes::p, r1, r2, writeMapConfig::surface, and test_surface().

+ Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_perigee_surface  )

Definition at line 360 of file GsfComponentMergingTests.cpp.

View newest version in sPHENIX GitHub at line 360 of file GsfComponentMergingTests.cpp

References merge_hashes::p, writeMapConfig::surface, test_surface(), and physmon_track_finding_ttbar::z.

+ Here is the call graph for this function:

template<int D, typename subtract_t = std::minus<ActsVector<D>>>
auto boundCov ( const std::vector< ActsVector< D >> &  samples,
const ActsVector< D > &  mu,
const subtract_t &  sub = subtract_t{} 
) -> ActsSquareMatrix<D>

Definition at line 151 of file GsfComponentMergingTests.cpp.

View newest version in sPHENIX GitHub at line 151 of file GsfComponentMergingTests.cpp

Referenced by BOOST_AUTO_TEST_CASE().

+ Here is the caller graph for this function:

template<int D>
auto circularMean ( const std::vector< ActsVector< D >> &  samples) -> ActsVector<D>

Definition at line 128 of file GsfComponentMergingTests.cpp.

View newest version in sPHENIX GitHub at line 128 of file GsfComponentMergingTests.cpp

References i, mean(), physmon_simulation::s, ambiguity_solver_full_chain::x, and y.

Referenced by BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<int D>
auto mean ( const std::vector< ActsVector< D >> &  samples) -> ActsVector<D>

Definition at line 115 of file GsfComponentMergingTests.cpp.

View newest version in sPHENIX GitHub at line 115 of file GsfComponentMergingTests.cpp

References ambiguity_solver_full_chain::x.

Referenced by Acts::Python::addGenerators(), BOOST_AUTO_TEST_CASE(), calc_mxj(), Polygon::calculate_centroid(), Polyhedron::calculate_centroid(), cumulant_generating::calculate_dsdy(), ActsExamples::detail::NuclearInteractionParametrisation::calculateEigenspace(), ActsExamples::detail::NuclearInteractionParametrisation::calculateMeanAndCovariance(), TpcMon::calculateMedianAndStdDev(), CBfitter_jpsi_1state(), circularMean(), trento::Event::compute_reduced_thickness(), CrystallBall2(), DataAna(), DataAna2(), DNL_Correction(), Draw_BDiJetImbalance(), DrawCluster_AnaP(), DrawCluster_SingleE(), DrawEMCalTower_Resolution(), DrawPrototype2EMCalTower_Resolution(), DrawPrototype2EMCalTower_ResolutionRecalib(), DrawTowerSum_AnaP(), DrawTowerSum_SingleE(), EdepPercentSmall(), eicsmear_dvmp_plot(), extractShowerCalibFactor(), ActsExamples::TrackFindingFromPrototrackAlgorithm::finalize(), ActsExamples::TrackFindingAlgorithmExaTrkX::finalize(), CaloAna::fitHistogram(), fpeaks(), Acts::detail::gaussianMixtureCov(), ABlob::GetPHI(), GetResolution(), Jetscape::TrentoInitial::InitTask(), Load_SF(), look_purity(), main(), MakeFile(), Acts::SingleSeedVertexFinder< spacepoint_t >::makeRayFromTriplet(), meanFromFree(), Neutrals(), nfits(), NoiseSimulator(), Fatras::LandauDist::param_type::operator==(), Bias::Plot(), plot_resolution(), BbcMon::process_event(), PHG4TruthEventAction::ProcessShowers(), series(), PHG4ParticleGeneratorVectorMeson::set_vertex_size_parameters(), PHG4SimpleEventGenerator::set_vertex_size_parameters(), sipmPeaks(), sipmpeaks(), StableGauss(), TEST_CASE(), ThreeGraphs(), tileHelper::tilePattern(), Acts::detail::transformComponent(), and TripleFit().

BoundVector meanFromFree ( std::vector< DummyComponent< eBoundSize >>  cmps,
const Surface surface 
)

Definition at line 166 of file GsfComponentMergingTests.cpp.

View newest version in sPHENIX GitHub at line 166 of file GsfComponentMergingTests.cpp

References Acts::Surface::bounds(), closest(), root_event_diff_np::cmp(), Acts::Surface::Cone, Acts::Surface::Cylinder, Acts::eBoundLoc0, Acts::eFreeDir0, Acts::CylinderBounds::eR, Acts::Surface::intersect(), mean(), position, physmon_track_finding_ttbar::r, Acts::detail::transformBoundToFreeParameters(), Acts::detail::transformFreeToBoundParameters(), Acts::Surface::type(), Acts::SurfaceBounds::values(), ambiguity_solver_full_chain::x, and y.

Referenced by test_surface().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<int D>
auto sampleFromMultivariate ( const std::vector< DummyComponent< D >> &  cmps,
std::size_t  n_samples,
std::mt19937 &  gen 
)

Definition at line 89 of file GsfComponentMergingTests.cpp.

View newest version in sPHENIX GitHub at line 89 of file GsfComponentMergingTests.cpp

References root_event_diff_np::cmp(), gen(), and n.

Referenced by BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename angle_description_t >
void test_surface ( const Surface surface,
const angle_description_t &  desc,
const LocPosArray loc_pos,
double  expectedError 
)

Definition at line 217 of file GsfComponentMergingTests.cpp.

View newest version in sPHENIX GitHub at line 217 of file GsfComponentMergingTests.cpp

References KFPMath::a, DummyComponent< D >::boundCov, DummyComponent< D >::boundPars, CHECK_CLOSE_MATRIX, INTTVtxZ::dphi, Acts::eBoundLoc0, Acts::eBoundLoc1, Acts::eBoundPhi, Acts::eBoundTheta, Acts::detail::gaussianMixtureMeanCov(), meanFromFree(), ActsTests::PropagationDatasets::phi, proj(), ActsTests::PropagationDatasets::theta, DummyComponent< D >::weight, and Acts::detail::wrap_periodic().

Referenced by BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: