Function Acts::fieldMapRZ

Function Documentation

Acts::InterpolatedBFieldMap<Acts::detail::Grid<Acts::Vector2, Acts::detail::EquidistantAxis, Acts::detail::EquidistantAxis>> Acts::fieldMapRZ(const std::function<size_t(std::array<size_t, 2> binsRZ, std::array<size_t, 2> nBinsRZ)> &localToGlobalBin, std::vector<double> rPos, std::vector<double> zPos, std::vector<Acts::Vector2> bField, double lengthUnit = UnitConstants::mm, double BFieldUnit = UnitConstants::T, bool firstQuadrant = false, )

Method to setup the FieldMap.

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

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));
}
Note

The values do not need to be sorted or unique (this will be done inside the function)

Note

The values do not need to be sorted or unique (this will be done inside the function)

Note

The function localToGlobalBin determines how the magnetic field was stored in the vector in respect to the grid values

Parameters
  • localToGlobalBin: Function mapping the local bins of r,z to the global bin of the map magnetic field value

Parameters
  • [in] rPos: Values of the grid points in r

Parameters
  • [in] zPos: Values of the grid points in z

Parameters
  • [in] bField: The magnetic field values inr r and z for all given grid points stored in a vector

Parameters
  • [in] lengthUnit: The unit of the grid points

  • [in] BFieldUnit: The unit of the magnetic field

  • [in] firstQuadrant: Flag 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}.