CMS 3D CMS Logo

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

#include <DD4hep_DTNumberingScheme.h>

Public Member Functions

int baseNumberToUnitNumber (const MuonBaseNumber &)
 
 DTNumberingScheme (const MuonConstants &)
 
int getDetId (const MuonBaseNumber &) const
 

Private Member Functions

void decode (const MuonBaseNumber &num, int &wire_id, int &layer_id, int &superlayer_id, int &sector_id, int &station_id, int &wheel_id) const
 
const int get (const char *, const MuonConstants &) const
 
void initMe (const MuonConstants &)
 

Private Attributes

int theLayerLevel
 
int theRegionLevel
 
int theStationLevel
 
int theSuperLayerLevel
 
int theWheelLevel
 
int theWireLevel
 

Detailed Description

Definition at line 27 of file DD4hep_DTNumberingScheme.h.

Constructor & Destructor Documentation

DTNumberingScheme::DTNumberingScheme ( const MuonConstants muonConstants)

Definition at line 9 of file DD4hep_DTNumberingScheme.cc.

References initMe().

9  {
10  initMe(muonConstants);
11 }
void initMe(const MuonConstants &)

Member Function Documentation

int cms::DTNumberingScheme::baseNumberToUnitNumber ( const MuonBaseNumber )
void DTNumberingScheme::decode ( const MuonBaseNumber num,
int &  wire_id,
int &  layer_id,
int &  superlayer_id,
int &  sector_id,
int &  station_id,
int &  wheel_id 
) const
private

Definition at line 50 of file DD4hep_DTNumberingScheme.cc.

References MuonBaseNumber::getBaseNo(), MuonBaseNumber::getLevels(), MuonBaseNumber::getSuperNo(), hcalDigis_cfi::level, theLayerLevel, theStationLevel, theSuperLayerLevel, theWheelLevel, and theWireLevel.

Referenced by getDetId().

56  {
57  for(int level = 1; level <= num.getLevels(); ++level) {
58 
59  //decode
60  if(level == theWheelLevel) {
61  const int copyno = num.getBaseNo(level);
62  wheel_id = copyno-2;
63 
64  } else if (level == theStationLevel) {
65  const int station_tag = num.getSuperNo(level);
66  const int copyno = num.getBaseNo(level);
67  station_id = station_tag;
68  sector_id = copyno + 1;
69  } else if(level == theSuperLayerLevel) {
70  const int copyno = num.getBaseNo(level);
71  superlayer_id = copyno + 1;
72  } else if (level == theLayerLevel) {
73  const int copyno = num.getBaseNo(level);
74  layer_id = copyno+1;
75  } else if(level == theWireLevel) {
76  const int copyno = num.getBaseNo(level);
77  wire_id = copyno + 1;
78  }
79  }
80 }
int getBaseNo(int level) const
int getLevels() const
int getSuperNo(int level) const
const int DTNumberingScheme::get ( const char *  key,
const MuonConstants muonConstants 
) const
private
int DTNumberingScheme::getDetId ( const MuonBaseNumber num) const

Definition at line 26 of file DD4hep_DTNumberingScheme.cc.

References decode(), and triggerObjects_cff::id.

26  {
27 
28  int wire_id(0);
29  int layer_id(0);
30  int superlayer_id(0);
31  int sector_id(0);
32  int station_id(0);
33  int wheel_id(0);
34 
35  //decode significant barrel levels
36  decode(num,
37  wire_id,
38  layer_id,
39  superlayer_id,
40  sector_id,
41  station_id,
42  wheel_id);
43 
44  DTWireId id(wheel_id, station_id, sector_id, superlayer_id, layer_id, wire_id);
45 
46  return id.rawId();
47 }
void decode(const MuonBaseNumber &num, int &wire_id, int &layer_id, int &superlayer_id, int &sector_id, int &station_id, int &wheel_id) const
void DTNumberingScheme::initMe ( const MuonConstants muonConstants)
private

Definition at line 14 of file DD4hep_DTNumberingScheme.cc.

References theLayerLevel, theRegionLevel, theStationLevel, theSuperLayerLevel, theWheelLevel, and theWireLevel.

Referenced by DTNumberingScheme().

14  {
15  int levelPart = get("level", muonConstants);
16  assert(levelPart != 0);
17  theRegionLevel = get("mb_region", muonConstants)/levelPart;
18  theWheelLevel = get("mb_wheel", muonConstants)/levelPart;
19  theStationLevel = get("mb_station", muonConstants)/levelPart;
20  theSuperLayerLevel = get("mb_superlayer", muonConstants)/levelPart;
21  theLayerLevel = get("mb_layer", muonConstants)/levelPart;
22  theWireLevel = get("mb_wire", muonConstants)/levelPart;
23 }

Member Data Documentation

int cms::DTNumberingScheme::theLayerLevel
private

Definition at line 50 of file DD4hep_DTNumberingScheme.h.

Referenced by decode(), and initMe().

int cms::DTNumberingScheme::theRegionLevel
private

Definition at line 46 of file DD4hep_DTNumberingScheme.h.

Referenced by initMe().

int cms::DTNumberingScheme::theStationLevel
private

Definition at line 48 of file DD4hep_DTNumberingScheme.h.

Referenced by decode(), and initMe().

int cms::DTNumberingScheme::theSuperLayerLevel
private

Definition at line 49 of file DD4hep_DTNumberingScheme.h.

Referenced by decode(), and initMe().

int cms::DTNumberingScheme::theWheelLevel
private

Definition at line 47 of file DD4hep_DTNumberingScheme.h.

Referenced by decode(), and initMe().

int cms::DTNumberingScheme::theWireLevel
private

Definition at line 51 of file DD4hep_DTNumberingScheme.h.

Referenced by decode(), and initMe().