43 m_towerBeg(iConfig.getParameter<int>(
"towerBeg")),
44 m_towerEnd(iConfig.getParameter<int>(
"towerEnd")),
45 m_runOnceBuildCones(
false)
123 using namespace edm::es;
124 boost::shared_ptr<L1RPCConeBuilder> pL1RPCConeBuilder( (
new 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 boost::shared_ptr<L1RPCConeBuilder::TConMap > uncompressedCons
196 for(TrackingGeometry::DetContainer::const_iterator it = rpcGeom->dets().begin();
197 it != rpcGeom->dets().end();
201 if( dynamic_cast< RPCRoll const * >( *it ) == 0 )
continue;
218 RPCStripsRing::TIdToRindMap::iterator it =
m_ringsMap.begin();
225 it->second.filterOverlapingChambers();
226 it->second.fillWithVirtualStrips();
235 int etaPart = it->first%100;
236 if (it->second.isReferenceRing() && (it->second.size() != 1152)){
242 throw cms::Exception(
"RPCInternal") <<
"Problem: refring " << it->first
243 <<
" has " << it->second.size() <<
" strips \n";
254 int sign = key/100 - (key/1000)*10;
265 throw cms::Exception(
"RPCInternal") <<
" Size differs for ring " << key <<
" +- 100 \n";
280 RPCStripsRing::TIdToRindMap::iterator itRef =
m_ringsMap.begin();
286 if (!itRef->second.isReferenceRing())
continue;
288 RPCStripsRing::TIdToRindMap::iterator itOther =
m_ringsMap.begin();
289 for (;itOther !=
m_ringsMap.end(); ++itOther){
291 if (itOther->second.isReferenceRing())
continue;
294 if ( pr.first != -1 ) {
296 newOtherConn.
m_it = itOther;
299 ringsToConnect.push_back(newOtherConn);
307 if (prRef.first == -1){
308 throw cms::Exception(
"RPCConfig") <<
" Cannot determine logplane for reference ring "
309 << itRef->first <<
"\n ";
324 itRef->second.createRefConnections(ringsToConnect, prRef.first, prRef.second);
353 RPCStripsRing::TIdToRindMap::iterator other){
360 if ( ref->second.getEtaPartition()*other->second.getEtaPartition()<0 )
361 return std::make_pair(-1,0);
380 L1RPCConeDefinition::TRingToTowerVec::const_iterator itRef
383 const L1RPCConeDefinition::TRingToTowerVec::const_iterator itEnd
386 L1RPCConeDefinition::TRingToTowerVec::const_iterator itOther = itRef;
392 for (;itRef != itEnd; ++itRef){
393 if ( itRef->m_etaPart !=
std::abs(ref->second.getEtaPartition())
394 || itRef->m_hwPlane !=
std::abs(ref->second.getHwPlane()-1)
398 refTower = itRef->m_tower;
400 for (;itOther != itEnd; ++itOther){
401 if ( itOther->m_etaPart !=
std::abs(other->second.getEtaPartition())
402 || itOther->m_hwPlane !=
std::abs(other->second.getHwPlane()-1)
405 if (itOther->m_tower == refTower) index = itOther->m_index;
414 <<
"wants to be connected to " << refTowerCnt <<
" towers \n";
421 <<
" is not connected anywhere \n";
475 L1RPCConeDefinition::TRingToLPVec::const_iterator it =
m_L1RPCConeDefinition->getRingToLPVec().begin();
476 L1RPCConeDefinition::TRingToLPVec::const_iterator itEnd =
m_L1RPCConeDefinition->getRingToLPVec().end();
477 for (;it!=itEnd;++it){
479 if (it->m_etaPart !=
std::abs(other->second.getEtaPartition())
480 || it->m_hwPlane !=
std::abs(other->second.getHwPlane()-1)
481 || it->m_index != index)
continue;
492 for (;it!=itEnd;++it){
495 if (it->m_tower !=
std::abs(refTower) || it->m_LP != logplane-1)
continue;
517 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 &)
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)
boost::shared_ptr< L1RPCConeBuilder > ReturnType
std::vector< TOtherConnStruct > TOtherConnStructVec
void get(HolderT &iHolder) const
Abs< T >::type abs(const T &t)
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
void coneDefCallback(const L1RPCConeDefinitionRcd &)
int m_towerBeg
Returns logplane number for this connection, if not connected returns -1. In second lpSize...
edm::ESHandle< L1RPCConeDefinition > m_L1RPCConeDefinition
RPCStripsRing::TIdToRindMap m_ringsMap
std::map< uint32_t, TStrip2ConVec > TConMap
ReturnType produce(const L1RPCConeBuilderRcd &)
volatile std::atomic< bool > shutdown_flag false
TIdToRindMap::iterator m_it