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 &) 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.

10 { initMe(muonConstants); }

References initMe().

◆ ~ME0NumberingScheme()

ME0NumberingScheme::~ME0NumberingScheme ( )
inlineoverride

Definition at line 13 of file ME0NumberingScheme.h.

13 {};

Member Function Documentation

◆ baseNumberToUnitNumber()

int ME0NumberingScheme::baseNumberToUnitNumber ( const MuonBaseNumber num)
overridevirtual

Reimplemented from MuonNumberingScheme.

Definition at line 30 of file ME0NumberingScheme.cc.

30  {
31  edm::LogVerbatim("ME0NumberingScheme") << "ME0NumberingScheme::baseNumberToUnitNumber BEGIN ";
32  // Debug using LOCAL_DEBUG
33 #ifdef LOCAL_DEBUG
34  edm::LogVerbatim("ME0NumberingScheme") << "ME0Numbering " << num.getLevels();
35  for (int level = 1; level <= num.getLevels(); level++) {
36  edm::LogVerbatim("ME0NumberingScheme")
37  << "level " << level << " " << num.getSuperNo(level) << " " << num.getBaseNo(level);
38  }
39 #endif
40  // -----------------------
41 
42  int maxLevel = theRollLevel;
43  if (num.getLevels() != maxLevel) {
44  throw cms::Exception("MuonNumbering") << "MuonME0NS::BNToUN "
45  << "BaseNumber has " << num.getLevels() << " levels,"
46  << "need " << maxLevel << std::endl;
47  return 0;
48  }
49 
50  int region(0), layer(0), chamber(0), roll(0);
51 
52  //decode significant ME0 levels
53 
54  if (num.getBaseNo(theRegionLevel) == 0)
55  region = 1;
56  else
57  region = -1;
58  layer = num.getBaseNo(theLayerLevel) + 1;
59  chamber = num.getBaseNo(theSectorLevel) + 1;
60  roll = num.getBaseNo(theRollLevel) + 1;
61 
62  // collect all info
63 
64  // Debug using LOCAL_DEBUG
65 #ifdef LOCAL_DEBUG
66  edm::LogVerbatim("ME0NumberingScheme") << "ME0NumberingScheme: Region " << region << " Layer " << layer << " Chamber "
67  << chamber << " Roll " << roll;
68 #endif
69  // -----------------------
70 
71  // Build the actual numbering
72  ME0DetId id(region, layer, chamber, roll);
73 
74  // Debug using LOCAL_DEBUG
75 #ifdef LOCAL_DEBUG
76  edm::LogVerbatim("ME0NumberingScheme") << " DetId " << id;
77 #endif
78  // ---------------------
79 
80  return id.rawId();
81 }

References relativeConstraints::chamber, Exception, triggerObjects_cff::id, personalPlayback::level, EgammaValidation_cff::num, HLT_2018_cff::region, theLayerLevel, theRegionLevel, theRollLevel, and theSectorLevel.

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

◆ initMe()

void ME0NumberingScheme::initMe ( const MuonGeometryConstants muonConstants)
private

Definition at line 12 of file ME0NumberingScheme.cc.

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 LOCAL_DEBUG
21 #ifdef LOCAL_DEBUG
22  edm::LogVerbatim("ME0NumberingScheme") << "Initialize ME0NumberingScheme"
23  << "\ntheRegionLevel " << theRegionLevel << "\ntheLayerLevel " << theLayerLevel
24  << "\ntheSectorLevel " << theSectorLevel << "\ntheRollLevel " << theRollLevel
25  << "\ntheNEtaPart " << theNEtaPart;
26 #endif
27  // -----------------------
28 }

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

Referenced by ME0NumberingScheme().

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().

personalPlayback.level
level
Definition: personalPlayback.py:22
ME0NumberingScheme::theLayerLevel
int theLayerLevel
Definition: ME0NumberingScheme.h:22
ME0NumberingScheme::theNEtaPart
int theNEtaPart
Definition: ME0NumberingScheme.h:24
edm::LogVerbatim
Definition: MessageLogger.h:297
MuonGeometryConstants::getValue
int getValue(const std::string &name) const
Definition: MuonGeometryConstants.cc:8
ME0DetId
Definition: ME0DetId.h:16
ME0NumberingScheme::theRegionLevel
int theRegionLevel
Definition: ME0NumberingScheme.h:20
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:34
ME0NumberingScheme::theRollLevel
int theRollLevel
Definition: ME0NumberingScheme.h:23
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
Exception
Definition: hltDiff.cc:246
HLT_2018_cff.region
region
Definition: HLT_2018_cff.py:81479
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
ME0NumberingScheme::theSectorLevel
int theSectorLevel
Definition: ME0NumberingScheme.h:21
ME0NumberingScheme::initMe
void initMe(const MuonGeometryConstants &muonConstants)
Definition: ME0NumberingScheme.cc:12