From 40009e631d9eaa0927281a14b0045ab0a7b20c86 Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <frank.winklmeier@cern.ch> Date: Tue, 20 Sep 2022 15:21:10 +0200 Subject: [PATCH 1/4] TrigHLTMonitoring: optimize chain monitoring Avoid excessive regex parsing when querying the trigger decision for all chains. Relates to ATR-23427. --- .../src/TrigHLTMonitorAlgorithm.cxx | 163 +++++++++--------- 1 file changed, 79 insertions(+), 84 deletions(-) diff --git a/Trigger/TrigMonitoring/TrigHLTMonitoring/src/TrigHLTMonitorAlgorithm.cxx b/Trigger/TrigMonitoring/TrigHLTMonitoring/src/TrigHLTMonitorAlgorithm.cxx index dccdec99652c..c1ec2172d074 100644 --- a/Trigger/TrigMonitoring/TrigHLTMonitoring/src/TrigHLTMonitorAlgorithm.cxx +++ b/Trigger/TrigMonitoring/TrigHLTMonitoring/src/TrigHLTMonitorAlgorithm.cxx @@ -30,7 +30,6 @@ StatusCode TrigHLTMonitorAlgorithm::initialize() { StatusCode TrigHLTMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const { using namespace Monitored; - StatusCode sc = StatusCode::FAILURE; //Fetch the general tool auto tool = getGroup("TrigHLTMonitor"); @@ -46,24 +45,22 @@ StatusCode TrigHLTMonitorAlgorithm::fillHistograms( const EventContext& ctx ) co //////////////////////////////////// // L1 items monitoring - std::vector<std::string> L1items = m_trigDecTool->getChainGroup("L1_.*")->getListOfTriggers(); - unsigned int nL1Items = L1items.size(); + const std::vector<std::string> L1items = m_trigDecTool->getChainGroup("L1_.*")->getListOfTriggers(); // Fill. First argument is the tool (GMT) name as defined in the py file, // all others are the variables to be saved. // Alternative fill method. Get the group yourself, and pass it to the fill function. ATH_MSG_DEBUG("Filling L1Events histogram"); - for(unsigned int it=0; it<nL1Items; ++it) { - if( L1items[it] != "" ) { - ATH_MSG_DEBUG("L1Item " << it << " " << L1items[it] ); - if(m_trigDecTool->isPassed(L1items[it])) { - - /// Fill L1 histogram - L1Events = L1items[it]; - ATH_MSG_DEBUG("L1Chain " << it << L1items[it] << " is passed"); - fill(tool,L1Events); - } + for(const std::string& l1name : L1items) { + + // Manually create single-trigger group to avoid regex parsing (ATR-23427) + const Trig::ChainGroup* trig = m_trigDecTool->getChainGroup(l1name, TrigDefs::Group::NoRegex); + if(m_trigDecTool->isPassed(trig)) { + /// Fill L1 histogram + L1Events = l1name; + ATH_MSG_DEBUG("L1Chain " << l1name << " is passed"); + fill(tool,L1Events); } } @@ -122,76 +119,74 @@ StatusCode TrigHLTMonitorAlgorithm::fillHistograms( const EventContext& ctx ) co //Loop over HLT chains ATH_MSG_DEBUG( "Filling HLT" << signaturename << " and RoI information for " << thisregex ); - std::vector< std::string > chainNames = m_trigDecTool->getChainGroup(thisregex)->getListOfTriggers(); - unsigned int nHLTChains = chainNames.size(); - - for(unsigned int ith=0; ith<nHLTChains; ++ith) { - if( chainNames[ith] != "" ) { - - ATH_MSG_DEBUG("HLTChain " << ith << " " << chainNames[ith] ); - if(m_trigDecTool->isPassed(chainNames[ith], TrigDefs::requireDecision)) { - ATH_MSG_DEBUG( " Chain " << chainNames[ith] << " IS passed"); - - /// Fill plain chains histogram - HLT_RAW = chainNames[ith]; - fill(tool,HLT_RAW); - - //If the chain is prescaled - const TrigConf::HLTChain* c = m_trigDecTool->ExperimentalAndExpertMethods().getChainConfigurationDetails(chainNames[ith]); - float prescale = 0; - if (c) { - prescale = c->prescale(); - } - else { - ATH_MSG_WARNING("No chain found in m_trigDecTool->ExperimentalAndExpertMethods().getChainConfigurationDetails(" << chainNames[ith] << "). Using prescale 0"); - } - if(prescale>1. || prescale<1.) { - //NB! Right now very few chains are prescaled, so this histogram is seldom filled - HLT_PS = chainNames[ith]; - ATH_MSG_DEBUG( "HLT_PS: " << chainNames[ith] << " has PS = " << prescale); - fill(tool,HLT_PS); - } - - /// Fill RoIs histogram and 1D histos for eta, phi, RoI count - std::vector<LinkInfo<TrigRoiDescriptorCollection>> fvec = m_trigDecTool->features<TrigRoiDescriptorCollection>(chainNames[ith], TrigDefs::Physics, "", TrigDefs::lastFeatureOfType, initialRoIString()); - - //Loop over RoIs - for (const LinkInfo<TrigRoiDescriptorCollection>& li : fvec) { - if( li.isValid() ) { - - //Fill 1D histos of roi_N, eta, phi - const TrigRoiDescriptor* roi = *(li.link).cptr(); - if(!roi->isFullscan()) { - RoI_eta = roi->eta(); - RoI_phi = roi->phi(); - fill(tool,RoI_eta); - fill(tool,RoI_phi); - roiN[N_sig]++; - } - else { - ATH_MSG_DEBUG( "RoI is FULLSCAN, chain " << chainNames[ith]); - } - - //Fill 2D RoI maps - auto phi = Monitored::Scalar("phi",0.0); - auto eta = Monitored::Scalar("eta",0.0); - - if(!roi->isFullscan()) { - auto HLT_RoIs = Monitored::Group(thisTool, eta, phi); - const TrigRoiDescriptor* roi = *(li.link).cptr(); - eta = roi->eta(); - phi = roi->phi(); - } - }//end if(li.isValid()) - - else { - ATH_MSG_WARNING( "TrigRoiDescriptorCollection for chain " << chainNames[ith] << " is not valid"); - } - - }//end for (const LinkInfo<TrigRoiDescriptorCollection>& li : fvec) - }// end if(m_trigDecTool->isPassed(chainNames[ith])) - }// end if( chainNames[ith] != "" ) - }//end for(unsigned int ith=0; ith<nHLTChains; ++ith) + const std::vector<std::string> chainNames = m_trigDecTool->getChainGroup(thisregex)->getListOfTriggers(); + + for(const std::string& chain : chainNames) { + + // Manually create single-trigger group to avoid regex parsing (ATR-23427) + const Trig::ChainGroup* trig = m_trigDecTool->getChainGroup(chain, TrigDefs::Group::NoRegex); + if(m_trigDecTool->isPassed(trig, TrigDefs::requireDecision)) { + ATH_MSG_DEBUG( " Chain " << chain << " IS passed"); + + /// Fill plain chains histogram + HLT_RAW = chain; + fill(tool,HLT_RAW); + + //If the chain is prescaled + const TrigConf::HLTChain* c = m_trigDecTool->ExperimentalAndExpertMethods().getChainConfigurationDetails(chain); + float prescale = 0; + if (c) { + prescale = c->prescale(); + } + else { + ATH_MSG_WARNING("No chain found in m_trigDecTool->ExperimentalAndExpertMethods().getChainConfigurationDetails(" << chain << "). Using prescale 0"); + } + if(prescale>1. || prescale<1.) { + //NB! Right now very few chains are prescaled, so this histogram is seldom filled + HLT_PS = chain; + ATH_MSG_DEBUG( "HLT_PS: " << chain << " has PS = " << prescale); + fill(tool,HLT_PS); + } + + /// Fill RoIs histogram and 1D histos for eta, phi, RoI count + std::vector<LinkInfo<TrigRoiDescriptorCollection>> fvec = m_trigDecTool->features<TrigRoiDescriptorCollection>(chain, TrigDefs::Physics, "", TrigDefs::lastFeatureOfType, initialRoIString()); + + //Loop over RoIs + for (const LinkInfo<TrigRoiDescriptorCollection>& li : fvec) { + if( li.isValid() ) { + + //Fill 1D histos of roi_N, eta, phi + const TrigRoiDescriptor* roi = *(li.link).cptr(); + if(!roi->isFullscan()) { + RoI_eta = roi->eta(); + RoI_phi = roi->phi(); + fill(tool,RoI_eta); + fill(tool,RoI_phi); + roiN[N_sig]++; + } + else { + ATH_MSG_DEBUG( "RoI is FULLSCAN, chain " << chain); + } + + //Fill 2D RoI maps + auto phi = Monitored::Scalar("phi",0.0); + auto eta = Monitored::Scalar("eta",0.0); + + if(!roi->isFullscan()) { + auto HLT_RoIs = Monitored::Group(thisTool, eta, phi); + const TrigRoiDescriptor* roi = *(li.link).cptr(); + eta = roi->eta(); + phi = roi->phi(); + } + }//end if(li.isValid()) + + else { + ATH_MSG_WARNING( "TrigRoiDescriptorCollection for chain " << chain << " is not valid"); + } + + } + } + } //Fill RoI count per stream RoI_N = roiN[N_sig]; @@ -206,7 +201,7 @@ StatusCode TrigHLTMonitorAlgorithm::fillHistograms( const EventContext& ctx ) co ////////////////////////////////////// // HLTResult and ConfigConsistency - sc = fillResultAndConsistencyHistograms(ctx); + ATH_CHECK(fillResultAndConsistencyHistograms(ctx)); ////////////////////////////////////// -- GitLab From 27f516987911ee08cfcbba5b8b7548ae5f26e034 Mon Sep 17 00:00:00 2001 From: Anil Sonay <anil.sonay@cern.ch> Date: Wed, 21 Sep 2022 17:13:41 +0200 Subject: [PATCH 2/4] Adding L1Muon Decoders to L1Topo Simulation Config Adding L1Muon Decoders to L1Topo Simulation Config --- .../python/L1TopoSimulationConfig.py | 49 +++++++++---------- 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/python/L1TopoSimulationConfig.py b/Trigger/TrigT1/L1Topo/L1TopoSimulation/python/L1TopoSimulationConfig.py index a8c1dc8909db..a7ab048132d5 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/python/L1TopoSimulationConfig.py +++ b/Trigger/TrigT1/L1Topo/L1TopoSimulation/python/L1TopoSimulationConfig.py @@ -133,7 +133,7 @@ def L1TopoSimulationOldStyleCfg(flags, isLegacy): return topoSimSeq -def L1TopoSimulationStandaloneCfg(flags, outputEDM=[]): +def L1TopoSimulationStandaloneCfg(flags, outputEDM=[], doMuons = False): acc = ComponentAccumulator() @@ -142,15 +142,17 @@ def L1TopoSimulationStandaloneCfg(flags, outputEDM=[]): gfex_provider_attr = ['gFexSRJetRoI','gFexLRJetRoI','gFexXEJWOJRoI','gFexXENCRoI','gFexXERHORoI','gFexMHTRoI','gFexTERoI'] #Configure the MuonInputProvider - muProvider = CompFactory.LVL1.MuonInputProvider("MuonInputProvider", - ROIBResultLocation = "", #disable input from RoIBResult - MuonROILocation = "", - MuonEncoding = 1) - - #Configure the MuonRoiTools for the MIP - from TrigT1MuonRecRoiTool.TrigT1MuonRecRoiToolConfig import getRun3RPCRecRoiTool, getRun3TGCRecRoiTool - muProvider.RecRpcRoiTool = getRun3RPCRecRoiTool("RPCRecRoiTool", useRun3Config = True) - muProvider.RecTgcRoiTool = getRun3TGCRecRoiTool("TGCRecRoiTool", useRun3Config = True) + muProvider="" + if doMuons: + muProvider = CompFactory.LVL1.MuonInputProvider("MuonInputProvider", + ROIBResultLocation = "", #disable input from RoIBResult + MuonROILocation = "", + MuonEncoding = 1) + + #Configure the MuonRoiTools for the MIP + from TrigT1MuonRecRoiTool.TrigT1MuonRecRoiToolConfig import getRun3RPCRecRoiTool, getRun3TGCRecRoiTool + muProvider.RecRpcRoiTool = getRun3RPCRecRoiTool("RPCRecRoiTool", useRun3Config = True) + muProvider.RecTgcRoiTool = getRun3TGCRecRoiTool("TGCRecRoiTool", useRun3Config = True) efexProvider = CompFactory.LVL1.eFexInputProvider("eFexInputProvider") @@ -185,7 +187,7 @@ def L1TopoSimulationStandaloneCfg(flags, outputEDM=[]): setattr(gfexProvider,attr+'Key','') topoSimAlg = CompFactory.LVL1.L1TopoSimulation("L1TopoSimulation", - MuonInputProvider = "", + MuonInputProvider = muProvider, EMTAUInputProvider = efexProvider, JetInputProvider = jfexProvider, EnergyInputProvider = gfexProvider, @@ -229,8 +231,6 @@ if __name__ == '__main__': if len(subsystem)==0: log.warning(f'subsystem not given or the given subsystem not supported with one of the: {supportedSubsystems}') - - if args.log == 'warning': algLogLevel = WARNING if args.log == 'debug': algLogLevel = DEBUG @@ -247,9 +247,9 @@ if __name__ == '__main__': flags.Concurrency.NumConcurrentEvents = 1 flags.Exec.SkipEvents = args.skipEvents flags.Output.AODFileName = 'AOD.pool.root' - flags.GeoModel.AtlasVersion = 'ATLAS-R3S-2021-01-00-02' - flags.IOVDb.GlobalTag = 'CONDBR2-BLKPA-2018-13' - flags.Muon.enableAlignment = True + flags.Trigger.L1.doMuon = True + flags.Trigger.enableL1MuonPhase1 = True + flags.Trigger.L1.doMuonTopoInputs = True flags.lock() from AthenaConfiguration.MainServicesConfig import MainServicesCfg @@ -289,21 +289,16 @@ if __name__ == '__main__': loadFromSG = [('xAOD::EventInfo', 'StoreGateSvc+EventInfo')] if 'Muons' in subsystem: - loadFromSG += [( 'RpcPadContainer' , 'StoreGateSvc+RPCPAD_L1' ), - ( 'TgcRdoContainer' , 'StoreGateSvc+TGCRDO_L1' )] - from MuonConfig.MuonCablingConfig import MuonCablingConfigCfg - acc.merge(MuonCablingConfigCfg(flags)) + from MuonConfig.MuonBytestreamDecodeConfig import RpcBytestreamDecodeCfg,TgcBytestreamDecodeCfg + rpcdecodingAcc = RpcBytestreamDecodeCfg(flags) + acc.merge(rpcdecodingAcc) + tgcdecodingAcc = TgcBytestreamDecodeCfg(flags) + acc.merge(tgcdecodingAcc) - from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg - acc.merge(MuonGeoModelCfg(flags)) - from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import MuonRoIByteStreamToolCfg muonRoiTool = MuonRoIByteStreamToolCfg(name="L1MuonBSDecoderTool",flags=flags,writeBS=False) decoderTools += [muonRoiTool] - from TriggerJobOpts.Lvl1MuonSimulationConfig import MuonBytestream2RdoConfig - acc.merge(MuonBytestream2RdoConfig(flags)) - if 'jFex' in subsystem: from L1CaloFEXByteStream.L1CaloFEXByteStreamConfig import jFexRoiByteStreamToolCfg jFexTool = jFexRoiByteStreamToolCfg('jFexBSDecoder', flags, writeBS=False) @@ -348,7 +343,7 @@ if __name__ == '__main__': acc.getEventAlgo('L1LegacyTopoSimulation').FillHistoBasedOnHardware = True acc.getEventAlgo('L1LegacyTopoSimulation').PrescaleDAQROBAccess = 1 - acc.merge(L1TopoSimulationStandaloneCfg(flags,outputEDM), sequenceName='AthAlgSeq') + acc.merge(L1TopoSimulationStandaloneCfg(flags,outputEDM,doMuons=True), sequenceName='AthAlgSeq') if args.algoHdwMon: acc.getEventAlgo('L1TopoSimulation').FillHistoBasedOnHardware = True acc.getEventAlgo('L1TopoSimulation').PrescaleDAQROBAccess = 1 -- GitLab From 22ede41c1eaefaab44a43f7359d454a35a1779cc Mon Sep 17 00:00:00 2001 From: Fernando Monticelli <fernando.monticelli@cern.ch> Date: Wed, 21 Sep 2022 17:28:29 +0200 Subject: [PATCH 3/4] Implemented bootstrap in TrigEgamma Monitoring Implemented bootstrap in TrigEgamma Monitoring --- .../python/TrigEgammaMonitCategoryMT.py | 11 ++- .../python/TrigEgammaMonitoringMTConfig.py | 5 +- .../TrigEgammaMonitorAnalysisAlgorithm.cxx | 76 +++++-------------- .../src/TrigEgammaMonitorBaseAlgorithm.cxx | 1 + .../src/TrigEgammaMonitorBaseAlgorithm.h | 1 + .../src/TrigEgammaMonitorPhotonAlgorithm.cxx | 26 ++++++- .../src/TrigEgammaMonitorPhotonAlgorithm.h | 9 ++- 7 files changed, 66 insertions(+), 63 deletions(-) diff --git a/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitCategoryMT.py b/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitCategoryMT.py index f8b54976cec4..5877b0708419 100644 --- a/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitCategoryMT.py +++ b/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitCategoryMT.py @@ -15,6 +15,15 @@ monitoring_photon = [ 'HLT_g300_etcut_L1EM22VHI' ] +monitoring_bootstrap = { + 'HLT_g25_medium_L1EM20VH' : 'HLT_g25_loose_L1EM20VH', + 'HLT_g35_medium_L1EM20VH' : 'HLT_g25_loose_L1EM20VH', + 'HLT_g22_tight_L1EM15VHI' : 'HLT_g20_tight_L1EM15VHI', + 'HLT_g20_tight_icaloloose_L1EM15VHI': 'HLT_g20_tight_L1EM15VHI', + } + + + monitoring_electron = [ 'HLT_e300_etcut_L1EM22VHI', ] @@ -191,4 +200,4 @@ monitoring_Jpsiee = [ 'HLT_e5_lhtight_e14_etcut_1invmAB5_L1JPSI-1M5-EM12', 'HLT_e9_lhtight_e4_etcut_1invmAB5_L1JPSI-1M5-EM7', 'HLT_e14_lhtight_e4_etcut_1invmAB5_L1JPSI-1M5-EM12' - ] \ No newline at end of file + ] diff --git a/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringMTConfig.py b/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringMTConfig.py index f02b4cd969fa..08d55e5f5cb1 100644 --- a/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringMTConfig.py +++ b/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitoringMTConfig.py @@ -179,17 +179,19 @@ class TrigEgammaMonAlgBuilder: def setDefaultProperties(self): - from TrigEgammaMonitoring.TrigEgammaMonitCategoryMT import monitoring_photon, monitoring_electron, monitoringTP_electron, monitoring_topo, validation_photon , validation_electron, validationTP_electron, validation_jpsi, validationTP_jpsiee, monitoring_tags, validationTP_electron_eEM + from TrigEgammaMonitoring.TrigEgammaMonitCategoryMT import monitoring_bootstrap, monitoring_photon, monitoring_electron, monitoringTP_electron, monitoring_topo, validation_photon , validation_electron, validationTP_electron, validation_jpsi, validationTP_jpsiee, monitoring_tags, validationTP_electron_eEM if self.pp_mode: self.electronList = monitoring_electron self.photonList = monitoring_photon + self.bootstrapMap = monitoring_bootstrap self.tpList = monitoringTP_electron + validationTP_electron_eEM self.tagItems = monitoring_tags self.topoList = monitoring_topo elif self.mc_mode: self.electronList = validation_electron # + validation_Zee (no T&P chains yet) self.photonList = validation_photon + self.bootstrapMap = {} self.tpList = validationTP_electron + validationTP_electron_eEM self.jpsiList = validation_jpsi self.jpsitagItems = validationTP_jpsiee @@ -427,6 +429,7 @@ class TrigEgammaMonAlgBuilder: self.phMonAlg.LHResultNames=self.lhnames self.phMonAlg.PhotonIsEMSelector =[TightPhotonSelector,MediumPhotonSelector,LoosePhotonSelector] self.phMonAlg.TriggerList=self.photonList + self.phMonAlg.BootstrapTriggerMap = self.bootstrapMap self.phMonAlg.DetailedHistograms=self.detailedHistograms self.phMonAlg.ForcePidSelection=True self.phMonAlg.DoUnconverted=False diff --git a/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorAnalysisAlgorithm.cxx b/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorAnalysisAlgorithm.cxx index 81bf745ce8d6..bf829da94902 100644 --- a/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorAnalysisAlgorithm.cxx +++ b/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorAnalysisAlgorithm.cxx @@ -54,22 +54,24 @@ void TrigEgammaMonitorAnalysisAlgorithm::fillEfficiencies( const std::vector< st for( auto pairObj : pairObjs ){ - if(pairObj.first->type()==xAOD::Type::Electron){ - const xAOD::Electron* el = static_cast<const xAOD::Electron *> (pairObj.first); - float et = getEt(el)/Gaudi::Units::GeV; - if(et < info.etthr-5.0) continue; - - }else if(pairObj.first->type()==xAOD::Type::Photon){ - float et = getCluster_et(pairObj.first)/Gaudi::Units::GeV; - if(et < info.etthr-5.0) continue; - - if(boost::contains(info.trigger,"icalovloose")) { - if (getIsolation_topoetcone20(pairObj.first)/getCluster_et(pairObj.first) >= 0.065) continue; // pass FixedCutLoose offline isolation - } - else { - if ((getIsolation_topoetcone40(pairObj.first)-2450.0)/getCluster_et(pairObj.first) >= 0.022) continue; // pass FixedCutTightCaloOnly offline isolation - } - } // Offline photon + if(pairObj.first->type()==xAOD::Type::Electron){ + const xAOD::Electron* el = static_cast<const xAOD::Electron *> (pairObj.first); + float et = getEt(el)/Gaudi::Units::GeV; + if(et < info.etthr-5.0) continue; + + }else if(pairObj.first->type()==xAOD::Type::Photon){ + float et = getCluster_et(pairObj.first)/Gaudi::Units::GeV; + if(et < info.etthr-5.0) continue; + + // Applying FixedCutLoose isolation on the offline photon as recommended in the twiki: + // https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/IsolationSelectionTool#Photons + bool pass_CaloIso = getIsolation_topoetcone20(pairObj.first)/getCluster_et(pairObj.first) < 0.065; + bool pass_trkIso = getIsolation_ptcone20(pairObj.first)/getCluster_et(pairObj.first) < 0.05; + + if (!pass_CaloIso || !pass_trkIso){ + continue; // pass FixedCutLoose offline isolation + } + } // Offline photon @@ -408,7 +410,8 @@ void TrigEgammaMonitorAnalysisAlgorithm::fillDistributions( const std::vector< s } if ( info.signature == "Electron" ){ - // Fast Electron + + // L2 Electron { std::string key = match()->key("FastElectrons"); if(info.lrt) key = match()->key("FastElectrons_LRT"); @@ -444,20 +447,6 @@ void TrigEgammaMonitorAnalysisAlgorithm::fillDistributions( const std::vector< s fillTracking( trigger, el_vec, true ); } }else if ( info.signature == "Photon"){ - // Fast Photon - { - std::string key = match()->key("FastPhotons"); - std::vector<const xAOD::TrigPhoton*> ph_vec; - // Get only passed objects - auto vec = tdt()->features<xAOD::TrigPhotonContainer>(trigger,condition,key ); - for( auto &featLinkInfo : vec ){ - if(! featLinkInfo.isValid() ) continue; - const auto *feat = *(featLinkInfo.link); - if(!feat) continue; - ph_vec.push_back(feat); - } - fillL2Photon( trigger, ph_vec ); - } // HLT Photon { std::vector<const xAOD::Egamma*> ph_vec; @@ -592,31 +581,6 @@ void TrigEgammaMonitorAnalysisAlgorithm::fillL2Electron(const std::string &trigg fill( monGroup, et_col, eta_col, phi_col, highet_col ); } - -void TrigEgammaMonitorAnalysisAlgorithm::fillL2Photon(const std::string &trigger, const std::vector< const xAOD::TrigPhoton* >& ph_vec) const -{ - - auto monGroup = getGroup(trigger+"_Distributions_L2Photon"); - - std::vector<float> et_vec, eta_vec, phi_vec, highet_vec; - - auto et_col = Monitored::Collection("et" , et_vec ); - auto highet_col = Monitored::Collection("highet" , highet_vec ); - auto eta_col = Monitored::Collection("eta", eta_vec ); - auto phi_col = Monitored::Collection("phi", phi_vec ); - - for ( const auto *ph : ph_vec ) - { - if(!ph) continue; - et_vec.push_back( ph->pt()/Gaudi::Units::GeV ); - highet_vec.push_back( ph->pt()/Gaudi::Units::GeV ); - eta_vec.push_back( ph->eta() ); - phi_vec.push_back( ph->phi() ); - } - - fill( monGroup, et_col, eta_col, phi_col, highet_col ); -} - void TrigEgammaMonitorAnalysisAlgorithm::fillEFCalo(const std::string &trigger, const std::vector< const xAOD::CaloCluster*>& clus_vec) const { diff --git a/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorBaseAlgorithm.cxx b/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorBaseAlgorithm.cxx index f68dec67e012..da1921bfcf6b 100644 --- a/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorBaseAlgorithm.cxx +++ b/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorBaseAlgorithm.cxx @@ -481,6 +481,7 @@ float TrigEgammaMonitorBaseAlgorithm::getE0Eaccordion(const xAOD::Egamma *eg) co { float val{-99}; \ eg->isolationValue(val,xAOD::Iso::_name_); \ return val; } + GETTER(ptcone20) GETTER(etcone20) GETTER(etcone30) GETTER(etcone40) diff --git a/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorBaseAlgorithm.h b/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorBaseAlgorithm.h index 3a609820d129..54cfd997f1dc 100644 --- a/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorBaseAlgorithm.h +++ b/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorBaseAlgorithm.h @@ -212,6 +212,7 @@ class TrigEgammaMonitorBaseAlgorithm : public AthMonitorAlgorithm { GETTER(ptvarcone40) #undef GETTER #define GETTER(_name_) float getIsolation_##_name_(const xAOD::Egamma* eg) const; + GETTER(ptcone20) GETTER(etcone20) GETTER(etcone30) GETTER(etcone40) diff --git a/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorPhotonAlgorithm.cxx b/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorPhotonAlgorithm.cxx index fb61403d6266..e723fa843024 100644 --- a/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorPhotonAlgorithm.cxx +++ b/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorPhotonAlgorithm.cxx @@ -62,10 +62,31 @@ StatusCode TrigEgammaMonitorPhotonAlgorithm::fillHistograms( const EventContext& ATH_MSG_DEBUG("Chains for Analysis " << m_trigList); for(const auto& trigger : m_trigList){ - + const TrigInfo info = getTrigInfo(trigger); + ATH_MSG_DEBUG("Start Chain Analysis ============================= " << trigger << " " << info.trigger); + + // Check if this trigger is in the bootstrap map + auto it = m_BSTrigMap.find(trigger); + + if ( it != m_BSTrigMap.end() ) { + + ATH_MSG_DEBUG( trigger << " is a bootstrapped trigger"); + + std::string bootstrap = it->second; + ATH_MSG_DEBUG( "Bootstrapping " << trigger << " from " << bootstrap ); + + + if (!tdt()->isPassed(bootstrap)){ + ATH_MSG_DEBUG("Not passed BS trigger. Skipping! ========================== " << trigger); + continue; + } else { + ATH_MSG_DEBUG("BS trigger passed!"); + } + } + + - ATH_MSG_DEBUG("Start Chain Analysis ============================= " << trigger << " " << info.trigger); std::vector< std::pair<std::shared_ptr<const xAOD::Egamma>, const TrigCompositeUtils::Decision * >> pairObjs; @@ -113,6 +134,7 @@ StatusCode TrigEgammaMonitorPhotonAlgorithm::executeNavigation( const EventConte const std::string decor="is"+pidName; + for(const auto *const eg : *offPhotons ){ const TrigCompositeUtils::Decision *dec=nullptr; if(!eg->caloCluster()){ diff --git a/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorPhotonAlgorithm.h b/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorPhotonAlgorithm.h index 498e4e75940a..a36936bd3eaf 100644 --- a/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorPhotonAlgorithm.h +++ b/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorPhotonAlgorithm.h @@ -27,9 +27,8 @@ class TrigEgammaMonitorPhotonAlgorithm: public TrigEgammaMonitorAnalysisAlgorith private: - - - + + /*! navigation method called by executeNavigation */ StatusCode executeNavigation(const EventContext& ctx, const std::string& trigItem,float, const std::string& pidName, std::vector<std::pair<std::shared_ptr<const xAOD::Egamma>, const TrigCompositeUtils::Decision*>> &) const; @@ -42,6 +41,10 @@ class TrigEgammaMonitorPhotonAlgorithm: public TrigEgammaMonitorAnalysisAlgorith Gaudi::Property<bool> m_doUnconverted{this, "DoUnconverted", false}; /*! List of triggers from menu */ Gaudi::Property<std::vector<std::string>> m_trigInputList{this, "TriggerList", {}}; + + + // Stores a map of Bootstrap triggers + Gaudi::Property< std::map<std::string, std::string> > m_BSTrigMap{this, "BootstrapTriggerMap", {{"",""}}, "Dictionary of Triggers (as keys) and Bootstraps (value) to configure Bootstrapping of photon triggers" }; /*! Directory name for each algorithm */ Gaudi::Property<std::string> m_anatype{this, "Analysis", "Photon"}; /*! force pid selection into photon navigation */ -- GitLab From 61c79b1d527ec9b9b3848f5857699ec745061072 Mon Sep 17 00:00:00 2001 From: Julien Maurer <julien.maurer@cern.ch> Date: Wed, 21 Sep 2022 17:29:48 +0200 Subject: [PATCH 4/4] exclude branches from q445 CI output comparison exclude branches from q445 CI output comparison --- Tools/PROCTools/data/q445_AOD_diff-exclusion-list.txt | 2 ++ Tools/PROCTools/data/q445_ESD_diff-exclusion-list.txt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Tools/PROCTools/data/q445_AOD_diff-exclusion-list.txt b/Tools/PROCTools/data/q445_AOD_diff-exclusion-list.txt index f141d0176d82..022422e8a430 100644 --- a/Tools/PROCTools/data/q445_AOD_diff-exclusion-list.txt +++ b/Tools/PROCTools/data/q445_AOD_diff-exclusion-list.txt @@ -8,3 +8,5 @@ index_ref BunchConfKey(.*) TrigConfKeys(.*) xTrigDecisionAux(.*) +# see ATR-26322: +MuonCandidates_FS_ROIs(.*) diff --git a/Tools/PROCTools/data/q445_ESD_diff-exclusion-list.txt b/Tools/PROCTools/data/q445_ESD_diff-exclusion-list.txt index 95a4909f9684..25eb733333ee 100644 --- a/Tools/PROCTools/data/q445_ESD_diff-exclusion-list.txt +++ b/Tools/PROCTools/data/q445_ESD_diff-exclusion-list.txt @@ -9,6 +9,8 @@ index_ref (.*)_RoIBResult(.*) (.*)_TrigConfKeys(.*) (.*)_xTrigDecisionAux(.*) +# see ATR-26322: +TrigRoiDescriptorCollection_p3_MuonCandidates_FS_ROIs(.*) # Ignore most b-tagging outside the reference tagger, DL1dv00 xAOD::BTagging(?!.*PFlow.*DL1dv00_p.*) -- GitLab