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 const std::string emIsolationStr1{
"EMIsoForEMthr"};
252 for(
size_t bit = 1; bit<=5; ++bit) {
257 int offset = iso.
offset();
258 int slope = iso.
slope();
259 int mincut = iso.
mincut();
261 if (clus < upperlimit && bit >= 1 && bit <= 5) {
263 int cut = offset + (slope != 0 ? 10*clus/slope : 0);
264 if (cut < mincut) cut = mincut;
265 emisolcuts[bit-1] = cut;
268 const std::string emIsolationStr2{
"HAIsoForEMthr"};
269 for(
size_t bit = 1; bit<=5; ++bit) {
274 int offset = iso.
offset();
275 int slope = iso.
slope();
276 int mincut = iso.
mincut();
278 if (clus < upperlimit && bit >= 1 && bit <= 5) {
280 int cut = offset + (slope != 0 ? 10*clus/slope : 0);
281 if (cut < mincut) cut = mincut;
282 hadisolcuts[bit-1] = cut;
287 for (
unsigned int isol = 0; isol < 5; ++isol) {
288 if (emIsol <= emisolcuts[isol] && hadVeto <= hadisolcuts[isol])
m_EMIsolWord += (1 << isol);
306 float emEnergyScale{1};
307 unsigned int tobPtMinTau{0};
308 emEnergyScale =
m_l1menu->thrExtraInfo().EM().emScale();
309 tobPtMinTau =
m_l1menu->thrExtraInfo().TAU().ptMinToTopo();
310 unsigned int thresh = tobPtMinTau * emEnergyScale;
329 int clus = (( (
m_TauClus < clusMask) ? (
m_TauClus & clusMask) : clusMask ) * 10)/emEnergyScale;
330 int emIsol = (( (
m_EMIsol < emIsolMask) ? (
m_EMIsol & emIsolMask) : emIsolMask ) * 10)/emEnergyScale;
333 std::vector<int> emisolcuts(5,
m_noIsol);
334 const std::string tauIsolationStr{
"EMIsoForTAUthr"};
335 for(
size_t bit = 1; bit<=5; ++bit) {
340 int offset = iso.
offset();
341 int slope = iso.
slope();
342 int mincut = iso.
mincut();
344 if (clus < upperlimit && bit >= 1 && bit <= 5) {
346 int cut = offset + (slope != 0 ? 10*clus/slope : 0);
347 if (cut < mincut) cut = mincut;
348 emisolcuts[bit-1] = cut;
353 for (
unsigned int isol = 0; isol < 5; ++isol)
354 if (emIsol <= emisolcuts[isol])
m_TauIsolWord += (1 << isol);
539 pointer->makePrivateStore();
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
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.