10#ifndef CaParametersBuilder_h
11#define CaParametersBuilder_h 1
40 template<
typename Float>
89 template<
typename Float>
93 throw std::runtime_error(
"ca::ParametersBuilder: attempt to build a parameters object with an "
94 "uninitialized main config.");
105 auto config = configReader.CreateConfig();
108 auto inactiveIdsFromCfg = configReader.ReadInactiveStationMap();
109 std::vector<std::pair<ca::EDetectorID, int>> inactiveIdsFull;
110 inactiveIdsFull.reserve(inactiveIdsFromCfg.size() +
fvInactiveIds.size());
112 std::copy(inactiveIdsFromCfg.begin(), inactiveIdsFromCfg.end(), std::back_inserter(inactiveIdsFull));
115 auto caSetup =
ca::Setup{std::move(geoSetup), inactiveIdsFull};
119 return Parameters<Float>{std::move(caSetup), std::move(config), std::move(swMaps)};
Configuration parameter file reader for the CA tracking algorithm (header)
Compile-time constants definition for the CA tracking algorithm.
A factory class for a search window map container.
An abstract factory for different setups.
Setup representation for the Kalman-filter framework (header)
A reader for the CA parameters from the YAML configuration files.
void SetDetectorNames(const std::array< std::string, constants::size::MaxNdetectors > &input)
Sets detector names.
A builder class for ca::Parameters.
void SetMainConfig(const std::string &mainConfig)
Sets main config path.
std::string fsUserConfig
Path to user config (optional)
Parameters< Float > Build(kf::FloatTag< Float > floatTag, kf::EFieldMode fldMode)
Builds the parameters object.
std::unique_ptr< const kf::ISetupFactory > GeoFactoryPtr_t
GeoFactoryPtr_t fpGeoSetupFactory
Shared geo-setup factory.
std::vector< std::pair< EDetectorID, int > > fvInactiveIds
Indices of inactive stations.
void DisableStation(EDetectorID detId, int locId)
Disables tracking station.
std::array< std::string, constants::size::MaxNdetectors > DetNamesArray_t
void SetGeoSetupFactoryConstructor(std::function< GeoFactoryPtr_t()> lazyConstructor)
Sets a constructor callable for the geo-setup factory.
std::function< GeoFactoryPtr_t()> fpGeoSetupFactoryConstructor
void Init()
Initializes the instance.
DetNamesArray_t fDetNames
Detector subsystem names.
void SetUserConfig(const std::string &userConfig)
Sets user config path.
std::string fsMainConfig
Path to main config.
void SetDetNames(const DetNamesArray_t &detNames)
Sets tracking detector names.
A container for all external parameters of the CA tracking algorithm.
A factory class for seach window map container.
static SearchWindowMapContainer Create(const kf::Setup< F > &actSetup, const kf::FieldFn_t &fieldFn, const ca::Config &config)
Creates the map.
Setup representation for tracking.
TODO: SZh 8.11.2022: add selection of parameterisation.
EDetectorID
Enumeration for the tracking detector subsystems in CBM-CA.
EFieldMode
Enumiration for the magnetic field representation variants in the track fitting algorithm.
A floating-point tag for tag dispatching.