23 unsigned int size = (pers->
m_amps).size();
24 std::vector<uint16_t> amps(size);
25 for (
unsigned int i=0; i<size; ++i)
26 amps[i] = pers->
m_amps[i] + 2048;
30 int stationName = ( ( pers->
m_address & 0x00010000) >> 16 ) + 50;
31 int stationEta = ( ((pers->
m_address & 0x00001000) >> 12 ) == 0x0) ? -1 : 1;
32 int stationPhi = ( ( pers->
m_address & 0x0000E000) >> 13 ) + 1;
33 int chamberLayer = ( ( pers->
m_address & 0x00000800) >> 11) + 1;
34 int wireLayer = ( ( pers->
m_address & 0x00000600) >> 9) + 1;
35 int measuresPhi = ( ( pers->
m_address & 0x00000100) >> 8);
39 uint32_t nameIndex = uint32_t(stationName-50);
40 uint32_t etaIndex = (stationEta == -1) ? 0 : 1;
41 uint32_t phiIndex = uint32_t (stationPhi-1);
44 uint32_t chamberIndex = uint32_t (chamberLayer-0);
45 uint32_t layerIndex = uint32_t (wireLayer-1);
46 uint32_t stripType = uint32_t (measuresPhi);
47 uint32_t stripNumber = uint32_t (
strip-1);
56 if (stationEta==1 && measuresPhi==1) {
57 stripNumber = uint32_t(47 - stripNumber);
61 uint32_t address = nameIndex << 16 |
74 if ( stripType == 0 ) spuID =
static_cast<uint16_t
>( nameIndex*5 + layerIndex );
75 else spuID =
static_cast<uint16_t
>( (nameIndex+1)*5-1 );