55 std::pair<int, int>
areConnected(RPCStripsRing::TIdToRindMap::iterator ref,
56 RPCStripsRing::TIdToRindMap::iterator
other,
67 : m_towerBeg(iConfig.getParameter<
int>(
"towerBeg")), m_towerEnd(iConfig.getParameter<
int>(
"towerEnd")) {
73 auto pL1RPCConeBuilder = std::make_unique<L1RPCConeBuilder>();
84 ringsMap.begin()->second.compressConnections();
86 pL1RPCConeBuilder->setConeConnectionMap(ringsMap.begin()->second.getConnectionsMap());
88 pL1RPCConeBuilder->setCompressedConeConnectionMap(ringsMap.begin()->second.getCompressedConnectionsMap());
90 return pL1RPCConeBuilder;
97 auto uncompressedCons = std::make_shared<L1RPCConeBuilder::TConMap>();
100 for (
auto const& it : rpcGeom->
dets()) {
101 RPCRoll const* roll = dynamic_cast<RPCRoll const*>(it);
102 if (roll ==
nullptr) {
109 auto found = ringsMap.find(ringId);
110 if (
found == ringsMap.end()) {
113 found->second.addRoll(roll);
118 for (
auto& it : ringsMap) {
119 it.second.filterOverlapingChambers();
120 it.second.fillWithVirtualStrips();
124 for (
auto& it : ringsMap) {
135 if (it.second.size() != ringsMap[
key].size()) {
136 throw cms::Exception(
"RPCInternal") <<
" Size differs for ring " <<
key <<
" +- 100 \n";
145 RPCStripsRing::TIdToRindMap::iterator itRef = ringsMap.begin();
146 for (; itRef != ringsMap.end(); ++itRef) {
150 if (!itRef->second.isReferenceRing())
153 RPCStripsRing::TIdToRindMap::iterator itOther = ringsMap.begin();
154 for (; itOther != ringsMap.end(); ++itOther) {
156 if (itOther->second.isReferenceRing())
159 std::pair<int, int>
pr =
areConnected(itRef, itOther, l1RPCConeDefinition);
160 if (
pr.first != -1) {
162 newOtherConn.
m_it = itOther;
165 ringsToConnect.push_back(newOtherConn);
169 std::pair<int, int> prRef =
areConnected(itRef, itRef, l1RPCConeDefinition);
170 if (prRef.first == -1) {
171 throw cms::Exception(
"RPCConfig") <<
" Cannot determine logplane for reference ring " << itRef->first <<
"\n ";
174 itRef->second.createRefConnections(ringsToConnect, prRef.first, prRef.second);
182 RPCStripsRing::TIdToRindMap::iterator
other,
187 if (ref->second.getEtaPartition() *
other->second.getEtaPartition() < 0)
188 return std::make_pair(-1, 0);
195 if (itRef.m_etaPart !=
std::abs(ref->second.getEtaPartition()) ||
196 itRef.m_hwPlane !=
std::abs(ref->second.getHwPlane() - 1)
202 refTower = itRef.m_tower;
205 if (itOther.m_etaPart !=
std::abs(
other->second.getEtaPartition()) ||
206 itOther.m_hwPlane !=
std::abs(
other->second.getHwPlane() - 1)
211 if (itOther.m_tower == refTower) {
212 index = itOther.m_index;
217 if (refTowerCnt > 1) {
218 throw cms::Exception(
"RPCConeBuilder") <<
" Reference(?) ring " << ref->first <<
" "
219 <<
"wants to be connected to " << refTowerCnt <<
" towers \n";
222 if (refTowerCnt == 0) {
223 throw cms::Exception(
"RPCConeBuilder") <<
" Reference(?) ring " << ref->first <<
" "
224 <<
" is not connected anywhere \n";
230 if (it.m_etaPart !=
std::abs(
other->second.getEtaPartition()) ||
237 for (
auto const& it : l1RPCConeDefinition->
getLPSizeVec()) {
238 if (it.m_tower !=
std::abs(refTower) || it.m_LP != logplane - 1) {
249 return std::make_pair(logplane, lpSize);