Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BFieldAccessExample.cpp File Reference
#include "Acts/Definitions/Units.hpp"
#include "Acts/MagneticField/MagneticFieldProvider.hpp"
#include "ActsExamples/Framework/Sequencer.hpp"
#include "ActsExamples/Options/CommonOptions.hpp"
#include "ActsExamples/Options/MagneticFieldOptions.hpp"
#include "ActsExamples/Utilities/Options.hpp"
#include <random>
#include <string>
#include <boost/program_options.hpp>
#include <boost/progress.hpp>
+ Include dependency graph for BFieldAccessExample.cpp:

Go to the source code of this file.

Typedefs

using progress_display = boost::progress_display
 
using UniformDist = std::uniform_real_distribution< double >
 
using RandomEngine = std::mt19937
 

Functions

void accessStepWise (const Acts::MagneticFieldProvider &bField, const Acts::MagneticFieldContext &bFieldContext, size_t events, size_t theta_steps, double theta_0, double theta_step, size_t phi_steps, double phi_0, double phi_step, size_t access_steps, double access_step)
 
void accessRandom (const Acts::MagneticFieldProvider &bField, const Acts::MagneticFieldContext &bFieldContext, size_t totalSteps, double radius)
 
int main (int argc, char *argv[])
 main executable
 

Typedef Documentation

using progress_display = boost::progress_display

Definition at line 24 of file BFieldAccessExample.cpp.

View newest version in sPHENIX GitHub at line 24 of file BFieldAccessExample.cpp

using RandomEngine = std::mt19937

Definition at line 41 of file BFieldAccessExample.cpp.

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

using UniformDist = std::uniform_real_distribution<double>

The main executable

Creates an InterpolatedBFieldMap from a txt or csv file It then tests random versus stepwise access with the direct getField access and the cell.getField access with cell caching

Definition at line 40 of file BFieldAccessExample.cpp.

View newest version in sPHENIX GitHub at line 40 of file BFieldAccessExample.cpp

Function Documentation

void accessRandom ( const Acts::MagneticFieldProvider bField,
const Acts::MagneticFieldContext bFieldContext,
size_t  totalSteps,
double  radius 
)

Definition at line 83 of file BFieldAccessExample.cpp.

View newest version in sPHENIX GitHub at line 83 of file BFieldAccessExample.cpp

References Acts::IntegrationTest::bCache, position, and conftest::rng().

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void accessStepWise ( const Acts::MagneticFieldProvider bField,
const Acts::MagneticFieldContext bFieldContext,
size_t  events,
size_t  theta_steps,
double  theta_0,
double  theta_step,
size_t  phi_steps,
double  phi_0,
double  phi_step,
size_t  access_steps,
double  access_step 
)

Definition at line 43 of file BFieldAccessExample.cpp.

View newest version in sPHENIX GitHub at line 43 of file BFieldAccessExample.cpp

References Acts::IntegrationTest::bCache, physmon_vertexing::events, ActsTests::PropagationDatasets::phi, position, and ActsTests::PropagationDatasets::theta.

Referenced by main().

+ Here is the caller graph for this function:

int main ( int  argc,
char *  argv[] 
)

main executable

Parameters
argcThe argument count
argvThe argument list

Definition at line 113 of file BFieldAccessExample.cpp.

View newest version in sPHENIX GitHub at line 113 of file BFieldAccessExample.cpp

References accessRandom(), accessStepWise(), ActsExamples::Options::addMagneticFieldOptions(), ActsExamples::Options::addSequencerOptions(), Acts::IntegrationTest::bField, ActsExamples::Sequencer::Config::events, Acts::Test::magFieldContext, ActsExamples::Options::makeDefaultOptions(), Acts::UnitConstants::mm, nEvents, ActsExamples::Options::parse(), ActsExamples::Options::readMagneticField(), ActsExamples::Options::readSequencerConfig(), and Acts::Experimental::detail::BlueprintHelper::sort().

+ Here is the call graph for this function: