37 {
38 if (sl.isValid() == false) {
39 return TGCModuleMap{};
40 }
41
44
45 TGCModuleMap mapId{};
46 const int wireMaxEntry = wireP->getMaxEntry();
47 for (
int i = 0;
i < wireMaxEntry;
i++) {
48 int id = wireP->getEntry(i, 0);
49 int block = wireP->getEntry(i, 1);
50 auto hpb = std::make_unique<TGCModuleHPB>(sl.getSideType(),
TGCId::Wire,
51 sl.getRegionType(),
52 sl.getSector(), id);
53 mapId.insert(block, std::move(hpb));
54 }
55
56 const int stripMaxEntry = stripP->getMaxEntry();
57 for (
int i = 0;
i < stripMaxEntry;
i++) {
58 int id = stripP->getEntry(i, 0);
59 int block = stripP->getEntry(i, 1);
60 auto hpb = std::make_unique<TGCModuleHPB>(
61 sl.getSideType(),
TGCId::Strip, sl.getRegionType(), sl.getSector(),
62 id);
63 mapId.insert(block, std::move(hpb));
64 }
65
66 return mapId;
67}