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.

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

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();
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 }
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:81
int ring() const
Definition: RPCDetId.h:59
int station() const
Definition: RPCDetId.h:78
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:53
std::map< DTStationIndex, std::set< RPCDetId > > rollstore
Definition: DTObjectMap.h:18

Member Function Documentation

◆ getRolls()

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

Definition at line 36 of file DTObjectMap.cc.

References relativeConstraints::empty, and rollstore.

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

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 }
std::map< DTStationIndex, std::set< RPCDetId > > rollstore
Definition: DTObjectMap.h:18

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