CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
cms::MuonNumbering Class Reference

#include <DD4hep_MuonNumbering.h>

Public Member Functions

const MuonBaseNumber geoHistoryToBaseNumber (const cms::ExpandedNodes &) const
 
const int get (const char *) const
 
void put (std::string_view, int)
 
const MuonConstantsvalues () const
 

Private Attributes

MuonConstants values_
 

Detailed Description

Definition at line 37 of file DD4hep_MuonNumbering.h.

Member Function Documentation

◆ geoHistoryToBaseNumber()

const MuonBaseNumber MuonNumbering::geoHistoryToBaseNumber ( const cms::ExpandedNodes nodes) const

Definition at line 8 of file DD4hep_MuonNumbering.cc.

8  {
10 
11  int levelPart = get("level");
12  int superPart = get("super");
13  int basePart = get("base");
14  int startCopyNo = get("xml_starts_with_copyno");
15 
16  // some consistency checks
17  if (basePart != 1) {
18  edm::LogError("Geometry") << "MuonNumbering finds unusual base constant:" << basePart;
19  }
20  if (superPart < 100) {
21  edm::LogError("Geometry") << "MuonNumbering finds unusual super constant:" << superPart;
22  }
23  if (levelPart < 10 * superPart) {
24  edm::LogError("Geometry") << "MuonNumbering finds unusual level constant:" << levelPart;
25  }
26  if ((startCopyNo != 0) && (startCopyNo != 1)) {
27  edm::LogError("Geometry") << "MuonNumbering finds unusual start value for copy numbers:" << startCopyNo;
28  }
29  int ctr(0);
30  for (auto const& it : nodes.tags) {
31  int tag = it / levelPart;
32  if (tag > 0) {
33  int offset = nodes.offsets[ctr];
34  int copyno = nodes.copyNos[ctr] + offset % superPart;
35  int super = offset / superPart;
36  num.addBase(tag, super, copyno - startCopyNo);
37  }
38  ++ctr;
39  }
40  return num;
41 }

References dqmiodatasetharvest::ctr, get, class-composition::nodes, EgammaValidation_cff::num, hltrates_dqm_sourceclient-live_cfg::offset, and makeGlobalPositionRcd_cfg::tag.

◆ get()

const int MuonNumbering::get ( const char *  key) const

◆ put()

void MuonNumbering::put ( std::string_view  str,
int  num 
)

Definition at line 51 of file DD4hep_MuonNumbering.cc.

51 { values_.emplace(str, num); }

References EgammaValidation_cff::num, and str.

◆ values()

const MuonConstants& cms::MuonNumbering::values ( ) const
inline

Definition at line 42 of file DD4hep_MuonNumbering.h.

42 { return values_; }

References values_.

Referenced by DDTestMuonNumbering::analyze().

Member Data Documentation

◆ values_

MuonConstants cms::MuonNumbering::values_
private

Definition at line 45 of file DD4hep_MuonNumbering.h.

Referenced by values().

cms::MuonNumbering::values_
MuonConstants values_
Definition: DD4hep_MuonNumbering.h:45
mps_fire.end
end
Definition: mps_fire.py:242
str
#define str(s)
Definition: TestProcessor.cc:53
class-composition.nodes
nodes
Definition: class-composition.py:84
dqmiodatasetharvest.ctr
ctr
Definition: dqmiodatasetharvest.py:191
makeGlobalPositionRcd_cfg.tag
tag
Definition: makeGlobalPositionRcd_cfg.py:6
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:33
MuonBaseNumber
Definition: MuonBaseNumber.h:21
mps_fire.result
result
Definition: mps_fire.py:311
cms::MuonNumbering::get
const int get(const char *) const
Definition: DD4hep_MuonNumbering.cc:43
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
crabWrapper.key
key
Definition: crabWrapper.py:19