ATLAS Offline Software
Loading...
Searching...
No Matches
Lvl1ItemsAndRoIs.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5/**********************************************************************************
6 * @class : ConfigThreshold, ConfigJetEThreshold,
7 * HLTRoI, MuonRoI, EMTauRoI, JetEnergyRoI
8 *
9 * @brief LVL1 RoI and Item data classes which are filled by the Lvl1ResultAccessTool.
10 *
11 * @author Nicolas Berger <Nicolas.Berger@cern.ch> - CERN
12 * @author Till Eifert <Till.Eifert@cern.ch>
13 **********************************************************************************/
14
15#ifndef TRIGDECISIONMAKER_LVL1ITEMSANDROIS_H
16#define TRIGDECISIONMAKER_LVL1ITEMSANDROIS_H
17
21
22#include <vector>
23#include <string>
24
25
26namespace HLT {
27
29
34 ConfigThreshold(const std::string& n = "", unsigned int h=0, bool a = false, uint32_t m = 0)
35 : name(n), hashId(h), activeHLT(a), mask(m) { }
36 std::string name;
37 unsigned int hashId;
38 bool activeHLT;
39 uint32_t mask;
40 };
41
46 ConfigJetEThreshold(const std::string& n = "", unsigned int h=0, bool a = false, uint32_t m = 0, JetRoIType t = Unknown)
47 : ConfigThreshold(n, h, a, m), type(t) { }
49 };
50
55 template<class R> class HLTRoI {
56 public :
58
59 const R& lvl1RoI() const { return m_lvl1RoI; }
60 const std::vector<const ConfigThreshold*>& thresholds() const { return m_thresholds; }
61 std::vector<const ConfigThreshold*>::const_iterator begin() const { return m_thresholds.begin(); }
62 std::vector<const ConfigThreshold*>::const_iterator end() const { return m_thresholds.end(); }
63 unsigned int size() const { return m_thresholds.size(); }
64 unsigned int thresholdMask() const { return m_thresholdMask; }
65
66 protected:
67 void addThreshold(const ConfigThreshold* t) { m_thresholds.push_back(t); }
68 void setThresholdMask(unsigned int mask) { m_thresholdMask = mask; } // Update threshold mask word
69
71 std::vector<const ConfigThreshold*> m_thresholds;
72 unsigned int m_thresholdMask;
73 };
74
75
79 class MuonRoI : public HLTRoI<ROIB::MuCTPIRoI> {
80 public :
83 }
84 friend class Lvl1ResultAccessTool;
85 };
86
90 class EMTauRoI : public HLTRoI<ROIB::EMTauRoI> {
91 public :
93 if ( m_lvl1RoI.roIType() == 0 ) m_thresholdMask = (m_lvl1RoI.roIWord() & 0xffff); // Valid for Run 1 RoIs
94 else m_thresholdMask = 0;
95 }
96 friend class Lvl1ResultAccessTool;
97 };
98
102 class JetEnergyRoI : public HLTRoI<ROIB::JetEnergyRoI> {
103 public :
106
107 if ( m_lvl1RoI.jetRoIVersion() == 1 ) m_thresholdMask = (m_lvl1RoI.roIWord() & 0xfff);
108 else m_thresholdMask = 0;
109
110 }
111
112 friend class Lvl1ResultAccessTool;
113
114 JetRoIType type() const { return m_type; }
115 uint32_t word0() const { return m_word0; }
116 uint32_t word1() const { return m_word1; }
117 uint32_t word2() const { return m_word2; }
118
119 private:
120
122 if ( m_type == Unknown ) {
123 m_type = type;
124 return true;
125 }
127 return true;
128 if ( m_type != type) return false;
129 return true;
130 }
131
132 bool setExtraWords(uint32_t word0, uint32_t word1, uint32_t word2) {
134 return true;
135 }
137 uint32_t m_word0;
138 uint32_t m_word1;
139 uint32_t m_word2;
140
141 };
142
143} // end namespace
144
145
146#endif
static Double_t a
Header file for AthHistogramAlgorithm.
friend class Lvl1ResultAccessTool
Lvl1ResultAccessTool is a friend to this class -> cann call addThreshold(..)
EMTauRoI(ROIB::EMTauRoI lvl1RoI)
constructor from EMTauRoI object
std::vector< const ConfigThreshold * > m_thresholds
vector holding all configured thresholds
unsigned int size() const
size() method - for thresholds
std::vector< constConfigThreshold * >::const_iterator end() const
end() method - for thresholds
const R & lvl1RoI() const
const reference getter for underlying LVL1 RoI object
void setThresholdMask(unsigned int mask)
unsigned int m_thresholdMask
void addThreshold(const ConfigThreshold *t)
add threshold to this RoI object
unsigned int thresholdMask() const
R m_lvl1RoI
underlying LVL1 RoI object
HLTRoI(R lvl1RoI)
constructor from templated LVL1 RoI object
std::vector< constConfigThreshold * >::const_iterator begin() const
begin() method - for thresholds
const std::vector< const ConfigThreshold * > & thresholds() const
const reference getter for configured thresholds
uint32_t m_word0
additional member: 0th word
JetEnergyRoI(ROIB::JetEnergyRoI lvl1RoI)
constructor from JetEnergyRoI object
uint32_t m_word1
additional member: extra RoI word 1
friend class Lvl1ResultAccessTool
Lvl1ResultAccessTool is a friend to this class -> cann call addThreshold(..)
bool setExtraWords(uint32_t word0, uint32_t word1, uint32_t word2)
uint32_t word2() const
extra getter: extra RoI word 2
JetRoIType m_type
additional member: JetRoI type, see JetRoIType enumeration
uint32_t word1() const
extra getter: extra RoI word 1
bool setType(JetRoIType type)
setter for JetRoI type
JetRoIType type() const
extra getter: JetRoI type, see JetRoIType enumeratio
uint32_t word0() const
extra getter: extra RoI word 1
uint32_t m_word2
additional member: extra RoI word 2
MuonRoI(ROIB::MuCTPIRoI lvl1RoI)
constructor from MuCTPIRoI object
friend class Lvl1ResultAccessTool
Lvl1ResultAccessTool is a friend to this class -> cann call addThreshold(..)
Class for storing the 32-bit muon RoI word.
Definition MuCTPIRoI.h:39
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
@ ForwardJetRoI
@ METSignificanceRoI
@ MissingOrTotalEtRoI
Namespace of the LVL1 RoIB simulation.
ConfigJetEThreshold(const std::string &n="", unsigned int h=0, bool a=false, uint32_t m=0, JetRoIType t=Unknown)
JetRoIType type
JetEnergy type, see JetRoIType enumeration.
Generic structure representing one LVL1 threshold which is used in all LVL1 RoIs.
ConfigThreshold(const std::string &n="", unsigned int h=0, bool a=false, uint32_t m=0)
uint32_t mask
bit position of this LVL1 threshold in the RoI word
bool activeHLT
is this LVL1 threshold used in HLT ?
std::string name
threshold name, e.g.
unsigned int hashId
hash number of name, to speed up internal usage