diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBjetEtHypoTool.py b/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBjetEtHypoTool.py index 9137873f13def36591d7e9c1b5a39d373d61e326..fb9689679cae1c158c052358bc6bae2c1bde743f 100644 --- a/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBjetEtHypoTool.py +++ b/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBjetEtHypoTool.py @@ -1,7 +1,7 @@ # Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration import re -re_Bjet = re.compile(r'^HLT_(?P<multiplicity>\d+)?j(?P<threshold>\d+)(?:_gsc(?P<gscThreshold>\d+))?(?:_b(?P<bTag>[^_]+)(?:_(?P<bConfig>split))?)?$') +re_Bjet = re.compile(r'^HLT_(?P<multiplicity>\d+)?j(?P<threshold>\d+)(?:_gsc(?P<gscThreshold>\d+))?(?:_b(?P<bTag>[^_]+)(?:_(?P<bConfig>split))?(?:_(?P<minEta>\d+)eta(?P<maxEta>\d+))?)?(?:_L1(?P<L1>.*))?$') from AthenaCommon.Logging import logging from AthenaCommon.SystemOfUnits import GeV @@ -17,7 +17,10 @@ def TrigBjetEtHypoToolFromName_j( name, conf ): 'multiplicity' : '1', 'gscThreshold' : '0', 'bTag' : 'offperf', - 'bConfig' : 'split' } + 'bConfig' : 'EF', + 'minEta' : '0', + 'maxEta' : '320', + 'L1' : None } chain = conf match = re_Bjet.match( chain ) @@ -32,6 +35,8 @@ def TrigBjetEtHypoToolFromName_j( name, conf ): tool.OutputLevel = DEBUG tool.AcceptAll = False tool.EtThreshold = float(conf_dict['threshold']) * GeV + tool.MinEtaThreshold = float(conf_dict['minEta']) / 100 + tool.MaxEtaThreshold = float(conf_dict['maxEta']) / 100 print "TrigBjetEtHypoToolFromName_j: name = %s, cut_j = %s "%(name,tool.EtThreshold) return tool @@ -44,7 +49,10 @@ def TrigBjetEtHypoToolFromName_gsc( name, conf ): 'multiplicity' : '1', 'gscThreshold' : '0', 'bTag' : 'offperf', - 'bConfig' : 'split' } + 'bConfig' : 'EF', + 'minEta' : '0', + 'maxEta' : '320', + 'L1' : None } chain = conf match = re_Bjet.match( chain ) @@ -59,6 +67,8 @@ def TrigBjetEtHypoToolFromName_gsc( name, conf ): tool.OutputLevel = DEBUG tool.AcceptAll = False tool.EtThreshold = float(conf_dict['gscThreshold']) * GeV + tool.MinEtaThreshold = float(conf_dict['minEta']) / 100 + tool.MaxEtaThreshold = float(conf_dict['maxEta']) / 100 print "TrigBjetEtHypoToolFromName_gsc: name = %s, cut_j = %s "%(name,tool.EtThreshold) return tool diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBjetHypoTool.py b/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBjetHypoTool.py index 0f77043b8b96d467a976bd2bdabd69a06558ef6e..4dc32518930b5bda04905cc31eab1b683233ae7b 100644 --- a/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBjetHypoTool.py +++ b/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBjetHypoTool.py @@ -1,7 +1,7 @@ # Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration import re -re_Bjet = re.compile(r'^HLT_(?P<multiplicity>\d+)?j(?P<threshold>\d+)(?:_gsc(?P<gscThreshold>\d+))?(?:_b(?P<bTag>[^_]+)(?:_(?P<bConfig>split))?)?$') +re_Bjet = re.compile(r'^HLT_(?P<multiplicity>\d+)?j(?P<threshold>\d+)(?:_gsc(?P<gscThreshold>\d+))?(?:_b(?P<bTag>[^_]+)(?:_(?P<bConfig>split))?(?:_(?P<minEta>\d+)eta(?P<maxEta>\d+))?)?(?:_L1(?P<L1>.*))?$') from AthenaCommon.Logging import logging from AthenaCommon.SystemOfUnits import GeV @@ -43,7 +43,9 @@ def TrigBjetHypoToolFromName( name, conf ): 'multiplicity' : '1', 'gscThreshold' : '0', 'bTag' : 'offperf', - 'bConfig' : 'split' } + 'bConfig' : 'EF', + 'minEta' : '0', + 'maxEta' : '320'} chain = conf match = re_Bjet.match( chain ) diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoTool.cxx b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoTool.cxx index 0764ade8b20131c1e4aaf14446febc38a59f25ad..a38a2235168a94e78669078de5f0b1f4bb055c62 100755 --- a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoTool.cxx +++ b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoTool.cxx @@ -32,6 +32,8 @@ StatusCode TrigBjetEtHypoTool::initialize() { ATH_MSG_DEBUG( "declareProperty review:" ); ATH_MSG_DEBUG( " " << m_acceptAll ); ATH_MSG_DEBUG( " " << m_etThreshold ); + ATH_MSG_DEBUG( " " << m_minEtaThreshold ); + ATH_MSG_DEBUG( " " << m_maxEtaThreshold ); ATH_MSG_DEBUG( "Tool configured for chain/id: " << m_id ); return StatusCode::SUCCESS; @@ -48,12 +50,11 @@ StatusCode TrigBjetEtHypoTool::decide( const xAOD::Jet *jet,bool &pass ) const { ATH_MSG_DEBUG( " ** eta = " << jet->eta() ); ATH_MSG_DEBUG( " ** phi = " << jet->phi() ); - pass = false; + pass = true; if ( m_acceptAll ) { ATH_MSG_DEBUG( "REGTEST: AcceptAll property is set: taking all events" ); ATH_MSG_DEBUG( "REGTEST: Trigger decision is 1" ); - pass = true; return StatusCode::SUCCESS; } @@ -62,14 +63,22 @@ StatusCode TrigBjetEtHypoTool::decide( const xAOD::Jet *jet,bool &pass ) const { // Run on Jet Collection ATH_MSG_DEBUG( "EtHypo on Jet " << jet->p4().Et() ); ATH_MSG_DEBUG( " Et Threshold " << m_etThreshold ); + ATH_MSG_DEBUG( " Eta Window " << m_minEtaThreshold <<" -- " << m_maxEtaThreshold ); float et = jet->p4().Et(); + float eta = jet->eta(); ATH_MSG_DEBUG( "REGTEST: EF jet with et = " << et ); + ATH_MSG_DEBUG( "REGTEST: EF jet with eta = " << eta ); ATH_MSG_DEBUG( "REGTEST: Requiring EF jets to satisfy 'j' Et > " << m_etThreshold ); - - if ( et >= m_etThreshold ) - pass = true; + ATH_MSG_DEBUG( "REGTEST: Requiring EF jets to satisfy " << m_minEtaThreshold <<" < |Eta| < " << m_maxEtaThreshold ); + + if ( et < m_etThreshold ) + pass = false; + if ( fabs(eta) < m_minEtaThreshold ) + pass = false; + if ( fabs(eta) > m_maxEtaThreshold ) + pass = false; if ( pass ) { ATH_MSG_DEBUG( "Selection cut satisfied, accepting the event" ); diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoTool.h b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoTool.h index 8a37d9af62b29c04aae296076383f38136fed1ff..0f2eca5a51427327a13703c0aca181014d91cb00 100755 --- a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoTool.h +++ b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetEtHypoTool.h @@ -59,6 +59,10 @@ class TrigBjetEtHypoTool : virtual public ::AthAlgTool { Gaudi::Property< bool > m_acceptAll {this,"AcceptAll",false,"if acceptAll flag is set to true, every event is taken"}; /** @brief DeclareProperty: Et threshold cut. */ Gaudi::Property< float > m_etThreshold {this,"EtThreshold",0.0,"Et threshold cut"}; + /** @brief DeclareProperty: min eta threshold cut. */ + Gaudi::Property< float > m_minEtaThreshold {this,"MinEtaThreshold",0.0,"Min Eta threshold cut"}; + /** @brief DeclareProperty: max eta threshold cut. */ + Gaudi::Property< float > m_maxEtaThreshold {this,"MaxEtaThreshold",0.0,"Max Eta threshold cut"}; }; inline const InterfaceID& TrigBjetEtHypoTool::interfaceID()