CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 33 of file DTSequentialCellNumber.h.

Member Function Documentation

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

Definition at line 43 of file DTSequentialCellNumber.cc.

References cellsIn13Sectors, cellsInTheta, cellsPerLayer, and relativeConstraints::station.

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

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

Definition at line 93 of file DTSequentialCellNumber.cc.

References cellsPerWheel.

93  {
94  return 5 * cellsPerWheel;
95 }
constexpr int cellsPerWheel