22using namespace TrigConf;
93 std::vector<unsigned int> emEt(4);
94 std::vector<unsigned int> cores(9);
95 for (
int etaOffset = -1; etaOffset <= 2; etaOffset++) {
96 double tempEta =
m_refEta + etaOffset*0.1;
97 for (
int phiOffset = -1; phiOffset <= 2; phiOffset++) {
99 int key =
get.ttKey(tempPhi, tempEta);
100 xAOD::CPMTowerMap_t::const_iterator tt = ttContainer->find(key);
101 if (tt != ttContainer->end() && fabs(tempEta) <
m_maxEta) {
106 emTT = (tt->second)->emEnergy();
107 hadTT = (tt->second)->hadEnergy();
110 emTT = (tt->second)->emSliceEnergy(slice);
111 hadTT = (tt->second)->hadSliceEnergy(slice);
114 if (etaOffset >= 0 && etaOffset <= 1 && phiOffset >= 0 && phiOffset <= 1) {
115 emEt[phiOffset+2*etaOffset] = emTT;
125 if (etaOffset >= 0) {
126 if (phiOffset >= 0) cores[phiOffset+3*etaOffset] += emTT + hadTT;
127 if (phiOffset < 2) cores[phiOffset+3*etaOffset+1] += emTT + hadTT;
130 if (phiOffset >= 0) cores[phiOffset+3*etaOffset+3] += emTT + hadTT;
131 if (phiOffset < 2) cores[phiOffset+3*etaOffset+4] += emTT + hadTT;
142 m_EMClus = ( (emEt[0] > emEt[3]) ? emEt[0] : emEt[3] )
143 + ( (emEt[1] > emEt[2]) ? emEt[1] : emEt[2] );
169 double dEta = keyLL.
dEta(lowerLeft);
170 double dPhi = keyLL.
dPhi(lowerLeft);
198 for (
int i = 0; i < 4; i++)
if (
m_Core < cores[i])
m_EtMax =
false;
199 for (
int i = 5; i < 9; i++)
if (
m_Core <= cores[i])
m_EtMax =
false;
216 float emEnergyScale{1};
217 unsigned int tobPtMinEM{0};
218 emEnergyScale =
m_l1menu->thrExtraInfo().EM().emScale();
219 tobPtMinEM =
m_l1menu->thrExtraInfo().EM().ptMinToTopo();
221 unsigned int thresh = tobPtMinEM * emEnergyScale;
241 int clus = (( (
m_EMClus < clusMask) ? (
m_EMClus & clusMask) : clusMask ) * 10)/emEnergyScale;
242 int emIsol = (( (
m_EMIsol < emIsolMask) ? (
m_EMIsol & emIsolMask) : emIsolMask ) * 10)/emEnergyScale;
243 int hadVeto = (( (
m_HadCore < hadIsolMask) ? (
m_HadCore & hadIsolMask) : hadIsolMask ) * 10)/emEnergyScale;
249 std::vector<int> emisolcuts(5,
m_noIsol);
250 std::vector<int> hadisolcuts(5,
m_noIsol);
251 for(
size_t bit = 1; bit<=5; ++bit) {
256 int offset = iso.
offset();
257 int slope = iso.
slope();
258 int mincut = iso.
mincut();
260 if (clus < upperlimit && bit >= 1 && bit <= 5) {
262 int cut = offset + (slope != 0 ? 10*clus/slope : 0);
263 if (cut < mincut) cut = mincut;
264 emisolcuts[bit-1] = cut;
267 for(
size_t bit = 1; bit<=5; ++bit) {
272 int offset = iso.
offset();
273 int slope = iso.
slope();
274 int mincut = iso.
mincut();
276 if (clus < upperlimit && bit >= 1 && bit <= 5) {
278 int cut = offset + (slope != 0 ? 10*clus/slope : 0);
279 if (cut < mincut) cut = mincut;
280 hadisolcuts[bit-1] = cut;
285 for (
unsigned int isol = 0; isol < 5; ++isol) {
286 if (emIsol <= emisolcuts[isol] && hadVeto <= hadisolcuts[isol])
m_EMIsolWord += (1 << isol);
304 float emEnergyScale{1};
305 unsigned int tobPtMinTau{0};
306 emEnergyScale =
m_l1menu->thrExtraInfo().EM().emScale();
307 tobPtMinTau =
m_l1menu->thrExtraInfo().TAU().ptMinToTopo();
308 unsigned int thresh = tobPtMinTau * emEnergyScale;
327 int clus = (( (
m_TauClus < clusMask) ? (
m_TauClus & clusMask) : clusMask ) * 10)/emEnergyScale;
328 int emIsol = (( (
m_EMIsol < emIsolMask) ? (
m_EMIsol & emIsolMask) : emIsolMask ) * 10)/emEnergyScale;
331 std::vector<int> emisolcuts(5,
m_noIsol);
332 for(
size_t bit = 1; bit<=5; ++bit) {
337 int offset = iso.
offset();
338 int slope = iso.
slope();
339 int mincut = iso.
mincut();
341 if (clus < upperlimit && bit >= 1 && bit <= 5) {
343 int cut = offset + (slope != 0 ? 10*clus/slope : 0);
344 if (cut < mincut) cut = mincut;
345 emisolcuts[bit-1] = cut;
350 for (
unsigned int isol = 0; isol < 5; ++isol)
351 if (emIsol <= emisolcuts[isol])
m_TauIsolWord += (1 << isol);
static const double m_maxEta
int CoreET()
Additional information for reconstruction & performance studies.
void tauAlgorithm()
Check trigger condition and set hits if appropriate.
void setRoICoord(double eta, double phi)
threshold values
int EMLUTClus()
Sums with the range & precision of isolation LUT inputs.
int HadIsolET()
Returns Had isolation ET.
static const unsigned int m_emLUT_ClusterNBits
double m_eta
Algorithm results.
int EMIsolWord()
Returns EM isolation word (5 bits)
unsigned int m_TauIsolWord
static const unsigned int m_maxClus
Algorithm parameters.
static const unsigned int m_emLUT_HadVetoFirstBit
static const unsigned int m_emLUT_HadVetoNBits
int TauIsolWord()
Returns Tau isolation word (5 bits)
int EMClusET()
Returns EM cluster ET, limited to 8 bits.
bool isTauRoI()
Report whether this passed as a Tau TOB.
int TauLUTClus()
Returns Tau cluster ET with range and precision of LUT input.
void testEtMax(const std::vector< unsigned int > &cores)
Form all 2x2 clusters within window and test centre is a local ET maximum.
static const unsigned int m_emLUT_ClusterFirstBit
xAOD::CPMTobRoI * EMCPMTobRoI()
Create CPMTobRoIs and return pointers to them.
int EMLUTEMIsol()
Returns EM isolation ET with range and precision of EM LUT input.
CPMTobAlgorithm(double eta, double phi, const xAOD::CPMTowerMap_t *ttContainer, const TrigConf::L1Menu *l1menu, int slice=-1)
double eta()
Accessors for TOB data.
static const unsigned int m_tauLUT_EMIsolNBits
static const unsigned int m_emLUT_EMIsolFirstBit
const TrigConf::L1Menu * m_l1menu
static const unsigned int m_tauLUT_ClusterFirstBit
int TauClusET()
Returns Tau cluster ET, limited to 8 bits.
xAOD::CPMTobRoI * createTobRoI(int type)
Create a pointer to a CPMTobRoI and return it.
unsigned int m_EMIsolWord
xAOD::CPMTobRoI * TauCPMTobRoI()
Returns CPMTobRoI for TAU hypothesis, provided TAU Tob conditions passed.
int HadCoreET()
Returns Had core ET (inner isolation sum)
static const unsigned int m_tauLUT_EMIsolFirstBit
int TauLUTEMIsol()
Returns EM isolation ET with range and precision of Tau LUT input.
static const unsigned int m_tauLUT_ClusterNBits
static const unsigned int m_emLUT_EMIsolNBits
int EMCoreET()
Returns EM core ET.
static const unsigned int m_noIsol
void emAlgorithm()
Check trigger condition and set hits if appropriate.
bool isEtMax()
Does this window pass the local ET maximum condition.
double phi()
Returns phi coordinate of RoI, using standard ATLAS convention.
int EMLUTHadVeto()
Returns Had veto ET with range and precision of EM LUT input.
int EMIsolET()
Returns EM isolation ET.
bool isEMRoI()
Report whether this passed as an EM TOB.
returns the trigger hardware components associated with a given Coordinate
unsigned int cpModuleFPGA(const Coordinate &coord)
returns ID [0-7] of the CP FPGA.
unsigned int cpModule(const Coordinate &coord)
return ID of CP module.
unsigned int cpModuleLocalRoI(const Coordinate &coord)
returns local RoI coordinate within FPGA
unsigned int cpCrate(const Coordinate &coord)
returns crate ID covering that coord.
CoordinateRange class declaration.
Coordinate class declaration.
double phi() const
return phi
double eta() const
return eta
Coordinate coord() const
return central coords of current key value.
The TriggerTowerKey object provides the key for each trigger tower depending on its eta-phi coords.
double dPhi(const Coordinate &coord) const
returns phi height of trigger tower at coordinate coord
double dEta(const Coordinate &coord) const
returns eta width of trigger tower at coordinate coord
void makePrivateStore()
Create a new (empty) private store for this object.
virtual void initialize(int crate, int cpm, int chip, int location, int type, int energy, int isol)
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
CPMTobRoI_v1 CPMTobRoI
Define the latest version of the CPMTobRoI class.
std::map< int, const CPMTower * > CPMTowerMap_t
Extra patterns decribing particle interation process.