RecoLocalMuon
RPCRecHit
src
DTObjectMap.cc
Go to the documentation of this file.
1
#include "
FWCore/Framework/interface/EventSetup.h
"
2
#include "
FWCore/Framework/interface/ESHandle.h
"
3
#include "
Geometry/Records/interface/MuonGeometryRecord.h
"
4
#include "
Geometry/CommonDetUnit/interface/TrackingGeometry.h
"
5
#include "
Geometry/RPCGeometry/interface/RPCGeometry.h
"
6
#include "
Geometry/RPCGeometry/interface/RPCGeomServ.h
"
7
#include "
Geometry/RPCGeometry/interface/RPCChamber.h
"
8
#include "
Geometry/RPCGeometry/interface/RPCRoll.h
"
9
#include "
RecoLocalMuon/RPCRecHit/src/DTObjectMap.h
"
10
#include "
RecoLocalMuon/RPCRecHit/src/DTStationIndex.h
"
11
12
DTObjectMap::DTObjectMap
(
RPCGeometry
const
& rpcGeo) {
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
}
35
36
std::set<RPCDetId>
const
&
DTObjectMap::getRolls
(
DTStationIndex
index
)
const
{
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
}
43
44
// register the class with the typelookup system used by the EventSetup
45
#include "
FWCore/Utilities/interface/typelookup.h
"
46
TYPELOOKUP_DATA_REG
(
DTObjectMap
);
DTObjectMap::DTObjectMap
DTObjectMap(RPCGeometry const &rpcGeometry)
Definition:
DTObjectMap.cc:12
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
ESHandle.h
relativeConstraints.station
station
Definition:
relativeConstraints.py:67
RPCDetId
Definition:
RPCDetId.h:16
RPCChamber.h
typelookup.h
TrackingGeometry.h
RPCRoll.h
DTStationIndex
Definition:
DTStationIndex.h:4
RPCGeomServ.h
DTObjectMap::getRolls
std::set< RPCDetId > const & getRolls(DTStationIndex index) const
Definition:
DTObjectMap.cc:36
DTObjectMap
Definition:
DTObjectMap.h:11
DTObjectMap.h
RPCGeometry::dets
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
Definition:
RPCGeometry.cc:24
makeMuonMisalignmentScenario.wheel
wheel
Definition:
makeMuonMisalignmentScenario.py:319
HLT_FULL_cff.region
region
Definition:
HLT_FULL_cff.py:88286
DTStationIndex.h
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
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
EventSetup.h
AlignmentPI::index
index
Definition:
AlignmentPayloadInspectorHelper.h:46
RPCGeometry
Definition:
RPCGeometry.h:20
MuonGeometryRecord.h
RPCGeometry.h
DTObjectMap::rollstore
std::map< DTStationIndex, std::set< RPCDetId > > rollstore
Definition:
DTObjectMap.h:18
Generated for CMSSW Reference Manual by
1.8.16