CMS 3D CMS Logo

CSCObjectMap.cc
Go to the documentation of this file.
10 
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 }
41 
42 std::set<RPCDetId> const& CSCObjectMap::getRolls(CSCStationIndex index) const {
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 }
49 
50 // register the class with the typelookup system used by the EventSetup
CSCStationIndex.h
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
CSCObjectMap.h
ESHandle.h
relativeConstraints.station
station
Definition: relativeConstraints.py:67
RPCDetId
Definition: RPCDetId.h:16
RPCChamber.h
typelookup.h
TrackingGeometry.h
RPCRoll.h
CSCObjectMap::CSCObjectMap
CSCObjectMap(RPCGeometry const &rpcGeom)
Definition: CSCObjectMap.cc:11
RPCGeomServ.h
CSCObjectMap::getRolls
std::set< RPCDetId > const & getRolls(CSCStationIndex index) const
Definition: CSCObjectMap.cc:42
RPCGeometry::dets
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
Definition: RPCGeometry.cc:24
CSCObjectMap::rollstore
std::map< CSCStationIndex, std::set< RPCDetId > > rollstore
Definition: CSCObjectMap.h:18
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88272
TYPELOOKUP_DATA_REG
#define TYPELOOKUP_DATA_REG(_dataclass_)
Definition: typelookup.h:102
RPCDetId::ring
int ring() const
Definition: RPCDetId.h:59
alignCSCRings.r
r
Definition: alignCSCRings.py:93
RPCGeomServ::segment
virtual int segment()
Definition: RPCGeomServ.cc:361
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
EventSetup.h
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
RPCGeometry
Definition: RPCGeometry.h:20
CSCStationIndex
Definition: GEMCSCSegmentBuilder.h:32
RPCGeometry.h
CSCObjectMap
Definition: CSCObjectMap.h:11