CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions
DTSequentialLayerNumber Class Reference

#include <DTSequentialLayerNumber.h>

Public Member Functions

 DTSequentialLayerNumber ()
 
 ~DTSequentialLayerNumber ()
 

Static Public Member Functions

static int id (int wheel, int station, int sector, int superlayer, int layer)
 
static int max ()
 

Detailed Description

Description: Class to compute a sequential number for drift tube layers

Date
2010/04/30 16:20:08
Revision
1.1
Author
Paolo Ronchese INFN Padova

Definition at line 30 of file DTSequentialLayerNumber.h.

Constructor & Destructor Documentation

◆ DTSequentialLayerNumber()

DTSequentialLayerNumber::DTSequentialLayerNumber ( )

Definition at line 37 of file DTSequentialLayerNumber.cc.

37 {}

◆ ~DTSequentialLayerNumber()

DTSequentialLayerNumber::~DTSequentialLayerNumber ( )

Definition at line 42 of file DTSequentialLayerNumber.cc.

42 {}

Member Function Documentation

◆ id()

int DTSequentialLayerNumber::id ( int  wheel,
int  station,
int  sector,
int  superlayer,
int  layer 
)
static

Definition at line 44 of file DTSequentialLayerNumber.cc.

References phase1PixelTopology::layer, relativeConstraints::station, and makeMuonMisalignmentScenario::wheel.

44  {
45  wheel += 3;
46  if (wheel <= 0)
47  return -1;
48  if (station <= 0)
49  return -2;
50  if (sector <= 0)
51  return -3;
52  if (superlayer <= 0)
53  return -4;
54  if (layer <= 0)
55  return -5;
56 
57  int seqLayerNum = 0;
58 
59  if (wheel > 5)
60  return -1;
61  seqLayerNum += (wheel - 1) * layersPerWheel;
62 
63  if (sector > 14)
64  return -2;
65  if (sector > 12 && station < 4)
66  return -2;
67  if (sector > 13)
68  seqLayerNum += layersIn13Sectors;
69  else
70  seqLayerNum += (sector - 1) * layersPerSector;
71 
72  if (station > 4)
73  return -3;
74  if (sector < 13)
75  seqLayerNum += offsetChamber[station];
76 
77  if (superlayer > 3)
78  return -4;
79  if (layer > 4)
80  return -5;
81  if (superlayer != 2) {
82  if (superlayer == 3)
83  layer += 4;
84  } else {
85  if (station == 4)
86  return -4;
87  layer += 8;
88  }
89 
90  return seqLayerNum + layer;
91 }
constexpr std::array< uint8_t, layerIndexSize > layer

◆ max()

int DTSequentialLayerNumber::max ( )
static

Definition at line 93 of file DTSequentialLayerNumber.cc.

93 { return 5 * layersPerWheel; }