ATLAS Offline Software
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
ROIB::MuCTPIRoI Class Reference

Class for storing the 32-bit muon RoI word. More...

#include <MuCTPIRoI.h>

Collaboration diagram for ROIB::MuCTPIRoI:

Public Member Functions

 MuCTPIRoI (uint32_t)
 Constructor with the actual RoI word. More...
 
 MuCTPIRoI ()
 Default constructor. More...
 
 ~MuCTPIRoI ()=default
 Destructor. More...
 
uint32_t roIWord () const
 Method returning the RoI word. More...
 
unsigned int pt () const
 Method returning the pT of the RoI candidate. More...
 
unsigned int getSectorAddress () const
 Method returning the "electronics address" of the candidate. More...
 
uint16_t getHemisphere () const
 Method returning the hemisphere of the candidate. More...
 
uint16_t getSectorOverflow () const
 Method telling whether there were more than two candidates in this candidate's sector. More...
 
uint16_t getRoiOverflow () const
 Method telling whether there were more than one candidates in this candidate's RoI. More...
 
uint16_t getRoiNumber () const
 Method returning the RoI in which the candidate was detected. More...
 
uint16_t getOverlapBits () const
 Method returning the "overlap bits" of the candidate. More...
 
MuCTPI_RDO::SectorLocation getSectorLocation () const
 Method returning the name of the system that produced the RoI. More...
 
uint16_t getSectorID () const
 Method returning the number of the trigger sector producing the candidate. More...
 
uint16_t getCandidateIsHighestPt () const
 Method telling whether the candidate had the highest pT in the sector. More...
 

Static Public Attributes

static const uint32_t ROI_CAND_SECTOR_ADDRESS_SHIFT = 14
 Position of the sector address in the RoI word. More...
 
static const uint32_t ROI_CAND_HIGHEST_PT_SHIFT = 22
 Position of the "highest p<sub>T</sub> bit" in the RoI word. More...
 

Private Attributes

uint32_t m_roIWord
 The RoI word itself. More...
 

Detailed Description

Class for storing the 32-bit muon RoI word.

Date
2007-07-04 17:28:03
   This class is used to store one muon RoI as collected by the RoI Builder.
   The RoI itself is a simple 32-bit unsigned integer, so the whole class
   rather exists for its access methods only.

   For a detailed description of the data format of the MuCTPI, see
   the MIROD documentation (https://edms.cern.ch/file/248757/1/mirod.pdf).
See also
ROIB::MuCTPIResult
ROIB::RoIBResult
Author
Thomas Schoerner-Sadenius thoma.nosp@m.s.sc.nosp@m.hoern.nosp@m.er@c.nosp@m.ern.c.nosp@m.h
Attila Krasznahorkay Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h
David Berge David.nosp@m..Ber.nosp@m.ge@ce.nosp@m.rn.c.nosp@m.h
Version
Revision
1.4

Definition at line 39 of file MuCTPIRoI.h.

Constructor & Destructor Documentation

◆ MuCTPIRoI() [1/2]

ROIB::MuCTPIRoI::MuCTPIRoI ( uint32_t  RoIWord)

Constructor with the actual RoI word.

This constructor should be used in any useful code, as this is the only way of giving a non-zero value to the RoI word variable of the object.

Parameters
RoIWordThe 32-bit RoI word as collected by the RoI Builder

Definition at line 20 of file MuCTPIRoI.cxx.

21  : m_roIWord( RoIWord ) {}

◆ MuCTPIRoI() [2/2]

ROIB::MuCTPIRoI::MuCTPIRoI ( )

Default constructor.

Default constructor needed to be able to use POOL to stream the object.

It initialises the RoI word to zero.

Definition at line 27 of file MuCTPIRoI.cxx.

28  : m_roIWord( 0 ) {}

◆ ~MuCTPIRoI()

ROIB::MuCTPIRoI::~MuCTPIRoI ( )
default

Destructor.

Member Function Documentation

◆ getCandidateIsHighestPt()

uint16_t ROIB::MuCTPIRoI::getCandidateIsHighestPt ( ) const

Method telling whether the candidate had the highest pT in the sector.

This method returns bit 22 of the RoI word, just like MuCTPIRoI::firstBit() does.

I just realised this duplication while writing the documentation, eventually this should be removed.

See also
MuCTPIRoI::firstBit()
Returns
0 or 1 depending on whether the candidate had the highest pT in its sector

Definition at line 217 of file MuCTPIRoI.cxx.

217  {
219  LVL1::MuCTPIBits::CAND_HIGHEST_PT_MASK);
220  }

◆ getHemisphere()

uint16_t ROIB::MuCTPIRoI::getHemisphere ( ) const

Method returning the hemisphere of the candidate.

Returns the hemisphere in which the candidate was detected.

Returns
1 if the candidate has eta > 0, 0 if eta < 0.

Definition at line 76 of file MuCTPIRoI.cxx.

76  {
77  return (getSectorAddress() & LVL1::MuCTPIBits::SECTOR_HEMISPHERE_MASK);
78  }

◆ getOverlapBits()

uint16_t ROIB::MuCTPIRoI::getOverlapBits ( ) const

Method returning the "overlap bits" of the candidate.

The barrel sectors can flag the muon candidates coming from a part of the trigger sector that overlaps with another one.

In theory both the barrel and endcap sectors should be able to flag the candidates from around η = 1.05 that could be detected by both a barrel and endcap sector, but they don't do that.

So even though all the following should be possible, only the first two are implemented:

  • 00 : the candidate is not coming from an overlap-area
  • 01 : the candidate is coming from a part of a barrel sector overlapping with another barrel sector
  • 10 : the candidate is coming from a part of a barrel/endcap sector overlapping with another endcap/barrel sector
  • 11 : the candidate is coming from a part of a barrel sector overlapping both with another barrel and an endcap sector
Returns
The overlap bits of the candidate

Definition at line 153 of file MuCTPIRoI.cxx.

153  {
154 
155  uint16_t ol = 0;
156  switch( getSectorLocation() ) {
157  case MuCTPI_RDO::ENDCAP:
158  ol = (m_roIWord >> LVL1::MuCTPIBits::ENDCAP_OL_SHIFT) & LVL1::MuCTPIBits::ENDCAP_OL_MASK;
159  break;
160  case MuCTPI_RDO::FORWARD:
161  ol = 0;
162  break;
163  case MuCTPI_RDO::BARREL:
164  ol = (m_roIWord >> LVL1::MuCTPIBits::BARREL_OL_SHIFT) & LVL1::MuCTPIBits::BARREL_OL_MASK;
165  break;
166  default:
167  ol = 99;
168  break;
169  }
170 
171  return ol;
172  }

◆ getRoiNumber()

uint16_t ROIB::MuCTPIRoI::getRoiNumber ( ) const

Method returning the RoI in which the candidate was detected.

The muon trigger sectors are divided into "RoIs", which are small parts of the detector (in η and φ) in this context.

The number of RoIs in the different sectors (especially in the barrel) are varying, but in general:

  • barrel sectors have <26 RoIs
  • endcap sectors have 148 RoIs
  • forward sectors have 64 RoIs
Returns
The RoI in which the muon candidate was detected

Definition at line 115 of file MuCTPIRoI.cxx.

115  {
116 
117  uint16_t roi = 0;
118  switch ( getSectorLocation() ) {
119  case MuCTPI_RDO::ENDCAP:
120  roi = (m_roIWord >> LVL1::MuCTPIBits::ROI_SHIFT) & LVL1::MuCTPIBits::ENDCAP_ROI_MASK;
121  break;
122  case MuCTPI_RDO::FORWARD:
123  roi = (m_roIWord >> LVL1::MuCTPIBits::ROI_SHIFT) & LVL1::MuCTPIBits::FORWARD_ROI_MASK;
124  break;
125  case MuCTPI_RDO::BARREL:
126  roi = (m_roIWord >> LVL1::MuCTPIBits::ROI_SHIFT) & LVL1::MuCTPIBits::BARREL_ROI_MASK;
127  break;
128  default:
129  roi = 99;
130  break;
131  }
132 
133  return roi;
134  }

◆ getRoiOverflow()

uint16_t ROIB::MuCTPIRoI::getRoiOverflow ( ) const

Method telling whether there were more than one candidates in this candidate's RoI.

The muon trigger sectors can't handle more than one muon candidates in a single RoI.

(RoI in this context a part of the muon detector, not the 32-bit word sent by the hardware!) If more than 1 are detected, the one with the highest pT threshold is submitted, and this bit is raised.

Returns
1 if the overflow bit was set, 0 otherwise

Definition at line 100 of file MuCTPIRoI.cxx.

100  {
101  return ((m_roIWord >> LVL1::MuCTPIBits::ROI_OVERFLOW_SHIFT) &
102  LVL1::MuCTPIBits::ROI_OVERFLOW_MASK);
103  }

◆ getSectorAddress()

unsigned int ROIB::MuCTPIRoI::getSectorAddress ( ) const

Method returning the "electronics address" of the candidate.

Returns the address of the sector that the candidate came from.

The sector address is actually a combination of the sector number and 2 bits showing the sector type. Both of which can be accessed by other member functions.

See also
MuCTPIRoI::getSectorID()
MuCTPIRoI::getSectorLocation()
Returns
The 8-bit sector address of the candidate

Definition at line 66 of file MuCTPIRoI.cxx.

66  {
68  LVL1::MuCTPIBits::CAND_SECTOR_ADDRESS_MASK);
69  }

◆ getSectorID()

uint16_t ROIB::MuCTPIRoI::getSectorID ( ) const

Method returning the number of the trigger sector producing the candidate.

This is practically the number of the sector that produced the muon candidate.

Sectors are numbered in the following ranges:

  • 0 - 31 for the barrel
  • 0 - 47 for the endcap
  • 0 - 23 for the forward
Returns
Number of the sector producing the muon candidate

Definition at line 200 of file MuCTPIRoI.cxx.

200  {
201 
203  return ((getSectorAddress() >> 1) & LVL1::MuCTPIBits::ENDCAP_SECTORID_MASK);
204  } else {
205  return ((getSectorAddress() >> 1) & LVL1::MuCTPIBits::BARREL_SECTORID_MASK);
206  }
207  return 0;
208  }

◆ getSectorLocation()

MuCTPI_RDO::SectorLocation ROIB::MuCTPIRoI::getSectorLocation ( ) const

Method returning the name of the system that produced the RoI.

The system producing the muon candidate is encoded in the RoI word by the MuCTPI.

Using that, it's quite easy to decode which system produced the candidate.

Returns
The name of the system that produced the muon candidate

Definition at line 180 of file MuCTPIRoI.cxx.

180  {
181 
182  if( getSectorAddress() & LVL1::MuCTPIBits::ENDCAP_ADDRESS_MASK ) {
183  return MuCTPI_RDO::ENDCAP;
184  } else if(getSectorAddress() & LVL1::MuCTPIBits::FORWARD_ADDRESS_MASK) {
185  return MuCTPI_RDO::FORWARD;
186  } else {
187  return MuCTPI_RDO::BARREL;
188  }
189  }

◆ getSectorOverflow()

uint16_t ROIB::MuCTPIRoI::getSectorOverflow ( ) const

Method telling whether there were more than two candidates in this candidate's sector.

The muon trigger sectors can only transmit information about 2 muon candidates each.

If one of them detects more than 2, it transmits the 2 with the highest pT threshold, and raises this bit.

Returns
1 if the overflow bit was set, 0 otherwise

Definition at line 87 of file MuCTPIRoI.cxx.

87  {
88  return ((m_roIWord >> LVL1::MuCTPIBits::CAND_OVERFLOW_SHIFT) &
89  LVL1::MuCTPIBits::CAND_OVERFLOW_MASK);
90  }

◆ pt()

unsigned int ROIB::MuCTPIRoI::pt ( ) const

Method returning the pT of the RoI candidate.

The candidate's pT is stored as a 3-bit threshold number, with the following meanings:

  • 000 : Non-defined behaviour
  • 001 : low-pT threshold 1
  • 010 : low-pT threshold 2
  • 011 : low-pT threshold 3
  • 100 : high-pT threshold 1
  • 101 : high-pT threshold 2
  • 110 : high-pT threshold 3
  • 111 : no candidate
Returns
The 3-bit threshold number of the candidate

Definition at line 52 of file MuCTPIRoI.cxx.

52  {
53  return ((m_roIWord >> LVL1::MuCTPIBits::CAND_PT_SHIFT) &
54  LVL1::MuCTPIBits::CAND_PT_MASK);
55  }

◆ roIWord()

uint32_t ROIB::MuCTPIRoI::roIWord ( ) const

Method returning the RoI word.

This method can be used to access the "original" RoI word.

Returns
The 32-bit RoI word

Definition at line 35 of file MuCTPIRoI.cxx.

35  {
36  return m_roIWord;
37  }

Member Data Documentation

◆ m_roIWord

uint32_t ROIB::MuCTPIRoI::m_roIWord
private

The RoI word itself.

Definition at line 79 of file MuCTPIRoI.h.

◆ ROI_CAND_HIGHEST_PT_SHIFT

const uint32_t ROIB::MuCTPIRoI::ROI_CAND_HIGHEST_PT_SHIFT = 22
static

Position of the "highest p<sub>T</sub> bit" in the RoI word.

Definition at line 75 of file MuCTPIRoI.h.

◆ ROI_CAND_SECTOR_ADDRESS_SHIFT

const uint32_t ROIB::MuCTPIRoI::ROI_CAND_SECTOR_ADDRESS_SHIFT = 14
static

Position of the sector address in the RoI word.

Definition at line 73 of file MuCTPIRoI.h.


The documentation for this class was generated from the following files:
ROIB::MuCTPIRoI::getSectorLocation
MuCTPI_RDO::SectorLocation getSectorLocation() const
Method returning the name of the system that produced the RoI.
Definition: MuCTPIRoI.cxx:180
ROIB::MuCTPIRoI::ROI_CAND_HIGHEST_PT_SHIFT
static const uint32_t ROI_CAND_HIGHEST_PT_SHIFT
Position of the "highest p<sub>T</sub> bit" in the RoI word.
Definition: MuCTPIRoI.h:75
MuCTPI_RDO::BARREL
@ BARREL
Definition: MuCTPI_RDO.h:45
MuCTPI_RDO::FORWARD
@ FORWARD
Definition: MuCTPI_RDO.h:45
MuCTPI_RDO::ENDCAP
@ ENDCAP
Definition: MuCTPI_RDO.h:45
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
ROIB::MuCTPIRoI::getSectorAddress
unsigned int getSectorAddress() const
Method returning the "electronics address" of the candidate.
Definition: MuCTPIRoI.cxx:66
ROIB::MuCTPIRoI::m_roIWord
uint32_t m_roIWord
The RoI word itself.
Definition: MuCTPIRoI.h:79
ROIB::MuCTPIRoI::ROI_CAND_SECTOR_ADDRESS_SHIFT
static const uint32_t ROI_CAND_SECTOR_ADDRESS_SHIFT
Position of the sector address in the RoI word.
Definition: MuCTPIRoI.h:73