Commit 885d004a authored by Frank Winklmeier's avatar Frank Winklmeier Committed by Graeme Stewart
Browse files

Ignore events in the abort gap and also check RoIB overflows (ATR-12285) (TrigDetCalib-01-02-16)

	* src/TrigL1CaloOverflow.cxx: Ignore events in the abort gap and also check RoIB overflows (ATR-12285)
	* TrigDetCalib-01-02-16
parent 442491a2
......@@ -15,6 +15,7 @@ atlas_depends_on_subdirs( PUBLIC
Control/AthenaBaseComps
Control/AthenaKernel
Event/EventInfo
Event/xAOD/xAODEventInfo
Tracking/TrkEvent/TrkTrack
Trigger/TrigSteer/TrigInterfaces
Trigger/TrigSteer/TrigSteering
......
......@@ -11,6 +11,7 @@ use IRegionSelector IRegionSelector-* DetectorDescription
private
use AthenaBaseComps AthenaBaseComps-* Control
use EventInfo EventInfo-* Event
use xAODEventInfo xAODEventInfo-* Event/xAOD
use AthenaKernel AthenaKernel-* Control
use TrkTrack TrkTrack-* Tracking/TrkEvent
use TrigSteering TrigSteering* Trigger/TrigSteer
......
......@@ -3,14 +3,23 @@
*/
#include "TrigL1CaloOverflow.h"
#include "TrigT1Result/RoIBResult.h"
#include "xAODEventInfo/EventInfo.h"
#include <bitset>
// BCIDs of the abort gap
const int ABORT_GAP_START = 3446;
const int ABORT_GAP_END = 3563;
TrigL1CaloOverflow::TrigL1CaloOverflow(const std::string& name, ISvcLocator* pSvcLocator):
HLT::AllTEAlgo(name, pSvcLocator),
m_lvl1Tool("HLT::Lvl1ResultAccessTool/Lvl1ResultAccessTool",this)
{
declareProperty("ignoreAbortGap", m_ignoreAbortGap = true, "Ignore overflows in abort gap");
declareProperty("acceptCMXOverflows", m_acceptCMXOverflows = true, "Accept CMX overflows");
declareProperty("acceptCaloRoIBOverflows", m_acceptCaloRoIBOverflows = true, "Accept Calo RoIB overflows");
}
HLT::ErrorCode TrigL1CaloOverflow::hltInitialize()
......@@ -26,14 +35,33 @@ HLT::ErrorCode TrigL1CaloOverflow::hltExecute(std::vector<std::vector<HLT::Trigg
{
beforeExecMonitors().ignore();
// Do nothing for events in the abort gap (tile laser causes overflows)
if (m_ignoreAbortGap) {
const xAOD::EventInfo* evt(0);
if (evtStore()->retrieve(evt).isSuccess() &&
evt->bcid() >= ABORT_GAP_START && evt->bcid() <= ABORT_GAP_END) {
return HLT::OK;
}
}
const ROIB::RoIBResult* result;
if (evtStore()->retrieve(result).isFailure()) return HLT::OK;
std::bitset<3> overflow = m_lvl1Tool->lvl1EMTauJetOverflow(*result);
if (overflow.any()) {
HLT::TriggerElement* te = addRoI(output);
te->setActiveState(true);
ATH_MSG_DEBUG("Event was force accepted by L1Calo due to TOB overflows in CMX transmission");
// Overflows in the TOB transmission to CMX
if (m_acceptCMXOverflows) {
std::bitset<3> overflow = m_lvl1Tool->lvl1EMTauJetOverflow(*result);
if (overflow.any()) {
addRoI(output)->setActiveState(true);
ATH_MSG_DEBUG("Event was force accepted by L1Calo due to TOB overflows in CMX transmission");
}
}
// Overflows on the RoI link to the RoIB
if (m_acceptCaloRoIBOverflows) {
if (result->CheckEMOverflow() || result->CheckJOverflow()) {
addRoI(output)->setActiveState(true);
ATH_MSG_DEBUG("Event has overflows in the EM or JET RoI transmission to the RoIB");
}
}
afterExecMonitors().ignore();
......
......@@ -29,6 +29,9 @@ public:
private:
ToolHandle<HLT::ILvl1ResultAccessTool> m_lvl1Tool;
bool m_ignoreAbortGap;
bool m_acceptCMXOverflows;
bool m_acceptCaloRoIBOverflows;
};
......
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