CMS 3D CMS Logo

ME0NumberingScheme.cc
Go to the documentation of this file.
7 
8 //#define EDM_ML_DEBUG
9 
10 ME0NumberingScheme::ME0NumberingScheme(const MuonGeometryConstants& muonConstants) { initMe(muonConstants); }
11 
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("ME0NumberingScheme") << "Initialize ME0NumberingScheme"
23  << "\ntheRegionLevel " << theRegionLevel << "\ntheLayerLevel " << theLayerLevel
24  << "\ntheSectorLevel " << theSectorLevel << "\ntheRollLevel " << theRollLevel
25  << "\ntheNEtaPart " << theNEtaPart;
26 #endif
27  // -----------------------
28 }
29 
31  // Debug using EDM_ML_DEBUG
32 #ifdef EDM_ML_DEBUG
33  edm::LogVerbatim("ME0NumberingScheme") << "ME0NumberingScheme::baseNumberToUnitNumber BEGIN ";
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 #ifdef EDM_ML_DEBUG
43  if (num.getLevels() != theRollLevel)
44  edm::LogVerbatim("ME0NumberingScheme")
45  << "MuonME0NS::BNToUN BaseNumber has " << num.getLevels() << " levels which is less than " << theRollLevel;
46 #endif
47 
50 
51  //decode significant ME0 levels
52 
53  if (num.getBaseNo(theRegionLevel) == 0)
54  region = 1;
55  else
56  region = -1;
57  if (num.getLevels() >= theLayerLevel)
58  layer = num.getBaseNo(theLayerLevel) + 1;
59  if (num.getLevels() >= theSectorLevel)
60  chamber = num.getBaseNo(theSectorLevel) + 1;
61  if (num.getLevels() >= theRollLevel)
62  roll = num.getBaseNo(theRollLevel) + 1;
63 
64  // collect all info
65 
66  // Debug using EDM_ML_DEBUG
67 #ifdef EDM_ML_DEBUG
68  edm::LogVerbatim("ME0NumberingScheme") << "ME0NumberingScheme: Region " << region << " Layer " << layer << " Chamber "
69  << chamber << " Roll " << roll;
70 #endif
71  // -----------------------
72 
73  // Build the actual numbering
74  ME0DetId id(region, layer, chamber, roll);
75 
76  // Debug using EDM_ML_DEBUG
77 #ifdef EDM_ML_DEBUG
78  edm::LogVerbatim("ME0NumberingScheme") << " DetId " << id;
79 #endif
80  // ---------------------
81 
82  return id.rawId();
83 }
personalPlayback.level
level
Definition: personalPlayback.py:22
MuonGeometryConstants
Definition: MuonGeometryConstants.h:20
MessageLogger.h
ME0NumberingScheme::baseNumberToUnitNumber
int baseNumberToUnitNumber(const MuonBaseNumber &) const override
Definition: ME0NumberingScheme.cc:30
ME0DetId.h
MuonGeometryConstants.h
ME0NumberingScheme::ME0NumberingScheme
ME0NumberingScheme(const MuonGeometryConstants &muonConstants)
Definition: ME0NumberingScheme.cc:10
ME0DetId::minRollId
static constexpr int minRollId
Definition: ME0DetId.h:72
ME0NumberingScheme::theLayerLevel
int theLayerLevel
Definition: ME0NumberingScheme.h:22
ME0NumberingScheme.h
ME0DetId::minChamberId
static constexpr int minChamberId
Definition: ME0DetId.h:66
ME0NumberingScheme::theNEtaPart
int theNEtaPart
Definition: ME0NumberingScheme.h:24
ME0DetId::minLayerId
static constexpr int minLayerId
Definition: ME0DetId.h:69
MuonBaseNumber.h
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88272
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
MuonBaseNumber
Definition: MuonBaseNumber.h:21
ME0NumberingScheme::theRollLevel
int theRollLevel
Definition: ME0NumberingScheme.h:23
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
ME0DetId::minRegionId
static constexpr int minRegionId
Definition: ME0DetId.h:63
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
Exception.h
ME0NumberingScheme::theSectorLevel
int theSectorLevel
Definition: ME0NumberingScheme.h:21
ME0NumberingScheme::initMe
void initMe(const MuonGeometryConstants &muonConstants)
Definition: ME0NumberingScheme.cc:12
edm::Log
Definition: MessageLogger.h:70