ATLAS Offline Software
Loading...
Searching...
No Matches
EmTauROI.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4/***************************************************************************
5 emtauroi.cxx - description
6 -------------------
7 begin : Mon Jan 22 2001
8 email : moyse@heppch.ph.qmw.ac.uk
9 ***************************************************************************/
10
11
13
14namespace LVL1 {
15
16EmTauROI::EmTauROI(double phi, double eta, int energy, unsigned long int roiWord, const std::vector<unsigned int>& algorithmType,
17 unsigned int hadCoreEnergy, unsigned int hadRingIsolationEnergy, unsigned int emRingIsolationEnergy,
18 unsigned int emClusterEnergy, unsigned int tauClusterEnergy):
19 m_phi(phi),
20 m_eta(eta),
23 m_algorithmType(algorithmType),
27 m_emClusterEnergy(emClusterEnergy),
29{
30}
31
34
37unsigned int LVL1::EmTauROI::roiWord() const{
38 return m_roiWord;
39}
40
41
44bool LVL1::EmTauROI::thresholdPassed(int thresh) const {
45
46 if (m_roiWord & (1<<(thresh-1)) ){
47 return true;
48 }else{
49 return false;
50 }
51}
52
55 // This information is currently stored as a vector
56 // within all EmTauROIs. This is not ideal - I
57 // would rather it was looked up from a database.
58 // maybe I should just look it up from CTPCaloConfig?
59 if (thresh<1 || thresh > int(TrigT1CaloDefs::numOfCPThresholds)){
60 // outside allowed values.
62 }
63 switch ( m_algorithmType[thresh-1] ){
64 case 0 : return TrigT1CaloDefs::EMAlg;
65 break;
66 case 1 : return TrigT1CaloDefs::TauAlg;
67 break;
68 default : return TrigT1CaloDefs::ClustAlgError;
69 }//end switch
70
71 // shouldn't ever be reached.
73}
74
75
77double LVL1::EmTauROI::eta() const {
78 return m_eta;
79}
80
82double LVL1::EmTauROI::phi() const {
83 return m_phi;
84}
85
86
89 return m_energy;
90}
91
98 // Saturation flag is bit 16 of RoIWord
99 bool sat = (m_roiWord >> 16)&0x1;
100 return sat;
101}
102
103
104}//end of LVL1 namespace defn
105
int m_energy
Energy of ROI core, i.e.
Definition EmTauROI.h:97
double eta() const
returns eta coord of ROI
Definition EmTauROI.cxx:77
unsigned int hadCoreEnergy() const
return energy
Definition EmTauROI.h:82
unsigned int emRingIsolationEnergy() const
return energy
Definition EmTauROI.h:78
unsigned int m_hadCoreEnergy
Used for debugging only!
Definition EmTauROI.h:112
int energy() const
returns the energy of the ROI core, i.e.
Definition EmTauROI.cxx:88
bool thresholdPassed(int thresh) const
returns TRUE if threshold number threshold_number has been passed by this ROI.
Definition EmTauROI.cxx:44
unsigned int tauClusterEnergy() const
Definition EmTauROI.h:85
double phi() const
returns phi coord of ROI
Definition EmTauROI.cxx:82
unsigned int m_tauClusterEnergy
Definition EmTauROI.h:115
unsigned int m_emRingIsolationEnergy
Used for debugging only!
Definition EmTauROI.h:108
unsigned int m_hadRingIsolationEnergy
Used for debugging only!
Definition EmTauROI.h:110
double m_eta
eta coord of ROI
Definition EmTauROI.h:93
unsigned int hadRingIsolationEnergy() const
return energy
Definition EmTauROI.h:80
std::vector< unsigned int > m_algorithmType
Contains the algo type of thresh sets.
Definition EmTauROI.h:105
bool saturated() const
returns TRUE if ROI constructed from a trigger tower that was saturated - in other words this ROI is ...
Definition EmTauROI.cxx:97
TrigT1CaloDefs::ClusterAlgorithm thresholdType(int thresh) const
returns type of thresholds number threshold_number Thresholds numbered from 1 to TrigT1CaloDefs::numO...
Definition EmTauROI.cxx:54
unsigned int m_emClusterEnergy
Used for debugging only!
Definition EmTauROI.h:114
unsigned int roiWord() const
returns the 32bit ROI word.
Definition EmTauROI.cxx:37
EmTauROI(double phi, double eta, int energy, unsigned long int roiWord, const std::vector< unsigned int > &algorithmType, unsigned int hadCoreEnergy, unsigned int hadRingIsolationEnergy, unsigned int emRingIsolationEnergy, unsigned int emClusterEnergy, unsigned int tauClusterEnergy)
Definition EmTauROI.cxx:16
unsigned long int m_roiWord
this is the actual format of the data sent from the LVL1 hardware.
Definition EmTauROI.h:102
double m_phi
phi coord of ROI
Definition EmTauROI.h:90
static const unsigned int numOfCPThresholds
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...