CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Static Private Attributes
DTSequentialCellNumber Class Reference

#include <DTSequentialCellNumber.h>

Public Member Functions

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

Static Public Member Functions

static int max ()
 

Static Private Attributes

static int cellsIn13Sectors = 0
 
static int cellsInMB1 = 0
 
static int cellsInMB2 = 0
 
static int cellsInMB3 = 0
 
static int cellsInMB4 = 0
 
static int cellsInTheta = 58
 
static int * cellsPerLayer = 0
 
static int cellsPerSector = 0
 
static int cellsPerWheel = 0
 
static int * offsetChamber = 0
 

Detailed Description

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

Date:
2010/05/06 16:23:00
Revision:
1.1
Author
Paolo Ronchese INFN Padova

Definition at line 33 of file DTSequentialCellNumber.h.

Constructor & Destructor Documentation

DTSequentialCellNumber::DTSequentialCellNumber ( )

Definition at line 46 of file DTSequentialCellNumber.cc.

References cellsIn13Sectors, cellsInMB1, cellsInMB2, cellsInMB3, cellsInMB4, cellsInTheta, cellsPerLayer, cellsPerSector, cellsPerWheel, and offsetChamber.

46  {
47  if ( cellsPerLayer == 0 ) {
48  cellsPerLayer = new int[5];
49  cellsPerLayer[1] = 50;
50  cellsPerLayer[2] = 60;
51  cellsPerLayer[3] = 72;
52  cellsPerLayer[4] = 96;
53  }
54  if ( offsetChamber == 0 ) {
55  offsetChamber = new int[5];
56  cellsInMB1 = ( cellsPerLayer[1] * 8 ) + ( cellsInTheta * 4 );
57  cellsInMB2 = ( cellsPerLayer[2] * 8 ) + ( cellsInTheta * 4 );
58  cellsInMB3 = ( cellsPerLayer[3] * 8 ) + ( cellsInTheta * 4 );
59  cellsInMB4 = cellsPerLayer[4] * 8;
60  offsetChamber[1] = 0;
63  offsetChamber[4] = cellsInMB1 + cellsInMB2 + cellsInMB3;
64  cellsPerSector = cellsInMB1 + cellsInMB2 + cellsInMB3 + cellsInMB4;
65  cellsIn13Sectors = ( cellsPerSector * 12 ) + cellsInMB4;
67  }
68 }
DTSequentialCellNumber::~DTSequentialCellNumber ( )

Definition at line 74 of file DTSequentialCellNumber.cc.

74  {
75 }

Member Function Documentation

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

Definition at line 81 of file DTSequentialCellNumber.cc.

References cellsIn13Sectors, cellsInTheta, cellsPerLayer, cellsPerSector, cellsPerWheel, offsetChamber, and relativeConstraints::station.

86  {
87 
88  wheel += 3;
89  if ( wheel <= 0 ) return -1;
90  if ( station <= 0 ) return -2;
91  if ( sector <= 0 ) return -3;
92  if ( superlayer <= 0 ) return -4;
93  if ( layer <= 0 ) return -5;
94  if ( cell <= 0 ) return -6;
95 
96  int seqWireNum = 0;
97 
98  if ( wheel > 5 ) return -1;
99  seqWireNum += ( wheel - 1 ) * cellsPerWheel;
100 
101  if ( sector > 14 ) return -2;
102  if ( sector > 12 &&
103  station < 4 ) return -2;
104  if ( sector > 13 ) seqWireNum += cellsIn13Sectors;
105  else
106  seqWireNum += ( sector - 1 ) * cellsPerSector;
107 
108  if ( station > 4 ) return -3;
109  if ( sector < 13 )
110  seqWireNum += offsetChamber[station];
111 
112  if ( superlayer > 3 ) return -4;
113  if ( layer > 4 ) return -5;
114  if ( superlayer != 2 ) {
115  if ( cell > cellsPerLayer[station] ) return -6;
116  if ( superlayer == 3 ) layer += 4;
117  seqWireNum += ( layer - 1 ) * cellsPerLayer[station];
118  }
119  else {
120  if ( station == 4 ) return -4;
121  if ( cell > cellsInTheta ) return -6;
122  seqWireNum += ( 8 * cellsPerLayer[station] ) +
123  ( ( layer - 1 ) * cellsInTheta );
124  }
125 
126  return seqWireNum + cell;
127 
128 }
int DTSequentialCellNumber::max ( )
static

Definition at line 131 of file DTSequentialCellNumber.cc.

References cellsPerWheel.

131  {
132  return 5 * cellsPerWheel;
133 }

Member Data Documentation

int DTSequentialCellNumber::cellsIn13Sectors = 0
staticprivate

Definition at line 48 of file DTSequentialCellNumber.h.

Referenced by DTSequentialCellNumber(), and id().

int DTSequentialCellNumber::cellsInMB1 = 0
staticprivate

Definition at line 50 of file DTSequentialCellNumber.h.

Referenced by DTSequentialCellNumber().

int DTSequentialCellNumber::cellsInMB2 = 0
staticprivate

Definition at line 51 of file DTSequentialCellNumber.h.

Referenced by DTSequentialCellNumber().

int DTSequentialCellNumber::cellsInMB3 = 0
staticprivate

Definition at line 52 of file DTSequentialCellNumber.h.

Referenced by DTSequentialCellNumber().

int DTSequentialCellNumber::cellsInMB4 = 0
staticprivate

Definition at line 53 of file DTSequentialCellNumber.h.

Referenced by DTSequentialCellNumber().

int DTSequentialCellNumber::cellsInTheta = 58
staticprivate

Definition at line 49 of file DTSequentialCellNumber.h.

Referenced by DTSequentialCellNumber(), and id().

int * DTSequentialCellNumber::cellsPerLayer = 0
staticprivate

Definition at line 56 of file DTSequentialCellNumber.h.

Referenced by DTSequentialCellNumber(), and id().

int DTSequentialCellNumber::cellsPerSector = 0
staticprivate

Definition at line 47 of file DTSequentialCellNumber.h.

Referenced by DTSequentialCellNumber(), and id().

int DTSequentialCellNumber::cellsPerWheel = 0
staticprivate

Definition at line 46 of file DTSequentialCellNumber.h.

Referenced by DTSequentialCellNumber(), id(), and max().

int * DTSequentialCellNumber::offsetChamber = 0
staticprivate

Definition at line 55 of file DTSequentialCellNumber.h.

Referenced by DTSequentialCellNumber(), and id().