 |
ATLAS Offline Software
|
#include <FPGADataFormatTool.h>
Definition at line 21 of file FPGADataFormatTool.h.
◆ convertFPGATracks()
Definition at line 77 of file FPGADataFormatTool.cxx.
86 for(
const auto& hit:
track.getFPGATrackSimHits())
88 bitmask |= 2 << hit.getLayer();
127 for(
unsigned int i = 0 ;
i <
hits.size();
i++)
129 const auto& hit =
hits[
i];
132 if(hit.getOriginalHit().getCluster1ID() >=0)
134 cluster1D=hit.getOriginalHit().getCluster1ID();
137 if(hit.getOriginalHit().getCluster2ID() >=0)
139 cluster2D=hit.getOriginalHit().getCluster2ID();
164 return StatusCode::SUCCESS;
◆ convertFPGATracksToFPGADataFormat()
◆ convertPixelHitsToFPGADataFormat()
Covert the Pixel RDOs to the test vector format as requited by FPGA EF tracking alogrithms.
Definition at line 20 of file FPGADataFormatTool.cxx.
36 return StatusCode::SUCCESS;
◆ convertPixelRDO()
Definition at line 169 of file FPGADataFormatTool.cxx.
176 bool filledHeader =
false;
179 if (pixel_rdoCollection ==
nullptr) {
continue; }
188 if(hashList.size() > 0)
190 if(
std::find(hashList.begin(), hashList.end(), sielement->
identifyHash()) == hashList.end())
continue;
202 (pixelRawData == pixel_rdoCollection->back()),
205 pixelRawData->getToT(),
206 pixelRawData->getLVL1A(),
216 filledHeader =
false;
220 return StatusCode::SUCCESS;
◆ convertStripHitsToFPGADataFormat()
Covert the Strip RDOs to the test vector format as requited by FPGA EF tracking alogrithms.
Definition at line 39 of file FPGADataFormatTool.cxx.
54 return StatusCode::SUCCESS;
◆ convertStripRDO()
Definition at line 223 of file FPGADataFormatTool.cxx.
229 constexpr
int MaxChannelinStripRow = 128;
230 long unsigned int stripNumber = 0;
231 bool filledHeader =
false;
234 bool firstClusterFilled =
false;
237 if (SCT_Collection ==
nullptr) {
continue; }
239 std::map<int, bool> firedStrips;
240 std::map<int, const SCT_RDORawData*> firedStripsToRDO;
246 const Identifier rdoId = sctRawData->identify();
248 for (
int i = 0;
i < sctRawData->getGroupSize();
i++) {
249 firedStrips[baseLineStrip +
i] =
true;
250 firedStripsToRDO[baseLineStrip +
i] = sctRawData;
255 std::map<int, int> stripEncodingForITK;
256 std::map<int, const SCT_RDORawData* > stripEncodingForITKToRDO;
257 for (
const auto& [stripID, fired] : firedStrips) {
259 if (!fired)
continue;
262 std::bitset<3> hitMap;
263 int currChipID = stripID / MaxChannelinStripRow;
264 int maxStripIDForCurrChip = (currChipID + 1) * MaxChannelinStripRow;
266 for (
int i = 0;
i < 3;
i++) {
268 if ((stripID + 1 +
i) >= maxStripIDForCurrChip)
continue;
269 if (firedStrips.find(stripID + 1 +
i) != firedStrips.end()) {
270 if (firedStrips.at(stripID + 1 +
i)) {
272 firedStrips[stripID + 1 +
i] =
false;
280 stripEncodingForITK[stripID] =
static_cast<int>(hitMap.to_ulong());
281 stripEncodingForITKToRDO[stripID] = firedStripsToRDO[stripID];
285 firstClusterFilled =
false;
288 for (
const auto& [stripID,
encoding] : stripEncodingForITK) {
289 const SCT_RDORawData* sctRawData = stripEncodingForITKToRDO[stripID];
294 if(hashList.size() > 0)
296 if(
std::find(hashList.begin(), hashList.end(), sielement->
identifyHash()) == hashList.end())
continue;
306 int chipID = stripID / MaxChannelinStripRow;
307 int ITkStripID = stripID % MaxChannelinStripRow;
314 ITkStripID +=
offset * MaxChannelinStripRow;
317 bool lastBit = (stripNumber == stripEncodingForITK.size());
324 stripEncodingForITK.at(stripID),
331 if (!firstClusterFilled) {
332 packedWord = (
static_cast<uint64_t>(encodedCluster) << 32);
333 firstClusterFilled =
true;
335 packedWord |=
static_cast<uint64_t>(encodedCluster);
336 encodedData.push_back(packedWord);
337 firstClusterFilled =
false;
342 if (lastBit && firstClusterFilled) {
343 encodedData.push_back(packedWord);
348 filledHeader =
false;
351 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
std::string find(const std::string &s)
return a remapped string
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)