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

Reconstruction Input Object of the MuCTPI hardware and simulation. More...

#include <MuCTPI_RIO.h>

Collaboration diagram for MuCTPI_RIO:

Classes

class  MyRoI
 Custom private object to hold information about the stored reconstructed RoIs. More...

Public Types

enum  { N_SUM = 6 }
 number of candidate multiplicity thresholds More...

Public Member Functions

 MuCTPI_RIO ()
 Default constructor.
 ~MuCTPI_RIO ()=default
 Destructor.
void setBCID (const uint16_t bcId)
 Function setting the BCID of the object.
uint16_t getBCID () const
 The BCID of the object.
void setSum (const uint16_t *sum)
 Set the multiplicity sum.
uint16_t getSum (const int index) const
 Get the multiplicity sum for a given pT threshold.
void setRoI (const uint16_t bcId, const uint16_t pTval, const uint16_t pTnum, const double eta, const double phi, const uint16_t secID, const uint16_t sysId, const uint16_t hemisphere, const uint16_t roiNum, const bool accepted, const bool first, const bool duplicatedRoI, const bool duplicatedSector)
 Add a muon RoI to the object
int getNRoI () const
 Get the number of muon RoIs.
bool getRoI (const int index, uint16_t &bcId, uint16_t &pTval, uint16_t &pTnum, double &eta, double &phi, uint16_t &secID, uint16_t &sysId, uint16_t &hemisphere, uint16_t &roiNum, bool &accepted, bool &first, bool &duplicatedRoI, bool &duplicatedSector) const
 Get the properties of a given muon RoI.
uint32_t getHeaderSourceId () const
 Get the ROD ID specified in the header.
uint32_t getHeaderRunNumber () const
 Get the run number specified in the header.
uint32_t getHeaderLVL1ID () const
 Get the LVL1 ID specified in the header.
uint32_t getHeaderBCID () const
 Get the full BCID specified in the header.
uint32_t getHeaderLVL1TriggerType () const
 Get the LVL1 trigger type specified in the header.
uint32_t getHeaderDetectorEventType () const
 Get the event type specified in the header.
uint32_t getHeaderNumberDataWords () const
 Get the number of data words as it was specified in the trailer
uint32_t getHeaderNumberStatusWords () const
 Get the number of status words as it was specified in the trailer
const std::vector< uint32_t > & getHeaderStatusWords () const
 Get the status words from the payload.
void headerSourceId (uint32_t val)
 Set the ROD ID specidied in the header.
void headerRunNumber (uint32_t val)
 Set the run number specified in the header.
void headerLVL1ID (uint32_t val)
 Set the LVL1 ID specified in the header.
void headerBCID (uint32_t val)
 Set the BCID specified in the header.
void headerLVL1TriggerType (uint32_t val)
 Set the LVL1 trigger type specified in the header.
void headerDetectorEventType (uint32_t val)
 Set the event type specified in the header.
void headerNumberDataWords (uint32_t val)
 Set the number of data words as it was specified in the trailer
void headerNumberStatusWords (uint32_t val)
 Set the number of status words as it was specified in the trailer
std::vector< uint32_t > & headerStatusWords ()
 Get the status words from the payload.
void dumpData () const
 Function dumping the stored information to the message stream.
void dumpData (MsgStream &) const
 Function dumping the stored information to the message stream.

Private Attributes

uint32_t m_headerSourceId
 Source ID as specified in the header.
uint32_t m_headerRunNumber
 Run number as specified in the header.
uint32_t m_headerLVL1ID
 LVL1 ID as specified in the header.
uint32_t m_headerBCID
 The full BCID as specified in the header.
uint32_t m_headerLVL1TriggerType
 The LVL1 trigger type as specified in the header.
uint32_t m_headerDetEventType
 The event type as specified in the header.
uint32_t m_headerNDataWords
 The number of data words as specified in the trailer
uint32_t m_headerNStatusWords
 The number of status words as specified in the trailer
std::vector< uint32_t > m_headerStatusWords
 The status words.
uint16_t m_bcId
 What kind of BCID is this???
std::array< uint16_t, N_SUMm_sum
 Candidate multiplicity in MuCTPI_RIO::N_SUM number of pT thresholds.
std::vector< MyRoIm_roI
 Variable holding the custom RoIs.

Detailed Description

Reconstruction Input Object of the MuCTPI hardware and simulation.

Date
2007-07-05 13:26:22
   This is a slightly smarter version of MuCTPI_RDO. It basically provides
   the same features with additional accessor functions.

   For a detailed description of the data format of the MuCTPI, see
   the MIROD documentation (https://edms.cern.ch/file/248757/1/mirod.pdf).

   For a detailed description of the ATLAS raw event format, see
   https://edms.cern.ch/file/445840/3.1/ATL-D-ES-0019v31.pdf
See also
MuCTPI_RDO
Author
Tadashi Maeno tmaen.nosp@m.o@bn.nosp@m.l.gov
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
Ellie Dobson elean.nosp@m.or.d.nosp@m.obson.nosp@m.@cer.nosp@m.n.ch
Christian Ohm chris.nosp@m.tian.nosp@m..ohm@.nosp@m.cern.nosp@m..ch
Version
Revision
1.6

Definition at line 43 of file MuCTPI_RIO.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

number of candidate multiplicity thresholds

Enumerator
N_SUM 

Definition at line 47 of file MuCTPI_RIO.h.

47{ N_SUM = 6 };

Constructor & Destructor Documentation

◆ MuCTPI_RIO()

MuCTPI_RIO::MuCTPI_RIO ( )

Default constructor.

There are so many parameters defined in the class, that no constructor that would actually set any of them would make sense.

So this one just initialises everything to zero, in the assumption that everything will be set by the "setter" methods.

Definition at line 20 of file MuCTPI_RIO.cxx.

23 m_headerNStatusWords( 0 ), m_bcId( 0 ), m_sum() {
24
25}
uint32_t m_headerBCID
The full BCID as specified in the header.
Definition MuCTPI_RIO.h:138
uint32_t m_headerLVL1ID
LVL1 ID as specified in the header.
Definition MuCTPI_RIO.h:133
uint16_t m_bcId
What kind of BCID is this???
Definition MuCTPI_RIO.h:166
uint32_t m_headerDetEventType
The event type as specified in the header.
Definition MuCTPI_RIO.h:148
std::array< uint16_t, N_SUM > m_sum
Candidate multiplicity in MuCTPI_RIO::N_SUM number of pT thresholds.
Definition MuCTPI_RIO.h:170
uint32_t m_headerNDataWords
The number of data words as specified in the trailer
Definition MuCTPI_RIO.h:153
uint32_t m_headerRunNumber
Run number as specified in the header.
Definition MuCTPI_RIO.h:128
uint32_t m_headerLVL1TriggerType
The LVL1 trigger type as specified in the header.
Definition MuCTPI_RIO.h:143
uint32_t m_headerNStatusWords
The number of status words as specified in the trailer
Definition MuCTPI_RIO.h:158
uint32_t m_headerSourceId
Source ID as specified in the header.
Definition MuCTPI_RIO.h:123

◆ ~MuCTPI_RIO()

MuCTPI_RIO::~MuCTPI_RIO ( )
default

Destructor.

Member Function Documentation

◆ dumpData() [1/2]

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

Definition at line 127 of file MuCTPI_RIO.cxx.

127 {
128
129 SmartIF<IMessageSvc> msgSvc{Gaudi::svcLocator()->service("MessageSvc")};
130 if ( !msgSvc ) {
131 return;
132 }
133 MsgStream log( msgSvc, "MuCTPI_RIO" );
134 dumpData( log );
135
136 return;
137}
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_RIO::dumpData ( MsgStream & log) const

Function dumping the stored information to the message stream.

Function printing the information stored in the object in an easy-to-read fashion.

Parameters
logA message stream to print the information to

Definition at line 144 of file MuCTPI_RIO.cxx.

144 {
145
146 log << MSG::DEBUG << "=================================================" << endmsg;
147 log << MSG::DEBUG << "MUCTPI ROD Header / Trailer data" << endmsg;
148 log << MSG::DEBUG << "Source ID : 0x" << MSG::hex << getHeaderSourceId() << MSG::dec << endmsg;
149 log << MSG::DEBUG << "Run number : " << getHeaderRunNumber() << endmsg;
150 log << MSG::DEBUG << "Ext. LVL1 ID : " << getHeaderLVL1ID() << endmsg;
151 log << MSG::DEBUG << "BCID : " << getHeaderBCID() << endmsg;
152 log << MSG::DEBUG << "Trigger type : " << getHeaderLVL1TriggerType() << endmsg;
153 log << MSG::DEBUG << "Det. event type : " << getHeaderDetectorEventType() << endmsg;
154 log << MSG::DEBUG << "No data words : " << getHeaderNumberDataWords() << endmsg;
155 log << MSG::DEBUG << "No status words : " << getHeaderNumberStatusWords() << endmsg;
156 for( uint32_t i = 0 ; i < getHeaderNumberStatusWords(); ++i ) {
157 log << MSG::DEBUG << "Status word " << i << " : 0x" << MSG::hex << getHeaderStatusWords()[i]
158 << MSG::dec << endmsg;
159 }
160 log << MSG::DEBUG << "=================================================" << endmsg;
161
162 std::vector<MyRoI>::const_iterator it = m_roI.begin();
163 for( ; it != m_roI.end(); ++it ) it->dumpData( log );
164
165 return;
166}
#define endmsg
uint32_t getHeaderRunNumber() const
Get the run number specified in the header.
Definition MuCTPI_RIO.h:78
uint32_t getHeaderNumberDataWords() const
Get the number of data words as it was specified in the trailer
Definition MuCTPI_RIO.h:88
uint32_t getHeaderLVL1ID() const
Get the LVL1 ID specified in the header.
Definition MuCTPI_RIO.h:80
uint32_t getHeaderLVL1TriggerType() const
Get the LVL1 trigger type specified in the header.
Definition MuCTPI_RIO.h:84
uint32_t getHeaderNumberStatusWords() const
Get the number of status words as it was specified in the trailer
Definition MuCTPI_RIO.h:90
std::vector< MyRoI > m_roI
Variable holding the custom RoIs.
Definition MuCTPI_RIO.h:240
uint32_t getHeaderDetectorEventType() const
Get the event type specified in the header.
Definition MuCTPI_RIO.h:86
uint32_t getHeaderBCID() const
Get the full BCID specified in the header.
Definition MuCTPI_RIO.h:82
uint32_t getHeaderSourceId() const
Get the ROD ID specified in the header.
Definition MuCTPI_RIO.h:76
const std::vector< uint32_t > & getHeaderStatusWords() const
Get the status words from the payload.
Definition MuCTPI_RIO.h:92

◆ getBCID()

uint16_t MuCTPI_RIO::getBCID ( ) const
inline

The BCID of the object.

Definition at line 57 of file MuCTPI_RIO.h.

57{ return m_bcId; }

◆ getHeaderBCID()

uint32_t MuCTPI_RIO::getHeaderBCID ( ) const
inline

Get the full BCID specified in the header.

Definition at line 82 of file MuCTPI_RIO.h.

82{ return m_headerBCID; }

◆ getHeaderDetectorEventType()

uint32_t MuCTPI_RIO::getHeaderDetectorEventType ( ) const
inline

Get the event type specified in the header.

Definition at line 86 of file MuCTPI_RIO.h.

86{ return m_headerDetEventType; }

◆ getHeaderLVL1ID()

uint32_t MuCTPI_RIO::getHeaderLVL1ID ( ) const
inline

Get the LVL1 ID specified in the header.

Definition at line 80 of file MuCTPI_RIO.h.

80{ return m_headerLVL1ID; }

◆ getHeaderLVL1TriggerType()

uint32_t MuCTPI_RIO::getHeaderLVL1TriggerType ( ) const
inline

Get the LVL1 trigger type specified in the header.

Definition at line 84 of file MuCTPI_RIO.h.

◆ getHeaderNumberDataWords()

uint32_t MuCTPI_RIO::getHeaderNumberDataWords ( ) const
inline

Get the number of data words as it was specified in the trailer

Definition at line 88 of file MuCTPI_RIO.h.

88{ return m_headerNDataWords; }

◆ getHeaderNumberStatusWords()

uint32_t MuCTPI_RIO::getHeaderNumberStatusWords ( ) const
inline

Get the number of status words as it was specified in the trailer

Definition at line 90 of file MuCTPI_RIO.h.

90{ return m_headerNStatusWords; }

◆ getHeaderRunNumber()

uint32_t MuCTPI_RIO::getHeaderRunNumber ( ) const
inline

Get the run number specified in the header.

Definition at line 78 of file MuCTPI_RIO.h.

78{ return m_headerRunNumber; }

◆ getHeaderSourceId()

uint32_t MuCTPI_RIO::getHeaderSourceId ( ) const
inline

Get the ROD ID specified in the header.

Definition at line 76 of file MuCTPI_RIO.h.

76{ return m_headerSourceId; }

◆ getHeaderStatusWords()

const std::vector< uint32_t > & MuCTPI_RIO::getHeaderStatusWords ( ) const
inline

Get the status words from the payload.

Definition at line 92 of file MuCTPI_RIO.h.

92{ return m_headerStatusWords; }
std::vector< uint32_t > m_headerStatusWords
The status words.
Definition MuCTPI_RIO.h:163

◆ getNRoI()

int MuCTPI_RIO::getNRoI ( ) const
inline

Get the number of muon RoIs.

Definition at line 69 of file MuCTPI_RIO.h.

69{ return m_roI.size(); }

◆ getRoI()

bool MuCTPI_RIO::getRoI ( const int index,
uint16_t & bcId,
uint16_t & pTval,
uint16_t & pTnum,
double & eta,
double & phi,
uint16_t & secID,
uint16_t & sysId,
uint16_t & hemisphere,
uint16_t & roiNum,
bool & accepted,
bool & first,
bool & duplicatedRoI,
bool & duplicatedSector ) const

Get the properties of a given muon RoI.

Function that returns the properties of a given RoI in the variables given to it.

Parameters
indexindex of the RoI in question in the stored list
bcId3-bit BCID from the muon candidate word
pTvalpT threshold value in GeV taken from the configuration
pTnumpT threshold number from the muon candidate word
etaη coordinate of the muon candidate
phiφ coordinate of the muon candidate
secID8-bit sector ID from the muon candidate word
sysIdsystem ID ROI (Barrel=0, Endcap=1, Forward=2)
hemisphereHemisphere (0: z < 0, 1: z > 0)
roiNumRoI number from the muon candidate word
acceptedflag showing whether the candidate was sent to the RoIB
firstflag showing whether the candidate had the highest pT in it's sector
duplicatedRoIflag showing whether there was more than 1 muon candidate in this candidate's RoI
duplicatedSectorflag showing whether there were more than 2 muon candidates in this candidate's sector
Returns
true in case the candidate was found, false otherwise

Definition at line 98 of file MuCTPI_RIO.cxx.

100 {
101
102 if( index >= getNRoI() ) return false;
103
104 const MyRoI &roi = m_roI.at( index );
105 bcId = roi.m_bcId;
106 pTval = roi.m_pTvalue;
107 pTnum = roi.m_pTnumber;
108 eta = roi.m_eta;
109 phi = roi.m_phi;
110 secID = roi.m_sectorID;
111 sysId = roi.m_sysId;
112 hemisphere = (roi.m_hemisphere ? 1 : 0);
113 roiNum = roi.m_roINumber;
114 accepted = roi.m_accepted;
115 first = roi.m_first;
116 duplicatedRoI = roi.m_duplicatedRoI;
117 duplicatedSector = roi.m_duplicatedSector;
118
119
120 return true;
121}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
uint16_t bcId(uint32_t data)
Custom private object to hold information about the stored reconstructed RoIs.
Definition MuCTPI_RIO.h:192
int getNRoI() const
Get the number of muon RoIs.
Definition MuCTPI_RIO.h:69
bool first
Definition DeMoScan.py:534

◆ getSum()

uint16_t MuCTPI_RIO::getSum ( const int index) const

Get the multiplicity sum for a given pT threshold.

Function returning the 3-bit number of muon candidates in threshold "index".

Be aware that index is defined from 0 to 5, not from 1 to 6 as the actual thresholds are numbered!

Parameters
indexIndex of the pT threshold to get the multiplicity sum for
Returns
The 3-bit number of muon candidates at the given index

Definition at line 47 of file MuCTPI_RIO.cxx.

47 {
48 if( index >= N_SUM ) return 0;
49 return m_sum[ index ];
50}
str index
Definition DeMoScan.py:362

◆ headerBCID()

void MuCTPI_RIO::headerBCID ( uint32_t val)
inline

Set the BCID specified in the header.

Definition at line 101 of file MuCTPI_RIO.h.

◆ headerDetectorEventType()

void MuCTPI_RIO::headerDetectorEventType ( uint32_t val)
inline

Set the event type specified in the header.

Definition at line 105 of file MuCTPI_RIO.h.

◆ headerLVL1ID()

void MuCTPI_RIO::headerLVL1ID ( uint32_t val)
inline

Set the LVL1 ID specified in the header.

Definition at line 99 of file MuCTPI_RIO.h.

◆ headerLVL1TriggerType()

void MuCTPI_RIO::headerLVL1TriggerType ( uint32_t val)
inline

Set the LVL1 trigger type specified in the header.

Definition at line 103 of file MuCTPI_RIO.h.

◆ headerNumberDataWords()

void MuCTPI_RIO::headerNumberDataWords ( uint32_t val)
inline

Set the number of data words as it was specified in the trailer

Definition at line 107 of file MuCTPI_RIO.h.

◆ headerNumberStatusWords()

void MuCTPI_RIO::headerNumberStatusWords ( uint32_t val)
inline

Set the number of status words as it was specified in the trailer

Definition at line 109 of file MuCTPI_RIO.h.

◆ headerRunNumber()

void MuCTPI_RIO::headerRunNumber ( uint32_t val)
inline

Set the run number specified in the header.

Definition at line 97 of file MuCTPI_RIO.h.

◆ headerSourceId()

void MuCTPI_RIO::headerSourceId ( uint32_t val)
inline

Set the ROD ID specidied in the header.

Definition at line 95 of file MuCTPI_RIO.h.

◆ headerStatusWords()

std::vector< uint32_t > & MuCTPI_RIO::headerStatusWords ( )
inline

Get the status words from the payload.

Definition at line 111 of file MuCTPI_RIO.h.

111{ return m_headerStatusWords; }

◆ setBCID()

void MuCTPI_RIO::setBCID ( const uint16_t bcId)
inline

Function setting the BCID of the object.

Definition at line 55 of file MuCTPI_RIO.h.

55{ m_bcId = bcId; }

◆ setRoI()

void MuCTPI_RIO::setRoI ( const uint16_t bcId,
const uint16_t pTval,
const uint16_t pTnum,
const double eta,
const double phi,
const uint16_t secID,
const uint16_t sysId,
const uint16_t hemisphere,
const uint16_t roiNum,
const bool accepted,
const bool first,
const bool duplicatedRoI,
const bool duplicatedSector )

Add a muon RoI to the object

Function that adds one more muon candidate to the stored list.

Parameters
bcId3-bit BCID from the muon candidate word
pTvalpT threshold value in GeV taken from the configuration
pTnumpT threshold number from the muon candidate word
etaη coordinate of the muon candidate
phiφ coordinate of the muon candidate
secID8-bit sector ID from the muon candidate word
sysIdsystem ID ROI (Barrel=0, Endcap=1, Forward=2)
hemisphereHemisphere (0: z < 0, 1: z > 0)
roiNumRoI number from the muon candidate word
acceptedflag showing whether the candidate was sent to the RoIB
firstflag showing whether the candidate had the highest pT in it's sector
duplicatedRoIflag showing whether there was more than 1 muon candidate in this candidate's RoI
duplicatedSectorflag showing whether there were more than 2 muon candidates in this candidate's sector

Definition at line 69 of file MuCTPI_RIO.cxx.

71 {
72
73 MyRoI roI( bcId, pTval,pTnum, eta, phi, secID, sysId, hemisphere, roiNum, accepted, first, duplicatedRoI, duplicatedSector);
74 m_roI.push_back( roI );
75
76 return;
77}

◆ setSum()

void MuCTPI_RIO::setSum ( const uint16_t * sum)

Set the multiplicity sum.

This function sets the muon candidate multiplicity sums in the 6 pT thresholds.

See also
MuCTPI_RIO::getSum()
Parameters
sumconstant pointer to an array holding 6 uint16_t values

Definition at line 34 of file MuCTPI_RIO.cxx.

34 {
35 for( int i = 0; i < N_SUM; ++i ) m_sum[ i ] = *( sum + i );
36 return;
37}

Member Data Documentation

◆ m_bcId

uint16_t MuCTPI_RIO::m_bcId
private

What kind of BCID is this???

Definition at line 166 of file MuCTPI_RIO.h.

◆ m_headerBCID

uint32_t MuCTPI_RIO::m_headerBCID
private

The full BCID as specified in the header.

See also
MuCTPI_RIO::getHeaderBCID()

Definition at line 138 of file MuCTPI_RIO.h.

◆ m_headerDetEventType

uint32_t MuCTPI_RIO::m_headerDetEventType
private

The event type as specified in the header.

See also
MuCTPI_RIO::getHeaderDetectorEventType()

Definition at line 148 of file MuCTPI_RIO.h.

◆ m_headerLVL1ID

uint32_t MuCTPI_RIO::m_headerLVL1ID
private

LVL1 ID as specified in the header.

See also
MuCTPI_RIO::getHeaderLVL1ID()

Definition at line 133 of file MuCTPI_RIO.h.

◆ m_headerLVL1TriggerType

uint32_t MuCTPI_RIO::m_headerLVL1TriggerType
private

The LVL1 trigger type as specified in the header.

See also
MuCTPI_RIO::getHeaderLVL1TriggerType()

Definition at line 143 of file MuCTPI_RIO.h.

◆ m_headerNDataWords

uint32_t MuCTPI_RIO::m_headerNDataWords
private

The number of data words as specified in the trailer

See also
MuCTPI_RIO::getHeaderNumberDataWords()

Definition at line 153 of file MuCTPI_RIO.h.

◆ m_headerNStatusWords

uint32_t MuCTPI_RIO::m_headerNStatusWords
private

The number of status words as specified in the trailer

See also
MuCTPI_RIO::getHeaderNumberStatusWords()

Definition at line 158 of file MuCTPI_RIO.h.

◆ m_headerRunNumber

uint32_t MuCTPI_RIO::m_headerRunNumber
private

Run number as specified in the header.

See also
MuCTPI_RIO::getHeaderRunNumber()

Definition at line 128 of file MuCTPI_RIO.h.

◆ m_headerSourceId

uint32_t MuCTPI_RIO::m_headerSourceId
private

Source ID as specified in the header.

See also
MuCTPI_RIO::getHeaderSourceId()

Definition at line 123 of file MuCTPI_RIO.h.

◆ m_headerStatusWords

std::vector< uint32_t > MuCTPI_RIO::m_headerStatusWords
private

The status words.

See also
MuCTPI_RIO::getHeaderStatusWords()

Definition at line 163 of file MuCTPI_RIO.h.

◆ m_roI

std::vector< MyRoI > MuCTPI_RIO::m_roI
private

Variable holding the custom RoIs.

Definition at line 240 of file MuCTPI_RIO.h.

◆ m_sum

std::array<uint16_t, N_SUM> MuCTPI_RIO::m_sum
private

Candidate multiplicity in MuCTPI_RIO::N_SUM number of pT thresholds.

Definition at line 170 of file MuCTPI_RIO.h.


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