7#include "GaudiKernel/Bootstrap.h"
8#include "GaudiKernel/ISvcLocator.h"
9#include "GaudiKernel/IMessageSvc.h"
10#include "GaudiKernel/MsgStream.h"
35 for(
int i = 0; i <
N_SUM; ++i )
m_sum[ i ] = *( sum + i );
70 const uint16_t secID,
const uint16_t sysId,
const uint16_t hemisphere,
const uint16_t roiNum,
71 const bool accepted,
const bool first,
const bool duplicatedRoI,
const bool duplicatedSector) {
73 MyRoI roI(
bcId, pTval,pTnum,
eta,
phi, secID, sysId, hemisphere, roiNum, accepted, first, duplicatedRoI, duplicatedSector);
74 m_roI.push_back( roI );
99 uint16_t& secID, uint16_t& sysId, uint16_t& hemisphere, uint16_t& roiNum,
bool &accepted,
100 bool &first,
bool &duplicatedRoI,
bool &duplicatedSector)
const {
129 SmartIF<IMessageSvc> msgSvc{Gaudi::svcLocator()->service(
"MessageSvc")};
133 MsgStream log( msgSvc,
"MuCTPI_RIO" );
146 log << MSG::DEBUG <<
"=================================================" <<
endmsg;
147 log << MSG::DEBUG <<
"MUCTPI ROD Header / Trailer data" <<
endmsg;
160 log << MSG::DEBUG <<
"=================================================" <<
endmsg;
162 std::vector<MyRoI>::const_iterator it =
m_roI.begin();
163 for( ; it !=
m_roI.end(); ++it ) it->dumpData( log );
185MuCTPI_RIO::MyRoI::MyRoI(
const uint16_t
bcId,
const uint16_t pTVal,
const uint16_t pTnumber,
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)
196 SmartIF<IMessageSvc> msgSvc{Gaudi::svcLocator()->service(
"MessageSvc")};
200 MsgStream log( msgSvc,
"MuCTPI_RIO::RoI" );
213 log << MSG::DEBUG <<
"=================================================" <<
endmsg;
214 log << MSG::DEBUG <<
"MUCTPI RoI data" <<
endmsg;
224 log << MSG::DEBUG <<
"Flags " <<
endmsg;
229 log << MSG::DEBUG <<
"=================================================" <<
endmsg;
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.
bool m_duplicatedSector
Flag showing whether there were more than 2 candidates in this candidate's sector.
uint16_t m_bcId
3-bit BCID as stored in the data word
uint16_t m_sectorID
8-bit sector address as stored in the data word
MyRoI(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)
Constructor.
bool m_accepted
Flag showing whether the candidate was sent to the RoIB.
void dumpData() const
Function dumping the stored information to the message stream.
uint16_t m_roINumber
RoI number (sub-sector in which the candidate was detected) as stored in the data word.
uint16_t m_pTnumber
3-bit pT threshold number as stored in the data word
double m_eta
η position of the candidate
bool m_first
Flag showing whether the candidate had the highest pT in its sector.
uint16_t m_sysId
System in which the candidate was detected.
bool m_hemisphere
Hemisphere in which the candidate was detected (false: z < 0, true: z > 0)
uint16_t m_pTvalue
pT threshold value (in GeV) as reconstructed from the data word
bool m_duplicatedRoI
Flag showing whether there was more than 1 candidate in this candidate's RoI.
double m_phi
φ position of the candidate
uint32_t m_headerBCID
The full BCID as specified in the header.
uint32_t getHeaderRunNumber() const
Get the run number specified in the header.
uint32_t getHeaderNumberDataWords() const
Get the number of data words as it was specified in the trailer
uint32_t m_headerLVL1ID
LVL1 ID as specified in the header.
uint16_t getSum(const int index) const
Get the multiplicity sum for a given pT threshold.
uint16_t m_bcId
What kind of BCID is this???
uint32_t getHeaderLVL1ID() const
Get the LVL1 ID specified in the header.
uint32_t getHeaderLVL1TriggerType() const
Get the LVL1 trigger type specified in the header.
uint32_t getHeaderNumberStatusWords() const
Get the number of status words as it was specified in the trailer
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.
std::vector< MyRoI > m_roI
Variable holding the custom RoIs.
uint32_t m_headerDetEventType
The event type as specified in the header.
void setSum(const uint16_t *sum)
Set the multiplicity sum.
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
std::array< uint16_t, N_SUM > m_sum
Candidate multiplicity in MuCTPI_RIO::N_SUM number of pT thresholds.
uint32_t getHeaderDetectorEventType() const
Get the event type specified in the header.
MuCTPI_RIO()
Default constructor.
uint32_t getHeaderBCID() const
Get the full BCID specified in the header.
uint32_t m_headerNDataWords
The number of data words as specified in the trailer
uint32_t m_headerRunNumber
Run number as specified in the header.
uint32_t m_headerLVL1TriggerType
The LVL1 trigger type as specified in the header.
uint32_t m_headerNStatusWords
The number of status words as specified in the trailer
uint32_t getHeaderSourceId() const
Get the ROD ID specified in the header.
void dumpData() const
Function dumping the stored information to the message stream.
const std::vector< uint32_t > & getHeaderStatusWords() const
Get the status words from the payload.
uint32_t m_headerSourceId
Source ID as specified in the header.