11#include "GaudiKernel/Bootstrap.h"
12#include "GaudiKernel/ISvcLocator.h"
13#include "GaudiKernel/IMessageSvc.h"
14#include "GaudiKernel/MsgStream.h"
15#include "GaudiKernel/StatusCode.h"
206 SmartIF<IMessageSvc> msgSvc{Gaudi::svcLocator()->service(
"MessageSvc")};
210 MsgStream log( msgSvc,
"MuCTPI_DataWord_Decoder" );
224 std::string locString =
"BARREL";
228 std::string isHigh =
"NO";
229 if( candHighestPt ) isHigh =
"YES";
231 std::string sentRoi =
"NO";
232 if( candSentRoi ) sentRoi =
"YES";
234 std::string ofString =
"NO";
235 if( secOf ) ofString =
"YES";
240 std::string olString =
"NO";
241 if( ol ) olString =
"YES";
243 log << MSG::DEBUG <<
"Data word : 0x" << MSG::hex <<
m_dataWord << MSG::dec <<
endmsg;
246 log << MSG::DEBUG <<
"Is highest Pt : " << isHigh <<
endmsg;
248 log << MSG::DEBUG <<
"Sent RoI : " << sentRoi <<
endmsg;
251 log << MSG::DEBUG <<
"Sector location : " << locString <<
endmsg;
252 log << MSG::DEBUG <<
"Sector overflow : " << ofString <<
endmsg;
254 log << MSG::DEBUG <<
"Overlap found : " << olString <<
endmsg;
256 log << MSG::DEBUG <<
"=================================================" <<
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 getVetoed() const
Flag showing if the candidate was vetoed in the multiplicity sum.
uint16_t getSign() const
Get the candidate's sign (0=negative, 1=positive, 100=undefined)
void dumpData() const
Function dumping the stored information to the message stream.
uint16_t getRoiOverflow() const
Flag showing whether there was more than 1 candidate in this candidate's RoI.
MuCTPI_DataWord_Decoder(uint32_t dataword=0)
Constructor.
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.
uint32_t m_dataWord
The 32-bit data word to decode.
uint16_t getBCID() const
3-bit BCID fragment saved with the candidate
uint16_t getPt() const
3-bit pT threshold of the candidate
SectorLocation
Enumeration defining the different sources for the muon candidates.
static constexpr uint32_t FORWARD_SECTORID_MASK
Mask for extracting the sector ID for forward candidates from the data word.
static constexpr uint32_t FORWARD_ADDRESS_MASK
Bit in the candidate's address turned on for forward candidates.
static constexpr uint32_t SECTOR_HEMISPHERE_MASK
Mask for the bit showing which hemisphere the candidate came from.(1: positive; 0: negative)
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_OVERFLOW_SHIFT
static constexpr uint32_t ENDCAP_OL_MASK
Mask for extracting the overlap bits for endcap candidates from the data words.
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_ROI_MASK
Mask for extracting the RoI for endcap candidates from the data words.
static constexpr uint32_t BARREL_ROI_MASK
new in v2
static constexpr uint32_t CAND_SENT_ROI_MASK
gone in v2
static constexpr uint32_t ENDCAP_OL_SHIFT
Position of the overlap bits in endcap data words.
static constexpr uint32_t BARREL_OL_MASK
Mask for extracting the overlap bits for barrel candidates from the data words.
static constexpr uint32_t CAND_VETO_SHIFT
static constexpr uint32_t ROI_OVERFLOW_MASK
Mask for the bit showing if more than one muon candidates were in the sector RoI.
static constexpr uint32_t CAND_SECTOR_ADDRESS_SHIFT
static constexpr uint32_t CAND_PT_MASK
static constexpr uint32_t CAND_TGC_CHARGE_SIGN_SHIFT
static constexpr uint32_t CAND_BCID_MASK
gone in v2
static constexpr uint32_t ENDCAP_SECTORID_MASK
Mask for extracting the sector ID for endcap candidates from the data word.
static constexpr uint32_t BARREL_OL_SHIFT
Position of the overlap bits in barrel data words.
static constexpr uint32_t CAND_HIGHEST_PT_SHIFT
Position of the "highest p<sub>T</sub>" bit.
static constexpr uint32_t ENDCAP_ADDRESS_MASK
Bit in the candidate's address turned on for endcap candidates.
static constexpr uint32_t CAND_PT_SHIFT
static constexpr uint32_t CAND_BCID_SHIFT
Position of the BCID bits in the data words.
static constexpr uint32_t ROI_OVERFLOW_SHIFT
static constexpr uint32_t CAND_SENT_ROI_SHIFT
Position of the "candidate sent to RoIB" bit.
static constexpr uint32_t CAND_SECTOR_ADDRESS_MASK
static constexpr uint32_t FORWARD_ROI_MASK
Mask for extracting the RoI for forward candidates from the data words.
static constexpr uint32_t CAND_OVERFLOW_MASK
Mask for the bit showing if more than two muon candidates were in the trigger sector.
static constexpr uint32_t ROI_SHIFT