|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef HLTSEEDING_HLTSEEDINGROITOOLDEFS_H
6 #define HLTSEEDING_HLTSEEDINGROITOOLDEFS_H
21 template<
typename T_RoI,
typename T_RoIContainer, const
char* N_RoIContainer, const
char* N_ThresholdType>
23 template<
typename T_RoI,
typename T_RoIContainer, auto F_RoIWordGetter, const
char* N_RoIContainer, const
char* N_ThresholdType>
107 namespace gFexSRJet {
117 namespace gFexLRJet {
143 using AnyRoIPointer = std::variant<const eFexEM::T_RoI*, const eFexTau::T_RoI*, const jFexFwdEl::T_RoI*, const jFexTau::T_RoI*, const jFexSRJet::T_RoI*, const jFexLRJet::T_RoI*, const gFexSRJet::T_RoI*, const Muon::T_RoI*>;
146 using AnyRoIContainer = std::variant<eFexEM::T_RoIContainer, eFexTau::T_RoIContainer, jFexFwdEl::T_RoIContainer, jFexTau::T_RoIContainer, jFexSRJet::T_RoIContainer, jFexLRJet::T_RoIContainer, gFexSRJet::T_RoIContainer, Muon::T_RoIContainer>;
153 template <std::
size_t I = 0>
155 if constexpr (
I < std::variant_size_v<AnyRoIPointer>) {
156 using T_RoIContainer = std::variant_alternative_t<I,AnyRoIContainer>;
157 using T_RoI_constptr = std::variant_alternative_t<I,AnyRoIPointer>;
158 using T_RoI = std::remove_const_t<std::remove_pointer_t<T_RoI_constptr>>;
162 return roiFromLink<I+1>(tc,linkName);
168 return std::visit([](
auto arg) ->
float {
return arg->phi();}, roi);
172 return std::visit([](
auto arg) ->
float {
return arg->eta();}, roi);
176 return std::visit([](
auto arg) ->
float {
177 using T = std::decay_t<decltype(
arg)>;
178 if constexpr (std::is_same_v<T, const eFexEM::T_RoI*>) {
181 if constexpr (std::is_same_v<T, const eFexTau::T_RoI*>) {
184 if constexpr (std::is_same_v<T, const jFexFwdEl::T_RoI*>) {
187 if constexpr (std::is_same_v<T, const jFexTau::T_RoI*>) {
190 if constexpr (std::is_same_v<T, const jFexSRJet::T_RoI*>) {
193 if constexpr (std::is_same_v<T, const jFexLRJet::T_RoI*>) {
196 if constexpr (std::is_same_v<T, const gFexSRJet::T_RoI*>) {
199 if constexpr (std::is_same_v<T, const Muon::T_RoI*>) {
207 return std::visit([](
auto arg) ->
float {
208 using T = std::decay_t<decltype(
arg)>;
209 if constexpr (std::is_same_v<T, const eFexEM::T_RoI*>) {
212 if constexpr (std::is_same_v<T, const eFexTau::T_RoI*>) {
215 if constexpr (std::is_same_v<T, const jFexFwdEl::T_RoI*>) {
218 if constexpr (std::is_same_v<T, const jFexTau::T_RoI*>) {
221 if constexpr (std::is_same_v<T, const jFexSRJet::T_RoI*>) {
224 if constexpr (std::is_same_v<T, const jFexLRJet::T_RoI*>) {
227 if constexpr (std::is_same_v<T, const gFexSRJet::T_RoI*>) {
230 if constexpr (std::is_same_v<T, const Muon::T_RoI*>) {
240 #endif //> !HLTSEEDING_HLTSEEDINGROITOOLDEFS_H
constexpr unsigned int roiWord(const AnyRoIPointer &roi)
Class describing properties of a LVL1 jFEX global Trigger Object (TOB) in the xAOD format.
Class describing properties of a LVL1 jFEX global Trigger Object (TOB) in the xAOD format.
jFexTauRoIContainer_v1 jFexTauRoIContainer
std::variant< const eFexEM::T_RoI *, const eFexTau::T_RoI *, const jFexFwdEl::T_RoI *, const jFexTau::T_RoI *, const jFexSRJet::T_RoI *, const jFexLRJet::T_RoI *, const gFexSRJet::T_RoI *, const Muon::T_RoI * > AnyRoIPointer
std::variant of const ptr to RoI types. Note identical types are only entered once in the template (e...
constexpr float roiPhi(const AnyRoIPointer &roi)
constexpr float roiEta(const AnyRoIPointer &roi)
jFexLRJetRoI_v1 jFexLRJetRoI
Define the latest version of the jFexLRJetRoI class
jFexSRJetRoIContainer_v1 jFexSRJetRoIContainer
jFexLRJetRoIContainer_v1 jFexLRJetRoIContainer
bool hasObjectLink(const std::string &name, const CLID clid=CLID_NULL) const
Check if a link to an object with a given name and type exists. CLID_NULL to not check type.
uint32_t word0() const
The "raw" 32-bit words describing the e/gamma candidate.
jFexFwdElRoIContainer_v1 jFexFwdElRoIContainer
const OBJECT * object(const std::string &name) const
Get a bare pointer with the requested name.
gFexJetRoIContainer_v1 gFexJetRoIContainer
eFexTauRoIContainer_v1 eFexTauRoIContainer
float thrValue() const
The highest threshold value (in MeV) passed by the muon candidate.
uint32_t word() const
The "raw" 32-bit word describing the object candidate.
int16_t gFexTobEt() const
TOB ET (decoded from TOB, stored for convenience)
uint32_t tobWord() const
The "raw" 32-bit word describing the object candidate.
Class describing a LVL1 eFEX EM region of interest.
This class provides conversion from CSC RDO data to CSC Digits.
eFexTauRoI_v1 eFexTauRoI
Define the latest version of the eFexTauRoI class.
eFexEMRoI_v1 eFexEMRoI
Define the latest version of the eFexEMRoI class.
uint32_t word0() const
The "raw" 32-bit words describing the e/gamma candidate.
Class describing properties of a LVL1 jFEX global Trigger Object (TOB) in the xAOD format.
uint32_t tobWord() const
The "raw" 32-bit word describing the object candidate.
a traits class that associates a CLID to a type T It also detects whether T inherits from Gaudi DataO...
Class describing a LVL1 eFEX tau region of interest.
Class describing properties of a LVL1 gFEX jet Trigger Object (TOB) in the xAOD format.
Default, invalid implementation of ClassID_traits.
Class describing a LVL1 muon region of interest.
uint32_t tobWord() const
The "raw" 32-bit word describing the object candidate.
jFexSRJetRoI_v1 jFexSRJetRoI
Define the latest version of the jFexSRJetRoI class
unsigned int etTOB() const
Cluster ET (TOB ET scale, 100 MeV/count)
Class used to describe composite objects in the HLT.
std::optional< AnyRoIPointer > roiFromLink(const xAOD::TrigComposite &tc, const std::string &linkName)
Recursively try each type from AnyRoIPointer variant to retrieve an object from a TrigComposite link.
std::variant< eFexEM::T_RoIContainer, eFexTau::T_RoIContainer, jFexFwdEl::T_RoIContainer, jFexTau::T_RoIContainer, jFexSRJet::T_RoIContainer, jFexLRJet::T_RoIContainer, gFexSRJet::T_RoIContainer, Muon::T_RoIContainer > AnyRoIContainer
std::variant of RoI containers. Has to correspond directly to AnyRoIPointer types.
uint16_t tobEt() const
Decoded from Tob (for convenience)
gFexJetRoI_v1 gFexJetRoI
Define the latest version of the gFexJetRoI class.
jFexFwdElRoI_v1 jFexFwdElRoI
Define the latest version of the jFexFwdElJetRoI class
unsigned int etTOB() const
Cluster ET (TOB ET scale, 100 MeV/count)
jFexTauRoI_v1 jFexTauRoI
Define the latest version of the jFexSRJetRoI class
constexpr unsigned int roiTobEt(const AnyRoIPointer &roi)
uint32_t tobWord() const
The "raw" 32-bit word describing the object candidate, 27 bit-word used at hardware level.
Class describing properties of a LVL1 jFEX global Trigger Object (TOB) in the xAOD format.
MuonRoIContainer_v1 MuonRoIContainer
uint32_t roiWord() const
The "raw" RoI word describing the muon candidate.
eFexEMRoIContainer_v1 eFexEMRoIContainer