diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py index 3f618a218caab391506c61a0648aaaa1c1e157c3..21c7d14d5dd4bfc73009964bf789d12e08ef5c76 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastElectronHypoTool.py @@ -4,7 +4,6 @@ from AthenaCommon.SystemOfUnits import GeV from AthenaCommon.Logging import logging from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool - log = logging.getLogger('TrigEgammaFastElectronHypoTool') def TrigEgammaFastElectronHypoToolFromDict( chainDict ): @@ -16,7 +15,7 @@ def TrigEgammaFastElectronHypoToolFromDict( chainDict ): name = chainDict['chainName'] from AthenaConfiguration.ComponentFactory import CompFactory tool = CompFactory.TrigEgammaFastElectronHypoTool(name) - + if 'idperf' in name: tool.AcceptAll = True @@ -56,6 +55,7 @@ def TrigEgammaFastElectronHypoToolFromDict( chainDict ): tool.CaloTrackdPHI[ th ] = 999. else: raise RuntimeError('No threshold: Default cut configured') + return tool diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.cxx index 6d9fbd58befff53b3944f459f75e58cca6d54735..92c66a26209f68b9cccee4a604eaddc0bcd5c29f 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronFexMT.cxx @@ -108,8 +108,10 @@ StatusCode TrigEgammaFastElectronFexMT::execute() { ATH_MSG_DEBUG( "Made WriteHandle " << m_outputElectronsKey ); auto trigDummyElecColl = SG::makeHandle (m_outputDummyElectronsKey, ctx); - + ATH_MSG_DEBUG( "Made Dummy WriteHandle " << m_outputDummyElectronsKey ); + ATH_CHECK( trigDummyElecColl.record (std::make_unique<xAOD::TrigElectronContainer>(), + std::make_unique<xAOD::TrigEMClusterAuxContainer>()) ); auto roiCollection = SG::makeHandle(m_roiCollectionKey, ctx); ATH_MSG_DEBUG( "Made handle " << m_roiCollectionKey ); @@ -196,6 +198,7 @@ StatusCode TrigEgammaFastElectronFexMT::execute() { /**********************/ ATH_MSG_DEBUG("Debo6"); + trigDummyElecColl->push_back(trigDummyElec); trigDummyElec->init( 0, 0, 0, 0, clusEL, @@ -204,7 +207,6 @@ StatusCode TrigEgammaFastElectronFexMT::execute() { /**********************/ ATH_MSG_DEBUG("Debo7"); - trigDummyElecColl->push_back(trigDummyElec); // loop over tracks /**********************/ diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronHypoTool.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronHypoTool.cxx index b9f4af0006df3f2ad3a4c6da2a7a714070ff25b7..18c602f01a9d8f037495a6164a472abd90895650 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronHypoTool.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaFastElectronHypoTool.cxx @@ -50,6 +50,17 @@ TrigEgammaFastElectronHypoTool::~TrigEgammaFastElectronHypoTool() {} bool TrigEgammaFastElectronHypoTool::decideOnSingleObject( const xAOD::TrigElectron* electron, size_t cutIndex ) const { + bool pass=false; + + if ( m_acceptAll ) { + pass = true; + ATH_MSG_DEBUG( "AcceptAll property is set: taking all events" ); + return pass; + } else { + pass = false; + ATH_MSG_DEBUG( "AcceptAll property not set: applying selection" ); + } + auto cutCounter = Monitored::Scalar<int>( "CutCounter", -1 ); auto cutIndexM = Monitored::Scalar<int>( "CutIndex", cutIndex ); // one can do 2D plots for each cut independently auto ptCalo = Monitored::Scalar( "PtCalo", -999. ); @@ -67,8 +78,10 @@ bool TrigEgammaFastElectronHypoTool::decideOnSingleObject( const xAOD::TrigElect caloEta, caloPhi ); const xAOD::TrackParticle* trkIter = electron-> trackParticle(); - if ( trkIter == 0 ) // disconsider candidates without track - return false; + if ( trkIter == 0 ){ // disconsider candidates without track + pass = false; + return pass; + } cutCounter++; // Retrieve all quantities @@ -87,38 +100,50 @@ bool TrigEgammaFastElectronHypoTool::decideOnSingleObject( const xAOD::TrigElect ATH_MSG_VERBOSE( "Cut index " << cutIndex ); if ( ptCalo < m_trackPt[cutIndex] ){ ATH_MSG_VERBOSE( "Fails pt cut" << ptCalo << " < " << m_trackPt[cutIndex] ); - return false; + pass = false; + return pass; } cutCounter++; if ( dEtaCalo > m_caloTrackDEta[cutIndex] ) { ATH_MSG_VERBOSE( "Fails dEta cut " << dEtaCalo << " < " << m_caloTrackDEta[cutIndex] ); - return false; + + pass = false; + return pass; } cutCounter++; if ( dPhiCalo > m_caloTrackDPhi[cutIndex] ) { ATH_MSG_VERBOSE( "Fails dPhi cut " << dPhiCalo << " < " << m_caloTrackDPhi[cutIndex] ); - return false; + + pass = false; + return pass; } cutCounter++; if( eToverPt < m_caloTrackdEoverPLow[cutIndex] ) { ATH_MSG_VERBOSE( "Fails eoverp low cut " << eToverPt << " < " << m_caloTrackdEoverPLow[cutIndex] ); - return false; + + pass = true; + return pass; } cutCounter++; if ( eToverPt > m_caloTrackdEoverPHigh[cutIndex] ) { ATH_MSG_VERBOSE( "Fails eoverp high cut " << eToverPt << " < " << m_caloTrackdEoverPHigh[cutIndex] ); - return false; + + pass = false; + return pass; } cutCounter++; if ( TRTHitRatio < m_trtRatio[cutIndex] ){ ATH_MSG_VERBOSE( "Fails TRT cut " << TRTHitRatio << " < " << m_trtRatio[cutIndex] ); - return false; + + pass = false; + return pass; } cutCounter++; ATH_MSG_DEBUG( "Passed selection" ); - return true; + pass = true; + return pass; } diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py index 90298838e5d175a06635ee87e067be5521bc3ad8..447c38a661c7665e83f440361f7fefbc23126ba0 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py @@ -1,7 +1,6 @@ # # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # -from AthenaConfiguration.AllConfigFlags import ConfigFlags # menu components from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import MenuSequence, RecoFragmentsPool @@ -9,7 +8,6 @@ from AthenaCommon.CFElements import parOR, seqAND from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm from DecisionHandling.DecisionHandlingConf import ViewCreatorCentredOnClusterROITool from TrigEDMConfig.TriggerEDMRun3 import recordable -from AthenaCommon.Constants import DEBUG def fastElectronSequence(do_idperf): """ second step: tracking.....""" @@ -38,7 +36,7 @@ def fastElectronSequence(do_idperf): theElectronFex.TrackParticlesName = TrackParticlesName theElectronFex.ElectronsName=recordable("HLT_FastElectrons") theElectronFex.DummyElectronsName= "HLT_FastDummyElectrons" - #theElectronFex.OutputLevel = DEBUG + # EVCreator: l2ElectronViewsMaker = EventViewCreatorAlgorithm("IMl2Electron") l2ElectronViewsMaker.RoIsLink = "initialRoI" # Merge inputs based on their initial L1 ROI @@ -72,9 +70,11 @@ def fastElectronMenuSequence(do_idperf): # make the Hypo from TrigEgammaHypo.TrigEgammaHypoConf import TrigEgammaFastElectronHypoAlgMT - theElectronHypo = TrigEgammaFastElectronHypoAlgMT() + if do_idperf is True: + theElectronHypo = TrigEgammaFastElectronHypoAlgMT("TrigEgammaFastElectronHypoAlgMT_idperf") + else: + theElectronHypo = TrigEgammaFastElectronHypoAlgMT("TrigEgammaFastElectronHypoAlgMT") theElectronHypo.Electrons = sequenceOut - theElectronHypo.RunInView=True from TrigEgammaHypo.TrigEgammaFastElectronHypoTool import TrigEgammaFastElectronHypoToolFromDict diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py index 5e099641c19390025dc26bcc08415c0ccdf496c0..95a563eefcd846b5cd0f8ecbb3d622f2f38fce38 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py @@ -105,6 +105,7 @@ def setupMenu(): ChainProp(name='HLT_e5_lhmedium_L1EM3', groups=SingleElectronGroup), ChainProp(name='HLT_e5_lhtight_L1EM3', groups=SingleElectronGroup), ChainProp(name='HLT_e5_lhtight_nod0_L1EM3', groups=SingleElectronGroup), + ChainProp(name='HLT_e5_idperf_L1EM3', groups=SingleElectronGroup), # Primary ChainProp(name='HLT_e17_lhvloose_nod0_L1EM15VH', groups=SingleElectronGroup),