ATLAS Offline Software
Loading...
Searching...
No Matches
MuCTPI_DataWord_Decoder Class Reference

Class helping to decode the MuCTPI data words. More...

#include <MuCTPI_DataWord_Decoder.h>

Collaboration diagram for MuCTPI_DataWord_Decoder:

Public Member Functions

 MuCTPI_DataWord_Decoder (uint32_t dataword=0)
 Constructor.
 ~MuCTPI_DataWord_Decoder ()=default
 Destructor.
uint16_t getSectorOverflow () const
 Flag showing whether there were more than 2 candidates in this candidate's sector.
uint16_t getRoiOverflow () const
 Flag showing whether there was more than 1 candidate in this candidate's RoI.
uint16_t getRoiNumber () const
 RoI number (sub-sector in which the candidate was detected)
uint16_t getOverlapBits () const
 2-bit overlap bits given to the candidate by the SL
MuCTPI_RDO::SectorLocation getSectorLocation () const
 The system that detected the muon candidate.
uint16_t getSectorAddress () const
 8-bit address of the sector that detected the candidate
uint16_t getSectorID (bool newScheme=0) const
 Number of the sector that detected the candidate.
uint16_t getHemisphere () const
 The hemisphere in which the candidate was detected.
uint16_t getPt () const
 3-bit pT threshold of the candidate
uint16_t getBCID () const
 3-bit BCID fragment saved with the candidate
uint16_t getCandidateIsHighestPt () const
 Flag showing whether the candidate had the highest pT in its sector.
uint16_t getSentRoi () const
 Flag showing whether the candidate was sent to the RoIB.
uint16_t getSign () const
 Get the candidate's sign (0=negative, 1=positive, 100=undefined)
uint16_t getVetoed () const
 Flag showing if the candidate was vetoed in the multiplicity sum.
void setWord (uint32_t word)
 Function setting the MuCTPI data word.
uint32_t getWord () const
 Function returning the MuCTPI data word.
void dumpData () const
 Function dumping the stored information to the message stream.
void dumpData (MsgStream &log) const
 Function dumping the stored information to the message stream.

Private Attributes

uint32_t m_dataWord
 The 32-bit data word to decode.

Detailed Description

Class helping to decode the MuCTPI data words.

Date
2007-07-05 13:26:22
   The data words of the MuCTPI readout data contain a lot of information
   about the LVL1 muon candidates in a tightly encoded fashion. This class
   can be used to easily extract all stored information from these 32-bit
   words.

   For a detailed description of the data format of the MuCTPI, see
   the MIROD documentation (https://edms.cern.ch/file/248757/1/mirod.pdf).
Author
David Berge David.nosp@m..Ber.nosp@m.ge@ce.nosp@m.rn.c.nosp@m.h
Version
Revision
1.5

Definition at line 37 of file MuCTPI_DataWord_Decoder.h.

Constructor & Destructor Documentation

◆ MuCTPI_DataWord_Decoder()

MuCTPI_DataWord_Decoder::MuCTPI_DataWord_Decoder ( uint32_t dataword = 0)

Constructor.

The constructor only has to give an initial value to MuCTPI_DataWord_Decoder::m_dataWord stored in the object.

Parameters
datawordThe 32-bit MuCTPI data word that you want to decode

Definition at line 21 of file MuCTPI_DataWord_Decoder.cxx.

22 : m_dataWord( dataword ) {
23
24}
uint32_t m_dataWord
The 32-bit data word to decode.

◆ ~MuCTPI_DataWord_Decoder()

MuCTPI_DataWord_Decoder::~MuCTPI_DataWord_Decoder ( )
default

Destructor.

Member Function Documentation

◆ dumpData() [1/2]

void MuCTPI_DataWord_Decoder::dumpData ( ) const

Function dumping the stored information to the message stream.

This function is not responsible for actually printing the information, it just creates a message stream to print the information to with MuCTPI_DataWord_Decoder::dumpData(MsgStream&) const.

Definition at line 204 of file MuCTPI_DataWord_Decoder.cxx.

204 {
205
206 SmartIF<IMessageSvc> msgSvc{Gaudi::svcLocator()->service("MessageSvc")};
207 if ( !msgSvc ) {
208 return;
209 }
210 MsgStream log( msgSvc, "MuCTPI_DataWord_Decoder" );
211 dumpData( log );
212
213 return;
214}
void dumpData() const
Function dumping the stored information to the message stream.
msgSvc
Provide convenience handles for various services.
Definition StdJOSetup.py:36

◆ dumpData() [2/2]

void MuCTPI_DataWord_Decoder::dumpData ( MsgStream & log) const

Function dumping the stored information to the message stream.

Function printing the decodable information of the MuCTPI data word in an easy-to-read fashion.

Parameters
logA message stream to print the information to

Definition at line 221 of file MuCTPI_DataWord_Decoder.cxx.

221 {
222
223 uint16_t sectorLocation = getSectorLocation();
224 std::string locString = "BARREL";
225 if( sectorLocation == MuCTPI_RDO::ENDCAP ) locString = "ENDCAP";
226 else if( sectorLocation == MuCTPI_RDO::FORWARD ) locString = "FORWARD";
227 uint16_t candHighestPt = getCandidateIsHighestPt();
228 std::string isHigh = "NO";
229 if( candHighestPt ) isHigh = "YES";
230 uint16_t candSentRoi = getSentRoi();
231 std::string sentRoi = "NO";
232 if( candSentRoi ) sentRoi = "YES";
233 uint16_t secOf = getSectorOverflow();
234 std::string ofString = "NO";
235 if( secOf ) ofString = "YES";
236 uint16_t roiOf = getRoiOverflow();
237 std::string roiString = "NO";
238 if( roiOf ) roiString = "YES";
240 std::string olString = "NO";
241 if( ol ) olString = "YES";
242
243 log << MSG::DEBUG << "Data word : 0x" << MSG::hex << m_dataWord << MSG::dec << endmsg;
244 log << MSG::DEBUG << "BCID : " << getBCID() << endmsg;
245 log << MSG::DEBUG << "Pt : " << getPt() << endmsg;
246 log << MSG::DEBUG << "Is highest Pt : " << isHigh << endmsg;
247 log << MSG::DEBUG << "RoI ID : " << getRoiNumber() << endmsg;
248 log << MSG::DEBUG << "Sent RoI : " << sentRoi << endmsg;
249 log << MSG::DEBUG << "Sector address : 0x" << MSG::hex << getSectorAddress() << MSG::dec << endmsg;
250 log << MSG::DEBUG << "Sector ID : " << getSectorID() << endmsg;
251 log << MSG::DEBUG << "Sector location : " << locString << endmsg;
252 log << MSG::DEBUG << "Sector overflow : " << ofString << endmsg;
253 log << MSG::DEBUG << "RoI overflow : " << roiString << endmsg;
254 log << MSG::DEBUG << "Overlap found : " << olString << endmsg;
255 log << MSG::DEBUG << "Hemisphere : " << getHemisphere() << endmsg;
256 log << MSG::DEBUG << "=================================================" << endmsg;
257
258 return;
259}
#define endmsg
const std::string & roiString()
uint16_t getSectorOverflow() const
Flag showing whether there were more than 2 candidates in this candidate's sector.
uint16_t getRoiOverflow() const
Flag showing whether there was more than 1 candidate in this candidate's RoI.
uint16_t getSectorID(bool newScheme=0) const
Number of the sector that detected the candidate.
MuCTPI_RDO::SectorLocation getSectorLocation() const
The system that detected the muon candidate.
uint16_t getHemisphere() const
The hemisphere in which the candidate was detected.
uint16_t getRoiNumber() const
RoI number (sub-sector in which the candidate was detected)
uint16_t getCandidateIsHighestPt() const
Flag showing whether the candidate had the highest pT in its sector.
uint16_t getOverlapBits() const
2-bit overlap bits given to the candidate by the SL
uint16_t getSectorAddress() const
8-bit address of the sector that detected the candidate
uint16_t getSentRoi() const
Flag showing whether the candidate was sent to the RoIB.
uint16_t getBCID() const
3-bit BCID fragment saved with the candidate
uint16_t getPt() const
3-bit pT threshold of the candidate
setWord1 uint16_t

◆ getBCID()

uint16_t MuCTPI_DataWord_Decoder::getBCID ( ) const

3-bit BCID fragment saved with the candidate

Returns
3-bit BCID fragment saved with the candidate

Definition at line 154 of file MuCTPI_DataWord_Decoder.cxx.

154 {
157}
static constexpr uint32_t CAND_BCID_MASK
gone in v2
Definition MuCTPI_Bits.h:71
static constexpr uint32_t CAND_BCID_SHIFT
Position of the BCID bits in the data words.
Definition MuCTPI_Bits.h:73

◆ getCandidateIsHighestPt()

uint16_t MuCTPI_DataWord_Decoder::getCandidateIsHighestPt ( ) const

Flag showing whether the candidate had the highest pT in its sector.

Returns
flag showing whether the candidate had the highest pT in its sector

Definition at line 163 of file MuCTPI_DataWord_Decoder.cxx.

163 {
166}
static constexpr uint32_t CAND_HIGHEST_PT_MASK
gone in v2 Mask for extracting the bit from the data word showing whether the candidate had the highe...
static constexpr uint32_t CAND_HIGHEST_PT_SHIFT
Position of the "highest p<sub>T</sub>" bit.

◆ getHemisphere()

uint16_t MuCTPI_DataWord_Decoder::getHemisphere ( ) const

The hemisphere in which the candidate was detected.

Returns
hemisphere in which the candidate was detected

Definition at line 138 of file MuCTPI_DataWord_Decoder.cxx.

138 {
140}
static constexpr uint32_t SECTOR_HEMISPHERE_MASK
Mask for the bit showing which hemisphere the candidate came from.(1: positive; 0: negative)
Definition MuCTPI_Bits.h:80

◆ getOverlapBits()

uint16_t MuCTPI_DataWord_Decoder::getOverlapBits ( ) const

2-bit overlap bits given to the candidate by the SL

Returns
2-bit overlap bits given to the candidate by the Sector Logic

Definition at line 69 of file MuCTPI_DataWord_Decoder.cxx.

69 {
70
71 uint16_t ol = 0;
72 switch( getSectorLocation() ) {
75 break;
77 ol = 0;
78 break;
81 break;
82 default:
83 ol = 99;
84 break;
85 }
86
87 return ol;
88}
static constexpr uint32_t ENDCAP_OL_MASK
Mask for extracting the overlap bits for endcap candidates from the data words.
Definition MuCTPI_Bits.h:56
static constexpr uint32_t ENDCAP_OL_SHIFT
Position of the overlap bits in endcap data words.
Definition MuCTPI_Bits.h:59
static constexpr uint32_t BARREL_OL_MASK
Mask for extracting the overlap bits for barrel candidates from the data words.
Definition MuCTPI_Bits.h:50
static constexpr uint32_t BARREL_OL_SHIFT
Position of the overlap bits in barrel data words.
Definition MuCTPI_Bits.h:54

◆ getPt()

uint16_t MuCTPI_DataWord_Decoder::getPt ( ) const

3-bit pT threshold of the candidate

Returns
3-bit pT threshold of the candidate

Definition at line 145 of file MuCTPI_DataWord_Decoder.cxx.

145 {
148}
static constexpr uint32_t CAND_PT_MASK
Definition MuCTPI_Bits.h:63
static constexpr uint32_t CAND_PT_SHIFT
Definition MuCTPI_Bits.h:66

◆ getRoiNumber()

uint16_t MuCTPI_DataWord_Decoder::getRoiNumber ( ) const

RoI number (sub-sector in which the candidate was detected)

Returns
RoI number

Definition at line 45 of file MuCTPI_DataWord_Decoder.cxx.

45 {
46
47 uint16_t roi = 0;
48 switch( getSectorLocation() ) {
51 break;
54 break;
57 break;
58 default:
59 roi = 99;
60 break;
61 }
62
63 return roi;
64}
static constexpr uint32_t ENDCAP_ROI_MASK
Mask for extracting the RoI for endcap candidates from the data words.
Definition MuCTPI_Bits.h:41
static constexpr uint32_t BARREL_ROI_MASK
new in v2
Definition MuCTPI_Bits.h:39
static constexpr uint32_t FORWARD_ROI_MASK
Mask for extracting the RoI for forward candidates from the data words.
Definition MuCTPI_Bits.h:43
static constexpr uint32_t ROI_SHIFT
Definition MuCTPI_Bits.h:46

◆ getRoiOverflow()

uint16_t MuCTPI_DataWord_Decoder::getRoiOverflow ( ) const

Flag showing whether there was more than 1 candidate in this candidate's RoI.

Returns
flag showing whether there was more than 1 candidate in this candidate's RoI

Definition at line 37 of file MuCTPI_DataWord_Decoder.cxx.

37 {
40}
static constexpr uint32_t ROI_OVERFLOW_MASK
Mask for the bit showing if more than one muon candidates were in the sector RoI.
Definition MuCTPI_Bits.h:31
static constexpr uint32_t ROI_OVERFLOW_SHIFT
Definition MuCTPI_Bits.h:34

◆ getSectorAddress()

uint16_t MuCTPI_DataWord_Decoder::getSectorAddress ( ) const

8-bit address of the sector that detected the candidate

Returns
8-bit address of the sector that detected the candidate

Definition at line 107 of file MuCTPI_DataWord_Decoder.cxx.

107 {
110}
static constexpr uint32_t CAND_SECTOR_ADDRESS_SHIFT
Definition MuCTPI_Bits.h:83
static constexpr uint32_t CAND_SECTOR_ADDRESS_MASK
Definition MuCTPI_Bits.h:78

◆ getSectorID()

uint16_t MuCTPI_DataWord_Decoder::getSectorID ( bool newScheme = 0) const

Number of the sector that detected the candidate.

Returns
number of the sector that detected the candidate

Definition at line 115 of file MuCTPI_DataWord_Decoder.cxx.

115 {
116
119 }
120 else if( getSectorLocation() == MuCTPI_RDO::BARREL ) {
121 if(newScheme)
123 else{
125 if( getHemisphere() ) id += 32;
126 return id;
127 }
128 }
129 else if( getSectorLocation() == MuCTPI_RDO::FORWARD ) {
131 }
132 return 0;
133}
static constexpr uint32_t FORWARD_SECTORID_MASK
Mask for extracting the sector ID for forward candidates from the data word.
static constexpr uint32_t BARREL_SECTORID_MASK
Mask for extracting the sector ID for barrel candidates from the data word.
static constexpr uint32_t ENDCAP_SECTORID_MASK
Mask for extracting the sector ID for endcap candidates from the data word.

◆ getSectorLocation()

MuCTPI_RDO::SectorLocation MuCTPI_DataWord_Decoder::getSectorLocation ( ) const

The system that detected the muon candidate.

Returns
name of the system that detected the muon candidate

Definition at line 93 of file MuCTPI_DataWord_Decoder.cxx.

93 {
94
96 return MuCTPI_RDO::ENDCAP;
99 } else {
100 return MuCTPI_RDO::BARREL;
101 }
102}
static constexpr uint32_t FORWARD_ADDRESS_MASK
Bit in the candidate's address turned on for forward candidates.
Definition MuCTPI_Bits.h:89
static constexpr uint32_t ENDCAP_ADDRESS_MASK
Bit in the candidate's address turned on for endcap candidates.
Definition MuCTPI_Bits.h:87

◆ getSectorOverflow()

uint16_t MuCTPI_DataWord_Decoder::getSectorOverflow ( ) const

Flag showing whether there were more than 2 candidates in this candidate's sector.

Returns
flag showing whether there were more than 2 candidates in this candidate's sector

Definition at line 29 of file MuCTPI_DataWord_Decoder.cxx.

29 {
32}
static constexpr uint32_t CAND_OVERFLOW_SHIFT
Definition MuCTPI_Bits.h:28
static constexpr uint32_t CAND_OVERFLOW_MASK
Mask for the bit showing if more than two muon candidates were in the trigger sector.
Definition MuCTPI_Bits.h:25

◆ getSentRoi()

uint16_t MuCTPI_DataWord_Decoder::getSentRoi ( ) const

Flag showing whether the candidate was sent to the RoIB.

Returns
flag showing whether the candidate was sent to the RoIB

Definition at line 172 of file MuCTPI_DataWord_Decoder.cxx.

172 {
175}
static constexpr uint32_t CAND_SENT_ROI_MASK
gone in v2
static constexpr uint32_t CAND_SENT_ROI_SHIFT
Position of the "candidate sent to RoIB" bit.

◆ getSign()

uint16_t MuCTPI_DataWord_Decoder::getSign ( ) const

Get the candidate's sign (0=negative, 1=positive, 100=undefined)

Returns
The candidate's sign (0=negative, 1=positive, 100=undefined)

Definition at line 180 of file MuCTPI_DataWord_Decoder.cxx.

180 {
181
182 // This bit is not defined for barrel candidates:
184 return 100;
185 }
186
188 0x1 );
189}
static constexpr uint32_t CAND_TGC_CHARGE_SIGN_SHIFT

◆ getVetoed()

uint16_t MuCTPI_DataWord_Decoder::getVetoed ( ) const

Flag showing if the candidate was vetoed in the multiplicity sum.

Returns
Flag showing if the candidate was vetoed in the multiplicity sum

Definition at line 194 of file MuCTPI_DataWord_Decoder.cxx.

194 {
195
197 & 0x1 );
198}
static constexpr uint32_t CAND_VETO_SHIFT

◆ getWord()

uint32_t MuCTPI_DataWord_Decoder::getWord ( ) const
inline

Function returning the MuCTPI data word.

Definition at line 77 of file MuCTPI_DataWord_Decoder.h.

77{ return m_dataWord; }

◆ setWord()

void MuCTPI_DataWord_Decoder::setWord ( uint32_t word)
inline

Function setting the MuCTPI data word.

Definition at line 75 of file MuCTPI_DataWord_Decoder.h.

75{ m_dataWord = word; }

Member Data Documentation

◆ m_dataWord

uint32_t MuCTPI_DataWord_Decoder::m_dataWord
private

The 32-bit data word to decode.

Definition at line 86 of file MuCTPI_DataWord_Decoder.h.


The documentation for this class was generated from the following files: