#include <DTSequentialCellNumber.h>
Public Member Functions | |
DTSequentialCellNumber () | |
~DTSequentialCellNumber () | |
Static Public Member Functions | |
static int | id (int wheel, int station, int sector, int superlayer, int layer, int cell) |
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 |
Description: Class to compute a sequential number for drift tube cells
Definition at line 33 of file DTSequentialCellNumber.h.
DTSequentialCellNumber::DTSequentialCellNumber | ( | ) |
Definition at line 46 of file DTSequentialCellNumber.cc.
References cellsIn13Sectors, cellsInMB1, cellsInMB2, cellsInMB3, cellsInMB4, cellsInTheta, cellsPerLayer, cellsPerSector, cellsPerWheel, and offsetChamber.
{ if ( cellsPerLayer == 0 ) { cellsPerLayer = new int[5]; cellsPerLayer[1] = 50; cellsPerLayer[2] = 60; cellsPerLayer[3] = 72; cellsPerLayer[4] = 96; } if ( offsetChamber == 0 ) { offsetChamber = new int[5]; cellsInMB1 = ( cellsPerLayer[1] * 8 ) + ( cellsInTheta * 4 ); cellsInMB2 = ( cellsPerLayer[2] * 8 ) + ( cellsInTheta * 4 ); cellsInMB3 = ( cellsPerLayer[3] * 8 ) + ( cellsInTheta * 4 ); cellsInMB4 = cellsPerLayer[4] * 8; offsetChamber[1] = 0; offsetChamber[2] = cellsInMB1; offsetChamber[3] = cellsInMB1 + cellsInMB2; offsetChamber[4] = cellsInMB1 + cellsInMB2 + cellsInMB3; cellsPerSector = cellsInMB1 + cellsInMB2 + cellsInMB3 + cellsInMB4; cellsIn13Sectors = ( cellsPerSector * 12 ) + cellsInMB4; cellsPerWheel = cellsIn13Sectors + cellsInMB4; } }
DTSequentialCellNumber::~DTSequentialCellNumber | ( | ) |
Definition at line 74 of file DTSequentialCellNumber.cc.
{ }
int DTSequentialCellNumber::id | ( | int | wheel, |
int | station, | ||
int | sector, | ||
int | superlayer, | ||
int | layer, | ||
int | cell | ||
) | [static] |
Definition at line 81 of file DTSequentialCellNumber.cc.
References cellsIn13Sectors, cellsInTheta, cellsPerLayer, cellsPerSector, cellsPerWheel, offsetChamber, and relativeConstraints::station.
Referenced by DTT0::get(), and DTT0::set().
{ 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; }
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().