CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

virtual int baseNumberToUnitNumber (const MuonBaseNumber)
 
 ME0NumberingScheme (const DDCompactView &cpv)
 
 ME0NumberingScheme (const MuonDDDConstants &muonConstants)
 
virtual ~ME0NumberingScheme ()
 
- Public Member Functions inherited from MuonNumberingScheme
virtual int baseNumberToUnitNumber (const MuonBaseNumber &)
 
 MuonNumberingScheme ()
 
virtual ~MuonNumberingScheme ()
 

Private Member Functions

void initMe (const MuonDDDConstants &muonConstants)
 

Private Attributes

int theLayerLevel
 
int theRegionLevel
 
int theRollLevel
 
int theSectorLevel
 

Detailed Description

Definition at line 10 of file ME0NumberingScheme.h.

Constructor & Destructor Documentation

ME0NumberingScheme::ME0NumberingScheme ( const DDCompactView cpv)

Definition at line 13 of file ME0NumberingScheme.cc.

References initMe().

13  {
14  MuonDDDConstants muonConstants(cpv);
15  initMe(muonConstants);
16 }
void initMe(const MuonDDDConstants &muonConstants)
ME0NumberingScheme::ME0NumberingScheme ( const MuonDDDConstants muonConstants)

Definition at line 9 of file ME0NumberingScheme.cc.

References initMe().

9  {
10  initMe(muonConstants);
11 }
void initMe(const MuonDDDConstants &muonConstants)
virtual ME0NumberingScheme::~ME0NumberingScheme ( )
inlinevirtual

Definition at line 17 of file ME0NumberingScheme.h.

17 {};

Member Function Documentation

int ME0NumberingScheme::baseNumberToUnitNumber ( const MuonBaseNumber  num)
virtual

Definition at line 33 of file ME0NumberingScheme.cc.

References gather_cfg::cout, MuonBaseNumber::getBaseNo(), MuonBaseNumber::getLevels(), MuonBaseNumber::getSuperNo(), testEve_cfg::level, HLT_25ns14e33_v3_cff::region, theLayerLevel, theRegionLevel, and theSectorLevel.

Referenced by ME0GeometryBuilderFromDDD::buildGeometry().

33  {
34 
35 #ifdef LOCAL_DEBUG
36  std::cout << "ME0Numbering "<<num.getLevels()<<std::endl;
37  for (int level=1;level<=num.getLevels();level++) {
38  std::cout << "level "<<level << " " << num.getSuperNo(level)
39  << " " << num.getBaseNo(level) << std::endl;
40  }
41 #endif
42 
43  int maxLevel = theLayerLevel;
44  if (num.getLevels()!=maxLevel) {
45  std::cout << "MuonME0NS::BNToUN "
46  << "BaseNumber has " << num.getLevels() << " levels,"
47  << "need "<<maxLevel<<std::endl;
48  return 0;
49  }
50 
51  int region(0), layer(0), chamber(0), roll(0);
52 
53  //decode significant ME0 levels
54 
55  if (num.getBaseNo(theRegionLevel) == 0)
56  region = 1;
57  else
58  region =-1;
59  layer = num.getBaseNo(theLayerLevel)+1;
60  roll=1;
61  chamber = num.getBaseNo(theSectorLevel) + 1;
62  // collect all info
63 
64 #ifdef LOCAL_DEBUG
65  std::cout << "ME0NumberingScheme: Region " << region
66  << " Layer " << layer
67  << " Chamber " << chamber << " Roll " << roll << std::endl;
68 #endif
69 
70  // Build the actual numbering
71  ME0DetId id(region,layer,chamber,roll);
72 
73 
74 #ifdef LOCAL_DEBUG
75  std::cout << " DetId " << id << std::endl;
76 #endif
77 
78  return id.rawId();
79 }
int getBaseNo(int level) const
int getLevels() const
int getSuperNo(int level) const
tuple cout
Definition: gather_cfg.py:121
tuple level
Definition: testEve_cfg.py:34
void ME0NumberingScheme::initMe ( const MuonDDDConstants muonConstants)
private

Definition at line 18 of file ME0NumberingScheme.cc.

References gather_cfg::cout, MuonDDDConstants::getValue(), theLayerLevel, theRegionLevel, theRollLevel, and theSectorLevel.

Referenced by ME0NumberingScheme().

18  {
19  int theLevelPart= muonConstants.getValue("level");
20  theRegionLevel = muonConstants.getValue("m0_region")/theLevelPart;
21  theLayerLevel = muonConstants.getValue("m0_layer")/theLevelPart;
22  theSectorLevel = muonConstants.getValue("m0_sector")/theLevelPart;
23  theRollLevel = muonConstants.getValue("m0_roll")/theLevelPart;
24 #ifdef LOCAL_DEBUG
25  std::cout << "Initialize ME0NumberingScheme" <<std::endl;
26  std::cout << "theRegionLevel " << theRegionLevel <<std::endl;
27  std::cout << "theLayerLevel " << theLayerLevel <<std::endl;
28  std::cout << "theSectorLevel " << theSectorLevel <<std::endl;
29  std::cout << "theRollLevel " << theRollLevel <<std::endl;
30 #endif
31 }
int getValue(const std::string &name) const
tuple cout
Definition: gather_cfg.py:121

Member Data Documentation

int ME0NumberingScheme::theLayerLevel
private

Definition at line 26 of file ME0NumberingScheme.h.

Referenced by baseNumberToUnitNumber(), and initMe().

int ME0NumberingScheme::theRegionLevel
private

Definition at line 24 of file ME0NumberingScheme.h.

Referenced by baseNumberToUnitNumber(), and initMe().

int ME0NumberingScheme::theRollLevel
private

Definition at line 27 of file ME0NumberingScheme.h.

Referenced by initMe().

int ME0NumberingScheme::theSectorLevel
private

Definition at line 25 of file ME0NumberingScheme.h.

Referenced by baseNumberToUnitNumber(), and initMe().