Skip to content
Snippets Groups Projects
Commit c15cd156 authored by Debottam Bakshi Gupta's avatar Debottam Bakshi Gupta
Browse files

Debugging errors in TrigEgammaFastElectronHypoTool and hypotool's AcceptAll property

parent 9255fbde
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!39047Adding dummy electron in TrigEgammaFastElectronFexMT to accommodate idperf chain
...@@ -4,7 +4,6 @@ from AthenaCommon.SystemOfUnits import GeV ...@@ -4,7 +4,6 @@ from AthenaCommon.SystemOfUnits import GeV
from AthenaCommon.Logging import logging from AthenaCommon.Logging import logging
from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
log = logging.getLogger('TrigEgammaFastElectronHypoTool') log = logging.getLogger('TrigEgammaFastElectronHypoTool')
def TrigEgammaFastElectronHypoToolFromDict( chainDict ): def TrigEgammaFastElectronHypoToolFromDict( chainDict ):
...@@ -16,7 +15,7 @@ def TrigEgammaFastElectronHypoToolFromDict( chainDict ): ...@@ -16,7 +15,7 @@ def TrigEgammaFastElectronHypoToolFromDict( chainDict ):
name = chainDict['chainName'] name = chainDict['chainName']
from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentFactory import CompFactory
tool = CompFactory.TrigEgammaFastElectronHypoTool(name) tool = CompFactory.TrigEgammaFastElectronHypoTool(name)
if 'idperf' in name: if 'idperf' in name:
tool.AcceptAll = True tool.AcceptAll = True
...@@ -56,6 +55,7 @@ def TrigEgammaFastElectronHypoToolFromDict( chainDict ): ...@@ -56,6 +55,7 @@ def TrigEgammaFastElectronHypoToolFromDict( chainDict ):
tool.CaloTrackdPHI[ th ] = 999. tool.CaloTrackdPHI[ th ] = 999.
else: else:
raise RuntimeError('No threshold: Default cut configured') raise RuntimeError('No threshold: Default cut configured')
return tool return tool
......
...@@ -108,8 +108,10 @@ StatusCode TrigEgammaFastElectronFexMT::execute() { ...@@ -108,8 +108,10 @@ StatusCode TrigEgammaFastElectronFexMT::execute() {
ATH_MSG_DEBUG( "Made WriteHandle " << m_outputElectronsKey ); ATH_MSG_DEBUG( "Made WriteHandle " << m_outputElectronsKey );
auto trigDummyElecColl = SG::makeHandle (m_outputDummyElectronsKey, ctx); auto trigDummyElecColl = SG::makeHandle (m_outputDummyElectronsKey, ctx);
ATH_MSG_DEBUG( "Made Dummy WriteHandle " << m_outputDummyElectronsKey ); 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); auto roiCollection = SG::makeHandle(m_roiCollectionKey, ctx);
ATH_MSG_DEBUG( "Made handle " << m_roiCollectionKey ); ATH_MSG_DEBUG( "Made handle " << m_roiCollectionKey );
...@@ -196,6 +198,7 @@ StatusCode TrigEgammaFastElectronFexMT::execute() { ...@@ -196,6 +198,7 @@ StatusCode TrigEgammaFastElectronFexMT::execute() {
/**********************/ /**********************/
ATH_MSG_DEBUG("Debo6"); ATH_MSG_DEBUG("Debo6");
trigDummyElecColl->push_back(trigDummyElec);
trigDummyElec->init( 0, trigDummyElec->init( 0,
0, 0, 0, 0, 0, 0,
clusEL, clusEL,
...@@ -204,7 +207,6 @@ StatusCode TrigEgammaFastElectronFexMT::execute() { ...@@ -204,7 +207,6 @@ StatusCode TrigEgammaFastElectronFexMT::execute() {
/**********************/ /**********************/
ATH_MSG_DEBUG("Debo7"); ATH_MSG_DEBUG("Debo7");
trigDummyElecColl->push_back(trigDummyElec);
// loop over tracks // loop over tracks
/**********************/ /**********************/
......
...@@ -50,6 +50,17 @@ TrigEgammaFastElectronHypoTool::~TrigEgammaFastElectronHypoTool() {} ...@@ -50,6 +50,17 @@ TrigEgammaFastElectronHypoTool::~TrigEgammaFastElectronHypoTool() {}
bool TrigEgammaFastElectronHypoTool::decideOnSingleObject( const xAOD::TrigElectron* electron, bool TrigEgammaFastElectronHypoTool::decideOnSingleObject( const xAOD::TrigElectron* electron,
size_t cutIndex ) const { 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 cutCounter = Monitored::Scalar<int>( "CutCounter", -1 );
auto cutIndexM = Monitored::Scalar<int>( "CutIndex", cutIndex ); // one can do 2D plots for each cut independently auto cutIndexM = Monitored::Scalar<int>( "CutIndex", cutIndex ); // one can do 2D plots for each cut independently
auto ptCalo = Monitored::Scalar( "PtCalo", -999. ); auto ptCalo = Monitored::Scalar( "PtCalo", -999. );
...@@ -67,8 +78,10 @@ bool TrigEgammaFastElectronHypoTool::decideOnSingleObject( const xAOD::TrigElect ...@@ -67,8 +78,10 @@ bool TrigEgammaFastElectronHypoTool::decideOnSingleObject( const xAOD::TrigElect
caloEta, caloPhi ); caloEta, caloPhi );
const xAOD::TrackParticle* trkIter = electron-> trackParticle(); const xAOD::TrackParticle* trkIter = electron-> trackParticle();
if ( trkIter == 0 ) // disconsider candidates without track if ( trkIter == 0 ){ // disconsider candidates without track
return false; pass = false;
return pass;
}
cutCounter++; cutCounter++;
// Retrieve all quantities // Retrieve all quantities
...@@ -87,38 +100,50 @@ bool TrigEgammaFastElectronHypoTool::decideOnSingleObject( const xAOD::TrigElect ...@@ -87,38 +100,50 @@ bool TrigEgammaFastElectronHypoTool::decideOnSingleObject( const xAOD::TrigElect
ATH_MSG_VERBOSE( "Cut index " << cutIndex ); ATH_MSG_VERBOSE( "Cut index " << cutIndex );
if ( ptCalo < m_trackPt[cutIndex] ){ if ( ptCalo < m_trackPt[cutIndex] ){
ATH_MSG_VERBOSE( "Fails pt cut" << ptCalo << " < " << m_trackPt[cutIndex] ); ATH_MSG_VERBOSE( "Fails pt cut" << ptCalo << " < " << m_trackPt[cutIndex] );
return false; pass = false;
return pass;
} }
cutCounter++; cutCounter++;
if ( dEtaCalo > m_caloTrackDEta[cutIndex] ) { if ( dEtaCalo > m_caloTrackDEta[cutIndex] ) {
ATH_MSG_VERBOSE( "Fails dEta cut " << dEtaCalo << " < " << m_caloTrackDEta[cutIndex] ); ATH_MSG_VERBOSE( "Fails dEta cut " << dEtaCalo << " < " << m_caloTrackDEta[cutIndex] );
return false;
pass = false;
return pass;
} }
cutCounter++; cutCounter++;
if ( dPhiCalo > m_caloTrackDPhi[cutIndex] ) { if ( dPhiCalo > m_caloTrackDPhi[cutIndex] ) {
ATH_MSG_VERBOSE( "Fails dPhi cut " << dPhiCalo << " < " << m_caloTrackDPhi[cutIndex] ); ATH_MSG_VERBOSE( "Fails dPhi cut " << dPhiCalo << " < " << m_caloTrackDPhi[cutIndex] );
return false;
pass = false;
return pass;
} }
cutCounter++; cutCounter++;
if( eToverPt < m_caloTrackdEoverPLow[cutIndex] ) { if( eToverPt < m_caloTrackdEoverPLow[cutIndex] ) {
ATH_MSG_VERBOSE( "Fails eoverp low cut " << eToverPt << " < " << m_caloTrackdEoverPLow[cutIndex] ); ATH_MSG_VERBOSE( "Fails eoverp low cut " << eToverPt << " < " << m_caloTrackdEoverPLow[cutIndex] );
return false;
pass = true;
return pass;
} }
cutCounter++; cutCounter++;
if ( eToverPt > m_caloTrackdEoverPHigh[cutIndex] ) { if ( eToverPt > m_caloTrackdEoverPHigh[cutIndex] ) {
ATH_MSG_VERBOSE( "Fails eoverp high cut " << eToverPt << " < " << m_caloTrackdEoverPHigh[cutIndex] ); ATH_MSG_VERBOSE( "Fails eoverp high cut " << eToverPt << " < " << m_caloTrackdEoverPHigh[cutIndex] );
return false;
pass = false;
return pass;
} }
cutCounter++; cutCounter++;
if ( TRTHitRatio < m_trtRatio[cutIndex] ){ if ( TRTHitRatio < m_trtRatio[cutIndex] ){
ATH_MSG_VERBOSE( "Fails TRT cut " << TRTHitRatio << " < " << m_trtRatio[cutIndex] ); ATH_MSG_VERBOSE( "Fails TRT cut " << TRTHitRatio << " < " << m_trtRatio[cutIndex] );
return false;
pass = false;
return pass;
} }
cutCounter++; cutCounter++;
ATH_MSG_DEBUG( "Passed selection" ); ATH_MSG_DEBUG( "Passed selection" );
return true; pass = true;
return pass;
} }
......
# #
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# #
from AthenaConfiguration.AllConfigFlags import ConfigFlags
# menu components # menu components
from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import MenuSequence, RecoFragmentsPool from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import MenuSequence, RecoFragmentsPool
...@@ -9,7 +8,6 @@ from AthenaCommon.CFElements import parOR, seqAND ...@@ -9,7 +8,6 @@ from AthenaCommon.CFElements import parOR, seqAND
from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm
from DecisionHandling.DecisionHandlingConf import ViewCreatorCentredOnClusterROITool from DecisionHandling.DecisionHandlingConf import ViewCreatorCentredOnClusterROITool
from TrigEDMConfig.TriggerEDMRun3 import recordable from TrigEDMConfig.TriggerEDMRun3 import recordable
from AthenaCommon.Constants import DEBUG
def fastElectronSequence(do_idperf): def fastElectronSequence(do_idperf):
""" second step: tracking.....""" """ second step: tracking....."""
...@@ -38,7 +36,7 @@ def fastElectronSequence(do_idperf): ...@@ -38,7 +36,7 @@ def fastElectronSequence(do_idperf):
theElectronFex.TrackParticlesName = TrackParticlesName theElectronFex.TrackParticlesName = TrackParticlesName
theElectronFex.ElectronsName=recordable("HLT_FastElectrons") theElectronFex.ElectronsName=recordable("HLT_FastElectrons")
theElectronFex.DummyElectronsName= "HLT_FastDummyElectrons" theElectronFex.DummyElectronsName= "HLT_FastDummyElectrons"
#theElectronFex.OutputLevel = DEBUG
# EVCreator: # EVCreator:
l2ElectronViewsMaker = EventViewCreatorAlgorithm("IMl2Electron") l2ElectronViewsMaker = EventViewCreatorAlgorithm("IMl2Electron")
l2ElectronViewsMaker.RoIsLink = "initialRoI" # Merge inputs based on their initial L1 ROI l2ElectronViewsMaker.RoIsLink = "initialRoI" # Merge inputs based on their initial L1 ROI
...@@ -72,9 +70,11 @@ def fastElectronMenuSequence(do_idperf): ...@@ -72,9 +70,11 @@ def fastElectronMenuSequence(do_idperf):
# make the Hypo # make the Hypo
from TrigEgammaHypo.TrigEgammaHypoConf import TrigEgammaFastElectronHypoAlgMT from TrigEgammaHypo.TrigEgammaHypoConf import TrigEgammaFastElectronHypoAlgMT
theElectronHypo = TrigEgammaFastElectronHypoAlgMT() if do_idperf is True:
theElectronHypo = TrigEgammaFastElectronHypoAlgMT("TrigEgammaFastElectronHypoAlgMT_idperf")
else:
theElectronHypo = TrigEgammaFastElectronHypoAlgMT("TrigEgammaFastElectronHypoAlgMT")
theElectronHypo.Electrons = sequenceOut theElectronHypo.Electrons = sequenceOut
theElectronHypo.RunInView=True theElectronHypo.RunInView=True
from TrigEgammaHypo.TrigEgammaFastElectronHypoTool import TrigEgammaFastElectronHypoToolFromDict from TrigEgammaHypo.TrigEgammaFastElectronHypoTool import TrigEgammaFastElectronHypoToolFromDict
......
...@@ -105,6 +105,7 @@ def setupMenu(): ...@@ -105,6 +105,7 @@ def setupMenu():
ChainProp(name='HLT_e5_lhmedium_L1EM3', groups=SingleElectronGroup), ChainProp(name='HLT_e5_lhmedium_L1EM3', groups=SingleElectronGroup),
ChainProp(name='HLT_e5_lhtight_L1EM3', groups=SingleElectronGroup), ChainProp(name='HLT_e5_lhtight_L1EM3', groups=SingleElectronGroup),
ChainProp(name='HLT_e5_lhtight_nod0_L1EM3', groups=SingleElectronGroup), ChainProp(name='HLT_e5_lhtight_nod0_L1EM3', groups=SingleElectronGroup),
ChainProp(name='HLT_e5_idperf_L1EM3', groups=SingleElectronGroup),
# Primary # Primary
ChainProp(name='HLT_e17_lhvloose_nod0_L1EM15VH', groups=SingleElectronGroup), ChainProp(name='HLT_e17_lhvloose_nod0_L1EM15VH', groups=SingleElectronGroup),
......
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