ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
MuCTPI_MultiplicityWord_Decoder Class Reference

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

#include <MuCTPI_MultiplicityWord_Decoder.h>

Collaboration diagram for MuCTPI_MultiplicityWord_Decoder:

Public Types

enum  TriggerMode_t { inclusive, exclusive }
 Possible trigger threshold modes. More...
 

Public Member Functions

 MuCTPI_MultiplicityWord_Decoder (const uint32_t multword=0, const TriggerMode_t mode=exclusive)
 Constructor. More...
 
 MuCTPI_MultiplicityWord_Decoder (const uint32_t multword, const bool inclusiveTriggerMode)
 Constructor. More...
 
 ~MuCTPI_MultiplicityWord_Decoder ()=default
 Destructor. More...
 
uint16_t getNCandidates () const
 Function returning the total number of muon candidates. More...
 
uint16_t getMultiplicity (const uint16_t candidateNumber) const
 Function returning the 3-bit candidate multiplicity for the specified threshold. More...
 
uint16_t getBCID () const
 Function returning the 3-bit BCID fragment in the multiplicity word. More...
 
void setWord (const uint32_t word)
 Function setting the MuCTPI multiplicity word. More...
 
uint32_t getWord () const
 Function returning the MuCTPI multiplicity word. More...
 
void dumpData () const
 Function dumping the stored information to the message stream. More...
 
void dumpData (MsgStream &log) const
 Function dumping the stored information to the message stream. More...
 

Private Attributes

uint32_t m_multiplicityWord
 The 32-bit multiplicity word to decode. More...
 
TriggerMode_t m_triggerMode
 Trigger threshold mode (inclusive/exclusive) More...
 

Detailed Description

Class helping to decode the MuCTPI multiplicity words.

Date
2007-09-27 15:22:34
   The multiplicity word(s) in the MuCTPI readout data store the number
   of collected LVL1 muon candidates in 6 p<sub>T</sub> thresholds in (a)
   32-bit word(s). This class can help in decoding such a multiplicity word.

   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 32 of file MuCTPI_MultiplicityWord_Decoder.h.

Member Enumeration Documentation

◆ TriggerMode_t

Possible trigger threshold modes.

Enumerator
inclusive 
exclusive 

Definition at line 36 of file MuCTPI_MultiplicityWord_Decoder.h.

36  {
38  };

Constructor & Destructor Documentation

◆ MuCTPI_MultiplicityWord_Decoder() [1/2]

MuCTPI_MultiplicityWord_Decoder::MuCTPI_MultiplicityWord_Decoder ( const uint32_t  multword = 0,
const TriggerMode_t  mode = exclusive 
)

Constructor.

The constructor only has to give an initial value to MuCTPI_MultiplicityWord_Decoder::m_multiplicityWord stored in the object.

Parameters
multwordThe 32-bit MuCTPI multiplicity word that you want to decode

Definition at line 23 of file MuCTPI_MultiplicityWord_Decoder.cxx.

24  : m_multiplicityWord( multword ), m_triggerMode(mode) {
25 
26 }

◆ MuCTPI_MultiplicityWord_Decoder() [2/2]

MuCTPI_MultiplicityWord_Decoder::MuCTPI_MultiplicityWord_Decoder ( const uint32_t  multword,
const bool  inclusiveTriggerMode 
)

Constructor.

The constructor only has to give an initial value to MuCTPI_MultiplicityWord_Decoder::m_multiplicityWord stored in the object.

Parameters
multwordThe 32-bit MuCTPI multiplicity word that you want to decode

Definition at line 33 of file MuCTPI_MultiplicityWord_Decoder.cxx.

35  if (inclusiveTriggerMode) m_triggerMode = inclusive;
36 }

◆ ~MuCTPI_MultiplicityWord_Decoder()

MuCTPI_MultiplicityWord_Decoder::~MuCTPI_MultiplicityWord_Decoder ( )
default

Destructor.

Member Function Documentation

◆ dumpData() [1/2]

void MuCTPI_MultiplicityWord_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_MultiplicityWord_Decoder::dumpData(MsgStream&) const.

Definition at line 88 of file MuCTPI_MultiplicityWord_Decoder.cxx.

88  {
89 
90  SmartIF<IMessageSvc> msgSvc{Gaudi::svcLocator()->service("MessageSvc")};
91  if ( !msgSvc ) {
92  return;
93  }
94  MsgStream log( msgSvc, "MuCTPI_MultiplicityWord_Decoder" );
95  dumpData( log );
96 
97  return;
98 }

◆ dumpData() [2/2]

void MuCTPI_MultiplicityWord_Decoder::dumpData ( MsgStream &  log) const

Function dumping the stored information to the message stream.

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

Parameters
logA message stream to print the information to

Definition at line 105 of file MuCTPI_MultiplicityWord_Decoder.cxx.

105  {
106 
107  log << MSG::DEBUG << "=================================================" << endmsg;
108  log << MSG::DEBUG << "Candidate Multiplicity word 0x" << MSG::hex << m_multiplicityWord << MSG::dec << endmsg;
109  for( uint16_t i = 0; i < LVL1::MuCTPIBits::MULT_THRESH_NUM; ++i ) {
110  log << MSG::DEBUG << "Pt threshold " << ( i + 1 ) << ", multiplicity " << getMultiplicity( i ) << endmsg;
111  }
112  log << MSG::DEBUG << "Number of candidates: " << getNCandidates() << endmsg;
113  log << MSG::DEBUG << "MICTP BCID: 0x" << MSG::hex
114  << getBCID() << MSG::dec << " ( " << getBCID() << " )" << endmsg;
115  log << MSG::DEBUG << "=================================================" << endmsg;
116 
117  return;
118 }

◆ getBCID()

uint16_t MuCTPI_MultiplicityWord_Decoder::getBCID ( ) const

Function returning the 3-bit BCID fragment in the multiplicity word.

Returns
3-bit BCID fragment in the multiplicity word

Definition at line 78 of file MuCTPI_MultiplicityWord_Decoder.cxx.

78  {
79 
80  return ( ( m_multiplicityWord >> ((LVL1::MuCTPIBits::MULT_BCID_POS-1) * LVL1::MuCTPIBits::MULT_BITS)) &
81  LVL1::MuCTPIBits::MULT_VAL );
82 }

◆ getMultiplicity()

uint16_t MuCTPI_MultiplicityWord_Decoder::getMultiplicity ( const uint16_t  candidateNumber) const

Function returning the 3-bit candidate multiplicity for the specified threshold.

Be careful, that candidateNumber is defined from 0 to 5, not from 1 to 6!

Parameters
candidateNumberthe index of the threshold for which to get the number of candidates
Returns
3-bit candidate multiplicity for the specified threshold

Definition at line 61 of file MuCTPI_MultiplicityWord_Decoder.cxx.

61  {
62 
63  if( candidateNumber >= LVL1::MuCTPIBits::MULT_THRESH_NUM ) {
64  // throw exception? issue warning?
65 
66  throw GaudiException( "MuCTPI_MultiplicityWord_Decoder::getMultiplicity> Threshold out of range",
67  "MuCTPI_MultiplicityWord_Decoder::getMultiplicity", StatusCode::FAILURE );
68  return 99;
69  }
70 
71  return ((m_multiplicityWord >> (candidateNumber * LVL1::MuCTPIBits::MULT_BITS)) &
72  LVL1::MuCTPIBits::MULT_VAL);
73 }

◆ getNCandidates()

uint16_t MuCTPI_MultiplicityWord_Decoder::getNCandidates ( ) const

Function returning the total number of muon candidates.

Returns
total number of muon candidates

Definition at line 42 of file MuCTPI_MultiplicityWord_Decoder.cxx.

42  {
43 
44  uint16_t nCand = 0;
45  if (m_triggerMode == exclusive){
46  for( uint32_t i = 0; i < LVL1::MuCTPIBits::MULT_THRESH_NUM; ++i ) {
47  nCand += this->getMultiplicity( i );
48  }
49  } else {
50  nCand = this->getMultiplicity( 0 );
51  }
52  return nCand;
53 }

◆ getWord()

uint32_t MuCTPI_MultiplicityWord_Decoder::getWord ( ) const
inline

Function returning the MuCTPI multiplicity word.

Definition at line 57 of file MuCTPI_MultiplicityWord_Decoder.h.

57 { return m_multiplicityWord; }

◆ setWord()

void MuCTPI_MultiplicityWord_Decoder::setWord ( const uint32_t  word)
inline

Function setting the MuCTPI multiplicity word.

Definition at line 55 of file MuCTPI_MultiplicityWord_Decoder.h.

55 { m_multiplicityWord = word; }

Member Data Documentation

◆ m_multiplicityWord

uint32_t MuCTPI_MultiplicityWord_Decoder::m_multiplicityWord
private

The 32-bit multiplicity word to decode.

Definition at line 66 of file MuCTPI_MultiplicityWord_Decoder.h.

◆ m_triggerMode

TriggerMode_t MuCTPI_MultiplicityWord_Decoder::m_triggerMode
private

Trigger threshold mode (inclusive/exclusive)

Definition at line 68 of file MuCTPI_MultiplicityWord_Decoder.h.


The documentation for this class was generated from the following files:
MuCTPI_MultiplicityWord_Decoder::getMultiplicity
uint16_t getMultiplicity(const uint16_t candidateNumber) const
Function returning the 3-bit candidate multiplicity for the specified threshold.
Definition: MuCTPI_MultiplicityWord_Decoder.cxx:61
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
MuCTPI_MultiplicityWord_Decoder::inclusive
@ inclusive
Definition: MuCTPI_MultiplicityWord_Decoder.h:37
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
lumiFormat.i
int i
Definition: lumiFormat.py:85
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
Preparation.mode
mode
Definition: Preparation.py:94
MuCTPI_MultiplicityWord_Decoder::getNCandidates
uint16_t getNCandidates() const
Function returning the total number of muon candidates.
Definition: MuCTPI_MultiplicityWord_Decoder.cxx:42
MuCTPI_MultiplicityWord_Decoder::dumpData
void dumpData() const
Function dumping the stored information to the message stream.
Definition: MuCTPI_MultiplicityWord_Decoder.cxx:88
MuCTPI_MultiplicityWord_Decoder::exclusive
@ exclusive
Definition: MuCTPI_MultiplicityWord_Decoder.h:37
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
MuCTPI_MultiplicityWord_Decoder::getBCID
uint16_t getBCID() const
Function returning the 3-bit BCID fragment in the multiplicity word.
Definition: MuCTPI_MultiplicityWord_Decoder.cxx:78
MuCTPI_MultiplicityWord_Decoder::m_multiplicityWord
uint32_t m_multiplicityWord
The 32-bit multiplicity word to decode.
Definition: MuCTPI_MultiplicityWord_Decoder.h:66
MuCTPI_MultiplicityWord_Decoder::m_triggerMode
TriggerMode_t m_triggerMode
Trigger threshold mode (inclusive/exclusive)
Definition: MuCTPI_MultiplicityWord_Decoder.h:68