|
ATLAS Offline Software
|
#include <FPGADataFormatTool.h>
Definition at line 21 of file FPGADataFormatTool.h.
◆ convertPixelHitsToFPGADataFormat()
StatusCode FPGADataFormatTool::convertPixelHitsToFPGADataFormat |
( |
const PixelRDO_Container & |
pixelRDO, |
|
|
std::vector< uint64_t > & |
encodedData, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
overridevirtual |
Covert the Pixel RDOs to the test vector format as requited by FPGA EF tracking alogrithms.
Definition at line 20 of file FPGADataFormatTool.cxx.
35 return StatusCode::SUCCESS;
◆ convertPixelRDO()
StatusCode FPGADataFormatTool::convertPixelRDO |
( |
const PixelRDO_Container & |
pixelRDO, |
|
|
std::vector< uint64_t > & |
encodedData, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
private |
Definition at line 57 of file FPGADataFormatTool.cxx.
64 bool filledHeader =
false;
67 if (pixel_rdoCollection ==
nullptr) {
continue; }
85 (pixelRawData == pixel_rdoCollection->back()),
88 pixelRawData->getToT(),
89 pixelRawData->getLVL1A(),
101 filledHeader =
false;
105 return StatusCode::SUCCESS;
◆ convertStripHitsToFPGADataFormat()
StatusCode FPGADataFormatTool::convertStripHitsToFPGADataFormat |
( |
const SCT_RDO_Container & |
stripRDO, |
|
|
std::vector< uint64_t > & |
encodedData, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
overridevirtual |
Covert the Strip RDOs to the test vector format as requited by FPGA EF tracking alogrithms.
Definition at line 38 of file FPGADataFormatTool.cxx.
52 return StatusCode::SUCCESS;
◆ convertStripRDO()
StatusCode FPGADataFormatTool::convertStripRDO |
( |
const SCT_RDO_Container & |
stripRDO, |
|
|
std::vector< uint64_t > & |
encodedData, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
private |
Definition at line 109 of file FPGADataFormatTool.cxx.
115 constexpr
int MaxChannelinStripRow = 128;
118 bool filledHeader =
false;
121 if (SCT_Collection ==
nullptr) {
continue; }
123 std::map<int, bool> firedStrips;
129 const Identifier rdoId = sctRawData->identify();
132 for(
int i = 0;
i < sctRawData->getGroupSize();
i++) {
133 firedStrips[baseLineStrip+
i] =
true;
139 std::map<int, int> stripEncodingForITK;
140 for(
auto& [stripID, fired]: firedStrips)
148 std::bitset<3> hitMap;
151 int currChipID = stripID / MaxChannelinStripRow;
153 int maxStripIDForCurrChip = (currChipID + 1) * MaxChannelinStripRow;
155 for(
int i = 0;
i < 3;
i++)
158 if((stripID + 1 +
i) >= maxStripIDForCurrChip)
continue;
160 if(firedStrips.find(stripID + 1 +
i) != firedStrips.end())
162 if(firedStrips.at(stripID + 1 +
i))
165 firedStrips[stripID + 1 +
i] =
false;
174 stripEncodingForITK[stripID] = (
int)(hitMap.to_ulong());
178 int stripToEncode = 0;
179 int stripAlreadyEncoded = 0;
180 for(
const auto& [stripID, fired]: firedStrips)
182 if(fired) stripToEncode += 1;
188 const Identifier rdoId = sctRawData->identify();
194 if(stripEncodingForITK.find(stripID) != stripEncodingForITK.end())
205 int chipID = stripID / MaxChannelinStripRow;
206 int ITkStripID = stripID % MaxChannelinStripRow;
215 ITkStripID +=
offset * MaxChannelinStripRow;
217 stripAlreadyEncoded++;
219 (stripAlreadyEncoded == stripToEncode),
222 stripEncodingForITK.at(stripID),
234 filledHeader =
false;
239 return StatusCode::SUCCESS;
◆ fillFooter()
StatusCode FPGADataFormatTool::fillFooter |
( |
std::vector< uint64_t > & |
encodedData | ) |
const |
|
private |
◆ fillHeader()
StatusCode FPGADataFormatTool::fillHeader |
( |
std::vector< uint64_t > & |
encodedData | ) |
const |
|
private |
◆ fillModuleHeader()
◆ initialize()
StatusCode FPGADataFormatTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ m_PIX_mgr
◆ m_pixelId
◆ m_SCT_mgr
◆ m_sctId
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
int phi_index(const Identifier &id) const
virtual SiDetectorElement * getDetectorElement(const Identifier &id) const =0
access to individual elements using Identifier or IdentiferHash
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
value_type get_compact() const
Get the compact id.
int eta_index(const Identifier &id) const
int strip(const Identifier &id) const
int eta_module(const Identifier &id) const
virtual Identifier identify() const override final
identifier of this detector element (inline)