43 m_towerBeg(iConfig.getParameter<
int>(
"towerBeg")),
44 m_towerEnd(iConfig.getParameter<
int>(
"towerEnd")),
45 m_runOnceBuildCones(
false)
124 auto pL1RPCConeBuilder = std::make_shared<L1RPCConeBuilder>();
140 m_ringsMap.begin()->second.compressConnections();
142 pL1RPCConeBuilder->setConeConnectionMap(
m_ringsMap.begin()->second.getConnectionsMap());
144 pL1RPCConeBuilder->setCompressedConeConnectionMap(
145 m_ringsMap.begin()->second.getCompressedConnectionsMap());
149 return pL1RPCConeBuilder;
185 throw cms::Exception(
"RPCInternal") <<
"buildCones called twice \n";
191 auto uncompressedCons = std::make_shared<L1RPCConeBuilder::TConMap>();
195 for(TrackingGeometry::DetContainer::const_iterator it = rpcGeom->
dets().begin();
196 it != rpcGeom->
dets().end();
200 if( dynamic_cast< RPCRoll const * >( *it ) == 0 )
continue;
217 RPCStripsRing::TIdToRindMap::iterator it =
m_ringsMap.begin();
224 it->second.filterOverlapingChambers();
225 it->second.fillWithVirtualStrips();
234 int etaPart = it->first%100;
235 if (it->second.isReferenceRing() && (it->second.size() != 1152)){
241 throw cms::Exception(
"RPCInternal") <<
"Problem: refring " << it->first
242 <<
" has " << it->second.size() <<
" strips \n";
253 int sign = key/100 - (key/1000)*10;
264 throw cms::Exception(
"RPCInternal") <<
" Size differs for ring " << key <<
" +- 100 \n";
279 RPCStripsRing::TIdToRindMap::iterator itRef =
m_ringsMap.begin();
285 if (!itRef->second.isReferenceRing())
continue;
287 RPCStripsRing::TIdToRindMap::iterator itOther =
m_ringsMap.begin();
288 for (;itOther !=
m_ringsMap.end(); ++itOther){
290 if (itOther->second.isReferenceRing())
continue;
293 if ( pr.first != -1 ) {
295 newOtherConn.
m_it = itOther;
298 ringsToConnect.push_back(newOtherConn);
306 if (prRef.first == -1){
307 throw cms::Exception(
"RPCConfig") <<
" Cannot determine logplane for reference ring " 308 << itRef->first <<
"\n ";
323 itRef->second.createRefConnections(ringsToConnect, prRef.first, prRef.second);
352 RPCStripsRing::TIdToRindMap::iterator
other){
359 if ( ref->second.getEtaPartition()*other->second.getEtaPartition()<0 )
360 return std::make_pair(-1,0);
379 L1RPCConeDefinition::TRingToTowerVec::const_iterator itRef
382 const L1RPCConeDefinition::TRingToTowerVec::const_iterator itEnd
385 L1RPCConeDefinition::TRingToTowerVec::const_iterator itOther = itRef;
391 for (;itRef != itEnd; ++itRef){
392 if ( itRef->m_etaPart !=
std::abs(ref->second.getEtaPartition())
393 || itRef->m_hwPlane !=
std::abs(ref->second.getHwPlane()-1)
397 refTower = itRef->m_tower;
399 for (;itOther != itEnd; ++itOther){
400 if ( itOther->m_etaPart !=
std::abs(other->second.getEtaPartition())
401 || itOther->m_hwPlane !=
std::abs(other->second.getHwPlane()-1)
404 if (itOther->m_tower == refTower) index = itOther->m_index;
413 <<
"wants to be connected to " << refTowerCnt <<
" towers \n";
420 <<
" is not connected anywhere \n";
476 for (;it!=itEnd;++it){
478 if (it->m_etaPart !=
std::abs(other->second.getEtaPartition())
479 || it->m_hwPlane !=
std::abs(other->second.getHwPlane()-1)
480 || it->m_index != index)
continue;
491 for (;it!=itEnd;++it){
494 if (it->m_tower !=
std::abs(refTower) || it->m_LP != logplane-1)
continue;
516 return std::make_pair(logplane,lpSize);
edm::ESHandle< RPCGeometry > m_rpcGeometry
depends_on::OneHolder< T, TDependsOnRecord > dependsOn(void(T::*iT)(const TDependsOnRecord &))
RPCConeBuilder(const edm::ParameterSet &)
const TRingToLPVec & getRingToLPVec() const
const TRingToTowerVec & getRingToTowerVec() const
void geometryCallback(const MuonGeometryRecord &)
std::pair< int, int > areConnected(RPCStripsRing::TIdToRindMap::iterator ref, RPCStripsRing::TIdToRindMap::iterator other)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
void buildCones(const edm::ESHandle< RPCGeometry > &rpcGeom)
std::vector< TOtherConnStruct > TOtherConnStructVec
void get(HolderT &iHolder) const
Abs< T >::type abs(const T &t)
void coneDefCallback(const L1RPCConeDefinitionRcd &)
int m_towerBeg
Returns logplane number for this connection, if not connected returns -1. In second lpSize...
const TLPSizeVec & getLPSizeVec() const
edm::ESHandle< L1RPCConeDefinition > m_L1RPCConeDefinition
RPCStripsRing::TIdToRindMap m_ringsMap
virtual const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
std::shared_ptr< L1RPCConeBuilder > ReturnType
ReturnType produce(const L1RPCConeBuilderRcd &)
TIdToRindMap::iterator m_it