CMS 3D CMS Logo

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

#include <GEMNumberingScheme.h>

Inheritance diagram for GEMNumberingScheme:
MuonNumberingScheme

Public Member Functions

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

Private Member Functions

void initMe (const MuonGeometryConstants &muonConstants)
 

Private Attributes

int theRegionLevel
 
int theRingLevel
 
int theRollLevel
 
int theSectorLevel
 
int theStationLevel
 

Detailed Description

Definition at line 9 of file GEMNumberingScheme.h.

Constructor & Destructor Documentation

◆ GEMNumberingScheme()

GEMNumberingScheme::GEMNumberingScheme ( const MuonGeometryConstants muonConstants)

Definition at line 9 of file GEMNumberingScheme.cc.

9 { initMe(muonConstants); }

References initMe().

◆ ~GEMNumberingScheme()

GEMNumberingScheme::~GEMNumberingScheme ( )
inlineoverride

Definition at line 13 of file GEMNumberingScheme.h.

13 {};

Member Function Documentation

◆ baseNumberToUnitNumber()

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

Reimplemented from MuonNumberingScheme.

Definition at line 26 of file GEMNumberingScheme.cc.

26  {
27 #ifdef EDM_ML_DEBUG
28  edm::LogVerbatim("GEMNumberingScheme") << "GEMNumbering " << num.getLevels();
29  for (int level = 1; level <= num.getLevels(); level++) {
30  edm::LogVerbatim("GEMNumberingScheme") << level << " " << num.getSuperNo(level) << " " << num.getBaseNo(level);
31  }
32 #endif
33 
34  int levels = num.getLevels();
35 #ifdef EDM_ML_DEBUG
36  if (levels != theRollLevel)
37  edm::LogVerbatim("GEMNumberingScheme") << "MuonGEMNumberingScheme::BNToUN: BaseNumber has " << num.getLevels()
38  << " levels, need at least till " << theRollLevel;
39 #endif
40 
44 
45  //decode significant GEM levels
46 
47  if (levels >= theRegionLevel) {
48  if (num.getBaseNo(theRegionLevel) == 0)
49  region = 1;
50  else
51  region = -1;
52  }
53 
54  // All GEM super chambers in stations 1 and 2 are on ring 1.
55  // The long super chambers in station 2 are assigned *station 3* due
56  // to the current limitation in the definition of the GEMDetId,
57  // i.e. only 2 layers available per station.
58  // ring = num.getSuperNo(theRingLevel);
59  // GEM are only on the first ring
60  ring = 1;
61 
62  // GE0 has the layer encoded in the ring level
63  if (levels > theRingLevel) {
64  if (num.getBaseNo(theRingLevel) == 0) { // 0 => GE1/1, GE2/1
65  station = num.getSuperNo(theStationLevel);
66 #ifdef EDM_ML_DEBUG
67  edm::LogVerbatim("GEMNumberingScheme")
68  << "GEMNumbering: Ring " << ring << " Station " << num.getSuperNo(theStationLevel) << ":" << station;
69 #endif
70  if (levels >= theRollLevel)
71  roll = num.getBaseNo(theRollLevel) + 1;
72  if (levels >= theSectorLevel) {
73  const int copyno = num.getBaseNo(theSectorLevel) + 1;
74  // Half the chambers are flipped back to front, this is encoded in
75  // the chamber number, which affects the layer numbering. Layer 1
76  // is always the closest layer to the interaction point.
77  const int layerDemarcation = 50;
78  if (copyno < layerDemarcation) {
79  if (copyno % 2 == 0) {
80  layer = 2;
81  chamber = copyno - 1;
82  } else {
83  layer = 1;
84  chamber = copyno;
85  }
86  } else {
87  int copynp = copyno - layerDemarcation;
88  if (copynp % 2 != 0) {
89  layer = 2;
90  chamber = copynp - 1;
91  } else {
92  layer = 1;
93  chamber = copynp;
94  }
95  }
96  }
97  } else { // GE0 encodes the layer
99  layer = num.getBaseNo(theRingLevel);
100  if (levels >= theSectorLevel)
101  chamber = num.getBaseNo(theSectorLevel) + 1;
102  if (levels >= theRollLevel)
103  roll = num.getBaseNo(theRollLevel) + 1;
104  }
105  } else if (levels == theRingLevel) {
107  layer = 1;
108  }
109 
110  // collect all info
111 
112 #ifdef EDM_ML_DEBUG
113  edm::LogVerbatim("GEMNumberingScheme") << "GEMNumberingScheme: Region " << region << " Ring " << ring << " Station "
114  << station << " Layer " << layer << " Chamber " << chamber << " Roll " << roll;
115 #endif
116 
117  // Build the actual numbering
119 
120 #ifdef EDM_ML_DEBUG
121  edm::LogVerbatim("GEMNumberingScheme") << id.rawId() << " DetId " << id;
122 #endif
123 
124  return id.rawId();
125 }

References relativeConstraints::chamber, triggerObjects_cff::id, phase1PixelTopology::layer, personalPlayback::level, jets_cff::levels, GEMDetId::minChamberId, GEMDetId::minLayerId, GEMDetId::minRegionId, GEMDetId::minRingId, GEMDetId::minRollId, GEMDetId::minStationId0, EgammaValidation_cff::num, HLT_FULL_cff::region, relativeConstraints::ring, relativeConstraints::station, theRegionLevel, theRingLevel, theRollLevel, theSectorLevel, and theStationLevel.

Referenced by GEMGeometryBuilder::build(), and GEMGeometryParsFromDD::buildGeometry().

◆ initMe()

void GEMNumberingScheme::initMe ( const MuonGeometryConstants muonConstants)
private

Definition at line 11 of file GEMNumberingScheme.cc.

11  {
12  int theLevelPart = muonConstants.getValue("level");
13  theRegionLevel = muonConstants.getValue("mg_region") / theLevelPart;
14  theStationLevel = muonConstants.getValue("mg_station") / theLevelPart;
15  theRingLevel = muonConstants.getValue("mg_ring") / theLevelPart;
16  theSectorLevel = muonConstants.getValue("mg_sector") / theLevelPart;
17  theRollLevel = muonConstants.getValue("mg_roll") / theLevelPart;
18 #ifdef EDM_ML_DEBUG
19  edm::LogVerbatim("GEMNumberingScheme") << "Initialize GEMNumberingScheme"
20  << "\ntheRegionLevel " << theRegionLevel << "\ntheStationLevel "
21  << theStationLevel << "\ntheRingLevel " << theRingLevel << "\ntheSectorLevel "
22  << theSectorLevel << "\ntheRollLevel " << theRollLevel;
23 #endif
24 }

References MuonGeometryConstants::getValue(), theRegionLevel, theRingLevel, theRollLevel, theSectorLevel, and theStationLevel.

Referenced by GEMNumberingScheme().

Member Data Documentation

◆ theRegionLevel

int GEMNumberingScheme::theRegionLevel
private

Definition at line 20 of file GEMNumberingScheme.h.

Referenced by baseNumberToUnitNumber(), and initMe().

◆ theRingLevel

int GEMNumberingScheme::theRingLevel
private

Definition at line 22 of file GEMNumberingScheme.h.

Referenced by baseNumberToUnitNumber(), and initMe().

◆ theRollLevel

int GEMNumberingScheme::theRollLevel
private

Definition at line 24 of file GEMNumberingScheme.h.

Referenced by baseNumberToUnitNumber(), and initMe().

◆ theSectorLevel

int GEMNumberingScheme::theSectorLevel
private

Definition at line 23 of file GEMNumberingScheme.h.

Referenced by baseNumberToUnitNumber(), and initMe().

◆ theStationLevel

int GEMNumberingScheme::theStationLevel
private

Definition at line 21 of file GEMNumberingScheme.h.

Referenced by baseNumberToUnitNumber(), and initMe().

personalPlayback.level
level
Definition: personalPlayback.py:22
relativeConstraints.station
station
Definition: relativeConstraints.py:67
GEMDetId::minChamberId
static constexpr int32_t minChamberId
Definition: GEMDetId.h:28
GEMDetId::minLayerId
static constexpr int32_t minLayerId
Definition: GEMDetId.h:30
GEMNumberingScheme::theRegionLevel
int theRegionLevel
Definition: GEMNumberingScheme.h:20
GEMDetId::minStationId0
static constexpr int32_t minStationId0
Definition: GEMDetId.h:24
GEMNumberingScheme::theRingLevel
int theRingLevel
Definition: GEMNumberingScheme.h:22
GEMDetId::minRingId
static constexpr int32_t minRingId
Definition: GEMDetId.h:22
GEMNumberingScheme::theSectorLevel
int theSectorLevel
Definition: GEMNumberingScheme.h:23
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
GEMDetId
Definition: GEMDetId.h:18
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88271
GEMNumberingScheme::theStationLevel
int theStationLevel
Definition: GEMNumberingScheme.h:21
GEMDetId::minRegionId
static constexpr int32_t minRegionId
Definition: GEMDetId.h:20
MuonGeometryConstants::getValue
int getValue(const std::string &name) const
Definition: MuonGeometryConstants.cc:8
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:34
GEMNumberingScheme::initMe
void initMe(const MuonGeometryConstants &muonConstants)
Definition: GEMNumberingScheme.cc:11
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
GEMNumberingScheme::theRollLevel
int theRollLevel
Definition: GEMNumberingScheme.h:24
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
GEMDetId::minRollId
static constexpr int32_t minRollId
Definition: GEMDetId.h:35
jets_cff.levels
levels
Definition: jets_cff.py:21