CbmRoot
Loading...
Searching...
No Matches
CaSetup.cxx
Go to the documentation of this file.
1/* Copyright (C) 2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergei Zharko [committer] */
4
9
10#include "CaSetup.h"
11
12#include <fmt/format.h>
13
16
17// ---------------------------------------------------------------------------------------------------------------------
18//
19template<typename Float>
20Setup<Float>::Setup(kf::Setup<Float> geoSetup, const std::vector<std::pair<EDetectorID, int>>& inactiveLayers)
21 : fGeoSetup(std::move(geoSetup))
22 , fActSetup(fGeoSetup.CreateSetupWithDisabledLayers(inactiveLayers))
23{
24 // Fill mapping geoId <-> actId and fvStations container
25 std::fill(fvGeoToActMap.begin(), fvGeoToActMap.end(), -1);
26 std::fill(fvActToGeoMap.begin(), fvActToGeoMap.end(), -1);
27
28 for (int actId = 0; actId < fActSetup.GetNofLayers(); ++actId) {
29 auto [detId, locId] = ActToLocStationId(actId);
30 int geoId = LocToGeoStationId(detId, locId);
31 fvActToGeoMap[actId] = geoId;
32 fvGeoToActMap[geoId] = actId;
33 }
34}
35
36namespace cbm::algo::ca
37{
38 template class Setup<float>;
39 template class Setup<double>;
40 template class Setup<fvec>;
41} // namespace cbm::algo::ca
A setup representation in CA tracking.
friend class Setup
Definition CaSetup.h:56
Setup representation for tracking.
Definition CaSetup.h:54
StationArray_t< int > fvGeoToActMap
Maps geoId -> actId [geoId].
Definition CaSetup.h:168
std::pair< EDetectorID, int > ActToLocStationId(int actId) const
Converts active station ID to (detector ID, local station ID)
Definition CaSetup.h:124
int LocToGeoStationId(EDetectorID detId, int locId) const
Converts (detectorId, local station ID) to geometry station ID.
Definition CaSetup.h:155
KfSetup_t fActSetup
Active KF-setup (includes only inactive stations)
Definition CaSetup.h:167
KfSetup_t fGeoSetup
Geometry KF-setup (includes both active and inactive stations)
Definition CaSetup.h:166
StationArray_t< int > fvActToGeoMap
Maps actId -> geoId [actId].
Definition CaSetup.h:169
KF-framework representation of the detector setup.
Definition KfSetup.h:37
TODO: SZh 8.11.2022: add selection of parameterisation.
Definition CaBranch.h:14
EDetectorID
Enumeration for the tracking detector subsystems in CBM-CA.
Definition CbmDefs.h:216
Hash for CbmL1LinkKey.