CMS 3D CMS Logo

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

#include <MuonDetLayerGeometry.h>

Inheritance diagram for MuonDetLayerGeometry:
DetLayerGeometry

Public Member Functions

const std::vector< const DetLayer * > & allBackwardLayers () const
 return all backward (-Z) layers (CSC+RPC+GEM+ME0), inside-out More...
 
const std::vector< const DetLayer * > & allBarrelLayers () const
 return all barrel DetLayers (DT+RPC), inside-out More...
 
const std::vector< const DetLayer * > & allCscGemBackwardLayers () const
 return all endcap DetLayers (CSC+GEM), -Z to +Z More...
 
const std::vector< const DetLayer * > & allCscGemForwardLayers () const
 return all endcap DetLayers (CSC+GEM), -Z to +Z More...
 
const std::vector< const DetLayer * > & allCSCLayers () const
 return the CSC DetLayers (endcap), -Z to +Z More...
 
const std::vector< const DetLayer * > & allCscME0BackwardLayers () const
 return all endcap DetLayers (CSC+ME0), -Z to +Z More...
 
const std::vector< const DetLayer * > & allCscME0ForwardLayers () const
 return all endcap DetLayers (CSC+ME0), -Z to +Z More...
 
const std::vector< const DetLayer * > & allDTLayers () const
 return the DT DetLayers (barrel), inside-out More...
 
const std::vector< const DetLayer * > & allEndcapCscGemLayers () const
 return all endcap DetLayers (CSC+GEM), -Z to +Z More...
 
const std::vector< const DetLayer * > & allEndcapCscME0Layers () const
 return all endcap DetLayers (CSC+ME0), -Z to +Z More...
 
const std::vector< const DetLayer * > & allEndcapLayers () const
 return all endcap DetLayers (CSC+RPC+GEM+ME0), -Z to +Z More...
 
const std::vector< const DetLayer * > & allForwardLayers () const
 return all forward (+Z) layers (CSC+RPC+GEM+ME0), inside-out More...
 
const std::vector< const DetLayer * > & allGEMLayers () const
 return the GEM DetLayers (endcap), -Z to +Z More...
 
const std::vector< const DetLayer * > & allLayers () const
 return all layers (DT+CSC+RPC+GEM), order: backward, barrel, forward More...
 
const std::vector< const DetLayer * > & allME0Layers () const
 return the ME0 DetLayers (endcap), -Z to +Z More...
 
const std::vector< const DetLayer * > & allRPCLayers () const
 return all RPC DetLayers, order: backward, barrel, forward More...
 
const std::vector< const DetLayer * > & backwardCSCLayers () const
 return the backward (-Z) CSC DetLayers, inside-out More...
 
const std::vector< const DetLayer * > & backwardGEMLayers () const
 return the backward (-Z) GEM DetLayers, inside-out More...
 
const std::vector< const DetLayer * > & backwardME0Layers () const
 return the backward (-Z) ME0 DetLayers, inside-out More...
 
const std::vector< const DetLayer * > & backwardRPCLayers () const
 return the backward (-Z) RPC DetLayers, inside-out More...
 
const std::vector< const DetLayer * > & barrelRPCLayers () const
 return the barrel RPC DetLayers, inside-out More...
 
const std::vector< const DetLayer * > & endcapRPCLayers () const
 return the endcap RPC DetLayers, -Z to +Z More...
 
const std::vector< const DetLayer * > & forwardCSCLayers () const
 return the forward (+Z) CSC DetLayers, inside-out More...
 
const std::vector< const DetLayer * > & forwardGEMLayers () const
 return the forward (+Z) GEM DetLayers, inside-out More...
 
const std::vector< const DetLayer * > & forwardME0Layers () const
 return the forward (+Z) ME0 DetLayers, inside-out More...
 
const std::vector< const DetLayer * > & forwardRPCLayers () const
 return the forward (+Z) RPC DetLayers, inside-out More...
 
const DetLayeridToLayer (const DetId &detId) const override
 return the DetLayer which correspond to a certain DetId More...
 
 MuonDetLayerGeometry ()
 Constructor. More...
 
 ~MuonDetLayerGeometry () override
 Destructor. More...
 
- Public Member Functions inherited from DetLayerGeometry
 DetLayerGeometry ()
 
virtual ~DetLayerGeometry ()
 

Private Member Functions

void addCSCLayers (const std::pair< std::vector< DetLayer *>, std::vector< DetLayer *> > &csclayers)
 
void addDTLayers (const std::vector< DetLayer *> &dtlayers)
 
void addGEMLayers (const std::pair< std::vector< DetLayer *>, std::vector< DetLayer *> > &gemlayers)
 
void addME0Layers (const std::pair< std::vector< DetLayer *>, std::vector< DetLayer *> > &gemlayers)
 
void addRPCLayers (const std::vector< DetLayer *> &barrelRPCLayers, const std::pair< std::vector< DetLayer *>, std::vector< DetLayer *> > &endcapRPCLayers)
 
DetId makeDetLayerId (const DetLayer *detLayer) const
 
void sortLayers ()
 

Private Attributes

std::vector< const DetLayer * > allBackward
 
std::vector< const DetLayer * > allBarrel
 
std::vector< const DetLayer * > allCscGemBackward
 
std::vector< const DetLayer * > allCscGemForward
 
std::vector< const DetLayer * > allCscME0Backward
 
std::vector< const DetLayer * > allCscME0Forward
 
std::vector< const DetLayer * > allDetLayers
 
std::vector< const DetLayer * > allEndcap
 
std::vector< const DetLayer * > allEndcapCscGem
 
std::vector< const DetLayer * > allEndcapCscME0
 
std::vector< const DetLayer * > allForward
 
std::vector< const DetLayer * > cscLayers_all
 
std::vector< const DetLayer * > cscLayers_bk
 
std::vector< const DetLayer * > cscLayers_fw
 
std::map< DetId, const DetLayer * > detLayersMap
 
std::vector< const DetLayer * > dtLayers
 
std::vector< const DetLayer * > gemLayers_all
 
std::vector< const DetLayer * > gemLayers_bk
 
std::vector< const DetLayer * > gemLayers_fw
 
std::vector< const DetLayer * > me0Layers_all
 
std::vector< const DetLayer * > me0Layers_bk
 
std::vector< const DetLayer * > me0Layers_fw
 
std::vector< const DetLayer * > rpcLayers_all
 
std::vector< const DetLayer * > rpcLayers_barrel
 
std::vector< const DetLayer * > rpcLayers_bk
 
std::vector< const DetLayer * > rpcLayers_endcap
 
std::vector< const DetLayer * > rpcLayers_fw
 

Friends

class MuonDetLayerGeometryESProducer
 

Detailed Description

Provide access to the DetLayers of muon detectors.

Author
N. Amapane - CERN

by R. Radogna & C. Calabria & A. Sharma by D. Nash

Definition at line 21 of file MuonDetLayerGeometry.h.

Constructor & Destructor Documentation

◆ MuonDetLayerGeometry()

MuonDetLayerGeometry::MuonDetLayerGeometry ( )

Constructor.

Definition at line 28 of file MuonDetLayerGeometry.cc.

28 {}

◆ ~MuonDetLayerGeometry()

MuonDetLayerGeometry::~MuonDetLayerGeometry ( )
override

Destructor.

Definition at line 30 of file MuonDetLayerGeometry.cc.

30  {
31  for (vector<const DetLayer*>::const_iterator it = allDetLayers.begin(); it != allDetLayers.end(); ++it) {
32  delete *it;
33  }
34 }
std::vector< const DetLayer * > allDetLayers

Member Function Documentation

◆ addCSCLayers()

void MuonDetLayerGeometry::addCSCLayers ( const std::pair< std::vector< DetLayer *>, std::vector< DetLayer *> > &  csclayers)
private

Add CSC layers csclayers.first=forward (+Z), csclayers.second=backward (-Z) both vectors are ASSUMED to be sorted inside-out

Definition at line 36 of file MuonDetLayerGeometry.cc.

36  {
37  for (auto const it : csclayers.first) {
38  cscLayers_fw.push_back(it);
39  allForward.push_back(it);
40 
41  detLayersMap[makeDetLayerId(it)] = it;
42  }
43 
44  for (auto const it : csclayers.second) {
45  cscLayers_bk.push_back(it);
46  allBackward.push_back(it);
47 
48  detLayersMap[makeDetLayerId(it)] = it;
49  }
50 }
std::map< DetId, const DetLayer * > detLayersMap
std::vector< const DetLayer * > allForward
std::vector< const DetLayer * > allBackward
DetId makeDetLayerId(const DetLayer *detLayer) const
std::vector< const DetLayer * > cscLayers_fw
std::vector< const DetLayer * > cscLayers_bk

◆ addDTLayers()

void MuonDetLayerGeometry::addDTLayers ( const std::vector< DetLayer *> &  dtlayers)
private

Definition at line 110 of file MuonDetLayerGeometry.cc.

110  {
111  for (auto const it : dtlayers) {
112  dtLayers.push_back(it);
113  allBarrel.push_back(it);
114 
115  detLayersMap[makeDetLayerId(it)] = it;
116  }
117 }
std::vector< const DetLayer * > allBarrel
std::map< DetId, const DetLayer * > detLayersMap
DetId makeDetLayerId(const DetLayer *detLayer) const
std::vector< const DetLayer * > dtLayers

◆ addGEMLayers()

void MuonDetLayerGeometry::addGEMLayers ( const std::pair< std::vector< DetLayer *>, std::vector< DetLayer *> > &  gemlayers)
private

Add GEM layers gemlayers.first=forward (+Z), gemlayers.second=backward (-Z) both vectors are ASSUMED to be sorted inside-out

Definition at line 52 of file MuonDetLayerGeometry.cc.

References LogDebug.

52  {
53  LogDebug("Muon|RecoMuon|MuonDetLayerGeometry") << "Adding GEMlayers " << std::endl;
54  for (auto const it : gemlayers.first) {
55  gemLayers_fw.push_back(it);
56  allForward.push_back(it);
57  detLayersMap[makeDetLayerId(it)] = it;
58  LogDebug("Muon|RecoMuon|MuonDetLayerGeometry") << "Adding GEMforward " << std::endl;
59  }
60  for (auto const it : gemlayers.second) {
61  gemLayers_bk.push_back(it);
62  allBackward.push_back(it);
63  detLayersMap[makeDetLayerId(it)] = it;
64  LogDebug("Muon|RecoMuon|MuonDetLayerGeometry") << "Adding GEMbackward " << std::endl;
65  }
66 }
std::vector< const DetLayer * > gemLayers_bk
std::map< DetId, const DetLayer * > detLayersMap
std::vector< const DetLayer * > allForward
std::vector< const DetLayer * > allBackward
DetId makeDetLayerId(const DetLayer *detLayer) const
std::vector< const DetLayer * > gemLayers_fw
#define LogDebug(id)

◆ addME0Layers()

void MuonDetLayerGeometry::addME0Layers ( const std::pair< std::vector< DetLayer *>, std::vector< DetLayer *> > &  gemlayers)
private

Add ME0 layers gemlayers.first=forward (+Z), gemlayers.second=backward (-Z) both vectors are ASSUMED to be sorted inside-out

Definition at line 68 of file MuonDetLayerGeometry.cc.

References LogDebug.

68  {
69  LogDebug("Muon|RecoMuon|MuonDetLayerGeometry") << "Adding ME0layers " << std::endl;
70 
71  for (auto const it : me0layers.first) {
72  me0Layers_fw.push_back(it);
73  allForward.push_back(it);
74 
75  detLayersMap[makeDetLayerId(it)] = it;
76  LogDebug("Muon|RecoMuon|MuonDetLayerGeometry") << "Adding ME0forward " << std::endl;
77  }
78  for (auto const it : me0layers.second) {
79  me0Layers_bk.push_back(it);
80  allBackward.push_back(it);
81 
82  detLayersMap[makeDetLayerId(it)] = it;
83  LogDebug("Muon|RecoMuon|MuonDetLayerGeometry") << "Adding ME0backward " << std::endl;
84  }
85 }
std::vector< const DetLayer * > me0Layers_fw
std::map< DetId, const DetLayer * > detLayersMap
std::vector< const DetLayer * > allForward
std::vector< const DetLayer * > allBackward
DetId makeDetLayerId(const DetLayer *detLayer) const
std::vector< const DetLayer * > me0Layers_bk
#define LogDebug(id)

◆ addRPCLayers()

void MuonDetLayerGeometry::addRPCLayers ( const std::vector< DetLayer *> &  barrelRPCLayers,
const std::pair< std::vector< DetLayer *>, std::vector< DetLayer *> > &  endcapRPCLayers 
)
private

Add RPC layers endcapRPCLayers.first=forward (+Z), endcapRPCLayers.second=backward (-Z) All three vectors are ASSUMED to be sorted inside-out

Definition at line 87 of file MuonDetLayerGeometry.cc.

88  {
89  for (auto const it : barrelLayers) {
90  rpcLayers_barrel.push_back(it);
91  allBarrel.push_back(it);
92 
93  detLayersMap[makeDetLayerId(it)] = it;
94  }
95  for (auto const it : endcapLayers.first) {
96  rpcLayers_fw.push_back(it);
97  allForward.push_back(it);
98 
99  detLayersMap[makeDetLayerId(it)] = it;
100  }
101 
102  for (auto const it : endcapLayers.second) {
103  rpcLayers_bk.push_back(it);
104  allBackward.push_back(it);
105 
106  detLayersMap[makeDetLayerId(it)] = it;
107  }
108 }
std::vector< const DetLayer * > allBarrel
std::map< DetId, const DetLayer * > detLayersMap
std::vector< const DetLayer * > allForward
std::vector< const DetLayer * > allBackward
std::vector< const DetLayer * > rpcLayers_barrel
std::vector< const DetLayer * > rpcLayers_bk
DetId makeDetLayerId(const DetLayer *detLayer) const
std::vector< const DetLayer * > rpcLayers_fw

◆ allBackwardLayers()

const vector< const DetLayer * > & MuonDetLayerGeometry::allBackwardLayers ( ) const

return all backward (-Z) layers (CSC+RPC+GEM+ME0), inside-out

Definition at line 195 of file MuonDetLayerGeometry.cc.

Referenced by DirectMuonNavigation::inOutBackward(), MuonNavigationPrinter::MuonNavigationPrinter(), and DirectMuonNavigation::outInBackward().

195 { return allBackward; }
std::vector< const DetLayer * > allBackward

◆ allBarrelLayers()

const vector< const DetLayer * > & MuonDetLayerGeometry::allBarrelLayers ( ) const

return all barrel DetLayers (DT+RPC), inside-out

Definition at line 189 of file MuonDetLayerGeometry.cc.

Referenced by DirectMuonNavigation::inOutBarrel(), MuonNavigationPrinter::MuonNavigationPrinter(), MuonNavigationSchool::MuonNavigationSchool(), and DirectMuonNavigation::outInBarrel().

189 { return allBarrel; }
std::vector< const DetLayer * > allBarrel

◆ allCscGemBackwardLayers()

const vector< const DetLayer * > & MuonDetLayerGeometry::allCscGemBackwardLayers ( ) const

return all endcap DetLayers (CSC+GEM), -Z to +Z

Definition at line 203 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationPrinter::MuonNavigationPrinter().

203 { return allCscGemBackward; }
std::vector< const DetLayer * > allCscGemBackward

◆ allCscGemForwardLayers()

const vector< const DetLayer * > & MuonDetLayerGeometry::allCscGemForwardLayers ( ) const

return all endcap DetLayers (CSC+GEM), -Z to +Z

Definition at line 201 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationPrinter::MuonNavigationPrinter().

201 { return allCscGemForward; }
std::vector< const DetLayer * > allCscGemForward

◆ allCSCLayers()

const vector< const DetLayer * > & MuonDetLayerGeometry::allCSCLayers ( ) const

return the CSC DetLayers (endcap), -Z to +Z

Definition at line 152 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationSchool::MuonNavigationSchool().

152 { return cscLayers_all; }
std::vector< const DetLayer * > cscLayers_all

◆ allCscME0BackwardLayers()

const vector< const DetLayer * > & MuonDetLayerGeometry::allCscME0BackwardLayers ( ) const

return all endcap DetLayers (CSC+ME0), -Z to +Z

Definition at line 211 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationPrinter::MuonNavigationPrinter().

211 { return allCscME0Backward; }
std::vector< const DetLayer * > allCscME0Backward

◆ allCscME0ForwardLayers()

const vector< const DetLayer * > & MuonDetLayerGeometry::allCscME0ForwardLayers ( ) const

return all endcap DetLayers (CSC+ME0), -Z to +Z

Definition at line 209 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationPrinter::MuonNavigationPrinter().

209 { return allCscME0Forward; }
std::vector< const DetLayer * > allCscME0Forward

◆ allDTLayers()

const vector< const DetLayer * > & MuonDetLayerGeometry::allDTLayers ( ) const

◆ allEndcapCscGemLayers()

const vector< const DetLayer * > & MuonDetLayerGeometry::allEndcapCscGemLayers ( ) const

return all endcap DetLayers (CSC+GEM), -Z to +Z

Definition at line 199 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationSchool::MuonNavigationSchool().

199 { return allEndcapCscGem; }
std::vector< const DetLayer * > allEndcapCscGem

◆ allEndcapCscME0Layers()

const vector< const DetLayer * > & MuonDetLayerGeometry::allEndcapCscME0Layers ( ) const

return all endcap DetLayers (CSC+ME0), -Z to +Z

Definition at line 207 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationSchool::MuonNavigationSchool().

207 { return allEndcapCscME0; }
std::vector< const DetLayer * > allEndcapCscME0

◆ allEndcapLayers()

const vector< const DetLayer * > & MuonDetLayerGeometry::allEndcapLayers ( ) const

return all endcap DetLayers (CSC+RPC+GEM+ME0), -Z to +Z

Definition at line 191 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationSchool::MuonNavigationSchool().

191 { return allEndcap; }
std::vector< const DetLayer * > allEndcap

◆ allForwardLayers()

const vector< const DetLayer * > & MuonDetLayerGeometry::allForwardLayers ( ) const

return all forward (+Z) layers (CSC+RPC+GEM+ME0), inside-out

Definition at line 193 of file MuonDetLayerGeometry.cc.

Referenced by DirectMuonNavigation::inOutForward(), MuonNavigationPrinter::MuonNavigationPrinter(), and DirectMuonNavigation::outInForward().

193 { return allForward; }
std::vector< const DetLayer * > allForward

◆ allGEMLayers()

const vector< const DetLayer * > & MuonDetLayerGeometry::allGEMLayers ( ) const

return the GEM DetLayers (endcap), -Z to +Z

Definition at line 159 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationSchool::MuonNavigationSchool().

159 { return gemLayers_all; }
std::vector< const DetLayer * > gemLayers_all

◆ allLayers()

const vector< const DetLayer * > & MuonDetLayerGeometry::allLayers ( ) const

return all layers (DT+CSC+RPC+GEM), order: backward, barrel, forward

Definition at line 187 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationSchool::MuonNavigationSchool().

187 { return allDetLayers; }
std::vector< const DetLayer * > allDetLayers

◆ allME0Layers()

const vector< const DetLayer * > & MuonDetLayerGeometry::allME0Layers ( ) const

return the ME0 DetLayers (endcap), -Z to +Z

Definition at line 169 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationSchool::MuonNavigationSchool().

169 { return me0Layers_all; }
std::vector< const DetLayer * > me0Layers_all

◆ allRPCLayers()

const vector< const DetLayer * > & MuonDetLayerGeometry::allRPCLayers ( ) const

return all RPC DetLayers, order: backward, barrel, forward

Definition at line 177 of file MuonDetLayerGeometry.cc.

177 { return rpcLayers_all; }
std::vector< const DetLayer * > rpcLayers_all

◆ backwardCSCLayers()

const vector< const DetLayer * > & MuonDetLayerGeometry::backwardCSCLayers ( ) const

return the backward (-Z) CSC DetLayers, inside-out

Definition at line 156 of file MuonDetLayerGeometry.cc.

Referenced by MuonSeedBuilder::build(), PropagateToMuon::extrapolate(), MuonNavigationPrinter::MuonNavigationPrinter(), MuonSeedOrcaPatternRecognition::produce(), and PropagateToMuon::PropagateToMuon().

156 { return cscLayers_bk; }
std::vector< const DetLayer * > cscLayers_bk

◆ backwardGEMLayers()

const vector< const DetLayer * > & MuonDetLayerGeometry::backwardGEMLayers ( ) const

return the backward (-Z) GEM DetLayers, inside-out

Definition at line 163 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationPrinter::MuonNavigationPrinter().

163 { return gemLayers_bk; }
std::vector< const DetLayer * > gemLayers_bk

◆ backwardME0Layers()

const vector< const DetLayer * > & MuonDetLayerGeometry::backwardME0Layers ( ) const

return the backward (-Z) ME0 DetLayers, inside-out

Definition at line 173 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationPrinter::MuonNavigationPrinter(), and MuonSeedOrcaPatternRecognition::produce().

173 { return me0Layers_bk; }
std::vector< const DetLayer * > me0Layers_bk

◆ backwardRPCLayers()

const vector< const DetLayer * > & MuonDetLayerGeometry::backwardRPCLayers ( ) const

return the backward (-Z) RPC DetLayers, inside-out

Definition at line 185 of file MuonDetLayerGeometry.cc.

185 { return rpcLayers_bk; }
std::vector< const DetLayer * > rpcLayers_bk

◆ barrelRPCLayers()

const vector< const DetLayer * > & MuonDetLayerGeometry::barrelRPCLayers ( ) const

return the barrel RPC DetLayers, inside-out

Definition at line 179 of file MuonDetLayerGeometry.cc.

179 { return rpcLayers_barrel; }
std::vector< const DetLayer * > rpcLayers_barrel

◆ endcapRPCLayers()

const vector< const DetLayer * > & MuonDetLayerGeometry::endcapRPCLayers ( ) const

return the endcap RPC DetLayers, -Z to +Z

Definition at line 181 of file MuonDetLayerGeometry.cc.

181 { return rpcLayers_endcap; }
std::vector< const DetLayer * > rpcLayers_endcap

◆ forwardCSCLayers()

const vector< const DetLayer * > & MuonDetLayerGeometry::forwardCSCLayers ( ) const

return the forward (+Z) CSC DetLayers, inside-out

Definition at line 154 of file MuonDetLayerGeometry.cc.

Referenced by MuonSeedBuilder::build(), PropagateToMuon::extrapolate(), MuonNavigationPrinter::MuonNavigationPrinter(), MuonSeedOrcaPatternRecognition::produce(), and PropagateToMuon::PropagateToMuon().

154 { return cscLayers_fw; }
std::vector< const DetLayer * > cscLayers_fw

◆ forwardGEMLayers()

const vector< const DetLayer * > & MuonDetLayerGeometry::forwardGEMLayers ( ) const

return the forward (+Z) GEM DetLayers, inside-out

Definition at line 161 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationPrinter::MuonNavigationPrinter().

161 { return gemLayers_fw; }
std::vector< const DetLayer * > gemLayers_fw

◆ forwardME0Layers()

const vector< const DetLayer * > & MuonDetLayerGeometry::forwardME0Layers ( ) const

return the forward (+Z) ME0 DetLayers, inside-out

Definition at line 171 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationPrinter::MuonNavigationPrinter(), and MuonSeedOrcaPatternRecognition::produce().

171 { return me0Layers_fw; }
std::vector< const DetLayer * > me0Layers_fw

◆ forwardRPCLayers()

const vector< const DetLayer * > & MuonDetLayerGeometry::forwardRPCLayers ( ) const

return the forward (+Z) RPC DetLayers, inside-out

Definition at line 183 of file MuonDetLayerGeometry.cc.

183 { return rpcLayers_fw; }
std::vector< const DetLayer * > rpcLayers_fw

◆ idToLayer()

const DetLayer * MuonDetLayerGeometry::idToLayer ( const DetId detId) const
overridevirtual

return the DetLayer which correspond to a certain DetId

Reimplemented from DetLayerGeometry.

Definition at line 215 of file MuonDetLayerGeometry.cc.

References MuonSubdetId::CSC, MuonSubdetId::DT, Exception, MuonSubdetId::GEM, l1ctLayer2EG_cff::id, LogDebug, MuonSubdetId::ME0, DetId::rawId(), MuonSubdetId::RPC, and DetId::subdetId().

Referenced by GlobalDetLayerGeometry::idToLayer().

215  {
216  DetId id;
217 
218  if (detId.subdetId() == MuonSubdetId::CSC) {
219  CSCDetId cscId(detId.rawId());
220 
221  if (cscId.station() == 1) {
222  if (cscId.ring() == 1 || cscId.ring() == 4)
223  id = CSCDetId(cscId.endcap(), 1, 1, 0, 0);
224  else if (cscId.ring() == 2 || cscId.ring() == 3)
225  id = CSCDetId(cscId.endcap(), 1, 2, 0, 0);
226  else
227  throw cms::Exception("InvalidCSCRing") << " Invalid CSC Ring: " << cscId.ring() << endl;
228  } else
229  id = CSCDetId(cscId.endcap(), cscId.station(), 0, 0, 0);
230  }
231 
232  else if (detId.subdetId() == MuonSubdetId::DT) {
233  DTChamberId dtId(detId.rawId());
234  id = DTChamberId(0, dtId.station(), 0);
235  } else if (detId.subdetId() == MuonSubdetId::RPC) {
236  RPCDetId rpcId(detId.rawId());
237  id = RPCDetId(rpcId.region(), 0, rpcId.station(), 0, rpcId.layer(), 0, 0);
238  } else if (detId.subdetId() == MuonSubdetId::GEM) {
239  GEMDetId gemId(detId.rawId());
240  id = GEMDetId(gemId.region(), 1, gemId.station(), gemId.layer(), 0, 0);
241  } else if (detId.subdetId() == MuonSubdetId::ME0) {
242  ME0DetId me0Id(detId.rawId());
243  id = ME0DetId(me0Id.region(), me0Id.layer(), 0, 0);
244  LogDebug("Muon|RecoMuon|MuonDetLayerGeometry")
245  << " Found an ME0DetId: " << me0Id.rawId() << ",id: " << id.rawId() << std::endl;
246 
247  } else
248  throw cms::Exception("InvalidSubdetId") << detId.subdetId();
249 
250  std::map<DetId, const DetLayer*>::const_iterator layer = detLayersMap.find(id);
251  if (layer == detLayersMap.end())
252  return nullptr;
253  return layer->second;
254 }
static constexpr int GEM
Definition: MuonSubdetId.h:14
constexpr std::array< uint8_t, layerIndexSize > layer
std::map< DetId, const DetLayer * > detLayersMap
static constexpr int ME0
Definition: MuonSubdetId.h:15
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
Definition: DetId.h:17
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
static constexpr int RPC
Definition: MuonSubdetId.h:13
static constexpr int DT
Definition: MuonSubdetId.h:11
static constexpr int CSC
Definition: MuonSubdetId.h:12
#define LogDebug(id)

◆ makeDetLayerId()

DetId MuonDetLayerGeometry::makeDetLayerId ( const DetLayer detLayer) const
private

Definition at line 119 of file MuonDetLayerGeometry.cc.

References GeometricSearchDet::basicComponents(), GeomDetEnumerators::CSC, GeomDetEnumerators::DT, makeMuonMisalignmentScenario::endcap, Exception, GeomDetEnumerators::GEM, l1ctLayer2EG_cff::id, GeomDetEnumerators::ME0, HLT_2022v15_cff::region, relativeConstraints::ring, GeomDetEnumerators::RPCBarrel, GeomDetEnumerators::RPCEndcap, relativeConstraints::station, and DetLayer::subDetector().

119  {
120  if (detLayer->subDetector() == GeomDetEnumerators::CSC) {
121  CSCDetId id(detLayer->basicComponents().front()->geographicalId().rawId());
122 
123  if (id.station() == 1) {
124  if (id.ring() == 1 || id.ring() == 4)
125  return CSCDetId(id.endcap(), 1, 1, 0, 0);
126  else if (id.ring() == 2 || id.ring() == 3)
127  return CSCDetId(id.endcap(), 1, 2, 0, 0);
128  else
129  throw cms::Exception("InvalidCSCRing") << " Invalid CSC Ring: " << id.ring() << endl;
130  } else
131  return CSCDetId(id.endcap(), id.station(), 0, 0, 0);
132 
133  } else if (detLayer->subDetector() == GeomDetEnumerators::DT) {
134  DTChamberId id(detLayer->basicComponents().front()->geographicalId().rawId());
135  return DTChamberId(0, id.station(), 0);
136  } else if (detLayer->subDetector() == GeomDetEnumerators::RPCBarrel ||
138  RPCDetId id(detLayer->basicComponents().front()->geographicalId().rawId());
139  return RPCDetId(id.region(), 0, id.station(), 0, id.layer(), 0, 0);
140  } else if (detLayer->subDetector() == GeomDetEnumerators::GEM) {
141  GEMDetId id(detLayer->basicComponents().front()->geographicalId().rawId());
142  return GEMDetId(id.region(), 1, id.station(), id.layer(), 0, 0);
143  } else if (detLayer->subDetector() == GeomDetEnumerators::ME0) {
144  ME0DetId id(detLayer->basicComponents().front()->geographicalId().rawId());
145  return ME0DetId(id.region(), id.layer(), 0, 0);
146  } else
147  throw cms::Exception("InvalidModuleIdentification"); // << detLayer->module();
148 }
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)
constexpr std::array< uint8_t, layerIndexSize > layer
virtual const std::vector< const GeomDet * > & basicComponents() const =0

◆ sortLayers()

void MuonDetLayerGeometry::sortLayers ( )
private

Definition at line 270 of file MuonDetLayerGeometry.cc.

References filterCSVwithJSON::copy, cmsLHEtoEOSManager::l, precomputed_value_sort(), and groupFilesInBlocks::reverse.

270  {
271  // The following are filled inside-out, no need to re-sort
272  // precomputed_value_sort(dtLayers.begin(), dtLayers.end(),ExtractR<DetLayer,float>());
273  // precomputed_value_sort(cscLayers_fw.begin(), cscLayers_fw.end(),ExtractAbsZ<DetLayer,float>());
274  // precomputed_value_sort(cscLayers_bk.begin(), cscLayers_bk.end(),ExtractAbsZ<DetLayer,float>());
275  // precomputed_value_sort(rpcLayers_fw.begin(), rpcLayers_fw.end(),ExtractAbsZ<DetLayer,float>());
276  // precomputed_value_sort(rpcLayers_bk.begin(), rpcLayers_bk.end(),ExtractAbsZ<DetLayer,float>());
277  // precomputed_value_sort(rpcLayers_barrel.begin(), rpcLayers_barrel.end(), ExtractR<DetLayer,float>());
278 
279  // Sort these inside-out
283 
284  // Build more complicated vectors with correct sorting
285 
286  //cscLayers_all: from -Z to +Z
287  cscLayers_all.reserve(cscLayers_bk.size() + cscLayers_fw.size());
288  std::copy(cscLayers_bk.begin(), cscLayers_bk.end(), back_inserter(cscLayers_all));
289  std::reverse(cscLayers_all.begin(), cscLayers_all.end());
290  std::copy(cscLayers_fw.begin(), cscLayers_fw.end(), back_inserter(cscLayers_all));
291 
292  //gemLayers_all: from -Z to +Z
293  gemLayers_all.reserve(gemLayers_bk.size() + gemLayers_fw.size());
294  std::copy(gemLayers_bk.begin(), gemLayers_bk.end(), back_inserter(gemLayers_all));
295  std::reverse(gemLayers_all.begin(), gemLayers_all.end());
296  std::copy(gemLayers_fw.begin(), gemLayers_fw.end(), back_inserter(gemLayers_all));
297 
298  //me0Layers_all: from -Z to +Z
299  me0Layers_all.reserve(me0Layers_bk.size() + me0Layers_fw.size());
300  std::copy(me0Layers_bk.begin(), me0Layers_bk.end(), back_inserter(me0Layers_all));
301  std::reverse(me0Layers_all.begin(), me0Layers_all.end());
302  std::copy(me0Layers_fw.begin(), me0Layers_fw.end(), back_inserter(me0Layers_all));
303 
304  //rpcLayers_endcap: from -Z to +Z
305  rpcLayers_endcap.reserve(rpcLayers_bk.size() + rpcLayers_fw.size());
306  std::copy(rpcLayers_bk.begin(), rpcLayers_bk.end(), back_inserter(rpcLayers_endcap));
308  std::copy(rpcLayers_fw.begin(), rpcLayers_fw.end(), back_inserter(rpcLayers_endcap));
309 
310  //rpcLayers_all: order is bw, barrel, fw
311  rpcLayers_all.reserve(rpcLayers_bk.size() + rpcLayers_barrel.size() + rpcLayers_fw.size());
312  std::copy(rpcLayers_bk.begin(), rpcLayers_bk.end(), back_inserter(rpcLayers_all));
313  std::reverse(rpcLayers_all.begin(), rpcLayers_all.end());
314  std::copy(rpcLayers_barrel.begin(), rpcLayers_barrel.end(), back_inserter(rpcLayers_all));
315  std::copy(rpcLayers_fw.begin(), rpcLayers_fw.end(), back_inserter(rpcLayers_all));
316 
317  // allEndcap: order is all bw, all fw
318  allEndcap.reserve(allBackward.size() + allForward.size());
319  std::copy(allBackward.begin(), allBackward.end(), back_inserter(allEndcap));
320  std::reverse(allEndcap.begin(), allEndcap.end());
321  std::copy(allForward.begin(), allForward.end(), back_inserter(allEndcap));
322 
323  // allEndcapCSCGEM: order is all bw, all fw
324  allEndcapCscGem.reserve(cscLayers_bk.size() + cscLayers_fw.size() + gemLayers_bk.size() + gemLayers_fw.size());
325  std::copy(cscLayers_bk.begin(), cscLayers_bk.end(), back_inserter(allEndcapCscGem));
326  std::copy(gemLayers_bk.begin(), gemLayers_bk.end(), back_inserter(allEndcapCscGem));
328  std::copy(cscLayers_fw.begin(), cscLayers_fw.end(), back_inserter(allEndcapCscGem));
329  std::copy(gemLayers_fw.begin(), gemLayers_fw.end(), back_inserter(allEndcapCscGem));
330 
331  // allCscGemForward
332  allCscGemForward.reserve(cscLayers_fw.size() + gemLayers_fw.size());
333  std::copy(cscLayers_fw.begin(), cscLayers_fw.end(), back_inserter(allCscGemForward));
334  std::copy(gemLayers_fw.begin(), gemLayers_fw.end(), back_inserter(allCscGemForward));
335 
336  // allCscGemBackward
337  allCscGemBackward.reserve(cscLayers_bk.size() + gemLayers_bk.size());
338  std::copy(cscLayers_bk.begin(), cscLayers_bk.end(), back_inserter(allCscGemBackward));
339  std::copy(gemLayers_bk.begin(), gemLayers_bk.end(), back_inserter(allCscGemBackward));
340 
341  // allCscME0Forward
342  allCscME0Forward.reserve(cscLayers_fw.size() + me0Layers_fw.size());
343  std::copy(cscLayers_fw.begin(), cscLayers_fw.end(), back_inserter(allCscME0Forward));
344  std::copy(me0Layers_fw.begin(), me0Layers_fw.end(), back_inserter(allCscME0Forward));
345 
346  // allCscME0Backward
347  allCscME0Backward.reserve(cscLayers_bk.size() + me0Layers_bk.size());
348  std::copy(cscLayers_bk.begin(), cscLayers_bk.end(), back_inserter(allCscME0Backward));
349  std::copy(me0Layers_bk.begin(), me0Layers_bk.end(), back_inserter(allCscME0Backward));
350 
351  // allEndcapCSCME0: order is all bw, all fw
352  allEndcapCscME0.reserve(cscLayers_bk.size() + cscLayers_fw.size() + me0Layers_bk.size() + me0Layers_fw.size());
353  std::copy(cscLayers_bk.begin(), cscLayers_bk.end(), back_inserter(allEndcapCscME0));
354  std::copy(me0Layers_bk.begin(), me0Layers_bk.end(), back_inserter(allEndcapCscME0));
356  std::copy(cscLayers_fw.begin(), cscLayers_fw.end(), back_inserter(allEndcapCscME0));
357  std::copy(me0Layers_fw.begin(), me0Layers_fw.end(), back_inserter(allEndcapCscME0));
358 
359  // allDetLayers: order is all bw, all barrel, all fw
360  allDetLayers.reserve(allBackward.size() + allBarrel.size() + allForward.size());
361  std::copy(allBackward.begin(), allBackward.end(), back_inserter(allDetLayers));
362  std::reverse(allDetLayers.begin(), allDetLayers.end());
363  std::copy(allBarrel.begin(), allBarrel.end(), back_inserter(allDetLayers));
364  std::copy(allForward.begin(), allForward.end(), back_inserter(allDetLayers));
365 
366  // number layers
367  int sq = 0;
368  for (auto l : allDetLayers)
369  (*const_cast<DetLayer*>(l)).setSeqNum(sq++);
370 }
std::vector< const DetLayer * > gemLayers_all
std::vector< const DetLayer * > allDetLayers
std::vector< const DetLayer * > allBarrel
std::vector< const DetLayer * > gemLayers_bk
std::vector< const DetLayer * > me0Layers_fw
std::vector< const DetLayer * > me0Layers_all
std::vector< const DetLayer * > allCscME0Backward
std::vector< const DetLayer * > allForward
std::vector< const DetLayer * > allBackward
std::vector< const DetLayer * > allCscGemForward
std::vector< const DetLayer * > rpcLayers_barrel
std::vector< const DetLayer * > rpcLayers_all
std::vector< const DetLayer * > rpcLayers_bk
std::vector< const DetLayer * > cscLayers_fw
std::vector< const DetLayer * > me0Layers_bk
std::vector< const DetLayer * > allEndcapCscGem
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr, const Compare &comp)
std::vector< const DetLayer * > allEndcap
std::vector< const DetLayer * > cscLayers_bk
std::vector< const DetLayer * > cscLayers_all
std::vector< const DetLayer * > allCscGemBackward
std::vector< const DetLayer * > rpcLayers_fw
std::vector< const DetLayer * > rpcLayers_endcap
std::vector< const DetLayer * > gemLayers_fw
std::vector< const DetLayer * > allEndcapCscME0
std::vector< const DetLayer * > allCscME0Forward

Friends And Related Function Documentation

◆ MuonDetLayerGeometryESProducer

friend class MuonDetLayerGeometryESProducer
friend

Definition at line 26 of file MuonDetLayerGeometry.h.

Member Data Documentation

◆ allBackward

std::vector<const DetLayer*> MuonDetLayerGeometry::allBackward
private

Definition at line 189 of file MuonDetLayerGeometry.h.

◆ allBarrel

std::vector<const DetLayer*> MuonDetLayerGeometry::allBarrel
private

Definition at line 191 of file MuonDetLayerGeometry.h.

◆ allCscGemBackward

std::vector<const DetLayer*> MuonDetLayerGeometry::allCscGemBackward
private

Definition at line 198 of file MuonDetLayerGeometry.h.

◆ allCscGemForward

std::vector<const DetLayer*> MuonDetLayerGeometry::allCscGemForward
private

Definition at line 197 of file MuonDetLayerGeometry.h.

◆ allCscME0Backward

std::vector<const DetLayer*> MuonDetLayerGeometry::allCscME0Backward
private

Definition at line 206 of file MuonDetLayerGeometry.h.

◆ allCscME0Forward

std::vector<const DetLayer*> MuonDetLayerGeometry::allCscME0Forward
private

Definition at line 205 of file MuonDetLayerGeometry.h.

◆ allDetLayers

std::vector<const DetLayer*> MuonDetLayerGeometry::allDetLayers
private

Definition at line 192 of file MuonDetLayerGeometry.h.

◆ allEndcap

std::vector<const DetLayer*> MuonDetLayerGeometry::allEndcap
private

Definition at line 190 of file MuonDetLayerGeometry.h.

◆ allEndcapCscGem

std::vector<const DetLayer*> MuonDetLayerGeometry::allEndcapCscGem
private

Definition at line 196 of file MuonDetLayerGeometry.h.

◆ allEndcapCscME0

std::vector<const DetLayer*> MuonDetLayerGeometry::allEndcapCscME0
private

Definition at line 204 of file MuonDetLayerGeometry.h.

◆ allForward

std::vector<const DetLayer*> MuonDetLayerGeometry::allForward
private

Definition at line 188 of file MuonDetLayerGeometry.h.

◆ cscLayers_all

std::vector<const DetLayer*> MuonDetLayerGeometry::cscLayers_all
private

Definition at line 166 of file MuonDetLayerGeometry.h.

◆ cscLayers_bk

std::vector<const DetLayer*> MuonDetLayerGeometry::cscLayers_bk
private

Definition at line 165 of file MuonDetLayerGeometry.h.

◆ cscLayers_fw

std::vector<const DetLayer*> MuonDetLayerGeometry::cscLayers_fw
private

Definition at line 164 of file MuonDetLayerGeometry.h.

◆ detLayersMap

std::map<DetId, const DetLayer*> MuonDetLayerGeometry::detLayersMap
private

Definition at line 210 of file MuonDetLayerGeometry.h.

◆ dtLayers

std::vector<const DetLayer*> MuonDetLayerGeometry::dtLayers
private

Definition at line 187 of file MuonDetLayerGeometry.h.

◆ gemLayers_all

std::vector<const DetLayer*> MuonDetLayerGeometry::gemLayers_all
private

Definition at line 172 of file MuonDetLayerGeometry.h.

◆ gemLayers_bk

std::vector<const DetLayer*> MuonDetLayerGeometry::gemLayers_bk
private

Definition at line 171 of file MuonDetLayerGeometry.h.

◆ gemLayers_fw

std::vector<const DetLayer*> MuonDetLayerGeometry::gemLayers_fw
private

Definition at line 170 of file MuonDetLayerGeometry.h.

◆ me0Layers_all

std::vector<const DetLayer*> MuonDetLayerGeometry::me0Layers_all
private

Definition at line 178 of file MuonDetLayerGeometry.h.

◆ me0Layers_bk

std::vector<const DetLayer*> MuonDetLayerGeometry::me0Layers_bk
private

Definition at line 177 of file MuonDetLayerGeometry.h.

◆ me0Layers_fw

std::vector<const DetLayer*> MuonDetLayerGeometry::me0Layers_fw
private

Definition at line 176 of file MuonDetLayerGeometry.h.

◆ rpcLayers_all

std::vector<const DetLayer*> MuonDetLayerGeometry::rpcLayers_all
private

Definition at line 182 of file MuonDetLayerGeometry.h.

◆ rpcLayers_barrel

std::vector<const DetLayer*> MuonDetLayerGeometry::rpcLayers_barrel
private

Definition at line 186 of file MuonDetLayerGeometry.h.

◆ rpcLayers_bk

std::vector<const DetLayer*> MuonDetLayerGeometry::rpcLayers_bk
private

Definition at line 185 of file MuonDetLayerGeometry.h.

◆ rpcLayers_endcap

std::vector<const DetLayer*> MuonDetLayerGeometry::rpcLayers_endcap
private

Definition at line 183 of file MuonDetLayerGeometry.h.

◆ rpcLayers_fw

std::vector<const DetLayer*> MuonDetLayerGeometry::rpcLayers_fw
private

Definition at line 184 of file MuonDetLayerGeometry.h.