ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FW::BField::txt Namespace Reference

Functions

Acts::InterpolatedBFieldMapper
< Acts::detail::Grid
< Acts::Vector2D,
Acts::detail::EquidistantAxis,
Acts::detail::EquidistantAxis > > 
fieldMapperRZ (std::function< size_t(std::array< size_t, 2 > binsRZ, std::array< size_t, 2 > nBinsRZ)> localToGlobalBin, std::string fieldMapFile="", double lengthUnit=Acts::units::_mm, double BFieldUnit=Acts::units::_T, size_t nPoints=1000, bool firstOctant=false)
 
Acts::InterpolatedBFieldMapper
< Acts::detail::Grid
< Acts::Vector3D,
Acts::detail::EquidistantAxis,
Acts::detail::EquidistantAxis,
Acts::detail::EquidistantAxis > > 
fieldMapperXYZ (std::function< size_t(std::array< size_t, 3 > binsXYZ, std::array< size_t, 3 > nBinsXYZ)> localToGlobalBin, std::string fieldMapFile="", double lengthUnit=Acts::units::_mm, double BFieldUnit=Acts::units::_T, size_t nPoints=1000, bool firstOctant=false)
 

Function Documentation

Acts::InterpolatedBFieldMapper< Acts::detail::Grid< Acts::Vector2D, Acts::detail::EquidistantAxis, Acts::detail::EquidistantAxis > > FW::BField::txt::fieldMapperRZ ( std::function< size_t(std::array< size_t, 2 > binsRZ, std::array< size_t, 2 > nBinsRZ)>  localToGlobalBin,
std::string  fieldMapFile = "",
double  lengthUnit = Acts::units::_mm,
double  BFieldUnit = Acts::units::_T,
size_t  nPoints = 1000,
bool  firstOctant = false 
)

Method to setup the FieldMapper

Parameters
localToGlobalBinFunction mapping the local bins of r,z to the global bin of the map magnetic field value e.g.: we have small grid with the values: r={2,3}, z ={4,5}, the corresponding indices are i(r) and j(z), the globalIndex is M and the field map is:

|| r | i || z | j || |B(r,z)| || M ||

|| 2 | 0 || 4 | 0 || 2.323 || 0 || || 2 | 0 || 5 | 1 || 2.334 || 1 || || 3 | 1 || 4 | 0 || 2.325 || 2 || || 3 | 1 || 5 | 1 || 2.331 || 3 ||

In this case the function would look like:
[](std::array<size_t, 2> binsRZ, std::array<size_t, 2> nBinsRZ) {
return (binsRZ.at(0) * nBinsRZ.at(1) + binsRZ.at(1));
}
Parameters
[in]fieldMapFilePath to file containing field map in txt format
[in]lengthUnitThe unit of the grid points
[in]BFieldUnitThe unit of the magnetic field
[in]nPointsExtimate of number of grid points in field map needed for allocation
Note
This information is only used as a hint for the required size of the internal vectors. A correct value is not needed, but will help to speed up the field map initialization process.
Parameters
[in]firstOctantFlag if set to true indicating that only the first quadrant of the grid points and the BField values has been given and that the BFieldMap should be created symmetrically for all quadrants. e.g. we have the grid values r={0,1} with BFieldValues={2,3} on the r axis. If the flag is set to true the r-axis grid values will be set to {-1,0,1} and the BFieldValues will be set to {3,2,3}.

[1] Read in field map file

[2] use helper function in core

Definition at line 23 of file BFieldUtils.cpp.

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

References Acts::IntegrationTest::bField, Acts::fieldMapperRZ(), in, r, tmp, and z.

Referenced by FW::Options::readBField().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Acts::InterpolatedBFieldMapper< Acts::detail::Grid< Acts::Vector3D, Acts::detail::EquidistantAxis, Acts::detail::EquidistantAxis, Acts::detail::EquidistantAxis > > FW::BField::txt::fieldMapperXYZ ( std::function< size_t(std::array< size_t, 3 > binsXYZ, std::array< size_t, 3 > nBinsXYZ)>  localToGlobalBin,
std::string  fieldMapFile = "",
double  lengthUnit = Acts::units::_mm,
double  BFieldUnit = Acts::units::_T,
size_t  nPoints = 1000,
bool  firstOctant = false 
)

Method to setup the FieldMapper

Parameters
localToGlobalBinFunction mapping the local bins of x,y,z to the global bin of the map magnetic field value e.g.: we have small grid with the values: x={2,3}, y={3,4}, z ={4,5}, the corresponding indices are i(x), j(y) and z(k), the globalIndex is M and the field map is:

|| x | i || y | j || z | k || |B(x,y,z)| || M ||

|| 2 | 0 || 3 | 0 || 4 | 0 || 2.323 || 0 || || 2 | 0 || 3 | 0 || 5 | 1 || 2.334 || 1 || || 2 | 0 || 4 | 1 || 4 | 0 || 2.325 || 2 || || 2 | 0 || 4 | 1 || 5 | 1 || 2.331 || 3 || || 3 | 1 || 3 | 0 || 4 | 0 || 2.323 || 4 || || 3 | 1 || 3 | 0 || 5 | 1 || 2.334 || 5 || || 3 | 1 || 4 | 1 || 4 | 0 || 2.325 || 6 || || 3 | 1 || 4 | 1 || 5 | 1 || 2.331 || 7 ||

In this case the function would look like:
[](std::array<size_t, 3> binsXYZ, std::array<size_t, 3> nBinsXYZ) {
return (binsXYZ.at(0) * (nBinsXYZ.at(1) * nBinsXYZ.at(2))
+ binsXYZ.at(1) * nBinsXYZ.at(2)
+ binsXYZ.at(2));
}
Parameters
[in]fieldMapFilePath to file containing field map in txt format
[in]lengthUnitThe unit of the grid points
[in]BFieldUnitThe unit of the magnetic field
[in]nPointsExtimate of number of grid points in field map needed for allocation
Note
This information is only used as a hint for the required size of the internal vectors. A correct value is not needed, but will help to speed up the field map initialization process.
Parameters
[in]firstOctantFlag if set to true indicating that only the first octant of the grid points and the BField values has been given and that the BFieldMap should be created symmetrically for all quadrants. e.g. we have the grid values z={0,1} with BFieldValues={2,3} on the r axis. If the flag is set to true the z-axis grid values will be set to {-1,0,1} and the BFieldValues will be set to {3,2,3}.

[1] Read in field map file

Definition at line 64 of file BFieldUtils.cpp.

View newest version in sPHENIX GitHub at line 64 of file BFieldUtils.cpp

References Acts::IntegrationTest::bField, Acts::fieldMapperXYZ(), in, tmp, x, y, and z.

Referenced by FW::Options::readBField().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: