ATLAS Offline Software
TriggerTower.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 /***************************************************************************
5  TriggerTower.cpp - description
6  -------------------
7  begin : Mon Sep 25 2000
8  email : e.moyse@qmw.ac.uk
9  ***************************************************************************/
10 
11 
13 
14 namespace LVL1 {
15 
16 // default constructor for persistency
18  m_em_energy(1),
19  m_had_energy(1),
20  m_em_adc(1),
21  m_had_adc(1),
22  m_em_BCID(1),
23  m_had_BCID(1),
24  m_em_extBCID(1),
25  m_had_extBCID(1),
26  m_phi(0.0),
27  m_eta(0.0),
28  m_key(0),
29  m_em_error(0),
30  m_had_error(0),
31  m_em_peak(0),
32  m_em_adc_peak(0),
33  m_had_peak(0),
34  m_had_adc_peak(0)
35  {
36  }
38 LVL1::TriggerTower::TriggerTower::TriggerTower(double phi, double eta, unsigned int key):
39  m_em_energy(1),
40  m_had_energy(1),
41  m_em_adc(1),
42  m_had_adc(1),
43  m_em_BCID(1),
44  m_had_BCID(1),
45  m_em_extBCID(1),
46  m_had_extBCID(1),
47  m_phi(phi),
48  m_eta(eta),
49  m_key(key),
50  m_em_error(0),
51  m_had_error(0),
52  m_em_peak(0),
53  m_em_adc_peak(0),
54  m_had_peak(0),
55  m_had_adc_peak(0)
56 {
57 }
60  (double phi, double eta, unsigned int key,
61  const std::vector<int>& em_digits,
62  const std::vector<int>& em_et,
63  const std::vector<int>& em_digits_bcid,
64  const std::vector<int>& em_bcid,
65  int em_error, int em_peak, int em_adc_peak,
66  const std::vector<int>& had_digits,
67  const std::vector<int>& had_et,
68  const std::vector<int>& had_digits_bcid,
69  const std::vector<int>& had_bcid,
70  int had_error, int had_peak, int had_adc_peak):
71  m_em_energy(em_et),
72  m_had_energy(had_et),
73  m_em_adc(em_digits),
74  m_had_adc(had_digits),
75  m_em_BCID(em_bcid),
76  m_had_BCID(had_bcid),
77  m_em_extBCID(em_digits_bcid),
78  m_had_extBCID(had_digits_bcid),
79  m_phi(phi),
80  m_eta(eta),
81  m_key(key),
82  m_em_error(em_error),
83  m_had_error(had_error),
84  m_em_peak(em_peak),
85  m_em_adc_peak(em_adc_peak),
86  m_had_peak(had_peak),
87  m_had_adc_peak(had_adc_peak)
88 {
89 }
90 
91 TriggerTower::~TriggerTower(){
92 }
93 
94 // return em layer ET for the central bunch-crossing
96  return m_em_energy[m_em_peak];
97 }
98 
99 // return had layer ET for central bunch crossing
101  return m_had_energy[m_had_peak];
102 }
103 
105 const std::vector<int> & TriggerTower::emLUT() const
106 { return m_em_energy; }
107 
109 const std::vector<int> & TriggerTower::hadLUT() const
110 { return m_had_energy; }
111 
113 const std::vector<int> & TriggerTower::emADC() const
114 { return m_em_adc; }
115 
117 const std::vector<int> & TriggerTower::hadADC() const
118 { return m_had_adc; }
119 
121 int LVL1::TriggerTower::emBCID() const {
123  if (m_em_BCID.size() != m_em_energy.size() &&
124  m_em_BCID.size() == m_em_adc.size()) return m_em_BCID[m_em_adc_peak];
125 
126  return m_em_BCID[m_em_peak];
127 }
128 
130 int LVL1::TriggerTower::hadBCID() const {
131  if (m_had_BCID.size() != m_had_energy.size() &&
132  m_had_BCID.size() == m_had_adc.size()) return m_had_BCID[m_had_adc_peak];
133 
134  return m_had_BCID[m_had_peak];
135 }
136 
138 const std::vector<int> & LVL1::TriggerTower::emBCIDvec() const
139 { return m_em_BCID; }
140 
142 const std::vector<int> & LVL1::TriggerTower::hadBCIDvec() const
143 { return m_had_BCID; }
145 const std::vector<int> & LVL1::TriggerTower::emBCIDext() const
146 { return m_em_extBCID; }
147 
149 const std::vector<int> & LVL1::TriggerTower::hadBCIDext() const
150 { return m_had_extBCID; }
151 
153 void LVL1::TriggerTower::addEM(const std::vector<int>& digits,
154  const std::vector<int>& et,
155  const std::vector<int>& digits_bcid,
156  const std::vector<int>& bcid,
157  int error, int peak, int adc_peak) {
158  m_em_adc = digits;
159  m_em_energy = et;
160  m_em_BCID = bcid;
161  m_em_extBCID = digits_bcid;
162  m_em_error = error;
163  m_em_peak = peak;
164  m_em_adc_peak = adc_peak;
165  return;
166 }
168 void LVL1::TriggerTower::addHad(const std::vector<int>& digits, const std::vector<int>& et,
169  const std::vector<int>& digits_bcid, const std::vector<int>& bcid,
170  int error, int peak, int adc_peak) {
171  m_had_adc = digits;
172  m_had_energy = et;
173  m_had_BCID = bcid;
174  m_had_extBCID = digits_bcid;
175  m_had_error = error;
176  m_had_peak = peak;
177  m_had_adc_peak = adc_peak;
178  return;
179 }
180 
182 void LVL1::TriggerTower::setCoord(double eta, double phi) {
183  m_eta = eta;
184  m_phi = phi;
185  return;
186 }
187 
189 void LVL1::TriggerTower::setKey(unsigned int key) {
190  m_key = key;
191  return;
192 }
197  if (m_em_energy[m_em_peak]>=m_saturation){
198  return true;
199  }else{
200  return false;
201  }
202 }
203 
208  if (m_had_energy[m_had_peak]>=m_saturation){
209  return true;
210  }else{
211  return false;
212  }
213 }
214 
215 }
216 
219  return Coordinate(m_phi, m_eta);
220 }
test_pyathena.eta
eta
Definition: test_pyathena.py:10
LVL1::TriggerTower::emEnergy
int emEnergy() const
return the final energy values using the in algorithms
Definition: TriggerTower.cxx:100
et
Extra patterns decribing particle interation process.
LVL1::TriggerTower::isEMSaturated
bool isEMSaturated() const
Utilities to report on status of tower.
Definition: TriggerTower.cxx:201
xAOD::et
et
Definition: TrigEMCluster_v1.cxx:25
LVL1::TriggerTower::hadBCID
int hadBCID() const
returns BCID word for peak had sample
Definition: TriggerTower.cxx:135
LVL1::TriggerTower::emBCIDext
const std::vector< int > & emBCIDext() const
returns vector of BCID words for all EM ADC samples
Definition: TriggerTower.cxx:150
LVL1::TriggerTower::m_eta
double m_eta
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/TriggerTower.h:135
LVL1::TriggerTower::emBCID
int emBCID() const
returns BCID word for peak EM sample
Definition: TriggerTower.cxx:126
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::TriggerTower::m_phi
double m_phi
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/TriggerTower.h:134
LVL1::TriggerTower::hadBCIDext
const std::vector< int > & hadBCIDext() const
returns vector of BCID words for all Had ADC samples
Definition: TriggerTower.cxx:154
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
LVL1::TriggerTower::addHad
void addHad(const std::vector< int > &digits, const std::vector< int > &et, const std::vector< int > &digits_bcid, const std::vector< int > &bcid, int error, int peak, int adc_peak)
Method for filling Had tower data.
Definition: TriggerTower.cxx:173
LVL1::Coordinate
Coordinate class declaration.
Definition: TrigT1/TrigT1Interfaces/TrigT1Interfaces/Coordinate.h:50
LVL1::TriggerTower::hadBCIDvec
const std::vector< int > & hadBCIDvec() const
returns vector of BCID words for all Had LUT samples
Definition: TriggerTower.cxx:147
LVL1::TriggerTower::isHadSaturated
bool isHadSaturated() const
returns TRUE or FALSE depending on whether the TriggerTower's hadronic energy is greater than it's ha...
Definition: TriggerTower.cxx:212
LVL1::TriggerTower::setKey
void setKey(unsigned int key)
Method to set or update key.
Definition: TriggerTower.cxx:194
LVL1::TriggerTower::hadEnergy
int hadEnergy() const
Definition: TriggerTower.cxx:105
LVL1::TriggerTower::setCoord
void setCoord(double eta, double phi)
Methods to specify location of tower.
Definition: TriggerTower.cxx:187
LVL1::TriggerTower::emBCIDvec
const std::vector< int > & emBCIDvec() const
returns vector of BCID words for all EM LUT samples
Definition: TriggerTower.cxx:143
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
LVL1::TriggerTower::addEM
void addEM(const std::vector< int > &digits, const std::vector< int > &et, const std::vector< int > &digits_bcid, const std::vector< int > &bcid, int error, int peak, int adc_peak)
Methods to fill towers with digits, calibrated ET vectors and status flags.
Definition: TriggerTower.cxx:158
get_generator_info.error
error
Definition: get_generator_info.py:40
error
Definition: IImpactPoint3dEstimator.h:70
TriggerTower.h
LVL1::TriggerTower::coord
Coordinate coord() const
returns coordinate of TT
Definition: TriggerTower.cxx:218
xAOD::TriggerTower
TriggerTower_v2 TriggerTower
Define the latest version of the TriggerTower class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/TriggerTower.h:16
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37