CbmRoot
Loading...
Searching...
No Matches
trd/RecoSetupUnit.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
11
12
14
15// ---------------------------------------------------------------------------------------------------------------------
16//
17RecoSetupUnit::RecoSetupUnit(std::pair<std::vector<GeoVolume>, std::vector<GeoVolume>>&& stationVolumes,
18 RecoSetupUnit::ModuleInfoMap_t&& moduleInfoMap)
19 : TrackingSetupIfs<RecoSetupUnit>(std::move(stationVolumes))
20 , fvModuleInfoMap(std::move(moduleInfoMap))
21{
22}
23
24// ---------------------------------------------------------------------------------------------------------------------
25//
27{
28 if (!fvModuleInfoMap.first.size()) {
29 LOG(error) << "\t - map of module types was not properly defined (it has a zero size)";
30 return false;
31 }
32
33 if (fvModuleInfoMap.first.size() / fvModuleInfoMap.second != static_cast<size_t>(this->GetNofTrackingStations())) {
34 LOG(error) << "\t - map of module types was not properly defined (it must have nModulesInLayer x nLayers = "
35 << fvModuleInfoMap.second << " x " << this->GetNofTrackingStations() << " = "
36 << fvModuleInfoMap.second * this->GetNofTrackingStations() << " elements, but its size equals to "
37 << fvModuleInfoMap.first.size();
38 return false;
39 }
40
41 return true;
42}
std::pair< std::vector< ModuleInfo >, uint32_t > ModuleInfoMap_t
A map of TRD module info vs.
RecoSetupUnit()=default
Default constructor (note: needed for serialization)
ModuleInfoMap_t fvModuleInfoMap
map of TRD module types vs [layerId x moduleId]
bool IsInitialized() const
Validates initialization of the concrete class.
Hash for CbmL1LinkKey.
TRD representation for tracking.