54 std::pair<int, int>
areConnected(RPCStripsRing::TIdToRindMap::iterator ref,
55 RPCStripsRing::TIdToRindMap::iterator
other,
66 : m_towerBeg(iConfig.getParameter<
int>(
"towerBeg")), m_towerEnd(iConfig.getParameter<
int>(
"towerEnd")) {
74 auto pL1RPCConeBuilder = std::make_unique<L1RPCConeBuilder>();
85 ringsMap.begin()->second.compressConnections();
87 pL1RPCConeBuilder->setConeConnectionMap(ringsMap.begin()->second.getConnectionsMap());
89 pL1RPCConeBuilder->setCompressedConeConnectionMap(ringsMap.begin()->second.getCompressedConnectionsMap());
91 return pL1RPCConeBuilder;
98 auto uncompressedCons = std::make_shared<L1RPCConeBuilder::TConMap>();
101 for (
auto const& it : rpcGeom->
dets()) {
102 RPCRoll const* roll = dynamic_cast<RPCRoll const*>(it);
103 if (roll ==
nullptr) {
110 auto found = ringsMap.find(ringId);
111 if (
found == ringsMap.end()) {
114 found->second.addRoll(roll);
119 for (
auto& it : ringsMap) {
120 it.second.filterOverlapingChambers();
121 it.second.fillWithVirtualStrips();
125 for (
auto& it : ringsMap) {
136 if (it.second.size() != ringsMap[
key].size()) {
137 throw cms::Exception(
"RPCInternal") <<
" Size differs for ring " <<
key <<
" +- 100 \n";
146 RPCStripsRing::TIdToRindMap::iterator itRef = ringsMap.begin();
147 for (; itRef != ringsMap.end(); ++itRef) {
151 if (!itRef->second.isReferenceRing())
154 RPCStripsRing::TIdToRindMap::iterator itOther = ringsMap.begin();
155 for (; itOther != ringsMap.end(); ++itOther) {
157 if (itOther->second.isReferenceRing())
160 std::pair<int, int>
pr =
areConnected(itRef, itOther, l1RPCConeDefinition);
161 if (
pr.first != -1) {
163 newOtherConn.
m_it = itOther;
166 ringsToConnect.push_back(newOtherConn);
170 std::pair<int, int> prRef =
areConnected(itRef, itRef, l1RPCConeDefinition);
171 if (prRef.first == -1) {
172 throw cms::Exception(
"RPCConfig") <<
" Cannot determine logplane for reference ring " << itRef->first <<
"\n ";
175 itRef->second.createRefConnections(ringsToConnect, prRef.first, prRef.second);
183 RPCStripsRing::TIdToRindMap::iterator
other,
188 if (ref->second.getEtaPartition() *
other->second.getEtaPartition() < 0)
189 return std::make_pair(-1, 0);
196 if (itRef.m_etaPart !=
std::abs(ref->second.getEtaPartition()) ||
197 itRef.m_hwPlane !=
std::abs(ref->second.getHwPlane() - 1)
203 refTower = itRef.m_tower;
206 if (itOther.m_etaPart !=
std::abs(
other->second.getEtaPartition()) ||
207 itOther.m_hwPlane !=
std::abs(
other->second.getHwPlane() - 1)
212 if (itOther.m_tower == refTower) {
213 index = itOther.m_index;
218 if (refTowerCnt > 1) {
219 throw cms::Exception(
"RPCConeBuilder") <<
" Reference(?) ring " << ref->first <<
" "
220 <<
"wants to be connected to " << refTowerCnt <<
" towers \n";
223 if (refTowerCnt == 0) {
224 throw cms::Exception(
"RPCConeBuilder") <<
" Reference(?) ring " << ref->first <<
" "
225 <<
" is not connected anywhere \n";
231 if (it.m_etaPart !=
std::abs(
other->second.getEtaPartition()) ||
238 for (
auto const& it : l1RPCConeDefinition->
getLPSizeVec()) {
239 if (it.m_tower !=
std::abs(refTower) || it.m_LP != logplane - 1) {
250 return std::make_pair(logplane, lpSize);