88{
90 return true;
92 if (!mgr) {
94 return false;
95 }
96 size_t hitID =
thehit->GetHitID(), moduleID(0), trtID(0),sectorID(0);
97 static const size_t mask = 0x1F;
98 static const size_t shift = 5;
99 std::bitset<32> idBits(hitID);
100 if (!idBits[21] ) {
101 size_t layerID(0), ringID(0);
104 layerID = hitID &
mask;
106 moduleID = hitID &
mask;
108 ringID = hitID &
mask;
109 trtID = hitID >>
shift;
110 detelem =
mgr->getBarrelElement(trtID,ringID,moduleID,layerID);
111 }
112 else {
113 size_t wheelID(0), planeID(0);
116 planeID = hitID &
mask;
118 sectorID = hitID &
mask;
120 wheelID = hitID &
mask;
121 trtID = hitID >>
shift;
122 bool isPositive = (trtID==2);
123 detelem =
mgr->getEndcapElement(isPositive,wheelID,planeID,sectorID);
124 }
126 return true;
127 } else {
129 return false;
130 }
131}
static const InDetDD::TRT_DetectorManager * trtDetMgr()
static void messageDebug(const QString &)
virtual void shift(size_t pos, ptrdiff_t offs) override
Shift the elements of the container.