CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Static Private Attributes

DTSequentialCellNumber Class Reference

#include <DTSequentialCellNumber.h>

List of all members.

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 14:42:49
Revision:
1.1
Author:
Paolo Ronchese INFN Padova

Definition at line 33 of file DTSequentialCellNumber.h.


Constructor & Destructor Documentation

DTSequentialCellNumber::DTSequentialCellNumber ( )
DTSequentialCellNumber::~DTSequentialCellNumber ( )

Definition at line 74 of file DTSequentialCellNumber.cc.

                                                {
}

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.

                                                 {

  wheel += 3;
  if ( wheel      <= 0 ) return -1;
  if ( station    <= 0 ) return -2;
  if ( sector     <= 0 ) return -3;
  if ( superlayer <= 0 ) return -4;
  if ( layer      <= 0 ) return -5;
  if ( cell       <= 0 ) return -6;

  int seqWireNum = 0;

  if ( wheel      >  5 ) return -1;
  seqWireNum += ( wheel - 1 ) * cellsPerWheel;

  if ( sector     > 14 ) return -2;
  if ( sector     > 12   &&
       station    <  4 ) return -2;
  if ( sector     > 13 ) seqWireNum += cellsIn13Sectors;
  else
  seqWireNum += ( sector - 1 ) * cellsPerSector;

  if ( station    >  4 ) return -3;
  if ( sector < 13 )
  seqWireNum += offsetChamber[station];

  if ( superlayer >  3 ) return -4;
  if ( layer      >  4 ) return -5;
  if ( superlayer != 2 ) {
    if ( cell     > cellsPerLayer[station] ) return -6;
    if ( superlayer == 3 ) layer += 4;
    seqWireNum += ( layer - 1 ) * cellsPerLayer[station];
  }
  else {
    if ( station  == 4 ) return -4;
    if ( cell     > cellsInTheta           ) return -6;
    seqWireNum += ( 8 * cellsPerLayer[station] ) +
                ( ( layer - 1 ) * cellsInTheta );
  }

  return seqWireNum + cell;

}
int DTSequentialCellNumber::max ( ) [static]

Definition at line 131 of file DTSequentialCellNumber.cc.

References cellsPerWheel.

                                {
  return 5 * cellsPerWheel;
}

Member Data Documentation

int DTSequentialCellNumber::cellsIn13Sectors = 0 [static, private]

Definition at line 48 of file DTSequentialCellNumber.h.

Referenced by DTSequentialCellNumber(), and id().

int DTSequentialCellNumber::cellsInMB1 = 0 [static, private]

Definition at line 50 of file DTSequentialCellNumber.h.

Referenced by DTSequentialCellNumber().

int DTSequentialCellNumber::cellsInMB2 = 0 [static, private]

Definition at line 51 of file DTSequentialCellNumber.h.

Referenced by DTSequentialCellNumber().

int DTSequentialCellNumber::cellsInMB3 = 0 [static, private]

Definition at line 52 of file DTSequentialCellNumber.h.

Referenced by DTSequentialCellNumber().

int DTSequentialCellNumber::cellsInMB4 = 0 [static, private]

Definition at line 53 of file DTSequentialCellNumber.h.

Referenced by DTSequentialCellNumber().

int DTSequentialCellNumber::cellsInTheta = 58 [static, private]

Definition at line 49 of file DTSequentialCellNumber.h.

Referenced by DTSequentialCellNumber(), and id().

int * DTSequentialCellNumber::cellsPerLayer = 0 [static, private]

Definition at line 56 of file DTSequentialCellNumber.h.

Referenced by DTSequentialCellNumber(), and id().

int DTSequentialCellNumber::cellsPerSector = 0 [static, private]

Definition at line 47 of file DTSequentialCellNumber.h.

Referenced by DTSequentialCellNumber(), and id().

int DTSequentialCellNumber::cellsPerWheel = 0 [static, private]

Definition at line 46 of file DTSequentialCellNumber.h.

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

int * DTSequentialCellNumber::offsetChamber = 0 [static, private]

Definition at line 55 of file DTSequentialCellNumber.h.

Referenced by DTSequentialCellNumber(), and id().