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
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 ()
 

Static Private Attributes

static int layersIn13Sectors = 0
 
static int layersPerSector = 0
 
static int layersPerWheel = 0
 
static int * offsetChamber = 0
 

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 33 of file DTSequentialLayerNumber.h.

Constructor & Destructor Documentation

DTSequentialLayerNumber::DTSequentialLayerNumber ( )

Definition at line 40 of file DTSequentialLayerNumber.cc.

References layersIn13Sectors, layersPerSector, layersPerWheel, and offsetChamber.

40  {
41  if ( offsetChamber == 0 ) {
42  offsetChamber = new int[5];
43  offsetChamber[1] = 0;
44  offsetChamber[2] = 12;
45  offsetChamber[3] = 24;
46  offsetChamber[4] = 36;
47  layersPerSector = 44;
48  layersIn13Sectors = ( layersPerSector * 12 ) + 8;
50  }
51 }
DTSequentialLayerNumber::~DTSequentialLayerNumber ( )

Definition at line 57 of file DTSequentialLayerNumber.cc.

57  {
58 }

Member Function Documentation

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

Definition at line 61 of file DTSequentialLayerNumber.cc.

References layersIn13Sectors, layersPerSector, layersPerWheel, offsetChamber, and relativeConstraints::station.

65  {
66 
67  wheel += 3;
68  if ( wheel <= 0 ) return -1;
69  if ( station <= 0 ) return -2;
70  if ( sector <= 0 ) return -3;
71  if ( superlayer <= 0 ) return -4;
72  if ( layer <= 0 ) return -5;
73 
74  int seqLayerNum = 0;
75 
76  if ( wheel > 5 ) return -1;
77  seqLayerNum += ( wheel - 1 ) * layersPerWheel;
78 
79  if ( sector > 14 ) return -2;
80  if ( sector > 12 &&
81  station < 4 ) return -2;
82  if ( sector > 13 ) seqLayerNum += layersIn13Sectors;
83  else
84  seqLayerNum += ( sector - 1 ) * layersPerSector;
85 
86  if ( station > 4 ) return -3;
87  if ( sector < 13 )
88  seqLayerNum += offsetChamber[station];
89 
90  if ( superlayer > 3 ) return -4;
91  if ( layer > 4 ) return -5;
92  if ( superlayer != 2 ) {
93  if ( superlayer == 3 ) layer += 4;
94  }
95  else {
96  if ( station == 4 ) return -4;
97  layer += 8;
98  }
99 
100  return seqLayerNum + layer;
101 
102 }
int DTSequentialLayerNumber::max ( )
static

Definition at line 105 of file DTSequentialLayerNumber.cc.

References layersPerWheel.

105  {
106  return 5 * layersPerWheel;
107 }

Member Data Documentation

int DTSequentialLayerNumber::layersIn13Sectors = 0
staticprivate

Definition at line 48 of file DTSequentialLayerNumber.h.

Referenced by DTSequentialLayerNumber(), and id().

int DTSequentialLayerNumber::layersPerSector = 0
staticprivate

Definition at line 47 of file DTSequentialLayerNumber.h.

Referenced by DTSequentialLayerNumber(), and id().

int DTSequentialLayerNumber::layersPerWheel = 0
staticprivate

Definition at line 46 of file DTSequentialLayerNumber.h.

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

int * DTSequentialLayerNumber::offsetChamber = 0
staticprivate

Definition at line 50 of file DTSequentialLayerNumber.h.

Referenced by DTSequentialLayerNumber(), and id().