21#include <boost/archive/binary_iarchive.hpp>
22#include <boost/archive/binary_oarchive.hpp>
23#include <boost/serialization/array.hpp>
24#include <boost/serialization/utility.hpp>
51 template<
typename DataT>
70 template<
typename DataIn>
94 void Print(
int verbosityLevel = 0) const;
99 std::
string ToString(
int verbosity = 0,
int indentLevel = 0) const;
124 return fSetup.GeoToLocStationId(geoId);
139 return fSetup.LocToGeoStationId(detId, locId);
150 return fSetup.LocToActStationId(detId, locId);
188 template<
class Archive>
206 template<
typename Float>
219 template<
typename Float>
223 std::ifstream ifs(fileName, std::ios::binary);
225 throw std::runtime_error(fmt::format(
"ca::ParametersIO::Load: intput setup file \"{}\" was not found", fileName));
228 boost::archive::binary_iarchive ia(ifs);
231 catch (
const std::exception& err) {
232 throw std::runtime_error(fmt::format(
"ca::ParametersIO::Load: input setup file \"{}\" has inconsistent format or "
233 "was corrupted. The exception message: ",
234 fileName, err.what()));
236 if constexpr (std::is_same_v<Float, double>) {
Configuration for the CA tracking algorithm (source)
Compile-time constants definition for the CA tracking algorithm.
A container for search window maps.
A setup representation in CA tracking.
Magnetic flux density interpolation along the track vs. z-coordinate (header)
EFieldMode
Enumiration for the magnetic field representation variants in the track fitting algorithm.
Setup representation for the Kalman-filter framework (header)
Configuration of the CA tracking (excluding geometry)
A container for all external parameters of the CA tracking algorithm.
Config fConfig
Configuration.
void serialize(Archive &ar, const unsigned int)
Setup< DataT > fSetup
Setup representation.
const auto & GetActiveSetup() const
Gets active setup.
const Setup< DataT > & GetSetup() const
Constant accessor to CA setup.
kf::EFieldMode GetFieldMode() const
Gets field mode.
int GetNstationsGeometry(EDetectorID detId) const
Gets number of stations, provided by setup geometry for given detector ID.
Parameters(const Parameters< DataIn > &other)
Copy constructor with type conversion.
int GetStationIndexGeometry(int locId, EDetectorID detId) const
Provides access to local indexes of stations (const)
Parameters()=default
Default constructor.
int GetStationIndexActive(int locId, EDetectorID detId) const
Provides access to global indexes of stations among geometry (const)
const SearchWindowMapContainer & GetSearchWindows() const
Constant accessor to search window map container.
int GetNstationsGeometry() const
Gets total number of stations, provided by setup geometry.
std::string ToString(int verbosity=0, int indentLevel=0) const
String representation of the class contents.
~Parameters() noexcept=default
Destructor.
int GetNstationsActive() const
Gets total number of active stations.
const Config & GetConfig() const
Constant accessor to CA config.
SearchWindowMapContainer fSwMaps
Search window map.
std::array< T, constants::size::MaxNstations > StationArray_t
void Print(int verbosityLevel=0) const
Prints configuration.
const auto & GetGeometrySetup() const
Gets active setup.
const auto & GetCAIterations() const
Provides access to L1CAIteration vector (const)
void CheckConsistency() const
Class invariant checker.
std::pair< EDetectorID, int > GetStationIndexLocal(int geoId) const
Provides access to the first index of the station on each particular detector (const)
friend class ParametersIO
friend class boost::serialization::access
Serialization function.
std::underlying_type_t< EDetectorID > DetectorID_t
Parameters(const Parameters &other)=default
Copy constructor.
int GetNstationsActive(EDetectorID detId) const
Gets number of active stations for given detector ID.
bool IsActive(EDetectorID detId) const
Checks, if the detector subsystem active.
int GetNcaIterations() const
Provides number of iterations.
A container for search window maps.
Setup representation for tracking.
constexpr T2 Undef
Undefined values.
TODO: SZh 8.11.2022: add selection of parameterisation.
Vector< Iteration > IterationsContainer_t
Type definitions for used containers.
EDetectorID
Enumeration for the tracking detector subsystems in CBM-CA.
A class for loading/storing the Parameters objects.
static void Store(const Parameters< double > ¶meters, const std::string &fileName)
Stores parameter to file.
static Parameters< Float > Load(const std::string &fileName)
Loads parameters from file.
~ParametersIO()=delete
Destructor.