CMS 3D CMS Logo

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

#include <DTSequentialCellNumber.h>

Static Public Member Functions

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

Detailed Description

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

Date
2012/02/07 18:34:59
Revision
1.1.2.1
Author
Paolo Ronchese INFN Padova

Definition at line 30 of file DTSequentialCellNumber.h.

Member Function Documentation

◆ id()

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

Definition at line 39 of file DTSequentialCellNumber.cc.

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

Referenced by DTT0::get(), and DTT0::set().

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

◆ max()

int DTSequentialCellNumber::max ( )
static

Definition at line 95 of file DTSequentialCellNumber.cc.

95 { return 5 * cellsPerWheel; }