#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 |
Description: Class to compute a sequential number for drift tube layers
Definition at line 33 of file DTSequentialLayerNumber.h.
DTSequentialLayerNumber::DTSequentialLayerNumber | ( | ) |
Definition at line 40 of file DTSequentialLayerNumber.cc.
References layersIn13Sectors, layersPerSector, layersPerWheel, and offsetChamber.
{ if ( offsetChamber == 0 ) { offsetChamber = new int[5]; offsetChamber[1] = 0; offsetChamber[2] = 12; offsetChamber[3] = 24; offsetChamber[4] = 36; layersPerSector = 44; layersIn13Sectors = ( layersPerSector * 12 ) + 8; layersPerWheel = layersIn13Sectors + 8; } }
DTSequentialLayerNumber::~DTSequentialLayerNumber | ( | ) |
Definition at line 57 of file DTSequentialLayerNumber.cc.
{ }
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.
{ 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; int seqLayerNum = 0; if ( wheel > 5 ) return -1; seqLayerNum += ( wheel - 1 ) * layersPerWheel; if ( sector > 14 ) return -2; if ( sector > 12 && station < 4 ) return -2; if ( sector > 13 ) seqLayerNum += layersIn13Sectors; else seqLayerNum += ( sector - 1 ) * layersPerSector; if ( station > 4 ) return -3; if ( sector < 13 ) seqLayerNum += offsetChamber[station]; if ( superlayer > 3 ) return -4; if ( layer > 4 ) return -5; if ( superlayer != 2 ) { if ( superlayer == 3 ) layer += 4; } else { if ( station == 4 ) return -4; layer += 8; } return seqLayerNum + layer; }
int DTSequentialLayerNumber::max | ( | ) | [static] |
Definition at line 105 of file DTSequentialLayerNumber.cc.
References layersPerWheel.
{ return 5 * layersPerWheel; }
int DTSequentialLayerNumber::layersIn13Sectors = 0 [static, private] |
Definition at line 48 of file DTSequentialLayerNumber.h.
Referenced by DTSequentialLayerNumber(), and id().
int DTSequentialLayerNumber::layersPerSector = 0 [static, private] |
Definition at line 47 of file DTSequentialLayerNumber.h.
Referenced by DTSequentialLayerNumber(), and id().
int DTSequentialLayerNumber::layersPerWheel = 0 [static, private] |
Definition at line 46 of file DTSequentialLayerNumber.h.
Referenced by DTSequentialLayerNumber(), id(), and max().
int * DTSequentialLayerNumber::offsetChamber = 0 [static, private] |
Definition at line 50 of file DTSequentialLayerNumber.h.
Referenced by DTSequentialLayerNumber(), and id().