21TEST(_GTestDigiEventSelector, CheckDigiEventSelectorAlgorithmSimple)
23 SCOPED_TRACE(
"CheckDigiEventSelectorAlgorithSimple");
38 for (
size_t i = 0; i < nBmon; i++)
40 for (
size_t i = 0; i < nSts; i++)
42 for (
size_t i = 0; i < nMuch; i++)
44 for (
size_t i = 0; i < nRich; i++)
46 for (
size_t i = 0; i < nTrd; i++)
48 for (
size_t i = 0; i < nTrd2d; i++)
50 for (
size_t i = 0; i < nTof; i++)
52 for (
size_t i = 0; i < nPsd; i++)
54 for (
size_t i = 0; i < nFsd; i++)
61 auto recoSetup = std::make_shared<RecoSetup>();
64 std::pair<std::vector<GeoVolume>, std::vector<GeoVolume>> dummyStationVols;
65 std::vector<std::pair<uint32_t, int>> trkStationId = {
66 {std::numeric_limits<uint32_t>::max(), 0},
67 {std::numeric_limits<uint32_t>::max(), 1},
68 {std::numeric_limits<uint32_t>::max(), 2},
69 {std::numeric_limits<uint32_t>::max(), 3},
70 {std::numeric_limits<uint32_t>::max(), 4},
71 {std::numeric_limits<uint32_t>::max(), 5},
72 {std::numeric_limits<uint32_t>::max(), 6},
73 {std::numeric_limits<uint32_t>::max(), 7},
74 {std::numeric_limits<uint32_t>::max(), 8}
76 recoSetup->SetSts(std::move(
sts::RecoSetupUnit(std::move(dummyStationVols), std::move(trkStationId))));
80 std::pair<std::vector<GeoVolume>, std::vector<GeoVolume>> dummyStationVols;
81 std::vector<SmTypeInfo_t> smTypeRpcMap = {
82 SmTypeInfo_t{.offset = 0, .nSm = 5, .nRpc = 5},
83 SmTypeInfo_t{.offset = 25, .nSm = 0, .nRpc = 3},
84 SmTypeInfo_t{.offset = 25, .nSm = 1, .nRpc = 5},
85 SmTypeInfo_t{.offset = 30, .nSm = 0, .nRpc = 1},
86 SmTypeInfo_t{.offset = 30, .nSm = 0, .nRpc = 1},
87 SmTypeInfo_t{.offset = 30, .nSm = 1, .nRpc = 1},
88 SmTypeInfo_t{.offset = 31, .nSm = 1, .nRpc = 2},
89 SmTypeInfo_t{.offset = 33, .nSm = 1, .nRpc = 2},
90 SmTypeInfo_t{.offset = 35, .nSm = 0, .nRpc = 1},
91 SmTypeInfo_t{.offset = 35, .nSm = 1, .nRpc = 2}
93 std::vector<int> trkStationIdMap = {
94 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3,
102 recoSetup->SetTof(std::move(
tof::RecoSetupUnit(std::move(dummyStationVols), std::move(stationIdMap))));
122 EXPECT_EQ(select(event),
true);
131 EXPECT_EQ(select(event),
false);
140 EXPECT_EQ(select(event),
false);
149 EXPECT_EQ(select(event),
false);
158 EXPECT_EQ(select(event),
false);
167 EXPECT_EQ(select(event),
false);
176 EXPECT_EQ(select(event),
false);
185 EXPECT_EQ(select(event),
false);
194 EXPECT_EQ(select(event),
false);
203 EXPECT_EQ(select(event),
false);
209 const uint maxStsStations = 8;
210 const uint maxStsModules = 12;
211 const uint maxStsLadders = 4;
213 for (uint numStations = 1; numStations < maxStsStations; numStations++) {
217 for (uint station = 0; station < numStations; station++) {
218 for (uint module = 0;
module < maxStsModules;
module++) {
219 for (uint ladder = 0; ladder < maxStsLadders; ladder++) {
220 for (uint halfladder = 0; halfladder <= 1; halfladder++) {
241 EXPECT_EQ(select(eventIn),
true);
250 EXPECT_EQ(select(eventIn),
false);
260 std::unordered_set<int32_t> setTofStation;
261 const auto* tofUnit{recoSetup->GetTof()};
263 const auto& stationIdMap{tofUnit->GetTrkStationIdMap()};
265 for (uint16_t smType = 0; smType < stationIdMap.GetNofSmTypes(); smType++) {
266 for (uint16_t sm = 0; sm < stationIdMap.GetNofSm(smType); sm++) {
267 for (uint16_t rpc = 0; rpc < stationIdMap.GetNofRpc(smType); rpc++) {
273 int iTrkStation = stationIdMap.GetTrackingStationIndex(smType, sm, rpc);
274 if (iTrkStation > -1) {
277 setTofStation.insert(iTrkStation);
287 EXPECT_EQ(select(eventIn),
true);
295 EXPECT_EQ(select(eventIn),
false);