#include <CSCSegtoRPC.h>
Public Member Functions | |
std::set< RPCDetId > | GetRolls (CSCStationIndex cscstationindex) |
ObjectMapCSC (const edm::EventSetup &iSetup) | |
Static Public Member Functions | |
static ObjectMapCSC * | GetInstance (const edm::EventSetup &iSetup) |
Public Attributes | |
std::map< CSCStationIndex, std::set< RPCDetId > > | rollstoreCSC |
Static Private Attributes | |
static ObjectMapCSC * | mapInstance = NULL |
Definition at line 55 of file CSCSegtoRPC.h.
ObjectMapCSC::ObjectMapCSC | ( | const edm::EventSetup & | iSetup | ) |
Definition at line 23 of file CSCSegtoRPC.cc.
References edm::EventSetup::get(), alignCSCRings::r, RPCDetId::region(), RPCDetId::ring(), relativeConstraints::ring, RPCChamber::rolls(), rollstoreCSC, RPCGeomServ::segment(), relativeConstraints::station, and RPCDetId::station().
Referenced by GetInstance().
{ edm::ESHandle<RPCGeometry> rpcGeo; edm::ESHandle<CSCGeometry> cscGeo; iSetup.get<MuonGeometryRecord>().get(rpcGeo); iSetup.get<MuonGeometryRecord>().get(cscGeo); for (TrackingGeometry::DetContainer::const_iterator it=rpcGeo->dets().begin();it<rpcGeo->dets().end();it++){ if(dynamic_cast< RPCChamber* >( *it ) != 0 ){ RPCChamber* ch = dynamic_cast< RPCChamber* >( *it ); std::vector< const RPCRoll*> roles = (ch->rolls()); for(std::vector<const RPCRoll*>::const_iterator r = roles.begin();r != roles.end(); ++r){ RPCDetId rpcId = (*r)->id(); int region=rpcId.region(); if(region!=0){ int station=rpcId.station(); int ring=rpcId.ring(); int cscring=ring; int cscstation=station; RPCGeomServ rpcsrv(rpcId); int rpcsegment = rpcsrv.segment(); int cscchamber = rpcsegment; //FIX THIS ACCORDING TO RPCGeomServ::segment()Definition if((station==2||station==3)&&ring==3){//Adding Ring 3 of RPC to the CSC Ring 2 cscring = 2; } CSCStationIndex ind(region,cscstation,cscring,cscchamber); std::set<RPCDetId> myrolls; if (rollstoreCSC.find(ind)!=rollstoreCSC.end()) myrolls=rollstoreCSC[ind]; myrolls.insert(rpcId); rollstoreCSC[ind]=myrolls; } } } } }
ObjectMapCSC * ObjectMapCSC::GetInstance | ( | const edm::EventSetup & | iSetup | ) | [static] |
Definition at line 16 of file CSCSegtoRPC.cc.
References mapInstance, NULL, and ObjectMapCSC().
Referenced by CSCSegtoRPC::CSCSegtoRPC().
{ if (mapInstance == NULL){ mapInstance = new ObjectMapCSC(iSetup); } return mapInstance; }
std::set<RPCDetId> ObjectMapCSC::GetRolls | ( | CSCStationIndex | cscstationindex | ) | [inline] |
Definition at line 58 of file CSCSegtoRPC.h.
References mapInstance, and rollstoreCSC.
Referenced by CSCSegtoRPC::CSCSegtoRPC().
{return mapInstance->rollstoreCSC[cscstationindex];}
ObjectMapCSC * ObjectMapCSC::mapInstance = NULL [static, private] |
Definition at line 63 of file CSCSegtoRPC.h.
Referenced by GetInstance(), and GetRolls().
std::map<CSCStationIndex,std::set<RPCDetId> > ObjectMapCSC::rollstoreCSC |
Definition at line 60 of file CSCSegtoRPC.h.
Referenced by GetRolls(), and ObjectMapCSC().