Skip to content
Snippets Groups Projects
Commit c881cd1b authored by Kenji Hamano's avatar Kenji Hamano
Browse files

TrigMETMonitorAlgorithm update

parent c8092086
No related branches found
No related tags found
No related merge requests found
......@@ -29,11 +29,11 @@ def TrigMETMonConfig(inputFlags):
#The added algorithm must exist as a .h file
from TrigMETMonitoring.TrigMETMonitoringConf import TrigMETMonitorAlgorithm
expertTrigMETMonAlg = helper.addAlgorithm(TrigMETMonitorAlgorithm,'expertTrigMETMonAlg')
TrigMETMonAlg = helper.addAlgorithm(TrigMETMonitorAlgorithm,'TrigMETMonAlg')
# You can actually make multiple instances of the same algorithm and give
# them different configurations
shifterTrigMETMonAlg = helper.addAlgorithm(TrigMETMonitorAlgorithm,'ShifterTrigMETMonAlg')
TrigMETMonChainAlg = helper.addAlgorithm(TrigMETMonitorAlgorithm,'TrigMETMonChainAlg')
# # If for some really obscure reason you need to instantiate an algorithm
# # yourself, the AddAlgorithm method will still configure the base
......@@ -46,21 +46,24 @@ def TrigMETMonConfig(inputFlags):
# some generic property
# expertTrigMETMonAlg.RandomHist = True
# to enable a trigger filter, for example:
# expertTrigMETMonAlg.TriggerChain = 'HLT_xe30_cell_L1XE10'
# shifterTrigMETMonAlg.TriggerChain = 'HLT_xe30_cell_L1XE10'
# TrigMETMonAlg.TriggerChain = 'HLT_xe30_cell_L1XE10'
# possible chains as of Sep 2019 are
# L1_XE10,L1_XE50,
# HLT_xe30_cell_L1XE10,HLT_xe30_cell_xe30_tcpufit_L1XE10,HLT_xe30_tcpufit_L1XE10,HLT_xe65_cell_L1XE50,
# HLT_xe110_pufit_xe65_L1XE50,HLT_xe110_pufit_xe70_L1XE50,
# HLT_xe110_pufit_xe65_L1gXERHO50,HLT_xe110_pufit_xe65_L1gXEPUFIT50,
# HLT_xe0noL1_l2fsperf_L1gXERHO50,HLT_xe0noL1_l2fsperf_L1gXEPUFIT50,
# HLT_xe0noL1_l2fsperf_pufit_L1gXERHO50,HLT_xe0noL1_l2fsperf_pufit_L1gXEPUFIT50
# without filters, all events are processed.
TrigMETMonChainAlg.TriggerChain = 'HLT_xe30_tcpufit_L1XE10'
### use the follwoing if you run on Run2 AOD
#expertTrigMETMonAlg.TriggerChain = 'HLT_xe110_pufit_xe65_L1XE50'
#expertTrigMETMonAlg.hlt_cell_key = 'HLT_xAOD__TrigMissingETContainer_TrigEFMissingET'
#expertTrigMETMonAlg.hlt_mt_key = 'HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_mht'
#expertTrigMETMonAlg.hlt_tc_key = 'HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_topocl'
#expertTrigMETMonAlg.hlt_tcpufit_key = 'HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_topocl_PUC'
#shifterTrigMETMonAlg.hlt_cell_key = 'HLT_xAOD__TrigMissingETContainer_TrigEFMissingET'
#shifterTrigMETMonAlg.hlt_mt_key = 'HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_mht'
#shifterTrigMETMonAlg.hlt_tc_key = 'HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_topocl'
#shifterTrigMETMonAlg.hlt_tcpufit_key = 'HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_topocl_PUC'
#TrigMETMonAlg.hlt_cell_key = 'HLT_xAOD__TrigMissingETContainer_TrigEFMissingET'
#TrigMETMonAlg.hlt_mt_key = 'HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_mht'
#TrigMETMonAlg.hlt_tc_key = 'HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_topocl'
#TrigMETMonAlg.hlt_tcpufit_key = 'HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_topocl_PUC'
### STEP 4 ###
......@@ -82,44 +85,50 @@ def TrigMETMonConfig(inputFlags):
# Add a generic monitoring tool (a "group" in old language). The returned
# object here is the standard GenericMonitoringTool.
expertGroup = helper.addGroup(expertTrigMETMonAlg,'TrigMETMonitor','HLT/METMon/Expert/')
metGroup = helper.addGroup(TrigMETMonAlg,'TrigMETMonitor','HLT/METMon/')
# Add a GMT for the other example monitor algorithm
shifterGroup = helper.addGroup(shifterTrigMETMonAlg,'TrigMETMonitor','HLT/METMon/Shifter/')
metChainGroup = helper.addGroup(TrigMETMonChainAlg,'TrigMETMonitor','HLT/METMon/Expert/Chain/')
### STEP 5 ###
# 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)
shifterGroup.defineHistogram('L1_Ey',title='L1 Missing E_{y};E_{y} (GeV);Events',
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)
shifterGroup.defineHistogram('cell_Ex',title='cell Missing E_{x};E_{x} (GeV);Events',
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)
shifterGroup.defineHistogram('cell_Et',title='cell Missing E_{T};E_{T} (GeV);Events',
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)
shifterGroup.defineHistogram('tcpufit_Ey',title='tcpufit Missing E_{y};E_{y} (GeV);Events',
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)
expertGroup.defineHistogram('mht_Ex',title='mht Missing E_{x};E_{x} (GeV);Events',
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)
expertGroup.defineHistogram('mht_Et', title='mht E_{T};E_{T} (GeV);Events',
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)
expertGroup.defineHistogram('tc_Ey',title='tc Missing E_{y};E_{y} (GeV);Events',
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)
metGroup.defineHistogram('L1_Ex',title='L1 Missing E_{x};E_{x} (GeV);Events',
path='Shifter/L1',xbins=199,xmin=-298.5,xmax=298.5)
metGroup.defineHistogram('L1_Ey',title='L1 Missing E_{y};E_{y} (GeV);Events',
path='Shifter/L1',xbins=199,xmin=-298.5,xmax=298.5)
metGroup.defineHistogram('L1_Et',title='L1 Missing E_{T};E_{T} (GeV);Events',
path='Shifter/L1',xbins=205,xmin=-13.5,xmax=401.5)
metGroup.defineHistogram('cell_Ex',title='cell Missing E_{x};E_{x} (GeV);Events',
path='Shifter/cell',xbins=199,xmin=-298.5,xmax=298.5)
metGroup.defineHistogram('cell_Ey',title='cell Missing E_{y};E_{y} (GeV);Events',
path='Shifter/cell',xbins=199,xmin=-298.5,xmax=298.5)
metGroup.defineHistogram('cell_Et',title='cell Missing E_{T};E_{T} (GeV);Events',
path='Shifter/cell',xbins=205,xmin=-13.5,xmax=401.5)
metGroup.defineHistogram('tcpufit_Ex',title='tcpufit Missing E_{x};E_{x} (GeV);Events',
path='Shifter/tcpufit',xbins=199,xmin=-298.5,xmax=298.5)
metGroup.defineHistogram('tcpufit_Ey',title='tcpufit Missing E_{y};E_{y} (GeV);Events',
path='Shifter/tcpufit',xbins=199,xmin=-298.5,xmax=298.5)
metGroup.defineHistogram('tcpufit_Et',title='tcpufit Missing E_{T};E_{T} (GeV);Events',
path='Shifter/tcpufit',xbins=205,xmin=-13.5,xmax=401.5)
metGroup.defineHistogram('mht_Ex',title='mht Missing E_{x};E_{x} (GeV);Events',
path='Expert/mht',xbins=199,xmin=-298.5,xmax=298.5)
metGroup.defineHistogram('mht_Ey',title='mht Missing E_{y};E_{y} (GeV);Events',
path='Expert/mht',xbins=199,xmin=-298.5,xmax=298.5)
metGroup.defineHistogram('mht_Et', title='mht E_{T};E_{T} (GeV);Events',
path='Expert/mht',xbins=205,xmin=-13.5,xmax=401.5)
metGroup.defineHistogram('tc_Ex',title='tc Missing E_{x};E_{x} (GeV);Events',
path='Expert/tc',xbins=199,xmin=-298.5,xmax=298.5)
metGroup.defineHistogram('tc_Ey',title='tc Missing E_{y};E_{y} (GeV);Events',
path='Expert/tc',xbins=199,xmin=-298.5,xmax=298.5)
metGroup.defineHistogram('tc_Et', title='tc E_{T};E_{T} (GeV);Events',
path='Expert/tc',xbins=205,xmin=-13.5,xmax=401.5)
metChainGroup.defineHistogram('tcpufit_Ex',title='tcpufit Missing E_{x};E_{x} (GeV);Events',
path='HLT_xe30_tcpufit_L1XE10/tcpufit',xbins=199,xmin=-298.5,xmax=298.5)
metChainGroup.defineHistogram('tcpufit_Ey',title='tcpufit Missing E_{y};E_{y} (GeV);Events',
path='HLT_xe30_tcpufit_L1XE10/tcpufit',xbins=199,xmin=-298.5,xmax=298.5)
metChainGroup.defineHistogram('tcpufit_Et',title='tcpufit Missing E_{T};E_{T} (GeV);Events',
path='HLT_xe30_tcpufit_L1XE10/tcpufit',xbins=205,xmin=-13.5,xmax=401.5)
### STEP 6 ###
# Finalize. The return value should be a tuple of the ComponentAccumulator
......@@ -143,7 +152,7 @@ if __name__=='__main__':
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_old.pool.root']
ConfigFlags.Input.Files = ['/hep300/data/khamano/data18_athenaMT/fromElin/AOD.pool.root']
ConfigFlags.Input.isMC = True
ConfigFlags.Output.HISTFileName = 'TrigMETMonitorOutput.root'
......
......@@ -98,7 +98,7 @@ StatusCode TrigMETMonitorAlgorithm::fillHistograms( const EventContext& ctx ) co
if ((l1_roi_cont->energyX())>-9e12 && (l1_roi_cont->energyX())<9e12 && (l1_roi_cont->energyY())>-9e12 && (l1_roi_cont->energyY())<9e12) {
L1_Ex = - (l1_roi_cont->energyX())/1000.;
L1_Ey = - (l1_roi_cont->energyY())/1000.;
L1_Et = sqrt(L1_Ex*L1_Ex + L1_Ey*L1_Ey);
L1_Et = - (l1_roi_cont->energyT())/1000.;
}
}
*/
......@@ -138,24 +138,19 @@ StatusCode TrigMETMonitorAlgorithm::fillHistograms( const EventContext& ctx ) co
// TDT test
if (m_trigDecTool->isPassed("HLT_xe30_cell_L1XE10")) {
ATH_MSG_DEBUG("passed HLT_xe30_cell_L1XE10");
ATH_MSG_INFO("passed HLT_xe30_cell_L1XE10");
} else {
ATH_MSG_DEBUG("not passed HLT_xe30_cell_L1XE10");
ATH_MSG_INFO("not passed HLT_xe30_cell_L1XE10");
}
if (m_trigDecTool->isPassed("HLT_xe30_cell_xe30_tcpufit_L1XE10")) {
ATH_MSG_DEBUG("passed HLT_xe30_cell_xe30_tcpufit_L1XE10");
ATH_MSG_INFO("passed HLT_xe30_cell_xe30_tcpufit_L1XE10");
} else {
ATH_MSG_DEBUG("not passed HLT_xe30_cell_xe30_tcpufit_L1XE10");
ATH_MSG_INFO("not passed HLT_xe30_cell_xe30_tcpufit_L1XE10");
}
if (m_trigDecTool->isPassed("HLT_xe30_tcpufit_L1XE10")) {
ATH_MSG_DEBUG("passed HLT_xe30_tcpufit_L1XE10");
ATH_MSG_INFO("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);
ATH_MSG_INFO("not passed HLT_xe30_tcpufit_L1XE10");
}
// check active triggers
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment