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 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 44 of file DTSequentialCellNumber.cc.

References relativeConstraints::station.

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

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

Definition at line 94 of file DTSequentialCellNumber.cc.

94  {
95  return 5 * cellsPerWheel;
96 }