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

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.

40  {
41 }
DTSequentialLayerNumber::~DTSequentialLayerNumber ( )

Definition at line 47 of file DTSequentialLayerNumber.cc.

47  {
48 }

Member Function Documentation

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

Definition at line 51 of file DTSequentialLayerNumber.cc.

References relativeConstraints::station.

55  {
56 
57  wheel += 3;
58  if ( wheel <= 0 ) return -1;
59  if ( station <= 0 ) return -2;
60  if ( sector <= 0 ) return -3;
61  if ( superlayer <= 0 ) return -4;
62  if ( layer <= 0 ) return -5;
63 
64  int seqLayerNum = 0;
65 
66  if ( wheel > 5 ) return -1;
67  seqLayerNum += ( wheel - 1 ) * layersPerWheel;
68 
69  if ( sector > 14 ) return -2;
70  if ( sector > 12 &&
71  station < 4 ) return -2;
72  if ( sector > 13 ) seqLayerNum += layersIn13Sectors;
73  else
74  seqLayerNum += ( sector - 1 ) * layersPerSector;
75 
76  if ( station > 4 ) return -3;
77  if ( sector < 13 )
78  seqLayerNum += offsetChamber[station];
79 
80  if ( superlayer > 3 ) return -4;
81  if ( layer > 4 ) return -5;
82  if ( superlayer != 2 ) {
83  if ( superlayer == 3 ) layer += 4;
84  }
85  else {
86  if ( station == 4 ) return -4;
87  layer += 8;
88  }
89 
90  return seqLayerNum + layer;
91 
92 }
int DTSequentialLayerNumber::max ( )
static

Definition at line 95 of file DTSequentialLayerNumber.cc.

95  {
96  return 5 * layersPerWheel;
97 }