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::DTNumberingScheme ( const MuonConstants muonConstants)

Definition at line 9 of file DD4hep_DTNumberingScheme.cc.

9 { initMe(muonConstants); }

References initMe().

Member Function Documentation

◆ baseNumberToUnitNumber()

int cms::DTNumberingScheme::baseNumberToUnitNumber ( const MuonBaseNumber )

◆ decode()

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 38 of file DD4hep_DTNumberingScheme.cc.

44  {
45  for (int level = 1; level <= num.getLevels(); ++level) {
46  //decode
47  if (level == theWheelLevel) {
48  const int copyno = num.getBaseNo(level);
49  wheel_id = copyno - 2;
50 
51  } else if (level == theStationLevel) {
52  const int station_tag = num.getSuperNo(level);
53  const int copyno = num.getBaseNo(level);
54  station_id = station_tag;
55  sector_id = copyno + 1;
56  } else if (level == theSuperLayerLevel) {
57  const int copyno = num.getBaseNo(level);
58  superlayer_id = copyno + 1;
59  } else if (level == theLayerLevel) {
60  const int copyno = num.getBaseNo(level);
61  layer_id = copyno + 1;
62  } else if (level == theWireLevel) {
63  const int copyno = num.getBaseNo(level);
64  wire_id = copyno + 1;
65  }
66  }
67 }

References personalPlayback::level, EgammaValidation_cff::num, theLayerLevel, theStationLevel, theSuperLayerLevel, theWheelLevel, and theWireLevel.

Referenced by getDetId().

◆ get()

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

◆ getDetId()

int DTNumberingScheme::getDetId ( const MuonBaseNumber num) const

Definition at line 22 of file DD4hep_DTNumberingScheme.cc.

22  {
23  int wire_id(0);
24  int layer_id(0);
25  int superlayer_id(0);
26  int sector_id(0);
27  int station_id(0);
28  int wheel_id(0);
29 
30  //decode significant barrel levels
31  decode(num, wire_id, layer_id, superlayer_id, sector_id, station_id, wheel_id);
32 
33  DTWireId id(wheel_id, station_id, sector_id, superlayer_id, layer_id, wire_id);
34 
35  return id.rawId();
36 }

References decode(), triggerObjects_cff::id, and EgammaValidation_cff::num.

◆ initMe()

void DTNumberingScheme::initMe ( const MuonConstants muonConstants)
private

Definition at line 11 of file DD4hep_DTNumberingScheme.cc.

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

References cms::cuda::assert(), get(), theLayerLevel, theRegionLevel, theStationLevel, theSuperLayerLevel, theWheelLevel, and theWireLevel.

Referenced by DTNumberingScheme().

Member Data Documentation

◆ theLayerLevel

int cms::DTNumberingScheme::theLayerLevel
private

Definition at line 49 of file DD4hep_DTNumberingScheme.h.

Referenced by decode(), and initMe().

◆ theRegionLevel

int cms::DTNumberingScheme::theRegionLevel
private

Definition at line 45 of file DD4hep_DTNumberingScheme.h.

Referenced by initMe().

◆ theStationLevel

int cms::DTNumberingScheme::theStationLevel
private

Definition at line 47 of file DD4hep_DTNumberingScheme.h.

Referenced by decode(), and initMe().

◆ theSuperLayerLevel

int cms::DTNumberingScheme::theSuperLayerLevel
private

Definition at line 48 of file DD4hep_DTNumberingScheme.h.

Referenced by decode(), and initMe().

◆ theWheelLevel

int cms::DTNumberingScheme::theWheelLevel
private

Definition at line 46 of file DD4hep_DTNumberingScheme.h.

Referenced by decode(), and initMe().

◆ theWireLevel

int cms::DTNumberingScheme::theWireLevel
private

Definition at line 50 of file DD4hep_DTNumberingScheme.h.

Referenced by decode(), and initMe().

personalPlayback.level
level
Definition: personalPlayback.py:22
cms::cuda::assert
assert(be >=bs)
end
#define end
Definition: vmac.h:39
cms::DTNumberingScheme::decode
void decode(const MuonBaseNumber &num, int &wire_id, int &layer_id, int &superlayer_id, int &sector_id, int &station_id, int &wheel_id) const
Definition: DD4hep_DTNumberingScheme.cc:38
DTWireId
Definition: DTWireId.h:12
cms::DTNumberingScheme::theWheelLevel
int theWheelLevel
Definition: DD4hep_DTNumberingScheme.h:46
cms::DTNumberingScheme::theWireLevel
int theWireLevel
Definition: DD4hep_DTNumberingScheme.h:50
cms::DTNumberingScheme::theSuperLayerLevel
int theSuperLayerLevel
Definition: DD4hep_DTNumberingScheme.h:48
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:34
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
cms::DTNumberingScheme::theStationLevel
int theStationLevel
Definition: DD4hep_DTNumberingScheme.h:47
cms::DTNumberingScheme::theLayerLevel
int theLayerLevel
Definition: DD4hep_DTNumberingScheme.h:49
cms::DTNumberingScheme::initMe
void initMe(const MuonConstants &)
Definition: DD4hep_DTNumberingScheme.cc:11
mps_fire.result
result
Definition: mps_fire.py:303
cms::DTNumberingScheme::theRegionLevel
int theRegionLevel
Definition: DD4hep_DTNumberingScheme.h:45
crabWrapper.key
key
Definition: crabWrapper.py:19
cms::DTNumberingScheme::get
const int get(const char *, const MuonConstants &) const
Definition: DD4hep_DTNumberingScheme.cc:69