Commit 050e8f4c authored by Stewart Martin-Haugh's avatar Stewart Martin-Haugh Committed by Adam Edward Barton
Browse files

Optimisations for TriggerTower

parent b13e6e61
......@@ -120,9 +120,10 @@ namespace xAOD{
int TriggerTower_v2::layer() const
{
unsigned int cnum = ( coolId() >> 24 ) & 0x7;
unsigned int mnum = ( coolId() >> 16 ) & 0xf;
// unsigned int chan = coolId() & 0x3; // To be used for FCAL2,FCAL3 soon
unsigned int theCoolId = coolId();
unsigned int cnum = ( theCoolId >> 24 ) & 0x7;
unsigned int mnum = ( theCoolId >> 16 ) & 0xf;
// unsigned int chan = theCoolId & 0x3; // To be used for FCAL2,FCAL3 soon
if (cnum < 4) { // EMB,EMEC
return 0;
......@@ -148,9 +149,10 @@ namespace xAOD{
int TriggerTower_v2::sampling() const
{
unsigned int cnum = ( coolId() >> 24 ) & 0x7;
unsigned int mnum = ( coolId() >> 16 ) & 0xf;
// unsigned int chan = coolId() & 0x3; // To be used for FCAL2,FCAL3 soon
unsigned int theCoolId = coolId();
unsigned int cnum = ( theCoolId >> 24 ) & 0x7;
unsigned int mnum = ( theCoolId >> 16 ) & 0xf;
// unsigned int chan = theCoolId & 0x3; // To be used for FCAL2,FCAL3 soon
if (cnum < 4) { // EMB,EMEC
return 0;
......
......@@ -143,14 +143,15 @@ namespace LVL1
tileEt += cell->e() * cell->sinTh();
}
else
for (const xAOD::TriggerTower *triggerTower : *triggerTowers)
if (
triggerTower->sampling() == 1 &&
std::abs(triggerTower->eta()) < 1.5 &&
for (const xAOD::TriggerTower *triggerTower : *triggerTowers) {
if (std::abs(triggerTower->eta()) < 1.5) {
if (triggerTower->sampling() == 1 &&
towerHelper.inBox(triggerTower->eta(), triggerTower->phi()))
tileEt += 500 * triggerTower->cpET();
}
}
}
}
}
float towerEt = LArEt + tileEt;
if (towerEt < m_minTowerEt)
towerEt = 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment