Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <FPGADataFormatTool.h>
Definition at line 21 of file FPGADataFormatTool.h.
◆ convertFPGATracks()
Definition at line 75 of file FPGADataFormatTool.cxx.
84 for(
const auto& hit:
track.getFPGATrackSimHits())
86 bitmask |= 2 << hit.getLayer();
125 for(
unsigned int i = 0 ;
i <
hits.size();
i++)
127 const auto& hit =
hits[
i];
130 if(hit.getOriginalHit().getCluster1ID() >=0)
132 cluster1D=hit.getOriginalHit().getCluster1ID();
135 if(hit.getOriginalHit().getCluster2ID() >=0)
137 cluster2D=hit.getOriginalHit().getCluster2ID();
162 return StatusCode::SUCCESS;
◆ convertFPGATracksToFPGADataFormat()
◆ 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 167 of file FPGADataFormatTool.cxx.
173 bool filledHeader =
false;
176 if (pixel_rdoCollection ==
nullptr) {
continue; }
194 (pixelRawData == pixel_rdoCollection->back()),
197 pixelRawData->getToT(),
198 pixelRawData->getLVL1A(),
208 filledHeader =
false;
212 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 215 of file FPGADataFormatTool.cxx.
220 constexpr
int MaxChannelinStripRow = 128;
221 long unsigned int stripNumber = 0;
222 bool filledHeader =
false;
225 bool firstClusterFilled =
false;
228 if (SCT_Collection ==
nullptr) {
continue; }
230 std::map<int, bool> firedStrips;
231 std::map<int, const SCT_RDORawData*> firedStripsToRDO;
237 const Identifier rdoId = sctRawData->identify();
239 for (
int i = 0;
i < sctRawData->getGroupSize();
i++) {
240 firedStrips[baseLineStrip +
i] =
true;
241 firedStripsToRDO[baseLineStrip +
i] = sctRawData;
246 std::map<int, int> stripEncodingForITK;
247 std::map<int, const SCT_RDORawData* > stripEncodingForITKToRDO;
248 for (
const auto& [stripID, fired] : firedStrips) {
250 if (!fired)
continue;
253 std::bitset<3> hitMap;
254 int currChipID = stripID / MaxChannelinStripRow;
255 int maxStripIDForCurrChip = (currChipID + 1) * MaxChannelinStripRow;
257 for (
int i = 0;
i < 3;
i++) {
259 if ((stripID + 1 +
i) >= maxStripIDForCurrChip)
continue;
260 if (firedStrips.find(stripID + 1 +
i) != firedStrips.end()) {
261 if (firedStrips.at(stripID + 1 +
i)) {
263 firedStrips[stripID + 1 +
i] =
false;
271 stripEncodingForITK[stripID] =
static_cast<int>(hitMap.to_ulong());
272 stripEncodingForITKToRDO[stripID] = firedStripsToRDO[stripID];
276 firstClusterFilled =
false;
279 for (
const auto& [stripID,
encoding] : stripEncodingForITK) {
280 const SCT_RDORawData* sctRawData = stripEncodingForITKToRDO[stripID];
291 int chipID = stripID / MaxChannelinStripRow;
292 int ITkStripID = stripID % MaxChannelinStripRow;
299 ITkStripID +=
offset * MaxChannelinStripRow;
302 bool lastBit = (stripNumber == stripEncodingForITK.size());
309 stripEncodingForITK.at(stripID),
316 if (!firstClusterFilled) {
317 packedWord = (
static_cast<uint64_t>(encodedCluster) << 32);
318 firstClusterFilled =
true;
320 packedWord |=
static_cast<uint64_t>(encodedCluster);
321 encodedData.push_back(packedWord);
322 firstClusterFilled =
false;
327 if (lastBit && firstClusterFilled) {
328 encodedData.push_back(packedWord);
333 filledHeader =
false;
336 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)
virtual const SiDetectorElement * getDetectorElement(const Identifier &id) const =0
access to individual elements using Identifier or IdentiferHash
int phi_index(const Identifier &id) const
unsigned int value() const
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.
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
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
virtual Identifier identify() const override final
identifier of this detector element (inline)