28 {
29
30 const TgcCablingMap*
cabling{
nullptr};
33 "Cabling is not available in "
34 "TgcRDO_Decoder::getDigit()");
35 return nullptr;
36 }
37
38 int offset = 0, offsetORed = 0;
39
43
45 if (sswId == 9) {
46 if ((slbId % 4 == 3 && bitpos >= 77 && bitpos <= 84) ||
47 (slbId % 4 != 3 && bitpos >= 77 && bitpos <= 111)) {
49 }
50 } else if (sswId >= 3 && sswId <= 8) {
51 if ((slbId == 1 && bitpos >= 66 && bitpos <= 73) ||
52 (slbId == 2 && bitpos >= 42 && bitpos <= 63)) {
54 }
55 if ((slbId == 1 && bitpos >= 102 && bitpos <= 109) ||
56 (slbId == 2 && bitpos >= 78 && bitpos <= 99)) {
58 }
59 if ((slbId == 1 && bitpos >= 74 && bitpos <= 75) ||
60 (slbId == 2 && bitpos >= 40 && bitpos <= 41)) {
61 offsetORed = 36;
62 }
63 if ((slbId == 1 && bitpos >= 110 && bitpos <= 111) ||
64 (slbId == 2 && bitpos >= 76 && bitpos <= 77)) {
65 offsetORed = -36;
66 }
67 }
68 }
69 int corr = orFlag ? offsetORed :
offset;
70
71
72 Identifier chanId;
73 bool c_found =
cabling->getOfflineIDfromReadoutID(
75 bitpos + corr, orFlag);
76
77 if (!c_found) {
78 return nullptr;
79 }
80
81 return std::make_unique<TgcDigit>(chanId, rawData.
bcTag());
82}
SG::ReadCondHandleKey< Muon::TgcCablingMap > m_cablingKey
uint16_t subDetectorId() const
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.