13#include <unordered_set>
27 auto ValidateConsSmTypes = [](
SmTypeInfo thisSmType,
SmTypeInfo nextSmType, uint16_t iThisSmType) {
28 uint32_t offsetDiff = nextSmType.offset - thisSmType.
offset;
29 uint32_t nRpcsSmt = thisSmType.
nSm * thisSmType.
nRpc;
30 if (nRpcsSmt != offsetDiff) {
31 std::stringstream msg;
32 msg <<
"Mapping issue for iSmType=" << iThisSmType <<
": num of RPCs ((nSm=)" << thisSmType.
nSm <<
" x (nRpc=)"
33 << thisSmType.
nRpc <<
" = " << nRpcsSmt <<
") differs from the offset difference relative to the next "
34 <<
"supermodule type ((next.offset=)" << nextSmType.offset <<
" - (this.offset=)" << thisSmType.
offset
35 <<
" = " << offsetDiff;
36 throw std::runtime_error(msg.str());
41 for (uint16_t iSmType = 0; iSmType <
GetNofSmTypes() - 1; ++iSmType) {
43 ValidateConsSmTypes(thisSmt, nextSmt, iSmType);
46 ValidateConsSmTypes(thisSmt,
69 std::unordered_set<int> knownStationIds;
71 if (stationId > -1) knownStationIds.insert(stationId);
75 for (
int stationId : knownStationIds) {
77 LOG(error) <<
"\t - found stationID (" << stationId <<
") greater than max. stationID provided by geometry ("
85 <<
") differs from one retrieved from digitization parameters (" << knownStationIds.size() <<
')';
TrkStationIdMap()=default
Default constructor (for serialization)
int GetNofTrackingStations() const
TrackingSetupIfs()=default
TOF detector representation in online/offline reconstruction.
bool IsInitialized() const
Validates initialization of the instance.
RecoSetupUnit()=default
Default constructor (note: needed for serialization)
TrkStationIdMap fTrkStationIdMap
A map of tracking station indexing.
A mapper for TOF tracking stations.
uint16_t GetNofSmTypes() const
Gets number of supermodule types.
std::vector< SmTypeInfo > fSmTypeRpcMap
Information on the RPC indexing within differnt SM types.
std::vector< int > fTrkStationIdMap
Index of tracking station vs. RPC.
Information on RPC offsets for each SM type.
uint16_t nRpc
Number of RPCs for a given SM type.
uint32_t offset
An index of first RPC for a given SM type.
uint16_t nSm
Number of supermodules for a given SM type.
TOF representation for tracking.