5#ifndef HLTSEEDING_HLTSEEDINGROITOOLDEFS_H
6#define HLTSEEDING_HLTSEEDINGROITOOLDEFS_H
21template<
typename T_RoI,
typename T_RoIContainer, const
char* N_RoIContainer, const
char* N_ThresholdType>
23template<
typename T_RoI,
typename T_RoIContainer, auto F_RoIWordGetter, const
char* N_RoIContainer, const
char* N_ThresholdType>
144 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>
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>>;
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*>) {
a traits class that associates a CLID to a type T It also detects whether T inherits from Gaudi DataO...
float thrValue() const
The highest threshold value (in MeV) passed by the muon candidate.
uint32_t roiWord() const
The "raw" RoI word describing the muon candidate.
uint32_t word0() const
The "raw" 32-bit words describing the e/gamma candidate.
unsigned int etTOB() const
Cluster ET (TOB ET scale, 100 MeV/count)
uint32_t word0() const
The "raw" 32-bit words describing the e/gamma candidate.
unsigned int etTOB() const
Cluster ET (TOB ET scale, 100 MeV/count)
int16_t gFexTobEt() const
TOB ET (decoded from TOB, stored for convenience)
uint32_t word() const
The "raw" 32-bit word describing the object candidate.
uint32_t tobWord() const
The "raw" 32-bit word describing the object candidate, 27 bit-word used at hardware level.
uint16_t tobEt() const
Decoded from Tob (for convenience)
uint32_t tobWord() const
The "raw" 32-bit word describing the object candidate.
uint32_t tobWord() const
The "raw" 32-bit word describing the object candidate.
uint32_t tobWord() const
The "raw" 32-bit word describing the object candidate.
constexpr unsigned int roiTobEt(const AnyRoIPointer &roi)
constexpr unsigned int roiWord(const AnyRoIPointer &roi)
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...
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.
constexpr float roiPhi(const AnyRoIPointer &roi)
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.
constexpr float roiEta(const AnyRoIPointer &roi)
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
eFexEMRoIContainer_v1 eFexEMRoIContainer
jFexFwdElRoI_v1 jFexFwdElRoI
Define the latest version of the jFexFwdElJetRoI class.
eFexEMRoI_v1 eFexEMRoI
Define the latest version of the eFexEMRoI class.
gFexJetRoI_v1 gFexJetRoI
Define the latest version of the gFexJetRoI class.
MuonRoIContainer_v1 MuonRoIContainer
TrigComposite_v1 TrigComposite
Declare the latest version of the class.
jFexLRJetRoIContainer_v1 jFexLRJetRoIContainer
jFexFwdElRoIContainer_v1 jFexFwdElRoIContainer
jFexTauRoIContainer_v1 jFexTauRoIContainer
gFexJetRoIContainer_v1 gFexJetRoIContainer
jFexLRJetRoI_v1 jFexLRJetRoI
Define the latest version of the jFexLRJetRoI class.
eFexTauRoIContainer_v1 eFexTauRoIContainer
jFexTauRoI_v1 jFexTauRoI
Define the latest version of the jFexSRJetRoI class.
eFexTauRoI_v1 eFexTauRoI
Define the latest version of the eFexTauRoI class.
jFexSRJetRoI_v1 jFexSRJetRoI
Define the latest version of the jFexSRJetRoI class.
jFexSRJetRoIContainer_v1 jFexSRJetRoIContainer