CMS 3D CMS Logo

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

#include <DTObjectMap.h>

Public Member Functions

 DTObjectMap (RPCGeometry const &rpcGeometry)
 
std::set< RPCDetId > const & getRolls (DTStationIndex index) const
 

Private Attributes

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

Detailed Description

Definition at line 11 of file DTObjectMap.h.

Constructor & Destructor Documentation

◆ DTObjectMap()

DTObjectMap::DTObjectMap ( RPCGeometry const &  rpcGeometry)

Definition at line 12 of file DTObjectMap.cc.

12  {
13  for (TrackingGeometry::DetContainer::const_iterator it = rpcGeo.dets().begin(); it < rpcGeo.dets().end(); it++) {
14  if (dynamic_cast<const RPCChamber*>(*it) != nullptr) {
15  auto ch = dynamic_cast<const RPCChamber*>(*it);
16  std::vector<const RPCRoll*> roles = (ch->rolls());
17  for (std::vector<const RPCRoll*>::const_iterator r = roles.begin(); r != roles.end(); ++r) {
18  RPCDetId rpcId = (*r)->id();
19  int region = rpcId.region();
20  if (region == 0) {
21  int wheel = rpcId.ring();
22  int sector = rpcId.sector();
23  int station = rpcId.station();
24  DTStationIndex ind(region, wheel, sector, station);
25  std::set<RPCDetId> myrolls;
26  if (rollstore.find(ind) != rollstore.end())
27  myrolls = rollstore[ind];
28  myrolls.insert(rpcId);
29  rollstore[ind] = myrolls;
30  }
31  }
32  }
33  }
34 }

References RPCGeometry::dets(), alignCSCRings::r, RPCDetId::region(), HLT_FULL_cff::region, RPCDetId::ring(), rollstore, RPCDetId::sector(), relativeConstraints::station, RPCDetId::station(), and makeMuonMisalignmentScenario::wheel.

Member Function Documentation

◆ getRolls()

std::set< RPCDetId > const & DTObjectMap::getRolls ( DTStationIndex  index) const

Definition at line 36 of file DTObjectMap.cc.

36  {
37  // FIXME
38  // the present inplementation allows for NOT finding the given index in the map;
39  // a muon expert should check that this is the intended behaviour.
40  static const std::set<RPCDetId> empty;
41  return (rollstore.find(index) == rollstore.end()) ? empty : rollstore.at(index);
42 }

References relativeConstraints::empty, and rollstore.

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

Member Data Documentation

◆ rollstore

std::map<DTStationIndex, std::set<RPCDetId> > DTObjectMap::rollstore
private

Definition at line 18 of file DTObjectMap.h.

Referenced by DTObjectMap(), and getRolls().

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
DTStationIndex
Definition: DTStationIndex.h:4
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:84949
RPCDetId::ring
int ring() const
Definition: RPCDetId.h:59
alignCSCRings.r
r
Definition: alignCSCRings.py:93
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
RPCDetId::sector
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:81
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
DTObjectMap::rollstore
std::map< DTStationIndex, std::set< RPCDetId > > rollstore
Definition: DTObjectMap.h:18