Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExaTrkXEdgeBuildingTest.cpp File Reference
#include <boost/test/unit_test.hpp>
#include "Acts/Plugins/ExaTrkX/detail/CantorEdge.hpp"
#include "Acts/Plugins/ExaTrkX/detail/TensorVectorConversion.hpp"
#include "Acts/Plugins/ExaTrkX/detail/buildEdges.hpp"
#include <cassert>
#include <iostream>
#include <Eigen/Core>
#include <torch/torch.h>
+ Include dependency graph for ExaTrkXEdgeBuildingTest.cpp:

Go to the source code of this file.

Macros

#define PRINT   0
 

Typedefs

using CantorPair = Acts::detail::CantorEdge< int >
 

Functions

float distance (const at::Tensor &a, const at::Tensor &b)
 
template<typename edge_builder_t >
void test_random_graph (int emb_dim, int n_nodes, float r, int knn, const edge_builder_t &edgeBuilder)
 
 BOOST_AUTO_TEST_CASE (test_cantor_pair_functions)
 
 BOOST_AUTO_TEST_CASE (test_cantor_pair_sorted)
 
 BOOST_AUTO_TEST_CASE (test_random_graph_edge_building_cuda,*boost::unit_test::precondition([](auto){return torch::cuda::is_available();}))
 
 BOOST_AUTO_TEST_CASE (test_random_graph_edge_building_kdtree)
 
 BOOST_AUTO_TEST_CASE (test_self_loop_removal)
 
 BOOST_AUTO_TEST_CASE (test_duplicate_removal)
 
 BOOST_AUTO_TEST_CASE (test_random_flip)
 

Variables

const int emb_dim = 3
 
const int n_nodes = 20
 
const float r = 1.5
 
const int knn = 50
 
const int seed = 42
 

Macro Definition Documentation

#define PRINT   0

Definition at line 23 of file ExaTrkXEdgeBuildingTest.cpp.

View newest version in sPHENIX GitHub at line 23 of file ExaTrkXEdgeBuildingTest.cpp

Typedef Documentation

Definition at line 21 of file ExaTrkXEdgeBuildingTest.cpp.

View newest version in sPHENIX GitHub at line 21 of file ExaTrkXEdgeBuildingTest.cpp

Function Documentation

BOOST_AUTO_TEST_CASE ( test_cantor_pair_functions  )

Definition at line 111 of file ExaTrkXEdgeBuildingTest.cpp.

View newest version in sPHENIX GitHub at line 111 of file ExaTrkXEdgeBuildingTest.cpp

References KFPMath::a, and KFPMath::b.

BOOST_AUTO_TEST_CASE ( test_cantor_pair_sorted  )

Definition at line 120 of file ExaTrkXEdgeBuildingTest.cpp.

View newest version in sPHENIX GitHub at line 120 of file ExaTrkXEdgeBuildingTest.cpp

References KFPMath::a, KFPMath::b, c2, and Acts::detail::CantorEdge< T >::value().

+ Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_random_graph_edge_building_cuda  ,
*boost::unit_test::  precondition[](auto){return torch::cuda::is_available();} 
)

Definition at line 134 of file ExaTrkXEdgeBuildingTest.cpp.

View newest version in sPHENIX GitHub at line 134 of file ExaTrkXEdgeBuildingTest.cpp

BOOST_AUTO_TEST_CASE ( test_random_graph_edge_building_kdtree  )

Definition at line 148 of file ExaTrkXEdgeBuildingTest.cpp.

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

References Acts::detail::buildEdgesKDTree(), k, and test_random_graph().

+ Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_self_loop_removal  )

Definition at line 159 of file ExaTrkXEdgeBuildingTest.cpp.

View newest version in sPHENIX GitHub at line 159 of file ExaTrkXEdgeBuildingTest.cpp

References edges, parse_cmake_options::opts, Acts::detail::postprocessEdgeTensor(), and check_smearing_config::ref.

+ Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_duplicate_removal  )

Definition at line 194 of file ExaTrkXEdgeBuildingTest.cpp.

View newest version in sPHENIX GitHub at line 194 of file ExaTrkXEdgeBuildingTest.cpp

References parse_cmake_options::opts, Acts::detail::postprocessEdgeTensor(), and check_smearing_config::ref.

+ Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_random_flip  )

Definition at line 231 of file ExaTrkXEdgeBuildingTest.cpp.

View newest version in sPHENIX GitHub at line 231 of file ExaTrkXEdgeBuildingTest.cpp

References parse_cmake_options::opts, and Acts::detail::postprocessEdgeTensor().

+ Here is the call graph for this function:

float distance ( const at::Tensor &  a,
const at::Tensor &  b 
)

Definition at line 25 of file ExaTrkXEdgeBuildingTest.cpp.

View newest version in sPHENIX GitHub at line 25 of file ExaTrkXEdgeBuildingTest.cpp

References assert, and sum().

Referenced by addDiff(), Acts::TrackSelector::EtaBinnedConfig::binIndex(), BOOST_AUTO_TEST_CASE(), Acts::Test::BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE_TEMPLATE(), KFParticle_eventReconstruction::buildChain(), DecayFinder::checkIfCorrectGeant4Particle(), DecayFinder::checkIfCorrectHepMCParticle(), MvtxClusterizer::ClusterMvtx(), MvtxClusterizer::ClusterMvtxRaw(), mvtx::GBTLink::collectROFCableData(), Acts::AdaptiveMultiVertexFitter< input_track_t, linearizer_t >::collectTrackToVertexCompatibilities(), Acts::Test::float_compare_internal::compare(), Acts::Layer::compatibleSurfaces(), nanoflann::KDTreeSingleIndexAdaptor< Distance, DatasetAdaptor, DIM, IndexType >::computeInitialDistances(), Acts::Svg::SurfaceArrayConverter::convert(), HybridHadronization::convert_color_tags_to_int_type(), Acts::createProtoMaterial(), Acts::SeedFinder< external_spacepoint_t, platform_t >::createSeedsForGroup(), Acts::CombinatorialKalmanFilter< propagator_t, traj_t >::Actor< source_link_accessor_t, parameters_t >::createSourceLinkTrackStates(), Acts::BoundaryCheck::distance(), Acts::estimateTrackParamsFromSeed(), QAG4SimulationIntt::evaluate_clusters(), QAG4SimulationMvtx::evaluate_clusters(), QAG4SimulationMicromegas::evaluate_clusters(), QAG4SimulationTpc::evaluate_clusters(), TrackEvaluation::evaluate_event(), ActsExamples::TruthVertexFinder::execute(), ActsExamples::ParticleSelector::execute(), Acts::GeometryHierarchyMap< value_t >::fill(), fillEvent(), ActsExamples::TrackFindingFromPrototrackAlgorithm::finalize(), TrackSeedContainer_v1::find(), Acts::GeometryHierarchyMap< value_t >::find(), Acts::SingleSeedVertexFinder< spacepoint_t >::findClosestPointFromPlanes(), Acts::SingleSeedVertexFinder< spacepoint_t >::findClosestPointFromRays(), Acts::Experimental::Gx2Fitter< propagator_t, traj_t >::fit(), Acts::KalmanFitter< propagator_t, traj_t >::fit(), Acts::GaussianSumFitter< propagator_t, bethe_heitler_approx_t, traj_t >::fit_impl(), Fun4All_FillChargesMap_300evts_MDC2(), Fun4All_FillDCMap(), SetupDualRICHAnalyzer::get_emission_momentum(), Acts::SurfaceArrayCreator::ProtoAxis::getBin(), Acts::detail::Axis< AxisType::Variable, bdt >::getBin(), PHField2D::GetFieldCyl(), PHField3DCylindrical::GetFieldCyl(), TrigFTF_GNN_TrackingFilter< external_spacepoint_t >::getLayerType(), PHG4TruthInfoContainer::GetNumPrimaryVertexParticles(), Acts::TrackingVolume::glueTrackingVolume(), Acts::TrackingVolume::glueTrackingVolumes(), ActsExamples::HoughTransformSeeder::HoughTransformSeeder(), PHG4TpcElectronDrift::InitRun(), PhDi::Integral(), Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::KDTreeNode(), PseudoJet::kt_distance(), ActsExamples::SeedingFTFAlgorithm::LayerNumbering(), makeGeom(), ActsExamples::makeProtoVertices(), Acts::SpacePointBuilder< spacepoint_t >::makeSourceLinkPairs(), testing::internal::BeginEndDistanceIsMatcher< DistanceMatcher >::Impl< Container >::MatchAndExplain(), EMMaximization::Move(), ResidualOutlierFinder::operator()(), TestOutlierFinder::operator()(), ActsExamples::Pythia8Generator::operator()(), Acts::PathLimitReached::operator()(), Acts::detail::HighestValidAuctioneer::operator()(), Acts::Test::SurfaceObserver< Surface >::operator()(), Acts::SurfaceReached::operator()(), Acts::DirectNavigator::postStep(), Acts::DirectNavigator::preStep(), psTOFTimezeroEval::printOutputInfo(), SvtxEvaluatorHaiwang::printOutputInfo(), SvtxEvaluator::printOutputInfo(), TpcSimpleClusterizer::process_event(), TpcClusterizer::process_event(), PHTpcCentralMembraneMatcher::process_event(), HybridHadronization::recomb(), Acts::Geant4ShapeConverter::rectangleBounds(), Acts::detail::GsfActor< bethe_heitler_approx_t, traj_t >::removeLowWeightComponents(), ThermalPartonSampler::sample_2p1d(), ThermalPartonSampler::sample_3p1d(), ActsFatras::NuclearInteraction::sampleContinuousValues(), ActsFatras::NuclearInteraction::sampleDiscreteValues(), DecayFinder::searchHepMCRecord(), Acts::BinningData::searchInVectorWithBoundary(), nanoflann::KDTreeSingleIndexAdaptor< Distance, DatasetAdaptor, DIM, IndexType >::searchLevel(), Acts::MeasurementSelector::select(), HybridHadronization::set_spacetime_for_pythia_hadrons(), ActsExamples::Range< Iterator >::size(), Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::size(), ActsExamples::SpacePointMaker::SpacePointMaker(), TEST_CASE(), test_random_graph(), Acts::Test::MultiTrajectoryTestsCommon< factory_t >::testBuild(), Acts::DetectorVolumeJsonConverter::toJson(), Acts::CylinderVolumeBuilder::trackingVolume(), and Acts::Geant4ShapeConverter::trapezoidBounds().

+ Here is the call graph for this function:

template<typename edge_builder_t >
void test_random_graph ( int  emb_dim,
int  n_nodes,
float  r,
int  knn,
const edge_builder_t &  edgeBuilder 
)

Definition at line 41 of file ExaTrkXEdgeBuildingTest.cpp.

View newest version in sPHENIX GitHub at line 41 of file ExaTrkXEdgeBuildingTest.cpp

References KFPMath::a, KFPMath::b, distance(), i, j, Acts::UnitConstants::min, n_nodes, and Acts::Experimental::detail::BlueprintHelper::sort().

Referenced by BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

const int emb_dim = 3

Definition at line 128 of file ExaTrkXEdgeBuildingTest.cpp.

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

const int knn = 50

Definition at line 131 of file ExaTrkXEdgeBuildingTest.cpp.

View newest version in sPHENIX GitHub at line 131 of file ExaTrkXEdgeBuildingTest.cpp

const int n_nodes = 20

Definition at line 129 of file ExaTrkXEdgeBuildingTest.cpp.

View newest version in sPHENIX GitHub at line 129 of file ExaTrkXEdgeBuildingTest.cpp

Referenced by test_random_graph().

const int seed = 42

Definition at line 132 of file ExaTrkXEdgeBuildingTest.cpp.

View newest version in sPHENIX GitHub at line 132 of file ExaTrkXEdgeBuildingTest.cpp

Referenced by _embed_only(), Acts::Python::addDetector(), Acts::Test::BOOST_AUTO_TEST_CASE(), BOOST_DATA_TEST_CASE(), trento::Collider::Collider(), compare_observables(), Cone_Plots(), CosmicSpray::CosmicSpray(), Acts::SeedFinderFTF< external_spacepoint_t >::createSeeds(), event_topology_reco(), ActsExamples::TruthSeedingAlgorithm::execute(), ActsExamples::PrototracksToParameters::execute(), ActsExamples::TrackParamsEstimationAlgorithm::execute(), PHActsKDTreeSeeding::fillTrackSeedContainer(), PHCosmicsTrkFitter::fillVectors(), TrackSeedContainer_v1::find(), PHActsGSF::fitTrack(), PHCosmicsTrkFitter::fitTrack(), PHActsTrkFitter::fitTrack(), PHCASeeding::FollowBiLinks(), Fun4All_G4_EICDetector_LQ(), Fun4All_G4_EICDetector_LQ_analysis(), Fun4AllDstPileupInputManager::Fun4AllDstPileupInputManager(), Fun4AllHepMCPileupInputManager::Fun4AllHepMCPileupInputManager(), Fun4AllSingleDstPileupInputManager::Fun4AllSingleDstPileupInputManager(), QAG4SimulationDistortions::get_cluster_keys(), TrackAnalysisUtils::get_cluster_keys(), PdbParameterMap::get_hash(), PHParameters::get_hash(), SColdQcdCorrelatorAnalysis::SCorrelatorUtilities::GetNumClust(), SColdQcdCorrelatorAnalysis::SCorrelatorJetTree::GetNumClust(), SColdQcdCorrelatorAnalysis::SCorrelatorUtilities::GetNumLayer(), SColdQcdCorrelatorAnalysis::SCorrelatorJetTree::GetNumLayer(), SColdQcdCorrelatorAnalysis::SCorrelatorUtilities::GetTrackSeed(), ReactionPlaneAfterburner::Init(), FermimotionAfterburner::Init(), sHEPGen::Init(), PHPythia8::Init(), CaloWaveformSim::Init(), MbdVertexFastSimReco::InitRun(), GlobalVertexFastSimReco::InitRun(), PHRandomSeed::InitSeed(), PythiaGun::InitTask(), epemGun::InitTask(), STrackCutStudy::InitTuples(), JetProbeMaker::JetProbeMaker(), likelihood(), likelihood_topology(), PHCosmicsTrkFitter::loopTracks(), PHActsTrkFitter::loopTracks(), MachineLearning_CSV(), main(), Acts::Test::makeRandomCovariance(), PHActsSiliconSeeding::makeSvtxTracks(), TrackContainerCombiner::mergeSeeds(), TrackSeedContainer_v1::operator=(), PHG4InttDigitizer::PHG4InttDigitizer(), PHG4MicromegasDigitizer::PHG4MicromegasDigitizer(), PHG4MicromegasHitReco::PHG4MicromegasHitReco(), PHG4MvtxDigitizer::PHG4MvtxDigitizer(), PHG4TpcDigitizer::PHG4TpcDigitizer(), PHG4ZDCSteppingAction::PHG4ZDCSteppingAction(), PHHepMCGenHelper::PHHepMCGenHelper(), PHTruthSiliconAssociation::PHTruthSiliconAssociation(), PHTruthTrackSeeding::PHTruthTrackSeeding(), PHTruthTrackSeeding::Process(), PHCosmicSiliconPropagator::process_event(), PHSiliconSeedMerger::process_event(), TrackSeedTrackMapConverter::process_event(), FilterEvents::process_event(), FilterEventsUpsilon::process_event(), PHCosmicTrackMerger::process_event(), PHTruthSiliconAssociation::process_event(), PHSiliconTpcTrackMatching::process_event(), PHMicromegasTpcTrackMatching::process_event(), PHActsGSF::process_event(), PHTpcDeltaZCorrection::process_tracks(), PHCASeeding::publishSeeds(), PHSimpleKFProp::publishSeeds(), testing::internal::Random::Reseed(), TrackSeedContainer_v1::Reset(), runSeeding(), PHG4TpcElectronDrift::set_seed(), RawClusterBuilderTopo::set_significance(), SvtxTrack_v4::set_silicon_seed(), SvtxTrack_v4::set_tpc_seed(), RandomConeAna::set_user_seed(), EMRandom::SetSeed(), ActsExamples::setupGeant4Simulation(), ActsExamples::setupMaterialRecording(), SigmaTimingNtuple::SigmaTimingNtuple(), TEST_CASE(), testing::gmock_matchers_test::TEST_P(), TrackSeedContainer_v1::TrackSeedContainer_v1(), and ActsExamples::SeedingPerformanceWriter::writeT().