CMS 3D CMS Logo

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

#include <DD4hep_ME0NumberingScheme.h>

Public Member Functions

void baseNumberToUnitNumber (const MuonBaseNumber &)
 
int getDetId () const
 
 ME0NumberingScheme (const MuonConstants &muonConstants)
 

Private Member Functions

const int get (const char *, const MuonConstants &) const
 
void initMe (const MuonConstants &muonConstants)
 
void setDetId (int idnew)
 

Private Attributes

int detId
 
int theLayerLevel
 
int theNEtaPart
 
int theRegionLevel
 
int theRollLevel
 
int theSectorLevel
 

Detailed Description

Definition at line 20 of file DD4hep_ME0NumberingScheme.h.

Constructor & Destructor Documentation

◆ ME0NumberingScheme()

ME0NumberingScheme::ME0NumberingScheme ( const MuonConstants muonConstants)

Definition at line 20 of file DD4hep_ME0NumberingScheme.cc.

20 { initMe(muonConstants); }

References initMe().

Member Function Documentation

◆ baseNumberToUnitNumber()

void ME0NumberingScheme::baseNumberToUnitNumber ( const MuonBaseNumber num)

Definition at line 34 of file DD4hep_ME0NumberingScheme.cc.

34  {
35  int region = 0;
36  int layer = 0;
37  int chamber = 0;
38  int roll = 0;
39 
40  //decode significant ME0 levels
41 
42  if (num.getBaseNo(theRegionLevel) == 0)
43  region = 1;
44  else
45  region = -1;
46  layer = num.getBaseNo(theLayerLevel) + 1;
47  chamber = num.getBaseNo(theSectorLevel) + 1;
48  roll = num.getBaseNo(theRollLevel) + 1;
49 
50  // Build the actual numbering
51  ME0DetId id(region, layer, chamber, roll);
52 
53  setDetId(id.rawId());
54 }

References relativeConstraints::chamber, triggerObjects_cff::id, EgammaValidation_cff::num, HLT_2018_cff::region, setDetId(), theLayerLevel, theRegionLevel, theRollLevel, and theSectorLevel.

Referenced by ME0GeometryBuilder::buildGeometry().

◆ get()

const int ME0NumberingScheme::get ( const char *  key,
const MuonConstants muonConstants 
) const
private

◆ getDetId()

int cms::ME0NumberingScheme::getDetId ( void  ) const
inline

Definition at line 24 of file DD4hep_ME0NumberingScheme.h.

24 { return detId; }

References detId.

◆ initMe()

void ME0NumberingScheme::initMe ( const MuonConstants muonConstants)
private

Definition at line 22 of file DD4hep_ME0NumberingScheme.cc.

22  {
23  int theLevelPart = get("level", muonConstants);
24 
25  assert(theLevelPart != 0);
26 
27  theRegionLevel = get("m0_region", muonConstants) / theLevelPart;
28  theLayerLevel = get("m0_layer", muonConstants) / theLevelPart;
29  theSectorLevel = get("m0_sector", muonConstants) / theLevelPart;
30  theRollLevel = get("m0_roll", muonConstants) / theLevelPart;
31  theNEtaPart = get("m0_nroll", muonConstants);
32 }

References cms::cuda::assert(), get(), theLayerLevel, theNEtaPart, theRegionLevel, theRollLevel, and theSectorLevel.

Referenced by ME0NumberingScheme().

◆ setDetId()

void cms::ME0NumberingScheme::setDetId ( int  idnew)
inlineprivate

Definition at line 29 of file DD4hep_ME0NumberingScheme.h.

29 { detId = idnew; }

References detId.

Referenced by baseNumberToUnitNumber().

Member Data Documentation

◆ detId

int cms::ME0NumberingScheme::detId
private

Definition at line 37 of file DD4hep_ME0NumberingScheme.h.

Referenced by getDetId(), and setDetId().

◆ theLayerLevel

int cms::ME0NumberingScheme::theLayerLevel
private

Definition at line 33 of file DD4hep_ME0NumberingScheme.h.

Referenced by baseNumberToUnitNumber(), and initMe().

◆ theNEtaPart

int cms::ME0NumberingScheme::theNEtaPart
private

Definition at line 35 of file DD4hep_ME0NumberingScheme.h.

Referenced by initMe().

◆ theRegionLevel

int cms::ME0NumberingScheme::theRegionLevel
private

Definition at line 31 of file DD4hep_ME0NumberingScheme.h.

Referenced by baseNumberToUnitNumber(), and initMe().

◆ theRollLevel

int cms::ME0NumberingScheme::theRollLevel
private

Definition at line 34 of file DD4hep_ME0NumberingScheme.h.

Referenced by baseNumberToUnitNumber(), and initMe().

◆ theSectorLevel

int cms::ME0NumberingScheme::theSectorLevel
private

Definition at line 32 of file DD4hep_ME0NumberingScheme.h.

Referenced by baseNumberToUnitNumber(), and initMe().

cms::ME0NumberingScheme::theNEtaPart
int theNEtaPart
Definition: DD4hep_ME0NumberingScheme.h:35
cms::ME0NumberingScheme::initMe
void initMe(const MuonConstants &muonConstants)
Definition: DD4hep_ME0NumberingScheme.cc:22
cms::ME0NumberingScheme::setDetId
void setDetId(int idnew)
Definition: DD4hep_ME0NumberingScheme.h:29
cms::cuda::assert
assert(be >=bs)
end
#define end
Definition: vmac.h:39
cms::ME0NumberingScheme::theRollLevel
int theRollLevel
Definition: DD4hep_ME0NumberingScheme.h:34
cms::ME0NumberingScheme::theSectorLevel
int theSectorLevel
Definition: DD4hep_ME0NumberingScheme.h:32
cms::ME0NumberingScheme::detId
int detId
Definition: DD4hep_ME0NumberingScheme.h:37
ME0DetId
Definition: ME0DetId.h:16
cms::ME0NumberingScheme::theLayerLevel
int theLayerLevel
Definition: DD4hep_ME0NumberingScheme.h:33
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:34
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
cms::ME0NumberingScheme::theRegionLevel
int theRegionLevel
Definition: DD4hep_ME0NumberingScheme.h:31
cms::ME0NumberingScheme::get
const int get(const char *, const MuonConstants &) const
Definition: DD4hep_ME0NumberingScheme.cc:56
HLT_2018_cff.region
region
Definition: HLT_2018_cff.py:81479
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
mps_fire.result
result
Definition: mps_fire.py:303
crabWrapper.key
key
Definition: crabWrapper.py:19