CMS 3D CMS Logo

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

#include <DTObjectMap.h>

Public Member Functions

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

Private Attributes

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

Detailed Description

Definition at line 12 of file DTObjectMap.h.

Constructor & Destructor Documentation

DTObjectMap::DTObjectMap ( MuonGeometryRecord const &  record)

Definition at line 13 of file DTObjectMap.cc.

References edm::eventsetup::EventSetupRecord::get(), alignCSCRings::r, RPCDetId::region(), HLT_FULL_cff::region, RPCDetId::ring(), rollstore, RPCDetId::sector(), relativeConstraints::station, and RPCDetId::station().

14 {
16  record.get(rpcGeo);
17 
19  record.get(dtGeo);
20 
21  for (TrackingGeometry::DetContainer::const_iterator it=rpcGeo->dets().begin();it<rpcGeo->dets().end();it++){
22  if(dynamic_cast<const RPCChamber* >( *it ) != 0 ){
23  auto ch = dynamic_cast<const RPCChamber* >( *it );
24  std::vector< const RPCRoll*> roles = (ch->rolls());
25  for(std::vector<const RPCRoll*>::const_iterator r = roles.begin();r != roles.end(); ++r){
26  RPCDetId rpcId = (*r)->id();
27  int region=rpcId.region();
28  if(region==0){
29  int wheel=rpcId.ring();
30  int sector=rpcId.sector();
31  int station=rpcId.station();
32  DTStationIndex ind(region,wheel,sector,station);
33  std::set<RPCDetId> myrolls;
34  if (rollstore.find(ind)!=rollstore.end()) myrolls=rollstore[ind];
35  myrolls.insert(rpcId);
36  rollstore[ind]=myrolls;
37  }
38  }
39  }
40  }
41 }
JetCorrectorParameters::Record record
Definition: classes.h:7
int ring() const
Definition: RPCDetId.h:72
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:102
std::map< DTStationIndex, std::set< RPCDetId > > rollstore
Definition: DTObjectMap.h:19
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

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

Definition at line 43 of file DTObjectMap.cc.

References relativeConstraints::empty, and rollstore.

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

Member Data Documentation

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

Definition at line 19 of file DTObjectMap.h.

Referenced by DTObjectMap(), and getRolls().