CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CSCObjectMap Class Reference

#include <CSCObjectMap.h>

Public Member Functions

 CSCObjectMap (RPCGeometry const &rpcGeom)
 
std::set< RPCDetId > const & getRolls (CSCStationIndex index) const
 

Private Attributes

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

Detailed Description

Definition at line 11 of file CSCObjectMap.h.

Constructor & Destructor Documentation

◆ CSCObjectMap()

CSCObjectMap::CSCObjectMap ( RPCGeometry const &  rpcGeom)

Definition at line 11 of file CSCObjectMap.cc.

11  {
12  for (TrackingGeometry::DetContainer::const_iterator it = rpcGeo.dets().begin(); it < rpcGeo.dets().end(); it++) {
13  if (dynamic_cast<const RPCChamber*>(*it) != nullptr) {
14  auto ch = dynamic_cast<const RPCChamber*>(*it);
15  std::vector<const RPCRoll*> roles = (ch->rolls());
16  for (std::vector<const RPCRoll*>::const_iterator r = roles.begin(); r != roles.end(); ++r) {
17  RPCDetId rpcId = (*r)->id();
18  int region = rpcId.region();
19  if (region != 0) {
20  int station = rpcId.station();
21  int ring = rpcId.ring();
22  int cscring = ring;
23  int cscstation = station;
24  RPCGeomServ rpcsrv(rpcId);
25  int rpcsegment = rpcsrv.segment();
26  int cscchamber = rpcsegment; //FIX THIS ACCORDING TO RPCGeomServ::segment()Definition
27  if ((station == 2 || station == 3) && ring == 3) { //Adding Ring 3 of RPC to the CSC Ring 2
28  cscring = 2;
29  }
30  CSCStationIndex ind(region, cscstation, cscring, cscchamber);
31  std::set<RPCDetId> myrolls;
32  if (rollstore.find(ind) != rollstore.end())
33  myrolls = rollstore[ind];
34  myrolls.insert(rpcId);
35  rollstore[ind] = myrolls;
36  }
37  }
38  }
39  }
40 }

References RPCGeometry::dets(), alignCSCRings::r, RPCDetId::region(), HLT_FULL_cff::region, RPCDetId::ring(), relativeConstraints::ring, rollstore, RPCGeomServ::segment(), relativeConstraints::station, and RPCDetId::station().

Member Function Documentation

◆ getRolls()

std::set< RPCDetId > const & CSCObjectMap::getRolls ( CSCStationIndex  index) const

Definition at line 42 of file CSCObjectMap.cc.

42  {
43  // FIXME
44  // the present inplementation allows for NOT finding the given index in the map;
45  // a muon expert should check that this is the intended behaviour.
46  static const std::set<RPCDetId> empty;
47  return (rollstore.find(index) == rollstore.end()) ? empty : rollstore.at(index);
48 }

References relativeConstraints::empty, and rollstore.

Referenced by CSCSegtoRPC::thePoints(), and TracktoRPC::thePoints().

Member Data Documentation

◆ rollstore

std::map<CSCStationIndex, std::set<RPCDetId> > CSCObjectMap::rollstore
private

Definition at line 18 of file CSCObjectMap.h.

Referenced by CSCObjectMap(), and getRolls().

RPCGeomServ
Definition: RPCGeomServ.h:8
RPCDetId::station
int station() const
Definition: RPCDetId.h:78
RPCDetId::region
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:53
relativeConstraints.station
station
Definition: relativeConstraints.py:67
RPCDetId
Definition: RPCDetId.h:16
CSCObjectMap::rollstore
std::map< CSCStationIndex, std::set< RPCDetId > > rollstore
Definition: CSCObjectMap.h:18
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88271
RPCDetId::ring
int ring() const
Definition: RPCDetId.h:59
alignCSCRings.r
r
Definition: alignCSCRings.py:93
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
CSCStationIndex
Definition: GEMCSCSegmentBuilder.h:32