|
ATLAS Offline Software
|
#include <L1TopoLUT.h>
|
bool | initializeLUT (const std::string &barrelFileName, const std::string &ecfFileName, const std::string &side0LUTFileName, const std::string &side1LUTFileName) |
|
L1TopoCoordinates | getCoordinates (const unsigned short &side, const unsigned short &subsystem, const unsigned short §orID, const unsigned short &roi) const |
|
unsigned short | getBarrelROI (unsigned short side, unsigned short sector, unsigned short ieta, unsigned short iphi) const |
|
const std::vector< std::string > & | getErrors () const |
|
float | getCompactedValue_eta (unsigned short subsystem, unsigned short side, unsigned short sectorID, unsigned short roi) |
|
float | getCompactedValue_phi (unsigned short subsystem, unsigned short side, unsigned short sectorID, unsigned short roi) |
|
|
void | fillFromPtree (const boost::property_tree::ptree &node, std::map< unsigned short, std::vector< float >> &theLut) const |
|
void | fillFromPtree (const boost::property_tree::ptree &node, std::map< unsigned short, std::map< unsigned short, std::pair< unsigned short, unsigned short >>> &theLut) const |
|
bool | initializeCompactedLUTs (const std::string &side0LUTFileName, const std::string &side1LUTFileName) |
|
bool | initializeLUT (const std::string &inFileName, const bool &isBarrel) |
|
bool | initializeJSON (const std::string &inFileName, bool side) |
|
bool | initializeJSONForSubsystem (pt::ptree &root, const std::string &nodeName, bool side, unsigned short subsystem) |
|
|
std::map< unsigned short, std::vector< float > > | m_barrel_eta_lookup0 |
|
std::map< unsigned short, std::vector< float > > | m_barrel_eta_lookup1 |
|
std::map< unsigned short, std::vector< float > > | m_barrel_phi_lookup0 |
|
std::map< unsigned short, std::vector< float > > | m_barrel_phi_lookup1 |
|
std::map< unsigned short, std::vector< float > > | m_endcap_eta_lookup0 |
|
std::map< unsigned short, std::vector< float > > | m_endcap_eta_lookup1 |
|
std::map< unsigned short, std::vector< float > > | m_endcap_phi_lookup0 |
|
std::map< unsigned short, std::vector< float > > | m_endcap_phi_lookup1 |
|
std::map< unsigned short, std::vector< float > > | m_forward_eta_lookup0 |
|
std::map< unsigned short, std::vector< float > > | m_forward_eta_lookup1 |
|
std::map< unsigned short, std::vector< float > > | m_forward_phi_lookup0 |
|
std::map< unsigned short, std::vector< float > > | m_forward_phi_lookup1 |
|
std::map< unsigned short, std::map< unsigned short, std::pair< unsigned short, unsigned short > > > | m_barrel_encoding0 |
|
std::map< unsigned short, std::map< unsigned short, std::pair< unsigned short, unsigned short > > > | m_barrel_encoding1 |
|
std::map< unsigned short, unsigned short > | m_barrel_reverse_encoding0 |
|
std::map< unsigned short, unsigned short > | m_barrel_reverse_encoding1 |
|
std::unordered_map< L1TopoLUTKey, L1TopoCoordinates, L1TopoLUTKeyHasher > | m_encoding |
|
std::vector< std::string > | m_errors |
|
Definition at line 40 of file L1TopoLUT.h.
◆ fillFromPtree() [1/2]
void LVL1MUCTPIPHASE1::L1TopoLUT::fillFromPtree |
( |
const boost::property_tree::ptree & |
node, |
|
|
std::map< unsigned short, std::map< unsigned short, std::pair< unsigned short, unsigned short >>> & |
theLut |
|
) |
| const |
|
protected |
Definition at line 36 of file L1TopoLUT.cxx.
39 for (
const boost::property_tree::ptree::value_type& outer_elem :
node){
41 std::map<unsigned short,std::pair<unsigned short, unsigned short>>
buff;
42 for (
const boost::property_tree::ptree::value_type& inner_elem : outer_elem.second) {
43 std::vector<unsigned short> codeBuff;
44 for (
const boost::property_tree::ptree::value_type& code_elem : inner_elem.second) {
45 codeBuff.push_back( code_elem.second.get_value<
unsigned short>() );
47 if ( codeBuff.size() != 2 ) {
51 buff[std::stoi(inner_elem.first)] = { codeBuff[0], codeBuff[1] } ;
54 theLut[std::stoi(outer_elem.first)] =
buff;
◆ fillFromPtree() [2/2]
Definition at line 13 of file L1TopoLUT.cxx.
16 size_t outerIndex = 0;
17 for (
const boost::property_tree::ptree::value_type& outer_elem :
node){
19 std::vector<float>
buff(outer_elem.second.size());
21 for (
const boost::property_tree::ptree::value_type& inner_elem : outer_elem.second) {
22 buff[
index] = inner_elem.second.get_value<
float>();
26 if (outer_elem.first.length() > 0) {
27 theLut[std::stoi(outer_elem.first)] =
buff;
29 theLut[outerIndex] =
buff;
◆ getBarrelROI()
unsigned short LVL1MUCTPIPHASE1::L1TopoLUT::getBarrelROI |
( |
unsigned short |
side, |
|
|
unsigned short |
sector, |
|
|
unsigned short |
ieta, |
|
|
unsigned short |
iphi |
|
) |
| const |
Definition at line 232 of file L1TopoLUT.cxx.
233 unsigned short etaPhiSubWord = ((ieta&0xF) << 9) | ((sector&0x1F) << 3) | (iphi&0x7);
234 unsigned short retval = 0;
◆ getCompactedValue_eta()
float LVL1MUCTPIPHASE1::L1TopoLUT::getCompactedValue_eta |
( |
unsigned short |
subsystem, |
|
|
unsigned short |
side, |
|
|
unsigned short |
sectorID, |
|
|
unsigned short |
roi |
|
) |
| |
Definition at line 244 of file L1TopoLUT.cxx.
248 float retval = std::numeric_limits<float>::quiet_NaN();
259 std::stringstream ess;
260 ess <<
"[TrigT1MuctpiPhase1/L1TopoLUT] Unknown muon subsystem value: " <<
subsystem;
261 throw std::out_of_range(ess.str());
264 std::stringstream ess;
265 ess <<
"[TrigT1MuctpiPhase1/L1TopoLUT] Failed to look up eta value for subsystem=" <<
subsystem
266 <<
", side="<< (
side?
"A":
"C")
267 <<
", sectorID="<< sectorID
269 <<
"\n (caught exception: " <<
e.what() <<
")";
270 throw std::out_of_range(ess.str());
◆ getCompactedValue_phi()
float LVL1MUCTPIPHASE1::L1TopoLUT::getCompactedValue_phi |
( |
unsigned short |
subsystem, |
|
|
unsigned short |
side, |
|
|
unsigned short |
sectorID, |
|
|
unsigned short |
roi |
|
) |
| |
Definition at line 275 of file L1TopoLUT.cxx.
279 float retval = std::numeric_limits<float>::quiet_NaN();
290 std::stringstream ess;
291 ess <<
"[TrigT1MuctpiPhase1/L1TopoLUT] Unknown muon subsystem value: " <<
subsystem;
292 throw std::out_of_range(ess.str());
295 std::stringstream ess;
296 ess <<
"[TrigT1MuctpiPhase1/L1TopoLUT] Failed to look up phi value for subsystem=" <<
subsystem
297 <<
", side="<< (
side?
"A":
"C")
298 <<
", sectorID="<< sectorID
300 <<
"\n (caught exception: " <<
e.what() <<
")";
301 throw std::out_of_range(ess.str());
◆ getCoordinates()
L1TopoCoordinates LVL1MUCTPIPHASE1::L1TopoLUT::getCoordinates |
( |
const unsigned short & |
side, |
|
|
const unsigned short & |
subsystem, |
|
|
const unsigned short & |
sectorID, |
|
|
const unsigned short & |
roi |
|
) |
| const |
◆ getErrors()
const std::vector<std::string>& LVL1MUCTPIPHASE1::L1TopoLUT::getErrors |
( |
| ) |
const |
|
inline |
◆ initializeCompactedLUTs()
bool LVL1MUCTPIPHASE1::L1TopoLUT::initializeCompactedLUTs |
( |
const std::string & |
side0LUTFileName, |
|
|
const std::string & |
side1LUTFileName |
|
) |
| |
|
protected |
Definition at line 60 of file L1TopoLUT.cxx.
64 boost::property_tree::read_json(side0LUTFileName.c_str(), root0);
66 boost::property_tree::read_json(side1LUTFileName.c_str(), root1);
◆ initializeJSON()
bool LVL1MUCTPIPHASE1::L1TopoLUT::initializeJSON |
( |
const std::string & |
inFileName, |
|
|
bool |
side |
|
) |
| |
|
protected |
◆ initializeJSONForSubsystem()
bool LVL1MUCTPIPHASE1::L1TopoLUT::initializeJSONForSubsystem |
( |
pt::ptree & |
root, |
|
|
const std::string & |
nodeName, |
|
|
bool |
side, |
|
|
unsigned short |
subsystem |
|
) |
| |
|
protected |
◆ initializeLUT() [1/2]
bool LVL1MUCTPIPHASE1::L1TopoLUT::initializeLUT |
( |
const std::string & |
barrelFileName, |
|
|
const std::string & |
ecfFileName, |
|
|
const std::string & |
side0LUTFileName, |
|
|
const std::string & |
side1LUTFileName |
|
) |
| |
◆ initializeLUT() [2/2]
bool LVL1MUCTPIPHASE1::L1TopoLUT::initializeLUT |
( |
const std::string & |
inFileName, |
|
|
const bool & |
isBarrel |
|
) |
| |
|
protected |
Definition at line 128 of file L1TopoLUT.cxx.
130 std::unordered_map<L1TopoLUTKey, std::map<float, unsigned short>, L1TopoLUTKeyHasher> sector_eta_indices, sector_phi_indices;
133 if (!
inFile)
return false;
137 unsigned short sectorID;
139 double eta_min, eta_max;
140 double phi_min, phi_max;
143 if (
inFile.eof()) {
break; }
166 unsigned short ieta = 0;
167 unsigned short iphi = 0;
176 iphi |= (sectorID & 0x3F) << 2;
180 iphi = (roi & 0x3) << 1;
181 iphi |= (sectorID & 0x1F) << 3;
189 unsigned short etaPhiSubWord = ((ieta&0xF) << 9) | ((sectorID&0x1F) << 3) | (iphi&0x7);
205 L1TopoCoordinates
value = {
eta,
phi, eta_min, eta_max, phi_min, phi_max, ieta, iphi};
209 m_errors.push_back(
"Duplicate key found in L1TopoLUT: "+
key.info());
◆ m_barrel_encoding0
std::map<unsigned short,std::map<unsigned short, std::pair<unsigned short, unsigned short> > > LVL1MUCTPIPHASE1::L1TopoLUT::m_barrel_encoding0 |
|
protected |
◆ m_barrel_encoding1
std::map<unsigned short,std::map<unsigned short, std::pair<unsigned short, unsigned short> > > LVL1MUCTPIPHASE1::L1TopoLUT::m_barrel_encoding1 |
|
protected |
◆ m_barrel_eta_lookup0
std::map<unsigned short,std::vector<float> > LVL1MUCTPIPHASE1::L1TopoLUT::m_barrel_eta_lookup0 |
|
protected |
◆ m_barrel_eta_lookup1
std::map<unsigned short,std::vector<float> > LVL1MUCTPIPHASE1::L1TopoLUT::m_barrel_eta_lookup1 |
|
protected |
◆ m_barrel_phi_lookup0
std::map<unsigned short,std::vector<float> > LVL1MUCTPIPHASE1::L1TopoLUT::m_barrel_phi_lookup0 |
|
protected |
◆ m_barrel_phi_lookup1
std::map<unsigned short,std::vector<float> > LVL1MUCTPIPHASE1::L1TopoLUT::m_barrel_phi_lookup1 |
|
protected |
◆ m_barrel_reverse_encoding0
std::map<unsigned short, unsigned short> LVL1MUCTPIPHASE1::L1TopoLUT::m_barrel_reverse_encoding0 |
|
protected |
◆ m_barrel_reverse_encoding1
std::map<unsigned short, unsigned short> LVL1MUCTPIPHASE1::L1TopoLUT::m_barrel_reverse_encoding1 |
|
protected |
◆ m_encoding
◆ m_endcap_eta_lookup0
std::map<unsigned short,std::vector<float> > LVL1MUCTPIPHASE1::L1TopoLUT::m_endcap_eta_lookup0 |
|
protected |
◆ m_endcap_eta_lookup1
std::map<unsigned short,std::vector<float> > LVL1MUCTPIPHASE1::L1TopoLUT::m_endcap_eta_lookup1 |
|
protected |
◆ m_endcap_phi_lookup0
std::map<unsigned short,std::vector<float> > LVL1MUCTPIPHASE1::L1TopoLUT::m_endcap_phi_lookup0 |
|
protected |
◆ m_endcap_phi_lookup1
std::map<unsigned short,std::vector<float> > LVL1MUCTPIPHASE1::L1TopoLUT::m_endcap_phi_lookup1 |
|
protected |
◆ m_errors
std::vector<std::string> LVL1MUCTPIPHASE1::L1TopoLUT::m_errors |
|
protected |
◆ m_forward_eta_lookup0
std::map<unsigned short,std::vector<float> > LVL1MUCTPIPHASE1::L1TopoLUT::m_forward_eta_lookup0 |
|
protected |
◆ m_forward_eta_lookup1
std::map<unsigned short,std::vector<float> > LVL1MUCTPIPHASE1::L1TopoLUT::m_forward_eta_lookup1 |
|
protected |
◆ m_forward_phi_lookup0
std::map<unsigned short,std::vector<float> > LVL1MUCTPIPHASE1::L1TopoLUT::m_forward_phi_lookup0 |
|
protected |
◆ m_forward_phi_lookup1
std::map<unsigned short,std::vector<float> > LVL1MUCTPIPHASE1::L1TopoLUT::m_forward_phi_lookup1 |
|
protected |
The documentation for this class was generated from the following files:
std::map< unsigned short, std::vector< float > > m_forward_eta_lookup1
std::map< unsigned short, std::vector< float > > m_endcap_phi_lookup1
std::map< unsigned short, unsigned short > m_barrel_reverse_encoding0
void fillFromPtree(const boost::property_tree::ptree &node, std::map< unsigned short, std::vector< float >> &theLut) const
std::unordered_map< L1TopoLUTKey, L1TopoCoordinates, L1TopoLUTKeyHasher > m_encoding
std::map< unsigned short, std::map< unsigned short, std::pair< unsigned short, unsigned short > > > m_barrel_encoding1
std::vector< std::string > m_errors
float getCompactedValue_eta(unsigned short subsystem, unsigned short side, unsigned short sectorID, unsigned short roi)
std::map< unsigned short, std::vector< float > > m_barrel_phi_lookup1
std::map< unsigned short, std::vector< float > > m_endcap_phi_lookup0
std::map< unsigned short, std::vector< float > > m_barrel_eta_lookup0
std::map< unsigned short, std::vector< float > > m_barrel_eta_lookup1
std::map< unsigned short, std::vector< float > > m_barrel_phi_lookup0
bool initializeCompactedLUTs(const std::string &side0LUTFileName, const std::string &side1LUTFileName)
std::map< unsigned short, std::map< unsigned short, std::pair< unsigned short, unsigned short > > > m_barrel_encoding0
boost::property_tree::ptree ptree
std::map< unsigned short, std::vector< float > > m_endcap_eta_lookup1
std::map< unsigned short, unsigned short > m_barrel_reverse_encoding1
float getCompactedValue_phi(unsigned short subsystem, unsigned short side, unsigned short sectorID, unsigned short roi)
bool initializeLUT(const std::string &barrelFileName, const std::string &ecfFileName, const std::string &side0LUTFileName, const std::string &side1LUTFileName)
std::map< unsigned short, std::vector< float > > m_forward_phi_lookup0
std::map< unsigned short, std::vector< float > > m_forward_phi_lookup1
std::map< unsigned short, std::vector< float > > m_endcap_eta_lookup0
std::map< unsigned short, std::vector< float > > m_forward_eta_lookup0