CMS 3D CMS Logo

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

#include <ME0NumberingScheme.h>

Inheritance diagram for ME0NumberingScheme:
MuonNumberingScheme

Public Member Functions

int baseNumberToUnitNumber (const MuonBaseNumber &) const override
 
 ME0NumberingScheme (const MuonGeometryConstants &muonConstants)
 
 ~ME0NumberingScheme () override
 
- Public Member Functions inherited from MuonNumberingScheme
 MuonNumberingScheme ()
 
virtual ~MuonNumberingScheme ()
 

Private Member Functions

void initMe (const MuonGeometryConstants &muonConstants)
 

Private Attributes

int theLayerLevel
 
int theNEtaPart
 
int theRegionLevel
 
int theRollLevel
 
int theSectorLevel
 

Detailed Description

Definition at line 9 of file ME0NumberingScheme.h.

Constructor & Destructor Documentation

◆ ME0NumberingScheme()

ME0NumberingScheme::ME0NumberingScheme ( const MuonGeometryConstants muonConstants)

Definition at line 10 of file ME0NumberingScheme.cc.

References initMe().

10 { initMe(muonConstants); }
void initMe(const MuonGeometryConstants &muonConstants)

◆ ~ME0NumberingScheme()

ME0NumberingScheme::~ME0NumberingScheme ( )
inlineoverride

Definition at line 13 of file ME0NumberingScheme.h.

13 {};

Member Function Documentation

◆ baseNumberToUnitNumber()

int ME0NumberingScheme::baseNumberToUnitNumber ( const MuonBaseNumber num) const
overridevirtual

Reimplemented from MuonNumberingScheme.

Definition at line 30 of file ME0NumberingScheme.cc.

References relativeConstraints::chamber, l1ctLayer2EG_cff::id, nano_mu_digi_cff::layer, personalPlayback::level, ME0DetId::minChamberId, ME0DetId::minLayerId, ME0DetId::minRegionId, ME0DetId::minRollId, EgammaValidation_cff::num, nano_mu_digi_cff::region, nano_mu_digi_cff::roll, theLayerLevel, theRegionLevel, theRollLevel, and theSectorLevel.

Referenced by ME0GeometryParsFromDD::buildGeometry(), and ME0GeometryBuilder::buildGeometry().

30  {
31  // Debug using EDM_ML_DEBUG
32 #ifdef EDM_ML_DEBUG
33  edm::LogVerbatim("MuonGeom") << "ME0NumberingScheme::baseNumberToUnitNumber BEGIN ";
34  edm::LogVerbatim("MuonGeom") << "ME0Numbering " << num.getLevels();
35  for (int level = 1; level <= num.getLevels(); level++) {
36  edm::LogVerbatim("MuonGeom") << "level " << level << " " << num.getSuperNo(level) << " " << num.getBaseNo(level);
37  }
38 #endif
39  // -----------------------
40 
41 #ifdef EDM_ML_DEBUG
42  if (num.getLevels() != theRollLevel)
43  edm::LogVerbatim("MuonGeom") << "MuonME0NS::BNToUN BaseNumber has " << num.getLevels()
44  << " levels which is less than " << theRollLevel;
45 #endif
46 
49 
50  //decode significant ME0 levels
51 
52  if (num.getBaseNo(theRegionLevel) == 0)
53  region = 1;
54  else
55  region = -1;
56  if (num.getLevels() >= theLayerLevel)
57  layer = num.getBaseNo(theLayerLevel) + 1;
58  if (num.getLevels() >= theSectorLevel)
59  chamber = num.getBaseNo(theSectorLevel) + 1;
60  if (num.getLevels() >= theRollLevel)
61  roll = num.getBaseNo(theRollLevel) + 1;
62 
63  // collect all info
64 
65  // Debug using EDM_ML_DEBUG
66 #ifdef EDM_ML_DEBUG
67  edm::LogVerbatim("MuonGeom") << "ME0NumberingScheme: Region " << region << " Layer " << layer << " Chamber "
68  << chamber << " Roll " << roll;
69 #endif
70  // -----------------------
71 
72  // Build the actual numbering
74 
75  // Debug using EDM_ML_DEBUG
76 #ifdef EDM_ML_DEBUG
77  edm::LogVerbatim("MuonGeom") << " DetId " << id;
78 #endif
79  // ---------------------
80 
81  return id.rawId();
82 }
Log< level::Info, true > LogVerbatim
static constexpr int minRegionId
Definition: ME0DetId.h:63
static constexpr int minRollId
Definition: ME0DetId.h:72
static constexpr int minChamberId
Definition: ME0DetId.h:66
static constexpr int minLayerId
Definition: ME0DetId.h:69

◆ initMe()

void ME0NumberingScheme::initMe ( const MuonGeometryConstants muonConstants)
private

Definition at line 12 of file ME0NumberingScheme.cc.

References MuonGeometryConstants::getValue(), theLayerLevel, theNEtaPart, theRegionLevel, theRollLevel, and theSectorLevel.

Referenced by ME0NumberingScheme().

12  {
13  int theLevelPart = muonConstants.getValue("level");
14  theRegionLevel = muonConstants.getValue("m0_region") / theLevelPart;
15  theLayerLevel = muonConstants.getValue("m0_layer") / theLevelPart;
16  theSectorLevel = muonConstants.getValue("m0_sector") / theLevelPart;
17  theRollLevel = muonConstants.getValue("m0_roll") / theLevelPart;
18  theNEtaPart = muonConstants.getValue("m0_nroll");
19 
20  // Debug using EDM_ML_DEBUG
21 #ifdef EDM_ML_DEBUG
22  edm::LogVerbatim("MuonGeom") << "Initialize ME0NumberingScheme"
23  << "\ntheRegionLevel " << theRegionLevel << "\ntheLayerLevel " << theLayerLevel
24  << "\ntheSectorLevel " << theSectorLevel << "\ntheRollLevel " << theRollLevel
25  << "\ntheNEtaPart " << theNEtaPart;
26 #endif
27  // -----------------------
28 }
int getValue(const std::string &name) const
Log< level::Info, true > LogVerbatim

Member Data Documentation

◆ theLayerLevel

int ME0NumberingScheme::theLayerLevel
private

Definition at line 22 of file ME0NumberingScheme.h.

Referenced by baseNumberToUnitNumber(), and initMe().

◆ theNEtaPart

int ME0NumberingScheme::theNEtaPart
private

Definition at line 24 of file ME0NumberingScheme.h.

Referenced by initMe().

◆ theRegionLevel

int ME0NumberingScheme::theRegionLevel
private

Definition at line 20 of file ME0NumberingScheme.h.

Referenced by baseNumberToUnitNumber(), and initMe().

◆ theRollLevel

int ME0NumberingScheme::theRollLevel
private

Definition at line 23 of file ME0NumberingScheme.h.

Referenced by baseNumberToUnitNumber(), and initMe().

◆ theSectorLevel

int ME0NumberingScheme::theSectorLevel
private

Definition at line 21 of file ME0NumberingScheme.h.

Referenced by baseNumberToUnitNumber(), and initMe().