ATLAS Offline Software
Loading...
Searching...
No Matches
RoIBResult.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4
5
6#ifndef TRIGT1RESULT_ROIBRESULT_H
7#define TRIGT1RESULT_ROIBRESULT_H
8
9// STL include(s):
10#include <vector>
11
12// Local include(s):
18
19// Forward declaration(s):
20class MsgStream;
21
22namespace ROIB {
23
46
47 class RoIBResult {
48
49 public:
51 RoIBResult() = default;
52
55 CTPResult&&,
56 std::vector< JetEnergyResult >&&,
57 std::vector< EMTauResult >&& );
60 std::vector< EMTauResult >&&,
61 std::vector< JetEnergyResult >&& );
63 RoIBResult( CTPResult&&, std::vector< EMTauResult >&& );
66
68 const MuCTPIResult& muCTPIResult() const;
70 const CTPResult& cTPResult() const;
72 const std::vector< JetEnergyResult >& jetEnergyResult() const;
74 const std::vector< EMTauResult >& eMTauResult() const;
76 const std::vector< L1TopoResult >& l1TopoResult() const;
78 void l1TopoResult(std::vector< L1TopoResult >&&) noexcept;
79
81
82 const std::string dump() const;
83
85 const std::string print(const bool longFormat = false) const;
86
88 void dumpData() const;
90 void dumpData(MsgStream&) const;
91
92 /* definitions used for overflow checking */
95 MU_DOFL=64, MU_SUP1=128, MU_SUP2=256, MU_SOFL=512};
96
97 constexpr static unsigned int DOFL_bitMask = 16;
98 constexpr static unsigned int SUP1_bitMask = 1 << 16;
99 constexpr static unsigned int SUP2_bitMask = 1 << 17;
100
101 constexpr static unsigned int emOverflow = EM1_DOFL | EM2_DOFL | EM3_DOFL | EM4_DOFL;
102 constexpr static unsigned int jOverflow = J1_DOFL | J2_DOFL;
103 constexpr static unsigned int anyOverflow = emOverflow | jOverflow | MU_DOFL;
104 constexpr static unsigned int emLink[4] = {EM1_DOFL, EM2_DOFL, EM3_DOFL, EM4_DOFL};
105 constexpr static unsigned int jLink[2] = {J1_DOFL, J2_DOFL};
106
107
108 /* true if overlfow on any link (note that the SUP1, SUP2 and SOFL bits are not checked) */
109 bool CheckOverflow() const { return (GetOverflowMask(true,true,true) & anyOverflow) != 0;}
110
111 /* true if overlfow on any of the EMTau links */
112 bool CheckEMOverflow() const { return (GetOverflowMask(false,true,false) & emOverflow) != 0;}
113
114 /* true if overlfow on either of the JetEnergy links */
115 bool CheckJOverflow() const { return (GetOverflowMask(false,false,true) & jOverflow) != 0;}
116
117 /* true if overlfow on either of the MuCTPI link */
118 bool CheckMuOverflow() const { return (GetOverflowMask(true,false,false) & MU_DOFL) != 0;}
119
120 /* true if a low threshhold muon from any sector was suppressed */
121 bool CheckMu1Suppression() const {return (GetOverflowMask(true,false,false) & MU_SUP1) != 0;}
122
123 /* true if a high threshhold muon from any sector was suppressed */
124 bool CheckMu2Suppression() const {return (GetOverflowMask(true,false,false) & MU_SUP2) != 0;}
125
126 /* true for sorter overflow (> 10 candidates on same threshold) */
127 bool CheckMuSorterOverflow() const {return (GetOverflowMask(true,false,false) & MU_DOFL) != 0;}
128
129 /* Check for a specific EMTau link -- there are 4 EMTau links, numbered from 0 through 3 */
130 bool CheckEMLinkOverflow(unsigned int link) const
131 { if(link > 3) return false; return (GetOverflowMask(false,true,false) & emLink[link]) != 0;}
132
133 /* Check for a specific JetEnergy link -- there are two JetEnergy links (0, 1) */
134 bool CheckJLinkOverflow(unsigned int link) const
135 { if(link > 1) return false; return (GetOverflowMask(false,false,true) & jLink[link]) != 0;}
136
137 private:
138 /* The members - namely the muctpi, ctp, jetenegry
139 and egamma parts of the L1 RDO */
142 std::vector< JetEnergyResult > m_RoIBResultJetEnergy;
143 std::vector< EMTauResult > m_RoIBResultEMTau;
144 std::vector< L1TopoResult> m_RoIBResultL1Topo;
145
146 unsigned int GetOverflowMask(bool setMu, bool setEM, bool setJE) const;
147
148 }; // class RoIBResult
149
150} // namespace ROIB
151
152
153/* The RoIBResult class_def part, defining a CLID of 6000 */
155CLASS_DEF( ROIB::RoIBResult , 6000 , 0 )
156
157#endif // TRIGT1RESULT_ROIBRESULT_H
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Class holding the LVL1 CTP result used by the RoIBuilder.
Class holding the RoIs from the MuCTPI collected by the RoIB.
Class holding the LVL1 RoIB result build by the RoIBuilder.
Definition RoIBResult.h:47
std::vector< JetEnergyResult > m_RoIBResultJetEnergy
result from calo system: JetEnergy
Definition RoIBResult.h:142
static constexpr unsigned int emOverflow
Definition RoIBResult.h:101
static constexpr unsigned int SUP2_bitMask
Definition RoIBResult.h:99
MuCTPIResult m_RoIBResultMuCTPI
result from muon system
Definition RoIBResult.h:140
std::vector< L1TopoResult > m_RoIBResultL1Topo
result from L1Topo
Definition RoIBResult.h:144
bool CheckMuOverflow() const
Definition RoIBResult.h:118
const std::vector< L1TopoResult > & l1TopoResult() const
Gets the L1Topo part of the L1 RDO.
void dumpData() const
print object content to default message stream
const std::vector< JetEnergyResult > & jetEnergyResult() const
Gets the jet/energy part of the L1 RDO.
static constexpr unsigned int DOFL_bitMask
Definition RoIBResult.h:97
static constexpr unsigned int anyOverflow
Definition RoIBResult.h:103
static constexpr unsigned int jOverflow
Definition RoIBResult.h:102
const std::string print(const bool longFormat=false) const
print object content in a human readable format to string
static constexpr unsigned int emLink[4]
Definition RoIBResult.h:104
CTPResult m_RoIBResultCTP
result from CTP
Definition RoIBResult.h:141
const CTPResult & cTPResult() const
Gets the CTP part of the L1 RDO.
bool CheckOverflow() const
Definition RoIBResult.h:109
bool CheckMuSorterOverflow() const
Definition RoIBResult.h:127
bool CheckJLinkOverflow(unsigned int link) const
Definition RoIBResult.h:134
bool CheckJOverflow() const
Definition RoIBResult.h:115
unsigned int GetOverflowMask(bool setMu, bool setEM, bool setJE) const
bool CheckEMOverflow() const
Definition RoIBResult.h:112
RoIBResult()=default
default constructor: empty object
static constexpr unsigned int jLink[2]
Definition RoIBResult.h:105
static constexpr unsigned int SUP1_bitMask
Definition RoIBResult.h:98
const std::vector< EMTauResult > & eMTauResult() const
Gets the egamma part of the L1 RDO.
bool CheckMu2Suppression() const
Definition RoIBResult.h:124
bool CheckEMLinkOverflow(unsigned int link) const
Definition RoIBResult.h:130
std::vector< EMTauResult > m_RoIBResultEMTau
result from calo system: EmTauResult
Definition RoIBResult.h:143
bool CheckMu1Suppression() const
Definition RoIBResult.h:121
const MuCTPIResult & muCTPIResult() const
Gets the MuCTPI part of the L1 RDO.
Namespace of the LVL1 RoIB simulation.
-event-from-file
STL namespace.