@@ -129,27 +129,14 @@ void HGCalSizeTester::doTestScint(const HGCalGeometry* geom, DetId::Detector det
129129 auto icell1 = geom->getGeometry (id1);
130130 GlobalPoint global1 = geom->getPosition (id1);
131131 DetId idc1 = geom->getClosestCell (global1);
132- std::pair<int , int > typm = geom->topology ().dddConstants ().tileType (layer, ieta, iphi);
133- if (typm.first >= 0 ) {
134- HGCScintillatorDetId detId (id1);
135- detId.setType (typm.first );
136- detId.setSiPM (typm.second );
137- id1 = static_cast <DetId>(detId);
138- }
139132 HGCScintillatorDetId detId (idc1);
140- typm = geom->topology ().dddConstants ().tileType (detId.layer (), detId.ring (), detId.iphi ());
141- if (typm.first >= 0 ) {
142- detId.setType (typm.first );
143- detId.setSiPM (typm.second );
144- idc1 = static_cast <DetId>(detId);
145- }
146- std::string cherr = (id1.rawId () != idc1.rawId ()) ? " ***** ERROR *****" : " " ;
133+ std::string cherr = ((detId.position () != HGCScintillatorDetId (id1).position ())) ? " ***** ERROR *****" : " " ;
147134 edm::LogVerbatim (" HGCalGeomX" )
148135 << " DetId (" << det << " :" << zside << " :" << type << " :" << layer << " :" << ieta << " :" << iphi
149136 << " ) Geom " << icell1 << " position (" << global1.x () << " , " << global1.y () << " , " << global1.z ()
150137 << " ) ids " << std::hex << id1.rawId () << " :" << idc1.rawId () << std::dec << " :"
151138 << HGCScintillatorDetId (id1) << " :" << HGCScintillatorDetId (idc1)
152- << " parameter[11] = " << icell1->param ()[10 ] << " :" << icell1->param ()[10 ] << cherr;
139+ << " parameter[11] = " << icell1->param ()[10 ] << " :" << icell1->param ()[10 ] << cherr << " " << std::hex << detId. position () << " " << HGCScintillatorDetId (id1). position () << std::dec ;
153140 std::vector<GlobalPoint> corners = geom->getNewCorners (idc1);
154141 std::ostringstream st1;
155142 st1 << corners.size () << " corners" ;
0 commit comments