Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ActsExamples::CsvBFieldWriter::Config< Coord, Grid > Struct Template Reference

Configuration type for the magnetic field writer. More...

#include <acts/blob/sPHENIX/Examples/Io/Csv/include/ActsExamples/Io/Csv/CsvBFieldWriter.hpp>

+ Collaboration diagram for ActsExamples::CsvBFieldWriter::Config< Coord, Grid >:

Public Types

template<typename T >
using Functor = std::conditional_t< Grid, std::optional< T >, T >
 

Public Attributes

std::string fileName = "bfield.csv"
 Output file to write the magnetic field to.
 
std::array< std::array
< Functor< double >
, 2 >, NDims
range {}
 The range over which to dump the vector field.
 
std::array< Functor
< std::size_t >, NDims
bins {}
 Number of bins in the output vector field.
 
std::shared_ptr
< std::add_const_t
< std::conditional_t< Grid,
Acts::InterpolatedMagneticField,
Acts::MagneticFieldProvider > > > 
bField
 

Static Public Attributes

static constexpr std::size_t NDims = Coord == CoordinateType::RZ ? 2 : 3
 Dimensionality of vectors.
 

Detailed Description

template<CoordinateType Coord, bool Grid>
struct ActsExamples::CsvBFieldWriter::Config< Coord, Grid >

Configuration type for the magnetic field writer.

Template Parameters
CoordSets the coordinate system to use: either Cartesian or cylindrical.
GridIf true, assume that the magnetic field is grid-based and that it has a built-in bin count and size. Otherwise, assume it is analytical.

Definition at line 49 of file CsvBFieldWriter.hpp.

View newest version in sPHENIX GitHub at line 49 of file CsvBFieldWriter.hpp

Member Typedef Documentation

template<CoordinateType Coord, bool Grid>
template<typename T >
using ActsExamples::CsvBFieldWriter::Config< Coord, Grid >::Functor = std::conditional_t<Grid, std::optional<T>, T>

Helper type constructor that makes values optional in grid-based environments. The reason for this is that grid-based fields have built-in bins and sizes, and as such it is not strictly necessary for the user to supply them. For gridless fields this does not work, and the data must become mandatory.

Definition at line 56 of file CsvBFieldWriter.hpp.

View newest version in sPHENIX GitHub at line 56 of file CsvBFieldWriter.hpp

Member Data Documentation

template<CoordinateType Coord, bool Grid>
std::shared_ptr<std::add_const_t<std::conditional_t< Grid, Acts::InterpolatedMagneticField, Acts::MagneticFieldProvider> > > ActsExamples::CsvBFieldWriter::Config< Coord, Grid >::bField

Definition at line 87 of file CsvBFieldWriter.hpp.

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

Referenced by ActsExamples::CsvBFieldWriter::run().

template<CoordinateType Coord, bool Grid>
std::array<Functor<std::size_t>, NDims> ActsExamples::CsvBFieldWriter::Config< Coord, Grid >::bins {}

Number of bins in the output vector field.

The same logic as above holds for the ranges, use the user-supplied value if available, otherwise use the value from the grid.

Definition at line 78 of file CsvBFieldWriter.hpp.

View newest version in sPHENIX GitHub at line 78 of file CsvBFieldWriter.hpp

Referenced by ActsExamples::CsvBFieldWriter::run().

template<CoordinateType Coord, bool Grid>
std::string ActsExamples::CsvBFieldWriter::Config< Coord, Grid >::fileName = "bfield.csv"

Output file to write the magnetic field to.

Definition at line 65 of file CsvBFieldWriter.hpp.

View newest version in sPHENIX GitHub at line 65 of file CsvBFieldWriter.hpp

Referenced by ActsExamples::CsvBFieldWriter::run().

template<CoordinateType Coord, bool Grid>
constexpr std::size_t ActsExamples::CsvBFieldWriter::Config< Coord, Grid >::NDims = Coord == CoordinateType::RZ ? 2 : 3
static

Dimensionality of vectors.

Set the number of scalars in our coordinates to 3 if we have 3D Cartesian coordinates, or 2 for cylindrical.

Definition at line 62 of file CsvBFieldWriter.hpp.

View newest version in sPHENIX GitHub at line 62 of file CsvBFieldWriter.hpp

template<CoordinateType Coord, bool Grid>
std::array<std::array<Functor<double>, 2>, NDims> ActsExamples::CsvBFieldWriter::Config< Coord, Grid >::range {}

The range over which to dump the vector field.

For each dimension, contains two optional values: the minimum and maximum in that dimension. If any value is non-extant, the gridded field's internal contents are used as a default.

Definition at line 72 of file CsvBFieldWriter.hpp.

View newest version in sPHENIX GitHub at line 72 of file CsvBFieldWriter.hpp

Referenced by ActsExamples::CsvBFieldWriter::run().


The documentation for this struct was generated from the following file: