ATLAS Offline Software
Loading...
Searching...
No Matches
TriggerTower.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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
14namespace LVL1 {
15
17LVL1::TriggerTower::TriggerTower::TriggerTower(double phi, double eta, unsigned int key):
18 m_phi(phi),
19 m_eta(eta),
20 m_key(key)
21{
22}
24LVL1::TriggerTower::TriggerTower::TriggerTower
25 (double phi, double eta, unsigned int key,
26 const std::vector<int>& em_digits,
27 const std::vector<int>& em_et,
28 const std::vector<int>& em_digits_bcid,
29 const std::vector<int>& em_bcid,
30 int em_error, int em_peak, int em_adc_peak,
31 const std::vector<int>& had_digits,
32 const std::vector<int>& had_et,
33 const std::vector<int>& had_digits_bcid,
34 const std::vector<int>& had_bcid,
35 int had_error, int had_peak, int had_adc_peak):
36 m_em_energy(em_et),
37 m_had_energy(had_et),
38 m_em_adc(em_digits),
39 m_had_adc(had_digits),
40 m_em_BCID(em_bcid),
41 m_had_BCID(had_bcid),
42 m_em_extBCID(em_digits_bcid),
43 m_had_extBCID(had_digits_bcid),
44 m_phi(phi),
45 m_eta(eta),
46 m_key(key),
47 m_em_error(em_error),
48 m_had_error(had_error),
49 m_em_peak(em_peak),
50 m_em_adc_peak(em_adc_peak),
51 m_had_peak(had_peak),
52 m_had_adc_peak(had_adc_peak)
53{
54}
55
56// return em layer ET for the central bunch-crossing
60
61// return had layer ET for central bunch crossing
65
67const std::vector<int> & TriggerTower::emLUT() const
68{ return m_em_energy; }
69
71const std::vector<int> & TriggerTower::hadLUT() const
72{ return m_had_energy; }
73
75const std::vector<int> & TriggerTower::emADC() const
76{ return m_em_adc; }
77
79const std::vector<int> & TriggerTower::hadADC() const
80{ return m_had_adc; }
81
85 if (m_em_BCID.size() != m_em_energy.size() &&
86 m_em_BCID.size() == m_em_adc.size()) return m_em_BCID[m_em_adc_peak];
87
88 return m_em_BCID[m_em_peak];
89}
90
93 if (m_had_BCID.size() != m_had_energy.size() &&
94 m_had_BCID.size() == m_had_adc.size()) return m_had_BCID[m_had_adc_peak];
95
96 return m_had_BCID[m_had_peak];
97}
98
100const std::vector<int> & LVL1::TriggerTower::emBCIDvec() const
101{ return m_em_BCID; }
102
104const std::vector<int> & LVL1::TriggerTower::hadBCIDvec() const
105{ return m_had_BCID; }
106
107const std::vector<int> & LVL1::TriggerTower::emBCIDext() const
108{ return m_em_extBCID; }
109
111const std::vector<int> & LVL1::TriggerTower::hadBCIDext() const
112{ return m_had_extBCID; }
113
115void LVL1::TriggerTower::addEM(const std::vector<int>& digits,
116 const std::vector<int>& et,
117 const std::vector<int>& digits_bcid,
118 const std::vector<int>& bcid,
119 int error, int peak, int adc_peak) {
120 m_em_adc = digits;
121 m_em_energy = et;
122 m_em_BCID = bcid;
123 m_em_extBCID = digits_bcid;
125 m_em_peak = peak;
126 m_em_adc_peak = adc_peak;
127 return;
128}
129
130void LVL1::TriggerTower::addHad(const std::vector<int>& digits, const std::vector<int>& et,
131 const std::vector<int>& digits_bcid, const std::vector<int>& bcid,
132 int error, int peak, int adc_peak) {
133 m_had_adc = digits;
135 m_had_BCID = bcid;
136 m_had_extBCID = digits_bcid;
138 m_had_peak = peak;
139 m_had_adc_peak = adc_peak;
140 return;
141}
142
145 m_eta = eta;
146 m_phi = phi;
147 return;
148}
149
151void LVL1::TriggerTower::setKey(unsigned int key) {
152 m_key = key;
153 return;
154}
155
160 return true;
161 }else{
162 return false;
163 }
164}
165
171 return true;
172 }else{
173 return false;
174 }
175}
176
177}
178
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
unsigned int key() const
returns TT key - that is the key the TT had when it was created.
const std::vector< int > & emBCIDext() const
returns vector of BCID words for all EM ADC samples
int hadEnergy() const
int hadBCID() const
returns BCID word for peak had sample
void setCoord(double eta, double phi)
Methods to specify location of tower.
const std::vector< int > & emLUT() const
return references to the vectors containing the final calubrated ET values.
const std::vector< int > & emBCIDvec() const
returns vector of BCID words for all EM LUT samples
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.
const std::vector< int > & hadBCIDvec() const
returns vector of BCID words for all Had LUT samples
int emEnergy() const
return the final energy values using the in algorithms
int emBCID() const
returns BCID word for peak EM sample
Coordinate coord() const
returns coordinate of TT
const std::vector< int > & hadADC() const
returns had adc digits
void setKey(unsigned int key)
Method to set or update key.
const std::vector< int > & emADC() const
return references to the vectors containing the ADC digits
bool isHadSaturated() const
returns TRUE or FALSE depending on whether the TriggerTower's hadronic energy is greater than it's ha...
const std::vector< int > & hadLUT() const
returns had LUT ET
bool isEMSaturated() const
Utilities to report on status of tower.
const std::vector< int > & hadBCIDext() const
returns vector of BCID words for all Had ADC samples
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.
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Extra patterns decribing particle interation process.