ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BFieldAccessExample.cpp File Reference
#include <boost/program_options.hpp>
#include <boost/progress.hpp>
#include <random>
#include <string>
#include "ACTFW/Framework/Sequencer.hpp"
#include "ACTFW/Options/CommonOptions.hpp"
#include "ACTFW/Plugins/BField/BFieldOptions.hpp"
#include "ACTFW/Utilities/Options.hpp"
#include "Acts/MagneticField/ConstantBField.hpp"
#include "Acts/MagneticField/InterpolatedBFieldMap.hpp"
#include "Acts/MagneticField/MagneticFieldContext.hpp"
#include "Acts/Utilities/Helpers.hpp"
#include "Acts/Utilities/Units.hpp"
+ Include dependency graph for BFieldAccessExample.cpp:

Go to the source code of this file.

Typedefs

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

Functions

template<typename field_t , typename field_context_t >
void accessStepWise (field_t &bField, field_context_t &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)
 
template<typename field_t , typename field_context_t >
void accessRandom (field_t &bField, field_context_t &bFieldContext, size_t totalSteps, double radius)
 
int main (int argc, char *argv[])
 main executable
 

Typedef Documentation

using RandomEngine = std::mt19937

Definition at line 34 of file BFieldAccessExample.cpp.

View newest version in sPHENIX GitHub at line 34 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 33 of file BFieldAccessExample.cpp.

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

Function Documentation

template<typename field_t , typename field_context_t >
void accessRandom ( field_t &  bField,
field_context_t &  bFieldContext,
size_t  totalSteps,
double  radius 
)

Definition at line 84 of file BFieldAccessExample.cpp.

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

References position.

Referenced by main().

+ Here is the caller graph for this function:

template<typename field_t , typename field_context_t >
void accessStepWise ( field_t &  bField,
field_context_t &  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 37 of file BFieldAccessExample.cpp.

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

References dir, phi, and theta().

Referenced by main().

+ Here is the call graph for this function:

+ 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 120 of file BFieldAccessExample.cpp.

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

References Acts::units::_mm, kdfinder::abs(), accessRandom(), accessStepWise(), FW::Options::addBFieldOptions(), FW::Options::addSequencerOptions(), Acts::IntegrationTest::bField, incremental_prev_tag::desc, FW::Sequencer::Config::events, M_PI, Acts::Test::magFieldContext, FW::Options::makeDefaultOptions(), nEvents, FW::Options::parse(), FW::Options::readBField(), and FW::Options::readSequencerConfig().

+ Here is the call graph for this function: