ATLAS Offline Software
Loading...
Searching...
No Matches
eFEXTOBxTOBMatching.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5//***************************************************************************
6// eFEXTOBMatching - description
7// ------------------------------
8// Small utility function to identify xTOBs that correspond to TOBs
9// begin : 12 08 2022
10// email : Alan.Watson@CERN.CH
11// ***************************************************************************/
12
13#include <set>
14
15namespace LVL1 {
16
17
18 template <typename T> void matchTOBs(T& TOBs, T& xTOBs) {
19
20 // Use a std::set of TOB coordinate fields to match TOBs and xTOBs
21 std::set<uint32_t> tobCoords;
22
23 // Fill maps with coordinates of TOBs
24 for (auto t : *TOBs) {
25 uint32_t coord = t->word0()>>16;
26 tobCoords.insert(coord);
27 }
28
29 // Set isTOB flag for xTOBs whose coordinate fields match a TOB
30 for (auto t : *xTOBs) {
31 uint32_t coord = t->word0()>>16;
32 if (tobCoords.find(coord) != tobCoords.end()) t->setIsTOB(1);
33 }
34
35 }
36
37} // end of namespace bracket
38
double coord
Type of coordination system.
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
void matchTOBs(T &TOBs, T &xTOBs)