From 877d3e7a309bf1b2c6a7198eea43f8603a2b6b08 Mon Sep 17 00:00:00 2001 From: Kenji Hamano <kenji.hamano@cern.ch> Date: Thu, 19 Sep 2019 12:15:40 -0700 Subject: [PATCH] TDT included --- .../python/TrigMETMonitorAlgorithm.py | 43 ++++++++++--------- .../src/TrigMETMonitorAlgorithm.cxx | 32 +++++++++----- 2 files changed, 43 insertions(+), 32 deletions(-) diff --git a/Trigger/TrigMonitoring/TrigMETMonitoring/python/TrigMETMonitorAlgorithm.py b/Trigger/TrigMonitoring/TrigMETMonitoring/python/TrigMETMonitorAlgorithm.py index efebccdd02e..9692e1eb4b7 100644 --- a/Trigger/TrigMonitoring/TrigMETMonitoring/python/TrigMETMonitorAlgorithm.py +++ b/Trigger/TrigMonitoring/TrigMETMonitoring/python/TrigMETMonitorAlgorithm.py @@ -51,9 +51,10 @@ def TrigMETMonConfig(inputFlags): from TriggerJobOpts.TriggerFlags import TriggerFlags if TriggerFlags.EDMDecodingVersion==3: expertTrigMETMonAlg.TriggerChain = 'HLT_xe30_cell_L1XE10' - expertTrigMETMonAlg.hlt_cell_key = 'HLT_MET' - shifterTrigMETMonAlg.hlt_cell_key = 'HLT_MET' - TrigMETMonitorAlgorithm.hlt_cell_key = 'HLT_MET' + #shifterTrigMETMonAlg.TriggerChain = 'HLT_xe30_cell_L1XE10' + #expertTrigMETMonAlg.hlt_cell_key = 'HLT_MET' + #shifterTrigMETMonAlg.hlt_cell_key = 'HLT_MET' + #TrigMETMonitorAlgorithm.hlt_cell_key = 'HLT_MET' else: expertTrigMETMonAlg.TriggerChain = 'HLT_xe110_pufit_xe65_L1XE50' TrigMETMonitorAlgorithm.hlt_cell_key = 'HLT_xAOD__TrigMissingETContainer_TrigEFMissingET' @@ -91,35 +92,35 @@ def TrigMETMonConfig(inputFlags): # Configure histograms #NB! The histograms defined here must match the ones in the cxx file exactly shifterGroup.defineHistogram('L1_Ex',title='L1 Missing E_{x};E_{x} (GeV);Events', - path='L1',xbins=199,xmin=-298.5,xmax=298.5) + path='L1',xbins=199,xmin=-298.5,xmax=298.5) shifterGroup.defineHistogram('L1_Ey',title='L1 Missing E_{y};E_{y} (GeV);Events', - path='L1',xbins=199,xmin=-298.5,xmax=298.5) + path='L1',xbins=199,xmin=-298.5,xmax=298.5) shifterGroup.defineHistogram('L1_Et',title='L1 Missing E_{T};E_{T} (GeV);Events', - path='L1',xbins=205,xmin=-13.5,xmax=401.5) + path='L1',xbins=205,xmin=-13.5,xmax=401.5) shifterGroup.defineHistogram('cell_Ex',title='cell Missing E_{x};E_{x} (GeV);Events', - path='cell',xbins=199,xmin=-298.5,xmax=298.5) + path='cell',xbins=199,xmin=-298.5,xmax=298.5) shifterGroup.defineHistogram('cell_Ey',title='cell Missing E_{y};E_{y} (GeV);Events', - path='cell',xbins=199,xmin=-298.5,xmax=298.5) + path='cell',xbins=199,xmin=-298.5,xmax=298.5) shifterGroup.defineHistogram('cell_Et',title='cell Missing E_{T};E_{T} (GeV);Events', - path='cell',xbins=205,xmin=-13.5,xmax=401.5) + path='cell',xbins=205,xmin=-13.5,xmax=401.5) shifterGroup.defineHistogram('tcpufit_Ex',title='tcpufit Missing E_{x};E_{x} (GeV);Events', - path='tcpufit',xbins=199,xmin=-298.5,xmax=298.5) + path='tcpufit',xbins=199,xmin=-298.5,xmax=298.5) shifterGroup.defineHistogram('tcpufit_Ey',title='tcpufit Missing E_{y};E_{y} (GeV);Events', - path='tcpufit',xbins=199,xmin=-298.5,xmax=298.5) + path='tcpufit',xbins=199,xmin=-298.5,xmax=298.5) shifterGroup.defineHistogram('tcpufit_Et',title='tcpufit Missing E_{T};E_{T} (GeV);Events', - path='tcpufit',xbins=205,xmin=-13.5,xmax=401.5) + path='tcpufit',xbins=205,xmin=-13.5,xmax=401.5) expertGroup.defineHistogram('mht_Ex',title='mht Missing E_{x};E_{x} (GeV);Events', - path='mht',xbins=199,xmin=-298.5,xmax=298.5) + path='mht',xbins=199,xmin=-298.5,xmax=298.5) expertGroup.defineHistogram('mht_Ey',title='mht Missing E_{y};E_{y} (GeV);Events', - path='mht',xbins=199,xmin=-298.5,xmax=298.5) + path='mht',xbins=199,xmin=-298.5,xmax=298.5) expertGroup.defineHistogram('mht_Et', title='mht E_{T};E_{T} (GeV);Events', - path='mht',xbins=205,xmin=-13.5,xmax=401.5) + path='mht',xbins=205,xmin=-13.5,xmax=401.5) expertGroup.defineHistogram('tc_Ex',title='tc Missing E_{x};E_{x} (GeV);Events', - path='tc',xbins=199,xmin=-298.5,xmax=298.5) + path='tc',xbins=199,xmin=-298.5,xmax=298.5) expertGroup.defineHistogram('tc_Ey',title='tc Missing E_{y};E_{y} (GeV);Events', - path='tc',xbins=199,xmin=-298.5,xmax=298.5) + path='tc',xbins=199,xmin=-298.5,xmax=298.5) expertGroup.defineHistogram('tc_Et', title='tc E_{T};E_{T} (GeV);Events', - path='tc',xbins=205,xmin=-13.5,xmax=401.5) + path='tc',xbins=205,xmin=-13.5,xmax=401.5) ### STEP 6 ### # Finalize. The return value should be a tuple of the ComponentAccumulator @@ -142,9 +143,9 @@ if __name__=='__main__': from AthenaConfiguration.AllConfigFlags import ConfigFlags nightly = '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/' file = 'data16_13TeV.00311321.physics_Main.recon.AOD.r9264/AOD.11038520._000001.pool.root.1' - #ConfigFlags.Input.Files = [nightly+file] - ConfigFlags.Input.Files = ['/hep300/data/khamano/data18_athenaMT/fromElin/AOD.pool.root'] - ConfigFlags.Input.isMC = True + ConfigFlags.Input.Files = [nightly+file] + #ConfigFlags.Input.Files = ['/hep300/data/khamano/data18_athenaMT/fromElin/AOD_old.pool.root'] + ConfigFlags.Input.isMC = False ConfigFlags.Output.HISTFileName = 'TrigMETMonitorOutput.root' ConfigFlags.lock() diff --git a/Trigger/TrigMonitoring/TrigMETMonitoring/src/TrigMETMonitorAlgorithm.cxx b/Trigger/TrigMonitoring/TrigMETMonitoring/src/TrigMETMonitorAlgorithm.cxx index d7c3660bb50..26dabaade00 100644 --- a/Trigger/TrigMonitoring/TrigMETMonitoring/src/TrigMETMonitorAlgorithm.cxx +++ b/Trigger/TrigMonitoring/TrigMETMonitoring/src/TrigMETMonitorAlgorithm.cxx @@ -43,31 +43,31 @@ StatusCode TrigMETMonitorAlgorithm::fillHistograms( const EventContext& ctx ) co // access met containers SG::ReadHandle<xAOD::EnergySumRoI> l1_roi_cont(m_lvl1_roi_key, ctx); if (! l1_roi_cont.isValid() ) { - ATH_MSG_INFO("evtStore() does not contain L1 MET Collection with name "<< m_lvl1_roi_key); + ATH_MSG_WARNING("evtStore() does not contain L1 MET Collection with name "<< m_lvl1_roi_key); //return StatusCode::FAILURE; } SG::ReadHandle<xAOD::TrigMissingETContainer> hlt_cell_met_cont(m_hlt_cell_met_key, ctx); if (hlt_cell_met_cont->size()==0 || ! hlt_cell_met_cont.isValid() ) { - ATH_MSG_INFO("evtStore() does not contain HLT MET Collection with name "<< m_hlt_cell_met_key); + ATH_MSG_WARNING("evtStore() does not contain HLT MET Collection with name "<< m_hlt_cell_met_key); //return StatusCode::FAILURE; } SG::ReadHandle<xAOD::TrigMissingETContainer> hlt_mht_met_cont(m_hlt_mht_met_key, ctx); if (hlt_mht_met_cont->size()==0 || ! hlt_mht_met_cont.isValid() ) { - ATH_MSG_INFO("evtStore() does not contain HLT MET Collection with name "<< m_hlt_mht_met_key); + ATH_MSG_WARNING("evtStore() does not contain HLT MET Collection with name "<< m_hlt_mht_met_key); //return StatusCode::FAILURE; } SG::ReadHandle<xAOD::TrigMissingETContainer> hlt_tc_met_cont(m_hlt_tc_met_key, ctx); if (hlt_tc_met_cont->size()==0 || ! hlt_tc_met_cont.isValid() ) { - ATH_MSG_INFO("evtStore() does not contain HLT MET Collection with name "<< m_hlt_tc_met_key); + ATH_MSG_WARNING("evtStore() does not contain HLT MET Collection with name "<< m_hlt_tc_met_key); //return StatusCode::FAILURE; } SG::ReadHandle<xAOD::TrigMissingETContainer> hlt_tcpufit_met_cont(m_hlt_tcpufit_met_key, ctx); if (hlt_tcpufit_met_cont->size()==0 || ! hlt_tcpufit_met_cont.isValid() ) { - ATH_MSG_INFO("evtStore() does not contain HLT MET Collection with name "<< m_hlt_tcpufit_met_key); + ATH_MSG_WARNING("evtStore() does not contain HLT MET Collection with name "<< m_hlt_tcpufit_met_key); //return StatusCode::FAILURE; } @@ -138,14 +138,24 @@ StatusCode TrigMETMonitorAlgorithm::fillHistograms( const EventContext& ctx ) co // TDT test if (m_trigDecTool->isPassed("HLT_xe30_cell_L1XE10")) { - ATH_MSG_INFO("passed HLT_xe30_cell_L1XE10"); + ATH_MSG_DEBUG("passed HLT_xe30_cell_L1XE10"); } else { - ATH_MSG_INFO("not passed HLT_xe30_cell_L1XE10"); + ATH_MSG_DEBUG("not passed HLT_xe30_cell_L1XE10"); } - if (m_trigDecTool->isPassed("HLT_xe110_pufit_xe70_L1XE50")) { - ATH_MSG_INFO("passed HLT_xe110_pufit_xe70l_L1XE50"); + if (m_trigDecTool->isPassed("HLT_xe30_cell_xe30_tcpufit_L1XE10")) { + ATH_MSG_DEBUG("passed HLT_xe30_cell_xe30_tcpufit_L1XE10"); } else { - ATH_MSG_INFO("not passed HLT_xe110_pufit_xe70_L1XE50"); + ATH_MSG_DEBUG("not passed HLT_xe30_cell_xe30_tcpufit_L1XE10"); + } + if (m_trigDecTool->isPassed("HLT_xe30_tcpufit_L1XE10")) { + ATH_MSG_DEBUG("passed HLT_xe30_tcpufit_L1XE10"); + } else { + ATH_MSG_DEBUG("not passed HLT_xe30_tcpufit_L1XE10"); + } + if (m_trigDecTool->isPassed(m_triggerChainString)) { + ATH_MSG_DEBUG("passed " << m_triggerChainString); + } else { + ATH_MSG_DEBUG("not passed " << m_triggerChainString); } // check active triggers @@ -155,7 +165,7 @@ StatusCode TrigMETMonitorAlgorithm::fillHistograms( const EventContext& ctx ) co for(auto &trig : chainGroup->getListOfTriggers()) { auto cg = m_trigDecTool->getChainGroup(trig); std::string thisTrig = trig; - ATH_MSG_INFO (thisTrig << " chain prescale = " << cg->getPrescale()); + ATH_MSG_DEBUG (thisTrig << " chain prescale = " << cg->getPrescale()); } */ -- GitLab