|
|
#include <MuonRPCDetLayerGeometryBuilder.h>
Build the RPC DetLayers.
- Author
- N. Amapane - CERN
Definition at line 19 of file MuonRPCDetLayerGeometryBuilder.h.
◆ MuonRPCDetLayerGeometryBuilder()
MuonRPCDetLayerGeometryBuilder::MuonRPCDetLayerGeometryBuilder |
( |
| ) |
|
|
inline |
◆ ~MuonRPCDetLayerGeometryBuilder()
MuonRPCDetLayerGeometryBuilder::~MuonRPCDetLayerGeometryBuilder |
( |
| ) |
|
|
virtual |
◆ buildBarrelLayers()
vector< DetLayer * > MuonRPCDetLayerGeometryBuilder::buildBarrelLayers |
( |
const RPCGeometry & |
geo | ) |
|
|
static |
Builds the barrel layers. Result vector is sorted inside-out.
Definition at line 150 of file MuonRPCDetLayerGeometryBuilder.cc.
151 const std::string metname =
"Muon|RPC|RecoMuon|RecoMuonDetLayers|MuonRPCDetLayerGeometryBuilder";
153 vector<DetLayer*> detlayers;
154 vector<MuRodBarrelLayer*>
result;
158 vector<const GeomDet*> geomDets;
167 geomDets.push_back(geomDet);
180 for (vector<MuRodBarrelLayer*>::const_iterator it =
result.begin(); it !=
result.end(); it++)
181 detlayers.push_back((
DetLayer*)(*it));
References RPCGeometry::idToDet(), LogTrace, RPCDetId::maxLayerId, RPCDetId::maxRingBarrelId, RPCDetId::maxRollId, RPCDetId::maxSectorId, RPCDetId::maxStationId, RPCDetId::maxSubSectorId, metname, RPCDetId::minLayerId, RPCDetId::minRingBarrelId, RPCDetId::minRollId, RPCDetId::minSectorId, RPCDetId::minStationId, RPCDetId::minSubSectorId, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), GeomDet::position(), HLT_2018_cff::region, mps_fire::result, relativeConstraints::station, AlCaHLTBitMon_QueryRunRegistry::string, and makeMuonMisalignmentScenario::wheel.
Referenced by MuonDetLayerGeometryESProducer::produce().
◆ buildEndcapLayers()
Builds the forward (+Z, return.first) and backward (-Z, return.second) layers. Both vectors are sorted inside-out
Definition at line 32 of file MuonRPCDetLayerGeometryBuilder.cc.
33 vector<DetLayer*>
result[2];
36 int iendcap = (
endcap == 1) ? 0 : 1;
44 std::vector<int> rings;
45 int FirstStationRing = 1;
46 rings.push_back(FirstStationRing);
48 rolls.push_back(roll);
53 result[iendcap].push_back(ringLayer);
59 std::vector<int> rings;
61 rings.push_back(
ring);
64 rolls.push_back(roll);
69 result[iendcap].push_back(ringLayer);
76 std::vector<int> rings;
78 rings.push_back(
ring);
81 rolls.push_back(roll);
86 result[iendcap].push_back(ringLayer);
90 pair<vector<DetLayer*>, vector<DetLayer*> > res_pair(
result[0],
result[1]);
References makeMuonMisalignmentScenario::endcap, RPCDetId::maxLayerId, RPCDetId::maxRingForwardId, RPCDetId::maxRollId, RPCDetId::maxStationId, RPCDetId::minLayerId, RPCDetId::minRingForwardId, RPCDetId::minRollId, mps_fire::result, relativeConstraints::ring, and relativeConstraints::station.
Referenced by MuonDetLayerGeometryESProducer::produce().
◆ buildLayer()
MuRingForwardDoubleLayer * MuonRPCDetLayerGeometryBuilder::buildLayer |
( |
int |
endcap, |
|
|
const std::vector< int > & |
rings, |
|
|
int |
station, |
|
|
int |
layer, |
|
|
std::vector< int > & |
rolls, |
|
|
const RPCGeometry & |
geo |
|
) |
| |
|
staticprivate |
Definition at line 94 of file MuonRPCDetLayerGeometryBuilder.cc.
96 const std::string metname =
"Muon|RPC|RecoMuon|RecoMuonDetLayers|MuonRPCDetLayerGeometryBuilder";
98 vector<const ForwardDetRing*> frontRings, backRings;
100 for (std::vector<int>::const_iterator
ring = rings.begin();
ring < rings.end(); ++
ring) {
101 for (vector<int>::iterator roll = rolls.begin(); roll != rolls.end(); ++roll) {
102 vector<const GeomDet*> frontDets, backDets;
106 bool isInFront =
isFront(rpcId);
110 frontDets.push_back(geomDet);
112 backDets.push_back(geomDet);
114 LogTrace(
metname) <<
"get RPC Endcap roll " << rpcId << (isInFront ?
"front" :
"back ")
120 if (!frontDets.empty()) {
122 frontRings.push_back(
new MuDetRing(frontDets));
124 <<
" chambers at z=" << frontRings.back()->position().z();
126 if (!backDets.empty()) {
128 backRings.push_back(
new MuDetRing(backDets));
130 <<
" chambers at z=" << backRings.back()->position().z();
137 if (!backRings.empty() || !frontRings.empty()) {
143 LogTrace(
metname) <<
"New layer with " << frontRings.size() <<
" front rings and " << backRings.size()
144 <<
" back rings, at Z " <<
result->position().z();
References makeMuonMisalignmentScenario::endcap, RPCGeometry::idToDet(), LogTrace, RPCDetId::maxSectorForwardId, metname, RPCDetId::minSectorForwardId, RPCDetId::minSubSectorForwardId, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), GeomDet::position(), precomputed_value_sort(), mps_fire::result, relativeConstraints::ring, relativeConstraints::station, AlCaHLTBitMon_QueryRunRegistry::string, and PV3DBase< T, PVType, FrameType >::z().
◆ isFront()
bool MuonRPCDetLayerGeometryBuilder::isFront |
( |
const RPCDetId & |
rpcId | ) |
|
|
staticprivate |
◆ makeBarrelLayers()
void MuonRPCDetLayerGeometryBuilder::makeBarrelLayers |
( |
std::vector< const GeomDet * > & |
geomDets, |
|
|
std::vector< MuRodBarrelLayer * > & |
result |
|
) |
| |
|
staticprivate |
Definition at line 186 of file MuonRPCDetLayerGeometryBuilder.cc.
188 const std::string metname =
"Muon|RPC|RecoMuon|RecoMuonDetLayers|MuonRPCDetLayerGeometryBuilder";
195 float r0 =
float(geomDets.front()->position().perp());
201 vector<const GeomDet*>::iterator
first = geomDets.begin();
202 vector<const GeomDet*>::iterator
last = geomDets.end();
204 for (vector<const GeomDet*>::iterator
i =
first;
i !=
last;
i++) {
205 hisR.fill(
float((*i)->position().perp()) - r0);
208 vector<float> rClust = hisR.clusterize(
resolution);
212 vector<const GeomDet*>::iterator layerStart =
first;
213 vector<const GeomDet*>::iterator separ =
first;
215 for (
unsigned int i = 0;
i < rClust.size();
i++) {
217 if (
i < rClust.size() - 1) {
218 rSepar = (rClust[
i] + rClust[
i + 1]) / 2.
f;
225 while (separ <
last &&
float((*separ)->position().perp()) - r0 < rSepar) {
230 if (
int(separ - layerStart) > 0) {
232 vector<const DetRod*> rods;
233 vector<const GeomDet*> layerDets(layerStart, separ);
238 LogTrace(
metname) <<
" New MuRodBarrelLayer with " << rods.size() <<
" rods, at R "
239 <<
result.back()->specificSurface().radius();
References f, dqmdumpme::first, dqmMemoryStats::float, mps_fire::i, dqmdumpme::last, LogTrace, metname, precomputed_value_sort(), L1TObjectsTimingClient_cff::resolution, mps_fire::result, photonAnalyzer_cfi::rMax, photonAnalyzer_cfi::rMin, and AlCaHLTBitMon_QueryRunRegistry::string.
◆ makeBarrelRods()
void MuonRPCDetLayerGeometryBuilder::makeBarrelRods |
( |
std::vector< const GeomDet * > & |
geomDets, |
|
|
std::vector< const DetRod * > & |
result |
|
) |
| |
|
staticprivate |
Definition at line 246 of file MuonRPCDetLayerGeometryBuilder.cc.
247 const std::string metname =
"Muon|RPC|RecoMuon|RecoMuonDetLayers|MuonRPCDetLayerGeometryBuilder";
254 float phi0 =
float(geomDets.front()->position().phi());
260 vector<const GeomDet*>::iterator
first = geomDets.begin();
261 vector<const GeomDet*>::iterator
last = geomDets.end();
263 for (vector<const GeomDet*>::iterator
i =
first;
i !=
last;
i++) {
264 hisPhi.fill(
float((*i)->position().phi()) - phi0);
267 vector<float> phiClust = hisPhi.clusterize(
resolution);
271 vector<const GeomDet*>::iterator rodStart =
first;
272 vector<const GeomDet*>::iterator separ =
first;
274 for (
unsigned int i = 0;
i < phiClust.size();
i++) {
276 if (
i < phiClust.size() - 1) {
277 phiSepar = (phiClust[
i] + phiClust[
i + 1]) / 2.
f;
284 while (separ <
last &&
float((*separ)->position().phi()) - phi0 < phiSepar) {
289 if (
int(separ - rodStart) > 0) {
292 <<
" rolls at R=" << (*rodStart)->position().perp()
293 <<
", phi=" <<
float((*rodStart)->position().phi());
References f, dqmdumpme::first, dqmMemoryStats::float, mps_fire::i, createfilelist::int, dqmdumpme::last, LogTrace, metname, AlignmentTrackSelector_cfi::phiMax, AlignmentTrackSelector_cfi::phiMin, precomputed_value_sort(), L1TObjectsTimingClient_cff::resolution, mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.
static const int maxSectorForwardId
const Surface::PositionType & position() const
The position (origin of the R.F.)
int subsector() const
SubSector id : some sectors are divided along the phi direction in subsectors (from 1 to 4 in Barrel,...
static const int minRingBarrelId
static const int minRollId
static const int maxRollId
static bool isFront(const RPCDetId &rpcId)
static const int minSectorForwardId
ExtractPhi< GeomDet, float > DetPhi
static const int maxSubSectorId
static const int minLayerId
static const int minSubSectorId
static const int minSectorId
static MuRingForwardDoubleLayer * buildLayer(int endcap, const std::vector< int > &rings, int station, int layer, std::vector< int > &rolls, const RPCGeometry &geo)
static const int minRingForwardId
static const int maxRingBarrelId
static const int minStationId
static void makeBarrelRods(std::vector< const GeomDet * > &geomDets, std::vector< const DetRod * > &result)
static const int maxRingForwardId
static void makeBarrelLayers(std::vector< const GeomDet * > &geomDets, std::vector< MuRodBarrelLayer * > &result)
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
static const int minSubSectorForwardId
ExtractR< GeomDet, float > DetR
const GeomDet * idToDet(DetId) const override
static const int maxStationId
static const int maxLayerId
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr, const Compare &comp)
Geom::Phi< T > phi() const
const std::string metname
static const int maxSectorId