EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::VectorHelpers Namespace Reference

Namespaces

namespace  detail
 

Functions

template<typename Derived >
double phi (const Eigen::MatrixBase< Derived > &v) noexcept
 
template<typename T , std::enable_if_t< detail::has_phi_method< T >::value, int > = 0>
double phi (const T &v) noexcept
 
template<typename Derived >
double perp (const Eigen::MatrixBase< Derived > &v) noexcept
 
template<typename Derived >
double theta (const Eigen::MatrixBase< Derived > &v) noexcept
 
template<typename Derived >
double eta (const Eigen::MatrixBase< Derived > &v) noexcept
 
double cast (const Vector3D &position, BinningValue bval)
 
ActsMatrixD< 3, 3 > cross (const ActsMatrixD< 3, 3 > &m, const Vector3D &v)
 Calculates column-wise cross products of a matrix and a vector and stores the result column-wise in a matrix.
 
auto position (const Vector4D &pos4)
 Access the three-position components in a four-position vector.
 
auto position (const FreeVector &params)
 Access the three-position components in a free parameters vector.
 
template<typename vector3_t >
auto makeVector4 (const Eigen::MatrixBase< vector3_t > &vec3, typename vector3_t::Scalar w) -> Eigen::Matrix< typename vector3_t::Scalar, 4, 1 >
 Construct a four-vector from a three-vector and scalar fourth component.
 

Function Documentation

double Acts::VectorHelpers::cast ( const Vector3D &  position,
BinningValue  bval 
)
inline

Helper method to extract the binning value from a 3D vector.

For this method a 3D vector is required to guarantee all potential binning values.

Definition at line 154 of file Helpers.hpp.

View newest version in sPHENIX GitHub at line 154 of file Helpers.hpp

References Acts::binEta, Acts::binH, Acts::binMag, Acts::binPhi, Acts::binR, Acts::binRPhi, Acts::binX, Acts::binY, Acts::binZ, eta(), perp(), phi(), and theta().

Referenced by Acts::GeometryObject::binningPositionValue(), Acts::Extent::check(), and Acts::TGeoParser::select().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ActsMatrixD<3, 3> Acts::VectorHelpers::cross ( const ActsMatrixD< 3, 3 > &  m,
const Vector3D &  v 
)
inline

Calculates column-wise cross products of a matrix and a vector and stores the result column-wise in a matrix.

Parameters
[in]mMatrix that will be used for cross products
[in]vVector for cross products
Returns
Constructed matrix

Definition at line 186 of file Helpers.hpp.

View newest version in sPHENIX GitHub at line 186 of file Helpers.hpp

Referenced by CylindricalHough::addHits(), Acts::Test::BOOST_AUTO_TEST_CASE(), HelixHoughFuncs_v1::calculate_phi_range(), Acts::Frustum< value_t, DIM, SIDES >::draw(), kdfinder::Helix< T >::geometricSignedDistance(), PHSiliconTpcTrackMatching::getCrossingNumber(), PHHepMCGenHelper::HepMC2Lab_boost_rotation_translation(), Acts::LineSurface::initJacobianToGlobal(), Acts::DefaultExtension::k(), Acts::DenseEnvironmentExtension::k(), main(), Acts::Frustum< value_t, DIM, SIDES >::svg(), Acts::DefaultExtension::transportMatrix(), and Acts::DenseEnvironmentExtension::transportMatrix().

+ Here is the caller graph for this function:

template<typename Derived >
double Acts::VectorHelpers::eta ( const Eigen::MatrixBase< Derived > &  v)
noexcept

Calculate the pseudorapidity for a vector.

Template Parameters
DerivedEigen derived concrete type
Parameters
vAny vector like Eigen type, static or dynamic
Note
Will static assert that the number of rows of v is at least 3, or in case of dynamic size, will abort execution if that is not the case.
Returns
The pseudorapidity value

Definition at line 134 of file Helpers.hpp.

View newest version in sPHENIX GitHub at line 134 of file Helpers.hpp

References v.

Referenced by EicToyModel::acceptance(), AddFlowToParent(), Acts::Test::BOOST_AUTO_TEST_CASE(), BOOST_DATA_TEST_CASE(), cast(), PHTruthTrackSeeding::circleFitSeed(), PHActsSiliconSeeding::circleFitSeed(), EPhenixMomentum::computeMultipleScattering(), PHG4InnerHcalDetector::ConstructHcalSingleScintillators(), PHG4OuterHcalDetector::ConstructHcalSingleScintillators(), EicToyModel::DrawEtaLines(), EicToyModel::DrawFlatFieldLines(), QAG4SimulationCalorimeterSum::eval_trk_proj(), QAG4SimulationEicCalorimeterSum::eval_trk_proj(), ActsExamples::PrintParticles::execute(), ActsExamples::TrackSelector::execute(), ActsExamples::TruthSeedSelector::execute(), ActsExamples::ParticleSelector::execute(), ActsExamples::EffPlotTool::fill(), ActsExamples::DuplicationPlotTool::fill(), ActsExamples::TrackSummaryPlotTool::fill(), ActsExamples::FakeRatePlotTool::fill(), ActsExamples::ResPlotTool::fill(), eicpy.qaplots.TrackHists::fill(), JetEvaluator::fillOutputNtuples(), CaloEvaluator::fillOutputNtuples(), SvtxEvaluator::fillOutputNtuples(), flowAfterburner(), fullMaterial(), ActsExamples::PrimaryGeneratorAction::GeneratePrimaries(), PHG4Utils::get_eta(), PHG4InputFilter::get_eta(), RawTowerGeomv1::get_eta(), RawTowerGeomv4::get_eta(), RawTowerGeomv2::get_eta(), RawTowerZDCGeomv1::get_eta(), RawTowerGeomv3::get_eta(), PHG4Utils::get_etaphi(), TowerJetInput::get_input(), TruthJetInput::get_input(), Smear::ParticleMCS::GetEta(), hijfst_(), TowerBackgroundv1::identify(), EPhenixMomentum::Initialise(), RawTowerDeadMapLoader::InitRun(), CaloCalibEmc_Pi0::Loop(), PHActsTrackProjection::makeCaloSurfacePtrs(), momentumDistributions(), Acts::ObjectSorterT< Vector3D >::operator()(), ActsExamples::ParametricParticleGenerator::operator()(), Acts::DistanceSorterT< T >::operator()(), printHits(), beamBeamSystem::probabilityOfPhotonBreakup(), PHG4InputFilter::process_event(), PHG4ParticleGenerator::process_event(), PHG4ParticleGenerator_flat_pT::process_event(), PHG4ParticleGeneratorD0::process_event(), PHHepMCParticleSelectorDecayProductChain::process_event(), RawTowerZDCCalibration::process_event(), RawTowerCalibration::process_event(), RawTowerDigitizer::process_event(), RawTowerZDCDigitizer::process_event(), G4TowerNtuple::process_event(), PHG4SimpleEventGenerator::process_event(), PHG4ParticleGeneratorVectorMeson::process_event(), G4CellNtuple::process_event(), SubtractTowers::process_event(), SubtractTowersCS::process_event(), RetowerCEMC::process_event(), DetermineTowerBackground::process_event(), TPCDataStreamEmulator::process_event(), SamplingFractionReco::process_event(), PHGenFitTrackProjection::process_event(), LiteCaloEval::process_event(), RawTowerCombiner::process_event(), CaloAna::process_towers(), eventChannel::pseudoRapidity(), Gammaavectormeson::pseudoRapidity(), rad_length(), ActsExamples::Options::readParticleGunOptions(), scan_viewer(), CaloTriggerInfov1::set_best2_EMCal_4x4_eta(), CaloTriggerInfov1::set_best_EMCal_2x2_eta(), CaloTriggerInfov1::set_best_EMCal_4x4_eta(), CaloTriggerInfov1::set_best_FullCalo_0p2x0p2_eta(), CaloTriggerInfov1::set_best_FullCalo_0p4x0p4_eta(), CaloTriggerInfov1::set_best_FullCalo_0p6x0p6_eta(), CaloTriggerInfov1::set_best_FullCalo_0p8x0p8_eta(), CaloTriggerInfov1::set_best_FullCalo_1p0x1p0_eta(), PHG4Reco::set_rapidity_coverage(), PHSartreParticleTrigger::SetAbsEtaHigh(), PHPy8ParticleTrigger::SetAbsEtaHigh(), PHPy6ParticleTrigger::SetAbsEtaHigh(), PHSartreParticleTrigger::SetAbsEtaLow(), PHPy8ParticleTrigger::SetAbsEtaLow(), PHPy6ParticleTrigger::SetAbsEtaLow(), EtmEtaBoundary::SetEta(), PHSartreParticleTrigger::SetEtaHigh(), PHPy8ParticleTrigger::SetEtaHigh(), PHPy6ParticleTrigger::SetEtaHigh(), PHSartreParticleTrigger::SetEtaLow(), PHPy8ParticleTrigger::SetEtaLow(), PHPy6ParticleTrigger::SetEtaLow(), PHG4Utils::SetPseudoRapidityCoverage(), Smear::NumSigmaPid::Smear(), EPhenixMomentum::Smear(), Acts::BinningData::value(), ActsEvaluator::visitTrackStates(), ActsExamples::RootParticleWriter::writeT(), ActsExamples::RootTrajectoryWriter::writeT(), and ActsExamples::RootMaterialTrackWriter::writeT().

template<typename vector3_t >
auto Acts::VectorHelpers::makeVector4 ( const Eigen::MatrixBase< vector3_t > &  vec3,
typename vector3_t::Scalar  w 
) -> Eigen::Matrix<typename vector3_t::Scalar, 4, 1>
inline

Construct a four-vector from a three-vector and scalar fourth component.

Definition at line 207 of file Helpers.hpp.

View newest version in sPHENIX GitHub at line 207 of file Helpers.hpp

References Acts::ePos0, Acts::ePos1, Acts::ePos2, and Acts::eTime.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::Test::BOOST_DATA_TEST_CASE(), Acts::VolumeMaterialMapper::mapMaterialTrack(), Acts::SurfaceMaterialMapper::mapMaterialTrack(), and Acts::EventDataView3DTest::testMultiTrajectory().

+ Here is the caller graph for this function:

template<typename Derived >
double Acts::VectorHelpers::perp ( const Eigen::MatrixBase< Derived > &  v)
noexcept

Calculate radius in the transverse (xy) plane of a vector

Template Parameters
DerivedEigen derived concrete type
Parameters
vAny vector like Eigen type, static or dynamic
Note
Will static assert that the number of rows of v is at least 2, or in case of dynamic size, will abort execution if that is not the case.
Returns
The transverse radius value.

Definition at line 87 of file Helpers.hpp.

View newest version in sPHENIX GitHub at line 87 of file Helpers.hpp

References v.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::Test::BOOST_DATA_TEST_CASE(), Acts::Test::BOOST_FIXTURE_TEST_CASE(), cast(), Acts::LayerCreator::checkBinning(), PHG4InnerHcalDetector::ConstructScintillatorBox(), PHG4OuterHcalDetector::ConstructScintillatorBox(), PHG4InnerHcalDetector::ConstructSteelPlate(), PHG4OuterHcalDetector::ConstructSteelPlate(), Acts::detail::PointwiseMaterialInteraction::covarianceContributions(), genfit::MeasurementCreator::create(), Acts::SurfaceArrayCreator::createVariableAxis(), ActsExamples::TruthSeedSelector::execute(), ActsExamples::ParticleSelector::execute(), Acts::fieldMapperRZ(), ActsExamples::DuplicationPlotTool::fill(), ActsExamples::TrackSummaryPlotTool::fill(), ActsExamples::FakeRatePlotTool::fill(), ActsExamples::ResPlotTool::fill(), FastJetAlgoSub::get_jets(), FastJetAlgo::get_jets(), Acts::SolenoidBField::getField(), Acts::ConeSurface::globalToLocal(), Acts::CylinderSurface::globalToLocal(), Acts::LineSurface::globalToLocal(), Acts::globalToLocalFromBin(), Acts::CutoutCylinderVolumeBounds::inside(), Acts::ConeVolumeBounds::inside(), Acts::CylinderVolumeBounds::inside(), Acts::CylinderBounds::inside3D(), Acts::SurfaceArrayCreator::isSurfaceEquivalent(), Acts::ConeSurface::localCartesianToBoundLocalDerivative(), Acts::CylinderSurface::localCartesianToBoundLocalDerivative(), main(), Acts::materialMapperRZ(), Acts::ObjectSorterT< Vector3D >::operator()(), Acts::Test::PerpendicularMeasure::operator()(), Acts::Test::SurfaceObserver< Surface >::operator()(), Acts::DistanceSorterT< T >::operator()(), PHHepMCParticleSelectorDecayProductChain::process_event(), ActsExamples::RootBFieldWriter< bfield_t >::run(), Acts::solenoidFieldMapper(), Acts::SurfaceArrayCreator::surfaceArrayOnDisc(), Acts::BinningData::value(), ActsExamples::RootParticleWriter::writeT(), and ActsExamples::RootTrajectoryWriter::writeT().

+ Here is the caller graph for this function:

template<typename Derived >
double Acts::VectorHelpers::phi ( const Eigen::MatrixBase< Derived > &  v)
noexcept

Calculate phi (transverse plane angle) from compatible Eigen types

Template Parameters
DerivedEigen derived concrete type
Parameters
vAny vector like Eigen type, static or dynamic
Note
Will static assert that the number of rows of v is at least 2, or in case of dynamic size, will abort execution if that is not the case.
Returns
The value of the angle in the transverse plane.

Definition at line 51 of file Helpers.hpp.

View newest version in sPHENIX GitHub at line 51 of file Helpers.hpp

References v.

Referenced by ActsFatras::BOOST_AUTO_TEST_CASE(), Acts::Test::BOOST_AUTO_TEST_CASE(), cast(), Acts::detail::differenceOfClustersChecked(), Acts::EventDataView3D::drawCovarianceAngular(), ActsExamples::PrintParticles::execute(), ActsExamples::ParticleSmearing::execute(), ActsExamples::TruthSeedSelector::execute(), ActsExamples::ParticleSelector::execute(), ActsExamples::ResPlotTool::fill(), Acts::Frustum< value_t, DIM, SIDES >::Frustum(), Acts::globalToLocalFromBin(), Acts::EllipseBounds::inside(), Acts::CutoutCylinderVolumeBounds::inside(), Acts::ConeVolumeBounds::inside(), Acts::CylinderVolumeBounds::inside(), main(), Acts::ObjectSorterT< Vector3D >::operator()(), ActsFatras::BoundParametersSmearer< kParameters >::operator()(), Acts::DistanceSorterT< T >::operator()(), Acts::ConeSurface::pathCorrection(), Acts::AnnulusBounds::stripXYToModulePC(), Acts::Test::CylindricalTrackingGeometry::surfacesCylinder(), Acts::BinningData::value(), Acts::AnnulusBounds::vertices(), and ActsExamples::RootParticleWriter::writeT().

+ Here is the caller graph for this function:

template<typename T , std::enable_if_t< detail::has_phi_method< T >::value, int > = 0>
double Acts::VectorHelpers::phi ( const T v)
noexcept

Calculate phi (transverse plane angle) from anything implementing a method like phi() returing anything convertible to double.

Template Parameters
Tanything that has a phi method
Parameters
vAny type that implements a phi method
Returns
The phi value

Definition at line 76 of file Helpers.hpp.

View newest version in sPHENIX GitHub at line 76 of file Helpers.hpp

References v.

auto Acts::VectorHelpers::position ( const Vector4D &  pos4)
inline

Access the three-position components in a four-position vector.

Definition at line 196 of file Helpers.hpp.

View newest version in sPHENIX GitHub at line 196 of file Helpers.hpp

References Acts::ePos0.

Referenced by accessRandom(), accessStepWise(), Acts::BinUtility::binTriple(), Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::CartesianSegmentation::cell(), Acts::PlanarModuleStepper::cellSteps(), CMDistortionReco(), CMDistortionRecoCart(), CMDistortionRecoPhiR(), Acts::Test::consistencyCheck(), EICG4RPDetector::ConstructMe(), EICG4dRICHDetector::ConstructMe(), Acts::EventDataView3D::drawBoundTrackParameters(), CbmRichTestHits::Exec(), CbmRichTestSim::Exec(), erhic::LogReaderDjangoh::Extract(), FairTrackParP::FairTrackParP(), ActsEvaluator::fillProtoTrack(), PHActsInitialVertexFinder::findVertices(), Acts::FullBilloirVertexFitter< input_track_t, linearizer_t >::fit(), PHG4PrimaryGeneratorAction::GeneratePrimaries(), kdfinder::Helix< T >::geometricSignedDistance(), nlohmann::detail::lexer< BasicJsonType >::get(), nlohmann::detail::lexer< BasicJsonType >::get_position(), Acts::InterpolatedBFieldMapper< G >::getField(), Acts::InterpolatedBFieldMapper< G >::getFieldCell(), G4Pythia6Decayer::GetParticlePosition(), AnnularFieldSim::GetTotalDistortion(), Acts::PlaneSurface::globalToLocal(), Acts::ConeSurface::globalToLocal(), Acts::LineSurface::globalToLocal(), EPhenixMomentum::Initialise(), Acts::BinUtility::inside(), Acts::LineSurface::intersect(), Acts::ConeSurface::intersectionSolver(), Acts::DenseEnvironmentExtension::k(), Acts::HelicalTrackLinearizer< propagator_t, propagator_options_t >::linearizeTrack(), Acts::ConeSurface::localCartesianToBoundLocalDerivative(), Acts::CylinderSurface::localCartesianToBoundLocalDerivative(), Acts::LineSurface::localCartesianToBoundLocalDerivative(), Acts::CylinderSurface::localToGlobal(), LogLineParse(), PHActsTrkFitter::loopTracks(), genfit::EventDisplay::makeLines(), PHTpcResiduals::makeTrackParams(), MoveDescendantsToParent(), Acts::ConeSurface::normal(), Acts::CylinderSurface::normal(), Acts::BinnedArrayXD< T >::object(), Acts::MaterialCollector::operator()(), Smear::FormulaString::Parse(), Acts::ConeSurface::pathCorrection(), G4GDMLReadStructure::PhysvolRead(), Acts::Vertex< input_track_t >::position(), G4GDMLReadStructure::ReplicaRead(), Acts::EigenStepper< bfield_t, extensionlist_t, auctioneer_t >::resetState(), Acts::AtlasStepper< bfield_t >::resetState(), ActsExamples::RootBFieldWriter< bfield_t >::run(), nlohmann::detail::lexer< BasicJsonType >::scan(), Acts::AdaptiveMultiVertexFitter< input_track_t, linearizer_t >::setAllVertexCompatibilities(), NaiveTrackParameterization::SetMoCaPosition(), NaiveTrackParameterization::SetRecoPosition(), FairTrackParP::SetTrackPar(), PHHepMCGenHelper::smear(), PHG4ParticleGeneratorVectorMeson::smearvtx(), PHG4SimpleEventGenerator::smearvtx(), Acts::detail::transformBoundToFreeParameters(), Acts::detail::transformFreeToBoundParameters(), nlohmann::detail::lexer< BasicJsonType >::unget(), and PHActsVertexPropagator::updateSvtxTrack().

auto Acts::VectorHelpers::position ( const FreeVector &  params)
inline

Access the three-position components in a free parameters vector.

Definition at line 201 of file Helpers.hpp.

View newest version in sPHENIX GitHub at line 201 of file Helpers.hpp

References Acts::eFreePos0.

template<typename Derived >
double Acts::VectorHelpers::theta ( const Eigen::MatrixBase< Derived > &  v)
noexcept

Calculate the theta angle (longitudinal w.r.t. z axis) of a vector

Template Parameters
DerivedEigen derived concrete type
Parameters
vAny vector like Eigen type, static or dynamic
Note
Will static assert that the number of rows of v is at least 3, or in case of dynamic size, will abort execution if that is not the case.
Returns
The theta value

Definition at line 111 of file Helpers.hpp.

View newest version in sPHENIX GitHub at line 111 of file Helpers.hpp

References v.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), ActsFatras::BOOST_AUTO_TEST_CASE(), cast(), Acts::detail::differenceOfClustersChecked(), Acts::EventDataView3D::drawCovarianceAngular(), ActsExamples::ParticleSmearing::execute(), ActsExamples::ResPlotTool::fill(), and ActsFatras::BoundParametersSmearer< kParameters >::operator()().

+ Here is the caller graph for this function: