ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1::RecEnergyRoI Class Reference

This class defines the reconstructed EnergySum ROI. More...

#include <RecEnergyRoI.h>

Collaboration diagram for LVL1::RecEnergyRoI:

Public Member Functions

 RecEnergyRoI ()
 RecEnergyRoI (unsigned int RoIWord0, unsigned int RoIWord1, unsigned int RoIWord2, const std::vector< TrigConf::TriggerThreshold * > *caloThresholds)
 RecEnergyRoI (unsigned int RoIWord0, unsigned int RoIWord1, unsigned int RoIWord2, const TrigConf::L1Menu *const l1menu)
 constructor using Run 3 configuration
 ~RecEnergyRoI ()
 RecEnergyRoI (const RecEnergyRoI &obj)
RecEnergyRoIoperator= (const RecEnergyRoI &obj)
void construct (unsigned int RoIWord0, unsigned int RoIWord1, unsigned int RoIWord2, const std::vector< TrigConf::TriggerThreshold * > *caloThresholds)
 The "construct" call unpacks the RoIWord and copies information about the passed thresholds from the vector of TriggerThresholds into maps for later retrieval.
void construct (const TrigConf::L1Menu *const l1menu)
unsigned int roiWord0 () const
 returns roi word 0.
unsigned int roiWord1 () const
 returns roi word 1.
unsigned int roiWord2 () const
 returns roi word 2.
bool passedEtMissThreshold (unsigned int thresholdNumber) const
 returns TRUE if threshold number threshold_number has been passed by this ROI.
bool passedSumEtThreshold (unsigned int thresholdNumber) const
 returns TRUE if threshold number threshold_number has been passed by this ROI.
bool passedMEtSigThreshold (unsigned int thresholdNumber) const
 returns TRUE if threshold number threshold_number has been passed by this ROI.
std::vector< unsigned int > etMissThresholdsPassed () const
 returns a vector of thresholds passed.
std::vector< unsigned int > sumEtThresholdsPassed () const
 returns a vector of thresholds passed.
std::vector< unsigned int > mEtSigThresholdsPassed () const
 returns a vector of thresholds passed.
unsigned int etMissTriggerThreshold (const unsigned int thresh) const
 returns the value of the trigger threshold for the threshold passed.
unsigned int sumEtTriggerThreshold (const unsigned int thresh) const
 returns the value of the trigger threshold for the threshold passed.
unsigned int mEtSigTriggerThreshold (const unsigned int thresh) const
 returns the value of the trigger threshold for the threshold passed.
bool isValidEtMissThreshold (const unsigned int thresh) const
 returns true if thresh is a valid EtMiss threshold number
bool isValidSumEtThreshold (const unsigned int thresh) const
 returns true if thresh is a valid Sum Et threshold number
bool isValidMEtSigThreshold (const unsigned int thresh) const
 returns true if thresh is a valid Sum Et threshold number
int energyX () const
 returns the (signed) Ex energy projection.
bool overflowX () const
 returns the Ex overflow bit
int energyY () const
 returns the (signed) Ey energy projection.
bool overflowY () const
 returns the Ey overflow bit
int energyT () const
 returns the total ET.
bool overflowT () const
 returns the ETsum overflow bit

Private Attributes

unsigned long int m_roiWord0 { 0 }
 this is the actual format of the data sent from the LVL1 hardware.
unsigned long int m_roiWord1 { 0 }
 this is the actual format of the data sent from the LVL1 hardware.
unsigned long int m_roiWord2 { 0 }
 this is the actual format of the data sent from the LVL1 hardware.
std::map< int, unsigned int > m_etMissThresholdValue
std::map< int, unsigned int > m_sumEtThresholdValue
std::map< int, unsigned int > m_mEtSigThresholdValue

Detailed Description

This class defines the reconstructed EnergySum ROI.

It is generated from the Slink output of TrigT1Calo

Author
Edward Moyse

Definition at line 37 of file RecEnergyRoI.h.

Constructor & Destructor Documentation

◆ RecEnergyRoI() [1/4]

LVL1::RecEnergyRoI::RecEnergyRoI ( )
inline

Definition at line 41 of file RecEnergyRoI.h.

41{}

◆ RecEnergyRoI() [2/4]

LVL1::RecEnergyRoI::RecEnergyRoI ( unsigned int RoIWord0,
unsigned int RoIWord1,
unsigned int RoIWord2,
const std::vector< TrigConf::TriggerThreshold * > * caloThresholds )

Definition at line 26 of file RecEnergyRoI.cxx.

28{
29
30 this->construct(RoIWord0, RoIWord1, RoIWord2, caloThresholds);
31}
void construct(unsigned int RoIWord0, unsigned int RoIWord1, unsigned int RoIWord2, const std::vector< TrigConf::TriggerThreshold * > *caloThresholds)
The "construct" call unpacks the RoIWord and copies information about the passed thresholds from the ...

◆ RecEnergyRoI() [3/4]

LVL1::RecEnergyRoI::RecEnergyRoI ( unsigned int RoIWord0,
unsigned int RoIWord1,
unsigned int RoIWord2,
const TrigConf::L1Menu *const l1menu )

constructor using Run 3 configuration

Definition at line 33 of file RecEnergyRoI.cxx.

35 : m_roiWord0(RoIWord0),
36 m_roiWord1(RoIWord1),
37 m_roiWord2(RoIWord2)
38{
39 construct(l1menu);
40}
unsigned long int m_roiWord2
this is the actual format of the data sent from the LVL1 hardware.
unsigned long int m_roiWord0
this is the actual format of the data sent from the LVL1 hardware.
unsigned long int m_roiWord1
this is the actual format of the data sent from the LVL1 hardware.

◆ ~RecEnergyRoI()

LVL1::RecEnergyRoI::~RecEnergyRoI ( )

Definition at line 68 of file RecEnergyRoI.cxx.

68{}

◆ RecEnergyRoI() [4/4]

LVL1::RecEnergyRoI::RecEnergyRoI ( const RecEnergyRoI & obj)

Definition at line 43 of file RecEnergyRoI.cxx.

44 : m_roiWord0(obj.m_roiWord0),
45 m_roiWord1(obj.m_roiWord1),
46 m_roiWord2(obj.m_roiWord2),
47 m_etMissThresholdValue(obj.m_etMissThresholdValue),
48 m_sumEtThresholdValue(obj.m_sumEtThresholdValue),
49 m_mEtSigThresholdValue(obj.m_mEtSigThresholdValue)
50{
51}
std::map< int, unsigned int > m_etMissThresholdValue
std::map< int, unsigned int > m_mEtSigThresholdValue
std::map< int, unsigned int > m_sumEtThresholdValue

Member Function Documentation

◆ construct() [1/2]

void LVL1::RecEnergyRoI::construct ( const TrigConf::L1Menu *const l1menu)

Definition at line 132 of file RecEnergyRoI.cxx.

133{
134 // Find which thresholds this RoI passed and copy the values into the maps
135 if ( ! l1menu->thresholds("XE").empty() ) {
136 for (unsigned int xeMapping : etMissThresholdsPassed())
137 {
138 const TrigConf::L1Threshold &thr = l1menu->threshold("XE", xeMapping - 1);
139 auto &caloThr = dynamic_cast<const TrigConf::L1Threshold_Calo &>(thr);
140 m_etMissThresholdValue[xeMapping] = caloThr.thrValueCounts();
141 }
142 }
143 if ( ! l1menu->thresholds("TE").empty() ) {
144 for (unsigned int teMapping : sumEtThresholdsPassed())
145 {
146 const TrigConf::L1Threshold &thr = l1menu->threshold("TE", teMapping - 1);
147 auto &caloThr = dynamic_cast<const TrigConf::L1Threshold_Calo &>(thr);
148 m_sumEtThresholdValue[teMapping] = caloThr.thrValueCounts();
149 }
150 }
151 if ( ! l1menu->thresholds("XS").empty() ) {
152 for (unsigned int xsMapping : mEtSigThresholdsPassed())
153 {
154 const TrigConf::L1Threshold &thr = l1menu->threshold("XS", xsMapping - 1);
155 auto &caloThr = dynamic_cast<const TrigConf::L1Threshold_Calo &>(thr);
156 m_mEtSigThresholdValue[xsMapping] = caloThr.thrValueCounts();
157 }
158 }
159}
std::vector< unsigned int > etMissThresholdsPassed() const
returns a vector of thresholds passed.
std::vector< unsigned int > sumEtThresholdsPassed() const
returns a vector of thresholds passed.
std::vector< unsigned int > mEtSigThresholdsPassed() const
returns a vector of thresholds passed.

◆ construct() [2/2]

void LVL1::RecEnergyRoI::construct ( unsigned int RoIWord0,
unsigned int RoIWord1,
unsigned int RoIWord2,
const std::vector< TrigConf::TriggerThreshold * > * caloThresholds )

The "construct" call unpacks the RoIWord and copies information about the passed thresholds from the vector of TriggerThresholds into maps for later retrieval.

One warning here: the methods of the RecRoI classes assume threshold numbering starts at 1, rather than 0 in the calorimeter trigger simulation and Lvl1ConfigSvc. There will be some tweaks in this code to make this work.

Definition at line 76 of file RecEnergyRoI.cxx.

78{
79 m_roiWord0 = RoIWord0;
80 m_roiWord1 = RoIWord1;
81 m_roiWord2 = RoIWord2;
82
83 // Copy threshold values into maps for matching to list of thresholds passed
84 std::map< int, TriggerThreshold* > etMissMap;
85 std::map< int, TriggerThreshold* > sumEtMap;
86 std::map< int, TriggerThreshold* > mEtSigMap;
87 for( std::vector< TriggerThreshold* >::const_iterator it = caloThresholds->begin();
88 it != caloThresholds->end(); ++it ) {
89 if( ( *it )->type() == L1DataDef::typeAsString(L1DataDef::XE) ) {
90 int num = ( *it )->thresholdNumber();
91 etMissMap.insert( std::map< int, TriggerThreshold* >::value_type( num, *it ) );
92 }
93 else if( ( *it )->type() == L1DataDef::typeAsString(L1DataDef::TE) ) {
94 int num = ( *it )->thresholdNumber();
95 sumEtMap.insert( std::map< int, TriggerThreshold* >::value_type( num, *it ) );
96 }
97 else if( ( *it )->type() == L1DataDef::typeAsString(L1DataDef::XS) ) {
98 int num = ( *it )->thresholdNumber();
99 mEtSigMap.insert( std::map< int, TriggerThreshold* >::value_type( num, *it ) );
100 }
101 }
102
103 // Find which thresholds this RoI passed and copy the values into the maps
104 for (unsigned int xeMapping : etMissThresholdsPassed())
105 {
106 std::map<int, TriggerThreshold *>::const_iterator thr = etMissMap.find(xeMapping - 1);
107 if (thr != etMissMap.end()) {
108 TriggerThresholdValue* ttv = thr->second->triggerThresholdValue(0,0);
109 m_etMissThresholdValue.insert(std::map<int, unsigned int>::value_type(xeMapping, ttv->thresholdValueCount()));
110 }
111 }
112
113 for (unsigned int teMapping : sumEtThresholdsPassed())
114 {
115 std::map<int, TriggerThreshold *>::const_iterator thr = sumEtMap.find(teMapping - 1);
116 if (thr != sumEtMap.end()) {
117 TriggerThresholdValue* ttv = thr->second->triggerThresholdValue(0,0);
118 m_sumEtThresholdValue.insert(std::map<int, unsigned int>::value_type(teMapping, ttv->thresholdValueCount()));
119 }
120 }
121
122 for (unsigned int xsMapping : mEtSigThresholdsPassed())
123 {
124 std::map<int, TriggerThreshold *>::const_iterator thr = mEtSigMap.find(xsMapping - 1);
125 if (thr != mEtSigMap.end()) {
126 TriggerThresholdValue* ttv = thr->second->triggerThresholdValue(0,0);
127 m_mEtSigThresholdValue.insert(std::map<int, unsigned int>::value_type(xsMapping, ttv->thresholdValueCount()));
128 }
129 }
130}
static std::string & typeAsString(TriggerType tt)
Definition L1DataDef.h:53

◆ energyT()

int LVL1::RecEnergyRoI::energyT ( ) const

returns the total ET.

returns the (signed) Ex energy projection.

If the RoIWord looks invalid, then zero will be returned.

Definition at line 309 of file RecEnergyRoI.cxx.

310{
311 JEPRoIDecoder get;
312 return get.energyT(m_roiWord2);
313}
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:130

◆ energyX()

int LVL1::RecEnergyRoI::energyX ( ) const

returns the (signed) Ex energy projection.

If the RoIWord looks invalid, then zero will be returned.

Definition at line 291 of file RecEnergyRoI.cxx.

292{
293
294 JEPRoIDecoder get;
295 return get.energyX(m_roiWord0);
296}

◆ energyY()

int LVL1::RecEnergyRoI::energyY ( ) const

returns the (signed) Ey energy projection.

returns the (signed) Ex energy projection.

If the RoIWord looks invalid, then zero will be returned.

Definition at line 300 of file RecEnergyRoI.cxx.

301{
302
303 JEPRoIDecoder get;
304 return get.energyY(m_roiWord1);
305}

◆ etMissThresholdsPassed()

vector< unsigned int > LVL1::RecEnergyRoI::etMissThresholdsPassed ( ) const

returns a vector of thresholds passed.

Definition at line 213 of file RecEnergyRoI.cxx.

214{
215 JEPRoIDecoder get;
216 return get.etMissThresholdsPassed(m_roiWord2);
217}

◆ etMissTriggerThreshold()

unsigned int LVL1::RecEnergyRoI::etMissTriggerThreshold ( const unsigned int thresh) const

returns the value of the trigger threshold for the threshold passed.

The trigger threshold is also sometimes called the cluster threshold.

Definition at line 235 of file RecEnergyRoI.cxx.

236{
237 std::map< int, unsigned int >::const_iterator it = m_etMissThresholdValue.find( thresh );
238 if( it != m_etMissThresholdValue.end() ) {
239 return it->second;
240 }
242}
static const unsigned int Error

◆ isValidEtMissThreshold()

bool LVL1::RecEnergyRoI::isValidEtMissThreshold ( const unsigned int thresh) const

returns true if thresh is a valid EtMiss threshold number

returns true if thresh is a valid threshold number

Definition at line 269 of file RecEnergyRoI.cxx.

270{
271
273}
static const unsigned int numOfMissingEtThresholds

◆ isValidMEtSigThreshold()

bool LVL1::RecEnergyRoI::isValidMEtSigThreshold ( const unsigned int thresh) const

returns true if thresh is a valid Sum Et threshold number

returns true if thresh is a valid threshold number

Definition at line 283 of file RecEnergyRoI.cxx.

284{
285
286 return (thresh <= TrigT1CaloDefs::numOfMEtSigThresholds);
287}
static const unsigned int numOfMEtSigThresholds

◆ isValidSumEtThreshold()

bool LVL1::RecEnergyRoI::isValidSumEtThreshold ( const unsigned int thresh) const

returns true if thresh is a valid Sum Et threshold number

returns true if thresh is a valid threshold number

Definition at line 276 of file RecEnergyRoI.cxx.

277{
278
279 return (thresh <= TrigT1CaloDefs::numOfSumEtThresholds);
280}
static const unsigned int numOfSumEtThresholds

◆ mEtSigThresholdsPassed()

vector< unsigned int > LVL1::RecEnergyRoI::mEtSigThresholdsPassed ( ) const

returns a vector of thresholds passed.

Definition at line 227 of file RecEnergyRoI.cxx.

228{
229 JEPRoIDecoder get;
230 return get.mEtSigThresholdsPassed(m_roiWord0);
231}

◆ mEtSigTriggerThreshold()

unsigned int LVL1::RecEnergyRoI::mEtSigTriggerThreshold ( const unsigned int thresh) const

returns the value of the trigger threshold for the threshold passed.

The trigger threshold is also sometimes called the cluster threshold.

Definition at line 258 of file RecEnergyRoI.cxx.

259{
260
261 std::map< int, unsigned int >::const_iterator it = m_mEtSigThresholdValue.find( thresh );
262 if( it != m_mEtSigThresholdValue.end() ) {
263 return it->second;
264 }
266}

◆ operator=()

LVL1::RecEnergyRoI & LVL1::RecEnergyRoI::operator= ( const RecEnergyRoI & obj)

Definition at line 55 of file RecEnergyRoI.cxx.

56{
57 if(this != &rhs) {
58 m_roiWord0 = rhs.m_roiWord0;
59 m_roiWord1 = rhs.m_roiWord1;
60 m_roiWord2 = rhs.m_roiWord2;
61 m_etMissThresholdValue = rhs.m_etMissThresholdValue;
62 m_sumEtThresholdValue = rhs.m_sumEtThresholdValue;
63 m_mEtSigThresholdValue = rhs.m_mEtSigThresholdValue;
64 }
65 return *this;
66}

◆ overflowT()

bool LVL1::RecEnergyRoI::overflowT ( ) const

returns the ETsum overflow bit

Definition at line 330 of file RecEnergyRoI.cxx.

331{
332 JEPRoIDecoder get;
333 return get.energyOverflow(m_roiWord2);
334}

◆ overflowX()

bool LVL1::RecEnergyRoI::overflowX ( ) const

returns the Ex overflow bit

Definition at line 316 of file RecEnergyRoI.cxx.

317{
318 JEPRoIDecoder get;
319 return get.energyOverflow(m_roiWord0);
320}

◆ overflowY()

bool LVL1::RecEnergyRoI::overflowY ( ) const

returns the Ey overflow bit

Definition at line 323 of file RecEnergyRoI.cxx.

324{
325 JEPRoIDecoder get;
326 return get.energyOverflow(m_roiWord1);
327}

◆ passedEtMissThreshold()

bool LVL1::RecEnergyRoI::passedEtMissThreshold ( unsigned int thresholdNumber) const

returns TRUE if threshold number threshold_number has been passed by this ROI.

returns TRUE if threshold number threshold_number has been pass ed by this ROI.

Definition at line 178 of file RecEnergyRoI.cxx.

179{
180
181 if ( this->isValidEtMissThreshold( thresholdNumber ) ) {
182 JEPRoIDecoder get;
183 return ( get.etMissThresholdPassed( m_roiWord2, thresholdNumber ) );
184 }
185 return false;
186}
bool isValidEtMissThreshold(const unsigned int thresh) const
returns true if thresh is a valid EtMiss threshold number

◆ passedMEtSigThreshold()

bool LVL1::RecEnergyRoI::passedMEtSigThreshold ( unsigned int thresholdNumber) const

returns TRUE if threshold number threshold_number has been passed by this ROI.

returns TRUE if threshold number threshold_number has been pass ed by this ROI.

Definition at line 202 of file RecEnergyRoI.cxx.

203{
204
205 if ( this->isValidSumEtThreshold( thresholdNumber ) ) {
206 JEPRoIDecoder get;
207 return ( get.mEtSigThresholdPassed( m_roiWord0, thresholdNumber ) );
208 }
209 return false;
210}
bool isValidSumEtThreshold(const unsigned int thresh) const
returns true if thresh is a valid Sum Et threshold number

◆ passedSumEtThreshold()

bool LVL1::RecEnergyRoI::passedSumEtThreshold ( unsigned int thresholdNumber) const

returns TRUE if threshold number threshold_number has been passed by this ROI.

returns TRUE if threshold number threshold_number has been pass ed by this ROI.

Definition at line 190 of file RecEnergyRoI.cxx.

191{
192
193 if ( this->isValidSumEtThreshold( thresholdNumber ) ) {
194 JEPRoIDecoder get;
195 return ( get.sumEtThresholdPassed( m_roiWord1, thresholdNumber ) );
196 }
197 return false;
198}

◆ roiWord0()

unsigned int LVL1::RecEnergyRoI::roiWord0 ( ) const

returns roi word 0.

See ATL-DAQ-99-015 for further explanation.

Definition at line 161 of file RecEnergyRoI.cxx.

162{
163 return m_roiWord0;
164}

◆ roiWord1()

unsigned int LVL1::RecEnergyRoI::roiWord1 ( ) const

returns roi word 1.

See ATL-DAQ-99-015 for further explanation.

Definition at line 166 of file RecEnergyRoI.cxx.

167{
168 return m_roiWord1;
169}

◆ roiWord2()

unsigned int LVL1::RecEnergyRoI::roiWord2 ( ) const

returns roi word 2.

See ATL-DAQ-99-015 for further explanation.

Definition at line 171 of file RecEnergyRoI.cxx.

172{
173 return m_roiWord2;
174}

◆ sumEtThresholdsPassed()

vector< unsigned int > LVL1::RecEnergyRoI::sumEtThresholdsPassed ( ) const

returns a vector of thresholds passed.

Definition at line 220 of file RecEnergyRoI.cxx.

221{
222 JEPRoIDecoder get;
223 return get.etSumThresholdsPassed(m_roiWord1);
224}

◆ sumEtTriggerThreshold()

unsigned int LVL1::RecEnergyRoI::sumEtTriggerThreshold ( const unsigned int thresh) const

returns the value of the trigger threshold for the threshold passed.

The trigger threshold is also sometimes called the cluster threshold.

Definition at line 246 of file RecEnergyRoI.cxx.

247{
248
249 std::map< int, unsigned int >::const_iterator it = m_sumEtThresholdValue.find( thresh );
250 if( it != m_sumEtThresholdValue.end() ) {
251 return it->second;
252 }
254}

Member Data Documentation

◆ m_etMissThresholdValue

std::map< int, unsigned int > LVL1::RecEnergyRoI::m_etMissThresholdValue
private

Definition at line 147 of file RecEnergyRoI.h.

◆ m_mEtSigThresholdValue

std::map< int, unsigned int > LVL1::RecEnergyRoI::m_mEtSigThresholdValue
private

Definition at line 149 of file RecEnergyRoI.h.

◆ m_roiWord0

unsigned long int LVL1::RecEnergyRoI::m_roiWord0 { 0 }
private

this is the actual format of the data sent from the LVL1 hardware.

See ATL-DAQ-99-015 for further explanation.

Definition at line 137 of file RecEnergyRoI.h.

137{ 0 };

◆ m_roiWord1

unsigned long int LVL1::RecEnergyRoI::m_roiWord1 { 0 }
private

this is the actual format of the data sent from the LVL1 hardware.

See ATL-DAQ-99-015 for further explanation.

Definition at line 141 of file RecEnergyRoI.h.

141{ 0 };

◆ m_roiWord2

unsigned long int LVL1::RecEnergyRoI::m_roiWord2 { 0 }
private

this is the actual format of the data sent from the LVL1 hardware.

See ATL-DAQ-99-015 for further explanation.

Definition at line 145 of file RecEnergyRoI.h.

145{ 0 };

◆ m_sumEtThresholdValue

std::map< int, unsigned int > LVL1::RecEnergyRoI::m_sumEtThresholdValue
private

Definition at line 148 of file RecEnergyRoI.h.


The documentation for this class was generated from the following files: