CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Static Private Attributes
ObjectMapCSC Class Reference

#include <CSCSegtoRPC.h>

Public Member Functions

std::set< RPCDetIdGetRolls (CSCStationIndex cscstationindex)
 
 ObjectMapCSC (const edm::EventSetup &iSetup)
 

Static Public Member Functions

static ObjectMapCSCGetInstance (const edm::EventSetup &iSetup)
 

Public Attributes

std::map< CSCStationIndex,
std::set< RPCDetId > > 
rollstoreCSC
 

Static Private Attributes

static ObjectMapCSCmapInstance = NULL
 

Detailed Description

Definition at line 55 of file CSCSegtoRPC.h.

Constructor & Destructor Documentation

ObjectMapCSC::ObjectMapCSC ( const edm::EventSetup iSetup)

Definition at line 23 of file CSCSegtoRPC.cc.

References edm::EventSetup::get(), alignCSCRings::r, RPCDetId::region(), HLT_50ns_5e33_v2_cff::region, relativeConstraints::ring, RPCDetId::ring(), rollstoreCSC, RPCGeomServ::segment(), relativeConstraints::station, and RPCDetId::station().

Referenced by GetInstance().

23  {
26 
27  iSetup.get<MuonGeometryRecord>().get(rpcGeo);
28  iSetup.get<MuonGeometryRecord>().get(cscGeo);
29 
30  for (TrackingGeometry::DetContainer::const_iterator it=rpcGeo->dets().begin();it<rpcGeo->dets().end();it++){
31  if(dynamic_cast< const RPCChamber* >( *it ) != 0 ){
32  auto ch = dynamic_cast< const RPCChamber* >( *it );
33  std::vector< const RPCRoll*> roles = (ch->rolls());
34  for(std::vector<const RPCRoll*>::const_iterator r = roles.begin();r != roles.end(); ++r){
35  RPCDetId rpcId = (*r)->id();
36  int region=rpcId.region();
37  if(region!=0){
38  int station=rpcId.station();
39  int ring=rpcId.ring();
40  int cscring=ring;
41  int cscstation=station;
42  RPCGeomServ rpcsrv(rpcId);
43  int rpcsegment = rpcsrv.segment();
44  int cscchamber = rpcsegment; //FIX THIS ACCORDING TO RPCGeomServ::segment()Definition
45  if((station==2||station==3)&&ring==3){//Adding Ring 3 of RPC to the CSC Ring 2
46  cscring = 2;
47  }
48  CSCStationIndex ind(region,cscstation,cscring,cscchamber);
49  std::set<RPCDetId> myrolls;
50  if (rollstoreCSC.find(ind)!=rollstoreCSC.end()) myrolls=rollstoreCSC[ind];
51  myrolls.insert(rpcId);
52  rollstoreCSC[ind]=myrolls;
53  }
54  }
55  }
56  }
57 }
int ring() const
Definition: RPCDetId.h:72
std::map< CSCStationIndex, std::set< RPCDetId > > rollstoreCSC
Definition: CSCSegtoRPC.h:60
const T & get() const
Definition: EventSetup.h:55
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:63
int station() const
Definition: RPCDetId.h:96

Member Function Documentation

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().

16  {
17  if (mapInstance == NULL){
18  mapInstance = new ObjectMapCSC(iSetup);
19  }
20  return mapInstance;
21 }
#define NULL
Definition: scimark2.h:8
static ObjectMapCSC * mapInstance
Definition: CSCSegtoRPC.h:63
ObjectMapCSC(const edm::EventSetup &iSetup)
Definition: CSCSegtoRPC.cc:23
std::set<RPCDetId> ObjectMapCSC::GetRolls ( CSCStationIndex  cscstationindex)
inline

Definition at line 58 of file CSCSegtoRPC.h.

References mapInstance, and rollstoreCSC.

Referenced by CSCSegtoRPC::CSCSegtoRPC().

58 {return mapInstance->rollstoreCSC[cscstationindex];}
std::map< CSCStationIndex, std::set< RPCDetId > > rollstoreCSC
Definition: CSCSegtoRPC.h:60
static ObjectMapCSC * mapInstance
Definition: CSCSegtoRPC.h:63

Member Data Documentation

ObjectMapCSC * ObjectMapCSC::mapInstance = NULL
staticprivate

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().