ATLAS Offline Software
MuCTPI_RIO.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef TRIGT1RESULT_MUCTPI_RIO_H
8 #define TRIGT1RESULT_MUCTPI_RIO_H
9 
10 // System include(s):
11 #include <vector>
12 #include <cstdint>
13 
14 // Gaudi/Athena include(s):
15 #include "AthenaKernel/CLASS_DEF.h"
16 
17 // Forward declaration(s):
18 class MsgStream;
19 
43 class MuCTPI_RIO {
44 
45 public:
47  enum { N_SUM = 6 };
48 
50  MuCTPI_RIO();
52  ~MuCTPI_RIO() = default;
53 
55  void setBCID( const uint16_t bcId ) { m_bcId = bcId; }
57  uint16_t getBCID() const { return m_bcId; }
58 
60  void setSum( const uint16_t * sum );
62  uint16_t getSum( const int index ) const;
63 
65  void setRoI( const uint16_t bcId, const uint16_t pTval,const uint16_t pTnum, const double eta, const double phi,
66  const uint16_t secID, const uint16_t sysId, const uint16_t hemisphere, const uint16_t roiNum,
67  const bool accepted, const bool first, const bool duplicatedRoI, const bool duplicatedSector);
69  int getNRoI() const { return m_roI.size(); }
71  bool getRoI( const int index, uint16_t &bcId, uint16_t &pTval,uint16_t& pTnum,
72  double &eta, double &phi, uint16_t& secID, uint16_t& sysId, uint16_t& hemisphere, uint16_t& roiNum,
73  bool &accepted, bool &first, bool &duplicatedRoI, bool &duplicatedSector) const;
74 
82  uint32_t getHeaderBCID() const { return m_headerBCID; }
92  const std::vector< uint32_t >& getHeaderStatusWords() const { return m_headerStatusWords; }
93 
111  std::vector< uint32_t >& headerStatusWords() { return m_headerStatusWords; }
112 
114  void dumpData() const;
116  void dumpData( MsgStream& ) const;
117 
118 private:
120 
125 
130 
135 
140 
145 
150 
155 
160 
163  std::vector< uint32_t > m_headerStatusWords;
164 
167 
168 
170  std::array<uint16_t, N_SUM> m_sum;
171 
172 public:
192  class MyRoI {
193 
194  public:
196  MyRoI( const uint16_t bcId, const uint16_t pTVal, const uint16_t pTNum, const double eta, const double phi,
197  const uint16_t secID, const uint16_t sysId, const uint16_t hemisphere, const uint16_t roiNum,
198  const bool accepted, const bool first, const bool duplicatedRoI, const bool duplicatedSector);
200  ~MyRoI() = default;
201 
203  void dumpData() const;
205  void dumpData( MsgStream& ) const;
206 
214  double m_eta;
216  double m_phi;
223 
226 
230  bool m_first;
235 
236 
237  }; // class MyRoI
238 private:
240  std::vector< MyRoI > m_roI;
241 
242 }; // class MuCTPI_RIO
243 
244 CLASS_DEF( MuCTPI_RIO , 6271 , 0 )
245 
246 #endif // TRIGT1RESULT_MUCTPI_RIO_H
MuCTPI_RIO::m_headerStatusWords
std::vector< uint32_t > m_headerStatusWords
The status words.
Definition: MuCTPI_RIO.h:163
MuCTPI_RIO::headerSourceId
void headerSourceId(uint32_t val)
Set the ROD ID specidied in the header.
Definition: MuCTPI_RIO.h:95
MuCTPI_RIO::getHeaderStatusWords
const std::vector< uint32_t > & getHeaderStatusWords() const
Get the status words from the payload.
Definition: MuCTPI_RIO.h:92
MuCTPI_RIO::m_roI
std::vector< MyRoI > m_roI
Variable holding the custom RoIs.
Definition: MuCTPI_RIO.h:240
MuCTPI_RIO::headerDetectorEventType
void headerDetectorEventType(uint32_t val)
Set the event type specified in the header.
Definition: MuCTPI_RIO.h:105
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
MuCTPI_RIO::MyRoI::m_pTvalue
uint16_t m_pTvalue
pT threshold value (in GeV) as reconstructed from the data word
Definition: MuCTPI_RIO.h:210
MuCTPI_RIO::headerNumberDataWords
void headerNumberDataWords(uint32_t val)
Set the number of data words as it was specified in the trailer
Definition: MuCTPI_RIO.h:107
MuCTPI_RIO::MyRoI::m_first
bool m_first
Flag showing whether the candidate had the highest pT in its sector.
Definition: MuCTPI_RIO.h:230
MuCTPI_RIO::getHeaderSourceId
uint32_t getHeaderSourceId() const
Get the ROD ID specified in the header.
Definition: MuCTPI_RIO.h:76
MuCTPI_RIO::MyRoI
Custom private object to hold information about the stored reconstructed RoIs.
Definition: MuCTPI_RIO.h:192
MuCTPI_RIO::MyRoI::m_phi
double m_phi
φ position of the candidate
Definition: MuCTPI_RIO.h:216
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
MuCTPI_RIO::MyRoI::m_sectorID
uint16_t m_sectorID
8-bit sector address as stored in the data word
Definition: MuCTPI_RIO.h:218
MuCTPI_RIO::m_headerNStatusWords
uint32_t m_headerNStatusWords
The number of status words as specified in the trailer
Definition: MuCTPI_RIO.h:158
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
index
Definition: index.py:1
MuCTPI_RIO::getHeaderNumberDataWords
uint32_t getHeaderNumberDataWords() const
Get the number of data words as it was specified in the trailer
Definition: MuCTPI_RIO.h:88
MuCTPI_RIO::m_headerBCID
uint32_t m_headerBCID
The full BCID as specified in the header.
Definition: MuCTPI_RIO.h:138
MuCTPI_RIO::MyRoI::m_bcId
uint16_t m_bcId
3-bit BCID as stored in the data word
Definition: MuCTPI_RIO.h:208
MuCTPI_RIO::m_headerDetEventType
uint32_t m_headerDetEventType
The event type as specified in the header.
Definition: MuCTPI_RIO.h:148
MuCTPI_RIO::getBCID
uint16_t getBCID() const
The BCID of the object.
Definition: MuCTPI_RIO.h:57
MuCTPI_RIO::headerRunNumber
void headerRunNumber(uint32_t val)
Set the run number specified in the header.
Definition: MuCTPI_RIO.h:97
MuCTPI_RIO::m_headerNDataWords
uint32_t m_headerNDataWords
The number of data words as specified in the trailer
Definition: MuCTPI_RIO.h:153
MuCTPI_RIO::MuCTPI_RIO
MuCTPI_RIO()
Default constructor.
Definition: MuCTPI_RIO.cxx:20
MuCTPI_RIO::getHeaderLVL1TriggerType
uint32_t getHeaderLVL1TriggerType() const
Get the LVL1 trigger type specified in the header.
Definition: MuCTPI_RIO.h:84
MuCTPI_RIO::MyRoI::m_accepted
bool m_accepted
Flag showing whether the candidate was sent to the RoIB.
Definition: MuCTPI_RIO.h:228
MuCTPI_RIO::m_headerLVL1TriggerType
uint32_t m_headerLVL1TriggerType
The LVL1 trigger type as specified in the header.
Definition: MuCTPI_RIO.h:143
MuCTPI_RIO::setRoI
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
Definition: MuCTPI_RIO.cxx:69
MuCTPI_RIO::MyRoI::m_pTnumber
uint16_t m_pTnumber
3-bit pT threshold number as stored in the data word
Definition: MuCTPI_RIO.h:212
MuCTPI_RIO
Reconstruction Input Object of the MuCTPI hardware and simulation.
Definition: MuCTPI_RIO.h:43
convertTimingResiduals.sum
sum
Definition: convertTimingResiduals.py:55
MuCTPI_RIO::m_sum
std::array< uint16_t, N_SUM > m_sum
Candidate multiplicity in MuCTPI_RIO::N_SUM number of pT thresholds.
Definition: MuCTPI_RIO.h:170
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
MuCTPI_RIO::headerNumberStatusWords
void headerNumberStatusWords(uint32_t val)
Set the number of status words as it was specified in the trailer
Definition: MuCTPI_RIO.h:109
MuCTPI_RIO::setSum
void setSum(const uint16_t *sum)
Set the multiplicity sum.
Definition: MuCTPI_RIO.cxx:34
MuCTPI_RIO::MyRoI::m_eta
double m_eta
η position of the candidate
Definition: MuCTPI_RIO.h:214
MuCTPI_RIO::m_headerSourceId
uint32_t m_headerSourceId
Source ID as specified in the header.
Definition: MuCTPI_RIO.h:123
MuCTPI_RIO::headerLVL1ID
void headerLVL1ID(uint32_t val)
Set the LVL1 ID specified in the header.
Definition: MuCTPI_RIO.h:99
MuCTPI_RIO::headerStatusWords
std::vector< uint32_t > & headerStatusWords()
Get the status words from the payload.
Definition: MuCTPI_RIO.h:111
MuCTPI_RIO::getHeaderBCID
uint32_t getHeaderBCID() const
Get the full BCID specified in the header.
Definition: MuCTPI_RIO.h:82
MuCTPI_RIO::dumpData
void dumpData() const
Function dumping the stored information to the message stream.
Definition: MuCTPI_RIO.cxx:127
MuCTPI_RIO::headerBCID
void headerBCID(uint32_t val)
Set the BCID specified in the header.
Definition: MuCTPI_RIO.h:101
MuCTPI_RIO::getHeaderNumberStatusWords
uint32_t getHeaderNumberStatusWords() const
Get the number of status words as it was specified in the trailer
Definition: MuCTPI_RIO.h:90
bcId
uint16_t bcId(uint32_t data)
Definition: TgcByteStreamData.h:329
MuCTPI_RIO::getNRoI
int getNRoI() const
Get the number of muon RoIs.
Definition: MuCTPI_RIO.h:69
MuCTPI_RIO::MyRoI::m_duplicatedSector
bool m_duplicatedSector
Flag showing whether there were more than 2 candidates in this candidate's sector.
Definition: MuCTPI_RIO.h:234
MuCTPI_RIO::headerLVL1TriggerType
void headerLVL1TriggerType(uint32_t val)
Set the LVL1 trigger type specified in the header.
Definition: MuCTPI_RIO.h:103
MuCTPI_RIO::m_headerRunNumber
uint32_t m_headerRunNumber
Run number as specified in the header.
Definition: MuCTPI_RIO.h:128
MuCTPI_RIO::setBCID
void setBCID(const uint16_t bcId)
Function setting the BCID of the object.
Definition: MuCTPI_RIO.h:55
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
MuCTPI_RIO::getHeaderLVL1ID
uint32_t getHeaderLVL1ID() const
Get the LVL1 ID specified in the header.
Definition: MuCTPI_RIO.h:80
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
DeMoScan.first
bool first
Definition: DeMoScan.py:534
MuCTPI_RIO::MyRoI::~MyRoI
~MyRoI()=default
Destructor.
MuCTPI_RIO::getSum
uint16_t getSum(const int index) const
Get the multiplicity sum for a given pT threshold.
Definition: MuCTPI_RIO.cxx:47
MuCTPI_RIO::m_headerLVL1ID
uint32_t m_headerLVL1ID
LVL1 ID as specified in the header.
Definition: MuCTPI_RIO.h:133
MuCTPI_RIO::MyRoI::MyRoI
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.
Definition: MuCTPI_RIO.cxx:187
MuCTPI_RIO::getHeaderDetectorEventType
uint32_t getHeaderDetectorEventType() const
Get the event type specified in the header.
Definition: MuCTPI_RIO.h:86
MuCTPI_RIO::MyRoI::m_hemisphere
bool m_hemisphere
Hemisphere in which the candidate was detected (false: z < 0, true: z > 0)
Definition: MuCTPI_RIO.h:222
MuCTPI_RIO::getHeaderRunNumber
uint32_t getHeaderRunNumber() const
Get the run number specified in the header.
Definition: MuCTPI_RIO.h:78
MuCTPI_RIO::MyRoI::m_duplicatedRoI
bool m_duplicatedRoI
Flag showing whether there was more than 1 candidate in this candidate's RoI.
Definition: MuCTPI_RIO.h:232
MuCTPI_RIO::MyRoI::m_roINumber
uint16_t m_roINumber
RoI number (sub-sector in which the candidate was detected) as stored in the data word.
Definition: MuCTPI_RIO.h:225
MuCTPI_RIO::MyRoI::m_sysId
uint16_t m_sysId
System in which the candidate was detected.
Definition: MuCTPI_RIO.h:220
MuCTPI_RIO::getRoI
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.
Definition: MuCTPI_RIO.cxx:98
MuCTPI_RIO::m_bcId
uint16_t m_bcId
What kind of BCID is this???
Definition: MuCTPI_RIO.h:166
CLASS_DEF.h
macros to associate a CLID to a type
MuCTPI_RIO::N_SUM
@ N_SUM
Definition: MuCTPI_RIO.h:47
MuCTPI_RIO::~MuCTPI_RIO
~MuCTPI_RIO()=default
Destructor.
MuCTPI_RIO::MyRoI::dumpData
void dumpData() const
Function dumping the stored information to the message stream.
Definition: MuCTPI_RIO.cxx:196