#include <TracktoRPC.h>
Public Member Functions | |
std::set< RPCDetId > | GetRolls (CSCStationIndex2 cscstationindex) |
ObjectMap2CSC (const edm::EventSetup &iSetup) | |
Static Public Member Functions | |
static ObjectMap2CSC * | GetInstance (const edm::EventSetup &iSetup) |
Public Attributes | |
std::map< CSCStationIndex2, std::set< RPCDetId > > | rollstoreCSC |
Static Private Attributes | |
static ObjectMap2CSC * | mapInstance = NULL |
Definition at line 154 of file TracktoRPC.h.
ObjectMap2CSC::ObjectMap2CSC | ( | const edm::EventSetup & | iSetup | ) |
Definition at line 82 of file TracktoRPC.cc.
References edm::EventSetup::get(), csvReporter::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; } CSCStationIndex2 ind(region,cscstation,cscring,cscchamber); std::set<RPCDetId> myrolls; if (rollstoreCSC.find(ind)!=rollstoreCSC.end()) myrolls=rollstoreCSC[ind]; myrolls.insert(rpcId); rollstoreCSC[ind]=myrolls; } } } } }
ObjectMap2CSC * ObjectMap2CSC::GetInstance | ( | const edm::EventSetup & | iSetup | ) | [static] |
Definition at line 75 of file TracktoRPC.cc.
References mapInstance, NULL, and ObjectMap2CSC().
Referenced by TracktoRPC::TracktoRPC().
{ if (mapInstance == NULL){ mapInstance = new ObjectMap2CSC(iSetup); } return mapInstance; }
std::set<RPCDetId> ObjectMap2CSC::GetRolls | ( | CSCStationIndex2 | cscstationindex | ) | [inline] |
Definition at line 157 of file TracktoRPC.h.
References mapInstance, and rollstoreCSC.
Referenced by TracktoRPC::TracktoRPC().
{return mapInstance->rollstoreCSC[cscstationindex];}
ObjectMap2CSC * ObjectMap2CSC::mapInstance = NULL [static, private] |
Definition at line 162 of file TracktoRPC.h.
Referenced by GetInstance(), and GetRolls().
std::map<CSCStationIndex2,std::set<RPCDetId> > ObjectMap2CSC::rollstoreCSC |
Definition at line 159 of file TracktoRPC.h.
Referenced by GetRolls(), and ObjectMap2CSC().