diff --git a/AtlasTest/CITest/Athena.cmake b/AtlasTest/CITest/Athena.cmake index a6f21aed0dc71a410b4e0c16091d4c797a75c9aa..fe415ffddf1a41a20c71939a55debe726d4f705d 100644 --- a/AtlasTest/CITest/Athena.cmake +++ b/AtlasTest/CITest/Athena.cmake @@ -78,6 +78,16 @@ atlas_add_citest( RecoRun2MC_PileUp SCRIPT RunWorkflowTests_Run2.py --CI -p -w MCPileUpReco -e '--maxEvents 5 --inputRDO_BKGFile=../../PileUpPresamplingRun2/run_d1730/myRDO.pool.root' --no-output-checks # go two levels up as the test runs in a subfolder DEPENDS_SUCCESS PileUpPresamplingRun2 ) +atlas_add_citest( RecoRun3Data + SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/test/RecoRun3Data.sh + PROPERTIES PROCESSORS 8 ) + +atlas_add_citest( RecoRun3Data_Cosmics + SCRIPT RunWorkflowTests_Run3.py --CI -r -w DataReco -a q450 -e '--maxEvents 25' --no-output-checks ) + +atlas_add_citest( RecoRun3Data_Calib + SCRIPT RunWorkflowTests_Run3.py --CI -r -w DataReco -a q451 -e '--maxEvents 25' --no-output-checks ) + atlas_add_citest( RecoRun3MC SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/test/RecoRun3MC.sh ) diff --git a/AtlasTest/CITest/test/RecoRun3Data.sh b/AtlasTest/CITest/test/RecoRun3Data.sh new file mode 100755 index 0000000000000000000000000000000000000000..18ffd870978b6a73aab9fcd08115b49f30b9f8f6 --- /dev/null +++ b/AtlasTest/CITest/test/RecoRun3Data.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration + +# Pilot beam collisions need a special export and preExec +export TNS_ADMIN=/cvmfs/atlas.cern.ch/repo/sw/database/DBRelease/current/oracle-admin + +RunWorkflowTests_Run3.py -a q449 --CI -r -w DataReco -e '--maxEvents 500 --preExec "from AthenaConfiguration.AllConfigFlags import ConfigFlags; ConfigFlags.Trigger.triggerConfig = \"DB\"; DQMonFlags.useTrigger=False; DQMonFlags.doHLTMon=False;"' --threads 8 --no-output-checks diff --git a/Control/AthenaConfiguration/python/iconfTool/models/loaders.py b/Control/AthenaConfiguration/python/iconfTool/models/loaders.py index c4f31ce1b65837ac1a35ed0aadb3ff473da44161..ff4de8f2ebe56a09686f3f4357f439b64c269f0d 100755 --- a/Control/AthenaConfiguration/python/iconfTool/models/loaders.py +++ b/Control/AthenaConfiguration/python/iconfTool/models/loaders.py @@ -88,6 +88,13 @@ baseParser.add_argument( action="store_true", ) +baseParser.add_argument( + "--skipProperties", + help="Do not load properties other than those referring to other components", + action="store_true", +) + + baseParser.add_argument( "--debug", help="Enable tool debugging messages", @@ -268,6 +275,54 @@ def shortenDefaultComponents(dic, args) -> Dict: conf[key] = shorten_defaults(value) return conf +def isReference(value, compname, conf) -> bool: + """Returns true if value stores reference to other components + value - the value to check + compname - full component name + conf - complete config dict + """ + try: + value = ast.literal_eval(str(value)) + except Exception: + pass + + if isinstance(value, str): + ctype_name = value.split('/') + instance = None + if len(ctype_name) == 2: + instance = ctype_name[1] + if len(ctype_name) == 1: + instance = ctype_name[0] + if instance: + if f"{compname}.{instance}" in conf: # private tool + return [f"{compname}.{instance}"] + if f"ToolSvc.{instance}" in conf: # public tool + return [f"ToolSvc.{instance}"] + if instance in conf: # service + return [instance] + if len(ctype_name) == 2: # in either case for 2 elements value we consider that as comp + return [ctype_name[1]] + + elif isinstance(value, list): + refs = [isReference(el, compname, conf) for el in value] + if any(refs): + flattened = [] + [flattened.extend(el) for el in refs if el] + return flattened + return [] + + +def skipProperties(conf, args) -> Dict: + updated = {} + for (name, properties) in conf.items(): + updated[name] = {} + if not isinstance(properties, dict): # keep it + updated[name] = properties + else: + for property_name, value in properties.items(): + if isReference( value, name, conf) or property_name == 'Members': # later for sequences structure + updated[name][property_name] = value + return updated def loadConfigFile(fname, args) -> Dict: """loads config file into a dictionary, supports several modifications of the input switched on via additional arguments @@ -349,6 +404,9 @@ def loadConfigFile(fname, args) -> Dict: if args.shortenDefaultComponents: conf = shortenDefaultComponents(conf, args) + + if args.skipProperties: + conf = skipProperties(conf, args) return conf class ComponentsFileLoader: diff --git a/Control/AthenaConfiguration/share/confTool.py b/Control/AthenaConfiguration/share/confTool.py index 59f5625f861a85de478127e7604bb559358e68e9..838bdf6298d6ffe5d54ca106fc506f97d2eff583 100755 --- a/Control/AthenaConfiguration/share/confTool.py +++ b/Control/AthenaConfiguration/share/confTool.py @@ -10,7 +10,7 @@ import pickle import re import sys -from AthenaConfiguration.iconfTool.models.loaders import loadConfigFile, baseParser, componentRenamingDict, loadDifferencesFile +from AthenaConfiguration.iconfTool.models.loaders import loadConfigFile, baseParser, componentRenamingDict, loadDifferencesFile, isReference class fullColor: reset="\033[0m" difference="\033[91m" @@ -73,8 +73,11 @@ def parse_args(): help="Ignore differences enlisted in file (to be used only with diffing)") parser.add_argument("--color", - help="Use colored output even for file output (usefull when piping to less -R to to HTML conversion", + help="Use colored output even for file output (useful when piping to less -R to to HTML conversion", action="store_true") + + parser.add_argument("-s", "--structured", + help="Print only a single component, in a structured manner (reflecting components parent children)") args = parser.parse_args() main(args) @@ -97,6 +100,12 @@ def main(args): conf = loadConfigFile(fileName, args) _print(conf, color) + if args.structured: + for fileName in args.file: + conf = loadConfigFile(fileName, args) + _structuredPrint(conf, args.structured) + + if args.toJSON: if len(args.file) != 1: sys.exit( @@ -149,6 +158,28 @@ def _printComps(conf): if isinstance(item, dict): print(k) +def _structuredPrint(conf, start): + def _oneCompPrint(d, comp, indent = ""): + print(f"{indent}{comp}") + for prop,val in d.items(): + print(f"{indent} {prop} = {val}") + if prop == "Members" or prop == "TopAlg": + continue + refs = isReference(val, comp, conf) + for ref in refs: + if ref in conf: + _oneCompPrint(conf[ref], ref, indent + " - ") + + if start not in conf: + print(f"{start} is absent in the config, unfortunately the name has to be exact") + return + settings = conf.get(start) + if isinstance(settings, dict): + _oneCompPrint(settings, start) + else: + print(settings) + + def _compareConfig(configRef, configChk, args, color): # Find superset of all components: allComps = list(set(configRef.keys()) | set(configChk.keys())) diff --git a/DataQuality/DataQualityConfigurations/config/HLT/HLTmet/collisions_run.config b/DataQuality/DataQualityConfigurations/config/HLT/HLTmet/collisions_run.config index 0d4d751e59b4f0a22888fe41541643195d2c13dc..fd137654e94ae2f2aee7174d372116da1d982e70 100644 --- a/DataQuality/DataQualityConfigurations/config/HLT/HLTmet/collisions_run.config +++ b/DataQuality/DataQualityConfigurations/config/HLT/HLTmet/collisions_run.config @@ -51,24 +51,6 @@ dir HLT { hist cell_.* { } } - dir tc_em { - regex = 1 - output = HLT/TRMET/Shifter/tc_em - hist tc_em_.* { - } - } - dir mht { - regex = 1 - output = HLT/TRMET/Shifter/mht - hist mht_.* { - } - } - dir pfsum { - regex = 1 - output = HLT/TRMET/Shifter/pfsum - hist pfsum_.* { - } - } dir pfsum_vssk { regex = 1 output = HLT/TRMET/Shifter/pfsum_vssk @@ -81,12 +63,6 @@ dir HLT { hist pfsum_cssk_.* { } } - dir cvfpufit { - regex = 1 - output = HLT/TRMET/Shifter/cvfpufit - hist cvfpufit_.* { - } - } dir pfopufit { regex = 1 output = HLT/TRMET/Shifter/pfopufit @@ -105,10 +81,16 @@ dir HLT { hist mhtpufit_pf_.* { } } - dir trkmht { + dir met_nn { regex = 1 - output = HLT/TRMET/Shifter/trkmht - hist trkmht_.* { + output = HLT/TRMET/Shifter/met_nn + hist met_nn_.* { + } + } + dir preSel { + regex = 1 + output = HLT/TRMET/Shifter/preSel + hist .* { } } dir SignalEl { @@ -167,6 +149,42 @@ dir HLT { hist HLT_.* { } } + dir (?PL1_.*) { + regex = 1 + output = HLT/TRMET/Expert/${l1algs2} + hist L1_.* { + } + } + dir tc_em { + regex = 1 + output = HLT/TRMET/Expert/tc_em + hist tc_em_.* { + } + } + dir mht { + regex = 1 + output = HLT/TRMET/Expert/mht + hist mht_.* { + } + } + dir pfsum { + regex = 1 + output = HLT/TRMET/Expert/pfsum + hist pfsum_.* { + } + } + dir cvfpufit { + regex = 1 + output = HLT/TRMET/Expert/cvfpufit + hist cvfpufit_.* { + } + } + dir trkmht { + regex = 1 + output = HLT/TRMET/Expert/trkmht + hist trkmht_.* { + } + } } #end Expert } #end dir METMon } #end dir HLT @@ -193,25 +211,19 @@ output top_level { } output cell { } - output tc_em { - } - output mht { - } - output pfsum { - } output pfsum_vssk { } output pfsum_cssk { } - output cvfpufit { - } output pfopufit { } output mhtpufit_em { } output mhtpufit_pf { } - output trkmht { + output met_nn { + } + output preSel { } output SignalEl { output pfopufit { @@ -235,6 +247,18 @@ output top_level { } output eff { } + output ${l1algs2} { + } + output tc_em { + } + output mht { + } + output cvfpufit { + } + output pfsum { + } + output trkmht { + } } #end output TRMET } @@ -259,3 +283,4 @@ algorithm HLTmet_Histogram_Not_Empty&GatherData { reference = stream=physics_Main:CentrallyManagedReferences_TriggerMain;CentrallyManagedReferences_Trigger } + diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/python/PoolWriteConfig.py b/Database/AthenaPOOL/AthenaPoolCnvSvc/python/PoolWriteConfig.py index d8f426bce2d3293388b5e82bbfa64868dd7d37dd..a8ee55357a965254046e132fa6a235998e8a3b7d 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/python/PoolWriteConfig.py +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/python/PoolWriteConfig.py @@ -88,7 +88,7 @@ def PoolWriteCfg(flags, forceTreeAutoFlush=-1): PoolAttributes += [ pah.setTreeAutoFlush( flags.Output.AODFileName, "POOLContainerForm", auto_flush ) ] # Derivation framework output settings - for flag in [key for key in flags._flagdict.keys() if ("Output.DAOD_" and "FileName" in key)]: + for flag in [key for key in flags._flagdict.keys() if ("Output.DAOD_" in key and "FileName" in key)]: # Since there may be several outputs, this has to be done in a loop FileName = flags._flagdict[flag]._value # Use ZSTD w/ Level 5 for DAODs diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx index 9abc201aba6f83a9cb92a317a61c2c2dea2e2d89..29d0f98efc4044558486213748ef11e85593cafc 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx @@ -188,7 +188,7 @@ StatusCode AthenaPoolCnvSvc::createObj(IOpaqueAddress* pAddress, DataObject*& re TokenAddress* tokAddr = dynamic_cast(pAddress); if (tokAddr != nullptr && tokAddr->getToken() != nullptr && (boost::starts_with(tokAddr->getToken()->contID(), m_persSvcPerInputType.value() + "(") || boost::starts_with(tokAddr->getToken()->contID(), m_persSvcPerInputType.value() + "_"))) { const unsigned int maxContext = m_poolSvc->getInputContextMap().size(); - const unsigned int auxContext = m_poolSvc->getInputContext(tokAddr->getToken()->classID().toString(), 1); + const unsigned int auxContext = m_poolSvc->getInputContext(tokAddr->getToken()->classID().toString() + tokAddr->getToken()->dbID().toString(), 1); char text[32]; ::sprintf(text, "[CTXT=%08X]", auxContext); if (m_poolSvc->getInputContextMap().size() > maxContext) { diff --git a/LArCalorimeter/LArG4/LArG4Code/src/LArCalculatorSvcImp.cxx b/LArCalorimeter/LArG4/LArG4Code/src/LArCalculatorSvcImp.cxx index d536ae84ebe9e1bbe8fb5434f9f2da1cf73f24dd..08c42bb75f306331a5e1b3fb29cb751eb0ff6e0f 100644 --- a/LArCalorimeter/LArG4/LArG4Code/src/LArCalculatorSvcImp.cxx +++ b/LArCalorimeter/LArG4/LArG4Code/src/LArCalculatorSvcImp.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #include "LArG4Code/LArCalculatorSvcImp.h" @@ -9,7 +9,7 @@ LArCalculatorSvcImp::LArCalculatorSvcImp(const std::string& name, ISvcLocator *pSvcLocator) : base_class(name, pSvcLocator) , m_BirksLaw(true) - , m_Birksk(0.0486) + , m_Birksk(0.05832)// value updated for G4 10.6.p03 - 1.2 times the previous value of 0.0486 used in all campaigns before MC21. , m_OOTcut(300*CLHEP::ns) { declareProperty("BirksLaw",m_BirksLaw); diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonRDO/MM_RawDataCnv_p3.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonRDO/MM_RawDataCnv_p3.cxx index de23c31675385123f7283192d71ca4939fd5db23..136c61fbc48a74f93331a55f9e98c48b314d34cf 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonRDO/MM_RawDataCnv_p3.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonRDO/MM_RawDataCnv_p3.cxx @@ -33,7 +33,7 @@ Muon::MM_RawData* Muon::MM_RawDataCnv_p3::createTransient(const Muon::MM_RawData // To save disk space, the persistent version does not have this bolean but uses the relBCID as flag. In detector data the relBCID has a range of 0-7, // therefore a relBCID of 9 indicates that charge and time are in physical units while smaller values of the relBCID indicate that they are in counts. // In case of the time being in nano seconds, the relBCID is anyhow not meaningfull while if the time is in counts it is decomposed into the tdo (time) and the relBCID. - bool timeAndChargeInCounts = ((persObj->m_relBcid) == 9); + bool timeAndChargeInCounts = ((persObj->m_relBcid) != 9); Muon::MM_RawData* trans = new MM_RawData( Identifier (persObj->m_id), persObj->m_channel, persObj->m_time, diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonRDO/STGC_RawDataCnv_p3.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonRDO/STGC_RawDataCnv_p3.cxx index e1b376c969860ea4ee05c7d3dd90eb78275c062f..13ebd33b2845caef33c8613e3ff1950787efdd31 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonRDO/STGC_RawDataCnv_p3.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonRDO/STGC_RawDataCnv_p3.cxx @@ -33,7 +33,7 @@ Muon::STGC_RawData* Muon::STGC_RawDataCnv_p3::createTransient(const Muon::STGC_R // To save disk space, the persistent version does not have this bolean but uses the relBCID as flag. In detector data the bcTag has a maximum range of 0-7, // therefore a bcTag of 9 indicates that charge and time are in physical units while smaller values of the relBCID indicate that they are in counts. // In case of the time being in nano seconds, the bcTag is anyhow not meaningfull while if the time is in counts it is decomposed into the tdo (time) and the bcTag. - bool timeAndChargeInCounts = ((persObj->m_bcTag) == 9); + bool timeAndChargeInCounts = ((persObj->m_bcTag) != 9); Muon::STGC_RawData* trans = new STGC_RawData( Identifier (persObj->m_id), persObj->m_bcTag, static_cast(persObj->m_time),// place holder for tdo->time from calibration diff --git a/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py b/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py index 9bc86e09a3efbfb76210159fcd0b46d5f1eab479..4b417dba9195f8d9631d78104e303434216f91ed 100644 --- a/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py +++ b/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py @@ -128,7 +128,9 @@ def MdtSegmentT0FitterCfg(flags, name="MdtSegmentT0Fitter", **kwargs): result.setPrivateTools(CompFactory.TrkDriftCircleMath.MdtSegmentT0Fitter(name, **kwargs)) return result -def DCMathSegmentMakerCfg(flags, **kwargs): +def DCMathSegmentMakerCfg(flags, doSegmentT0Fit=None, **kwargs): + doSegmentT0Fit = kwargs.pop('doSegmentT0Fit', flags.Muon.doSegmentT0Fit) + from MuonConfig.MuonRIO_OnTrackCreatorToolConfig import MdtDriftCircleOnTrackCreatorCfg, MuonClusterOnTrackCreatorCfg, TriggerChamberClusterOnTrackCreatorCfg from MuonConfig.MuonCondAlgConfig import MdtCondDbAlgCfg @@ -168,7 +170,7 @@ def DCMathSegmentMakerCfg(flags, **kwargs): kwargs.setdefault("AddUnassociatedPhiHits", True) kwargs.setdefault("RecoverBadRpcCabling", True) - if flags.Muon.doSegmentT0Fit: + if doSegmentT0Fit: mdt_dcot_CA = MdtDriftCircleOnTrackCreatorCfg(flags, name="MdtDriftCircleOnTrackCreatorAdjustableT0", TimingMode=3, \ DoTofCorrection=True, TimeWindowSetting=MdtCalibWindowNumber('Collision_data')) kwargs.setdefault("MdtCreatorT0", result.getPrimaryAndMerge(mdt_dcot_CA)) # TODO - is this correct? @@ -796,6 +798,9 @@ def MuonSegmentFindingCfg(flags, cardinality=1): result.merge(MuonSegmentFilterAlgCfg(flags)) result.addEventAlgo(CompFactory.xAODMaker.MuonSegmentCnvAlg("MuonSegmentCnvAlg")) + result.addEventAlgo(CompFactory.xAODMaker.MuonSegmentCnvAlg("MuonSegmentCnvAlg_NCB", + SegmentContainerName="NCB_TrackMuonSegments", + xAODContainerName="NCB_MuonSegments") ) if flags.Detector.EnableMM or flags.Detector.EnablesTGC: result.addEventAlgo(CompFactory.xAODMaker.MuonSegmentCnvAlg("QuadNSW_MuonSegmentCnvAlg", diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MMRawDataMonitoring/python/MMMonitorAlgorithm.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MMRawDataMonitoring/python/MMMonitorAlgorithm.py index 66fab84c11824805d96c70834775d9ac2865d763..25aa31a307189654ff24cbf56050aa0ed9dde629 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MMRawDataMonitoring/python/MMMonitorAlgorithm.py +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MMRawDataMonitoring/python/MMMonitorAlgorithm.py @@ -40,19 +40,26 @@ def MMMonitoringConfig(inputFlags): mmGroup.defineHistogram('residual,eta_trk;Res_vs_eta', type='TH2F', title="Residuals vs Eta; Residuals [mm]; Eta;", path='Overview',xbins=100, xmin=-10, xmax=10., ybins=100, ymin=-3.,ymax=3., opt='kAlwaysCreate') mmGroup.defineHistogram('residual,phi_trk;Res_vs_phi', type='TH2F', title="Residuals vs Eta; Residuals [mm]; Phi;", path='Overview',xbins=100, xmin=-10, xmax=10., ybins=16, ymin=-3.14,ymax=3.14, opt='kAlwaysCreate') mmGroup.defineHistogram('residual,stPhi_mon;Res_vs_stPhi', type='TH2F', title="Residuals vs station Phi; Res; stPhi;", path='Overview', xbins=100, xmin=-10, xmax=10., ybins=16, ymin=.5,ymax=16.5, opt='kAlwaysCreate') - mmGroup.defineHistogram('charge_all;Charge', type='TH1F', title='Charge; Charge[fC]; Number of Entries', path='Overview', xbins=120, xmin=0., xmax=1200., opt='kAlwaysCreate') + mmGroup.defineHistogram('charge_all;Charge', type='TH1F', title='Charge; Charge[fC]; Number of Entries', path='Overview', xbins=200, xmin=0., xmax=1000., opt='kAlwaysCreate') mmGroup.defineHistogram('x_mon, y_mon;Posy_vs_Posx', type='TH2F', title="Posy vs Posx; MM-GlobalX [mm]; MM-GlobalY [mm];", path='Overview', xbins=500, xmin=-5000, xmax=5000., ybins=500, ymin=-5000., ymax=5000., opt='kAlwaysCreate') mmGroup.defineHistogram('R_mon, z_mon;Posz_vs_R', type='TH2F', title="Posz vs R; MM-GlobalR [mm]; MM-GlobalZ [mm];", path='Overview', xbins=500, xmin=0, xmax=5000., ybins=1000, ymin=-8000 ,ymax=8000, opt='kAlwaysCreate') mmGroup.defineHistogram('numberofstrips_percluster;Nstrips_percluster', type='TH1F', title='Number of strips per cluster; Number of strips; Number of Entries', path='Overview', xbins=20, xmin=0., xmax=20., opt='kAlwaysCreate') mmGroup.defineHistogram('mu_TPC_angle;uTPC_angle', type='TH1F', title='#mu TPC angle; #mu TPC angle [degrees]; Number of Entries', path='Overview', xbins=2000, xmin=-100, xmax=100, opt='kAlwaysCreate') mmGroup.defineHistogram('mu_TPC_chi2;uTPC_chi2', type='TH1F', title='#mu TPC #chi2; #mu TPC #chi2; Number of Entries', path='Overview', xbins=100, xmin=0., xmax=1., opt='kAlwaysCreate') - mmGroup.defineHistogram('strip_times;strip_time', type='TH1F', title='strip time; time [ns]; Number of Entries', path='Overview', xbins=200, xmin=0., xmax=200., opt='kAlwaysCreate') + mmGroup.defineHistogram('strip_times;strip_time', type='TH1F', title='strip time; time [ns]; Number of Entries', path='Overview', xbins=600, xmin=-300., xmax=300., opt='kAlwaysCreate') mmGroup.defineHistogram('cluster_times;cluster_time', type='TH1F', title='cluster time; time [ns]; Number of Entries', path='Overview', xbins=200, xmin=0., xmax=200., opt='kAlwaysCreate') mmGroup.defineHistogram('statEta_strip, strip_number;Strip_Number_vs_StationEta', type='TH2F', title='Strip Numbers vs Station Eta; ; Strip Number;', path='Overview', xbins=5, xmin=-2, xmax=3., xlabels=['#eta-2','#eta-1','','#eta1','#eta2'], ybins=5120, ymin=0., ymax=5120., opt='kAlwaysCreate') mmGroup.defineHistogram('nstrips_ontrack;Nstrips_percluster_ontrack', type='TH1F', title='Number of strips per cluster on track; Number of strips; Number of Entries', path='Overview', xbins=20, xmin=0., xmax=20., opt='kAlwaysCreate') - mmGroup.defineHistogram('charge_ontrack;Charge_ontrack', type='TH1F', title='Charge on track; Charge [fC]; Number of Entries', path='Overview', xbins=120, xmin=0, xmax=1200., opt='kAlwaysCreate') - mmGroup.defineHistogram('strip_time_on_track', type='TH1F', title='strip time on track; time [ns]; Number of Entries', path='Overview', xbins=200, xmin=0., xmax=200., opt='kAlwaysCreate') + mmGroup.defineHistogram('charge_ontrack;Charge_ontrack', type='TH1F', title='Charge on track; Charge [fC]; Number of Entries', path='Overview', xbins=200, xmin=0, xmax=1000., opt='kAlwaysCreate') + mmGroup.defineHistogram('strip_time_on_track', type='TH1F', title='strip time on track; time [ns]; Number of Entries', path='Overview', xbins=600, xmin=-300., xmax=300., opt='kAlwaysCreate') mmGroup.defineHistogram('cluster_time_on_track', type='TH1F', title='cluster time on track; time [ns]; Number of Entries', path='Overview', xbins=200, xmin=0, xmax=200., opt='kAlwaysCreate') + + + + mmGroup.defineHistogram('cluster_size_onseg;Nstrips_percluster_onseg', type='TH1F', title='Number of strips per cluster on segments; Number of strips; Number of Entries', path='Overview', xbins=20, xmin=0., xmax=20., opt='kAlwaysCreate') + mmGroup.defineHistogram('charge_onseg;Charge_onseg', type='TH1F', title='Charge on segments; Charge[fC]; Number of Entries', path='Overview', xbins=200, xmin=0., xmax=1000., opt='kAlwaysCreate') + mmGroup.defineHistogram('strp_time_onseg;strip_time_onseg', type='TH1F', title='strip time on segments; time [ns]; Number of Entries', path='Overview', xbins=600, xmin=-300, xmax=300., opt='kAlwaysCreate') + thisLabelx,thisLabely=getMMLabel("x_lab_occ_etaminus1","y_lab_occ_etaminus1") mmGroup.defineHistogram('sector_CSide_eta1,stationPhi_CSide_eta1;Occupancy_CSide_eta1_PCB', type='TH2F', title='Occupancy EC eta1; ; Sector;', path='Occupancy', xbins=40, xmin=0, xmax=40., ybins=16, ymin=.5, ymax=16.5, xlabels=thisLabelx, opt='kAlwaysCreate') mmGroup.defineHistogram('sector_CSide_eta1_ontrack,stationPhi_CSide_eta1_ontrack;Occupancy_CSide_eta1_PCB_ontrack', type='TH2F', title='Occupancy EC eta1 ontrack; ;Sector ;', path='Occupancy_ontrack', xbins=40, xmin=0, xmax=40., ybins=16, ymin=.5, ymax=16.5, xlabels=thisLabelx, opt='kAlwaysCreate') @@ -132,11 +139,11 @@ def MMMonitoringConfig(inputFlags): title_cl_size=f'Cluster size {iside} eta{eta} phi{phi} mult{multi} gasgap{gas_gap}; PCB; cluster size' mmSideGroup.defineHistogram(var_clus_size, type='TH2F', title=title_cl_size, path="Cluster_size_perPCB", xbins=maxpcb, xmin=.5, xmax=maxpcb+.5, ybins=20, ymin=0, ymax=20, opt='kAlwaysCreate') - var_strip_time=f'pcb_mon_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap},strp_time_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap};Strip_time_vs_PCB_{iside}_eta{eta}_phi{phi}_ml{multi}_gap{gas_gap}' + var_strip_time=f'pcb_strip_mon_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap},strp_time_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap};Strip_time_vs_PCB_{iside}_eta{eta}_phi{phi}_ml{multi}_gap{gas_gap}' var_clus_time=f'pcb_mon_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap},cluster_time_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap};Cluster_time_vs_PCB_{iside}_eta{eta}_phi{phi}_ml{multi}_gap{gas_gap}' title_strp_time=f'Strip time {iside} eta{eta} phi{phi} mult{multi} gasgap{gas_gap}; PCB; strip time [ns]' title_clus_time=f'Cluster time {iside} eta{eta} phi{phi} mult{multi} gasgap{gas_gap}; PCB; cluster time [ns]' - mmSideGroup.defineHistogram(var_strip_time, type='TH2F', title=title_strp_time, path='Strip_time_perPCB', xbins=maxpcb, xmin=.5, xmax=maxpcb+.5, ybins=200, ymin=0, ymax=200, opt='kAlwaysCreate') + mmSideGroup.defineHistogram(var_strip_time, type='TH2F', title=title_strp_time, path='Strip_time_perPCB', xbins=maxpcb, xmin=.5, xmax=maxpcb+.5, ybins=600, ymin=-300, ymax=300, opt='kAlwaysCreate') mmSideGroup.defineHistogram(var_clus_time, type='TH2F', title=title_clus_time, path='Cluster_time_perPCB', xbins=maxpcb, xmin=.5, xmax=maxpcb+.5, ybins=200, ymin=0, ymax=200, opt='kAlwaysCreate') var_charge_perPCB=f'pcb_mon_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap},charge_perPCB_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap};Charge_vs_PCB_{iside}_eta{eta}_phi{phi}_ml{multi}_gap{gas_gap}' @@ -147,27 +154,27 @@ def MMMonitoringConfig(inputFlags): title_clus_size_ontrack=f'Cluster size {iside} eta{eta} phi{phi} mult{multi} gasgap{gas_gap} on track; PCB; cluster size' mmSideGroup.defineHistogram(var_clus_size_ontrack, type='TH2F', title=title_clus_size_ontrack, path='Cluster_size_ontrack', xbins=maxpcb, xmin=.5, xmax=maxpcb+.5, ybins=20, ymin=0, ymax=20, opt='kAlwaysCreate') - var_strip_time_ontrack=f'pcb_mon_ontrack_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap},strp_time_ontrack_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap};Strip_time_ontrack_vs_PCB_{iside}_eta{eta}_phi{phi}_ml{multi}_gap{gas_gap}' + var_strip_time_ontrack=f'pcb_strip_mon_ontrack_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap},strp_time_ontrack_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap};Strip_time_ontrack_vs_PCB_{iside}_eta{eta}_phi{phi}_ml{multi}_gap{gas_gap}' var_clus_time_ontrack=f'pcb_mon_ontrack_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap},cluster_time_ontrack_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap};Cluster_time_ontrack_vs_PCB_{iside}_eta{eta}_phi{phi}_ml{multi}_gap{gas_gap}' title_strp_time_ontrack=f'Strip time {iside} eta{eta} phi{phi} mult{multi} gasgap{gas_gap} on track; PCB; strip time [ns]' title_clus_time_ontrack=f'Cluster time {iside} eta{eta} phi{phi} mult{multi} gasgap{gas_gap} on track; PCB; cluster time [ns]' - mmSideGroup.defineHistogram(var_strip_time_ontrack, type='TH2F', title=title_strp_time_ontrack, path='Strip_time_ontrack', xbins=maxpcb, xmin=.5, xmax=maxpcb+.5, ybins=200, ymin=0, ymax=200, opt='kAlwaysCreate') + mmSideGroup.defineHistogram(var_strip_time_ontrack, type='TH2F', title=title_strp_time_ontrack, path='Strip_time_ontrack', xbins=maxpcb, xmin=.5, xmax=maxpcb+.5, ybins=600, ymin=-300, ymax=300, opt='kAlwaysCreate') mmSideGroup.defineHistogram(var_clus_time_ontrack, type='TH2F', title=title_clus_time_ontrack, path='Cluster_time_ontrack', xbins=maxpcb, xmin=.5, xmax=maxpcb+.5, ybins=200, ymin=0, ymax=200, opt='kAlwaysCreate') var_charge_perPCB_ontrack=f'pcb_mon_ontrack_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap},charge_perPCB_ontrack_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap};Charge_vs_PCB_ontrack_{iside}_eta{eta}_phi{phi}_ml{multi}_gap{gas_gap}' title_charge_perPCB_ontrack=f'Charge {iside} eta{eta} phi{phi} mult{multi} gasgap{gas_gap} on track; PCB; charge [fC]' mmSideGroup.defineHistogram(var_charge_perPCB_ontrack, type='TH2F', title=title_charge_perPCB_ontrack, path='Charge_ontrack', xbins=maxpcb, xmin=.5, xmax=maxpcb+.5, ybins=120, ymin=0, ymax=1200, opt='kAlwaysCreate') - var_clus_size_onseg=f'pcb_mon_clu_onseg_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap},cluster_size_onseg_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap};Cluster_size_vs_PCB_onseg_{iside}_eta{eta}_phi{phi}_ml{multi}_gap{gas_gap}' + var_clus_size_onseg=f'pcb_mon_onseg_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap},cluster_size_onseg_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap};Cluster_size_vs_PCB_onseg_{iside}_eta{eta}_phi{phi}_ml{multi}_gap{gas_gap}' title_clus_size_onseg=f'Cluster size {iside} eta{eta} phi{phi} mult{multi} gasgap{gas_gap} on segms; PCB; cluster size' mmSideGroup.defineHistogram(var_clus_size_onseg, type='TH2F', title=title_clus_size_onseg, path='Segments/Cluster_size_onseg', xbins=maxpcb, xmin=.5, xmax=maxpcb+.5, ybins=20, ymin=0, ymax=20, opt='kAlwaysCreate') - var_strip_time_onseg=f'pcb_mon_onseg_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap},strp_time_onseg_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap};Strip_time_onseg_vs_PCB_{iside}_eta{eta}_phi{phi}_ml{multi}_gap{gas_gap}' + var_strip_time_onseg=f'pcb_strip_mon_onseg_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap},strp_time_onseg_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap};Strip_time_onseg_vs_PCB_{iside}_eta{eta}_phi{phi}_ml{multi}_gap{gas_gap}' title_strp_time_onseg=f'Strip time {iside} eta{eta} phi{phi} mult{multi} gasgap{gas_gap} on segms; PCB; strip time [ns]' - mmSideGroup.defineHistogram(var_strip_time_onseg, type='TH2F', title=title_strp_time_onseg, path='Segments/Strip_time_onseg', xbins=maxpcb, xmin=.5, xmax=maxpcb+.5, ybins=200, ymin=0, ymax=200, opt='kAlwaysCreate') + mmSideGroup.defineHistogram(var_strip_time_onseg, type='TH2F', title=title_strp_time_onseg, path='Segments/Strip_time_onseg', xbins=maxpcb, xmin=.5, xmax=maxpcb+.5, ybins=600, ymin=-300, ymax=300, opt='kAlwaysCreate') title_clus_time_onseg=f'Cluster time {iside} eta{eta} phi{phi} mult{multi} gasgap{gas_gap} on segms; PCB; cluster time [ns]' - var_clus_time_onseg=f'pcb_mon_clu_onseg_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap},cluster_time_onseg_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap};Cluster_time_onseg_vs_PCB_{iside}_eta{eta}_phi{phi}_ml{multi}_gap{gas_gap}' + var_clus_time_onseg=f'pcb_mon_onseg_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap},cluster_time_onseg_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap};Cluster_time_onseg_vs_PCB_{iside}_eta{eta}_phi{phi}_ml{multi}_gap{gas_gap}' mmSideGroup.defineHistogram(var_clus_time_onseg, type='TH2F', title=title_clus_time_onseg, path='Segments/Cluster_time_onseg', xbins=maxpcb, xmin=.5, xmax=maxpcb+.5, ybins=200, ymin=0, ymax=200, opt='kAlwaysCreate') - var_charge_perPCB_onseg=f'pcb_mon_clu_onseg_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap},charge_perPCB_onseg_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap};Charge_vs_PCB_onseg_{iside}_eta{eta}_phi{phi}_ml{multi}_gap{gas_gap}' + var_charge_perPCB_onseg=f'pcb_mon_onseg_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap},charge_perPCB_onseg_{iside}_phi{phi}_eta{eta}_ml{multi}_gap{gas_gap};Charge_vs_PCB_onseg_{iside}_eta{eta}_phi{phi}_ml{multi}_gap{gas_gap}' title_charge_perPCB_onseg=f'Charge {iside} eta{eta} phi{phi} mult{multi} gasgap{gas_gap} on seg; PCB; charge [fC]' mmSideGroup.defineHistogram(var_charge_perPCB_onseg, type='TH2F', title=title_charge_perPCB_onseg, path='Segments/Charge_onseg', xbins=maxpcb, xmin=.5, xmax=maxpcb+.5, ybins=120, ymin=0, ymax=1200, opt='kAlwaysCreate') @@ -193,7 +200,6 @@ if __name__=='__main__': from AthenaConfiguration.AllConfigFlags import ConfigFlags ConfigFlags.Input.Files =['/afs/cern.ch/user/b/bigliett/myeos/DQ/group.det-muon.DiMuonGenerator_EtaGtr_1p2_Pt10to100.ESD.Run3_2NSW_250322_reco_n270322_EXT0/group.det-muon.28531270.EXT0._000004.ESD.pool.root'] - #from AthenaCommon.AthenaCommonFlags import athenaCommonFlags ConfigFlags.Output.HISTFileName = 'monitor.root' @@ -213,4 +219,4 @@ if __name__=='__main__': cfg.merge(mmMonitorAcc) #cfg.printConfig(withDetails=True, summariseProps = True) # number of events selected in the ESD - cfg.run(5000) + cfg.run(-1) diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MMRawDataMonitoring/src/MMRawDataMonAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MMRawDataMonitoring/src/MMRawDataMonAlg.cxx index 3c49e92cb134ce43ac443d5a8e4e0dd70eca8cc4..f8f74b13820b68c3e98816f33df44f6ff35a74ad 100755 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MMRawDataMonitoring/src/MMRawDataMonAlg.cxx +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MMRawDataMonitoring/src/MMRawDataMonAlg.cxx @@ -41,7 +41,7 @@ namespace { struct MMOverviewHistogramStruct { std::vector statEta_strip; - std::vector charge_all; + std::vector charge_all; std::vector strp_times; std::vector cl_times; std::vector strip_number; @@ -85,17 +85,18 @@ namespace { }; struct MMSummaryHistogramStruct { - std::vector cl_size; - std::vector pcb; - std::vector strip_number; - std::vector sector_strip; - std::vector charge; - std::vector strp_times; - std::vector cl_times; - std::vector mu_TPC_angle; - std::vector x_ontrack; - std::vector y_ontrack; - std::vector residuals; + std::vector cl_size; + std::vector pcb; + std::vector pcb_strip; + std::vector strip_number; + std::vector sector_strip; + std::vector charge; + std::vector strp_times; + std::vector cl_times; + std::vector mu_TPC_angle; + std::vector x_ontrack; + std::vector y_ontrack; + std::vector residuals; }; struct MMEfficiencyHistogramStruct { @@ -321,17 +322,19 @@ void MMRawDataMonAlg::fillMMOverviewHistograms( const MMOverviewHistogramStruct& StatusCode MMRawDataMonAlg::fillMMSummaryVects( const Muon::MMPrepData* prd, MMSummaryHistogramStruct (&vects)[2][16][2][2][4]) const { - Identifier Id = prd->identify(); - const std::vector& stripIds = prd->rdoList(); + Identifier Id = prd->identify(); + const std::vector& stripIds = prd->rdoList(); + + std::string stName = m_idHelperSvc->mmIdHelper().stationNameString(m_idHelperSvc->mmIdHelper().stationName(Id)); + int thisStationEta = m_idHelperSvc->mmIdHelper().stationEta(Id); + int thisStationPhi = m_idHelperSvc->mmIdHelper().stationPhi(Id); + int thisMultiplet = m_idHelperSvc->mmIdHelper().multilayer(Id); + int thisGasgap = m_idHelperSvc->mmIdHelper().gasGap(Id); + int ch = m_idHelperSvc->mmIdHelper().channel(Id); + float thisCharge=prd->charge()*conversion_charge; + float thisMu_TPC_angle=prd->angle()*toDeg; + std::vector strip_times = prd->stripTimes(); - std::string stName = m_idHelperSvc->mmIdHelper().stationNameString(m_idHelperSvc->mmIdHelper().stationName(Id)); - int thisStationEta = m_idHelperSvc->mmIdHelper().stationEta(Id); - int thisStationPhi = m_idHelperSvc->mmIdHelper().stationPhi(Id); - int thisMultiplet = m_idHelperSvc->mmIdHelper().multilayer(Id); - int thisGasgap = m_idHelperSvc->mmIdHelper().gasGap(Id); - float thisCharge=prd->charge()*conversion_charge; - float thisMu_TPC_angle=prd->angle()*toDeg; - std::vector strip_times = prd->stripTimes(); if ( thisGasgap % 2 == 0 ) thisMu_TPC_angle = - thisMu_TPC_angle; @@ -347,7 +350,12 @@ StatusCode MMRawDataMonAlg::fillMMSummaryVects( const Muon::MMPrepData* prd, MMS auto& Vectors = vects[iside][phi-1][sectorEta][thisMultiplet-1][thisGasgap-1]; Vectors.mu_TPC_angle.push_back(thisMu_TPC_angle); Vectors.charge.push_back(thisCharge); - + + unsigned int csize = stripIds.size(); + Vectors.cl_size.push_back(csize); + int PCB = get_PCB_from_channel(ch); + Vectors.pcb.push_back(PCB); + // loop on strips int sIdx = 0; const std::vector& stripNumbers=prd->stripNumbers(); @@ -360,7 +368,8 @@ StatusCode MMRawDataMonAlg::fillMMSummaryVects( const Muon::MMPrepData* prd, MMS // Filling Vectors for both sides, considering each strip Vectors.strip_number.push_back(stripNumbers[sIdx]); Vectors.strp_times.push_back(strip_times.at(sIdx)); - cluster_time += strip_times.at(sIdx); + cluster_time += strip_times.at(sIdx); + Vectors.pcb_strip.push_back( get_PCB_from_channel(stripNumbers[sIdx])); ++sIdx; if(iside==1) Vectors.sector_strip.push_back(get_bin_for_occ_ASide_hist(stationEta,multiplet,gas_gap)); if(iside==0) Vectors.sector_strip.push_back(get_bin_for_occ_CSide_hist(stationEta,multiplet,gas_gap)); @@ -384,16 +393,16 @@ StatusCode MMRawDataMonAlg::fillMMSummaryHistograms( const MMSummaryHistogramStr auto strip_number = Monitored::Collection("strip_number_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1), Vectors.strip_number); if(!Vectors.strip_number.empty()) { - auto cluster_size = Monitored::Scalar("cluster_size_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), Vectors.strip_number.size()); + auto cluster_size = Monitored::Collection("cluster_size_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), Vectors.cl_size); auto strip_times = Monitored::Collection("strp_time_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), Vectors.strp_times); auto cluster_time = Monitored::Collection("cluster_time_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), Vectors.cl_times); auto charge_perPCB = Monitored::Collection("charge_perPCB_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), Vectors.charge); - auto pcb_mon = Monitored::Scalar("pcb_mon_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), get_PCB_from_channel(Vectors.strip_number.at(0))); - fill(MM_sideGroup, cluster_size, strip_times, cluster_time, charge_perPCB, pcb_mon); + auto pcb_mon = Monitored::Collection("pcb_mon_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), Vectors.pcb); + auto pcb_strip_mon = Monitored::Collection("pcb_strip_mon_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), Vectors.pcb_strip); + fill(MM_sideGroup, cluster_size, strip_times, cluster_time, charge_perPCB, pcb_mon, pcb_strip_mon); } - auto charge_perLayer = Monitored::Collection("charge_" + MM_Side[iside] + "_sectorphi" + std::to_string(statPhi+1) + "_stationEta" + EtaSector[statEta] + "_multiplet" + std::to_string(multiplet+1) + "_gas_gap" + std::to_string(gas_gap+1), Vectors.charge); - auto mu_TPC_angle_perLayer = Monitored::Collection("mu_TPC_angle_" + MM_Side[iside] + "_sectorphi" + std::to_string(statPhi+1) + "_stationEta" + EtaSector[statEta] + "_multiplet" + std::to_string(multiplet+1) + "_gas_gap" + std::to_string(gas_gap+1),Vectors.mu_TPC_angle); - fill(MM_sideGroup, strip_number, sector_strip, charge_perLayer, mu_TPC_angle_perLayer); + + fill(MM_sideGroup, strip_number, sector_strip); } } } @@ -462,6 +471,8 @@ void MMRawDataMonAlg::clusterFromTrack(const xAOD::TrackParticleContainer* muon vects.numberofstrips_percluster.push_back(csize); vects.charge_all.push_back(charge); + vect.cl_size.push_back(csize); + vect.pcb.push_back(PCB); float c_time = 0; for(unsigned int sIdx=0; sIdx& stripNumbers = prd->stripNumbers(); auto& pcb_vects = summaryPlots[iside][sectorPhi-1][std::abs(stEta)-1][multi-1][gap-1]; - //pcb_vects.pcb.push_back( get_PCB_from_channel(stripNumbers[0])); pcb_vects.cl_size.push_back(csize); - + pcb_vects.pcb.push_back(PCB); std::vector s_times = prd->stripTimes(); float c_time = 0; for(unsigned int sIdx=0; sIdxcharge()*conversion_charge; - pcb_vects.charge.push_back(charge); + pcb_vects.charge.push_back(charge); auto& vects = overviewPlots; @@ -793,7 +807,7 @@ void MMRawDataMonAlg::clusterFromSegments(const Trk::SegmentCollection* segms, i auto sector_CSide_eta2_onseg = Monitored::Collection("sector_CSide_eta2_onseg",vects.sector_CSide_eta2_onseg); auto sector_CSide_eta1_onseg = Monitored::Collection("sector_CSide_eta1_onseg",vects.sector_CSide_eta1_onseg); auto lb_onseg = Monitored::Scalar("lb_onseg", lb); - + fill("mmMonitor", stationPhi_CSide_eta1_onseg, stationPhi_CSide_eta2_onseg, stationPhi_ASide_eta1_onseg, stationPhi_ASide_eta2_onseg, sector_CSide_eta1_onseg, sector_CSide_eta2_onseg, sector_ASide_eta1_onseg, sector_ASide_eta2_onseg, lb_onseg); @@ -812,12 +826,16 @@ void MMRawDataMonAlg::clusterFromSegments(const Trk::SegmentCollection* segms, i if(pcb_vects.pcb.empty()) continue; auto pcb_mon = Monitored::Collection("pcb_mon_onseg_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), pcb_vects.pcb); - auto pcb_clu_mon = Monitored::Scalar("pcb_mon_clu_onseg_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), pcb_vects.pcb.at(0)); + auto pcb_strip_mon = Monitored::Collection("pcb_strip_mon_onseg_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), pcb_vects.pcb_strip); auto strip_times = Monitored::Collection("strp_time_onseg_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), pcb_vects.strp_times); auto cluster_time = Monitored::Collection("cluster_time_onseg_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), pcb_vects.cl_times); auto clus_size = Monitored::Collection("cluster_size_onseg_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), pcb_vects.cl_size); auto charge_perPCB = Monitored::Collection("charge_perPCB_onseg_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), pcb_vects.charge); - fill(MM_sideGroup, clus_size, strip_times, charge_perPCB, cluster_time, pcb_mon, pcb_clu_mon); + auto clus_size_all = Monitored::Collection("cluster_size_onseg", pcb_vects.cl_size); + auto charge_all = Monitored::Collection("charge_onseg", pcb_vects.charge); + auto strip_times_all = Monitored::Collection("strp_time_onseg", pcb_vects.strp_times); + fill(MM_sideGroup, clus_size, strip_times, charge_perPCB, cluster_time, pcb_mon, pcb_strip_mon); + fill("mmMonitor", clus_size_all, charge_all, strip_times_all); } } } diff --git a/Projects/Athena/version.txt b/Projects/Athena/version.txt index 25ddf3ab9c676463f604689f556be5f8dc76662b..92fc395c8be9397de74208149c0265a67f75435c 100644 --- a/Projects/Athena/version.txt +++ b/Projects/Athena/version.txt @@ -1 +1 @@ -22.0.68 +22.0.69 diff --git a/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedConfigFlags.py b/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedConfigFlags.py index 78fef5a7973042336d150a2548273e8dfdf98465..4e2b2032dce619a309b1c2b05dfc88556324c886 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedConfigFlags.py +++ b/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedConfigFlags.py @@ -17,7 +17,7 @@ def createMuonCombinedConfigFlags(): # Switch on/off algorithms that make Muons for the CaloMuonCollection mcf.addFlag("MuonCombined.doCaloTrkMuId",True) # Switch on/off algorithms that make Muons for the MuGirlLowBetaMuonCollection - mcf.addFlag("MuonCombined.doMuGirlLowBeta",lambda prevFlags : prevFlags.doMuGirl is True ) + mcf.addFlag("MuonCombined.doMuGirlLowBeta",lambda prevFlags : prevFlags.MuonCombined.doMuGirl) mcf.addFlag("MuonCombined.writeUnAssocSegments", True) return mcf diff --git a/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedRecToolsConfig.py b/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedRecToolsConfig.py index 98c83d37d4214398296438200f9e033d22869638..54bfff8399b0875b36a89d8137c2498e3a201566 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedRecToolsConfig.py +++ b/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedRecToolsConfig.py @@ -1219,23 +1219,41 @@ def MuonStauRecoToolCfg(flags, name="MuonStauRecoTool", **kwargs): # In the old configuration this was split over several functions. But since these Stau tools are only used here, # trying a new approach. We can always refactorise later if necessary. - from MuonConfig.MuonSegmentFindingConfig import DCMathSegmentMakerCfg + from MuonConfig.MuonSegmentFindingConfig import DCMathSegmentMakerCfg, MuonPRDSelectionToolCfg from MuonConfig.MuonTrackBuildingConfig import MuonChamberHoleRecoveryToolCfg from MuonConfig.MuonRecToolsConfig import MuonAmbiProcessorCfg, MuonSeededSegmentFinderCfg from MuonConfig.MuonCalibrationConfig import MdtCalibrationDbToolCfg + from MuonConfig.MuonRIO_OnTrackCreatorToolConfig import MdtDriftCircleOnTrackCreatorCfg + kwargs.setdefault("DoSummary", flags.Muon.printSummary) kwargs.setdefault("ConsideredPDGs", [13, -13, 1000015, -1000015]) kwargs.setdefault("DoTruth", flags.Input.isMC) - kwargs.setdefault("DoSummary", flags.Muon.printSummary) - result = MdtDriftCircleOnTrackCreatorStauCfg(flags) + + result = MuonEDMPrinterToolCfg(flags) + # Not setting up MuonIdHelperSvc nor MuonEDMHelperSvc + kwargs.setdefault("MuonEDMPrinterTool", result.getPrimary()) + # This is going to be used in a few tools below - rotcreator = result.popPrivateTools() + rotcreator = result.popToolsAndMerge( MdtDriftCircleOnTrackCreatorStauCfg(flags)) segmentmaker = result.popToolsAndMerge(DCMathSegmentMakerCfg( flags, name="DCMathStauSegmentMaker", MdtCreator=rotcreator)) - # Also used by MuonSeededSegmentFinder below + # segmentmaker also used by MuonSeededSegmentFinder below kwargs.setdefault("MuonSegmentMaker", segmentmaker) + kwargs.setdefault("MuonSegmentMakerT0Fit", result.popToolsAndMerge(DCMathSegmentMakerCfg( + flags, name="DCMathStauSegmentMaker", MdtCreator=rotcreator, doSegmentT0Fit=True))) + + kwargs.setdefault("MuonLayerSegmentMatchingTool", result.popToolsAndMerge(MuonLayerSegmentMatchingToolCfg(flags))) + # Not configuring MuonRecoValidationTool as it is off by default, but it would need configuring if used + kwargs.setdefault("TrackAmbiguityProcessor", + result.popToolsAndMerge(MuonAmbiProcessorCfg(flags))) + # I don't believe MuonHitTimingTool needs configuration. + kwargs.setdefault("MuonPRDSelectionTool", result.popToolsAndMerge( + MuonPRDSelectionToolCfg(flags))) + kwargs.setdefault("MuonPRDSelectionToolStau", result.popToolsAndMerge( + MuonPRDSelectionToolCfg(flags, MdtDriftCircleOnTrackCreator=rotcreator))) + kwargs.setdefault("MdtDriftCircleOnTrackCreator", result.popToolsAndMerge(MdtDriftCircleOnTrackCreatorCfg(flags))) # Now setup MuonInsideOutRecoTool property of MuonStauRecoTool. Long chain here! Could split for clarity. Another option would be to have a Stau flag on # shared tool functions. chamberholerecoverytool = result.popToolsAndMerge( @@ -1253,12 +1271,10 @@ def MuonStauRecoToolCfg(flags, name="MuonStauRecoTool", **kwargs): kwargs.setdefault("MuonInsideOutRecoTool", result.popToolsAndMerge( MuonInsideOutRecoToolCfg(flags, MuonCandidateTrackBuilderTool=muoncandidatetrackbuilder))) # Rest - kwargs.setdefault("TrackAmbiguityProcessor", - result.popToolsAndMerge(MuonAmbiProcessorCfg(flags))) + kwargs.setdefault("MdtCalibrationDbTool", result.popToolsAndMerge( MdtCalibrationDbToolCfg(flags))) - kwargs.setdefault("MuonLayerSegmentMatchingTool", result.popToolsAndMerge(MuonLayerSegmentMatchingToolCfg(flags))) tool = CompFactory.MuonCombined.MuonStauRecoTool(name, **kwargs) result.setPrivateTools(tool) diff --git a/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedReconstructionConfig.py b/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedReconstructionConfig.py index 0d2098edcc9c75761daf7dfbd717ab3a74a304b8..ab9f9b1019f9132e3fe8700f19f069fab0463371 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedReconstructionConfig.py +++ b/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedReconstructionConfig.py @@ -560,6 +560,8 @@ def CombinedMuonOutputCfg(flags): def MuonCombinedReconstructionCfg(flags): from MuonConfig.MuonGeometryConfig import MuonIdHelperSvcCfg + from MuonCombinedConfig.MuonCombinedRecToolsConfig import MuonSegmentConverterToolCfg + # Many components need these services, so setup once here. result = MuonIdHelperSvcCfg(flags) @@ -623,17 +625,23 @@ def MuonCombinedReconstructionCfg(flags): result.merge(MuonSegContainerMergerAlgCfg(flags)) + muonSegmentCnvTool = result.popToolsAndMerge( MuonSegmentConverterToolCfg(flags) ) result.addEventAlgo(CompFactory.xAODMaker.MuonSegmentCnvAlg("MuonSegmentCnvAlg", SegmentContainerName="TrkMuonSegments", - xAODContainerName="MuonSegments") ) + xAODContainerName="MuonSegments", + MuonSegmentConverterTool=muonSegmentCnvTool) ) if flags.MuonCombined.writeUnAssocSegments: result.addEventAlgo(CompFactory.xAODMaker.MuonSegmentCnvAlg("UnAssocMuonSegmentCnvAlg", SegmentContainerName="UnAssocMuonTrkSegments", - xAODContainerName="UnAssocMuonSegments") ) - if flags.MuonCombined.doMuGirlLowBeta: - result.addEventAlgo(CompFactory.xAODMaker.MuonSegmentCnvAlg("MuonStauSegmentCnvAlg", - SegmentContainerName="TrkStauSegments", - xAODContainerName="StauSegments")) + xAODContainerName="UnAssocMuonSegments", + MuonSegmentConverterTool=muonSegmentCnvTool) ) + # FIXME - comment out for now, because it fails with missing TrkStauSegments + # if flags.MuonCombined.doMuGirlLowBeta: + # result.addEventAlgo(CompFactory.xAODMaker.MuonSegmentCnvAlg("MuonStauSegmentCnvAlg", + # SegmentContainerName="TrkStauSegments", + # xAODContainerName="StauSegments", + # MuonSegmentConverterTool=muonSegmentCnvTool)) + # runs over outputs and create xAODMuon collection result.merge(MuonCreatorAlgCfg(flags)) if do_LRT: @@ -664,7 +672,6 @@ if __name__ == "__main__": # python -m MuonCombinedConfig.MuonCombinedReconstructionConfig --run --threads=1 from MuonConfig.MuonConfigUtils import SetupMuonStandaloneArguments, SetupMuonStandaloneCA - from MuonCombinedConfig.MuonCombinedRecToolsConfig import MuonSegmentConverterToolCfg args = SetupMuonStandaloneArguments() from AthenaConfiguration.AllConfigFlags import ConfigFlags @@ -682,6 +689,8 @@ if __name__ == "__main__": ConfigFlags.Output.ESDFileName = args.output ConfigFlags.InDet.Tracking.doR3LargeD0 = False # Not working with this input ConfigFlags.Muon.useTGCPriorNextBC = False + ConfigFlags.MuonCombined.doMuGirlLowBeta = False # This fails due to "Hough data per sector vector not found" + if args.debug: from AthenaCommon.Debugging import DbgStage if args.debug not in DbgStage.allowed_values: @@ -701,18 +710,14 @@ if __name__ == "__main__": acc = MuonCombinedReconstructionCfg(ConfigFlags) cfg.merge(acc) - # Needed to provide xoadMuonSegments - muonSegmentCnvToolAcc = MuonSegmentConverterToolCfg( - ConfigFlags, OutputLevel=0) - muonSegmentCnvToolAcc.addEventAlgo(CompFactory.xAODMaker.MuonSegmentCnvAlg( - "MuonSegmentCnvAlg", MuonSegmentConverterTool=muonSegmentCnvToolAcc.popPrivateTools())) - cfg.merge(muonSegmentCnvToolAcc) + # This causes a stall. See https://its.cern.ch/jira/browse/ATEAM-825 # Leaving here for the moment, for convenience investigating this bug. # muonSegmentCnvTool = cfg.popToolsAndMerge( MuonSegmentConverterToolCfg(ConfigFlags, OutputLevel=0) ) # cfg.addEventAlgo(CompFactory.xAODMaker.MuonSegmentCnvAlg("MuonSegmentCnvAlg", MuonSegmentConverterTool=muonSegmentCnvTool)) + # Keep this in, since it makes debugging easier to simply uncomment and change Algo/Service name, # from AthenaCommon.Constants import VERBOSE # tmp = cfg.getEventAlgo("MuonCombinedMuonCandidateAlg") diff --git a/Reconstruction/RecExample/RecExRecoTest/python/MuonCombinedReco_ESDMC20e.py b/Reconstruction/RecExample/RecExRecoTest/python/MuonCombinedReco_ESDMC20e.py index c84c6044b17cbf160d3063ed90fc1b3b23df80a7..40f0294d9b320f59f21bfdef6dfb70a95733c38b 100644 --- a/Reconstruction/RecExample/RecExRecoTest/python/MuonCombinedReco_ESDMC20e.py +++ b/Reconstruction/RecExample/RecExRecoTest/python/MuonCombinedReco_ESDMC20e.py @@ -3,8 +3,9 @@ if __name__=="__main__": from AthenaConfiguration.AllConfigFlags import ConfigFlags - ConfigFlags.Input.Files = ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecExRecoTest/mc20e_13TeV/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.ESD.e4993_s3227_r12689/myESD.pool.root"] - ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-RUN2-09" + #Made in master, 25 May 2022 using + #https://gitlab.cern.ch/atlas/athena/-/blob/b74428c8ff7dcd8c859fce16001c60a14b78256b/Reconstruction/RecExample/RecJobTransformTests/test/test_mc20e_13TeV.sh + ConfigFlags.Input.Files = ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecExRecoTest/mc16_13TeV/mc16_13TeV.410470.PhPy8EG_A14_ttbar_hdamp258p75_nonallhad.recon.ESD.e6337_s3681_r13145/myESD.pool.root"] ConfigFlags.lock() from AthenaConfiguration.MainServicesConfig import MainServicesCfg diff --git a/Reconstruction/egamma/egammaValidation/share/egamma_art_checker_joboptions.py b/Reconstruction/egamma/egammaValidation/share/egamma_art_checker_joboptions.py index 34be1bcddf411cc67a5d90bf61c36d0e2aba2f8a..e05eb269ee2e1649b50a45fe09ea541f763c44e1 100644 --- a/Reconstruction/egamma/egammaValidation/share/egamma_art_checker_joboptions.py +++ b/Reconstruction/egamma/egammaValidation/share/egamma_art_checker_joboptions.py @@ -40,7 +40,7 @@ Tight_Photon = CfgMgr.AsgPhotonIsEMSelector( PhIsoTight = CfgMgr.CP__IsolationSelectionTool( name="PhIsoTight", - PhotonWP="Tight") + PhotonWP="FixedCutTight") PhIsoTightCaloOnly = CfgMgr.CP__IsolationSelectionTool( name="PhIsoTightCaloOnly", @@ -48,7 +48,7 @@ PhIsoTightCaloOnly = CfgMgr.CP__IsolationSelectionTool( PhIsoLoose = CfgMgr.CP__IsolationSelectionTool( name="PhIsoLoose", - PhotonWP="Loose") + PhotonWP="FixedCutLoose") # Ouput Message Level svcMgr.MessageSvc.OutputLevel = INFO diff --git a/Reconstruction/egamma/egammaValidation/test/test_electron.sh b/Reconstruction/egamma/egammaValidation/test/test_electron.sh index 303cbec00fbedd7edaf5df890797ee2dd6e65f41..88414747ad4a2c073dd8324731a7be4494569270 100755 --- a/Reconstruction/egamma/egammaValidation/test/test_electron.sh +++ b/Reconstruction/egamma/egammaValidation/test/test_electron.sh @@ -51,7 +51,6 @@ case $ArtProcess in $ATLAS_LOCAL_ROOT/dcube/current/DCubeClient/python/dcube.py -p -x dcube -c /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/egammaValidation/DCube_Config/electron.xml -r /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/egammaValidation/Nightly_Files/Nightly-monitoring_electron.hist.root Nightly-monitoring_electron.hist.root echo "art-result: $? plot" - ;; *) @@ -67,9 +66,8 @@ case $ArtProcess in echo "Unsetting ATHENA_NUM_PROC=${ATHENA_NUM_PROC}" unset ATHENA_NUM_PROC - Reco_tf.py --steering doRAWtoALL --inputRDOFile=$x --outputAODFile=Nightly_AOD_electron.pool.root --maxEvents=2000 --autoConfiguration="everything" --conditionsTag="OFLCOND-MC16-SDR-RUN2-09" --preExec="from egammaValidation.egammaOnlyPreExec import setRunEgammaOnlyRecoFlags; setRunEgammaOnlyRecoFlags()" --postInclude "RAWtoALL:egammaValidation/egammaArtCaloCalPostInclude.py" "POOLMergeAthenaMPAOD0:egammaValidation/egammaArtCaloCalPostInclude.py" + Reco_tf.py --steering doRAWtoALL --inputRDOFile=$x --outputAODFile=Nightly_AOD_electron.pool.root --maxEvents=2000 --autoConfiguration="everything" --conditionsTag="OFLCOND-MC16-SDR-RUN2-09" --preExec="from egammaValidation.egammaOnlyPreExec import setRunEgammaOnlyRecoFlags; setRunEgammaOnlyRecoFlags()" --postInclude "RAWtoALL:egammaValidation/egammaArtCaloCalPostInclude.py" "POOLMergeAthenaMPAOD0:egammaValidation/egammaArtCaloCalPostInclude.py" - echo "art-result: $? reconstruction" ;; diff --git a/Reconstruction/egamma/egammaValidation/test/test_electron_pileup.sh b/Reconstruction/egamma/egammaValidation/test/test_electron_pileup.sh index cd58a943be920c9aee3b4fde9a9f698f9280c8d0..a4a83ed71bbe61789b28547a30b84a79e44e7b31 100755 --- a/Reconstruction/egamma/egammaValidation/test/test_electron_pileup.sh +++ b/Reconstruction/egamma/egammaValidation/test/test_electron_pileup.sh @@ -30,6 +30,7 @@ case $ArtProcess in unset ATHENA_NUM_PROC AODMerge_tf.py --inputAODFile=art_core_*/Nightly_AOD_electron.pool.root --outputAOD_MRGFile=Nightly_AOD_electron.pool.root --preExec "from egammaValidation.egammaOnlyPreExec import setRunEgammaOnlyMergeFlags; setRunEgammaOnlyMergeFlags()" --postInclude "all:egammaValidation/egammaArtCaloCalPostInclude.py" + echo "art-result: $? AODMerge" set +e diff --git a/Reconstruction/egamma/egammaValidation/test/ut_egammaARTJob_test.sh b/Reconstruction/egamma/egammaValidation/test/ut_egammaARTJob_test.sh index 2ec1f5a6fc8ce0998f4958822ea9f8c34bac1e96..d06243eee67d3cd52bb54a9de7594e26a768b2fa 100755 --- a/Reconstruction/egamma/egammaValidation/test/ut_egammaARTJob_test.sh +++ b/Reconstruction/egamma/egammaValidation/test/ut_egammaARTJob_test.sh @@ -2,7 +2,7 @@ # Reco stage -Reco_tf.py --steering doRAWtoALL --inputRDOFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/WorkflowReferences/master/q443/v1/myRDO.pool.root --outputAODFile=Nightly_AOD_electron.pool.root --maxEvents=1 --autoConfiguration="everything" --preExec="from egammaValidation.egammaOnlyPreExec import setRunEgammaOnlyRecoFlags; setRunEgammaOnlyRecoFlags()" --postInclude "RAWtoALL:egammaValidation/egammaArtCaloCalPostInclude.py" "POOLMergeAthenaMPAOD0:egammaValidation/egammaArtCaloCalPostInclude.py" >>/dev/null 2>&1 +Reco_tf.py --steering doRAWtoALL --inputRDOFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/WorkflowReferences/master/q443/v1/myRDO.pool.root --outputAODFile=Nightly_AOD.pool.root --maxEvents=1 --autoConfiguration="everything" --preExec="from egammaValidation.egammaOnlyPreExec import setRunEgammaOnlyRecoFlags; setRunEgammaOnlyRecoFlags()" --postInclude "RAWtoALL:egammaValidation/egammaArtCaloCalPostInclude.py" "POOLMergeAthenaMPAOD0:egammaValidation/egammaArtCaloCalPostInclude.py" >>/dev/null 2>&1 stat=$? if [ $stat -eq 0 ] @@ -15,13 +15,10 @@ else exit $stat fi # rm files not needed anymore -rm tmp.ESD >> /dev/null 2>&1 -rm log.RAWtoESD >> /dev/null 2>&1 -rm log.ESDtoAOD >> /dev/null 2>&1 - +rm log.RAWtoALL >> /dev/null 2>&1 # Merge stage -AODMerge_tf.py --inputAODFile=Nightly_AOD_electron.pool.root --outputAOD_MRGFile=Nightly_AOD_electron.pool.root --preExec "from egammaValidation.egammaOnlyPreExec import setRunEgammaOnlyMergeFlags; setRunEgammaOnlyMergeFlags()" --postInclude "all:egammaValidation/egammaArtCaloCalPostInclude.py">>/dev/null 2>&1 +AODMerge_tf.py --inputAODFile=Nightly_AOD.pool.root --outputAOD_MRGFile=Nightly_AOD.pool.root --preExec "from egammaValidation.egammaOnlyPreExec import setRunEgammaOnlyMergeFlags; setRunEgammaOnlyMergeFlags()" --postInclude "all:egammaValidation/egammaArtCaloCalPostInclude.py">>/dev/null 2>&1 stat=$? if [ $stat -eq 0 ] @@ -36,45 +33,52 @@ fi # rm files not needed anymore rm log.AODMerge >> /dev/null 2>&1 - -# Histo stage +# Histo stage +rm -f PoolFileCatalog.xml +ln -fs Nightly_AOD.pool.root Nightly_AOD_electron.pool.root get_files -jo egamma_art_checker_joboptions.py >> /dev/null 2>&1 athena -c "particleType='electron'" egamma_art_checker_joboptions.py >> histo.log 2>&1 +state=$? +rm -f PoolFileCatalog.xml +ln -fs Nightly_AOD.pool.root Nightly_AOD_gamma.pool.root +athena -c "particleType='gamma'" egamma_art_checker_joboptions.py >> histo.log 2>&1 +statg=$? -stat=$? -if [ $stat -eq 0 ] +if [ $state -eq 0 -a $statg -eq 0 ] then echo "=== HISTO MAKER SUCCESS === " else - echo "==== HISTO MAKER FAILURE" + echo "==== HISTO MAKER FAILURE" $state $statg echo " HISTO MAKER log ===> " cat histo.log - exit $stat + exit 1 fi # rm files not needed anymore -rm Nightly_AOD_electron.pool.root >> /dev/null 2>&1 +rm -f Nightly_AOD*.pool.root >> /dev/null 2>&1 rm histo.log >> /dev/null 2>&1 # Final plot stage EgammaARTmonitoring_plotsMaker.py Nightly-monitoring_electron.hist.root Nightly-monitoring_electron.hist.root electron >> plot.log 2>&1 +state=$? +EgammaARTmonitoring_plotsMaker.py Nightly-monitoring_gamma.hist.root Nightly-monitoring_gamma.hist.root gamma >> plot.log 2>&1 +statg=$? -stat=$? -if [ $stat -eq 0 ] +if [ $state -eq 0 -a $statg -eq 0 ] then echo "=== PLOT MAKER SUCCESS === " else - echo "=== PLOT MAKER SUCCESS === " + echo "=== PLOT MAKER FAILURE === " $state $statg echo " PLOT MAKER log ===> " cat plot.log - exit $stat + exit 1 fi # rm files not needed anymore rm *.png >> /dev/null 2>&1 -rm Nightly-monitoring_electron.hist.root >> /dev/null 2>&1 -rm BN_ComparisonPlots_electron.hist.root >> /dev/null 2>&1 +rm Nightly-monitoring_*.hist.root >> /dev/null 2>&1 +rm BN_ComparisonPlots_*.hist.root >> /dev/null 2>&1 rm plot.log >> /dev/null 2>&1 diff --git a/Reconstruction/tauRec/python/TauConfig.py b/Reconstruction/tauRec/python/TauConfig.py index 2f6696a109ebc4358db64684e5adabcc0160b041..deb84734f6888568a786befe77c222938e95488f 100755 --- a/Reconstruction/tauRec/python/TauConfig.py +++ b/Reconstruction/tauRec/python/TauConfig.py @@ -7,7 +7,7 @@ from AthenaConfiguration.Enums import BeamType, LHCPeriod def TauBuildAlgCfg(flags): - result=ComponentAccumulator() + result = ComponentAccumulator() # Tracking from TrkConfig.AtlasTrackingGeometrySvcConfig import TrackingGeometrySvcCfg @@ -56,10 +56,10 @@ def TauBuildAlgCfg(flags): Key_tauShotClusOutputContainer="TauShotClusters", Key_tauShotPFOOutputContainer="TauShotParticleFlowObjects", Key_tauPi0CellOutputContainer="TauCommonPi0Cells", - MaxEta = flags.Tau.SeedMaxEta, - MinPt = flags.Tau.SeedMinPt, - MaxNTracks = flags.Tau.MaxNTracks, - CellMakerTool = result.popToolsAndMerge(tauTools.TauCellFinalizerCfg(flags)) ) + MaxEta=flags.Tau.SeedMaxEta, + MinPt=flags.Tau.SeedMinPt, + MaxNTracks=flags.Tau.MaxNTracks, + CellMakerTool=result.popToolsAndMerge(tauTools.TauCellFinalizerCfg(flags))) if flags.GeoModel.Run is LHCPeriod.Run4: BuildAlg.PixelDetEleCollKey="" @@ -115,10 +115,10 @@ def TauCaloAlgCfg(flags): result.addEventAlgo(CaloTopoForTausMaker) relinkAlg = CompFactory.ClusterCellRelinkAlg('ClusterCellRelinkAlg', - Cells = 'AllCalo', - ClustersInput = CaloTopoForTausMaker.ClustersOutputName, - ClustersOutput = 'TauPi0Clusters', - CellLinksOutput = 'TauPi0Clusters_links') + Cells='AllCalo', + ClustersInput=CaloTopoForTausMaker.ClustersOutputName, + ClustersOutput='TauPi0Clusters', + CellLinksOutput='TauPi0Clusters_links') result.addEventAlgo(relinkAlg) @@ -214,7 +214,7 @@ def TauOutputCfg(flags): TauAODList += [ "xAOD::PFOAuxContainer#TauHadronicParticleFlowObjectsAux." ] # Set common to ESD too - TauESDList = TauAODList + TauESDList = list(TauAODList) # add AOD specific TauAODList += [ "xAOD::TauJetAuxContainer#TauJetsAux.-VertexedClusters.-mu.-nVtxPU.-ABS_ETA_LEAD_TRACK.-TAU_ABSDELTAPHI.-TAU_ABSDELTAETA.-absipSigLeadTrk.-passThinning" ] diff --git a/Reconstruction/tauRecTools/Root/MvaTESEvaluator.cxx b/Reconstruction/tauRecTools/Root/MvaTESEvaluator.cxx index a2cad602dc00a41ee28e07f6faefa2903679e842..978a80b7b158b51a0048efa826699f8958f7e923 100644 --- a/Reconstruction/tauRecTools/Root/MvaTESEvaluator.cxx +++ b/Reconstruction/tauRecTools/Root/MvaTESEvaluator.cxx @@ -6,22 +6,14 @@ #include "tauRecTools/MvaTESEvaluator.h" #include "tauRecTools/HelperFunctions.h" -#include -#include -//_____________________________________________________________________________ MvaTESEvaluator::MvaTESEvaluator(const std::string& name) : TauRecToolBase(name) { declareProperty("WeightFileName", m_sWeightFileName = ""); declareProperty("WeightFileName0p", m_sWeightFileName0p = ""); - declareProperty("UseEMoverLC", m_useEMoverLC = false); } -//_____________________________________________________________________________ -MvaTESEvaluator::~MvaTESEvaluator() { -} -//_____________________________________________________________________________ StatusCode MvaTESEvaluator::initialize(){ const std::string weightFile = find_file(m_sWeightFileName); @@ -37,7 +29,7 @@ StatusCode MvaTESEvaluator::initialize(){ return StatusCode::SUCCESS; } -//_____________________________________________________________________________ + StatusCode MvaTESEvaluator::execute(xAOD::TauJet& xTau) const { std::map availableVars; @@ -81,13 +73,14 @@ StatusCode MvaTESEvaluator::execute(xAOD::TauJet& xTau) const { availableVars.insert( std::make_pair("TrigTauJetsAuxDyn.ClustersMeanPresamplerFrac", &vars.presampler_frac) ); availableVars.insert( std::make_pair("TrigTauJetsAuxDyn.ClustersMeanEMProbability", &vars.eprobability) ); availableVars.insert( std::make_pair("TrigTauJetsAuxDyn.LeadClusterFrac", &vars.lead_cluster_frac) ); + availableVars.insert( std::make_pair("TrigTauJetsAuxDyn.SecondClusterFrac", &vars.second_cluster_frac) ); + availableVars.insert( std::make_pair("TrigTauJetsAuxDyn.ThirdClusterFrac", &vars.third_cluster_frac) ); availableVars.insert( std::make_pair("TrigTauJetsAuxDyn.UpsilonCluster", &vars.upsilon_cluster) ); - availableVars.insert( std::make_pair("TrigTauJetsAuxDyn.ptDetectorAxis", &vars.ptDetectorAxis) ); + availableVars.insert( std::make_pair("log(TrigTauJetsAuxDyn.ptDetectorAxis)", &vars.logPtDetectorAxis) ); availableVars.insert( std::make_pair("TrigTauJetsAuxDyn.etaDetectorAxis", &vars.etaDetectorAxis) ); - if (m_useEMoverLC) { - // in trigger mode, ptIntermediateAxisEM actually means ptDetectorAxisEM, i.e. no vertex correction and EM scale - availableVars.insert( std::make_pair("TrigTauJetsAuxDyn.ptIntermediateAxisEM/TrigTauJetsAuxDyn.ptDetectorAxis", &vars.ptEM_D_ptLC) ); - } + availableVars.insert( std::make_pair("TrigTauJetsAuxDyn.ptIntermediateAxisEM/TrigTauJetsAuxDyn.ptDetectorAxis", &vars.ptEM_D_ptLC) ); + availableVars.insert( std::make_pair("TrigTauJetsAuxDyn.ptDetectorAxis/TrigTauJetsAuxDyn.ptJetSeed", &vars.ptDetectorAxis_D_ptJetSeed) ); + availableVars.insert( std::make_pair("TrigTauJetsAuxDyn.centFrac", &vars.centFrac) ); } // Retrieve average pileup @@ -169,23 +162,34 @@ StatusCode MvaTESEvaluator::execute(xAOD::TauJet& xTau) const { xTau.setP4(ptMVA, vars.etaConstituent, xTau.phiPanTauCellBased(), 0.); } else { + // protection but should never happen + if (xTau.ptDetectorAxis()==0. || xTau.ptJetSeed()==0.) { + xTau.setP4(xAOD::TauJetParameters::FinalCalib, 1., xTau.etaDetectorAxis(), xTau.phiDetectorAxis(), 0.); + xTau.setP4(1., xTau.etaDetectorAxis(), xTau.phiDetectorAxis(), 0.); + return StatusCode::SUCCESS; + } - vars.ptDetectorAxis = xTau.ptDetectorAxis(); + vars.logPtDetectorAxis = std::log(xTau.ptDetectorAxis()); vars.etaDetectorAxis = xTau.etaDetectorAxis(); - vars.ptEM_D_ptLC = (vars.ptDetectorAxis != 0.) ? ptEM / vars.ptDetectorAxis : 0.; + vars.ptEM_D_ptLC = ptEM / xTau.ptDetectorAxis(); + vars.ptDetectorAxis_D_ptJetSeed = xTau.ptDetectorAxis() / xTau.ptJetSeed(); static const SG::AuxElement::ConstAccessor acc_UpsilonCluster("UpsilonCluster"); static const SG::AuxElement::ConstAccessor acc_LeadClusterFrac("LeadClusterFrac"); + static const SG::AuxElement::ConstAccessor acc_SecondClusterFrac("SecondClusterFrac"); + static const SG::AuxElement::ConstAccessor acc_ThirdClusterFrac("ThirdClusterFrac"); + vars.upsilon_cluster = acc_UpsilonCluster(xTau); vars.lead_cluster_frac = acc_LeadClusterFrac(xTau); + vars.second_cluster_frac = acc_SecondClusterFrac(xTau); + vars.third_cluster_frac = acc_ThirdClusterFrac(xTau); - float ptMVA = float( vars.ptDetectorAxis * m_bdtHelper->getResponse(availableVars) ); + xTau.detail(xAOD::TauJetParameters::centFrac, vars.centFrac); + + float ptMVA = float( xTau.ptDetectorAxis() * m_bdtHelper->getResponse(availableVars) ); if (ptMVA<1.) ptMVA=1.; - // this may have to be changed if we apply a calo-only MVA calibration first, followed by a calo+track MVA calibration - // in which case, the calo-only would be TauJetParameters::TrigCaloOnly, and the final one TauJetParameters::FinalCalib - xTau.setP4(xAOD::TauJetParameters::FinalCalib, ptMVA, vars.etaDetectorAxis, xTau.phiDetectorAxis(), 0.); - + xTau.setP4(xAOD::TauJetParameters::FinalCalib, ptMVA, vars.etaDetectorAxis, xTau.phiDetectorAxis(), 0.); // apply MVA calibration xTau.setP4(ptMVA, vars.etaDetectorAxis, xTau.phiDetectorAxis(), 0.); } diff --git a/Reconstruction/tauRecTools/Root/MvaTESVariableDecorator.cxx b/Reconstruction/tauRecTools/Root/MvaTESVariableDecorator.cxx index a0f0751319a48408c329a60b765adee137fb1525..97040a71d5c2ae4ee863a7dca111dd7ca13e3e0e 100644 --- a/Reconstruction/tauRecTools/Root/MvaTESVariableDecorator.cxx +++ b/Reconstruction/tauRecTools/Root/MvaTESVariableDecorator.cxx @@ -45,7 +45,7 @@ StatusCode MvaTESVariableDecorator::execute(xAOD::TauJet& xTau) const { static const SG::AuxElement::Accessor acc_mu("mu"); acc_mu(xTau) = mu; - if(!m_vertexContainerKey.empty()) { + if (!m_vertexContainerKey.empty()) { int nVtxPU = 0; SG::ReadHandle vertexInHandle( m_vertexContainerKey ); if (!vertexInHandle.isValid()) { @@ -62,10 +62,10 @@ StatusCode MvaTESVariableDecorator::execute(xAOD::TauJet& xTau) const { acc_nVtxPU(xTau) = nVtxPU; } - if(!m_eventShapeKey.empty()) { + if (!m_eventShapeKey.empty()) { double rho = 0.; SG::ReadHandle eventShape(m_eventShapeKey); - if(!eventShape.isValid()) { + if (!eventShape.isValid()) { ATH_MSG_WARNING ("Could not retrieve EventShape with key " << m_eventShapeKey ); } else if (!eventShape->getDensity(xAOD::EventShape::Density, rho)) { @@ -77,7 +77,7 @@ StatusCode MvaTESVariableDecorator::execute(xAOD::TauJet& xTau) const { double center_lambda=0. , first_eng_dens=0. , em_probability=0. , second_lambda=0. ; double mean_center_lambda=0. , mean_first_eng_dens=0. , mean_em_probability=0. , mean_second_lambda=0. ; - double mean_presampler_frac=0., lead_cluster_frac = 0. ; + double mean_presampler_frac=0., lead_cluster_frac=0. , second_cluster_frac=0. , third_cluster_frac=0. ; double clE=0., Etot=0.; // approximate Upsilon based on clusters, not PFOs (for online TES) @@ -94,9 +94,10 @@ StatusCode MvaTESVariableDecorator::execute(xAOD::TauJet& xTau) const { const xAOD::Vertex* vertex = nullptr; if (m_doVertexCorrection) vertex = xTau.vertex(); - // Loop through clusters and jet constituents - std::vector vertexedClusterList = xTau.vertexedClusters(); - for (const xAOD::CaloVertexedTopoCluster& vertexedCluster : vertexedClusterList) { + // loop over tau clusters + std::vector vertexedClusters = xTau.vertexedClusters(); + + for (const xAOD::CaloVertexedTopoCluster& vertexedCluster : vertexedClusters) { const xAOD::CaloCluster& cluster = vertexedCluster.clust(); TLorentzVector clusterP4 = m_doVertexCorrection? vertexedCluster.p4() : cluster.p4(); @@ -106,34 +107,46 @@ StatusCode MvaTESVariableDecorator::execute(xAOD::TauJet& xTau) const { // what's the energy scale when calculating the cluster momentum clE = cluster.calE(); Etot += clE; - if(clE>lead_cluster_frac) lead_cluster_frac = clE; - if(cluster.retrieveMoment(xAOD::CaloCluster::MomentType::CENTER_LAMBDA,center_lambda)) + if (clE > lead_cluster_frac) { + third_cluster_frac = second_cluster_frac; + second_cluster_frac = lead_cluster_frac; + lead_cluster_frac = clE; + } + else if (clE > second_cluster_frac) { + third_cluster_frac = second_cluster_frac; + second_cluster_frac = clE; + } + else if (clE > third_cluster_frac) { + third_cluster_frac = clE; + } + + if (cluster.retrieveMoment(xAOD::CaloCluster::MomentType::CENTER_LAMBDA,center_lambda)) mean_center_lambda += clE*center_lambda; else ATH_MSG_WARNING("Failed to retrieve moment: CENTER_LAMBDA"); - if(cluster.retrieveMoment(xAOD::CaloCluster::MomentType::FIRST_ENG_DENS,first_eng_dens)) + if (cluster.retrieveMoment(xAOD::CaloCluster::MomentType::FIRST_ENG_DENS,first_eng_dens)) mean_first_eng_dens += clE*first_eng_dens; else ATH_MSG_WARNING("Failed to retrieve moment: FIRST_ENG_DENS"); - if(cluster.retrieveMoment(xAOD::CaloCluster::MomentType::EM_PROBABILITY,em_probability)) { + if (cluster.retrieveMoment(xAOD::CaloCluster::MomentType::EM_PROBABILITY,em_probability)) { mean_em_probability += clE*em_probability; // FIXME: should we use calE for EMTopo clusters ? // what's the energy scale when calculating the cluster momentum - if(em_probability>0.5) clusters_EM_P4 += cluster.p4(xAOD::CaloCluster::State::CALIBRATED); + if (em_probability>0.5) clusters_EM_P4 += cluster.p4(xAOD::CaloCluster::State::CALIBRATED); else clusters_had_P4 += cluster.p4(xAOD::CaloCluster::State::CALIBRATED); } else ATH_MSG_WARNING("Failed to retrieve moment: EM_PROBABILITY"); - if(cluster.retrieveMoment(xAOD::CaloCluster::MomentType::SECOND_LAMBDA,second_lambda)) + if (cluster.retrieveMoment(xAOD::CaloCluster::MomentType::SECOND_LAMBDA,second_lambda)) mean_second_lambda += clE*second_lambda; else ATH_MSG_WARNING("Failed to retrieve moment: SECOND_LAMBDA"); mean_presampler_frac += (cluster.eSample(CaloSampling::PreSamplerB) + cluster.eSample(CaloSampling::PreSamplerE)); // EM-scale equivalent of IntermediateAxis p4 - if(vertex) { + if (vertex) { xAOD::CaloVertexedTopoCluster vertexedClusterEM(cluster, xAOD::CaloCluster::State::UNCALIBRATED, vertex->position()); tauIntermediateAxisEM += vertexedClusterEM.p4(); } @@ -143,20 +156,22 @@ StatusCode MvaTESVariableDecorator::execute(xAOD::TauJet& xTau) const { } // calculate mean values - if(Etot>0.) { + if (Etot>0.) { mean_center_lambda /= Etot; mean_first_eng_dens /= Etot; mean_em_probability /= Etot; mean_second_lambda /= Etot; mean_presampler_frac /= Etot; lead_cluster_frac /= Etot; + second_cluster_frac /= Etot; + third_cluster_frac /= Etot; - if(mean_first_eng_dens>0.) mean_first_eng_dens = TMath::Log10(mean_first_eng_dens/Etot); + if (mean_first_eng_dens>0.) mean_first_eng_dens = TMath::Log10(mean_first_eng_dens/Etot); } // cluster-based upsilon, ranges from -1 to 1 double upsilon_cluster = -2.; - if(clusters_had_P4.E()+clusters_EM_P4.E()!=0.) + if (clusters_had_P4.E()+clusters_EM_P4.E()!=0.) upsilon_cluster = (clusters_had_P4.E()-clusters_EM_P4.E())/(clusters_had_P4.E()+clusters_EM_P4.E()); xTau.setDetail(xAOD::TauJetParameters::ClustersMeanCenterLambda, (float) mean_center_lambda); @@ -177,11 +192,17 @@ StatusCode MvaTESVariableDecorator::execute(xAOD::TauJet& xTau) const { acc_LeadClusterFrac(xTau) = (float) lead_cluster_frac; acc_UpsilonCluster(xTau) = (float) upsilon_cluster; - if(inTrigger()) { + if (inTrigger()) { + // for now only used by trigger, but could be used by offline 0p in the 2022 reprocessing + static const SG::AuxElement::Accessor acc_SecondClusterFrac("SecondClusterFrac"); + static const SG::AuxElement::Accessor acc_ThirdClusterFrac("ThirdClusterFrac"); + acc_SecondClusterFrac(xTau) = (float) second_cluster_frac; + acc_ThirdClusterFrac(xTau) = (float) third_cluster_frac; + return StatusCode::SUCCESS; } // no seed jets in AOD - if (!inAOD()){ + if (!inAOD()) { // retrieve Ghost Muon Segment Count (for punch-through studies) const xAOD::Jet* jetSeed = xTau.jet(); if (jetSeed == nullptr) { @@ -190,7 +211,7 @@ StatusCode MvaTESVariableDecorator::execute(xAOD::TauJet& xTau) const { } int nMuSeg=0; - if(!jetSeed->getAttribute("GhostMuonSegmentCount", nMuSeg)) nMuSeg=0; + if (!jetSeed->getAttribute("GhostMuonSegmentCount", nMuSeg)) nMuSeg=0; xTau.setDetail(xAOD::TauJetParameters::GhostMuonSegmentCount, nMuSeg); } @@ -199,7 +220,7 @@ StatusCode MvaTESVariableDecorator::execute(xAOD::TauJet& xTau) const { TLorentzVector Pi0_totalP4; Pi0_totalP4.SetPtEtaPhiM(0,0,0,0); - for(size_t i=0; ip4(); } @@ -209,7 +230,7 @@ StatusCode MvaTESVariableDecorator::execute(xAOD::TauJet& xTau) const { TLorentzVector charged_totalP4; charged_totalP4.SetPtEtaPhiM(0,0,0,0); - for(const xAOD::TauTrack* track : xTau.tracks()) { + for (const xAOD::TauTrack* track : xTau.tracks()) { charged_totalP4 += track->p4(); } @@ -217,7 +238,7 @@ StatusCode MvaTESVariableDecorator::execute(xAOD::TauJet& xTau) const { // calculate relative difference and decorate onto tau double relDiff=0.; - if(Pi0_totalE+charged_totalE != 0.){ + if (Pi0_totalE+charged_totalE != 0.){ relDiff = (charged_totalE - Pi0_totalE) / (charged_totalE + Pi0_totalE) ; } xTau.setDetail(xAOD::TauJetParameters::PFOEngRelDiff, (float) relDiff); diff --git a/Reconstruction/tauRecTools/tauRecTools/MvaTESEvaluator.h b/Reconstruction/tauRecTools/tauRecTools/MvaTESEvaluator.h index 724341bf01ce22e2c2cce781d8902b5368c4173b..f94fd11b3406aaff50162c8ee414a8d23a81cfa8 100644 --- a/Reconstruction/tauRecTools/tauRecTools/MvaTESEvaluator.h +++ b/Reconstruction/tauRecTools/tauRecTools/MvaTESEvaluator.h @@ -18,7 +18,7 @@ class MvaTESEvaluator ASG_TOOL_CLASS2(MvaTESEvaluator, TauRecToolBase, ITauToolBase) MvaTESEvaluator(const std::string& name="MvaTESEvaluator"); - virtual ~MvaTESEvaluator(); + virtual ~MvaTESEvaluator() = default; virtual StatusCode initialize() override; virtual StatusCode execute(xAOD::TauJet& xTau) const override; @@ -55,10 +55,13 @@ class MvaTESEvaluator float ptSeed_D_ptCombined{0.0}; // for online calibration - float ptDetectorAxis{0.0}; + float logPtDetectorAxis{0.0}; float etaDetectorAxis{0.0}; float upsilon_cluster{0.0}; float lead_cluster_frac{0.0}; + float second_cluster_frac{0.0}; + float third_cluster_frac{0.0}; + float ptDetectorAxis_D_ptJetSeed{0.0}; }; std::unique_ptr m_bdtHelper; @@ -67,7 +70,7 @@ class MvaTESEvaluator // Configurable properties std::string m_sWeightFileName; std::string m_sWeightFileName0p; - bool m_useEMoverLC; + }; #endif // TAURECTOOLS_MVATESEVALUATOR_H diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationBase.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationBase.h index 1934837fcc38b601cb2b186b3d55d8818b881800..f481deb6ba5c28c00b7c7d020578be3314cb4f78 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationBase.h +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCSParametrizationBase.h @@ -59,7 +59,8 @@ class TFCSExtrapolationState; if (this->msgLvl(MSG::lvl)) this->msg(MSG::lvl) << std::setw(45) << std::left << this->GetName() << " " << MSG::LevelNames[MSG::lvl] << " " #else - #include "AthenaBaseComps/AthMessaging.h" + #include "GaudiKernel/MsgStream.h" + #include "AthenaBaseComps/AthMsgStreamMacros.h" #endif /** Base class for all FastCaloSim parametrizations @@ -82,11 +83,7 @@ enum FCSReturnCode { #define FCS_RETRY_COUNT 3 -class TFCSParametrizationBase : public TNamed -#if !defined(__FastCaloSimStandAlone__) - , public AthMessaging -#endif -{ +class TFCSParametrizationBase:public TNamed { public: TFCSParametrizationBase(const char* name=nullptr, const char* title=nullptr); @@ -204,7 +201,31 @@ private: MSG::Level m_level;//! Do not persistify! MsgStream* m_msg;//! Do not persistify! -#endif +#else +public: + /// Update outputlevel + void setLevel(int level) {s_msg->setLevel(level);} + + /// Retrieve output level + MSG::Level level() const {return s_msg->level();} + + /// Log a message using the Athena controlled logging system + MsgStream& msg() const { return *s_msg; } + + /// Log a message using the Athena controlled logging system + MsgStream& msg( MSG::Level lvl ) const { return *s_msg << lvl; } + + /// Check whether the logging system is active at the provided verbosity level + bool msgLvl( MSG::Level lvl ) const { return s_msg->level() <= lvl; } + +private: + /** Static private message stream member. + We don't want this to take memory for every instance of this object created. + Note that we also cannot use AthMessaging as a base class as this creates problems + when storing these objects in ROOT files (ATLASSIM-5854). + */ + inline static std::unique_ptr s_msg;//! Do not persistify! +#endif private: static std::set< int > s_no_pdgid; diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationFluctChain.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationFluctChain.cxx index c259c940d0bb374efeb7455e719dc8d35566e090..c200bfe77358aecf7fabea461a492f05e51751f4 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationFluctChain.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationFluctChain.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationFluctChain.h" @@ -35,7 +35,7 @@ float TFCSLateralShapeParametrizationFluctChain::get_E_hit(TFCSSimulationState& FCSReturnCode TFCSLateralShapeParametrizationFluctChain::simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const { - MSG::Level old_level=msg().level(); + MSG::Level old_level=level(); const bool debug = msgLvl(MSG::DEBUG); //Execute the first get_nr_of_init() simulate calls only once. Used for example to initialize the center position diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitChain.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitChain.cxx index 5face6ce8ee9cd994e7ace3ef647f08da8eae4e0..1603245d9fc57c5e515d81bb8b5bf4156356fbf7 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitChain.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSLateralShapeParametrizationHitChain.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "ISF_FastCaloSimEvent/TFCSLateralShapeParametrizationHitChain.h" @@ -196,7 +196,7 @@ FCSReturnCode TFCSLateralShapeParametrizationHitChain::init_hit(TFCSLateralShape FCSReturnCode TFCSLateralShapeParametrizationHitChain::simulate(TFCSSimulationState& simulstate,const TFCSTruthState* truth, const TFCSExtrapolationState* extrapol) const { - MSG::Level old_level=msg().level(); + MSG::Level old_level=level(); const bool debug = msgLvl(MSG::DEBUG); const bool verbose = msgLvl(MSG::VERBOSE); diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationBase.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationBase.cxx index 085b84c3a79b41a889c364984fa336891ccbc4ac..8292cef189adafa403c4eb4930af092606adb4f1 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationBase.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSParametrizationBase.cxx @@ -13,6 +13,10 @@ #include "TString.h" #endif +#ifndef __FastCaloSimStandAlone__ +#include "AthenaKernel/getMessageSvc.h" +#endif + //============================================= //======= TFCSParametrizationBase ========= //============================================= @@ -28,10 +32,12 @@ TFCSParametrizationBase::TFCSParametrizationBase(const char* name, const char* t { } #else + TFCSParametrizationBase::TFCSParametrizationBase(const char* name, const char* title) - : TNamed(name,title), - AthMessaging("FastCaloSimParametrization") + : TNamed(name,title) { + // Initialize only in constructor to make sure the needed services are ready + if (!s_msg) s_msg = std::make_unique(Athena::getMessageSvc(), "FastCaloSimParametrization"); } #endif diff --git a/SweepRule/config.yaml b/SweepRule/config.yaml index 8d1bb7e7ada129834e1454d240dd5c024bdbdcfc..5fcc261171e11cf33c7665449f3d1d0524d1e50b 100644 --- a/SweepRule/config.yaml +++ b/SweepRule/config.yaml @@ -1,4 +1,4 @@ sweep-targets: - 'master': - 'NONE': + '22.0': + '.*': - 'master' diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDCalc.hh b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDCalc.hh index 5c7b80f83c250f8f27cf4a7417ca7d21eddf8300..4270decfe2df954798b8c7c51946fd0ddb4db99c 100644 --- a/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDCalc.hh +++ b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDCalc.hh @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ //************************************************************ @@ -109,8 +109,8 @@ private: TileSDOptions m_options{}; - Gaudi::Property m_birk1{this, "birk1",0.0130 * CLHEP::g / (CLHEP::MeV * CLHEP::cm2), "exp. values from NIM 80 (1970) 239-244"}; - Gaudi::Property m_birk2{this, "birk2",9.6e-6 * CLHEP::g / (CLHEP::MeV * CLHEP::cm2) * CLHEP::g / (CLHEP::MeV * CLHEP::cm2), "exp. values from NIM 80 (1970) 239-244"}; + Gaudi::Property m_birk1{this, "birk1",0.02002 * CLHEP::g / (CLHEP::MeV * CLHEP::cm2), "value updated for G4 10.6.p03"}; + Gaudi::Property m_birk2{this, "birk2",0.0 * CLHEP::g / (CLHEP::MeV * CLHEP::cm2) * CLHEP::g / (CLHEP::MeV * CLHEP::cm2), "value updated for G4 10.6.p03"}; /** @brief Keep hit time */ bool m_keepHitTime{}; diff --git a/Tools/Campaigns/python/MC21.py b/Tools/Campaigns/python/MC21.py index 4a44bf74bc0c72c215eac95a3f4f4dab67ff41fe..87ce55015b1ec79e523bfc2a77fe2c41cbb912ee 100644 --- a/Tools/Campaigns/python/MC21.py +++ b/Tools/Campaigns/python/MC21.py @@ -73,12 +73,11 @@ def MC21SimulationBase(flags): flags.Sim.TRTRangeCut = 30.0 flags.Sim.TightMuonStepping = True - from SimuJobTransforms.SimulationHelpers import enableBeamPipeKill #, enableFrozenShowersFCalOnly + from SimuJobTransforms.SimulationHelpers import enableBeamPipeKill, enableFrozenShowersFCalOnly enableBeamPipeKill(flags) if flags.Sim.ISF.Simulator in [SimulationFlavour.FullG4MT, SimulationFlavour.FullG4MT_QS]: - # Not tuned yet for G4 10.6 - # enableFrozenShowersFCalOnly(flags) - pass + enableFrozenShowersFCalOnly(flags) + from SimuJobTransforms.G4Optimizations import enableG4Optimizations enableG4Optimizations(flags) diff --git a/Tools/Campaigns/share/MC21Simulation.py b/Tools/Campaigns/share/MC21Simulation.py index de04995bbf6a1a41f5d18b632b87b74f49354298..6a105f99864b85286f08f095c31d59d9c83eabde 100644 --- a/Tools/Campaigns/share/MC21Simulation.py +++ b/Tools/Campaigns/share/MC21Simulation.py @@ -17,8 +17,7 @@ if "ATLFAST" in ISF_Flags.Simulator() or "G4FastCalo" in ISF_Flags.Simulator(): from IOVDbSvc.CondDB import conddb conddb.addOverride("/TILE/OFL02/CALIB/SFR","TileOfl02CalibSfr-SIM-07") if "FullG4" in ISF_Flags.Simulator(): - # Not tuned yet for G4 10.6 - # protectedInclude("SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py") - pass + protectedInclude("SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py") + # enable G4 optimisations protectedInclude("SimulationJobOptions/preInclude.G4Optimizations.py") diff --git a/Tools/Campaigns/share/MC21SimulationMultiBeamSpot.py b/Tools/Campaigns/share/MC21SimulationMultiBeamSpot.py index 359e8b1309ec785dac42374dc6fff97c14dd9914..512a1fdf62d991fac03c0bae0a0b21e1f60f133f 100644 --- a/Tools/Campaigns/share/MC21SimulationMultiBeamSpot.py +++ b/Tools/Campaigns/share/MC21SimulationMultiBeamSpot.py @@ -18,8 +18,7 @@ if "ATLFAST" in ISF_Flags.Simulator() or "G4FastCalo" in ISF_Flags.Simulator(): from IOVDbSvc.CondDB import conddb conddb.addOverride("/TILE/OFL02/CALIB/SFR","TileOfl02CalibSfr-SIM-07") if "FullG4" in ISF_Flags.Simulator(): - # Not tuned yet for G4 10.6 - # protectedInclude("SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py") - pass + protectedInclude("SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py") + # enable G4 optimisations protectedInclude("SimulationJobOptions/preInclude.G4Optimizations.py") diff --git a/Tools/Tier0ChainTests/test/test_bulkProcessing_beamSplashes.sh b/Tools/Tier0ChainTests/test/test_bulkProcessing_beamSplashes.sh index 85bb0c5b0fe62dcd6bc541d3251002d323513c19..2fbdf441b6c204142da03c86ddb8b4ab9f3a7bea 100755 --- a/Tools/Tier0ChainTests/test/test_bulkProcessing_beamSplashes.sh +++ b/Tools/Tier0ChainTests/test/test_bulkProcessing_beamSplashes.sh @@ -38,7 +38,7 @@ if [ ${rc1} -eq 0 ] then ArtPackage=$1 ArtJobName=$2 - art.py compare ref . /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/TCT_Run3-22.0_references_for_comparison/test_bulkProcessing_beamSplashes_2022-05-19T2101 \ + art.py compare ref . /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/TCT_Run3-22.0_references_for_comparison/test_bulkProcessing_beamSplashes_2022-05-23T2101 \ --entries 100 ${ArtPackage} ${ArtJobName} --mode=semi-detailed --order-trees --ignore-exit-code diff-pool \ --ignore-leave '(.*)TrigCompositeAuxContainer_v2_HLTNav_Summary_ESDSlimmedAux(.*)' rc3=$? diff --git a/Tools/Tier0ChainTests/test/test_bulkProcessing_calib.sh b/Tools/Tier0ChainTests/test/test_bulkProcessing_calib.sh index ef309cb94ce149cd6c3e0134f7892b8acf769c31..10ab1f344555a3ebb535fe48aa04ab442494c584 100755 --- a/Tools/Tier0ChainTests/test/test_bulkProcessing_calib.sh +++ b/Tools/Tier0ChainTests/test/test_bulkProcessing_calib.sh @@ -31,5 +31,16 @@ then --ignore-leave '(.*)TrigCompositeAuxContainer_v2_HLTNav_Summary_ESDSlimmedAux(.*)' rc2=$? fi -echo "art-result: ${rc2} Diff" +echo "art-result: ${rc2} (against previous nightly)" +rc3=-9999 +if [ ${rc1} -eq 0 ] +then + ArtPackage=$1 + ArtJobName=$2 + art.py compare ref . /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/TCT_Run3-22.0_references_for_comparison/test_bulkProcessing_calib_2022-05-23T2101 \ + --entries 100 ${ArtPackage} ${ArtJobName} --mode=semi-detailed --order-trees --ignore-exit-code diff-pool \ + --ignore-leave '(.*)TrigCompositeAuxContainer_v2_HLTNav_Summary_ESDSlimmedAux(.*)' + rc3=$? +fi +echo "art-result: ${rc3} (against reference)" diff --git a/Tools/Tier0ChainTests/test/test_bulkProcessing_cosmic.sh b/Tools/Tier0ChainTests/test/test_bulkProcessing_cosmic.sh index 30a7d71b1752c1cc545da15ba953a402e8d37de3..cec205b6a1be37389f507711626a2359b7edb944 100755 --- a/Tools/Tier0ChainTests/test/test_bulkProcessing_cosmic.sh +++ b/Tools/Tier0ChainTests/test/test_bulkProcessing_cosmic.sh @@ -38,7 +38,7 @@ if [ ${rc1} -eq 0 ] then ArtPackage=$1 ArtJobName=$2 - art.py compare ref . /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/TCT_Run3-22.0_references_for_comparison/test_bulkProcessing_cosmic_2022-05-19T2101 \ + art.py compare ref . /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/TCT_Run3-22.0_references_for_comparison/test_bulkProcessing_cosmic_2022-05-23T2101 \ --entries 100 ${ArtPackage} ${ArtJobName} --mode=semi-detailed --order-trees --ignore-exit-code diff-pool \ --ignore-leave '(.*)TrigCompositeAuxContainer_v2_HLTNav_Summary_ESDSlimmedAux(.*)' rc3=$? diff --git a/Tools/Tier0ChainTests/test/test_bulkProcessing_pilotBeam_collisions.sh b/Tools/Tier0ChainTests/test/test_bulkProcessing_pilotBeam_collisions.sh index 8ab98287acd4b9ecd13ad47601639cadee5ad7c9..a8b6a005932f0e75e54a27710867303fa2e45057 100755 --- a/Tools/Tier0ChainTests/test/test_bulkProcessing_pilotBeam_collisions.sh +++ b/Tools/Tier0ChainTests/test/test_bulkProcessing_pilotBeam_collisions.sh @@ -37,7 +37,7 @@ if [ ${rc1} -eq 0 ] then ArtPackage=$1 ArtJobName=$2 - art.py compare ref . /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/TCT_Run3-22.0_references_for_comparison/test_bulkProcessing_pilotBeam_collisions_2022-05-19T2101 \ + art.py compare ref . /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/TCT_Run3-22.0_references_for_comparison/test_bulkProcessing_pilotBeam_collisions_2022-05-23T2101 \ --entries 100 ${ArtPackage} ${ArtJobName} --mode=semi-detailed --order-trees --ignore-exit-code diff-pool \ --ignore-leave '(.*)TrigCompositeAuxContainer_v2_HLTNav_Summary_ESDSlimmedAux(.*)' rc3=$? diff --git a/Tools/WorkflowTestRunner/python/References.py b/Tools/WorkflowTestRunner/python/References.py index 0336b7a31297cb2a61593fec0e6a918f53f131f9..46ee631d29d8b67fdd31f6ae8a5e3e47bc34f28f 100644 --- a/Tools/WorkflowTestRunner/python/References.py +++ b/Tools/WorkflowTestRunner/python/References.py @@ -11,8 +11,8 @@ # Format is "test-branch" : "version" references_map = { # Simulation - "s3759": "v8", - "s3760": "v6", + "s3759": "v9", + "s3760": "v7", "s3779": "v4", # Overlay "d1590": "v9", diff --git a/Tools/WorkflowTestRunner/python/ScriptUtils.py b/Tools/WorkflowTestRunner/python/ScriptUtils.py index a3f2e20187be3391cc38b97f7757d3e7c293455b..433dda4ee56fbf0119b9e433fc9900176867ded9 100644 --- a/Tools/WorkflowTestRunner/python/ScriptUtils.py +++ b/Tools/WorkflowTestRunner/python/ScriptUtils.py @@ -133,8 +133,8 @@ def get_test_setup(name: str, options: Namespace, log: logging.Logger) -> TestSe # not in global setup: # options.extra_args - if options.ami_tag: - log.error("Custom AMI tags not supported yet!") + if options.ami_tag and not options.workflow: + log.error("Custom AMI tags supported only with specific workflows!") exit(1) # Are we running in CI diff --git a/Tools/WorkflowTestRunner/scripts/RunWorkflowTests_Run3.py b/Tools/WorkflowTestRunner/scripts/RunWorkflowTests_Run3.py index 7c72b4a362fa937352a433a36760bf6fc4260b28..c7326e9408e880abb75d9528cae991872ca60763 100755 --- a/Tools/WorkflowTestRunner/scripts/RunWorkflowTests_Run3.py +++ b/Tools/WorkflowTestRunner/scripts/RunWorkflowTests_Run3.py @@ -23,7 +23,8 @@ def main(): tests_to_run = [] if options.simulation: if not options.workflow or options.workflow is WorkflowType.FullSim: - tests_to_run.append(SimulationTest("s3760", run, WorkflowType.FullSim, ["EVNTtoHITS"], setup, options.extra_args + " --postInclude Campaigns/postInclude.MC21BirksConstantTune.py")) + ami_tag = "s3760" if not options.ami_tag else options.ami_tag + tests_to_run.append(SimulationTest(ami_tag, run, WorkflowType.FullSim, ["EVNTtoHITS"], setup, options.extra_args + " --postInclude Campaigns/postInclude.MC21BirksConstantTune.py")) if not options.workflow or options.workflow is WorkflowType.AF3: log.error("AF3 not supported yet") elif options.overlay: @@ -31,15 +32,18 @@ def main(): exit(1) elif options.pileup: if not options.workflow or options.workflow is WorkflowType.PileUpPresampling: - tests_to_run.append(PileUpTest("d1744", run, WorkflowType.PileUpPresampling, ["HITtoRDO"], setup, options.extra_args)) + ami_tag = "d1744" if not options.ami_tag else options.ami_tag + tests_to_run.append(PileUpTest(ami_tag, run, WorkflowType.PileUpPresampling, ["HITtoRDO"], setup, options.extra_args)) else: if not options.workflow or options.workflow is WorkflowType.MCReco: + ami_tag = "q445" if not options.ami_tag else options.ami_tag if "--CA" in options.extra_args: - tests_to_run.append(QTest("q445", run, WorkflowType.MCReco, ["HITtoRDO", "RAWtoALL"], setup, options.extra_args + " --steering doRAWtoALL")) + tests_to_run.append(QTest(ami_tag, run, WorkflowType.MCReco, ["HITtoRDO", "RAWtoALL"], setup, options.extra_args + " --steering doRAWtoALL")) else: - tests_to_run.append(QTest("q445", run, WorkflowType.MCReco, ["HITtoRDO", "RDOtoRDOTrigger", "RAWtoALL"], setup, options.extra_args)) + tests_to_run.append(QTest(ami_tag, run, WorkflowType.MCReco, ["HITtoRDO", "RDOtoRDOTrigger", "RAWtoALL"], setup, options.extra_args)) if not options.workflow or options.workflow is WorkflowType.DataReco: - log.error("Data reconstruction not supported yet") + ami_tag = "q449" if not options.ami_tag else options.ami_tag + tests_to_run.append(QTest(ami_tag, run, WorkflowType.DataReco, ["RAWtoALL"], setup, options.extra_args)) # Define which perfomance checks to run performance_checks = get_standard_performance_checks(setup) diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py b/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py index 83ce229b0a59fe98eb90ae0578a062bcd43c4d51..989ecdbf8a698b82e867ed291ce1740793207506 100755 --- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py +++ b/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py @@ -391,8 +391,6 @@ class TrigFastTrackFinderBase(TrigFastTrackFinder): if remapped_type=="cosmics": TrackMaker_FTF.CosmicTrack=True - self.useBeamSpotForRoiZwidth = config.useBeamSpotForRoiZwidth - ToolSvc += TrackMaker_FTF self.initialTrackMaker = TrackMaker_FTF diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx index 753ce0d99b2ef58fa25f7d5f22e3cb9e6a05e7f9..202f1ff4ec66fd57f1e891e2242cd4c06b0441f7 100644 --- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx +++ b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx @@ -67,7 +67,6 @@ TrigFastTrackFinder::TrigFastTrackFinder(const std::string& name, ISvcLocator* p m_doZFinder(false), m_doZFinderOnly(false), m_storeZFinderVertices(false), - m_useBeamSpotForRoiZwidth(false), m_nfreeCut(5), m_countTotalRoI(0), m_countRoIwithEnoughHits(0), @@ -162,7 +161,6 @@ TrigFastTrackFinder::TrigFastTrackFinder(const std::string& name, ISvcLocator* p // Accleration declareProperty("useGPU", m_useGPU = false,"Use GPU acceleration"); - declareProperty("useBeamSpotForRoiZwidth", m_useBeamSpotForRoiZwidth = false); // Large Radius Tracking declareProperty("LRT_Mode", m_LRTmode,"Enable Large Radius Tracking mode" ); @@ -281,6 +279,7 @@ StatusCode TrigFastTrackFinder::initialize() { if( m_doDisappearingTrk ) { ATH_CHECK(m_extrapolator.retrieve()); ATH_MSG_DEBUG("Retrieved tool " << m_extrapolator); + ATH_CHECK(m_disTrkFitter.retrieve()); ATH_MSG_DEBUG("Retrieved tool " << m_disTrkFitter); } else { @@ -382,56 +381,18 @@ StatusCode TrigFastTrackFinder::execute(const EventContext& ctx) const { ATH_CHECK(roiCollection.isValid()); - TrigRoiDescriptor internalRoI; - - if ( roiCollection->size()>1 ) ATH_MSG_WARNING( "More than one Roi in the collection: " << m_roiCollectionKey << ", this is not supported - use a composite Roi" ); - - if ( roiCollection->size()>0) { - if ( !m_useBeamSpotForRoiZwidth) { - internalRoI = **roiCollection->begin(); - }else{ - SG::ReadCondHandle beamSpotHandle { m_beamSpotKey, ctx }; - - int beamSpotBitMap = beamSpotHandle->beamStatus(); - bool isOnlineBeamspot = ((beamSpotBitMap & 0x4) == 0x4); - - if ((isOnlineBeamspot && (beamSpotBitMap & 0x3) == 0x3) || !isOnlineBeamspot){ //converged or MC event, if the original RoI has a zed > 3 sig + 10 then set it to 3 sig + 10. - RoiDescriptor originRoI = **roiCollection->begin(); - double beamSpot_zsig = beamSpotHandle->beamSigma(2); - Amg::Vector3D vertex = beamSpotHandle->beamPos(); - double zVTX = vertex.z(); - double origin_zedPlus = originRoI.zedPlus() ; //!< z at the most forward end of the RoI - double origin_zedMinus = originRoI.zedMinus(); //!< z at the most backward end of the RoI - - double new_zedMargin = 10.; - double new_zedRange = 3.; - - double new_zedPlus = zVTX + beamSpot_zsig * new_zedRange + new_zedMargin; - double new_zedMinus = zVTX - beamSpot_zsig * new_zedRange - new_zedMargin; - - if (origin_zedPlus > new_zedPlus && origin_zedMinus < new_zedMinus){ - ATH_MSG_DEBUG("Updated RoI with zed = "<begin(); // we have a more narrow zed range in RoI, no need to update. - }else{ //Not converged, set to the fullScan RoI - internalRoI = **roiCollection->begin(); - } - } + if ( roiCollection->size()>1 ) ATH_MSG_WARNING( "More than one Roi in the collection: " << m_roiCollectionKey << ", this is not supported - use a composite Roi: Using the first Roi ONLY" ); + + if ( roiCollection->size()==0) { + ATH_MSG_ERROR("No Roi found for " << m_roiCollectionKey.key() ); + return StatusCode::FAILURE; } + TrigRoiDescriptor internalRoI = **roiCollection->begin(); - // internalRoI.manageConstituents(false);//Don't try to delete RoIs at the end + /// internalRoI.manageConstituents(false);//Don't try to delete RoIs at the end + + /// updating this class member counter is not going to be thread safe ... m_countTotalRoI++; SG::WriteHandle outputTracks(m_outputTracksKey, ctx); @@ -458,8 +419,7 @@ StatusCode TrigFastTrackFinder::findTracks(InDet::SiTrackMakerEventData_xk &trac const TrackCollection* inputTracks, TrackCollection& outputTracks, const EventContext& ctx) const { - - ATH_MSG_DEBUG("Input RoI " << roi); + ATH_MSG_DEBUG( "Input RoI " << roi ); auto mnt_roi_nTracks = Monitored::Scalar("roi_nTracks", 0); auto mnt_roi_nSPs = Monitored::Scalar("roi_nSPs", 0); diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.h b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.h index 3e274babe3523ccf2a416dbb8cea48018928d65d..640bd682c42fc9f81d6074175b6d215581832622 100644 --- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.h +++ b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.h @@ -187,8 +187,6 @@ protected: bool m_doResMonitoring; - bool m_useBeamSpotForRoiZwidth; - // Cuts and settings TrigCombinatorialSettings m_tcs; diff --git a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauAlgorithmsHolder.py b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauAlgorithmsHolder.py index 09aa3d6b425bc60d25581b632175211c2a965eef..58e2f7d3d1918bf44eca02fb1c0548f654dd3699 100644 --- a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauAlgorithmsHolder.py +++ b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauAlgorithmsHolder.py @@ -110,8 +110,7 @@ def getMvaTESEvaluator(): from tauRecTools.tauRecToolsConf import MvaTESEvaluator from TrigTauRec.TrigTauFlags import TrigTauFlags MvaTESEvaluator = MvaTESEvaluator(name = _name, - WeightFileName = TrigTauFlags.MvaTESConfig(), - UseEMoverLC = TrigTauFlags.UseEMoverLC()) + WeightFileName = TrigTauFlags.MvaTESConfig()) ToolSvc += MvaTESEvaluator cached_instances[_name] = MvaTESEvaluator diff --git a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauFlags.py b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauFlags.py index abe0b5c928bb0637a095e33234c55c8851c84174..9b9f42d90cce2f53600d53170974599135f64cbb 100644 --- a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauFlags.py +++ b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauFlags.py @@ -14,15 +14,7 @@ class MvaTESConfig(JobProperty): """ statusOn=True allowedTypes=['string'] - StoredValue='OnlineMvaTES_BRT_v1.weights.root' - -# temporary -class UseEMoverLC(JobProperty): - """ switch to enable ptEM/ptLC in MvaTESEvaluator - """ - statusOn=True - allowedTypes=['bool'] - StoredValue=False + StoredValue='OnlineMvaTES_BRT_v2.weights.root' class JetRNNIDConfig(JobProperty): """ config files for TauJetRNNEvaluator jet ID @@ -57,7 +49,7 @@ class FTFTauCoreBDTConfig(JobProperty): """ statusOn=True allowedTypes=['string'] - StoredValue='FTF_tauCore_BDT_v0.root' + StoredValue='FTF_tauCore_BDT_v1.root' # define a container for the TrigTauRec tool flags @@ -68,7 +60,7 @@ class TrigTauRecFlags(JobPropertyContainer): jobproperties.add_Container(TrigTauRecFlags) # register the flags -for j in [CalibPath, MvaTESConfig, UseEMoverLC, JetRNNIDConfig, JetRNNIDWPConfig, JetRNNIDConfigLLP, JetRNNIDWPConfigLLP, FTFTauCoreBDTConfig]: +for j in [CalibPath, MvaTESConfig, JetRNNIDConfig, JetRNNIDWPConfig, JetRNNIDConfigLLP, JetRNNIDWPConfigLLP, FTFTauCoreBDTConfig]: jobproperties.TrigTauRecFlags.add_JobProperty(j) TrigTauFlags = jobproperties.TrigTauRecFlags diff --git a/Trigger/TrigAnalysis/TrigEgammaMatchingTool/Root/TrigEgammaMatchingToolMT.cxx b/Trigger/TrigAnalysis/TrigEgammaMatchingTool/Root/TrigEgammaMatchingToolMT.cxx index 12b267d0779bd270fbbb4f2cb2f5aa1d0b694b32..01d9bf34712559cb10fea3bdfb84f3ef215d3e54 100644 --- a/Trigger/TrigAnalysis/TrigEgammaMatchingTool/Root/TrigEgammaMatchingToolMT.cxx +++ b/Trigger/TrigAnalysis/TrigEgammaMatchingTool/Root/TrigEgammaMatchingToolMT.cxx @@ -76,8 +76,8 @@ bool TrigEgammaMatchingToolMT::isPassed(const xAOD::Egamma *eg,const std::string if( match( eg, trigger, dec ) ){ if( dec ){ if(xAOD::EgammaHelpers::isElectron(eg)){ - std::string key = this->key("Electrons"); - if(boost::contains(trigger,"gsf")) key=this->key("Electrons_GSF"); + std::string key = this->key("Electrons_GSF"); + if(boost::contains(trigger,"nogsf")) key=this->key("Electrons"); if(boost::contains(trigger,"lrt")) key=this->key("Electrons_LRT"); return ancestorPassed(dec, trigger,key, condition); } @@ -137,15 +137,15 @@ bool TrigEgammaMatchingToolMT::matchHLTPhoton(const xAOD::Photon *eg,const std:: bool TrigEgammaMatchingToolMT::matchHLTElectron(const xAOD::Electron *eg,const std::string &trigger, const TrigCompositeUtils::Decision *&dec, unsigned int condition ) const { - if (boost::contains(trigger,"gsf")){ - ATH_MSG_DEBUG("Matched HLT Electron GSF"); - return closestObject( eg, dec , trigger, key("Electrons_GSF"), m_dR, condition ); + if (boost::contains(trigger,"nogsf")){ + ATH_MSG_DEBUG("Matched HLT Electron noGSF"); + return closestObject( eg, dec , trigger, key("Electrons"), m_dR, condition ); }else if(boost::contains(trigger,"lrt")){ ATH_MSG_DEBUG("Matched HLT Electron LRT"); return closestObject( eg, dec , trigger, key("Electrons_LRT"), m_dR, condition ); }else { ATH_MSG_DEBUG("Matched HLT Electron"); - return closestObject( eg, dec , trigger, key("Electrons"), m_dR, condition ); + return closestObject( eg, dec , trigger, key("Electrons_GSF"), m_dR, condition ); } } diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisExample/TrigInDetAnalysisExample/T_AnalysisConfigMT_Tier0.h b/Trigger/TrigAnalysis/TrigInDetAnalysisExample/TrigInDetAnalysisExample/T_AnalysisConfigMT_Tier0.h index 42fa8239f338a3dc5b3db458ab64918537d69162..cd4dd0361af96911de7c27846aeeca70b002bc60 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisExample/TrigInDetAnalysisExample/T_AnalysisConfigMT_Tier0.h +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisExample/TrigInDetAnalysisExample/T_AnalysisConfigMT_Tier0.h @@ -27,7 +27,7 @@ #include "TrigInDetAnalysis/TIDAVertex.h" #include "TrigInDetAnalysis/TrackSelector.h" #include "TrigInDetAnalysisUtils/T_AnalysisConfig.h" -#include "TrigInDetAnalysisUtils/TagNProbe2.h" +#include "TrigInDetAnalysisUtils/TagNProbe.h" #include "TrigInDetAnalysisExample/Analysis_Tier0.h" #include "TrigInDetAnalysisExample/AnalysisR3_Tier0.h" @@ -106,7 +106,7 @@ public: TrackFilter* testFilter, TrackFilter* referenceFilter, TrackAssociator* associator, TrackAnalysis* analysis, - TagNProbe2* TnP_tool = 0) : + TagNProbe* TnP_tool = 0) : T_AnalysisConfig( analysisInstanceName, testChainName, testType, testKey, referenceChainName, referenceType, referenceKey, @@ -1362,7 +1362,7 @@ protected: bool m_containTracks; - TagNProbe2* m_TnP_tool; + TagNProbe* m_TnP_tool; TH1F* m_invmass; TH1F* m_invmass_obj; diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisExample/TrigInDetAnalysisExample/T_AnalysisConfigR3_Tier0.h b/Trigger/TrigAnalysis/TrigInDetAnalysisExample/TrigInDetAnalysisExample/T_AnalysisConfigR3_Tier0.h index f52eceb263b8c07329587d75d166b2032ba86776..0976472eead8ce098bec8809bfdc536ab30fc1f3 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisExample/TrigInDetAnalysisExample/T_AnalysisConfigR3_Tier0.h +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisExample/TrigInDetAnalysisExample/T_AnalysisConfigR3_Tier0.h @@ -27,7 +27,7 @@ #include "TrigInDetAnalysis/TIDAVertex.h" #include "TrigInDetAnalysis/TrackSelector.h" #include "TrigInDetAnalysisUtils/T_AnalysisConfig.h" -#include "TrigInDetAnalysisUtils/TagNProbe2.h" +#include "TrigInDetAnalysisUtils/TagNProbe.h" #include "TrigInDetAnalysisExample/AnalysisR3_Tier0.h" #include "TrigInDetAnalysisExample/VtxAnalysis.h" @@ -110,7 +110,7 @@ public: TrackFilter* testFilter, TrackFilter* referenceFilter, TrackAssociator* associator, TrackAnalysis* analysis, - TagNProbe2* TnP_tool = 0) : + TagNProbe* TnP_tool = 0) : T_AnalysisConfig( analysisInstanceName, testChainName, testType, testKey, referenceChainName, referenceType, referenceKey, @@ -229,7 +229,7 @@ protected: virtual void loop() { - const TagNProbe2* pTnP_tool = m_TnP_tool; + const TagNProbe* pTnP_tool = m_TnP_tool; if( m_provider->msg().level() <= MSG::VERBOSE) { m_provider->msg(MSG::VERBOSE) << "AnalysisConfigR3_Tier0::loop() for " << T_AnalysisConfig::m_analysisInstanceName << endmsg; @@ -1256,7 +1256,7 @@ protected: bool m_containTracks; - TagNProbe2* m_TnP_tool ; + TagNProbe* m_TnP_tool ; bool m_tnp_flag; diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisExample/src/TrigR3Mon.cxx b/Trigger/TrigAnalysis/TrigInDetAnalysisExample/src/TrigR3Mon.cxx index c48e38d30d704c0566295aac9ecb2e7983ed6736..c3c85f7ab2bee444b6d41f4fef16bbde8384b658 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisExample/src/TrigR3Mon.cxx +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisExample/src/TrigR3Mon.cxx @@ -13,7 +13,7 @@ #include "TrigInDetAnalysisUtils/Filters.h" #include "TrigInDetAnalysisUtils/Filter_Track.h" -#include "TrigInDetAnalysisUtils/TagNProbe2.h" +#include "TrigInDetAnalysisUtils/TagNProbe.h" // #include "AthenaMonitoring/AthenaMonManager.h" // #include "AthenaMonitoring/ManagedMonitorToolTest.h" @@ -385,7 +385,7 @@ StatusCode TrigR3Mon::bookHistograms() { ChainString probe = m_chainNames[i] ; - TagNProbe2* tnp = 0; + TagNProbe* tnp = 0; if ( probe.extra().find("probe")!=std::string::npos ) { @@ -407,8 +407,8 @@ StatusCode TrigR3Mon::bookHistograms() { double massMin = 40; double massMax = 150; - if ( m_mcTruth ) tnp = new TagNProbe2( "Truth", massMin, massMax ); - else tnp = new TagNProbe2( "Offline", massMin, massMax ); + if ( m_mcTruth ) tnp = new TagNProbe( "Truth", massMin, massMax ); + else tnp = new TagNProbe( "Offline", massMin, massMax ); tnp->tag(tag) ; tnp->probe(probe) ; @@ -423,7 +423,7 @@ StatusCode TrigR3Mon::bookHistograms() { /// can only iuse R3 navigation now - if ( m_tdt->getNavigationFormat() != "TriggerElement" ) { + { ATH_MSG_INFO( "configure analysis: " << m_chainNames[i] ); diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisExample/src/TrigTestBase.cxx b/Trigger/TrigAnalysis/TrigInDetAnalysisExample/src/TrigTestBase.cxx index 142170f760d3b7c88e0e386427f9c6c1facf98d3..661c22cd89b311af3a2cbf5fc7489b7898ebc06a 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisExample/src/TrigTestBase.cxx +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisExample/src/TrigTestBase.cxx @@ -380,7 +380,7 @@ StatusCode TrigTestBase::book(bool newEventsBlock, bool newLumiBlock, bool newRu // tag and probe object creation for (unsigned i=0; itag(tag); tnp->probe(probe); ATH_MSG_DEBUG( "Tag and probe pair found: " + tag + " : " + probe ); diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/ConfAnalysis.cxx b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/ConfAnalysis.cxx index 6581db1df25aa98396b13df88540cbdfadde6d9d..b473a1ff66411505b3c7ff6b2bce2dd79942c575 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/ConfAnalysis.cxx +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/ConfAnalysis.cxx @@ -65,6 +65,8 @@ void ConfAnalysis::initialise() { void ConfAnalysis::initialiseInternal() { + if ( m_initialised ) return; + m_initialised = true; // std::cout << "ConfAnalysis::initialise() " << name() << std::endl; @@ -314,6 +316,14 @@ void ConfAnalysis::initialiseInternal() { addHistogram( new TH1F( "roi_dphi", "roi_dphi", 50, -1, 1 ) ); addHistogram( new TH1F( "roi_dR", "roi_dR", 50, 0, 1 ) ); + // tag and probe invariant mass histograms + if ( m_TnP_tool ) { + m_invmass = new TH1F( "invmass", "invariant mass;mass [GeV]", 320, 0, 200 ); + m_invmassObj = new TH1F( "invmassObj", "invariant mass;mass [GeV]", 320, 0, 200 ); + addHistogram( m_invmass ); + addHistogram( m_invmassObj ); + } + // efficiencies and purities eff_pt = new Efficiency( find("pT"), "pT_eff" ); eff_pt->Hist()->GetXaxis()->SetTitle("P_{T} [GeV]"); @@ -891,7 +901,6 @@ void ConfAnalysis::finalise() { if ( !m_initialised ) return; - std::cout << "ConfAnalysis::finalise() " << name(); if ( name().size()<19 ) std::cout << "\t"; @@ -899,6 +908,7 @@ void ConfAnalysis::finalise() { if ( name().size()<41 ) std::cout << "\t"; if ( name().size()<52 ) std::cout << "\t"; + std::cout << "\tNreco " << Nreco << "\tNref " << Nref << "\tNmatched " << Nmatched; @@ -918,7 +928,6 @@ void ConfAnalysis::finalise() { std::map::iterator hitr=m_histos.begin(); std::map::iterator hend=m_histos.end(); for ( ; hitr!=hend ; hitr++ ) hitr->second->Write(); - // std::cout << "DBG >" << eff_pt->Hist()->GetName() << "< DBG" << std::endl; // std::vector heff = { eff_pt, @@ -935,7 +944,7 @@ void ConfAnalysis::finalise() { eff_roi_deta, eff_roi_dphi, eff_roi_dR }; - + for ( unsigned i=0 ; ifinalise(); heff[i]->Bayes()->Write( ( heff[i]->name()+"_tg" ).c_str() ); @@ -943,7 +952,6 @@ void ConfAnalysis::finalise() { // std::cout << "DBG >" << purity_pt->Hist()->GetName() << "< DBG" << std::endl; - eff_vs_mult->finalise(); // Normalise(n_vtx_tracks); @@ -989,8 +997,6 @@ void ConfAnalysis::finalise() { mdeltaR_v_eta->Finalise(); mdeltaR_v_eta->Write(); mdeltaR_v_pt->Finalise(); mdeltaR_v_pt->Write(); - - for ( unsigned i=rDd0res.size() ; i-- ; ) { rDd0res[i]->Finalise(Resplot::FitNull95); rDd0res[i]->Write(); @@ -1174,10 +1180,10 @@ void ConfAnalysis::execute(const std::vector& reftracks, TrigObjectMatcher* objects ) { // leave this commented code in for debug purposes ... - // if ( objects ) std::cout << "TrigObjectMatcher: " << objects << std::endl; + // if ( objects ) std::cout << "TrigObjectMatcher: " << objects << std::endl; - if ( !m_initialised ) initialiseInternal(); - + if ( !m_initialised ) initialiseInternal(); + if ( m_print ) { std::cout << "ConfAnalysis::execute() \t " << name() << "\tref " << reftracks.size() diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/ConfAnalysis.h b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/ConfAnalysis.h index 761d2178cb22ac17295223224c89272285a32137..93a0daffea7ef5b0f3a469ba6e65546b3737d70e 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/ConfAnalysis.h +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/ConfAnalysis.h @@ -24,6 +24,7 @@ #include "TrigInDetAnalysis/TrigObjectMatcher.h" #include "TrigInDetAnalysisExample/ChainString.h" +#include "TrigInDetAnalysisUtils/TagNProbe.h" #include "Resplot.h" @@ -50,23 +51,26 @@ class ConfAnalysis : public TrackAnalysis { public: - ConfAnalysis( const std::string& name, const ChainString& config ) : + ConfAnalysis( const std::string& name, const ChainString& config, TagNProbe* TnP_tool=0 ) : TrackAnalysis( clean(name) ), mconfig(config), Nreco(0), Nref(0), Nmatched(0), m_print(false), m_roi(0), m_initialised(false), m_initialiseFirstEvent(false) { // , m_lfirst(true) { std::cout << "ConfAnalysis::ConfAnalysis() " << TrackAnalysis::name() << " ..." << std::endl; - } - + setTnPtool( TnP_tool ); + } + ~ConfAnalysis() { // std::cout << "ConfAnalysis::~ConfAnalysis() " << name() << std::endl; std::map::iterator hitr=m_histos.begin(); std::map::iterator hend=m_histos.end(); for ( ; hitr!=hend ; hitr++ ) delete hitr->second; - //2D histograms + //2D histograms std::map::iterator hitr2D=m_histos2D.begin(); - std::map::iterator hend2D=m_histos2D.end(); + std::map::iterator hend2D=m_histos2D.end(); for ( ; hitr2D!=hend2D ; hitr2D++ ) delete hitr2D->second; + // tag and probe object + if ( m_TnP_tool ) delete m_TnP_tool; } virtual void initialise(); @@ -108,6 +112,16 @@ public: const ChainString& config() const { return mconfig; } + // methods for tag and probe invariant mass plots + + void setTnPtool(TagNProbe* TnP_tool) { m_TnP_tool = TnP_tool; } + + virtual TagNProbe* getTnPtool() { return m_TnP_tool; } + + virtual TH1F* getHist_invmass() { return m_invmass; } + + virtual TH1F* getHist_invmassObj() { return m_invmassObj; } + private: void addHistogram( TH1F* h ) { @@ -140,6 +154,13 @@ private: std::map m_histos; std::map m_histos2D; + // tag and probe invariant mass histograms + TH1F* m_invmass = 0; + TH1F* m_invmassObj = 0; + + // tag and probe object + TagNProbe* m_TnP_tool; + Efficiency* eff_pt = 0; Efficiency* eff_ptp = 0; Efficiency* eff_ptm = 0; diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/rmain.cxx b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/rmain.cxx index ce84ce93cc4ef1585e1e8921b6c29f8c07ae46aa..b982ecb95b5fd220970ca3f2ccce7aeb2949568a 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/rmain.cxx +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/rmain.cxx @@ -427,8 +427,6 @@ int main(int argc, char** argv) bool useoldrms = true; bool nofit = false; - bool doTnP = false; // added for tagNprobe - bool doTnP_histos = false; // added for tagNprobe std::string vertexSelection = ""; std::string vertexSelection_rec = ""; @@ -448,8 +446,6 @@ int main(int argc, char** argv) refChain = argv[i]; } else if ( std::string(argv[i])=="--rms" ) useoldrms = false; - else if ( std::string(argv[i])=="--tnp" ) doTnP = true; - else if ( std::string(argv[i])=="--tnph" ) doTnP_histos = true; else if ( std::string(argv[i])=="-n" || std::string(argv[i])=="--nofit" ) nofit = true; else if ( std::string(argv[i])=="-t" || std::string(argv[i])=="--testChain" ) { if ( ++i>=argc ) return usage(argv[0], -1); @@ -570,10 +566,6 @@ int main(int argc, char** argv) int ntracks = 0; - /// Zmass window cuts for Tag&Probe analysis - double ZmassMax = 110.; // GeV - double ZmassMin = 70.; // GeV - //bool printflag = false; // JK removed (unused) bool rotate_testtracks = false; @@ -646,12 +638,6 @@ int main(int argc, char** argv) if ( inputdata.isTagDefined("Rmatch") ) Rmatch = inputdata.GetValue("Rmatch"); - /// set upper and lower Zmass window cuts from datafile for Tag&Probe analysis - if ( inputdata.isTagDefined("ZmassMax") ) ZmassMax = inputdata.GetValue("ZmassMax"); - if ( inputdata.isTagDefined("ZmassMin") ) ZmassMin = inputdata.GetValue("ZmassMin"); - /// set doTnP_histos flag from datafile for Tag&Probe analysis - if ( inputdata.isTagDefined("doTnPHistos") ) doTnP_histos = ( inputdata.GetValue("doTnPHistos")==0 ? false : true ); - std::string useMatcher = "DeltaR"; if ( inputdata.isTagDefined("UseMatcher") ) useMatcher = inputdata.GetString("UseMatcher"); @@ -672,32 +658,6 @@ int main(int argc, char** argv) else if ( inputdata.isTagDefined("testChain") ) testChains.push_back( inputdata.GetString("testChain") ); } - /// get the tag and probe chains for Tag&Probe analysis - - TagNProbe* TnP_tool = 0; // declare T&P tool as null pointer - - if ( inputdata.isTagDefined("TagnProbe") ) { - - /// The TagnProbe chain name vector is stuctured in pairs - /// Each pair has the strucure: tag chain - probe chain - - TnP_tool = new TagNProbe(); // initialise T&P tool - - testChains.clear(); // delete the old testChain vector - - /// get the Tag&Probe chain name vector - std::vector tnpChains = inputdata.GetStringVector("TagnProbe"); - - TnP_tool->FillMap( tnpChains ); // fill tag/probe chains map for bookkeeping - - doTnP = TnP_tool->isTnP(); // set the T&P flag - if ( !doTnP ) doTnP_histos = false; // set this flag to false if doTnP is false - - testChains = TnP_tool->GetProbeChainNames(); // replace testChains - - } - - /// new code - can extract vtx name, pt, any extra options that we want, /// but also chop off everythiung after :post @@ -1128,10 +1088,52 @@ int main(int argc, char** argv) // std::cout << "chain name " << chainname << "\t:" << chainnames.back() << " : " << chainnames.size() << std::endl; + // tag and probe object creation and configuration + + TagNProbe* TnP_tool = 0; + ChainString probe = chainConfig[i]; + + if ( probe.extra().find("_tag")!=std::string::npos ) continue; + + // probe can be the .head() so convert m_chainNames to a ChainString and search the .extra() specifically + size_t p = probe.extra().find("_probe"); + + if ( p!=std::string::npos ) { + + std::string probe_key = probe.extra().erase( p, 6) ; + + for ( unsigned j=0 ; jtag(tag); + TnP_tool->probe(probe); + std::cout << "Tag and probe pair found! \nTag : " << tag << "\nProbe: " << probe <initialiseFirstEvent(initialiseFirstEvent); analy_conf->initialise(); @@ -1170,9 +1172,19 @@ int main(int argc, char** argv) // for (unsigned int ic=0 ; ic::value_type( chainname, analy_conf ) ); + analyses.push_back(analy_conf); + } + else { + std::cerr << "WARNING: Duplicated chain" + << "\n" + << "---------------------------------" + << "---------------------------------" + << "---------------------------------" << std::endl; + continue; + } std::cout << "analysis: " << chainname << "\t" << analy_conf << "\n" @@ -1190,9 +1202,6 @@ int main(int argc, char** argv) analyses.push_back(analp); } - /// filling map for Tag&Probe invariant mass histograms - if ( doTnP_histos ) TnP_tool->BookMinvHisto( chainname ); - } std::cout << "main() finished looping" << std::endl; @@ -1773,18 +1782,6 @@ int main(int argc, char** argv) std::cout << "reference chain:\n" << *refchain << std::endl; } - /// configure the T&P tool for this event, if doTnP = true - if ( doTnP ) { - TnP_tool->ResetEventConfiguration(); /// reset the TnP_tool for this event - - /// do the event-by-event configuration - TnP_tool->SetEventConfiguration( - &refTracks, refFilter, // offline tracks and filter - refChain, // offline chain name - &tom, // trigger object matcher - ZmassMin, ZmassMax ); // set the Zmass range - } - for ( unsigned ic=0 ; icchains().size() ; ic++ ) { TIDA::Chain& chain = track_ev->chains()[ic]; @@ -1798,27 +1795,29 @@ int main(int argc, char** argv) if ( analitr==analysis.end() ) continue; - - if ( debugPrintout ) { - std::cout << "test chain:\n" << chain << std::endl; + if ( debugPrintout ) { + std::cout << "test chain:\n" << chain << std::endl; } - - std::vector rois; /// these are the rois to process - - if ( doTnP ) { - /// if doTnP = true, do the T&P selection and get the vector of RoIs - rois = TnP_tool->GetRois( &chain, track_ev->chains() ); - /// now the TnP_tool object contains all the info on the good probes that have been found - /// including, for each one of them, the invariant mass(es) calculated with the - /// corresponding tag(s). One can access to these info at any time in the following lines + ConfAnalysis* cf = dynamic_cast(analitr->second); + + std::vector rois; /// these are the rois to process + + // tag and probe object retreival and filling of the roi vector + TagNProbe* TnP_tool = cf->getTnPtool(); + if ( TnP_tool ) { + foutdir->cd(); + cf->initialiseInternal(); + // changes to output directory and books the invariant mass histograms + TH1F* m_invmass = cf->getHist_invmass(); + TH1F* m_invmass_obj = cf->getHist_invmassObj(); + rois = TnP_tool->GetRois( track_ev->chains(), &refTracks, refFilter, m_invmass, m_invmass_obj ); } else { - /// if doTnP==false, do std analysis and fill the rois vector from chain - rois.reserve( chain.size() ); - for ( size_t ir=0 ; irFillMinvHisto( chain.name(), ir ); - } - testTracks.clear(); testTracks.selectTracks( troi.tracks() ); @@ -2029,8 +2020,6 @@ int main(int argc, char** argv) /// remove any tracks below the pt threshold if one is specifed for the analysis - ConfAnalysis* cf = dynamic_cast( analitr->second ); - if ( cf ) { std::string ptconfig = cf->config().postvalue("pt"); if ( ptconfig!="" ) { @@ -2293,13 +2282,6 @@ int main(int argc, char** argv) delete analyses[i]; } - /// write out the histograms - if ( doTnP ) { - // saving Minv histos for Tag&Probe analysis if doTnP_histos = true - if ( doTnP_histos ) TnP_tool->WriteMinvHisto( foutdir ); - delete TnP_tool; // deleting T&P tool - } - foutput.Write(); foutput.Close(); diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat index 9c15bd454c6603ff8a1ae15cd53fd6eaca5f3976..862bdb0204a5f7a3fe6d46d054bed066dff0e7bd 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat @@ -58,6 +58,15 @@ testChains = { "HLT_e5_lhvloose_nopix_lrtloose_idperf_probe_g25_medium_L1EM20VH:HLT_IDTrack_ElecLRT_FTF:HLT_Roi_FastElectron_LRT:0", "HLT_e5_lhvloose_nopix_lrtloose_idperf_probe_g25_medium_L1EM20VH:HLT_IDTrack_ElecLRT_IDTrig:HLT_Roi_FastElectron_LRT:0", + "HLT_e26_lhtight_e14_etcut_idperf_nogsf_probe_50invmAB130_L1EM22VHI:key=HLT_IDTrack_Electron_FTF:extra=el_tag:roi=HLT_Roi_FastElectron:te=0", + "HLT_e26_lhtight_e14_etcut_idperf_nogsf_probe_50invmAB130_L1EM22VHI:key=HLT_IDTrack_Electron_FTF:extra=el_probe:roi=HLT_Roi_FastElectron:te=1", + + "HLT_e26_lhtight_e14_etcut_idperf_nogsf_probe_50invmAB130_L1EM22VHI:key=HLT_IDTrack_Electron_IDTrig:extra=el_tag:te=0", + "HLT_e26_lhtight_e14_etcut_idperf_nogsf_probe_50invmAB130_L1EM22VHI:key=HLT_IDTrack_Electron_IDTrig:extra=el_probe:te=1", + + "HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI:key=HLT_IDTrack_Electron_GSF:extra=el_tag:te=0", + "HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI:key=HLT_IDTrack_Electron_GSF:extra=el_probe:te=1", + "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_TauCore_FTF:HLT_Roi_TauCore", "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_TauIso_FTF:HLT_Roi_TauIso", "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_Tau_IDTrig:HLT_Roi_TauIso", diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-TnP.dat b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-TnP.dat deleted file mode 100755 index 747a00e695882da1b39d22739910d998a840b386..0000000000000000000000000000000000000000 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-TnP.dat +++ /dev/null @@ -1,42 +0,0 @@ -// emacs: this is -*- c++ -*- - -#include "TIDAdata_cuts.dat" - -ZmassMin = 0.0; -ZmassMax = 110.0; - -doTnPHistos = 1; - - -refChain = "Truth"; -//refChain = "Offline"; -//refChain = "Electrons"; -//refChain = "Muons"; -//refChain = "Taus"; - - -MinVertices = 0; - - -// #include "TIDAdata-chains-run3.dat" - -testChains = {}; - - -InitialiseFirstEvent = 1; - -outputFile = "data-output.root"; -DataFiles = { "TrkNtuple-0000.root"}; -//DataSets = {"./"} - - -#include "TIDAbeam.dat" - -TagnProbe = { - "HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI:HLT_IDTrack_Electron_FTF:HLT_Roi_FastElectron:0", - "HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI:HLT_IDTrack_Electron_FTF:HLT_Roi_FastElectron:1", - - "HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI:HLT_IDTrack_Electron_IDTrig:0", - "HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI:HLT_IDTrack_Electron_IDTrig:1" -}; - diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-offline-TnP.dat b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-offline-TnP.dat deleted file mode 100755 index 64ce7e2cdd42074b87769a64c13c8f9024105647..0000000000000000000000000000000000000000 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-run3-offline-TnP.dat +++ /dev/null @@ -1,38 +0,0 @@ -// emacs: this is -*- c++ -*- - -#include "TIDAdata_cuts-offline.dat" - -ZmassMin = 0.0; -ZmassMax = 110.0; - -doTnPHistos = 1; - -//refChain = "Truth"; -refChain = "Offline"; -//refChain = "Electrons"; -//refChain = "Muons"; -//refChain = "Taus"; - -MinVertices = 0; - -/// do not loadthe chains for the TnP analyses -/// #include "TIDAdata-chains-run3.dat" - -testChains = {}; - -outputFile = "data-output.root"; -DataFiles = { "TrkNtuple-0000.root"}; -//DataSets = {"/eos/atlas/atlascerngroupdisk/trig-id/data18_13TeV/muon-tnp/user.maparo.00363979.physics_Main.merge.AOD.f1002_m2037-20191004-141732_EXT0"}; -//DataSets = {"/eos/atlas/atlascerngroupdisk/trig-id/data18_13TeV/muon-tnp/user.maparo.00358395.physics_Main.merge.AOD.f961_m2015-20191004-141716_EXT0"}; - -#include "TIDAbeam.dat" - - -TagnProbe = { - "HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI:HLT_IDTrack_Electron_FTF:HLT_Roi_FastElectron:0", - "HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI:HLT_IDTrack_Electron_FTF:HLT_Roi_FastElectron:1", - - "HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI:HLT_IDTrack_Electron_IDTrig:0", - "HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI:HLT_IDTrack_Electron_IDTrig:1" -}; - diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAhisto-panel-TnP.dat b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAhisto-panel-TnP.dat index 612d89ee58a870cbb6fd8008d4900baa4ded315c..33c3049d418cafd4e2ef9a25811530ea5c5fd1ec 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAhisto-panel-TnP.dat +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAhisto-panel-TnP.dat @@ -1,6 +1,6 @@ // emacs: this is -*- c++ -*- -panels = { eff_panel, res_panel, diff_panel, spoff_panel, sp_panel, dist_panel, trt_panel, tnp_panel }; +panels = { eff_panel, res_panel, diff_panel, spoff_panel, sp_panel, dist_panel, trt_panel }; panel_columns = { eff_panel, 3 }; @@ -63,7 +63,10 @@ dist_panel = { "a0_rec", "a0 rec", "xaxis:lin:autosym:-3:3", "Trigger a_{0} [mm]", "yaxis:log:auton", "Normalised entries", "z0", "z0", "xaxis:lin:-200:200", "Reference z_{0} [mm]", "yaxis:log:auton", "Normalised entries", - "z0_rec", "z0_rec", "xaxis:lin:-200:200", "Trigger z_{0} [mm]", "yaxis:log:auton", "Normalised entries" + "z0_rec", "z0_rec", "xaxis:lin:-200:200", "Trigger z_{0} [mm]", "yaxis:log:auton", "Normalised entries", + + "invmass", "Tracks M_{INV}^{tag+probe}", "xaxis:lin:autow", "Offline tracks M_{INV} [GeV]", "yaxis:lin:autow", "Entries" , + "invmass_obj", "Electrons M_{INV}^{tag+probe}", "xaxis:lin:autow", "Offline dielectron M_{INV} [GeV]", "yaxis:lin:autow", "Entries", }; @@ -96,8 +99,3 @@ trt_panel = { }; -tnp_panel = { - "Minv_TnP", "Tracks M_{INV}^{tag+probe}", "xaxis:lin:autow", "Offline tracks M_{INV} [GeV]", "yaxis:lin:autow", "" , - "Minv_obj_TnP", "Electrons M_{INV}^{tag+probe}", "xaxis:lin:autow", "Offline dielectron M_{INV} [GeV]", "yaxis:lin:autow", "" -}; - diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/TagNProbe.h b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/TagNProbe.h index 51f53e9eff618c081654d175f31cf67321f7aacc..d54e99c8fd9a404c613445e8a6ec01519397419d 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/TagNProbe.h +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/TagNProbe.h @@ -2,221 +2,182 @@ /** ** @file TagNProbe.h ** - ** @author marco aparo - ** @date Fri 02 Jul 2021 13:30:00 CET + ** @author mark sutton + ** @date Sat Apr 9 12:55:17 CEST 2022 ** - ** Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + ** Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration **/ #ifndef TIDAUTILS_TAGNPROBE_H #define TIDAUTILS_TAGNPROBE_H -#include +#include -#include "TLorentzVector.h" +#include "TrigInDetAnalysis/TIDAChain.h" +#include "TrigInDetAnalysis/TIDARoiDescriptor.h" +#include "TrigInDetAnalysis/TrigObjectMatcher.h" +#include "TrigInDetAnalysis/Track.h" -#include "TrigInDetAnalysis/TIDAEvent.h" #include "TrigInDetAnalysis/TrackSelector.h" #include "TrigInDetAnalysisUtils/Filters.h" -#include "TrigInDetAnalysisUtils/Filter_Offline2017.h" -#include "TrigInDetAnalysis/TrackSelector.h" -#include "TrigInDetAnalysis/TrigObjectMatcher.h" -#include "TH1D.h" -#include -#include -#include - -#include "TrigInDetAnalysis/TrackAnalysis.h" -#include "TrigInDetAnalysis/Track.h" -#include "TrigInDetAnalysis/TIDDirectory.h" -#include "TrigInDetAnalysis/Efficiency.h" -#include "TrigInDetAnalysis/TIDARoiDescriptor.h" +#include "TLorentzVector.h" class TagNProbe { public: - TagNProbe() { } - + TagNProbe( const std::string& refName, double massMin, double massMax, bool unique_flag=true ); + virtual ~TagNProbe() { } + /// getters and setters - /// configuration methods - - void SetEventConfiguration( - TrackSelector * refTracks, // reference tracks - TrackFilter* refFilter, // reference filter - std::string refName, // reference objects name - TrigObjectMatcher* tom, // trigger object matcher - double ZmassMin, // ZmassMin - double ZmassMax, // ZmassMax - bool unique_flag=true ) { // unique flag (default=true) - m_refTracks = refTracks; - m_refFilter = refFilter; - m_particleType = refName; - m_tom = tom; - m_ZmassMin = ZmassMin; - m_ZmassMax = ZmassMax; - m_unique = unique_flag; - } - - void ResetEventConfiguration() { - m_refTracks = 0; - m_refFilter = 0; - m_particleType = ""; - m_tom = 0; - m_ZmassMin = 0.; - m_ZmassMax = 999.; - m_unique = false; - } - - void SetUniqueFlag( bool flag ) { m_unique = flag; } - - void SetParticleType( std::string type ) { m_particleType = type; } - - void SetZmassWindow( double ZmassMin, double ZmassMax ) { m_ZmassMin = ZmassMin; m_ZmassMax = ZmassMax; } - - void SetObjMatcher( TrigObjectMatcher* tom ) { m_tom = tom; } - - void SetOfflineTracks( TrackSelector * refTracks, TrackFilter* refFilter ) { - m_refTracks = refTracks; - m_refFilter = refFilter; - } - - void SetChains( TIDA::Chain * chain, TIDA::Chain * chain_tnp ) { - m_chain = chain; - m_chain_tnp = chain_tnp; - } - - template - void Fill( T* h, T* h1, int i ) { - /// don't need to check both these, we can just call this as many times as we like, - /// could pass in the vector even so that - // we leave the old code in, but commented, since we are still developing, so once - // we know everything is working we can delete all the older code - // if ( m_masses[i].size() == m_masses_obj[i].size() && m_masses[i].size() > 0 ) { - - /// don't understand this - why is this method filling lots of masses - /// from an vector of masses from 0 up to the input index ? - /// isn't this index just the index of the roi ? Why the loop ? - for ( size_t im=0 ; imFill( m_masses[i].at(im) ); - } - for ( size_t im=0 ; imFill( m_masses_obj[i].at(im) ); - } - } - - - /// probe searching method - - bool FindProbes(); - - void FindTIDAChains( std::vector& chains ) ; - - /// getter methods + /// could be moved to the constructor now ... + void tag( const std::string& chainName ) { m_tagChainName = chainName; } + void probe( const std::string& chainName ) { m_probeChainName = chainName; } - std::vector GetProbes() { return m_probes; } + const std::string& tag() const { return m_tagChainName; } + const std::string& probe() const { return m_probeChainName; } - std::vector GetTags( unsigned int probe_index=0 ) { return m_tags[ probe_index ]; } - - std::vector GetInvMasses( unsigned int probe_index=0 ) { return m_masses[ probe_index ]; } - - std::vector GetInvMasses_obj( unsigned int probe_index=0 ) { return m_masses_obj[ probe_index ]; } - - std::vector GetRois( TIDA::Chain * chain, std::vector& chains ); - - std::vector GetRois( std::vector& chains ); - - void tag( const std::string& chainName ) { m_tagChainName = chainName ; } - - const std::string& tag() { return m_tagChainName ; } - - void probe( const std::string& chainName ) { m_probeChainName = chainName ; } - - const std::string& probe() { return m_probeChainName ; } +public: - TIDA::Chain* GetTIDAProbe() { return m_chain_tnp ; } + template + std::vector GetRois( std::vector& chains, + const TrackSelector* refTracks, + TrackFilter* refFilter, + T* hmass, + T* hmass_obj, + TrigObjectMatcher* tom=0 ) const { - TIDA::Chain* GetTIDATag() { return m_chain ; } + std::vector probes; - TH1D* GetMinvHisto() { return m_hMinv ; } + TIDA::Chain* chain_tag = findChain( tag(), chains ); + TIDA::Chain* chain_probe = findChain( probe(), chains ); - TH1D* GetMinvObjHisto() { return m_hMinv_obj ; } + if ( chain_tag==0 || chain_probe==0 ) return probes; + // loop for possible probes + for ( size_t ip=0 ; ipsize() ; ip++ ) { + + TIDA::Roi& proi = chain_probe->rois()[ip]; + + TIDARoiDescriptor roi_probe( proi.roi() ); + + bool found_tnp = false; + + // loop for possible tags + for ( size_t it=0 ; itsize() ; it++ ) { + + TIDA::Roi& troi = chain_tag->rois()[it]; + TIDARoiDescriptor roi_tag( troi.roi() ); + + /// tag and probe are the same: skip this tag + if ( roi_probe == roi_tag ) continue; + + if ( selection( troi, proi, refTracks, refFilter, hmass, hmass_obj, tom ) ) { + found_tnp = true; + if ( m_unique ) break; + } + + } // end loop on tags + + if ( found_tnp ) probes.push_back( &proi ); + + } // end loop on probes + + return probes; + + } - /// utility methods +protected: - void FillMap( std::vector& tnpChains ); + double pt( const TIDA::Track* t ) const { return t->pT(); } + double pt( const TrackTrigObject* t ) const { return t->pt(); } - std::vector GetProbeChainNames() { return m_probe_chain_names; } - - bool isTnP() { return m_tnp_map.size()>0; } - - TIDA::Chain* GetTagChain( std::string probe_name, std::vector& chains ); + template + double mass( const T* t1, const T* t2 ) const { + TLorentzVector v1; + v1.SetPtEtaPhiM( pt(t1)*0.001, t1->eta(), t1->phi(), m_mass ); + TLorentzVector v2; + v2.SetPtEtaPhiM( pt(t2)*0.001, t2->eta(), t2->phi(), m_mass ); + return (v1+v2).M(); + } - void BookMinvHisto( std::string chain_name ); - void BookMinvHisto(); + template + bool selection( const TIDA::Roi& troi, const TIDA::Roi& proi, + const TrackSelector* refTracks, + TrackFilter* refFilter, + T* hmass, + T* hmass_obj, + TrigObjectMatcher* tom=0) const { + + /// get reference tracks from the tag roi + TIDARoiDescriptor roi_tag( troi.roi() ); - void FillMinvHisto( std::string chain_name, unsigned int probe_index ); + dynamic_cast(refFilter)->setRoi( &roi_tag ); - void FillMinvHisto( unsigned int probe_index ); + std::vector refp_tag = refTracks->tracks( refFilter ); - void WriteMinvHisto( TDirectory* foutdir ); + /// get reference tracks from the probe roi + TIDARoiDescriptor roi_probe( proi.roi() ); + dynamic_cast( refFilter )->setRoi( &roi_probe ); - /// internal methods for computation (protected) + std::vector refp_probe = refTracks->tracks( refFilter ); -protected: + /// loop over tag ref tracks + bool found = false; - std::pair selection( TIDA::Roi & troi, TIDA::Roi & proi ); + for ( size_t it=0; itz0() - refp_probe[ip]->z0() ); + + if ( invmass_obj>m_massMin && invmass_objFill( invmass ); + hmass_obj->Fill( invmass_obj ); + found = true; + } + } + } - /// internally used variables + return found; -private: + } - TrackSelector * m_refTracks; - TrackFilter * m_refFilter; - TIDA::Chain * m_chain; - TIDA::Chain * m_chain_tnp; + double mass_obj( const TIDA::Track* t1, const TIDA::Track* t2, TrigObjectMatcher* tom=0 ) const; - std::string m_probeChainName ; - std::string m_tagChainName ; + TIDA::Chain* findChain( const std::string& chainname, std::vector& chains ) const; - std::vector m_probes; - std::vector< std::vector > m_masses; - std::vector< std::vector > m_masses_obj; - std::vector< std::vector > m_tags; - bool m_unique; +private: std::string m_particleType; - double m_ZmassMin, m_ZmassMax; + double m_mass; - TrigObjectMatcher* m_tom; + double m_massMin; + double m_massMax; - /// supporting variables for utility methods + bool m_unique; - std::map m_tnp_map; - std::vector m_probe_chain_names; + std::string m_probeChainName ; + std::string m_tagChainName ; - std::map m_hMinv_map; - std::map m_hMinv_obj_map; +}; - TH1D* m_hMinv ; - TH1D* m_hMinv_obj ; -}; +#endif /// TIDAUTILS_TAGNPROBE_H + -#endif // TIDAUTILS_TAGNPROBE_H diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/TagNProbe2.h b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/TagNProbe2.h deleted file mode 100644 index 73f74c105503c409e2a474bd49de798d304f7e2a..0000000000000000000000000000000000000000 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/TagNProbe2.h +++ /dev/null @@ -1,183 +0,0 @@ -/// emacs: this is -*- c++ -*- -/** - ** @file TagNProbe2.h - ** - ** @author mark sutton - ** @date Sat Apr 9 12:55:17 CEST 2022 - ** - ** Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration - **/ - - -#ifndef TIDAUTILS_TAGNPROBE2_H -#define TIDAUTILS_TAGNPROBE2_H - -#include - -#include "TrigInDetAnalysis/TIDAChain.h" -#include "TrigInDetAnalysis/TIDARoiDescriptor.h" -#include "TrigInDetAnalysis/TrigObjectMatcher.h" -#include "TrigInDetAnalysis/Track.h" - -#include "TrigInDetAnalysis/TrackSelector.h" -#include "TrigInDetAnalysisUtils/Filters.h" - -#include "TLorentzVector.h" - - -class TagNProbe2 { - -public: - - TagNProbe2( const std::string& refName, double massMin, double massMax, bool unique_flag=true ); - - virtual ~TagNProbe2() { } - - /// getters and setters - - /// could be moved to the constructor now ... - void tag( const std::string& chainName ) { m_tagChainName = chainName; } - void probe( const std::string& chainName ) { m_probeChainName = chainName; } - - const std::string& tag() const { return m_tagChainName; } - const std::string& probe() const { return m_probeChainName; } - -public: - - template - std::vector GetRois( std::vector& chains, - const TrackSelector* refTracks, - TrackFilter* refFilter, - T* hmass, - T* hmass_obj, - TrigObjectMatcher* tom=0 ) const { - - std::vector probes; - - TIDA::Chain* chain_tag = findChain( tag(), chains ); - TIDA::Chain* chain_probe = findChain( probe(), chains ); - - if ( chain_tag==0 || chain_probe==0 ) return probes; - - // loop for possible probes - for ( size_t ip=0 ; ipsize() ; ip++ ) { - - TIDA::Roi& proi = chain_probe->rois()[ip]; - - TIDARoiDescriptor roi_probe( proi.roi() ); - - bool found_tnp = false; - - // loop for possible tags - for ( size_t it=0 ; itsize() ; it++ ) { - - TIDA::Roi& troi = chain_tag->rois()[it]; - TIDARoiDescriptor roi_tag( troi.roi() ); - - /// tag and probe are the same: skip this tag - if ( roi_probe == roi_tag ) continue; - - if ( selection( troi, proi, refTracks, refFilter, hmass, hmass_obj, tom ) ) { - found_tnp = true; - if ( m_unique ) break; - } - - } // end loop on tags - - if ( found_tnp ) probes.push_back( &proi ); - - } // end loop on probes - - return probes; - - } - -protected: - - double pt( const TIDA::Track* t ) const { return t->pT(); } - double pt( const TrackTrigObject* t ) const { return t->pt(); } - - template - double mass( const T* t1, const T* t2 ) const { - TLorentzVector v1; - v1.SetPtEtaPhiM( pt(t1)*0.001, t1->eta(), t1->phi(), m_mass ); - TLorentzVector v2; - v2.SetPtEtaPhiM( pt(t2)*0.001, t2->eta(), t2->phi(), m_mass ); - return (v1+v2).M(); - } - - - template - bool selection( const TIDA::Roi& troi, const TIDA::Roi& proi, - const TrackSelector* refTracks, - TrackFilter* refFilter, - T* hmass, - T* hmass_obj, - TrigObjectMatcher* tom=0) const { - - /// get reference tracks from the tag roi - TIDARoiDescriptor roi_tag( troi.roi() ); - - dynamic_cast(refFilter)->setRoi( &roi_tag ); - - std::vector refp_tag = refTracks->tracks( refFilter ); - - /// get reference tracks from the probe roi - TIDARoiDescriptor roi_probe( proi.roi() ); - - dynamic_cast( refFilter )->setRoi( &roi_probe ); - - std::vector refp_probe = refTracks->tracks( refFilter ); - - /// loop over tag ref tracks - bool found = false; - - for ( size_t it=0; itz0() - refp_probe[ip]->z0() ); - - if ( invmass_obj>m_massMin && invmass_objFill( invmass ); - hmass_obj->Fill( invmass_obj ); - found = true; - } - - } - } - - return found; - - } - - - double mass_obj( const TIDA::Track* t1, const TIDA::Track* t2, TrigObjectMatcher* tom=0 ) const; - - TIDA::Chain* findChain( const std::string& chainname, std::vector& chains ) const; - - -private: - - std::string m_particleType; - - double m_mass; - - double m_massMin; - double m_massMax; - - bool m_unique; - - std::string m_probeChainName ; - std::string m_tagChainName ; - -}; - - -#endif /// TIDAUTILS_TAGNPROBE2_H - - diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/src/TagNProbe.cxx b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/src/TagNProbe.cxx index c85753f5dc7a352856736a1b86daadcfb6f67c71..49140186e09bc1ac30c0d8a7f881bf58ae66f256 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/src/TagNProbe.cxx +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/src/TagNProbe.cxx @@ -1,408 +1,51 @@ /** ** @file TagNProbe.cxx ** - ** @author marco aparo - ** @date Fri 02 Jul 2021 13:30:00 CET + ** @author mark sutton + ** @date Sat Apr 9 12:55:17 CEST 2022 ** - ** Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + ** Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration **/ #include "TrigInDetAnalysisUtils/TagNProbe.h" -double TagNProbe::computeZ_obj( TIDA::Track* t1, TIDA::Track* t2 ) { - - double muonMass = 0.10565; // GeV - double electronMass = 0.000510; // GeV - double tauMass = 1.77686; // GeV - - /// get tag and probe particle type and setting mass - - TString tnpType( m_particleType ); - double mass = 0.; - if ( tnpType.Contains("Muon") ) mass = muonMass; - else if ( tnpType.Contains("Electron") ) mass = electronMass; - else if ( tnpType.Contains("Tau") ) mass = tauMass; - - TLorentzVector v1, v2; - double z0_1, z0_2; - if ( tnpType.Contains("Electron") ) { - - if ( m_tom != 0 && !m_tom->status() ) - return -1.0; - - const TrackTrigObject* tobj1 = m_tom->object( t1->id() ); - const TrackTrigObject* tobj2 = m_tom->object( t2->id() ); - - v1.SetPtEtaPhiM( (tobj1->pt())/1000., tobj1->eta(), tobj1->phi(), mass ); - v2.SetPtEtaPhiM( (tobj2->pt())/1000., tobj2->eta(), tobj2->phi(), mass ); - z0_1 = (double)(tobj1->z0()); - z0_2 = (double)(tobj2->z0()); - } - else { - v1.SetPtEtaPhiM( (t1->pT())/1000., t1->eta(), t1->phi(), mass ); - v2.SetPtEtaPhiM( (t2->pT())/1000., t2->eta(), t2->phi(), mass ); - z0_1 = (double)(t1->z0()); - z0_2 = (double)(t2->z0()); - } - - double invMass = (double)( v1 + v2 ).M(); - double z0diff = std::fabs( z0_1 - z0_2 ); - - if ( invMass > m_ZmassMin && invMass < m_ZmassMax && z0diff < 5 ) return invMass; - - return -1.0; - -} - - - - -// ------------------------------------------------------------------ - -double TagNProbe::computeZ( TIDA::Track* t1, TIDA::Track* t2 ) { - - double muonMass = 0.10565; // GeV - double electronMass = 0.000510; // GeV - double tauMass = 1.77686; // GeV - - /// get tag and probe particle type and setting mass - - TString tnpType( m_particleType ); - double mass = 0.; - if ( tnpType.Contains("Muon") ) mass = muonMass; - else if ( tnpType.Contains("Electron") ) mass = electronMass; - else if ( tnpType.Contains("Tau") ) mass = tauMass; - - TLorentzVector v1; - v1.SetPtEtaPhiM( (t1->pT())/1000., t1->eta(), t1->phi(), mass ); - - TLorentzVector v2; - v2.SetPtEtaPhiM( (t2->pT())/1000., t2->eta(), t2->phi(), mass ); - - double invMass = (double)( v1 + v2 ).M(); - - /// this cut is performed on the object-based inv. mass - return invMass; - -} - - - - -// ------------------------------------------------------------------ - -std::pair TagNProbe::selection( TIDA::Roi& troi, TIDA::Roi& proi ) +TagNProbe::TagNProbe( const std::string& refName, double massMin, double massMax, bool unique_flag ) : + m_particleType(refName), + m_mass(0), + m_massMin(massMin), + m_massMax(massMax), + m_unique(unique_flag) { + const double muonMass = 0.10565; // GeV + const double electronMass = 0.000510; // GeV + const double tauMass = 1.77686; // GeV - TIDARoiDescriptor roi_tag( troi.roi() ); - TIDARoiDescriptor roi_probe( proi.roi() ); - - /// getting reference tracks from the tag roi - dynamic_cast< Filter_Combined* >( m_refFilter )->setRoi( &roi_tag ); - std::vector< TIDA::Track* > refp_tag = m_refTracks->tracks( m_refFilter ); - - /// getting reference tracks from the probe roi - dynamic_cast< Filter_Combined* >( m_refFilter )->setRoi( &roi_probe ); - std::vector< TIDA::Track* > refp_probe = m_refTracks->tracks( m_refFilter ); - - /// loop on tag ref tracks - for ( size_t it=0; it InvMass = std::make_pair( pair_mass, pair_mass_obj ); - if ( pair_mass_obj > 0 ) - return InvMass; - - } - - } - - std::pair pNull = std::make_pair( 0., 0. ); - - return pNull; - -} - - - - -// ------------------------------------------------------------------ - -bool TagNProbe::FindProbes() -{ - - m_probes.clear(); - m_tags.clear(); - m_masses.clear(); - m_masses_obj.clear(); - - if ( m_chain==0 || m_chain_tnp==0 ) - return false; - - // loop for possible probes - for ( size_t ip=0 ; ipsize() ; ip++ ) { - - TIDA::Roi& proi = m_chain_tnp->rois()[ ip ]; - TIDARoiDescriptor roi_probe( proi.roi() ); - - bool found_tnp = false; - - std::vector tags; - std::vector masses; - std::vector masses_obj; - - // loop for possible tags - for ( size_t it=0 ; itsize() ; it++ ) { - - TIDA::Roi& troi = m_chain->rois()[ it ]; - TIDARoiDescriptor roi_tag( troi.roi() ); - - /// tag and probe are the same: skip this tag - if ( roi_probe == roi_tag ) continue; - - std::pair InvMasses = selection( troi, proi ); - double mass = InvMasses.first; - double mass_obj = InvMasses.second; - - if ( !found_tnp && mass>0 ) found_tnp = true; - - if ( mass>0 ) { - tags.push_back( &troi ); - masses.push_back( mass ); - masses_obj.push_back( mass_obj ); - if ( m_unique ) break; - } - - } // end loop on tags - - if ( found_tnp ) { - m_probes.push_back( &proi ); - m_tags.push_back( tags ); - m_masses.push_back( masses ); - m_masses_obj.push_back( masses_obj ); - } - - } // end loop on probes - - return true; - + if ( m_particleType.find("Muon")!=std::string::npos ) m_mass = muonMass; + else if ( m_particleType.find("Electron")!=std::string::npos ) m_mass = electronMass; + else if ( m_particleType.find("Tau")!=std::string::npos ) m_mass = tauMass; } -// ------------------------------------------------------------------ -void TagNProbe::FillMap( std::vector& tnpChains ) { - /// first clear the map - m_tnp_map.clear(); +double TagNProbe::mass_obj( const TIDA::Track* t1, const TIDA::Track* t2, TrigObjectMatcher* tom ) const { - for ( size_t i=0 ; i::value_type( chain_probe_name, chain_tag_name ) ); - - /// new testChain vector is filled only with probe chain names - m_probe_chain_names.push_back( tnpChains[i+1] ); + if ( tom!=0 && tom->status() ) { + return mass( tom->object(t1->id()), tom->object(t2->id()) ); } - -} - -// ------------------------------------------------------------------ - -TIDA::Chain* TagNProbe::GetTagChain( std::string probe_name, std::vector& chains ) { - - TIDA::Chain* chain_tag = 0; - - std::map::const_iterator tnpitr = m_tnp_map.find( probe_name ); - - if ( tnpitr != m_tnp_map.end() ) { - - for ( size_t icp=0 ; icpsecond ) { - chain_tag = &( chains[icp] ); - break; - } - } + else { + return mass( t1, t2 ); } - - return chain_tag; - -} - -// ------------------------------------------------------------------ - -std::vector TagNProbe::GetRois( TIDA::Chain * chain, std::vector& chains ) { - - std::vector rois; - TIDA::Chain* chain_tag = 0; - - /// for each configured probe chain find the correspondig tag chain in the event - chain_tag = GetTagChain( chain->name(), chains ); - if ( chain_tag == 0 ) return rois; - - /// resetting the chains - m_chain = 0; - m_chain_tnp = 0; - - /// setting the chains - SetChains( chain, chain_tag ); - - /// find the probe RoIs - if ( !FindProbes() ) return rois; - - /// getting the vector of rois to process - rois = GetProbes(); - - return rois; -} - -// ------------------------------------------------------------------ - -std::vector TagNProbe::GetRois( std::vector& chains ) { - - std::vector rois; - FindTIDAChains(chains) ; - - /// find the probe RoIs - if ( !FindProbes() ) return rois; - - /// getting the vector of rois to process - rois = GetProbes(); - - return rois; -} - -// ------------------------------------------------------------------ - -void TagNProbe::BookMinvHisto( std::string chain_name ) { - - std::string hname_base = chain_name; - std::replace( hname_base.begin(), hname_base.end(), '/', '_' ); - std::replace( hname_base.begin(), hname_base.end(), ':', '_' ); - - std::string hname_1 = hname_base + "_Minv_TnP"; - std::string hname_2 = hname_base + "_Minv_obj_TnP"; - - m_hMinv_map[ chain_name ] = new TH1D( hname_1.c_str(), hname_1.c_str(), 320, 0, 200 ); - m_hMinv_obj_map[ chain_name ] = new TH1D( hname_2.c_str(), hname_2.c_str(), 320, 0, 200 ); - } -// ------------------------------------------------------------------ - -void TagNProbe::BookMinvHisto( ) { - - m_hMinv = new TH1D( "Minv_TnP", "Tag&Probe invariant mass", 320, 0, 200 ); - m_hMinv_obj = new TH1D( "Minv_obj_TnP", "Tag&Probe invariant mass (object-based)", 320, 0, 200 ); - -} - -// ------------------------------------------------------------------ - -void TagNProbe::FillMinvHisto( std::string chain_name, unsigned int probe_index ) { - - /// find the histogram for chain_name - std::map::iterator hMinv_itr = m_hMinv_map.find( chain_name ); - std::map::iterator hMinv_obj_itr = m_hMinv_obj_map.find( chain_name ); - - /// check if histod exist, if yes fill them - if ( hMinv_itr != m_hMinv_map.end() && - hMinv_obj_itr != m_hMinv_obj_map.end() && - m_masses[probe_index].size() == m_masses_obj[probe_index].size() ) { - // for ( size_t im=0 ; imsecond->Fill( m_masses[probe_index].at(im) ); - // hMinv_obj_itr->second->Fill( m_masses_obj[probe_index].at(im) ); - // } +TIDA::Chain* TagNProbe::findChain( const std::string& chainname, std::vector& chains ) const { + for ( size_t i=chains.size() ; i-- ; ) { + if ( chains[i].name() == chainname ) return &chains[i]; } + return 0; } -// ------------------------------------------------------------------ - -void TagNProbe::FillMinvHisto( unsigned int probe_index ) { - - if ( m_masses[probe_index].size() == m_masses_obj[probe_index].size() && - m_masses[probe_index].size() > 0 ) { - - // for ( size_t im=0 ; imFill( m_masses[probe_index].at(im) ); - // m_hMinv_obj->Fill( m_masses_obj[probe_index].at(im) ); - // } - } -} - -// ------------------------------------------------------------------ - -void TagNProbe::WriteMinvHisto( TDirectory* foutdir ) { - - foutdir->cd(); - - std::map::iterator hMinv_itr; - for ( hMinv_itr=m_hMinv_map.begin() ; hMinv_itr!=m_hMinv_map.end() ; hMinv_itr++ ) { - - std::string dirname = hMinv_itr->first; - std::replace( dirname.begin(), dirname.end(), '/', '_' ); - std::replace( dirname.begin(), dirname.end(), ':', '_' ); - - std::string dirpath( foutdir->GetPath() ); - dirpath += dirname; - -#if 0 - /// renaming (title and object name) histos - /// setting output TDirectory - /// Write is called in rmain.cxx - hMinv_itr->second->SetTitle( "Tag&Probe invariant mass" ); - hMinv_itr->second->SetName( "Minv_TnP" ); - hMinv_itr->second->SetDirectory( foutdir->GetDirectory( dirpath.c_str() ) ); -#endif - - foutdir->cd(); - } - - std::map::iterator hMinv_obj_itr; - for ( hMinv_obj_itr=m_hMinv_obj_map.begin() ; hMinv_obj_itr!=m_hMinv_obj_map.end() ; hMinv_obj_itr++ ) { - - std::string dirname = hMinv_obj_itr->first; - std::replace( dirname.begin(), dirname.end(), '/', '_' ); - std::replace( dirname.begin(), dirname.end(), ':', '_' ); - - std::string dirpath( foutdir->GetPath() ); - dirpath += dirname; - -#if 0 - /// renaming (title and object name) histos and - /// setting output TDirectory - /// Write is called in rmain.cxx - hMinv_obj_itr->second->SetTitle( "Tag&Probe invariant mass (object-based)" ); - hMinv_obj_itr->second->SetName( "Minv_obj_TnP" ); - hMinv_obj_itr->second->SetDirectory( foutdir->GetDirectory( dirpath.c_str() ) ); -#endif - - foutdir->cd(); - } - -} - -// ------------------------------------------------------------------ - -void TagNProbe::FindTIDAChains( std::vector& chains ) { - - for ( int ic=0 ; ic<(int)(chains.size()) ; ++ic ){ - std::string chainConfig = chains[ic].name() ; - if ( (chainConfig) == m_probeChainName ) m_chain_tnp = &( chains[ic] ) ; - if ( (chainConfig) == m_tagChainName ) m_chain = &( chains[ic] ) ; - } -} diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/src/TagNProbe2.cxx b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/src/TagNProbe2.cxx deleted file mode 100644 index beec1a880b7157cd8343a53293947d778f3b0a5b..0000000000000000000000000000000000000000 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/src/TagNProbe2.cxx +++ /dev/null @@ -1,51 +0,0 @@ -/** - ** @file TagNProbe2.cxx - ** - ** @author mark sutton - ** @date Sat Apr 9 12:55:17 CEST 2022 - ** - ** Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration - **/ - - -#include "TrigInDetAnalysisUtils/TagNProbe2.h" - - -TagNProbe2::TagNProbe2( const std::string& refName, double massMin, double massMax, bool unique_flag ) : - m_particleType(refName), - m_mass(0), - m_massMin(massMin), - m_massMax(massMax), - m_unique(unique_flag) -{ - double muonMass = 0.10565; // GeV - double electronMass = 0.000510; // GeV - double tauMass = 1.77686; // GeV - - if ( m_particleType.find("Muon")!=std::string::npos ) m_mass = muonMass; - else if ( m_particleType.find("Electron")!=std::string::npos ) m_mass = electronMass; - else if ( m_particleType.find("Tau")!=std::string::npos ) m_mass = tauMass; -} - - - -double TagNProbe2::mass_obj( const TIDA::Track* t1, const TIDA::Track* t2, TrigObjectMatcher* tom ) const { - - if ( tom!=0 && tom->status() ) { - return mass( tom->object(t1->id()), tom->object(t2->id()) ); - } - else { - return mass( t1, t2 ); - } - -} - - -TIDA::Chain* TagNProbe2::findChain( const std::string& chainname, std::vector& chains ) const { - for ( size_t i=chains.size() ; i-- ; ) { - if ( chains[i].name() == chainname ) return &chains[i]; - } - return 0; -} - - diff --git a/Trigger/TrigConfiguration/TrigConfIO/python/HLTTriggerConfigAccess.py b/Trigger/TrigConfiguration/TrigConfIO/python/HLTTriggerConfigAccess.py index 079356f8abb9ec43535a84d592f3dbb3884370fc..12438e2dc0b808140f095bf179a3e5ca77c09dfe 100644 --- a/Trigger/TrigConfiguration/TrigConfIO/python/HLTTriggerConfigAccess.py +++ b/Trigger/TrigConfiguration/TrigConfIO/python/HLTTriggerConfigAccess.py @@ -118,12 +118,12 @@ class HLTMonitoringAccess(TriggerConfigAccess): """ this class provides access to the HLT monitoring json """ - def __init__(self, filename = None, jsonString=None, dbalias = None, monikey = None ): + def __init__(self, filename = None, jsonString=None, dbalias = None, smkey = None ): """ accessor needs to be initialized with either a filename or the dbalias and hlpskey """ super(HLTMonitoringAccess,self).__init__( ConfigType.HLTMON, mainkey = "signatures", - jsonString = jsonString, filename = filename, dbalias = dbalias, dbkey = monikey ) + jsonString = jsonString, filename = filename, dbalias = dbalias, dbkey = smkey ) self.loader.setQuery({ 1: "SELECT HMG_DATA FROM( SELECT * FROM (SELECT SMT.SMT_HLT_MENU_ID FROM {schema}.SUPER_MASTER_TABLE SMT WHERE SMT.SMT_ID={dbkey}) lhs JOIN (SELECT HMG.HMG_HLT_MENU_ID,HMG.HMG_DATA FROM {schema}.HLT_MONITORING_GROUPS HMG WHERE HMG.HMG_IN_USE = 1) rhs ON lhs.SMT_HLT_MENU_ID = rhs.HMG_HLT_MENU_ID);" #for schema v7 (first implementation of monitoring groups) diff --git a/Trigger/TrigConfiguration/TrigConfigSvc/python/TriggerConfigAccess.py b/Trigger/TrigConfiguration/TrigConfigSvc/python/TriggerConfigAccess.py index 6c32ee42e90a0b66dc805718ac1b16385f9f911d..bcbfa338b8f04a5f00087e0558ed6927293d2096 100644 --- a/Trigger/TrigConfiguration/TrigConfigSvc/python/TriggerConfigAccess.py +++ b/Trigger/TrigConfiguration/TrigConfigSvc/python/TriggerConfigAccess.py @@ -182,9 +182,9 @@ def getHLTPrescalesSetAccess( flags = None ): """This is the case when reconstructing the data.""" from RecExConfig.InputFilePeeker import inpSum keysFromCool = getKeysFromCool( inpSum["run_number"] ) - cfg = HLTPrescalesSetAccess( dbalias = keysFromCool["DB"], l1pskey = keysFromCool['HLTPSK'] ) + cfg = HLTPrescalesSetAccess( dbalias = keysFromCool["DB"], hltpskey = keysFromCool['HLTPSK'] ) elif tc["SOURCE"] == "DB": - cfg = HLTPrescalesSetAccess( dbalias = tc["DBCONN"], l1pskey = tc["HLTPSK"] ) + cfg = HLTPrescalesSetAccess( dbalias = tc["DBCONN"], hltpskey = tc["HLTPSK"] ) elif tc["SOURCE"] == "INFILE": cfg = HLTPrescalesSetAccess(jsonString=_getJSONFromMetadata(flags, key='TriggerMenuJson_HLTPS')) else: @@ -214,11 +214,12 @@ def getHLTMonitoringAccess( flags = None ): if tc["SOURCE"] == "FILE": cfg = HLTMonitoringAccess( filename = getHLTMonitoringFileName( flags ) ) elif tc["SOURCE"] == "COOL": - # TODO when database will be ready - raise NotImplementedError("Python COOL access to the HLT monitoring not yet implemented") + """This is the case when reconstructing the data.""" + from RecExConfig.InputFilePeeker import inpSum + keysFromCool = getKeysFromCool( inpSum["run_number"] ) + cfg = HLTMonitoringAccess( dbalias = keysFromCool["DB"], smkey = keysFromCool['SMK'] ) elif tc["SOURCE"] == "DB": - # TODO when database will be ready - raise NotImplementedError("Python DB access to the HLT monitoring not yet implemented") + cfg = HLTMonitoringAccess( dbalias = tc["DBCONN"], smkey = tc["SMK"] ) elif tc["SOURCE"] == "INFILE": cfg = HLTMonitoringAccess(jsonString=_getJSONFromMetadata(flags, key='TriggerMenuJson_HLTMonitoring')) else: diff --git a/Trigger/TrigCost/EnhancedBiasWeighter/EnhancedBiasWeighter/EnhancedBiasWeighter.h b/Trigger/TrigCost/EnhancedBiasWeighter/EnhancedBiasWeighter/EnhancedBiasWeighter.h index fb7bb5c79138a1ae882ddb0c382a14e80d4c714e..58796306308fd4cd95050bc1b47c60509cc5a832 100644 --- a/Trigger/TrigCost/EnhancedBiasWeighter/EnhancedBiasWeighter/EnhancedBiasWeighter.h +++ b/Trigger/TrigCost/EnhancedBiasWeighter/EnhancedBiasWeighter/EnhancedBiasWeighter.h @@ -184,7 +184,6 @@ class EnhancedBiasWeighter: public asg::AsgTool, public virtual IEnhancedBiasWei Gaudi::Property m_runNumber{this, "RunNumber", 0, "Run we're processing (if data), needed at initialize to locate and read in extra configuration."}; Gaudi::Property m_errorOnMissingEBWeights{this, "ErrorOnMissingEBWeights", false, "If true, Throws error if EB weights are missing."}; - Gaudi::Property m_calculateWeightingData{this, "CalculateWeightingData", true, "If true, read from COOL, CONDBR2 and XMLs. If false, read directly from decorated TRIG1 dAOD."}; Gaudi::Property m_enforceEBGRL{this, "EnforceEBGRL", true, "Each Enhanced Bias run has a 'good run list' style veto on some LB. If this flag is true, events in these LB get weight 0"}; Gaudi::Property m_useBunchCrossingData{this, "UseBunchCrossingData", true, "BunchCrossing data requires CONDBR2 access. Can be disabled here if this is a problem."}; Gaudi::Property m_isMC{this, "IsMC", false, "MC mode? If so we need a cross section and filter efficiency"}; diff --git a/Trigger/TrigCost/EnhancedBiasWeighter/Root/EnhancedBiasWeighter.cxx b/Trigger/TrigCost/EnhancedBiasWeighter/Root/EnhancedBiasWeighter.cxx index 2003930b199dfe41a71f1e172b63143be3ae8081..49aa47b9dd3ebacd0193c6d1ae605c1fb3f01207 100644 --- a/Trigger/TrigCost/EnhancedBiasWeighter/Root/EnhancedBiasWeighter.cxx +++ b/Trigger/TrigCost/EnhancedBiasWeighter/Root/EnhancedBiasWeighter.cxx @@ -35,37 +35,32 @@ EnhancedBiasWeighter::EnhancedBiasWeighter( const std::string& name ) StatusCode EnhancedBiasWeighter::initialize() { ATH_MSG_INFO ("Initializing " << name() << "..."); - ATH_CHECK( m_bunchCrossingKey.initialize( m_calculateWeightingData && m_useBunchCrossingData ) ); + ATH_CHECK( m_bunchCrossingKey.initialize( m_useBunchCrossingData ) ); - if (m_calculateWeightingData == true) { + if (m_isMC) { - if (m_isMC) { - - if (m_mcCrossSection == 0 || m_mcFilterEfficiency == 0) { - ATH_MSG_FATAL("For MC rates, a cross section and filter efficiency must be supplied."); - return StatusCode::FAILURE; - } - m_deadtime = 1.; // No deadtime for MC - m_pairedBunches = FULL_RING; // Assume full-ring - const float mcCrossSectionInSqCm = 1e-33 * m_mcCrossSection; // Convert nb -> cm^2 - m_mcModifiedCrossSection = mcCrossSectionInSqCm * m_mcFilterEfficiency * m_mcKFactor; - ATH_MSG_INFO ("Running over MC with xsec:" << m_mcCrossSection << " nb, filter efficiency:" << m_mcFilterEfficiency << ", k-factor:" << m_mcKFactor); + if (m_mcCrossSection == 0 || m_mcFilterEfficiency == 0) { + ATH_MSG_FATAL("For MC rates, a cross section and filter efficiency must be supplied."); + return StatusCode::FAILURE; + } + m_deadtime = 1.; // No deadtime for MC + m_pairedBunches = FULL_RING; // Assume full-ring + const float mcCrossSectionInSqCm = 1e-33 * m_mcCrossSection; // Convert nb -> cm^2 + m_mcModifiedCrossSection = mcCrossSectionInSqCm * m_mcFilterEfficiency * m_mcKFactor; + ATH_MSG_INFO ("Running over MC with xsec:" << m_mcCrossSection << " nb, filter efficiency:" << m_mcFilterEfficiency << ", k-factor:" << m_mcKFactor); - } else { // isData + } else { // isData - if (m_runNumber == 0u) { - ATH_MSG_FATAL("calculateWeightingData is TRUE, but the RunNumber property has not been set. This must be set such that we can read in the correct data."); - return StatusCode::FAILURE; - } - ATH_MSG_INFO ("calculateWeightingData is TRUE. This job will read in EnhancedBias weighting data from CVMFS and COOL."); - ATH_CHECK( loadWeights() ); - ATH_CHECK( loadLumi() ); + if (m_runNumber == 0u) { + ATH_MSG_FATAL("calculateWeightingData is TRUE, but the RunNumber property has not been set. This must be set such that we can read in the correct data."); + return StatusCode::FAILURE; + } + ATH_MSG_INFO ("calculateWeightingData is TRUE. This job will read in EnhancedBias weighting data from CVMFS and COOL."); + ATH_CHECK( loadWeights() ); + ATH_CHECK( loadLumi() ); - } // end isData + } // end isData - } else { - ATH_MSG_INFO ("calculateWeightingData is FALSE. This job must be running over an EnhancedBias TRIG1 dAOD which has already been decorated with weighting data."); - } return StatusCode::SUCCESS; } @@ -386,44 +381,35 @@ int32_t EnhancedBiasWeighter::getEventEBID(const EventContext& context) const double EnhancedBiasWeighter::getEBWeight(const xAOD::EventInfo* eventInfo) const { - if (m_enforceEBGRL && !isGoodLB(eventInfo)) { return 0; } ATH_CHECK( trackAverages(eventInfo), 0 ); - if (m_calculateWeightingData) { + if (m_isMC) { - if (m_isMC) { - - if (m_mcIgnoreGeneratorWeights) { - return 1.; - } - - const std::vector weights = eventInfo->mcEventWeights(); - if (weights.size() > 0) { - return weights[0]; - } + if (m_mcIgnoreGeneratorWeights) { return 1.; + } - } else { // isData - - int32_t ebID = getEventEBID(eventInfo); - const auto mapIterator = m_idToWeightMap.find(ebID); - if (mapIterator == m_idToWeightMap.end() ) { - ATH_MSG_ERROR( "Couldn't find enhanced bias weight for event with ID " << ebID); - return 0; - } - return mapIterator->second; - - } // isData + const std::vector weights = eventInfo->mcEventWeights(); + if (weights.size() > 0) { + return weights[0]; + } + return 1.; - } else { + } else { // isData - return eventInfo->auxdata("EnhancedBiasWeight"); + int32_t ebID = getEventEBID(eventInfo); + const auto mapIterator = m_idToWeightMap.find(ebID); + if (mapIterator == m_idToWeightMap.end() ) { + ATH_MSG_ERROR( "Couldn't find enhanced bias weight for event with ID " << ebID); + return 0; + } + return mapIterator->second; - } + } // isData } @@ -436,31 +422,22 @@ double EnhancedBiasWeighter::getEBWeight(const EventContext& context) const ATH_CHECK( trackAverages(context), 0 ); - if (m_calculateWeightingData) { - - if (m_isMC) { - - ATH_MSG_ERROR( "Cannot use EventContext based getEBWeight with MC. Needs full EventInfo."); - return 0.; - - } else { // isData + if (m_isMC) { - int32_t ebID = getEventEBID(context); - const auto mapIterator = m_idToWeightMap.find(ebID); - if (mapIterator == m_idToWeightMap.end() ) { - ATH_MSG_ERROR( "Couldn't find enhanced bias weight for event with ID " << ebID); - return 0; - } - return mapIterator->second; - - } // isData + ATH_MSG_ERROR( "Cannot use EventContext based getEBWeight with MC. Needs full EventInfo."); + return 0.; - } else { + } else { // isData - ATH_MSG_ERROR( "Cannot use EventContext based getEBWeight unless calculating it. Needs full EventInfo."); - return 0.; + int32_t ebID = getEventEBID(context); + const auto mapIterator = m_idToWeightMap.find(ebID); + if (mapIterator == m_idToWeightMap.end() ) { + ATH_MSG_ERROR( "Couldn't find enhanced bias weight for event with ID " << ebID); + return 0; + } + return mapIterator->second; - } + } // isData } @@ -480,220 +457,165 @@ StatusCode EnhancedBiasWeighter::trackAverages(const xAOD::EventInfo* eventInfo) double EnhancedBiasWeighter::getEBLiveTime(const xAOD::EventInfo* eventInfo) const { + if (m_isMC) { + // Probability that a single pp interaction yields this MC process (ratio of xsec) + const double probOfProcess = m_mcModifiedCrossSection / m_inelasticCrossSection; + // Probability that a single bunch-crossing yeild this MC process. Binomial statistics (1 - Prob(exactly 0 interactions, given mu interactions)). + const double probOfBunchCrossing = 1. - std::pow( 1. - probOfProcess, std::ceil(eventInfo->actualInteractionsPerCrossing()) ); + const double bunchCrossingRate = m_pairedBunches * LHC_FREQUENCY; + // How much wall-time does this event represent? This is the reciprocal of the rate, which is the % per crossing scaled by the crossing rate. + ATH_MSG_DEBUG("MC livetime debug: probOfProcess:" << probOfProcess << " probOfBunchCrossing:" << probOfBunchCrossing << " bunchCrossingRate:" << bunchCrossingRate << " time:" << (1. / (probOfBunchCrossing * bunchCrossingRate))); + return 1. / (probOfBunchCrossing * bunchCrossingRate); - if (m_calculateWeightingData) { - - if (m_isMC) { - - // Probability that a single pp interaction yields this MC process (ratio of xsec) - const double probOfProcess = m_mcModifiedCrossSection / m_inelasticCrossSection; - // Probability that a single bunch-crossing yeild this MC process. Binomial statistics (1 - Prob(exactly 0 interactions, given mu interactions)). - const double probOfBunchCrossing = 1. - std::pow( 1. - probOfProcess, std::ceil(eventInfo->actualInteractionsPerCrossing()) ); - const double bunchCrossingRate = m_pairedBunches * LHC_FREQUENCY; - // How much wall-time does this event represent? This is the reciprocal of the rate, which is the % per crossing scaled by the crossing rate. - ATH_MSG_DEBUG("MC livetime debug: probOfProcess:" << probOfProcess << " probOfBunchCrossing:" << probOfBunchCrossing << " bunchCrossingRate:" << bunchCrossingRate << " time:" << (1. / (probOfBunchCrossing * bunchCrossingRate))); - return 1. / (probOfBunchCrossing * bunchCrossingRate); - - } else { - - uint32_t lumiBlock = eventInfo->lumiBlock(); - std::lock_guard scopeLock(m_mutex); - - // Check the cache - const auto inCacheIterator = m_eventLivetime.find( lumiBlock ); - if (inCacheIterator != m_eventLivetime.end()) return inCacheIterator->second; - - // Else calculate - const auto mapIterator = m_eventsPerLB.find(lumiBlock); - if (mapIterator == m_eventsPerLB.end() ) { - if (m_errorOnMissingEBWeights) { - ATH_MSG_ERROR( "Couldn't find LB info for LB: " << lumiBlock ); - } - return 0; - } - const int32_t eventsInThisLB = mapIterator->second; - const double lbLength = m_readLumiBlock.getLumiBlockLength(lumiBlock, msg()); - // This event is one in eventsInThisLB, so has an effective temporal contribution of: - double eventLivetime = 0; - if (eventsInThisLB > 0 && fabs(lbLength) > 1e-10) eventLivetime = (1. / static_cast(eventsInThisLB)) * lbLength; - // Cache this (mutable) - m_eventLivetime[lumiBlock] = eventLivetime; - return eventLivetime; + } else { - } // isData + uint32_t lumiBlock = eventInfo->lumiBlock(); + std::lock_guard scopeLock(m_mutex); - } else { + // Check the cache + const auto inCacheIterator = m_eventLivetime.find( lumiBlock ); + if (inCacheIterator != m_eventLivetime.end()) return inCacheIterator->second; - return eventInfo->auxdata("EnhancedBiasLivetime"); + // Else calculate + const auto mapIterator = m_eventsPerLB.find(lumiBlock); + if (mapIterator == m_eventsPerLB.end() ) { + if (m_errorOnMissingEBWeights) { + ATH_MSG_ERROR( "Couldn't find LB info for LB: " << lumiBlock ); + } + return 0; + } + const int32_t eventsInThisLB = mapIterator->second; + const double lbLength = m_readLumiBlock.getLumiBlockLength(lumiBlock, msg()); + // This event is one in eventsInThisLB, so has an effective temporal contribution of: + double eventLivetime = 0; + if (eventsInThisLB > 0 && fabs(lbLength) > 1e-10) eventLivetime = (1. / static_cast(eventsInThisLB)) * lbLength; + // Cache this (mutable) + m_eventLivetime[lumiBlock] = eventLivetime; + return eventLivetime; - } + } // isData } double EnhancedBiasWeighter::getEBLiveTime(const EventContext& context) const { + if (m_isMC) { + ATH_MSG_ERROR( "Cannot use EventContext based getEBLiveTime with MC. Needs full EventInfo."); + return 0.; - if (m_calculateWeightingData) { - - if (m_isMC) { + } else { - ATH_MSG_ERROR( "Cannot use EventContext based getEBLiveTime with MC. Needs full EventInfo."); - return 0.; + uint32_t lumiBlock = context.eventID().lumi_block(); + std::lock_guard scopeLock(m_mutex); - } else { - - uint32_t lumiBlock = context.eventID().lumi_block(); - std::lock_guard scopeLock(m_mutex); - - // Check the cache - const auto inCacheIterator = m_eventLivetime.find( lumiBlock ); - if (inCacheIterator != m_eventLivetime.end()) return inCacheIterator->second; - - // Else calculate - const auto mapIterator = m_eventsPerLB.find(lumiBlock); - if (mapIterator == m_eventsPerLB.end() ) { - if (m_errorOnMissingEBWeights) { - ATH_MSG_ERROR( "Couldn't find LB info for LB: " << lumiBlock ); - } - return 0.; - } - const int32_t eventsInThisLB = mapIterator->second; - const double lbLength = m_readLumiBlock.getLumiBlockLength(lumiBlock, msg()); - // This event is one in eventsInThisLB, so has an effective temporal contribution of: - double eventLivetime = 0; - if (eventsInThisLB > 0 && fabs(lbLength) > 1e-10) eventLivetime = (1. / static_cast(eventsInThisLB)) * lbLength; - // Cache this (mutable) - m_eventLivetime[lumiBlock] = eventLivetime; - return eventLivetime; - - } // isData + // Check the cache + const auto inCacheIterator = m_eventLivetime.find( lumiBlock ); + if (inCacheIterator != m_eventLivetime.end()) return inCacheIterator->second; - } else { + // Else calculate + const auto mapIterator = m_eventsPerLB.find(lumiBlock); + if (mapIterator == m_eventsPerLB.end() ) { + if (m_errorOnMissingEBWeights) { + ATH_MSG_ERROR( "Couldn't find LB info for LB: " << lumiBlock ); + } + return 0.; + } + const int32_t eventsInThisLB = mapIterator->second; + const double lbLength = m_readLumiBlock.getLumiBlockLength(lumiBlock, msg()); + // This event is one in eventsInThisLB, so has an effective temporal contribution of: + double eventLivetime = 0; + if (eventsInThisLB > 0 && fabs(lbLength) > 1e-10) eventLivetime = (1. / static_cast(eventsInThisLB)) * lbLength; + // Cache this (mutable) + m_eventLivetime[lumiBlock] = eventLivetime; + return eventLivetime; - ATH_MSG_ERROR( "Cannot use EventContext based getEBLiveTime unless calculating it. Needs full EventInfo."); - return 0.; + } // isData - } } double EnhancedBiasWeighter::getLBLength(const xAOD::EventInfo* eventInfo) const { - if (m_calculateWeightingData) { - if (m_isMC) { - ATH_MSG_ERROR( "getLBLength Does not work for MC."); - return 0.; - } else { - uint32_t lumiBlock = eventInfo->lumiBlock(); - const double lbLength = m_readLumiBlock.getLumiBlockLength(lumiBlock, msg()); - return lbLength; - } // isData - } else { - ATH_MSG_ERROR( "getLBLength Requires CalculateWeightingData=True"); + if (m_isMC) { + ATH_MSG_ERROR( "getLBLength Does not work for MC."); return 0.; - } + } else { + uint32_t lumiBlock = eventInfo->lumiBlock(); + const double lbLength = m_readLumiBlock.getLumiBlockLength(lumiBlock, msg()); + return lbLength; + } // isData } double EnhancedBiasWeighter::getLBLength(const EventContext& context) const { - if (m_calculateWeightingData) { - if (m_isMC) { - ATH_MSG_ERROR( "getLBLength Does not work for MC."); - return 0.; - } else { - uint32_t lumiBlock = context.eventID().lumi_block(); - const double lbLength = m_readLumiBlock.getLumiBlockLength(lumiBlock, msg()); - return lbLength; - } // isData - } else { - ATH_MSG_ERROR( "getLBLength Requires CalculateWeightingData=True"); + if (m_isMC) { + ATH_MSG_ERROR( "getLBLength Does not work for MC."); return 0.; - } + } else { + uint32_t lumiBlock = context.eventID().lumi_block(); + const double lbLength = m_readLumiBlock.getLumiBlockLength(lumiBlock, msg()); + return lbLength; + } // isData } bool EnhancedBiasWeighter::isUnbiasedEvent(const xAOD::EventInfo* eventInfo) const { - if (m_calculateWeightingData) { - - if (m_isMC) { + if (m_isMC) { - return true; + return true; - } else { //isData + } else { //isData - int32_t ebID = getEventEBID(eventInfo); - const auto mapIterator = m_idToUnbiasedMap.find(ebID); - if (mapIterator == m_idToUnbiasedMap.end() ) { - ATH_MSG_ERROR("Couldn't find isUnbiased information for event with ID " << ebID); - return false; - } - return mapIterator->second; - - } // isData + int32_t ebID = getEventEBID(eventInfo); + const auto mapIterator = m_idToUnbiasedMap.find(ebID); + if (mapIterator == m_idToUnbiasedMap.end() ) { + ATH_MSG_ERROR("Couldn't find isUnbiased information for event with ID " << ebID); + return false; + } + return mapIterator->second; - } else { - - return static_cast( eventInfo->auxdata("IsUnbiasedEventFlag") ); - - } + } // isData } bool EnhancedBiasWeighter::isGoodLB(const xAOD::EventInfo* eventInfo) const { - if (m_calculateWeightingData) { - - if (m_isMC) { - - return true; - - } else { // isData - - uint32_t lumiBlock = eventInfo->lumiBlock(); - - const auto mapIterator = m_goodLB.find(lumiBlock); - if (mapIterator == m_goodLB.end() ) { - ATH_MSG_ERROR( "Couldn't find LB good/bad info for LB: " << lumiBlock ); - return false; - } - return static_cast(mapIterator->second); + if (m_isMC) { + + return true; - } // isData + } else { // isData - } else { + uint32_t lumiBlock = eventInfo->lumiBlock(); - return static_cast( eventInfo->auxdata("IsGoodLBFlag") ); + const auto mapIterator = m_goodLB.find(lumiBlock); + if (mapIterator == m_goodLB.end() ) { + ATH_MSG_ERROR( "Couldn't find LB good/bad info for LB: " << lumiBlock ); + return false; + } + return static_cast(mapIterator->second); - } + } // isData } bool EnhancedBiasWeighter::isGoodLB(const EventContext& context) const { - if (m_calculateWeightingData) { - - if (m_isMC) { - - return true; - - } else { // isData - - uint32_t lumiBlock = context.eventID().lumi_block(); - - const auto mapIterator = m_goodLB.find(lumiBlock); - if (mapIterator == m_goodLB.end() ) { - ATH_MSG_ERROR( "Couldn't find LB good/bad info for LB: " << lumiBlock ); - return false; - } - return static_cast(mapIterator->second); + if (m_isMC) { + + return true; - } // isData + } else { // isData - } else { + uint32_t lumiBlock = context.eventID().lumi_block(); - ATH_MSG_ERROR( "Cannot use EventContext based isGoodLB unless calculating it. Needs full EventInfo."); - return false; + const auto mapIterator = m_goodLB.find(lumiBlock); + if (mapIterator == m_goodLB.end() ) { + ATH_MSG_ERROR( "Couldn't find LB good/bad info for LB: " << lumiBlock ); + return false; + } + return static_cast(mapIterator->second); - } + } // isData } bool EnhancedBiasWeighter::isMC() const { @@ -706,59 +628,42 @@ uint32_t EnhancedBiasWeighter::getRunNumber() const { double EnhancedBiasWeighter::getLBLumi(const xAOD::EventInfo* eventInfo) const { - if (m_calculateWeightingData) { - - if (m_isMC) { + if (m_isMC) { - const double mu = std::ceil( eventInfo->actualInteractionsPerCrossing() ); - return (mu * LHC_FREQUENCY * m_pairedBunches) / m_inelasticCrossSection; + const double mu = std::ceil( eventInfo->actualInteractionsPerCrossing() ); + return (mu * LHC_FREQUENCY * m_pairedBunches) / m_inelasticCrossSection; - } else { // isData - - uint32_t lumiBlock = eventInfo->lumiBlock(); - const auto mapIterator = m_lumiPerLB.find(lumiBlock); - if (mapIterator == m_lumiPerLB.end() ) { - ATH_MSG_ERROR( "Couldn't find lumi info for LB: " << lumiBlock ); - return 0.; - } - return mapIterator->second; - - } // isData - - } else { + } else { // isData - return eventInfo->auxdata("LBLumi"); + uint32_t lumiBlock = eventInfo->lumiBlock(); + const auto mapIterator = m_lumiPerLB.find(lumiBlock); + if (mapIterator == m_lumiPerLB.end() ) { + ATH_MSG_ERROR( "Couldn't find lumi info for LB: " << lumiBlock ); + return 0.; + } + return mapIterator->second; - } + } // isData } double EnhancedBiasWeighter::getLBLumi(const EventContext& context) const { - if (m_calculateWeightingData) { - - if (m_isMC) { - - ATH_MSG_ERROR( "Cannot use EventContext based getLBLumi with MC. Needs full EventInfo."); - return 0.; + if (m_isMC) { - } else { // isData - - uint32_t lumiBlock = context.eventID().lumi_block(); - const auto mapIterator = m_lumiPerLB.find(lumiBlock); - if (mapIterator == m_lumiPerLB.end() ) { - ATH_MSG_ERROR( "Couldn't find lumi info for LB: " << lumiBlock ); - return 0.; - } - return mapIterator->second; - - } // isData + ATH_MSG_ERROR( "Cannot use EventContext based getLBLumi with MC. Needs full EventInfo."); + return 0.; - } else { + } else { // isData - ATH_MSG_ERROR( "Cannot use EventContext based getLBLumi unless calculating it. Needs full EventInfo."); - return 0; + uint32_t lumiBlock = context.eventID().lumi_block(); + const auto mapIterator = m_lumiPerLB.find(lumiBlock); + if (mapIterator == m_lumiPerLB.end() ) { + ATH_MSG_ERROR( "Couldn't find lumi info for LB: " << lumiBlock ); + return 0.; + } + return mapIterator->second; - } + } // isData } double EnhancedBiasWeighter::getDeadtime() const @@ -773,20 +678,13 @@ uint32_t EnhancedBiasWeighter::getPairedBunches() const StatusCode EnhancedBiasWeighter::getDistanceIntoTrain(const xAOD::EventInfo* eventInfo, uint32_t& distance) const { - if (m_calculateWeightingData) { - - if (!m_useBunchCrossingData) return StatusCode::SUCCESS; - - const EventContext& context = Gaudi::Hive::currentContext(); - SG::ReadCondHandle bunchCrossingTool (m_bunchCrossingKey, context); - ATH_CHECK( bunchCrossingTool.isValid() ); - distance = bunchCrossingTool->distanceFromFront( eventInfo->bcid(), BunchCrossingCondData::BunchDistanceType::BunchCrossings ); - - } else { + if (!m_useBunchCrossingData) return StatusCode::SUCCESS; - distance = eventInfo->auxdata("BCIDDistanceFromFront"); + const EventContext& context = Gaudi::Hive::currentContext(); + SG::ReadCondHandle bunchCrossingTool (m_bunchCrossingKey, context); + ATH_CHECK( bunchCrossingTool.isValid() ); + distance = bunchCrossingTool->distanceFromFront( eventInfo->bcid(), BunchCrossingCondData::BunchDistanceType::BunchCrossings ); - } return StatusCode::SUCCESS; } @@ -803,12 +701,6 @@ double EnhancedBiasWeighter::getAverageMu() const StatusCode EnhancedBiasWeighter::addBranches() const { - - if (m_calculateWeightingData == false) { - ATH_MSG_FATAL( "Cannot decorate AOD with EnhancedBias data if loadEnhancedBiasData is FALSE "); - return StatusCode::FAILURE; - } - // Set up the decorator SG::AuxElement::Decorator< double > decoratorEBWeight("EnhancedBiasWeight"); SG::AuxElement::Decorator< double > decoratorEBLivetime("EnhancedBiasLivetime"); diff --git a/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesAnalysisAlg.h b/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesAnalysisAlg.h index b475b27c1efb10171b58bf41faa87f7d3236ae20..33c15c1941a6592913bec9cb8a26b5bf03cd3c88 100644 --- a/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesAnalysisAlg.h +++ b/Trigger/TrigCost/RatesAnalysis/RatesAnalysis/RatesAnalysisAlg.h @@ -103,7 +103,7 @@ class RatesAnalysisAlg: public ::AthAnalysisAlgorithm { const double thresholdMin, const double thresholdMax, const uint32_t thresholdBins = 100, - const RatesScanTrigger::TriggerBehaviour_t behaviour = RatesScanTrigger::TriggerBehaviour_t::kTriggerAboveThreshold, + const RatesScanTrigger::TriggerBehaviour_t behaviour = RatesScanTrigger::TriggerBehaviour_t::kTriggerBelowThreshold, const double prescale = 1., const std::string& seedName = "", const double seedPrecale = 1., diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ConditionDefaults.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ConditionDefaults.py index 8a81d7eef16f8ba6e5f14d660876d00b61874fe9..d43e2e54fa875717e4bf7b914308239acbbba6c4 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ConditionDefaults.py +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/ConditionDefaults.py @@ -34,6 +34,7 @@ class ConditionDefaults: 'jvt': {'min': '0', 'max': 'inf'}, 'bdips': {'min': '-inf', 'max': 'inf'}, 'momCuts': {'min': '-inf', 'max': 'inf'}, + 'timing': {'min': '0', 'max': 'inf'}, } self.scale_factor = { @@ -54,6 +55,7 @@ class ConditionDefaults: 'jvt': 0.01, 'bdips': 1., 'momCuts': 0.01, + 'timing': 1.0, } def __call__(self, key, lo='', hi=''): diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/FastReductionAlgToolFactory.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/FastReductionAlgToolFactory.py index 5272a678cb791f3ac097a3d868f602482cd070e6..97cbe9a9b122de750db07f50733f405f7115d4ba 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/FastReductionAlgToolFactory.py +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/FastReductionAlgToolFactory.py @@ -51,6 +51,7 @@ class FastReductionAlgToolFactory: 'bdips': [CompFactory.TrigJetConditionConfig_bdips, 0], 'clean': [CompFactory.TrigJetConditionConfig_clean, 0], 'all': [CompFactory.TrigJetConditionConfig_acceptAll, 0], + 'timing': [CompFactory.TrigJetConditionConfig_timing, 0], } for var in jetMoments: diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoMonitoringConfig.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoMonitoringConfig.py index 884019d159ea5305a7b64f1f702ff6b41aa2e694..c09390ff7521ac71500dc6ea754c851f4f65e943 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoMonitoringConfig.py +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoMonitoringConfig.py @@ -4,10 +4,10 @@ from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool def TrigJetHypoToolMonitoring(histPath, histFlags): montool = GenericMonitoringTool("MonTool", HistPath = histPath) - # Always make these. + # Always make these. Timing plots are 100 ms bins (expect everything in 0 bin) montool.defineHistogram('Et', title='Jet E_{T};E_{T} (GeV)', xbins=100, xmin=0, xmax=500, path='EXPERT', type='TH1F' ) - montool.defineHistogram('TIME_jetHypo,NJetsIn', title='JetHypo time vs input jets;time (ms) ;N(jets)', xbins=50, xmin=0, xmax=10, ybins=40, ymin=-0.5, ymax=39.5, path='EXPERT', type='TH2F' ) - montool.defineHistogram('TIME_jetHypo,NJetsOut', title='JetHypo time vs jets;time (ms) ;N(jets)', xbins=50, xmin=0, xmax=10, ybins=30, ymin=-0.5, ymax=29.5, path='EXPERT', type='TH2F' ) + montool.defineHistogram('TIME_jetHypo,NJetsIn', title='JetHypo time vs input jets;time (ms) ;N(jets)', xbins=50, xmin=0, xmax=5000, ybins=60, ymin=0, ymax=120, path='EXPERT', type='TH2F' ) + montool.defineHistogram('TIME_jetHypo,NJetsOut', title='JetHypo time vs jets;time (ms) ;N(jets)', xbins=50, xmin=0, xmax=5000, ybins=30, ymin=-0.5, ymax=29.5, path='EXPERT', type='TH2F' ) # Conditional histograms: monitor the mass for largeR jets (anything but a4), and etaphi for simple smallR if 'a4' not in histFlags: montool.defineHistogram('Mass', title='Jet mass;m (GeV)', xbins=100, xmin=0, xmax=200, path='EXPERT', type='TH1F' ) if ('simple' in histFlags) and ('a4' in histFlags) and all("HT" not in flag for flag in histFlags): diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/scenario_simple.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/scenario_simple.py index 3d0d50eae32783ab2dd7ef5649d25a4587849e1a..07f77bcb87fd25ab0e824abb438017baffc0fc5c 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/scenario_simple.py +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/scenario_simple.py @@ -17,7 +17,7 @@ from copy import deepcopy # make a list of all possible cut items for the simple scenario all_elemental_keys = ('etaRange', 'jvt', 'smc', - 'threshold', 'momCuts', 'bdips') + 'threshold', 'momCuts', 'bdips', 'timing') # Extract moment cuts def _cuts_from_momCuts(momCuts): @@ -71,6 +71,13 @@ def get_condition_args_from_chainpart(cp): vals = defaults(key, lo=lo) condargs.append((key, deepcopy(vals))) + if k == 'timing': + key = 'timing' + values = v.split(key) + lo = values[0] + vals = defaults(key, lo=lo) + condargs.append((key, deepcopy(vals))) + if k == 'bdips': key = 'bdips' values = v.split(key) @@ -146,7 +153,7 @@ def scenario_simple(chain_parts): # elemental Conditions condargs = get_condition_args_from_chainpart(cp) - + multiplicity = int(cp['multiplicity']) chainPartInd = cp['chainPartIndex'] diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/test_hypoConfigBuilder.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/test_hypoConfigBuilder.py index d4f933fa3c2db1effc748359e72adbf127e6f274..a6f41843d59dc41bcfeebc2ef121f85caa7f84c4 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/test_hypoConfigBuilder.py +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/test_hypoConfigBuilder.py @@ -6,6 +6,8 @@ from __future__ import print_function from TriggerMenuMT.HLT.Menu.Physics_pp_run3_v1 import ( SingleJetGroup, MultiJetGroup, + PrimaryLegGroup, + MultiBjetGroup, ) DevGroup = ['Development'] @@ -30,8 +32,8 @@ logger = logging.getLogger( __name__) logger.setLevel(DEBUG) chains = [ - ChainProp(name='HLT_j0_DIJET80j12ptXX700djmassXXdjdphi260_L1J20', - l1SeedThresholds=['FSNOSEED'],groups=MultiJetGroup), + ChainProp(name='HLT_j0_DIJET70j12ptXX1000djmassXXdjdphi200XX400djdeta_pf_ftf_L1MJJ-500-NFF', + l1SeedThresholds=['FSNOSEED'],stream=['VBFDelayed'], groups=PrimaryLegGroup+MultiBjetGroup), ChainProp(name='HLT_j0_DIJET70j12ptXX1000djmassXXdjdphi200XX400djdeta_L1J20', l1SeedThresholds=['FSNOSEED'],groups=MultiJetGroup), @@ -52,7 +54,7 @@ chains = [ ChainProp(name='HLT_j0_perf_a10sd_cssk_pf_nojcalib_ftf_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['Main'], groups=['PS:Online']+SingleJetGroup), - ChainProp(name='HLT_j260_320eta490_L1J75_31ETA49', + ChainProp(name='HLT_j260f_L1J75_31ETA49', groups=SingleJetGroup), ChainProp(name='HLT_j80_j60_L1J15', @@ -97,7 +99,12 @@ chains = [ ChainProp(name='HLT_j0_HT1000_j0_DIJET80j12ptXX0j12eta240XX700djmass_L1J20', l1SeedThresholds=['FSNOSEED']*2, groups=MultiJetGroup), - ChainProp(name='HLT_2j35_0eta240_roiftf_2j35_0eta240_85bdips_roiftf_presel4c35_L14J15p0ETA25', l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=MultiJetGroup+DevGroup), + ChainProp(name='HLT_2j35c_2j35c_85bdips_roiftf_presel4c35_L14J15p0ETA25', l1SeedThresholds=['FSNOSEED','FSNOSEED'], groups=MultiJetGroup+DevGroup), + + + ChainProp(name='HLT_3j45_j45_2timing_roiftf_presel4c35_L14J15p0ETA25', l1SeedThresholds=['FSNOSEED']*2, groups=MultiJetGroup+DevGroup), + + ChainProp(name='HLT_j220__2timing_roiftf_presel4c35_L14J15p0ETA25', l1SeedThresholds=['FSNOSEED'], groups=MultiJetGroup+DevGroup), ] def testChainDictMaker(idict): @@ -150,7 +157,27 @@ if __name__ == '__main__': iprop = args.iprop dicts = testChainDictMaker(iprop) + + def order_chainparts(d): + cdict = d[1] + # crass "fix" for out of order chainparts + # these errors probably arise from calling + # not-quite-correct menu code. + chain_part_inds = [cp['chainPartIndex'] for cp in cdict['chainParts']] + fix = chain_part_inds == sorted(chain_part_inds) + if not fix: + fix = chain_part_inds[-1] - chain_part_inds[0] == len(chain_part_inds) + + + if fix: + cpi = 0 + for cp in cdict['chainParts']: + cp['chainPartIndex'] = cpi + cpi += 1 + + for d in dicts: + order_chainparts(d) pprint(d) do_dot = args.dot diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TimingCondition.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TimingCondition.cxx new file mode 100644 index 0000000000000000000000000000000000000000..745dd54fced500b77e1fdd6636ff399ec34b472c --- /dev/null +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TimingCondition.cxx @@ -0,0 +1,66 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +#include "./TimingCondition.h" +#include "./ITrigJetHypoInfoCollector.h" +#include +#include +#include +#include +#include + +TimingCondition::TimingCondition(double t_min, + double t_max): + m_min(t_min), m_max(t_max) { +} + + +bool TimingCondition::isSatisfied(const HypoJetVector& ips, const std::unique_ptr& collector) const{ + + if(ips.size() != 1){ + std::stringstream ss; + ss << "TimingCondition::isSatisfied must see exactly 1 particle, but received " + << ips.size() + << '\n'; + throw std::runtime_error(ss.str()); + } + + auto jet = ips[0]; + + float timing {0.}; + if(!(jet->getAttribute("Timing",timing))){ + throw std::runtime_error("ERROR: TimingCondition cannot retrieve jet moment 'Timing'"); + } + bool pass = timing >= m_min and timing < m_max; + + if(collector){ + std::stringstream ss0; + const void* address = static_cast(this); + ss0 << "TimingCondition: (" << address + << ") timing[" << m_min << ", " << m_max << "]" + << " pass: " <(jet.get()); + std::stringstream ss1; + + ss1 << " jet : " << j_addr << ") timing " << timing << '\n'; + collector -> collect(ss0.str(), ss1.str()); + } + return pass; + +} + +std::string TimingCondition::toString() const { + + std::stringstream ss; + + const void* address = static_cast(this); + ss << "TimingCondition: (" << address << ") Capacity: " << s_capacity + << " timingMin "<< m_min + << " timingMax " << m_max + <<'\n'; + + return ss.str(); +} diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TimingCondition.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TimingCondition.h new file mode 100644 index 0000000000000000000000000000000000000000..08fb65deef7bd841c9ef7ab985d2c433fcd88607 --- /dev/null +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TimingCondition.h @@ -0,0 +1,42 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef TRIGHLTJETHYPO_TIMINGCONDITION_H +#define TRIGHLTJETHYPO_TIMINGCONDITION_H + +/******************************************************************** + * + * NAME: TimingCondition.h + * PACKAGE: Trigger/TrigHypothesis/TrigHLTJetHypo + * + *********************************************************************/ + +#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/IJet.h" +#include "./ICondition.h" +#include +#include + +class ITrigJetHypoInfoCollector; + +class TimingCondition: public ICondition{ + public: + TimingCondition(double t_min, + double t_max); + + bool isSatisfied(const HypoJetVector&, const std::unique_ptr&) const override; + + std::string toString() const override; + + virtual unsigned int capacity() const override{return s_capacity;} + + private: + + + double m_min; + double m_max; + const static unsigned int s_capacity{1}; + +}; + +#endif diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetConditionConfig_timing.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetConditionConfig_timing.cxx new file mode 100644 index 0000000000000000000000000000000000000000..5f23c910d7a409b7a320ad67109e4840d2da1196 --- /dev/null +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetConditionConfig_timing.cxx @@ -0,0 +1,33 @@ +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +/* + Instantiator for TIMING Condition + */ +#include "TrigJetConditionConfig_timing.h" +#include "GaudiKernel/StatusCode.h" +#include "./TimingCondition.h" +#include "./ArgStrToDouble.h" + +TrigJetConditionConfig_timing::TrigJetConditionConfig_timing(const std::string& type, const std::string& name, const IInterface* parent) : + base_class(type, name, parent){ +} + + +StatusCode TrigJetConditionConfig_timing::initialize() { + CHECK(checkVals()); + + return StatusCode::SUCCESS; +} + + +Condition TrigJetConditionConfig_timing::getCondition() const { + auto a2d = ArgStrToDouble(); + return std::make_unique(a2d(m_min), a2d(m_max)); +} + + +StatusCode TrigJetConditionConfig_timing::checkVals() const { + return StatusCode::SUCCESS; +} diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetConditionConfig_timing.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetConditionConfig_timing.h new file mode 100644 index 0000000000000000000000000000000000000000..7b64ef912590448782a3cea331ceb56d6e3ebb3a --- /dev/null +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetConditionConfig_timing.h @@ -0,0 +1,34 @@ + +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef TRIGJETCONDITIONCONFIG_TIMING_H +#define TRIGJETCONDITIONCONFIG_TIMING_H + + +#include "ITrigJetConditionConfig.h" +#include "./ConditionsDefs.h" +#include "AthenaBaseComps/AthAlgTool.h" + +class TrigJetConditionConfig_timing: +public extends { + + public: + + TrigJetConditionConfig_timing(const std::string& type, const std::string& name, const IInterface* parent); + + virtual StatusCode initialize() override; + virtual Condition getCondition() const override; + + private: + + Gaudi::Property + m_min{this, "min", {}, "min timing value"}; + + Gaudi::Property + m_max{this, "max", {}, "max timing value"}; + + StatusCode checkVals() const; +}; +#endif diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoTool.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoTool.cxx index 6a0a3b6e3d7cd3acf637060f1c52ee69da51651e..24aaa702a1f3234c5842a6cff9d33c253afc9a05 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoTool.cxx +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypoTool.cxx @@ -134,9 +134,9 @@ TrigJetHypoTool::decide(const xAOD::JetContainer* jets, // steady_clock::time_point t = steady_clock::now(); // monitoring -- timing plots (filled for every call) - auto tHypo = Monitored::Timer("TIME_jetHypo"); auto mon_NInputs = Monitored::Scalar("NJetsIn",jets->size()); auto mon_NOutputs = Monitored::Scalar("NJetsOut",-1); + auto tHypo = Monitored::Timer("TIME_jetHypo"); auto monitor_group_multTime = Monitored::Group( m_monTool, tHypo, mon_NOutputs, mon_NInputs); xAODJetCollector jetCollector; @@ -148,6 +148,7 @@ TrigJetHypoTool::decide(const xAOD::JetContainer* jets, << e.what()); return StatusCode::FAILURE; } + tHypo.stop(); if (!pass) { @@ -185,7 +186,6 @@ TrigJetHypoTool::decide(const xAOD::JetContainer* jets, ss << jetCollector.hypoJets(); jetdumper->collect("passed", ss.str()); } - tHypo.stop(); //monitoring -- filled in passing events HypoJetVector hjv = jetCollector.hypoJets(); diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/components/TrigHLTJetHypo_entries.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/components/TrigHLTJetHypo_entries.cxx index b867beaf729cd724b2adf8e24771e97a2ca0e9e9..e6518eab35354db46edede483d2482ec059fa0c2 100644 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/components/TrigHLTJetHypo_entries.cxx +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/components/TrigHLTJetHypo_entries.cxx @@ -25,6 +25,7 @@ #include "../TrigJetConditionConfig_acceptAll.h" #include "../TrigJetConditionConfig_moment.h" #include "../TrigJetConditionConfig_repeated.h" +#include "../TrigJetConditionConfig_timing.h" // #include "../TrigJetHypoTool.h" @@ -52,6 +53,7 @@ DECLARE_COMPONENT(TrigJetConditionConfig_dijet_deta) DECLARE_COMPONENT(TrigJetConditionConfig_dijet_dphi) DECLARE_COMPONENT(TrigJetConditionConfig_smc) DECLARE_COMPONENT(TrigJetConditionConfig_jvt) +DECLARE_COMPONENT(TrigJetConditionConfig_timing) DECLARE_COMPONENT(TrigJetConditionConfig_clean) DECLARE_COMPONENT(TrigJetConditionConfig_bdips) DECLARE_COMPONENT(TrigJetConditionConfig_acceptAll) diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoConfig.py b/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoConfig.py index 78e9be1e9da73de87a9c86368a05cb3f4b4c2d27..4955846fa3d6c1e1b1a7a9579aaa1b5c0598c7a3 100644 --- a/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoConfig.py +++ b/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoConfig.py @@ -259,8 +259,10 @@ def getThresholdsFromDict( chainDict ): def TrigMufastHypoToolFromDict( chainDict ): - - thresholds = getThresholdsFromDict( chainDict ) + if 'mucombTag' in chainDict['chainParts'][0]['extra']: + thresholds = ['passthrough'] + else: + thresholds = getThresholdsFromDict( chainDict ) config = TrigMufastHypoConfig() tool = config.ConfigurationHypoTool( chainDict['chainName'], thresholds ) diff --git a/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitCategoryMT.py b/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitCategoryMT.py index 684aeea32938a2b3478a361f9999965f068c33a2..5da6cca4869f6edecb79d04538650cbbdb448bb2 100644 --- a/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitCategoryMT.py +++ b/Trigger/TrigMonitoring/TrigEgammaMonitoring/python/TrigEgammaMonitCategoryMT.py @@ -45,15 +45,16 @@ monitoringTP_electron = [ 'HLT_e26_lhtight_L1eEM26L', 'HLT_e26_lhtight_L1eEM26T', 'HLT_e26_lhtight_ivarmedium_L1EM22VHI', - 'HLT_e26_lhtight_ivarloose_L1EM22VHI', 'HLT_e26_lhtight_ivarloose_L1eEM26', 'HLT_e26_lhtight_ivarloose_L1eEM26M', 'HLT_e26_lhtight_ivarloose_L1eEM26T', + 'HLT_e26_lhtight_ivarloose_L1EM22VHI' ] monitoring_tags = [ - 'HLT_e24_lhtight_ivarloose_L1EM22VHI' + 'HLT_e24_lhtight_ivarloose_L1EM22VHI', + 'HLT_e26_dnntight_ivarloose_L1EM22VHI' ] diff --git a/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorTagAndProbeAlgorithm.cxx b/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorTagAndProbeAlgorithm.cxx index c1d97d7a6f48591e73aa8e15ca41d625fd7b0c28..593ef0d8f09527dc66acba1155512a64f0048bce 100644 --- a/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorTagAndProbeAlgorithm.cxx +++ b/Trigger/TrigMonitoring/TrigEgammaMonitoring/src/TrigEgammaMonitorTagAndProbeAlgorithm.cxx @@ -247,16 +247,18 @@ bool TrigEgammaMonitorTagAndProbeAlgorithm::executeTandP( const EventContext& ct ATH_MSG_DEBUG("tag and probe pair in Z mass window"); // Probe available. Good Probe? if(!isGoodProbeElectron(monGroup, elProbe, jets.cptr())) continue; + ATH_MSG_DEBUG("is good probe Electron"); //fill( monGroup, m_anatype+"_ProbeCutCounter", "GoodProbe"); - const auto selProbe = std::make_shared(*elProbe); + auto selProbe = std::make_shared(*elProbe); dressPid(selProbe.get()); - probeElectrons.push_back(selProbe); + probeElectrons.emplace_back(std::move(selProbe)); auto mon_count_probe= Monitored::Scalar("ProbeCutCounter","GoodProbe"); auto mon_mee = Monitored::Scalar("Mee" , tpPairMass/1.e3 ); fill( monGroup , mon_count_probe, mon_mee ); + ATH_MSG_DEBUG("Fill TP Mee and count"); } } // end of for in Probe } // end of for in Tags diff --git a/Trigger/TrigMonitoring/TrigIDtrkMonitoring/python/TIDAMonitoring.py b/Trigger/TrigMonitoring/TrigIDtrkMonitoring/python/TIDAMonitoring.py index 6b5f8b9c050f697a75afe2886d6a40133515d2ce..668a3fbb13e1081ea34f4314f6360c295d582e93 100644 --- a/Trigger/TrigMonitoring/TrigIDtrkMonitoring/python/TIDAMonitoring.py +++ b/Trigger/TrigMonitoring/TrigIDtrkMonitoring/python/TIDAMonitoring.py @@ -114,6 +114,28 @@ def TIDAMonitoring( flags=None, name=None, monlevel=None, mcTruth=False ) : + #### muon LRT #### + + if mcTruth: + tidamuonlrt = TrigR3Mon_builder(flags, name = "IDMuonLRTTruth"+toolkey+"Tool", mcTruth=True, pdgID=13 ) + tidamuonlrt.SliceTag = "HLT/TRIDT/MuonLRTTruth/"+key + else: + tidamuonlrt = TrigR3Mon_builder( flags, name = "IDMuonLRT"+toolkey+"Tool", useHighestPT=True ) + tidamuonlrt.SliceTag = "HLT/TRIDT/MuonLRT/"+key + + tidamuonlrt.AnalysisConfig = "Tier0" + + chains = getchains( [ "HLT_mu.*_LRT_idperf.*:HLT_IDTrack_MuonLRT_FTF:HLT_Roi_L2SAMuon_LRT", + "HLT_mu.*_LRT_idperf.*:HLT_IDTrack_MuonLRT_IDTrig:HLT_Roi_L2SAMuon_LRT"], monlevel ) + + if len(chains)>0 : + + tidamuonlrt.ntupleChainNames += chains + + tidamuonlrt.MonTools = createMonTools( flags, tidamuonlrt.SliceTag, chains ) + + tools += [ tidamuonlrt ] + #### tau #### diff --git a/Trigger/TrigMonitoring/TrigMinBiasMonitoring/python/TrigSPTRKMonitoringMT.py b/Trigger/TrigMonitoring/TrigMinBiasMonitoring/python/TrigSPTRKMonitoringMT.py index ba07ab70c146ffccb7d9147b51c26317b6522798..c6ec2dc676fd6583974c476105798b53fb17f563 100644 --- a/Trigger/TrigMonitoring/TrigMinBiasMonitoring/python/TrigSPTRKMonitoringMT.py +++ b/Trigger/TrigMonitoring/TrigMinBiasMonitoring/python/TrigSPTRKMonitoringMT.py @@ -29,7 +29,8 @@ def TrigSPTRK(configFlags, highGranularity=False): from TrigConfigSvc.TriggerConfigAccess import getHLTMenuAccess detailed = ["HLT_mb_sptrk_L1RD0_FILLED", "HLT_mb_sp_L1RD0_FILLED"] - alg.triggerListTrackingMon = [c for c in getHLTMenuAccess(configFlags) if 'HLT_mb_sp_L1' in c] + alg.triggerListTrackingMon = [c for c in getHLTMenuAccess(configFlags) if 'HLT_mb_sptrk_L1' in c] + alg.triggerListTrackingMon += [c for c in getHLTMenuAccess(configFlags) if 'HLT_mb_sptrk_pt2_L1' in c] alg.triggerListSpacePointsMon = detailed for chain in alg.triggerListTrackingMon: diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoring/src/TrigMuonTruthMon.cxx b/Trigger/TrigMonitoring/TrigMuonMonitoring/src/TrigMuonTruthMon.cxx index 4840bd12e2727e70819199023279ff87c0c82401..da2102727cfd787615b8d3c262970bf77f5d9a6d 100644 --- a/Trigger/TrigMonitoring/TrigMuonMonitoring/src/TrigMuonTruthMon.cxx +++ b/Trigger/TrigMonitoring/TrigMuonMonitoring/src/TrigMuonTruthMon.cxx @@ -94,11 +94,18 @@ StatusCode TrigMuonTruthMon :: fillVariablesPerChain(const EventContext &ctx, co fill(m_group+"_"+chain, truthEta, truthPhi, truthIntPerBC); } - // Fill matched EFCB to truth histograms - const xAOD::Muon* efmuon = m_matchTool->matchEFCB(truthMu, chain, passed_EF); // Find EFCB muons + // Find match truth muons - EFSA matching for msonly chains, otherwise EFCB matching + std::string msonly = "msonly"; + const xAOD::Muon* efmuon; + if(chain.find(msonly) != std::string::npos){ // Find EFCB muons + efmuon = m_matchTool->matchEFSA(truthMu, chain, passed_EF); + } + else{ // Find EFCB muons + efmuon = m_matchTool->matchEFCB(truthMu, chain, passed_EF); + } const xAOD::MuonRoI* l1muon = m_matchTool->matchL1(truthMu, chain, passed_L1); // Find L1 muons - if(efmuon && passed_EF){ // Fill EFCB matched muon hists + if(efmuon && passed_EF){ // Fill matched muon histograms MatchedEFCBtruthPt = truthMu->pt()/1e3; fill(m_group+"_"+chain, MatchedEFCBtruthPt); if(std::abs(eta) < 1.05){ diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx b/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx index 895a95d984acb740cfda9779e73d9e20ce7048ad..506158e9952a727ca55f2297c1fe53e31057ff9e 100644 --- a/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx +++ b/Trigger/TrigMonitoring/TrigTauMonitoring/src/TrigTauMonitorAlgorithm.cxx @@ -355,12 +355,17 @@ void TrigTauMonitorAlgorithm::fillDistributions(const EventContext& ctx, const s ATH_MSG_DEBUG("True Tau visible pt: " << pt); float eta = xTruthTau->auxdata("eta_vis"); bool lep = xTruthTau->auxdata("IsLeptonicTau"); - if(pt < 20. || lep || fabs(eta) > 2.47 ) continue; + if(pt < 20. || lep || std::abs(eta) > 2.47 ) { + delete xTruthTau; + continue; + } if(xTruthTau->auxdata("nTracks") == 1){ true_taus_1p.push_back(xTruthTau); } else if(xTruthTau->auxdata("nTracks") == 3){ true_taus_3p.push_back(xTruthTau); + } else { + delete xTruthTau; } } } @@ -375,7 +380,17 @@ void TrigTauMonitorAlgorithm::fillDistributions(const EventContext& ctx, const s fillTruthEfficiency(online_tau_vec_all, true_taus_3p, trigger, "3P"); fillEFTauVsTruth(online_tau_vec_all, true_taus_3p, trigger, "3P"); } + + // remove all truth particles from the vector + for(auto * true_tau_1p : true_taus_1p){ + delete true_tau_1p; + } + + for(auto * true_tau_3p : true_taus_3p){ + delete true_tau_3p; + } + offline_for_hlt_tau_vec_all.clear(); offline_for_hlt_tau_vec_1p.clear(); offline_for_hlt_tau_vec_3p.clear(); @@ -1211,17 +1226,19 @@ StatusCode TrigTauMonitorAlgorithm::examineTruthTau(const xAOD::TruthParticle& x for ( std::size_t iChild = 0; iChild != nChildren; ++iChild ) { const xAOD::TruthParticle * child = decayvtx->outgoingParticle(iChild); - if( ( abs(child->pdgId()) == 12 || - abs(child->pdgId()) == 14 || - abs(child->pdgId()) == 16 ) ) continue; - if(child->status()==3) continue; - ATH_MSG_DEBUG("child "<< child->pdgId() << ", status "<< child->status() << ", charge "<< child->charge()); - if ( ( abs(child->pdgId()) == 11 || - abs(child->pdgId()) == 13 || - abs(child->pdgId()) == 15 ) ) xTruthTau.auxdecor("IsLeptonicTau") = true; - VisSumTLV += child->p4(); - xTruthTau.auxdecor("childChargeSum") += child->charge(); - xTruthTau.auxdecor("nTracks") += abs(child->charge()); + if(child){ + if( ( child->absPdgId() == 12 || + child->absPdgId() == 14 || + child->absPdgId() == 16 ) ) continue; + if(child->status()==3) continue; + ATH_MSG_DEBUG("child "<< child->pdgId() << ", status "<< child->status() << ", charge "<< child->charge()); + if( ( child->absPdgId() == 11 || + child->absPdgId() == 13 || + child->absPdgId() == 15 ) ) xTruthTau.auxdecor("IsLeptonicTau") = true; + VisSumTLV += child->p4(); + xTruthTau.auxdecor("childChargeSum") += child->charge(); + xTruthTau.auxdecor("nTracks") += std::abs(child->charge()); + } } } @@ -1231,16 +1248,18 @@ StatusCode TrigTauMonitorAlgorithm::examineTruthTau(const xAOD::TruthParticle& x xTruthTau.auxdecor("mvis") = VisSumTLV.M(); if(xTruthTau.auxdecor("childChargeSum")!=xTruthTau.charge() || xTruthTau.auxdecor("nTracks")%2==0) - { + { ATH_MSG_WARNING("Strange tau: charge " << xTruthTau.auxdecor("childChargeSum") << " and " << xTruthTau.auxdecor("nTracks") << " tracks"); const std::size_t nChildren = decayvtx->nOutgoingParticles(); for ( std::size_t iChild = 0; iChild != nChildren; ++iChild ) - { - const xAOD::TruthParticle * child = decayvtx->outgoingParticle(iChild); - ATH_MSG_WARNING("child "<< child->pdgId() << ", status "<< child->status() << ", charge "<< child->charge()); - } - } + { + const xAOD::TruthParticle * child = decayvtx->outgoingParticle(iChild); + if(child){ + ATH_MSG_WARNING("child "<< child->pdgId() << ", status "<< child->status() << ", charge "<< child->charge()); + } + } + } return StatusCode::SUCCESS; } diff --git a/Trigger/TrigSteer/DecisionHandling/CMakeLists.txt b/Trigger/TrigSteer/DecisionHandling/CMakeLists.txt index 01d72d4b4777e905e6dda9fe274ca2854a59740a..d59aa01e6d28d45bf48d859a6be7b5062af9a483 100644 --- a/Trigger/TrigSteer/DecisionHandling/CMakeLists.txt +++ b/Trigger/TrigSteer/DecisionHandling/CMakeLists.txt @@ -12,7 +12,7 @@ atlas_add_library( DecisionHandlingLib src/InputMakerBase.cxx src/ITestHypoTool.cxx PUBLIC_HEADERS DecisionHandling - LINK_LIBRARIES AthenaBaseComps AthenaMonitoringKernelLib GaudiKernel StoreGateLib TrigCompositeUtilsLib TrigCostMonitorLib TrigSteeringEvent TrigTimeAlgsLib + LINK_LIBRARIES AthenaBaseComps AthenaMonitoringKernelLib GaudiKernel BeamSpotConditionsData StoreGateLib TrigCompositeUtilsLib TrigCostMonitorLib TrigSteeringEvent TrigTimeAlgsLib PRIVATE_LINK_LIBRARIES AthContainers AthViews xAODTrigger ) # Component(s) in the package: @@ -28,7 +28,8 @@ atlas_add_component( DecisionHandling src/TestHypoTool.cxx src/TestHypoAlg.cxx src/PassFilter.cxx - LINK_LIBRARIES DecisionHandlingLib AthenaKernel xAODTrigCalo AthViews xAODTracking xAODJet ) + src/Roi*.cxx + LINK_LIBRARIES DecisionHandlingLib AthenaKernel xAODTrigCalo AthViews xAODTracking xAODJet HLTSeedingLib ) atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) #atlas_install_joboptions( share/*.py ) diff --git a/Trigger/TrigSteer/DecisionHandling/DecisionHandling/IRoiUpdaterTool.h b/Trigger/TrigSteer/DecisionHandling/DecisionHandling/IRoiUpdaterTool.h new file mode 100644 index 0000000000000000000000000000000000000000..9dc1a3e851088bb8d4fde0cbe20544a10e6818e6 --- /dev/null +++ b/Trigger/TrigSteer/DecisionHandling/DecisionHandling/IRoiUpdaterTool.h @@ -0,0 +1,35 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef DECISIONHANDLING_IROIUPDATERTOOL_H +#define DECISIONHANDLING_IROIUPDATERTOOL_H + +#include + +#include "GaudiKernel/IAlgTool.h" +#include "Gaudi/Property.h" +#include "GaudiKernel/StatusCode.h" +#include "TrigSteeringEvent/TrigRoiDescriptor.h" + + + +/** + * @class IRoiUpdaterTool + **/ +class IRoiUpdaterTool : virtual public IAlgTool { + +public: + + DeclareInterfaceID(IRoiUpdaterTool, 1, 0); + + virtual ~IRoiUpdaterTool() = default; + + virtual std::unique_ptr execute( const IRoiDescriptor* roi, const EventContext& ctx) const = 0; + + virtual std::unique_ptr execute( const EventContext& ctx ) const = 0; + +}; + +#endif //> !DECISIONHANDLING_IROIUPDATERTOOL_H + diff --git a/Trigger/TrigSteer/DecisionHandling/DecisionHandling/IViewCreatorROITool.h b/Trigger/TrigSteer/DecisionHandling/DecisionHandling/IViewCreatorROITool.h index c4d5876bc78c7534079e1738d58149c7f0772773..7047b4b51b933518283000db7da797e0c9bd4ec5 100644 --- a/Trigger/TrigSteer/DecisionHandling/DecisionHandling/IViewCreatorROITool.h +++ b/Trigger/TrigSteer/DecisionHandling/DecisionHandling/IViewCreatorROITool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #ifndef VIEWALGS_IVIEWCREATORROITOOL_H @@ -10,6 +10,7 @@ #include "Gaudi/Property.h" #include "TrigCompositeUtils/TrigCompositeUtils.h" + /** * @class IViewCreatorROITool * MT Trigger Tool interface used to determine the correct ROI to spawn an EventView on for a given Decision object. @@ -34,6 +35,7 @@ public: **/ virtual StatusCode attachROILinks(TrigCompositeUtils::DecisionContainer& decisions, const EventContext& ctx) const = 0; + }; #endif //> !VIEWALGS_IVIEWCREATORROITOOL_H diff --git a/Trigger/TrigSteer/DecisionHandling/src/InputMakerForRoI.h b/Trigger/TrigSteer/DecisionHandling/src/InputMakerForRoI.h index 8312eecc1bc41d2dd52c8eb859a7dd84df903686..32f3ea468b6effccf17cc1b6f6167899b7ca1f77 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/InputMakerForRoI.h +++ b/Trigger/TrigSteer/DecisionHandling/src/InputMakerForRoI.h @@ -1,8 +1,8 @@ /* Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#ifndef DESICIONHANDLING_INPUTMAKERFORROI_H -#define DESICIONHANDLING_INPUTMAKERFORROI_H +#ifndef DECISIONHANDLING_INPUTMAKERFORROI_H +#define DECISIONHANDLING_INPUTMAKERFORROI_H #include @@ -39,4 +39,4 @@ }; -#endif //> !DESICIONHANDLING_INPUTMAKERFORROI_H +#endif //> !DECISIONHANDLING_INPUTMAKERFORROI_H diff --git a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnClusterROITool.h b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnClusterROITool.h index 0180320d673e52332229c08c7b0e4061ea427718..9a89a444a68f33794cfe3cbc2b70ff0592643e19 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnClusterROITool.h +++ b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnClusterROITool.h @@ -1,9 +1,9 @@ /* -Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ -#ifndef DESICIONHANDLING_VIEWCREATORCENTREDONCLUSTERROITOOL_H -#define DESICIONHANDLING_VIEWCREATORCENTREDONCLUSTERROITOOL_H +#ifndef DECISIONHANDLING_VIEWCREATORCENTREDONCLUSTERROITOOL_H +#define DECISIONHANDLING_VIEWCREATORCENTREDONCLUSTERROITOOL_H #include "AthenaBaseComps/AthAlgTool.h" #include "StoreGate/WriteHandleKey.h" @@ -54,4 +54,4 @@ public: }; -#endif //> !DESICIONHANDLING_VIEWCREATORCENTREDONCLUSTERROITOOL_H +#endif //> !DECISIONHANDLING_VIEWCREATORCENTREDONCLUSTERROITOOL_H diff --git a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnIParticleROITool.h b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnIParticleROITool.h index 799d9808bf21674fb277bb73d2dd5b415f91353c..c21e38423b8caa43bd8690248cb9335940a8e8c3 100755 --- a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnIParticleROITool.h +++ b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnIParticleROITool.h @@ -1,9 +1,9 @@ /* -Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ -#ifndef DESICIONHANDLING_VIEWCREATORCENTREDONIPARTICLEROITOOL_H -#define DESICIONHANDLING_VIEWCREATORCENTREDONIPARTICLEROITOOL_H +#ifndef DECISIONHANDLING_VIEWCREATORCENTREDONIPARTICLEROITOOL_H +#define DECISIONHANDLING_VIEWCREATORCENTREDONIPARTICLEROITOOL_H #include "AthenaBaseComps/AthAlgTool.h" #include "StoreGate/WriteHandleKey.h" @@ -55,4 +55,4 @@ public: }; -#endif //> !DESICIONHANDLING_VIEWCREATORCENTREDONIPARTICLEROITOOL_H +#endif //> !DECISIONHANDLING_VIEWCREATORCENTREDONIPARTICLEROITOOL_H diff --git a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnJetWithPVConstraintROITool.h b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnJetWithPVConstraintROITool.h index da690591ae869a15eb5aaf05bd37a7a23983dfba..26b682152885d005b4332f1fe9195018dd806b14 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnJetWithPVConstraintROITool.h +++ b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorCentredOnJetWithPVConstraintROITool.h @@ -1,9 +1,9 @@ /* -Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ -#ifndef DESICIONHANDLING_VIEWCREATORCENTREDONJETWITHPVCONSTRAINTROITOOL_H -#define DESICIONHANDLING_VIEWCREATORCENTREDONJETWITHPVCONSTRAINTROITOOL_H +#ifndef DECISIONHANDLING_VIEWCREATORCENTREDONJETWITHPVCONSTRAINTROITOOL_H +#define DECISIONHANDLING_VIEWCREATORCENTREDONJETWITHPVCONSTRAINTROITOOL_H #include "AthenaBaseComps/AthAlgTool.h" #include "StoreGate/WriteHandleKey.h" @@ -62,4 +62,4 @@ public: }; -#endif //> !DESICIONHANDLING_VIEWCREATORCENTREDONJETWITHPVCONSTRAINTROITOOL_H +#endif //> !DECISIONHANDLING_VIEWCREATORCENTREDONJETWITHPVCONSTRAINTROITOOL_H diff --git a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFSROITool.cxx b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFSROITool.cxx index 96800ef2f92759a7711f21c684ad3ca94a9b8973..d80f2c3c727373cc85472e6f978454ddae130438 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFSROITool.cxx +++ b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFSROITool.cxx @@ -1,6 +1,6 @@ /* -Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #include "TrigSteeringEvent/TrigRoiDescriptorCollection.h" @@ -15,18 +15,29 @@ ViewCreatorFSROITool::ViewCreatorFSROITool(const std::string& type, const std::s StatusCode ViewCreatorFSROITool::initialize() { ATH_CHECK( m_roisWriteHandleKey.initialize() ); + + if ( !m_roiupdater.empty() ) ATH_CHECK( m_roiupdater.retrieve() ); + return StatusCode::SUCCESS; } StatusCode ViewCreatorFSROITool::attachROILinks(TrigCompositeUtils::DecisionContainer& decisions, const EventContext& ctx) const { + SG::WriteHandle roisWriteHandle = createAndStoreNoAux(m_roisWriteHandleKey, ctx); - roisWriteHandle->push_back( new TrigRoiDescriptor(true) ); - const ElementLink roiEL = ElementLink(*roisWriteHandle, /*index =*/ 0, ctx); + + if ( m_roiupdater.empty() ) { + roisWriteHandle->push_back( new TrigRoiDescriptor( RoiDescriptor::FULLSCAN ) ); + } + else { + roisWriteHandle->push_back( m_roiupdater->execute( ctx ) ); + } + + const ElementLink roiEL = ElementLink( *roisWriteHandle, /*index =*/ 0, ctx ); for ( Decision* outputDecision : decisions ) { - outputDecision->setObjectLink(roiString(), roiEL); + outputDecision->setObjectLink( roiString(), roiEL ); } - return StatusCode::SUCCESS; + return StatusCode::SUCCESS; } diff --git a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFSROITool.h b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFSROITool.h index 73396ecbd12e8daf27a9b4b74622c915ae09e6b0..288504f86ae5fe134fdda470cc3b20e89df1ec2f 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFSROITool.h +++ b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFSROITool.h @@ -1,5 +1,5 @@ /* -Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #ifndef DESICIONHANDLING_VIEWCREATORFSROITOOL_H @@ -8,6 +8,7 @@ Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration #include "AthenaBaseComps/AthAlgTool.h" #include "StoreGate/WriteHandleKey.h" #include "DecisionHandling/IViewCreatorROITool.h" +#include "HLTSeeding/IRoiUpdaterTool.h" #include "TrigSteeringEvent/TrigRoiDescriptorCollection.h" /** @@ -24,7 +25,7 @@ public: virtual ~ViewCreatorFSROITool() = default; - virtual StatusCode initialize() override; + virtual StatusCode initialize() override; /** * @brief Tool interface method. @@ -37,6 +38,8 @@ public: SG::WriteHandleKey< TrigRoiDescriptorCollection > m_roisWriteHandleKey {this,"RoisWriteHandleKey","", "Name of the ROI collection produced by this tool."}; + ToolHandle m_roiupdater { this, "RoiUpdater", "", "Roi Updater" }; + }; #endif //> !DESICIONHANDLING_VIEWCREATORFSROITOOL_H diff --git a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFetchFromViewROITool.h b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFetchFromViewROITool.h index a3ae58e43fb1859cce23545a3dd2e294c8c5fabc..9e2e48a56ff80be12caffdd83d2e268c40732188 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFetchFromViewROITool.h +++ b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorFetchFromViewROITool.h @@ -1,9 +1,9 @@ /* -Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ -#ifndef DESICIONHANDLING_VIEWCREATORFETCHFROMVIEWROITOOL_H -#define DESICIONHANDLING_VIEWCREATORFETCHFROMVIEWROITOOL_H +#ifndef DECISIONHANDLING_VIEWCREATORFETCHFROMVIEWROITOOL_H +#define DECISIONHANDLING_VIEWCREATORFETCHFROMVIEWROITOOL_H #include "AthenaBaseComps/AthAlgTool.h" #include "StoreGate/WriteHandleKey.h" @@ -49,4 +49,4 @@ public: std::string m_viewToFetchFromProbe; }; -#endif //> !DESICIONHANDLING_VIEWCREATORFETCHFROMVIEWROITOOL_H +#endif //> !DECISIONHANDLING_VIEWCREATORFETCHFROMVIEWROITOOL_H diff --git a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorInitialROITool.h b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorInitialROITool.h index 81f2e35843b09a25ddb3305d80d055286c7cb354..f56d74fdea948565f9fb8c079c6b7f9a7dea3838 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorInitialROITool.h +++ b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorInitialROITool.h @@ -1,13 +1,15 @@ /* -Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ -#ifndef DESICIONHANDLING_VIEWCREATORINITIALROITOOL_H -#define DESICIONHANDLING_VIEWCREATORINITIALROITOOL_H +#ifndef DECISIONHANDLING_VIEWCREATORINITIALROITOOL_H +#define DECISIONHANDLING_VIEWCREATORINITIALROITOOL_H #include "AthenaBaseComps/AthAlgTool.h" #include "DecisionHandling/IViewCreatorROITool.h" +#include "HLTSeeding/IRoiUpdaterTool.h" + /** * @class ViewCreatorInitialROITool * Basic ROI provider tool which retrieves and re-attaches an existing "initialRoI" ElementLink. @@ -30,6 +32,7 @@ public: **/ virtual StatusCode attachROILinks(TrigCompositeUtils::DecisionContainer& decisions, const EventContext& ctx) const override; + ToolHandle m_roiupdater { this, "RoiUpdater", "", "Roi Updater" }; }; -#endif //> !DESICIONHANDLING_VIEWCREATORINITIALROITOOL_H +#endif //> !DECISIONHANDLING_VIEWCREATORINITIALROITOOL_H diff --git a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorNamedROITool.h b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorNamedROITool.h index 1bc3c37da151255f3da9cb3ba730fef5b5732ddf..5432a592526f660c3d6cec092413c19be64ebf72 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorNamedROITool.h +++ b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorNamedROITool.h @@ -1,9 +1,9 @@ /* -Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ -#ifndef DESICIONHANDLING_VIEWCREATORNAMEDROITOOL_H -#define DESICIONHANDLING_VIEWCREATORNAMEDROITOOL_H +#ifndef DECISIONHANDLING_VIEWCREATORNAMEDROITOOL_H +#define DECISIONHANDLING_VIEWCREATORNAMEDROITOOL_H #include "AthenaBaseComps/AthAlgTool.h" #include "DecisionHandling/IViewCreatorROITool.h" @@ -32,4 +32,4 @@ public: }; -#endif //> !DESICIONHANDLING_VIEWCREATORNAMEDROITOOL_H +#endif //> !DECISIONHANDLING_VIEWCREATORNAMEDROITOOL_H diff --git a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorPreviousROITool.h b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorPreviousROITool.h index f1549e10a76301611abb2a94bfd0f5633aeb3b10..f0abe88affc7f3a33b1bd5b8d4ea95d43810404f 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorPreviousROITool.h +++ b/Trigger/TrigSteer/DecisionHandling/src/ViewCreatorPreviousROITool.h @@ -1,9 +1,9 @@ /* -Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ -#ifndef DESICIONHANDLING_VIEWCREATORPREVIOUSROITOOL_H -#define DESICIONHANDLING_VIEWCREATORPREVIOUSROITOOL_H +#ifndef DECISIONHANDLING_VIEWCREATORPREVIOUSROITOOL_H +#define DECISIONHANDLING_VIEWCREATORPREVIOUSROITOOL_H #include "AthenaBaseComps/AthAlgTool.h" #include "DecisionHandling/IViewCreatorROITool.h" @@ -37,4 +37,4 @@ public: }; -#endif //> !DESICIONHANDLING_VIEWCREATORPREVIOUSROITOOL_H +#endif //> !DECISIONHANDLING_VIEWCREATORPREVIOUSROITOOL_H diff --git a/Trigger/TrigSteer/HLTSeeding/CMakeLists.txt b/Trigger/TrigSteer/HLTSeeding/CMakeLists.txt index a0d857ddb2966acb1df0c3b5cf17dda9fd62aa6e..a0847761668c3c4b78b62bdd818c4a4849ba43b5 100644 --- a/Trigger/TrigSteer/HLTSeeding/CMakeLists.txt +++ b/Trigger/TrigSteer/HLTSeeding/CMakeLists.txt @@ -11,13 +11,13 @@ find_package( CLHEP ) atlas_add_library( HLTSeedingLib PUBLIC_HEADERS HLTSeeding INTERFACE - LINK_LIBRARIES AthenaBaseComps GaudiKernel StoreGateLib TrigCompositeUtilsLib TrigConfData ) + LINK_LIBRARIES AthenaBaseComps GaudiKernel StoreGateLib TrigCompositeUtilsLib TrigConfData BeamSpotConditionsData ) atlas_add_component( HLTSeeding src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel AthenaMonitoringKernelLib - GaudiKernel HLTSeedingLib L1TopoAlgorithms StoreGateLib TrigCompositeUtilsLib TrigConfxAODLib TrigCostMonitorLib + GaudiKernel L1TopoAlgorithms HLTSeedingLib StoreGateLib TrigCompositeUtilsLib TrigConfxAODLib TrigCostMonitorLib TrigSteeringEvent TrigT1Interfaces TrigT1Result TrigTimeAlgsLib xAODEventInfo xAODTrigger xAODCore ) # Install files from the package: diff --git a/Trigger/TrigSteer/HLTSeeding/HLTSeeding/IRoiUpdaterTool.h b/Trigger/TrigSteer/HLTSeeding/HLTSeeding/IRoiUpdaterTool.h new file mode 100644 index 0000000000000000000000000000000000000000..9dc1a3e851088bb8d4fde0cbe20544a10e6818e6 --- /dev/null +++ b/Trigger/TrigSteer/HLTSeeding/HLTSeeding/IRoiUpdaterTool.h @@ -0,0 +1,35 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef DECISIONHANDLING_IROIUPDATERTOOL_H +#define DECISIONHANDLING_IROIUPDATERTOOL_H + +#include + +#include "GaudiKernel/IAlgTool.h" +#include "Gaudi/Property.h" +#include "GaudiKernel/StatusCode.h" +#include "TrigSteeringEvent/TrigRoiDescriptor.h" + + + +/** + * @class IRoiUpdaterTool + **/ +class IRoiUpdaterTool : virtual public IAlgTool { + +public: + + DeclareInterfaceID(IRoiUpdaterTool, 1, 0); + + virtual ~IRoiUpdaterTool() = default; + + virtual std::unique_ptr execute( const IRoiDescriptor* roi, const EventContext& ctx) const = 0; + + virtual std::unique_ptr execute( const EventContext& ctx ) const = 0; + +}; + +#endif //> !DECISIONHANDLING_IROIUPDATERTOOL_H + diff --git a/Trigger/TrigSteer/HLTSeeding/python/HLTSeedingConfig.py b/Trigger/TrigSteer/HLTSeeding/python/HLTSeedingConfig.py index 30eb36820c84d40816f948327c555825d0a45eb2..ef1ef0b7dc5c69df739fc76c2fccef107530c01f 100644 --- a/Trigger/TrigSteer/HLTSeeding/python/HLTSeedingConfig.py +++ b/Trigger/TrigSteer/HLTSeeding/python/HLTSeedingConfig.py @@ -277,8 +277,12 @@ class HLTSeeding(CompFactory.HLTSeeding) : self.ctpUnpacker = ctpUnpacker from TrigEDMConfig.TriggerEDMRun3 import recordable + + # needs to be set up such that the Roiupdater is set to false by default + self.RoIBRoIUnpackers += [ CompFactory.FSRoIsUnpackingTool("FSRoIsUnpackingTool", + RoiUpdater=None, Decisions=mapThresholdToL1DecisionCollection("FSNOSEED"), OutputTrigRoIs = recordable(mapThresholdToL1RoICollection("FSNOSEED") )) ] # EM unpacker diff --git a/Trigger/TrigSteer/HLTSeeding/src/FSRoIsUnpackingTool.cxx b/Trigger/TrigSteer/HLTSeeding/src/FSRoIsUnpackingTool.cxx index 3aa7ff929c7662d98b73d42759ec691faf9f0443..f83febc075a0d05341f42e3e503b29cfb371a21d 100644 --- a/Trigger/TrigSteer/HLTSeeding/src/FSRoIsUnpackingTool.cxx +++ b/Trigger/TrigSteer/HLTSeeding/src/FSRoIsUnpackingTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #include "FSRoIsUnpackingTool.h" @@ -9,7 +9,8 @@ FSRoIsUnpackingTool::FSRoIsUnpackingTool(const std::string& type, const std::string& name, const IInterface* parent) - : RoIsUnpackingToolBase(type, name, parent) {} + : RoIsUnpackingToolBase(type, name, parent) { +} StatusCode FSRoIsUnpackingTool::initialize() { @@ -29,6 +30,9 @@ StatusCode FSRoIsUnpackingTool::start() { m_allFSChains.insert( thresholdToChain.second.begin(), thresholdToChain.second.end() ); } + /// shouldn;t this be protected by an output level check ? + /// hopefully the optimisation will remove the loop if the + /// ATH_MSG_DEBUG gets compiled out for ( auto id: m_allFSChains ) { ATH_MSG_DEBUG( "FS Chain " << id ); } @@ -61,7 +65,13 @@ StatusCode FSRoIsUnpackingTool::unpack(const EventContext& ctx, auto roiHandle = SG::makeHandle( m_trigRoIsKey, ctx ); ATH_CHECK(roiHandle.record( std::make_unique() )); - roiHandle->push_back( std::make_unique(true) ); // true == FS + /// + if ( !m_roiupdater.empty() ) { + roiHandle->push_back( m_roiupdater->execute(ctx) ); + } + else { + roiHandle->push_back( std::make_unique( RoiDescriptor::FULLSCAN ) ); + } ATH_MSG_DEBUG("Linking to FS RoI descriptor"); decision->setObjectLink( initialRoIString(), ElementLink( m_trigRoIsKey.key(), 0 ) ); diff --git a/Trigger/TrigSteer/HLTSeeding/src/RoIsUnpackingToolBase.cxx b/Trigger/TrigSteer/HLTSeeding/src/RoIsUnpackingToolBase.cxx index 215570a4a41721fa06ba2610c50f7b02af455e79..b74a8dba84eaaaa0f979fd745ecfc6daf2d380b4 100644 --- a/Trigger/TrigSteer/HLTSeeding/src/RoIsUnpackingToolBase.cxx +++ b/Trigger/TrigSteer/HLTSeeding/src/RoIsUnpackingToolBase.cxx @@ -14,7 +14,12 @@ RoIsUnpackingToolBase::RoIsUnpackingToolBase(const std::string& type, StatusCode RoIsUnpackingToolBase::initialize() { - if ( !m_monTool.empty() ) {ATH_CHECK( m_monTool.retrieve() );} + + if ( !m_monTool.empty() ) ATH_CHECK( m_monTool.retrieve() ); + /// should this really be here if it is only accessed in + /// derived classes ? + if ( !m_roiupdater.empty() ) ATH_CHECK( m_roiupdater.retrieve() ); + ATH_CHECK( m_decisionsKey.initialize() ); ATH_CHECK( m_decisionsKeyProbe.initialize(SG::AllowEmpty) ); ATH_CHECK( m_trigRoIsKey.initialize(SG::AllowEmpty) ); diff --git a/Trigger/TrigSteer/HLTSeeding/src/RoIsUnpackingToolBase.h b/Trigger/TrigSteer/HLTSeeding/src/RoIsUnpackingToolBase.h index d6550ea948a1952fd04178a3d6b6b9c90f3ffa6b..0c81e025d5f325859159221df6639fdcfbeea595 100644 --- a/Trigger/TrigSteer/HLTSeeding/src/RoIsUnpackingToolBase.h +++ b/Trigger/TrigSteer/HLTSeeding/src/RoIsUnpackingToolBase.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #ifndef HLTSEEDING_ROISUNPACKINGTOOLBASE_H #define HLTSEEDING_ROISUNPACKINGTOOLBASE_H @@ -16,6 +16,9 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "AthenaMonitoringKernel/GenericMonitoringTool.h" +#include "HLTSeeding/IRoiUpdaterTool.h" + + namespace ROIB { class RoIBResult; } @@ -61,8 +64,8 @@ protected: this, "HLTTriggerMenu", "DetectorStore+HLTTriggerMenu", "Name of the HLTMenu object to read configuration from"}; /// @} - ToolHandle m_monTool{ - this, "MonTool", "", "Monitoring tool"}; + ToolHandle m_monTool{ this, "MonTool", "", "Monitoring tool" }; + ToolHandle m_roiupdater{ this, "RoiUpdater", "", "Roi Updater" }; std::map m_thresholdToChainMapping; std::map m_legToChainMapping; diff --git a/Trigger/TrigSteer/HLTSeeding/src/RoiUpdaterTool.cxx b/Trigger/TrigSteer/HLTSeeding/src/RoiUpdaterTool.cxx new file mode 100644 index 0000000000000000000000000000000000000000..c7118b7212f03fb93938b6a5e98f15e39e9270b5 --- /dev/null +++ b/Trigger/TrigSteer/HLTSeeding/src/RoiUpdaterTool.cxx @@ -0,0 +1,127 @@ + +/* +Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration +*/ + +#include "TrigSteeringEvent/TrigRoiDescriptorCollection.h" +#include "RoiUpdaterTool.h" + + + +RoiUpdaterTool::RoiUpdaterTool(const std::string& type, const std::string& name, const IInterface* parent) + : base_class(type, name, parent), m_update(false) +{} + + + +StatusCode RoiUpdaterTool::initialize() { + + ATH_MSG_DEBUG("initialize()"); + + if ( m_etaWidth!=-999 || m_phiWidth!=-999 || m_zedWidth!=-999 ) m_update = true; + + if ( m_useBeamspot ) { + m_update = true; + ATH_CHECK( m_beamspotKey.initialize( m_useBeamspot ) ); + } + + return StatusCode::SUCCESS; +} + + + +void zrange( double nsigma, double fence, double& zed, double& zedMinus, double& zedPlus, const SG::ReadCondHandleKey& bs, const EventContext& ctx ) { + + SG::ReadCondHandle beamSpotHandle( bs, ctx ); + + uint32_t bitmap = beamSpotHandle->beamStatus(); + + /// 0x4 is the online flag - 0x7 is presumably converged online + if ( ( (bitmap & 0x7) == 0x7 ) || !(bitmap & 0x4) ) { + double zsigma = beamSpotHandle->beamSigma(2); + double zpos = beamSpotHandle->beamPos()[2]; + + zed = zpos; /// technically, updating the z position itself should not be needed + zedMinus = zpos - nsigma*zsigma - fence; + zedPlus = zpos + nsigma*zsigma + fence; + } + else { + zedMinus = -RoiDescriptor::zedWidthDefault(); + zedPlus = RoiDescriptor::zedWidthDefault(); + } + +} + + + + +std::unique_ptr RoiUpdaterTool::execute( const EventContext& ctx ) const { + /// create initial dummy FS Roi here - used to define the new Roi and is then discarded + RoiDescriptor troi( RoiDescriptor::FULLSCAN ); + return execute( &troi, ctx ); +} + + +std::unique_ptr RoiUpdaterTool::execute( const IRoiDescriptor* iroi, const EventContext& ctx ) const { + + ATH_MSG_DEBUG( "execute()" ); + + /// if we don't want to update, why are we even including trhe RoiUIpdater ??? + /// will return a unique_ptr - if that causes issues down the line, so be it + if ( !m_update ) return std::make_unique( *iroi ); + + /// should not update a composite Roi - or do we want the constituents updated ??? + /// or what ??? Return a copy ? Who will own this stuff ?? + /// why are you calling the updater on a composite Roi in any case ? + /// will return a unique_ptr - if that causes issues down the line, so be it + if ( iroi->composite() ) { + ATH_MSG_WARNING( "Will not update composite Roi parameters: " << *iroi ); + return std::make_unique( *iroi ); + } + + double eta = iroi->eta(); + double etaMinus = iroi->etaMinus(); + double etaPlus = iroi->etaPlus(); + + double phi = iroi->phi(); + double phiMinus = iroi->phiMinus(); + double phiPlus = iroi->phiPlus(); + + double zed = iroi->zed(); + double zedMinus = iroi->zedMinus(); + double zedPlus = iroi->zedPlus(); + + if ( m_etaWidth!=-999 ) { + etaMinus = eta - m_etaWidth; + etaPlus = eta + m_etaWidth; + } + + if ( m_phiWidth!=-999 ) { + /// NB: the correct mapping of phi to the range -M_PIF < phi < M_PIF is + /// done in the RoiDescriptor constuctor so we don't bother here + phiMinus = phi - m_phiWidth; + phiPlus = phi + m_phiWidth; + } + + if ( m_zedWidth!=-999 ) { + zedMinus = zed - m_zedWidth; + zedPlus = zed + m_zedWidth; + } + + /// do *not* prevent the beamspot from *increasing* the size of the Roi + if ( m_useBeamspot ) zrange( m_nsigma, m_fence, zed, zedMinus, zedPlus, m_beamspotKey, ctx ); + + /// limit to old range - no point going well outside the interaction region + if ( zedMinus<-RoiDescriptor::zedWidthDefault() ) zedMinus = -RoiDescriptor::zedWidthDefault(); + if ( zedPlus> RoiDescriptor::zedWidthDefault() ) zedPlus = RoiDescriptor::zedWidthDefault(); + + /// don't use an actual fullscan Roi, since the parameters have been changed so may not actually + /// include all detector elements - the FS flag, prevents the RegionSelector from actually testing + /// the detector element containment, so could create a "fullscan" Roi with only a small number of + /// detector elements. If you want genuine FS behaviour for the RS, use an FS Roi. If you want + /// a restricted Roi for non RS use, even if it is FS for a specific subdetector, use a restricted + /// Roi + return std::make_unique( eta, etaMinus, etaPlus, phi, phiMinus, phiPlus, zed, zedMinus, zedPlus ); + +} + diff --git a/Trigger/TrigSteer/HLTSeeding/src/RoiUpdaterTool.h b/Trigger/TrigSteer/HLTSeeding/src/RoiUpdaterTool.h new file mode 100644 index 0000000000000000000000000000000000000000..344aa366227b4c427d5edeff28b3c6e2231c3163 --- /dev/null +++ b/Trigger/TrigSteer/HLTSeeding/src/RoiUpdaterTool.h @@ -0,0 +1,55 @@ +/* +Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef DECISIONHANDLING_ROIUPDATERTOOL_H +#define DECISIONHANDLING_ROIUPDATERTOOL_H + +#include "AthenaBaseComps/AthAlgTool.h" + +#include "TrigSteeringEvent/TrigRoiDescriptorCollection.h" +#include "BeamSpotConditionsData/BeamSpotData.h" +#include "StoreGate/ReadCondHandleKey.h" +#include "HLTSeeding/IRoiUpdaterTool.h" + +/** + * @class RoiUpdaterTool + * Tool to create a new RoiDescriptor from an existing input5 RoiDescriptor + * + + **/ +class RoiUpdaterTool: public extends +{ +public: + + RoiUpdaterTool(const std::string& type, const std::string& name, const IInterface* parent); + + virtual ~RoiUpdaterTool() = default; + + virtual StatusCode initialize() override; + + std::unique_ptr execute( const EventContext& ctx ) const override; + + std::unique_ptr execute( const IRoiDescriptor* iroi, const EventContext& ctx ) const override; + + /// whether to update the RoiDescritor or not - determiuned from whether any of + /// update parameters are set + bool m_update; + + /** + * don't want these parameters used if not set + **/ + Gaudi::Property m_etaWidth { this, "EtaWidth", -999, "FS Roi eta half width" }; + Gaudi::Property m_phiWidth { this, "PhiWidth", -999, "FS Roi phi half width" }; + Gaudi::Property m_zedWidth { this, "ZedWidth", -999, "FS Roi zed half width" }; + + Gaudi::Property m_useBeamspot { this, "useBeamSpot", false, "use beamspot for zed width" }; + /// default settings - should be retuned with data + Gaudi::Property m_nsigma { this, "NSigma", 3, "width (in simga) for the beamspot Roi width" }; + Gaudi::Property m_fence { this, "Fance", 10, "fence width for the beamspot Roi width" }; /// do we need an mm unit here ? + + SG::ReadCondHandleKey m_beamspotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" }; + +}; + +#endif //> !DECISIONHANDLING_ROIUPDATERTOOL_H diff --git a/Trigger/TrigSteer/HLTSeeding/src/components/HLTSeeding_entries.cxx b/Trigger/TrigSteer/HLTSeeding/src/components/HLTSeeding_entries.cxx index 8a4573cc0abce9fa58531091ee2c06856a3d7c28..08169851a450bac53f410e40ec6d5a3c0b40c477 100644 --- a/Trigger/TrigSteer/HLTSeeding/src/components/HLTSeeding_entries.cxx +++ b/Trigger/TrigSteer/HLTSeeding/src/components/HLTSeeding_entries.cxx @@ -25,6 +25,8 @@ #include "../L1TriggerResultMaker.h" #include "../L1DataConsistencyChecker.h" +#include "../RoiUpdaterTool.h" + // Algorithms DECLARE_COMPONENT( HLTSeeding ) DECLARE_COMPONENT( HLTSeedingNoCtpForTesting ) @@ -72,3 +74,5 @@ DECLARE_COMPONENT( RoIsUnpackingToolBase ) DECLARE_COMPONENT( RoIsUnpackingEmulationTool ) DECLARE_COMPONENT( FSRoIsUnpackingTool ) DECLARE_COMPONENT( L1DataConsistencyChecker ) + +DECLARE_COMPONENT( RoiUpdaterTool ) diff --git a/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/L1CaloFEXSim/jFEXPileupAndNoise.h b/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/L1CaloFEXSim/jFEXPileupAndNoise.h index 2594992f80baba53adae5bb0fb8876515d22126f..4c7aca00b98cd7a146ea10f9c58c82c5181810ee 100644 --- a/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/L1CaloFEXSim/jFEXPileupAndNoise.h +++ b/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/L1CaloFEXSim/jFEXPileupAndNoise.h @@ -105,8 +105,8 @@ protected: //Noise values applied // It should be 0 GeV and 1 GeV in firmware LSB scale (bitwise is using MeV right now, CHANGE IF NEEDED!) - int m_et_low = 0; - int m_et_high = 1000.; + int m_et_low = 100; + int m_et_high = 1000; std::unordered_map > m_map_Etvalues_EM; diff --git a/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/src/jFEXPileupAndNoise.cxx b/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/src/jFEXPileupAndNoise.cxx index 1675f78c829598c433924ed5d6f7c35f179ecb7b..76ca69291a16494ae7997e31550cc2d6ef854d6c 100644 --- a/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/src/jFEXPileupAndNoise.cxx +++ b/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/src/jFEXPileupAndNoise.cxx @@ -474,15 +474,18 @@ std::unordered_map > LVL1::jFEXPileupAndNoise::Get_HAD_Et_v return m_map_Etvalues_HAD; } -void LVL1::jFEXPileupAndNoise::ApplyNoiseCuts(std::unordered_map > & map_Etvalues,int layer ){ +void LVL1::jFEXPileupAndNoise::ApplyNoiseCuts(std::unordered_map > & map_Etvalues,int /*layer*/ ){ - const LVL1::jTower *tmpTower; + //const LVL1::jTower *tmpTower; for(auto [key,vec] : map_Etvalues){ - tmpTower = m_jTowerContainer->findTower(key); - float Jet_NoiseCut = tmpTower->getNoiseForJet(layer); - float Met_NoiseCut = tmpTower->getNoiseForMet(layer); + // - for now commented until agreement with performance group - + //tmpTower = m_jTowerContainer->findTower(key); + //float Jet_NoiseCut = tmpTower->getNoiseForJet(layer); + //float Met_NoiseCut = tmpTower->getNoiseForMet(layer); + int Jet_NoiseCut = 0; + int Met_NoiseCut = 0; if(m_apply_noise2jets && map_Etvalues[key][0]= sizeof(T) * 8) return ~static_cast(0); - return (static_cast(1) << n) - 1ul; + return (static_cast(1) << n) - 1ull; } namespace TSU { @@ -61,7 +61,7 @@ namespace TSU { } L1TopoDataTypes(double d) : m_tvalue(d) { - m_tvalue = d*(1ul<> (PREC-1ul); + T mask = m_tvalue >> (PREC-1ull); T res = ((mask ^ m_tvalue) - mask) & ones(PREC); return res; } @@ -112,7 +112,7 @@ namespace TSU { T res=0; T v = m_tvalue; for(unsigned j=0;j> (PREC-1ul)) ? 1 : 0; + short int neg = (m_tvalue >> (PREC-1ull)) ? 1 : 0; if(neg && factor<0){ neg = 0; m_tvalue = this->complement() * ::abs(factor); @@ -183,7 +183,7 @@ namespace TSU { friend std::ostream& operator<<(std::ostream& os, const L1TopoDataTypes& d){ std::string out; for(int j=PREC-1;j>=0;--j){ - out += ((d.m_tvalue>>j)&1ul) ? "1" : "0"; + out += ((d.m_tvalue>>j)&1ull) ? "1" : "0"; } os << "integer value " << d.m_tvalue << " binary " << out << " float " << d.to_float(); return os; @@ -192,14 +192,14 @@ namespace TSU { // return float representation float to_float() const { // Find sign - float res = ((m_tvalue>>(PREC-1ul))&1ul) ? -(1ul<<(PREC-F)) : 0.; + float res = ((m_tvalue>>(PREC-1ull))&1ull) ? -(1ll<<(PREC-F)) : 0.; // Get integer part - res += (m_tvalue>>F)&((1ul<<(PREC-F))-1ul) ? float((m_tvalue>>F)&((1ul<<(PREC-F))-1ul)) : 0; + res += (m_tvalue>>F)&((1ull<<(PREC-F))-1ull) ? float((m_tvalue>>F)&((1ull<<(PREC-F))-1ull)) : 0; // Do the fractional part if (F > 0) { - unsigned frac = m_tvalue & ( (1ul<(frac) / (2ul<<(F-1ul)); + res += static_cast(frac) / (2ull<<(F-1ull)); } return res; } @@ -289,10 +289,10 @@ namespace TSU { T lhsconvert = lhs.m_tvalue; T rhsconvert = rhs.m_tvalue; // check if either value is negative and work with the absolute value - if((lhs.m_tvalue >> (P1-1ul)) & 1ul){ + if((lhs.m_tvalue >> (P1-1ull)) & 1ull){ lhsconvert = complement(lhsconvert,P1); } - if((rhs.m_tvalue >> (P2-1ul)) & 1ul){ + if((rhs.m_tvalue >> (P2-1ull)) & 1ull){ rhsconvert = complement(rhsconvert,P2); } // map numbers into Q1+digit.frac @@ -308,7 +308,7 @@ namespace TSU { result += (prod_frac>>(F1+F2-frac)); result += (prod_mix1>>((F2>frac ? F2 - frac : 0))); result += (prod_mix2>>((F1>frac ? F1 - frac : 0))); - if(!(((lhs.m_tvalue >> (P1-1ul)) & 1ul) ^ ((rhs.m_tvalue >> (P2-1ul)) & 1ul))){ + if(!(((lhs.m_tvalue >> (P1-1ull)) & 1ull) ^ ((rhs.m_tvalue >> (P2-1ull)) & 1ull))){ return result; } else return -result; diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/Root/Kinematics.cxx b/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/Root/Kinematics.cxx index 663cfb6e146feb4cef031d71f6f31924994de52a..79914354bf5f2c5cb32142798326747d506383d3 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/Root/Kinematics.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/Root/Kinematics.cxx @@ -174,8 +174,8 @@ unsigned long TSU::Kinematics::quadraticSumBW(int i1, int i2){ unsigned int TSU::Kinematics::calcXi1(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { double scale = 1.4; // this will be converted MeV and unsigned when unit is right double shift = 20; // this will be converted MeV and unsigned when unit is right - TSU::L1TopoDataTypes<11,0> bit_Et1(static_cast(scale*tob1->Et()+shift)); - TSU::L1TopoDataTypes<11,0> bit_Et2(static_cast(scale*tob2->Et()+shift)); + TSU::L1TopoDataTypes<15,0> bit_Et1(static_cast(scale*tob1->Et()+shift)); + TSU::L1TopoDataTypes<15,0> bit_Et2(static_cast(scale*tob2->Et()+shift)); auto bit_eeta1 = TSU::L1TopoDataTypes<20,10>(TSU::Expo::E.at(tob1->eta())); auto bit_eeta2 = TSU::L1TopoDataTypes<20,10>(TSU::Expo::E.at(tob2->eta())); @@ -187,8 +187,8 @@ unsigned int TSU::Kinematics::calcXi1(const TCS::GenericTOB* tob1, const TCS::Ge unsigned int TSU::Kinematics::calcXi2(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { double scale = 1.4; // this will be converted MeV and unsigned when unit is right double shift = 20; // this will be converted MeV and unsigned when unit is right - TSU::L1TopoDataTypes<11,0> bit_Et1(static_cast(scale*tob1->Et()+shift)); - TSU::L1TopoDataTypes<11,0> bit_Et2(static_cast(scale*tob2->Et()+shift)); + TSU::L1TopoDataTypes<15,0> bit_Et1(static_cast(scale*tob1->Et()+shift)); + TSU::L1TopoDataTypes<15,0> bit_Et2(static_cast(scale*tob2->Et()+shift)); auto bit_eeta1 = TSU::L1TopoDataTypes<20,10>(TSU::Expo::E.at(-tob1->eta())); auto bit_eeta2 = TSU::L1TopoDataTypes<20,10>(TSU::Expo::E.at(-tob2->eta())); diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/Root/L1TopoDataTypes.cxx b/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/Root/L1TopoDataTypes.cxx index 60d1596c3bd9018fbd9a7ecc924066711aef1051..23391404be99051c60e0b9d73654736bda076ffa 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/Root/L1TopoDataTypes.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/Root/L1TopoDataTypes.cxx @@ -18,7 +18,7 @@ using namespace TSU; TSU::T TSU::complement(const T& v, const unsigned int& p) { T res=0; for(unsigned int j=0;j> (in_p-1ul)) & 1ul){ origval = complement(v,in_p); } - T valint = ((origval >> in_f) & ~(1ul<<(in_p-in_f-1ul))) & ((1ul<<(in_p-in_f-1))-1ul); - T mantissa = (new_f > in_f) ? ((origval & ((1ul<>(in_f-new_f)); + if((v >> (in_p-1ull)) & 1ull){ origval = complement(v,in_p); } + T valint = ((origval >> in_f) & ~(1ull<<(in_p-in_f-1ull))) & ((1ull<<(in_p-in_f-1))-1ull); + T mantissa = (new_f > in_f) ? ((origval & ((1ull<>(in_f-new_f)); if(!new_f) {mantissa = 0;} T out_val = ((valint << new_f) | mantissa); if(new_f+1==new_p) out_val = mantissa; - if((v >> (in_p-1ul)) & 1ul){ // Check if original m_tvalue had sign bit set + if((v >> (in_p-1ull)) & 1ull){ // Check if original m_tvalue had sign bit set out_val = complement(out_val,new_f+(new_p-new_f-1)+1); } return out_val; @@ -43,8 +43,8 @@ std::string TSU::to_binary(T b, const unsigned int& p){ std::string pat(p,'0'); unsigned int idx = p-1; while(b){ - pat[idx] = (b & 1ul) ? '1' : '0'; - b = b >> 1ul; + pat[idx] = (b & 1ull) ? '1' : '0'; + b = b >> 1ull; --idx; } return pat; @@ -52,12 +52,12 @@ std::string TSU::to_binary(T b, const unsigned int& p){ float TSU::to_float(const T& value, const unsigned int& m, const unsigned int& n){ // Find sign - float res = ((value>>(m-1ul))&1ul) ? -(1ul<<(m-n)) : 0.; + float res = ((value>>(m-1ull))&1ull) ? -(1ll<<(m-n)) : 0.; // Get integer part - res += (value>>n)&((1ul<<(m-n))-1ul) ? float((value>>n)&((1ul<<(m-n))-1ul)) : 0; + res += (value>>n)&((1ull<<(m-n))-1ull) ? float((value>>n)&((1ull<<(m-n))-1ull)) : 0; // Do the fractional part for(unsigned int j=0;j /dev/null' ) os.system( 'get_files -data TIDAdata-run3-fslrt.dat &> /dev/null' ) os.system( 'get_files -data TIDAdata-run3-minbias.dat &> /dev/null' ) - os.system( 'get_files -data TIDAdata-run3-TnP.dat &> /dev/null' ) os.system( 'get_files -data TIDAdata_cuts.dat &> /dev/null' ) os.system( 'get_files -data TIDAdata-run3-offline.dat &> /dev/null' ) os.system( 'get_files -data TIDAdata-run3-offline-rzMatcher.dat &> /dev/null' ) @@ -311,7 +310,6 @@ class TrigInDetRdictStep(Step): os.system( 'get_files -data TIDAdata-run3-offline-fslrt.dat &> /dev/null' ) os.system( 'get_files -data TIDAdata-run3-offline-vtx.dat &> /dev/null' ) os.system( 'get_files -data TIDAdata-run3-minbias-offline.dat &> /dev/null' ) - os.system( 'get_files -data TIDAdata-run3-offline-TnP.dat &> /dev/null' ) os.system( 'get_files -data TIDAdata-run3-offline-cosmic.dat &> /dev/null' ) os.system( 'get_files -data TIDAdata_cuts-offline.dat &> /dev/null' ) os.system( 'get_files -data TIDAdata-chains-run3.dat &> /dev/null' ) diff --git a/Trigger/TrigValidation/TrigInDetValidation/share/TIDAlrt_preinclude.py b/Trigger/TrigValidation/TrigInDetValidation/share/TIDAlrt_preinclude.py index e78c52f3b19a5631e6fa9c4b63bd9aa7b4444017..fcb6b286d18d5cfa5d569a19f7764df3501e5835 100644 --- a/Trigger/TrigValidation/TrigInDetValidation/share/TIDAlrt_preinclude.py +++ b/Trigger/TrigValidation/TrigInDetValidation/share/TIDAlrt_preinclude.py @@ -8,4 +8,6 @@ from InDetRecExample.InDetJobProperties import InDetFlags InDetFlags.doR3LargeD0.set_Value_and_Lock(True) InDetFlags.storeSeparateLargeD0Container.set_Value_and_Lock(False) - +#ATR-25582 - FSLRT is now excluded from the default dev menu so need to change to the full dev menu rather than the filtered versions +from AthenaConfiguration.AllConfigFlags import ConfigFlags +ConfigFlags.Trigger.triggerMenuSetup='Dev_pp_run3_v1' diff --git a/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_AODtoTrkNtuple.py b/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_AODtoTrkNtuple.py index 3ea0291acd6a86d2ea60640bee38f1f1bd58611a..565c265f339de70b599e5bbb37714e1697264ae7 100644 --- a/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_AODtoTrkNtuple.py +++ b/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_AODtoTrkNtuple.py @@ -222,11 +222,14 @@ if ( True ) : "HLT_e30_lhloose_nopix_lrtmedium_probe_g25_medium_L1EM20VH:HLT_IDTrack_ElecLRT_IDTrig:roi=HLT_Roi_FastElectron_LRT:te=0", # double electron chains for tag and probe analysis - "HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI:key=HLT_IDTrack_Electron_FTF:roi=HLT_Roi_FastElectron:te=0", - "HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI:key=HLT_IDTrack_Electron_FTF:roi=HLT_Roi_FastElectron:te=1", + "HLT_e26_lhtight_e14_etcut_idperf_nogsf_probe_50invmAB130_L1EM22VHI:key=HLT_IDTrack_Electron_FTF:extra=el_tag:roi=HLT_Roi_FastElectron:te=0", + "HLT_e26_lhtight_e14_etcut_idperf_nogsf_probe_50invmAB130_L1EM22VHI:key=HLT_IDTrack_Electron_FTF:extra=el_probe:roi=HLT_Roi_FastElectron:te=1", - "HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI:key=HLT_IDTrack_Electron_IDTrig:te=0", - "HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI:key=HLT_IDTrack_Electron_IDTrig:te=1", + "HLT_e26_lhtight_e14_etcut_idperf_nogsf_probe_50invmAB130_L1EM22VHI:key=HLT_IDTrack_Electron_IDTrig:extra=el_tag:te=0", + "HLT_e26_lhtight_e14_etcut_idperf_nogsf_probe_50invmAB130_L1EM22VHI:key=HLT_IDTrack_Electron_IDTrig:extra=el_probe:te=1", + + "HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI:key=HLT_IDTrack_Electron_GSF:extra=el_tag:te=0", + "HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI:key=HLT_IDTrack_Electron_GSF:extra=el_probe:te=1", # two stage tau FTF "HLT_tau.*_idperf.*tracktwo.*:HLT_IDTrack_TauCore_FTF:roi=HLT_Roi_TauCore", diff --git a/Trigger/TrigValidation/TrigInDetValidation/share/comparitor.json b/Trigger/TrigValidation/TrigInDetValidation/share/comparitor.json index 153b5cedeeb67a015ac2086da4548b1b4e1502bd..21bc11467d3276904dd435b581f52580861c04da 100644 --- a/Trigger/TrigValidation/TrigInDetValidation/share/comparitor.json +++ b/Trigger/TrigValidation/TrigInDetValidation/share/comparitor.json @@ -85,16 +85,16 @@ "chains" : "HLT_2mu4_bBmumux_BsmumuPhi_L12MU3V:HLT_IDTrack_Bmumux_FTF HLT_2mu4_bBmumux_BsmumuPhi_L12MU3V:HLT_IDTrack_Bmumux_IDTrig" }, "L2electronTnP":{ - "chains" : "HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI:HLT_IDTrack_Electron_FTF:HLT_Roi_FastElectron:1" + "chains" : "HLT_e26_lhtight_e14_etcut_idperf_nogsf_probe_50invmAB130_L1EM22VHI_HLT_IDTrack_Electron_FTF_HLT_Roi_FastElectron_1_el_probe" }, "EFelectronTnP":{ - "chains" : "HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI:HLT_IDTrack_Electron_FTF:HLT_Roi_FastElectron:1 HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI:HLT_IDTrack_Electron_IDTrig:1" + "chains" : "HLT_e26_lhtight_e14_etcut_idperf_nogsf_probe_50invmAB130_L1EM22VHI_HLT_IDTrack_Electron_FTF_HLT_Roi_FastElectron_1_el_probe HLT_e26_lhtight_e14_etcut_idperf_nogsf_probe_50invmAB130_L1EM22VHI_HLT_IDTrack_Electron_IDTrig_1_el_probe HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI_HLT_IDTrack_Electron_GSF_1_el_probe" }, "L2electronTier0TnP":{ - "chains" : "HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI:HLT_IDTrack_Electron_FTF:el1_probe:HLT_Roi_FastElectron:1 HLT_e26_lhtight_e14_etcut_idperf_gsf_probe_50invmAB130_L1EM22VHI:HLT_IDTrack_Electron_FTF:el2_probe:HLT_Roi_FastElectron:1" + "chains" : "HLT_e26_lhtight_e14_etcut_idperf_nogsf_probe_50invmAB130_L1EM22VHI:HLT_IDTrack_Electron_FTF:el_probe:HLT_Roi_FastElectron:1" }, "EFelectronTier0TnP":{ - "chains" : "HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI:HLT_IDTrack_Electron_FTF:el1_probe:HLT_Roi_FastElectron:1 HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI:HLT_IDTrack_Electron_IDTrig:el1_probe:HLT_Roi_FastElectron:1 HLT_e26_lhtight_e14_etcut_idperf_gsf_probe_50invmAB130_L1EM22VHI:HLT_IDTrack_Electron_IDTrig:el2_probe:HLT_Roi_FastElectron:1" + "chains" : "HLT_e26_lhtight_e14_etcut_idperf_nogsf_probe_50invmAB130_L1EM22VHI:HLT_IDTrack_Electron_FTF:el_probe:HLT_Roi_FastElectron:1 HLT_e26_lhtight_e14_etcut_idperf_nogsf_probe_50invmAB130_L1EM22VHI:HLT_IDTrack_Electron_IDTrig:el_probe:1 HLT_e26_lhtight_e14_etcut_idperf_probe_50invmAB130_L1EM22VHI:HLT_IDTrack_Electron_GSF:el_probe:1" }, "EFcosmic":{ "chains" : "HLT_mu4_cosmic_L1MU3V_EMPTY:HLT_IDTrack_Cosmic_IDTrig" diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_TnP.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_TnP.py index 49e0b903bd132f9cd794e8929dd290da0b4afa72..7b62769a2dd65c3eb3751c3a8ecbd1f100a19ca5 100755 --- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_TnP.py +++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_pu40_TnP.py @@ -37,13 +37,13 @@ Release = "current" GridFiles = True preinclude_file = 'all:TrigInDetValidation/TIDV_cond_fix.py' #conditions fix for ATR-23982. In future find a more recent RDO -Jobs = [( "Truth", " TIDAdata-run3-TnP.dat -o data-hists.root -p 11" ), - ( "Offline", " TIDAdata-run3-offline-TnP.dat -r Offline -o data-hists-offline.root" )] +Jobs = [( "Truth", " TIDAdata-run3.dat -o data-hists.root -p 11" ), + ( "Offline", " TIDAdata-run3-offline.dat -r Offline -o data-hists-offline.root" )] -Comp = [( "L2ele", "L2electronTnP", "data-hists.root", " -c TIDAhisto-panel.dat -d HLTL2-plots " ), - ( "L2eleoffline", "L2electronTnP", "data-hists-offline.root", " -c TIDAhisto-panel.dat -d HLTL2-plots-offline " ), - ( "EFele", "EFelectronTnP", "data-hists.root", " -c TIDAhisto-panel.dat -d HLTEF-plots " ), - ( "EFeleoffline", "EFelectronTnP", "data-hists-offline.root", " -c TIDAhisto-panel.dat -d HLTEF-plots-offline " ) ] +Comp = [( "L2ele", "L2electronTnP", "data-hists.root", " -c TIDAhisto-panel-TnP.dat -l e26_e14_etcut_idperf_50invmAB130_FTF_FE_1 -d HLTL2-plots " ), + ( "L2eleoffline", "L2electronTnP", "data-hists-offline.root", " -c TIDAhisto-panel-TnP.dat -l e26_e14_etcut_idperf_50invmAB130_FTF_FE_1 -d HLTL2-plots-offline " ), + ( "EFele", "EFelectronTnP", "data-hists.root", " -c TIDAhisto-panel-TnP.dat -l e26_e14_etcut_nogsf_idperf_50invmAB130_FTF_FE_1 e26_e14_etcut_nogsf_idperf_50invmAB130_IDTrig_1 e26_e14_etcut_idperf_50invmAB130_GSF_1 -d HLTEF-plots " ), + ( "EFeleoffline", "EFelectronTnP", "data-hists-offline.root", " -c TIDAhisto-panel-TnP.dat -l e26_e14_etcut_nogsf_idperf_50invmAB130_FTF_FE_1 e26_e14_etcut_nogsf_idperf_50invmAB130_IDTrig_1 e26_e14_etcut_idperf_50invmAB130_GSF_1 -d HLTEF-plots-offline " ) ] diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_tier0_pu40_TnP.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_tier0_pu40_TnP.py index 235c6974640bf22f9a964cf3d681193c3deb1ef9..e6447ce81339ba3697151bea59a23d40f1683812 100755 --- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_tier0_pu40_TnP.py +++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_el_zee_tier0_pu40_TnP.py @@ -39,8 +39,8 @@ preinclude_file = 'all:TrigInDetValidation/TIDV_cond_fix.py' #conditions fix for Jobs = [] -Comp = [ ( "L2electron", "L2electronTier0TnP", "data-hists-tier0.root", " -b HLT/TRIDT/Egamma/Expert -s '_HLT_IDTrack' '/HLT_IDTrack' -c TIDAhisto-tier0-TnP.dat -l e26_e14_etcut_idperf_50invmAB130_FTF_FE_el1_probe_1 e26_e14_etcut_idperf_gsf_50invmAB130_FTF_FE_el2_probe_1 --ncols 3 -d HLTL2-plots-electron " ), - ( "EFelectron", "EFelectronTier0TnP", "data-hists-tier0.root", " -b HLT/TRIDT/Egamma/Expert -s '_HLT_IDTrack' '/HLT_IDTrack' -c TIDAhisto-tier0-TnP.dat -l e26_e14_etcut_idperf_50invmAB130_FTF_FE_el1_probe_1 e26_e14_etcut_idperf_50invmAB130_IDTrig_FE_el1_probe_1 e26_e14_etcut_idperf_gsf_50invmAB130_IDTrig_FE_el2_probe_1 --ncols 3 -d HLTEF-plots-electron " ) ] +Comp = [ ( "L2electron", "L2electronTier0TnP", "data-hists-tier0.root", " -b HLT/TRIDT/Egamma/Expert -s '_HLT_IDTrack' '/HLT_IDTrack' -c TIDAhisto-tier0-TnP.dat -l e26_e14_etcut_idperf_50invmAB130_FTF_FE_el_probe_1 --ncols 3 -d HLTL2-plots-electron " ), + ( "EFelectron", "EFelectronTier0TnP", "data-hists-tier0.root", " -b HLT/TRIDT/Egamma/Expert -s '_HLT_IDTrack' '/HLT_IDTrack' -c TIDAhisto-tier0-TnP.dat -l e26_e14_etcut_idperf_50invmAB130_FTF_FE_el_probe_1 e26_e14_etcut_idperf_50invmAB130_IDTrig_el_probe_1 e26_e14_etcut_idperf_gsf_50invmAB130_GSF_el_probe_1 --ncols 3 -d HLTEF-plots-electron " ) ] from AthenaCommon.Include import include include("TrigInDetValidation/TrigInDetValidation_Base.py") diff --git a/Trigger/TrigValidation/TrigP1Test/share/ref_v1Dev_decodeBS_build.ref b/Trigger/TrigValidation/TrigP1Test/share/ref_v1Dev_decodeBS_build.ref index 1484a91a2b57ef2373e39b7c2c3cbd755186c6ba..d5e45fe4e9b9a23269e01ee8f3e41e00e5003843 100644 --- a/Trigger/TrigValidation/TrigP1Test/share/ref_v1Dev_decodeBS_build.ref +++ b/Trigger/TrigValidation/TrigP1Test/share/ref_v1Dev_decodeBS_build.ref @@ -259,9 +259,9 @@ HLT_2j35_0eta290_020jvt_bdl1d60_3j35_pf_ftf_presel5j25_L15J15p0ETA25: HLT_2j35_0eta290_020jvt_bdl1d60_3j35_pf_ftf_presel5j25_L15jJ40p0ETA25: eventCount: 0 stepCounts: - 0: 5 + 0: 2 stepFeatures: - 0: 10 + 0: 4 HLT_2j35_0eta290_020jvt_bdl1d70_2j35_0eta290_020jvt_bdl1d85_pf_ftf_presel2j25b85XX2j25_L14J15p0ETA25: eventCount: 0 HLT_2j35_0eta290_020jvt_bdl1d70_2j35_0eta290_020jvt_bdl1d85_pf_ftf_presel4j25_L14J15p0ETA25: @@ -321,9 +321,9 @@ HLT_2j45_0eta290_020jvt_bdl1d60_3j45_pf_ftf_presel5j25_L15J15p0ETA25: HLT_2j45_0eta290_020jvt_bdl1d60_3j45_pf_ftf_presel5j25_L15jJ40p0ETA25: eventCount: 0 stepCounts: - 0: 5 + 0: 2 stepFeatures: - 0: 10 + 0: 4 HLT_2j45_0eta290_020jvt_bdl1r60_2j45_pf_ftf_L14J15p0ETA25: eventCount: 0 HLT_2j45_0eta290_020jvt_bdl1r60_2j45_pf_ftf_presel4j25_L14J15p0ETA25: @@ -1300,6 +1300,8 @@ HLT_e26_idperf_tight_L1eEM26M: eventCount: 0 HLT_e26_idperf_tight_nogsf_L1EM22VHI: eventCount: 0 +HLT_e26_idperf_tight_nogsf_L1eEM26M: + eventCount: 0 HLT_e26_lhloose_nopix_lrttight_L1EM22VHI: eventCount: 0 HLT_e26_lhmedium_mu8noL1_L1EM22VHI: @@ -3060,11 +3062,11 @@ HLT_j110_a10t_lcw_jes_L1jJ60: stepFeatures: 0: 12 HLT_j110_a10t_lcw_jes_L1jLJ80: - eventCount: 5 + eventCount: 4 stepCounts: - 0: 5 + 0: 4 stepFeatures: - 0: 8 + 0: 6 HLT_j110_pf_ftf_preselj80_L1J30: eventCount: 2 stepCounts: @@ -3181,14 +3183,6 @@ HLT_j180_unconvtrk0_dispj_2jet_L1J100: eventCount: 0 HLT_j180_unconvtrk0_dispj_2jetperf_L1J100: eventCount: 0 -HLT_j2000_pf_ftf_preselj2b77_L1RD0_FILLED: - eventCount: 0 - stepCounts: - 0: 49 - 1: 13 - stepFeatures: - 0: 49 - 1: 13 HLT_j200_0eta290_020jvt_boffperf_pf_ftf_preselj140_L1J100: eventCount: 0 HLT_j200_0eta290_020jvt_boffperf_pf_ftf_preselj140_L1jJ160: @@ -3218,15 +3212,15 @@ HLT_j20_0eta290_020jvt_boffperf_pf_ftf_L1jJ30: 1: 85 2: 85 HLT_j20_0eta290_020jvt_boffperf_pf_ftf_L1jJ40: - eventCount: 30 + eventCount: 29 stepCounts: - 0: 40 - 1: 30 - 2: 30 + 0: 38 + 1: 29 + 2: 29 stepFeatures: - 0: 40 - 1: 82 - 2: 82 + 0: 38 + 1: 78 + 2: 78 HLT_j20_0eta290_boffperf_pf_ftf_L1HT190-J15s5pETA21: eventCount: 0 HLT_j20_0eta290_boffperf_pf_ftf_preselcHT450_PhysicsTLA_L1HT190-J15s5pETA21: @@ -3268,15 +3262,15 @@ HLT_j20_CLEANllp_calratiormbib_L1TAU60: HLT_j20_PhysicsTLA_L1HT190-J15s5pETA21: eventCount: 0 HLT_j20_PhysicsTLA_L1HT190-jJ40s5pETA21: - eventCount: 23 + eventCount: 18 stepCounts: - 0: 23 - 1: 23 - 2: 23 + 0: 18 + 1: 18 + 2: 18 stepFeatures: - 0: 116 - 1: 116 - 2: 23 + 0: 95 + 1: 95 + 2: 18 HLT_j20_PhysicsTLA_L1J100: eventCount: 0 HLT_j20_PhysicsTLA_L1J50_DETA20-J50J: @@ -3292,15 +3286,15 @@ HLT_j20_PhysicsTLA_L1J50_DETA20-J50J: HLT_j20_PhysicsTLA_L1jJ160: eventCount: 0 HLT_j20_PhysicsTLA_L1jJ90_DETA20-jJ90J: - eventCount: 4 + eventCount: 5 stepCounts: - 0: 4 - 1: 4 - 2: 4 + 0: 5 + 1: 5 + 2: 5 stepFeatures: - 0: 17 - 1: 17 - 2: 4 + 0: 21 + 1: 21 + 2: 5 HLT_j20_pf_ftf_presel4j85_PhysicsTLA_L13J50: eventCount: 0 HLT_j20_pf_ftf_presel5j50_PhysicsTLA_L14J15: @@ -3468,15 +3462,15 @@ HLT_j30_0eta290_020jvt_boffperf_pf_ftf_L1J20: 1: 28 2: 28 HLT_j30_0eta290_020jvt_boffperf_pf_ftf_L1jJ50: - eventCount: 20 + eventCount: 19 stepCounts: - 0: 29 - 1: 20 - 2: 20 + 0: 27 + 1: 19 + 2: 19 stepFeatures: - 0: 29 - 1: 42 - 2: 42 + 0: 27 + 1: 40 + 2: 40 HLT_j35_020jvt_pf_ftf_L1RD0_FILLED: eventCount: 20 stepCounts: @@ -3694,11 +3688,11 @@ HLT_j45_0eta290_020jvt_boffperf_pf_ftf_L1J20: HLT_j45_0eta290_020jvt_boffperf_pf_ftf_L1jJ50: eventCount: 14 stepCounts: - 0: 29 + 0: 27 1: 14 2: 14 stepFeatures: - 0: 29 + 0: 27 1: 23 2: 23 HLT_j45_0eta290_020jvt_pf_ftf_boffperf_L1J20: @@ -3714,11 +3708,11 @@ HLT_j45_0eta290_020jvt_pf_ftf_boffperf_L1J20: HLT_j45_0eta290_020jvt_pf_ftf_boffperf_L1jJ50: eventCount: 14 stepCounts: - 0: 29 + 0: 27 1: 14 2: 14 stepFeatures: - 0: 29 + 0: 27 1: 23 2: 23 HLT_j45_320eta490_L1J15p31ETA49: @@ -3766,10 +3760,10 @@ HLT_j45_pf_ftf_preselj20_L1RD0_FILLED: HLT_j45_pf_ftf_preselj20_L1jJ40: eventCount: 16 stepCounts: - 0: 38 + 0: 36 1: 16 stepFeatures: - 0: 38 + 0: 36 1: 26 HLT_j45f_L1J15p31ETA49: eventCount: 1 @@ -4200,18 +4194,18 @@ HLT_j85_a10sd_cssk_pf_jes_ftf_preselj50_L1J20: HLT_j85_a10sd_cssk_pf_jes_ftf_preselj50_L1jJ50: eventCount: 9 stepCounts: - 0: 24 + 0: 23 1: 9 stepFeatures: - 0: 24 + 0: 23 1: 12 HLT_j85_a10sd_cssk_pf_jes_ftf_preselj50_L1jLJ60: eventCount: 8 stepCounts: - 0: 23 + 0: 18 1: 8 stepFeatures: - 0: 23 + 0: 18 1: 11 HLT_j85_a10sd_cssk_pf_nojcalib_ftf_preselj50_L1J20: eventCount: 3 @@ -4224,18 +4218,18 @@ HLT_j85_a10sd_cssk_pf_nojcalib_ftf_preselj50_L1J20: HLT_j85_a10sd_cssk_pf_nojcalib_ftf_preselj50_L1jJ50: eventCount: 3 stepCounts: - 0: 24 + 0: 23 1: 3 stepFeatures: - 0: 24 + 0: 23 1: 4 HLT_j85_a10sd_cssk_pf_nojcalib_ftf_preselj50_L1jLJ60: eventCount: 3 stepCounts: - 0: 23 + 0: 18 1: 3 stepFeatures: - 0: 23 + 0: 18 1: 4 HLT_j85_a10t_lcw_jes_L1J20: eventCount: 13 @@ -4244,17 +4238,17 @@ HLT_j85_a10t_lcw_jes_L1J20: stepFeatures: 0: 23 HLT_j85_a10t_lcw_jes_L1jJ50: - eventCount: 22 + eventCount: 21 stepCounts: - 0: 22 + 0: 21 stepFeatures: - 0: 40 + 0: 39 HLT_j85_a10t_lcw_jes_L1jLJ60: - eventCount: 20 + eventCount: 16 stepCounts: - 0: 20 + 0: 16 stepFeatures: - 0: 37 + 0: 33 HLT_j85_a10t_lcw_nojcalib_L1J20: eventCount: 11 stepCounts: @@ -4268,11 +4262,11 @@ HLT_j85_a10t_lcw_nojcalib_L1jJ50: stepFeatures: 0: 24 HLT_j85_a10t_lcw_nojcalib_L1jLJ60: - eventCount: 14 + eventCount: 12 stepCounts: - 0: 14 + 0: 12 stepFeatures: - 0: 22 + 0: 20 HLT_j85_pf_ftf_preselj50_L1J20: eventCount: 5 stepCounts: @@ -5467,23 +5461,7 @@ HLT_mu6_j100_0eta290_boffperf_pf_ftf_dRAB04_L1MU5VF_J40: HLT_mu6_j100_0eta290_boffperf_pf_ftf_dRAB04_L1MU5VF_jJ90: eventCount: 0 HLT_mu6_j45_0eta290_boffperf_pf_ftf_dRAB03_L1BTAG-MU5VFjJ50: - eventCount: 1 - stepCounts: - 0: 1 - 1: 1 - 2: 1 - 3: 1 - 4: 1 - 5: 1 - 6: 1 - stepFeatures: - 0: 1 - 1: 1 - 2: 1 - 3: 1 - 4: 1 - 5: 3 - 6: 3 + eventCount: 0 HLT_mu6_j45_nojcalib_L1J20: eventCount: 0 stepCounts: @@ -5710,7 +5688,7 @@ HLT_noalg_L1jJ500: HLT_noalg_L1jLJ140: eventCount: 0 HLT_noalg_L1jXE100: - eventCount: 0 + eventCount: 1 HLT_noalg_L1jXEPerf100: eventCount: 0 HLT_tau0_mediumRNN_tracktwoMVABDT_tau0_mediumRNN_tracktwoMVABDT_03dRAB30_L1DR-TAU20ITAU12I-J25: @@ -5773,6 +5751,8 @@ HLT_tau160_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50: 0: 1 HLT_tau160_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_tau160_mediumRNN_tracktwoMVA_L1TAU100: eventCount: 0 HLT_tau160_mediumRNN_tracktwoMVA_L1eTAU140: @@ -5783,6 +5763,8 @@ HLT_tau160_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50: 0: 1 HLT_tau160_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_tau160_perf_tracktwoMVABDT_L1TAU100: eventCount: 0 HLT_tau160_perf_tracktwoMVABDT_L1eTAU140: @@ -5803,6 +5785,8 @@ HLT_tau180_mediumRNN_tracktwoLLP_probe_xe65_cell_xe90_pfopufit_L1XE50: 0: 1 HLT_tau180_mediumRNN_tracktwoLLP_probe_xe65_cell_xe90_pfopufit_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_tau180_tightRNN_tracktwoLLP_L1TAU100: eventCount: 0 HLT_tau180_tightRNN_tracktwoLLP_L1eTAU140: @@ -5830,10 +5814,10 @@ HLT_tau20_mediumRNN_tracktwoMVABDT_L1RD0_FILLED: 3: 24 4: 4 stepFeatures: - 0: 35 - 1: 35 - 2: 35 - 3: 35 + 0: 33 + 1: 33 + 2: 33 + 3: 33 4: 4 HLT_tau20_mediumRNN_tracktwoMVABDT_L1TAU8: eventCount: 4 @@ -5844,24 +5828,24 @@ HLT_tau20_mediumRNN_tracktwoMVABDT_L1TAU8: 3: 24 4: 4 stepFeatures: - 0: 35 - 1: 35 - 2: 35 - 3: 35 + 0: 33 + 1: 33 + 2: 33 + 3: 33 4: 4 HLT_tau20_mediumRNN_tracktwoMVABDT_L1eTAU12: eventCount: 5 stepCounts: - 0: 27 - 1: 27 - 2: 27 - 3: 27 + 0: 25 + 1: 25 + 2: 25 + 3: 25 4: 5 stepFeatures: - 0: 54 - 1: 54 - 2: 54 - 3: 54 + 0: 45 + 1: 45 + 2: 45 + 3: 45 4: 5 HLT_tau20_mediumRNN_tracktwoMVABDT_probe_j110_pf_ftf_preselj80_03dRAB_L1J30: eventCount: 0 @@ -5894,10 +5878,10 @@ HLT_tau20_mediumRNN_tracktwoMVABDT_probe_j25_pf_ftf_03dRAB_L1RD0_FILLED: stepFeatures: 0: 50 1: 69 - 2: 35 - 3: 35 - 4: 35 - 5: 35 + 2: 33 + 3: 33 + 4: 33 + 5: 33 6: 4 HLT_tau20_mediumRNN_tracktwoMVABDT_probe_j260_pf_ftf_preselj200_03dRAB_L1J75: eventCount: 0 @@ -5914,10 +5898,10 @@ HLT_tau20_mediumRNN_tracktwoMVABDT_probe_j35_pf_ftf_03dRAB_L1RD0_FILLED: stepFeatures: 0: 50 1: 42 - 2: 32 - 3: 32 - 4: 32 - 5: 32 + 2: 30 + 3: 30 + 4: 30 + 5: 30 6: 2 HLT_tau20_mediumRNN_tracktwoMVABDT_probe_j360_pf_ftf_preselj225_03dRAB_L1J100: eventCount: 0 @@ -5983,19 +5967,21 @@ HLT_tau20_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50: 0: 1 HLT_tau20_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_tau20_mediumRNN_tracktwoMVA_L1eTAU12: eventCount: 5 stepCounts: - 0: 27 - 1: 27 - 2: 27 - 3: 27 + 0: 25 + 1: 25 + 2: 25 + 3: 25 4: 5 stepFeatures: - 0: 54 - 1: 54 - 2: 54 - 3: 54 + 0: 45 + 1: 45 + 2: 45 + 3: 45 4: 5 HLT_tau20_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50: eventCount: 0 @@ -6003,28 +5989,30 @@ HLT_tau20_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50: 0: 1 HLT_tau20_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_tau25_idperf_tracktwoMVABDT_L1TAU12IM: - eventCount: 10 + eventCount: 11 stepCounts: - 0: 10 - 1: 10 - 2: 10 - 3: 10 - 4: 10 + 0: 11 + 1: 11 + 2: 11 + 3: 11 + 4: 11 stepFeatures: - 0: 12 - 1: 12 - 2: 12 - 3: 12 - 4: 12 + 0: 13 + 1: 13 + 2: 13 + 3: 13 + 4: 13 HLT_tau25_idperf_tracktwoMVABDT_L1cTAU20M: - eventCount: 7 + eventCount: 9 stepCounts: - 0: 7 - 1: 7 - 2: 7 - 3: 7 - 4: 7 + 0: 9 + 1: 9 + 2: 9 + 3: 9 + 4: 9 stepFeatures: 0: 15 1: 15 @@ -6040,11 +6028,11 @@ HLT_tau25_idperf_tracktwoMVABDT_L1eTAU20: 3: 16 4: 16 stepFeatures: - 0: 21 - 1: 21 - 2: 21 - 3: 21 - 4: 21 + 0: 20 + 1: 20 + 2: 20 + 3: 20 + 4: 20 HLT_tau25_idperf_tracktwoMVABDT_L1eTAU20M: eventCount: 12 stepCounts: @@ -6054,19 +6042,19 @@ HLT_tau25_idperf_tracktwoMVABDT_L1eTAU20M: 3: 12 4: 12 stepFeatures: - 0: 16 - 1: 16 - 2: 16 - 3: 16 - 4: 16 + 0: 15 + 1: 15 + 2: 15 + 3: 15 + 4: 15 HLT_tau25_idperf_tracktwoMVABDT_L1jTAU20: - eventCount: 17 + eventCount: 19 stepCounts: - 0: 17 - 1: 17 - 2: 17 - 3: 17 - 4: 17 + 0: 19 + 1: 19 + 2: 19 + 3: 19 + 4: 19 stepFeatures: 0: 28 1: 28 @@ -6074,27 +6062,27 @@ HLT_tau25_idperf_tracktwoMVABDT_L1jTAU20: 3: 28 4: 28 HLT_tau25_idperf_tracktwoMVA_L1TAU12IM: - eventCount: 10 + eventCount: 11 stepCounts: - 0: 10 - 1: 10 - 2: 10 - 3: 10 - 4: 10 + 0: 11 + 1: 11 + 2: 11 + 3: 11 + 4: 11 stepFeatures: - 0: 12 - 1: 12 - 2: 12 - 3: 12 - 4: 12 + 0: 13 + 1: 13 + 2: 13 + 3: 13 + 4: 13 HLT_tau25_idperf_tracktwoMVA_L1cTAU20M: - eventCount: 7 + eventCount: 9 stepCounts: - 0: 7 - 1: 7 - 2: 7 - 3: 7 - 4: 7 + 0: 9 + 1: 9 + 2: 9 + 3: 9 + 4: 9 stepFeatures: 0: 15 1: 15 @@ -6110,11 +6098,11 @@ HLT_tau25_idperf_tracktwoMVA_L1eTAU20: 3: 16 4: 16 stepFeatures: - 0: 21 - 1: 21 - 2: 21 - 3: 21 - 4: 21 + 0: 20 + 1: 20 + 2: 20 + 3: 20 + 4: 20 HLT_tau25_idperf_tracktwoMVA_L1eTAU20M: eventCount: 12 stepCounts: @@ -6124,157 +6112,159 @@ HLT_tau25_idperf_tracktwoMVA_L1eTAU20M: 3: 12 4: 12 stepFeatures: - 0: 16 - 1: 16 - 2: 16 - 3: 16 - 4: 16 + 0: 15 + 1: 15 + 2: 15 + 3: 15 + 4: 15 HLT_tau25_looseRNN_tracktwoLLP_L1TAU12IM: - eventCount: 5 + eventCount: 7 stepCounts: - 0: 10 - 1: 10 - 2: 10 - 3: 10 - 4: 5 + 0: 11 + 1: 11 + 2: 11 + 3: 11 + 4: 7 stepFeatures: - 0: 12 - 1: 12 - 2: 12 - 3: 12 - 4: 5 + 0: 13 + 1: 13 + 2: 13 + 3: 13 + 4: 7 HLT_tau25_looseRNN_tracktwoMVABDT_L1TAU12IM: - eventCount: 5 + eventCount: 7 stepCounts: - 0: 10 - 1: 10 - 2: 10 - 3: 10 - 4: 5 + 0: 11 + 1: 11 + 2: 11 + 3: 11 + 4: 7 stepFeatures: - 0: 12 - 1: 12 - 2: 12 - 3: 12 - 4: 6 + 0: 13 + 1: 13 + 2: 13 + 3: 13 + 4: 8 HLT_tau25_looseRNN_tracktwoMVA_L1TAU12IM: - eventCount: 6 + eventCount: 8 stepCounts: - 0: 10 - 1: 10 - 2: 10 - 3: 10 - 4: 6 + 0: 11 + 1: 11 + 2: 11 + 3: 11 + 4: 8 stepFeatures: - 0: 12 - 1: 12 - 2: 12 - 3: 12 - 4: 7 + 0: 13 + 1: 13 + 2: 13 + 3: 13 + 4: 9 HLT_tau25_mediumRNN_tracktwoLLP_L1TAU12IM: - eventCount: 3 + eventCount: 4 stepCounts: - 0: 10 - 1: 10 - 2: 10 - 3: 10 - 4: 3 + 0: 11 + 1: 11 + 2: 11 + 3: 11 + 4: 4 stepFeatures: - 0: 12 - 1: 12 - 2: 12 - 3: 12 - 4: 3 + 0: 13 + 1: 13 + 2: 13 + 3: 13 + 4: 4 HLT_tau25_mediumRNN_tracktwoLLP_L1cTAU20M: - eventCount: 2 + eventCount: 3 stepCounts: - 0: 7 - 1: 7 - 2: 7 - 3: 7 - 4: 2 + 0: 9 + 1: 9 + 2: 9 + 3: 9 + 4: 3 stepFeatures: 0: 15 1: 15 2: 15 3: 15 - 4: 2 + 4: 3 HLT_tau25_mediumRNN_tracktwoMVABDT_L1TAU12IM: - eventCount: 2 + eventCount: 4 stepCounts: - 0: 10 - 1: 10 - 2: 10 - 3: 10 - 4: 2 + 0: 11 + 1: 11 + 2: 11 + 3: 11 + 4: 4 stepFeatures: - 0: 12 - 1: 12 - 2: 12 - 3: 12 - 4: 2 + 0: 13 + 1: 13 + 2: 13 + 3: 13 + 4: 4 HLT_tau25_mediumRNN_tracktwoMVABDT_L1cTAU20M: - eventCount: 1 + eventCount: 2 stepCounts: - 0: 7 - 1: 7 - 2: 7 - 3: 7 - 4: 1 + 0: 9 + 1: 9 + 2: 9 + 3: 9 + 4: 2 stepFeatures: 0: 15 1: 15 2: 15 3: 15 - 4: 1 + 4: 2 HLT_tau25_mediumRNN_tracktwoMVABDT_L1eTAU20: - eventCount: 2 + eventCount: 4 stepCounts: 0: 16 1: 16 2: 16 3: 16 - 4: 2 + 4: 4 stepFeatures: - 0: 21 - 1: 21 - 2: 21 - 3: 21 - 4: 2 + 0: 20 + 1: 20 + 2: 20 + 3: 20 + 4: 4 HLT_tau25_mediumRNN_tracktwoMVABDT_L1eTAU20M: - eventCount: 2 + eventCount: 3 stepCounts: 0: 12 1: 12 2: 12 3: 12 - 4: 2 + 4: 3 stepFeatures: - 0: 16 - 1: 16 - 2: 16 - 3: 16 - 4: 2 + 0: 15 + 1: 15 + 2: 15 + 3: 15 + 4: 3 HLT_tau25_mediumRNN_tracktwoMVABDT_L1jTAU20: - eventCount: 2 + eventCount: 5 stepCounts: - 0: 17 - 1: 17 - 2: 17 - 3: 17 - 4: 2 + 0: 19 + 1: 19 + 2: 19 + 3: 19 + 4: 5 stepFeatures: 0: 28 1: 28 2: 28 3: 28 - 4: 2 + 4: 5 HLT_tau25_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50: eventCount: 0 stepFeatures: 0: 1 HLT_tau25_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_tau25_mediumRNN_tracktwoMVABDT_tau20_mediumRNN_tracktwoMVABDT_03dRAB_j70_j50a_j0_DJMASS900j50_L1MJJ-500-NFF: eventCount: 0 stepFeatures: @@ -6282,182 +6272,184 @@ HLT_tau25_mediumRNN_tracktwoMVABDT_tau20_mediumRNN_tracktwoMVABDT_03dRAB_j70_j50 HLT_tau25_mediumRNN_tracktwoMVABDT_tau20_mediumRNN_tracktwoMVABDT_03dRAB_j70_j50a_j0_DJMASS900j50_L1jMJJ-500-NFF: eventCount: 0 HLT_tau25_mediumRNN_tracktwoMVA_L1TAU12IM: - eventCount: 2 + eventCount: 4 stepCounts: - 0: 10 - 1: 10 - 2: 10 - 3: 10 - 4: 2 + 0: 11 + 1: 11 + 2: 11 + 3: 11 + 4: 4 stepFeatures: - 0: 12 - 1: 12 - 2: 12 - 3: 12 - 4: 2 + 0: 13 + 1: 13 + 2: 13 + 3: 13 + 4: 4 HLT_tau25_mediumRNN_tracktwoMVA_L1cTAU20M: - eventCount: 1 + eventCount: 2 stepCounts: - 0: 7 - 1: 7 - 2: 7 - 3: 7 - 4: 1 + 0: 9 + 1: 9 + 2: 9 + 3: 9 + 4: 2 stepFeatures: 0: 15 1: 15 2: 15 3: 15 - 4: 1 + 4: 2 HLT_tau25_mediumRNN_tracktwoMVA_L1eTAU20: - eventCount: 2 + eventCount: 4 stepCounts: 0: 16 1: 16 2: 16 3: 16 - 4: 2 + 4: 4 stepFeatures: - 0: 21 - 1: 21 - 2: 21 - 3: 21 - 4: 2 + 0: 20 + 1: 20 + 2: 20 + 3: 20 + 4: 4 HLT_tau25_mediumRNN_tracktwoMVA_L1eTAU20M: - eventCount: 2 + eventCount: 3 stepCounts: 0: 12 1: 12 2: 12 3: 12 - 4: 2 + 4: 3 stepFeatures: - 0: 16 - 1: 16 - 2: 16 - 3: 16 - 4: 2 + 0: 15 + 1: 15 + 2: 15 + 3: 15 + 4: 3 HLT_tau25_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50: eventCount: 0 stepFeatures: 0: 1 HLT_tau25_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_tau25_mediumRNN_tracktwoMVA_tau20_mediumRNN_tracktwoMVA_03dRAB_j70_j50a_j0_DJMASS900j50_L1MJJ-500-NFF: eventCount: 0 stepFeatures: 0: 2 HLT_tau25_perf_tracktwoMVABDT_L1TAU12IM: - eventCount: 7 + eventCount: 9 stepCounts: - 0: 10 - 1: 10 - 2: 10 - 3: 10 - 4: 7 + 0: 11 + 1: 11 + 2: 11 + 3: 11 + 4: 9 stepFeatures: - 0: 12 - 1: 12 - 2: 12 - 3: 12 - 4: 8 + 0: 13 + 1: 13 + 2: 13 + 3: 13 + 4: 10 HLT_tau25_perf_tracktwoMVABDT_L1cTAU20M: - eventCount: 5 + eventCount: 7 stepCounts: - 0: 7 - 1: 7 - 2: 7 - 3: 7 - 4: 5 + 0: 9 + 1: 9 + 2: 9 + 3: 9 + 4: 7 stepFeatures: 0: 15 1: 15 2: 15 3: 15 - 4: 7 + 4: 8 HLT_tau25_perf_tracktwoMVABDT_L1eTAU20: - eventCount: 11 + eventCount: 13 stepCounts: 0: 16 1: 16 2: 16 3: 16 - 4: 11 - stepFeatures: - 0: 21 - 1: 21 - 2: 21 - 3: 21 4: 13 + stepFeatures: + 0: 20 + 1: 20 + 2: 20 + 3: 20 + 4: 14 HLT_tau25_perf_tracktwoMVABDT_L1eTAU20M: - eventCount: 8 + eventCount: 9 stepCounts: 0: 12 1: 12 2: 12 3: 12 - 4: 8 + 4: 9 stepFeatures: - 0: 16 - 1: 16 - 2: 16 - 3: 16 + 0: 15 + 1: 15 + 2: 15 + 3: 15 4: 10 HLT_tau25_perf_tracktwoMVABDT_L1jTAU20: - eventCount: 12 + eventCount: 15 stepCounts: - 0: 17 - 1: 17 - 2: 17 - 3: 17 - 4: 12 + 0: 19 + 1: 19 + 2: 19 + 3: 19 + 4: 15 stepFeatures: 0: 28 1: 28 2: 28 3: 28 - 4: 18 + 4: 20 HLT_tau25_perf_tracktwoMVA_L1TAU12IM: - eventCount: 7 + eventCount: 9 stepCounts: - 0: 10 - 1: 10 - 2: 10 - 3: 10 - 4: 7 + 0: 11 + 1: 11 + 2: 11 + 3: 11 + 4: 9 stepFeatures: - 0: 12 - 1: 12 - 2: 12 - 3: 12 - 4: 8 + 0: 13 + 1: 13 + 2: 13 + 3: 13 + 4: 10 HLT_tau25_perf_tracktwoMVA_L1cTAU20M: - eventCount: 5 + eventCount: 7 stepCounts: - 0: 7 - 1: 7 - 2: 7 - 3: 7 - 4: 5 + 0: 9 + 1: 9 + 2: 9 + 3: 9 + 4: 7 stepFeatures: 0: 15 1: 15 2: 15 3: 15 - 4: 7 + 4: 8 HLT_tau25_perf_tracktwoMVA_L1eTAU20: - eventCount: 11 + eventCount: 12 stepCounts: 0: 16 1: 16 2: 16 3: 16 - 4: 11 + 4: 12 stepFeatures: - 0: 21 - 1: 21 - 2: 21 - 3: 21 + 0: 20 + 1: 20 + 2: 20 + 3: 20 4: 13 HLT_tau25_perf_tracktwoMVA_L1eTAU20M: eventCount: 8 @@ -6468,49 +6460,53 @@ HLT_tau25_perf_tracktwoMVA_L1eTAU20M: 3: 12 4: 8 stepFeatures: - 0: 16 - 1: 16 - 2: 16 - 3: 16 - 4: 10 + 0: 15 + 1: 15 + 2: 15 + 3: 15 + 4: 9 HLT_tau25_tightRNN_tracktwoLLP_L1TAU12IM: - eventCount: 3 + eventCount: 4 stepCounts: - 0: 10 - 1: 10 - 2: 10 - 3: 10 - 4: 3 + 0: 11 + 1: 11 + 2: 11 + 3: 11 + 4: 4 stepFeatures: - 0: 12 - 1: 12 - 2: 12 - 3: 12 - 4: 3 + 0: 13 + 1: 13 + 2: 13 + 3: 13 + 4: 4 HLT_tau25_tightRNN_tracktwoMVABDT_L1TAU12IM: - eventCount: 0 - stepCounts: - 0: 10 - 1: 10 - 2: 10 - 3: 10 + eventCount: 2 + stepCounts: + 0: 11 + 1: 11 + 2: 11 + 3: 11 + 4: 2 stepFeatures: - 0: 12 - 1: 12 - 2: 12 - 3: 12 + 0: 13 + 1: 13 + 2: 13 + 3: 13 + 4: 2 HLT_tau25_tightRNN_tracktwoMVA_L1TAU12IM: - eventCount: 0 + eventCount: 2 stepCounts: - 0: 10 - 1: 10 - 2: 10 - 3: 10 + 0: 11 + 1: 11 + 2: 11 + 3: 11 + 4: 2 stepFeatures: - 0: 12 - 1: 12 - 2: 12 - 3: 12 + 0: 13 + 1: 13 + 2: 13 + 3: 13 + 4: 2 HLT_tau35_idperf_tracktwoMVABDT_L1TAU20IM: eventCount: 7 stepCounts: @@ -6548,11 +6544,11 @@ HLT_tau35_idperf_tracktwoMVABDT_L1eTAU30: 3: 10 4: 10 stepFeatures: - 0: 12 - 1: 12 - 2: 12 - 3: 12 - 4: 12 + 0: 11 + 1: 11 + 2: 11 + 3: 11 + 4: 11 HLT_tau35_idperf_tracktwoMVABDT_L1jTAU30: eventCount: 11 stepCounts: @@ -6562,25 +6558,25 @@ HLT_tau35_idperf_tracktwoMVABDT_L1jTAU30: 3: 11 4: 11 stepFeatures: - 0: 13 - 1: 13 - 2: 13 - 3: 13 - 4: 13 + 0: 12 + 1: 12 + 2: 12 + 3: 12 + 4: 12 HLT_tau35_idperf_tracktwoMVABDT_L1jTAU30M: - eventCount: 6 + eventCount: 7 stepCounts: - 0: 6 - 1: 6 - 2: 6 - 3: 6 - 4: 6 - stepFeatures: 0: 7 1: 7 2: 7 3: 7 4: 7 + stepFeatures: + 0: 8 + 1: 8 + 2: 8 + 3: 8 + 4: 8 HLT_tau35_idperf_tracktwoMVA_L1TAU20IM: eventCount: 7 stepCounts: @@ -6674,10 +6670,10 @@ HLT_tau35_mediumRNN_tracktwoMVABDT_L1eTAU30: 3: 10 4: 1 stepFeatures: - 0: 12 - 1: 12 - 2: 12 - 3: 12 + 0: 11 + 1: 11 + 2: 11 + 3: 11 4: 1 HLT_tau35_mediumRNN_tracktwoMVABDT_L1jTAU30: eventCount: 1 @@ -6688,31 +6684,33 @@ HLT_tau35_mediumRNN_tracktwoMVABDT_L1jTAU30: 3: 11 4: 1 stepFeatures: - 0: 13 - 1: 13 - 2: 13 - 3: 13 + 0: 12 + 1: 12 + 2: 12 + 3: 12 4: 1 HLT_tau35_mediumRNN_tracktwoMVABDT_L1jTAU30M: eventCount: 1 stepCounts: - 0: 6 - 1: 6 - 2: 6 - 3: 6 - 4: 1 - stepFeatures: 0: 7 1: 7 2: 7 3: 7 4: 1 + stepFeatures: + 0: 8 + 1: 8 + 2: 8 + 3: 8 + 4: 1 HLT_tau35_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50: eventCount: 0 stepFeatures: 0: 1 HLT_tau35_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_tau35_mediumRNN_tracktwoMVABDT_tau25_mediumRNN_tracktwoMVABDT_03dRAB30_L1DR-TAU20ITAU12I: eventCount: 0 stepCounts: @@ -6807,6 +6805,8 @@ HLT_tau35_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50: 0: 1 HLT_tau35_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRAB30_L1DR-TAU20ITAU12I: eventCount: 0 stepCounts: @@ -6864,47 +6864,47 @@ HLT_tau35_perf_tracktwoMVABDT_L1cTAU30M: 3: 7 4: 4 HLT_tau35_perf_tracktwoMVABDT_L1eTAU30: - eventCount: 8 + eventCount: 9 stepCounts: 0: 10 1: 10 2: 10 3: 10 - 4: 8 + 4: 9 stepFeatures: - 0: 12 - 1: 12 - 2: 12 - 3: 12 + 0: 11 + 1: 11 + 2: 11 + 3: 11 4: 9 HLT_tau35_perf_tracktwoMVABDT_L1jTAU30: - eventCount: 9 + eventCount: 10 stepCounts: 0: 11 1: 11 2: 11 3: 11 - 4: 9 + 4: 10 stepFeatures: - 0: 13 - 1: 13 - 2: 13 - 3: 13 + 0: 12 + 1: 12 + 2: 12 + 3: 12 4: 10 HLT_tau35_perf_tracktwoMVABDT_L1jTAU30M: - eventCount: 4 + eventCount: 6 stepCounts: - 0: 6 - 1: 6 - 2: 6 - 3: 6 - 4: 4 - stepFeatures: 0: 7 1: 7 2: 7 3: 7 - 4: 4 + 4: 6 + stepFeatures: + 0: 8 + 1: 8 + 2: 8 + 3: 8 + 4: 6 HLT_tau35_perf_tracktwoMVA_L1TAU20IM: eventCount: 6 stepCounts: @@ -6963,6 +6963,8 @@ HLT_tau40_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50: 0: 1 HLT_tau40_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_tau40_mediumRNN_tracktwoMVABDT_tau35_mediumRNN_tracktwoMVABDT_03dRAB_L1TAU25IM_2TAU20IM: eventCount: 0 stepCounts: @@ -6991,22 +6993,14 @@ HLT_tau40_mediumRNN_tracktwoMVABDT_tau35_mediumRNN_tracktwoMVABDT_03dRAB_L1cTAU3 3: 6 HLT_tau40_mediumRNN_tracktwoMVABDT_tau35_mediumRNN_tracktwoMVABDT_03dRAB_L1cTAU35M_2cTAU30M_2jJ55_3jJ50: eventCount: 0 - stepCounts: - 0: 1 - 1: 1 - 2: 1 - 3: 1 - stepFeatures: - 0: 6 - 1: 6 - 2: 6 - 3: 6 HLT_tau40_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50: eventCount: 0 stepFeatures: 0: 1 HLT_tau40_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_tau40_mediumRNN_tracktwoMVA_tau35_mediumRNN_tracktwoMVA_03dRAB_L1TAU25IM_2TAU20IM: eventCount: 0 stepCounts: @@ -7043,68 +7037,74 @@ HLT_tau60_mediumRNN_tracktwoLLP_probe_xe65_cell_xe90_pfopufit_L1XE50: 0: 1 HLT_tau60_mediumRNN_tracktwoLLP_probe_xe65_cell_xe90_pfopufit_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_tau60_mediumRNN_tracktwoMVABDT_L1TAU40: eventCount: 0 stepCounts: - 0: 1 - 1: 1 - 2: 1 - 3: 1 - stepFeatures: 0: 2 1: 2 2: 2 3: 2 + stepFeatures: + 0: 3 + 1: 3 + 2: 3 + 3: 3 HLT_tau60_mediumRNN_tracktwoMVABDT_L1eTAU60: eventCount: 0 stepCounts: - 0: 1 - 1: 1 - 2: 1 - 3: 1 + 0: 2 + 1: 2 + 2: 2 + 3: 2 stepFeatures: - 0: 1 - 1: 1 - 2: 1 - 3: 1 + 0: 2 + 1: 2 + 2: 2 + 3: 2 HLT_tau60_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50: eventCount: 0 stepFeatures: 0: 1 HLT_tau60_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_tau60_mediumRNN_tracktwoMVABDT_tau25_mediumRNN_tracktwoMVABDT_xe50_cell_03dRAB_L1TAU40_2TAU12IM_XE40: eventCount: 0 HLT_tau60_mediumRNN_tracktwoMVA_L1TAU40: eventCount: 0 stepCounts: - 0: 1 - 1: 1 - 2: 1 - 3: 1 - stepFeatures: 0: 2 1: 2 2: 2 3: 2 + stepFeatures: + 0: 3 + 1: 3 + 2: 3 + 3: 3 HLT_tau60_mediumRNN_tracktwoMVA_L1eTAU60: eventCount: 0 stepCounts: - 0: 1 - 1: 1 - 2: 1 - 3: 1 + 0: 2 + 1: 2 + 2: 2 + 3: 2 stepFeatures: - 0: 1 - 1: 1 - 2: 1 - 3: 1 + 0: 2 + 1: 2 + 2: 2 + 3: 2 HLT_tau60_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50: eventCount: 0 stepFeatures: 0: 1 HLT_tau60_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_tau60_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_xe50_cell_03dRAB_L1TAU40_2TAU12IM_XE40: eventCount: 0 HLT_tau80_idperf_tracktwoMVABDT_L1TAU60: @@ -7121,7 +7121,7 @@ HLT_tau80_idperf_tracktwoMVABDT_L1TAU60: 2: 1 3: 1 4: 1 -HLT_tau80_idperf_tracktwoMVABDT_L1eTAU60: +HLT_tau80_idperf_tracktwoMVABDT_L1eTAU80: eventCount: 1 stepCounts: 0: 1 @@ -7155,6 +7155,8 @@ HLT_tau80_mediumRNN_tracktwoLLP_probe_xe65_cell_xe90_pfopufit_L1XE50: 0: 1 HLT_tau80_mediumRNN_tracktwoLLP_probe_xe65_cell_xe90_pfopufit_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_tau80_mediumRNN_tracktwoLLP_tau60_mediumRNN_tracktwoLLP_03dRAB_L1TAU60_2TAU40: eventCount: 0 stepCounts: @@ -7213,6 +7215,8 @@ HLT_tau80_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1XE50: 0: 1 HLT_tau80_mediumRNN_tracktwoMVABDT_probe_xe65_cell_xe90_pfopufit_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_tau80_mediumRNN_tracktwoMVABDT_tau35_mediumRNN_tracktwoMVABDT_03dRAB30_L1TAU60_DR-TAU20ITAU12I: eventCount: 0 HLT_tau80_mediumRNN_tracktwoMVABDT_tau35_mediumRNN_tracktwoMVABDT_03dRAB30_L1eTAU80_2cTAU30M_DR-eTAU30eTAU20: @@ -7261,6 +7265,8 @@ HLT_tau80_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1XE50: 0: 1 HLT_tau80_mediumRNN_tracktwoMVA_probe_xe65_cell_xe90_pfopufit_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_tau80_mediumRNN_tracktwoMVA_tau35_mediumRNN_tracktwoMVA_03dRAB30_L1TAU60_DR-TAU20ITAU12I: eventCount: 0 HLT_tau80_mediumRNN_tracktwoMVA_tau60_mediumRNN_tracktwoMVA_03dRAB_L1TAU60_2TAU40: @@ -7307,6 +7313,12 @@ HLT_unconvtrk200_hitdv_medium_L1XE50: 1: 1 HLT_unconvtrk200_hitdv_medium_L1jXE100: eventCount: 0 + stepCounts: + 0: 1 + 1: 1 + stepFeatures: + 0: 1 + 1: 1 HLT_unconvtrk20_distrk_medium_L1XE50: eventCount: 0 stepCounts: @@ -7315,6 +7327,10 @@ HLT_unconvtrk20_distrk_medium_L1XE50: 0: 1 HLT_unconvtrk20_distrk_medium_L1jXE100: eventCount: 0 + stepCounts: + 0: 1 + stepFeatures: + 0: 1 HLT_unconvtrk20_distrk_tight_L1XE50: eventCount: 0 stepCounts: @@ -7323,6 +7339,10 @@ HLT_unconvtrk20_distrk_tight_L1XE50: 0: 1 HLT_unconvtrk20_distrk_tight_L1jXE100: eventCount: 0 + stepCounts: + 0: 1 + stepFeatures: + 0: 1 HLT_unconvtrk260_hitdv_medium_L1J100: eventCount: 0 HLT_unconvtrk260_hitdv_medium_L1jJ160: @@ -7378,7 +7398,7 @@ HLT_xe30_cell_xe30_tcpufit_L1jXE70: stepCounts: 0: 2 stepFeatures: - 0: 8 + 0: 7 HLT_xe30_cvfpufit_L1XE30: eventCount: 1 stepCounts: @@ -7479,12 +7499,16 @@ HLT_xe55_cell_xe70_tcpufit_xe90_pfsum_vssk_L1XE50: 0: 2 HLT_xe55_cell_xe70_tcpufit_xe90_pfsum_vssk_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_xe55_cell_xe70_tcpufit_xe95_pfsum_cssk_L1XE50: eventCount: 0 stepFeatures: 0: 2 HLT_xe55_cell_xe70_tcpufit_xe95_pfsum_cssk_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_xe60_cell_L1XE50: eventCount: 0 HLT_xe60_cell_xe95_pfsum_cssk_L1XE50: @@ -7493,6 +7517,8 @@ HLT_xe60_cell_xe95_pfsum_cssk_L1XE50: 0: 1 HLT_xe60_cell_xe95_pfsum_cssk_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_xe65_cell_xe100_mhtpufit_pf_L1XE50: eventCount: 0 stepFeatures: @@ -7507,12 +7533,16 @@ HLT_xe65_cell_xe100_mhtpufit_pf_L1gXERHO100: eventCount: 0 HLT_xe65_cell_xe100_mhtpufit_pf_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_xe65_cell_xe105_mhtpufit_em_L1XE50: eventCount: 0 stepFeatures: 0: 1 HLT_xe65_cell_xe105_mhtpufit_em_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_xe65_cell_xe110_tcpufit_L1XE50: eventCount: 0 HLT_xe65_cell_xe110_tcpufit_L1jXE100: @@ -7533,6 +7563,8 @@ HLT_xe65_cell_xe90_pfopufit_L1gXERHO100: eventCount: 0 HLT_xe65_cell_xe90_pfopufit_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_xe65_cell_xe90_pfopufit_sig30_L1XE50: eventCount: 0 stepFeatures: @@ -7543,12 +7575,16 @@ HLT_xe65_cell_xe95_pfsum_vssk_L1XE50: 0: 1 HLT_xe65_cell_xe95_pfsum_vssk_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_xe75_cell_xe65_tcpufit_xe90_trkmht_L1XE50: eventCount: 0 stepFeatures: 0: 2 HLT_xe75_cell_xe65_tcpufit_xe90_trkmht_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_xe80_cell_xe115_tcpufit_L1XE50: eventCount: 0 HLT_xe80_cell_xe115_tcpufit_L1gXEJWOJ100: @@ -7611,6 +7647,8 @@ HLT_xe80_tcpufit_unconvtrk200_hitdv_medium_L1XE50: 1: 1 HLT_xe80_tcpufit_unconvtrk200_hitdv_medium_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_xe80_tcpufit_unconvtrk200_hitdv_tight_L1XE50: eventCount: 0 stepCounts: @@ -7621,6 +7659,8 @@ HLT_xe80_tcpufit_unconvtrk200_hitdv_tight_L1XE50: 1: 1 HLT_xe80_tcpufit_unconvtrk200_hitdv_tight_L1jXE100: eventCount: 0 + stepFeatures: + 0: 1 HLT_xe80_tcpufit_unconvtrk20_distrk_medium_L1XE50: eventCount: 0 stepCounts: diff --git a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py index 96ec3e7ecdca68d9ab1d88f274f9d31bdedd333b..4afe9b5218328e521455031d7e8db9dbe03e8a63 100644 --- a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py +++ b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py @@ -66,10 +66,8 @@ JetVarsToKeep = ['ActiveArea', 'ActiveArea4vec_eta', 'ActiveArea4vec_m', 'Active 'JetPileupScaleMomentum_eta', 'JetPileupScaleMomentum_m', 'JetPileupScaleMomentum_phi', 'JetPileupScaleMomentum_pt', 'JetEtaJESScaleMomentum_eta', 'JetEtaJESScaleMomentum_m', 'JetEtaJESScaleMomentum_phi', 'JetEtaJESScaleMomentum_pt', 'JetGSCScaleMomentum_eta', 'JetGSCScaleMomentum_m', 'JetGSCScaleMomentum_phi', 'JetGSCScaleMomentum_pt', - 'Jvt', 'JVFCorr', 'JvtRpt', 'NumTrkPt500', 'NumTrkPt1000', 'SizeParameter', 'SumPtChargedPFOPt500', 'SumPtTrkPt500', 'SumPtTrkPt1000','Timing','TrackWidthPt1000', - 'TracksForMinimalJetTag' + 'Jvt', 'JVFCorr', 'JvtRpt', 'NumTrkPt500', 'NumTrkPt1000', 'SizeParameter', 'SumPtChargedPFOPt500', 'SumPtTrkPt500', 'SumPtTrkPt1000','Timing','TrackWidthPt1000', 'GhostTrack_ftf' ] -JetVarsToKeep += [f'fastDips_p{x}' for x in 'cub'] JetVars = '.'.join(JetVarsToKeep) JetCopyVarsToKeep = ['pt', 'eta', 'phi', 'm', @@ -77,15 +75,19 @@ JetCopyVarsToKeep = ['pt', 'eta', 'phi', 'm', 'JetEtaJESScaleMomentum_eta', 'JetEtaJESScaleMomentum_m', 'JetEtaJESScaleMomentum_phi', 'JetEtaJESScaleMomentum_pt', 'JetGSCScaleMomentum_eta', 'JetGSCScaleMomentum_m', 'JetGSCScaleMomentum_phi', 'JetGSCScaleMomentum_pt', 'Jvt', 'JvtRpt','Timing', - 'GhostTrack_ftf','TracksForMinimalJetTag' -] -JetCopyVarsToKeep += [f'fastDips_p{x}' for x in 'cub'] + 'GhostTrack_ftf'] + JetCopyVarsToKeep += [f'dips20211116_p{x}' for x in 'cub'] JetCopyVarsToKeep += [f'fastDIPS20211215_p{x}' for x in 'cub'] JetCopyVars = '.'.join(JetCopyVarsToKeep) -# Create a (temporary) list of TLAJetVars as the union of JetVars and JetCopyVars -TLAJetVarsToKeep = sorted(list(set(JetVarsToKeep+JetCopyVarsToKeep))) +JetFastFTagVarsToKeep = JetCopyVarsToKeep +JetFastFTagVarsToKeep += ['TracksForMinimalJetTag'] +JetFastFTagVarsToKeep += [f'fastDips_p{x}' for x in 'cub'] +JetFastFTagVars = '.'.join(JetFastFTagVarsToKeep) + +# Create a (temporary) list of TLAJetVars as the union of JetVars JetCopyVars and JetFastFTagVars +TLAJetVarsToKeep = sorted(list(set(JetVarsToKeep+JetFastFTagVarsToKeep))) TLAJetVars='.'.join(TLAJetVarsToKeep) ElToKeep = ['ptcone20', 'ptvarcone20'] @@ -618,6 +620,9 @@ TriggerHLTListRun3 = [ ('xAOD::JetContainer#HLT_AntiKt4EMTopoJets_subjesIS', 'BS ESD AODFULL', 'Jet', 'alias:JetContainerShallowCopy'), ('xAOD::ShallowAuxContainer#HLT_AntiKt4EMTopoJets_subjesISAux.'+JetCopyVars, 'BS ESD AODFULL', 'Jet'), + ('xAOD::JetContainer#HLT_AntiKt4EMTopoJets_subjesIS_fastftag', 'BS ESD AODFULL', 'Jet', 'alias:JetContainerShallowCopy'), + ('xAOD::ShallowAuxContainer#HLT_AntiKt4EMTopoJets_subjesIS_fastftagAux.'+JetFastFTagVars, 'BS ESD AODFULL', 'Jet'), + ('xAOD::JetContainer#HLT_AntiKt4EMTopoJets_nojcalib_ftf', 'BS ESD AODFULL', 'Jet'), ('xAOD::JetAuxContainer#HLT_AntiKt4EMTopoJets_nojcalib_ftfAux.'+JetVars, 'BS ESD AODFULL', 'Jet'), @@ -694,7 +699,7 @@ TriggerHLTListRun3 = [ ('xAOD::ShallowAuxContainer#HLT_AntiKt4EMPFlowJets_subjesgsc_ftfAux.'+JetCopyVars, 'BS ESD AODFULL', 'Jet'), ('xAOD::JetContainer#HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf', 'BS ESD AODFULL', 'Jet', 'alias:JetContainerShallowCopy'), - ('xAOD::ShallowAuxContainer#HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftfAux.'+JetCopyVars, 'BS ESD AODFULL', 'Jet'), + ('xAOD::ShallowAuxContainer#HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftfAux.'+JetFastFTagVars, 'BS ESD AODFULL', 'Jet'), ('xAOD::JetContainer#HLT_AntiKt4EMPFlowJets_subresjesgsc_ftf', 'BS ESD AODFULL', 'Jet', 'alias:JetContainerShallowCopy'), ('xAOD::ShallowAuxContainer#HLT_AntiKt4EMPFlowJets_subresjesgsc_ftfAux.'+JetCopyVars, 'BS ESD AODFULL', 'Jet'), @@ -876,14 +881,17 @@ TriggerHLTListRun3 = [ ('TrigRoiDescriptorCollection#HLT_Roi_Bjet', 'BS ESD AODFULL', 'Bjet'), - # jet superRoI Descriptor and associated track and vertex class used for EventView creation + # jet superRoI Descriptor and associated track and vertex class used for EventView creation + ('TrigRoiDescriptorCollection#HLT_Roi_FS', 'BS ESD AODFULL', 'Jet'), ('TrigRoiDescriptorCollection#HLT_Roi_JetSuper', 'BS ESD AODFULL', 'Jet'), + ('xAOD::TrackParticleContainer#HLT_IDTrack_JetSuper_FTF', 'BS ESD AODFULL', 'Jet', 'inViews:JetSuperRoIViews'), ('xAOD::TrackParticleAuxContainer#HLT_IDTrack_JetSuper_FTFAux.', 'BS ESD AODFULL', 'Jet'), + # bjet Second Stage Fast tracks ('xAOD::TrackParticleContainer#HLT_IDTrack_Bjet_FTF', 'BS ESD AODFULL', 'Bjet', 'inViews:'+BTagViewsEMTopo+','+BTagViewsEMPFlow), ('xAOD::TrackParticleAuxContainer#HLT_IDTrack_Bjet_FTFAux.', 'BS ESD AODFULL', 'Bjet'), diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py index 1d85ff4e04ca7e3f6adff5b4cec9bb36ef94f5d6..0619d9dff490c97b7aee49c20e044c13e4622c1e 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py @@ -30,6 +30,9 @@ def createTriggerFlags(doTriggerRecoFlags): # Enable L1Topo simulation to write inputs to txt flags.addFlag('Trigger.enableL1TopoDump', False) + # Enable L1Topo simulation to BW run + flags.addFlag('Trigger.enableL1TopoBWSimulation', False) + # Enable Run-2 L1Calo simulation and/or decoding (possible even if enablePhase1 is True) flags.addFlag('Trigger.enableL1CaloLegacy', True) diff --git a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py index c0d820f0bf99b360c3e09626dbc52c7f677506f7..da1db7a592b5d58ecfc0f0308ad15e76a29c37a5 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py @@ -44,6 +44,7 @@ class opt: enableL1CaloPhase1 = False # Enable Run-3 LVL1 calo simulation and/or decoding enableL1CaloLegacy = True # Enable Run-2 L1Calo simulation and/or decoding (possible even if enablePhase1 is True) enableL1TopoDump = False # Enable L1Topo simulation to write inputs to txt + enableL1TopoBWSimulation = False # Enable bitwise L1Topo simulation enableL1NSWEmulation = False # Enable TGC-NSW coincidence emulator : ConfigFlags.Trigger.L1MuonSim.EmulateNSW enableL1NSWVetoMode = True # Enable TGC-NSW coincidence veto mode: ConfigFlags.Trigger.L1MuonSim.NSWVetoMode enableL1NSWMMTrigger = True # Enable MM trigger for TGC-NSW coincidence : ConfigFlags.Trigger.L1MuonSim.doMMTrigger @@ -239,6 +240,7 @@ if opt.enableL1MuonPhase1 is not None: ConfigFlags.Trigger.enableL1CaloPhase1 = opt.enableL1CaloPhase1 ConfigFlags.Trigger.enableL1CaloLegacy = opt.enableL1CaloLegacy ConfigFlags.Trigger.enableL1TopoDump = opt.enableL1TopoDump +ConfigFlags.Trigger.enableL1TopoBWSimulation = opt.enableL1TopoBWSimulation ConfigFlags.Trigger.L1MuonSim.EmulateNSW = opt.enableL1NSWEmulation ConfigFlags.Trigger.L1MuonSim.NSWVetoMode = opt.enableL1NSWVetoMode diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/CommonSequences/FullScanDefs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/CommonSequences/FullScanDefs.py index 18fa0685eddfe662b60d78e1f2d4d365f5c0c3a1..2d538bb0b83308aed2f7b14c9ff38e83f39f5e57 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/CommonSequences/FullScanDefs.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/CommonSequences/FullScanDefs.py @@ -4,11 +4,15 @@ # RoI used for the full-scan calorimeter step caloFSRoI = "FSJETMETCaloRoI" + # RoI used for the full-scan tracking step trkFSRoI = "FSJETMETTrkRoI" + # Name of the fullscan cells fs_cells = "CaloCellsFS" + # Name of the fullscan EM clusters em_clusters = "HLT_TopoCaloClustersFS" + # Name of the fullscan LC clusters -lc_clusters = "HLT_TopoCaloClustersLCFS" \ No newline at end of file +lc_clusters = "HLT_TopoCaloClustersLCFS" diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetChainConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetChainConfiguration.py index e0012d2e790d05e9d99407e246ad32d69365d171..1570148a4fd4478533f85c0cc8c06090bc8e5065 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetChainConfiguration.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetChainConfiguration.py @@ -133,23 +133,22 @@ class JetChainConfiguration(ChainConfigurationBase): chainSteps.append( jetPreselStep ) # Standard tracking step, configure the tracking instance differently # Later we should convert this to a preselection-style hypo - jetRoITrackingHypoStep = self.getJetRoITrackingHypoChainStep(preselJetDef.fullname()) - chainSteps.append( jetRoITrackingHypoStep ) + jetRoITrackJetTagHypoStep = self.getJetRoITrackJetTagHypoChainStep(preselJetDef.fullname()) + chainSteps.append( jetRoITrackJetTagHypoStep ) elif self.recoDict["trkopt"]=="ftf": if self.trkpresel=="nopresel": clustersKey, caloRecoStep = self.getJetCaloRecoChainStep() chainSteps.append( caloRecoStep ) #Add empty step to align with preselection step roitrkPreselStep = self.getEmptyStep(2, 'RoIFTFEmptyStep') - chainSteps.append( roitrkPreselStep ) else: clustersKey, preselJetDef, jetPreselStep = self.getJetCaloPreselChainStep() chainSteps.append( jetPreselStep ) if re.match(r'.*b\d+', self.trkpresel): - roitrkPreselStep = self.getJetRoiPreselChainStep(preselJetDef.fullname()) + roitrkPreselStep = self.getJetRoITrackJetTagPreselChainStep(preselJetDef.fullname()) else: roitrkPreselStep=self.getEmptyStep(2, 'RoIFTFEmptyStep') - chainSteps.append(roitrkPreselStep) + chainSteps.append(roitrkPreselStep) jetCollectionName, jetDef, jetFSTrackingHypoStep = self.getJetFSTrackingHypoChainStep(clustersKey) chainSteps.append( jetFSTrackingHypoStep ) else: @@ -192,12 +191,12 @@ class JetChainConfiguration(ChainConfigurationBase): return jetCollectionName, jetDef ,ChainStep(stepName, [jetSeq], multiplicity=[1], chainDicts=[self.dict]) - def getJetRoITrackingHypoChainStep(self, jetsInKey): + def getJetRoITrackJetTagHypoChainStep(self, jetsInKey): jetDefStr = JetRecoCommon.jetRecoDictToString(self.recoDict) stepName = "RoIFTFStep_jet_sel_"+jetDefStr - from TriggerMenuMT.HLT.Jet.JetMenuSequences import jetRoITrackingHypoMenuSequence - jetSeq = RecoFragmentsPool.retrieve( jetRoITrackingHypoMenuSequence, + from TriggerMenuMT.HLT.Jet.JetMenuSequences import jetRoITrackJetTagHypoMenuSequence + jetSeq = RecoFragmentsPool.retrieve( jetRoITrackJetTagHypoMenuSequence, ConfigFlags, isPresel=False, jetsIn=jetsInKey, **self.recoDict ) return ChainStep(stepName, [jetSeq], multiplicity=[1], chainDicts=[self.dict]) @@ -241,7 +240,7 @@ class JetChainConfiguration(ChainConfigurationBase): return str(clustersKey), jetDef, ChainStep(stepName, [jetSeq], multiplicity=[1], chainDicts=[self.dict]) - def getJetRoiPreselChainStep(self, jetsInKey): + def getJetRoITrackJetTagPreselChainStep(self, jetsInKey): #Find if a a4 or a10 calo jet needs to be used in the pre-selection from the last chain dict assert 'recoAlg' in self.trkpresel_parsed_reco.keys( @@ -255,13 +254,13 @@ class JetChainConfiguration(ChainConfigurationBase): #Getting the outcome of the regex reco option (it should correspond to a4 or a10 depending by which chain you are configuring) preselRecoDict = JetPresel.getPreselRecoDict(matched_reco.group(),roiftf=True) - assert preselRecoDict['trkopt'] == 'roiftf', 'getJetRoiPreselChainStep: you requested a RoI tracking preselection but the reco dictionary has \'trkopt\' set to {0}'.format(preselRecoDict['trkopt']) + assert preselRecoDict['trkopt'] == 'roiftf', 'getJetRoITrackJetTagPreselChainStep: you requested a RoI tracking preselection but the reco dictionary has \'trkopt\' set to {0}'.format(preselRecoDict['trkopt']) jetDefStr = JetRecoCommon.jetRecoDictToString(preselRecoDict) stepName = "RoIFTFStep_jet_"+jetDefStr - from TriggerMenuMT.HLT.Jet.JetMenuSequences import jetRoITrackingHypoMenuSequence - jetSeq = RecoFragmentsPool.retrieve(jetRoITrackingHypoMenuSequence, + from TriggerMenuMT.HLT.Jet.JetMenuSequences import jetRoITrackJetTagHypoMenuSequence + jetSeq = RecoFragmentsPool.retrieve(jetRoITrackJetTagHypoMenuSequence, ConfigFlags, jetsIn=jetsInKey, isPresel=True, **preselRecoDict) return ChainStep(stepName, [jetSeq], multiplicity=[1], chainDicts=[self.dict]) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetMenuSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetMenuSequences.py index 94cf99e9ea0493b93e2f5eaccb9fd4786fcbc8b8..1230ff95b6f86272d6ef2f654d33d85f6dbe2534 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetMenuSequences.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetMenuSequences.py @@ -9,8 +9,7 @@ from AthenaConfiguration.ComponentFactory import CompFactory from ..CommonSequences.FullScanDefs import trkFSRoI from TrigEDMConfig.TriggerEDMRun3 import recordable from .JetRecoCommon import jetRecoDictToString -from .JetRecoSequences import jetClusterSequence, jetCaloRecoSequences, jetTrackingRecoSequences, jetHICaloRecoSequences -from .JetTrackingConfig import JetRoITrackingSequence +from .JetRecoSequences import jetClusterSequence, jetCaloRecoSequences, jetTrackingRecoSequences, jetHICaloRecoSequences, JetRoITrackJetTagSequence, getJetViewAlg, getFastFtaggedJetCopyAlg # Hypo tool generators from TrigHLTJetHypo.TrigJetHypoToolConfig import trigJetHypoToolFromDict @@ -40,11 +39,31 @@ def getCaloInputMaker(): # Used for chains that use tracking def getTrackingInputMaker(trkopt): if trkopt=="ftf": - InputMakerAlg = conf2toConfigurable(CompFactory.InputMakerForRoI( - "IM_Jet_TrackingStep", - mergeUsingFeature = False, - RoITool = conf2toConfigurable(CompFactory.ViewCreatorInitialROITool()), - RoIs = trkFSRoI)) + + IDTrigConfig = getInDetTrigConfig( 'jet' ) + + log.info( "jet FS tracking: useDynamicRoiZWidth: %s", str(IDTrigConfig.useDynamicRoiZWidth) ) + + roiUpdater = None + if IDTrigConfig.useDynamicRoiZWidth: + roiUpdater = CompFactory.RoiUpdaterTool( useBeamSpot=True ) + + log.info( roiUpdater ) + + InputMakerAlg = conf2toConfigurable(CompFactory.InputMakerForRoI( "IM_Jet_TrackingStep", + mergeUsingFeature = False, + RoITool = conf2toConfigurable( CompFactory.ViewCreatorFSROITool( name="RoiTool_FS", + RoiUpdater=roiUpdater, + RoisWriteHandleKey=recordable( IDTrigConfig.roi ) ) ), + RoIs = trkFSRoI ) ) + else: + InputMakerAlg = conf2toConfigurable( CompFactory.InputMakerForRoI( "IM_Jet_TrackingStep", + mergeUsingFeature = False, + RoITool = conf2toConfigurable(CompFactory.ViewCreatorInitialROITool()), + RoIs = trkFSRoI) ) + + + elif trkopt=="roiftf": IDTrigConfig = getInDetTrigConfig( 'jetSuper' ) InputMakerAlg = EventViewCreatorAlgorithm( @@ -206,19 +225,30 @@ def jetFSTrackingHypoMenuSequence(configFlags, clustersKey, isPerf, **jetRecoDic # Presel jets to be reused, which makes ghost association impossible # Substitute DR association decorator -def jetRoITrackingHypoMenuSequence(configFlags, jetsIn, isPresel=True, **jetRecoDict): +def jetRoITrackJetTagHypoMenuSequence(configFlags, jetsIn, isPresel=True, **jetRecoDict): InputMakerAlg = getTrackingInputMaker(jetRecoDict['trkopt']) - # Get the track reconstruction sequence: jetTrkSeq is parOR of all needed track + f-tag reco algorithms - jetTrkSeq = RecoFragmentsPool.retrieve( - JetRoITrackingSequence, configFlags, jetsIn=jetsIn,trkopt=jetRecoDict["trkopt"], RoIs=InputMakerAlg.InViewRoIs) - InputMakerAlg.ViewNodeName = jetTrkSeq.name() jetDefString = jetRecoDictToString(jetRecoDict) log.debug("Generating jet tracking hypo menu sequence for reco %s",jetDefString) - jetAthMenuSeq = seqAND(f"jetRoITrackingHypo_{jetDefString}_MenuSequence", - [InputMakerAlg]+[jetTrkSeq]) + ftaggedJetsCopyAlg, ftaggedJetsIn = getFastFtaggedJetCopyAlg(configFlags,jetsIn=jetsIn,jetRecoDict=jetRecoDict) + ftaggedJetsIn=recordable(ftaggedJetsIn) + + # Get the track reconstruction sequence: jetTrkFtagSeq is parOR of all needed track + f-tag reco algorithms + jetTrkFtagSeq = RecoFragmentsPool.retrieve( + JetRoITrackJetTagSequence, configFlags, jetsIn=ftaggedJetsIn,trkopt=jetRecoDict["trkopt"], RoIs=InputMakerAlg.InViewRoIs) + InputMakerAlg.ViewNodeName = jetTrkFtagSeq.name() + + # Run the JetViewAlg sequence to filter out low pT jets + # Have to run it outside of JetRoITrackJetTagSequence (which runs in EventView), so that hypo recognises the filtered jets. + jetViewAlg, filtered_jetsIn = getJetViewAlg(configFlags,jetsIn=ftaggedJetsIn,**jetRecoDict) + + # NOTE: Forcing non-parallel reco seq here else we get stalls from the EventView algs executing before the JetCopyAlg. + jetAthRecoSeq = seqAND(f"jetRoITrackJetTagHypo_{jetDefString}_RecoSequence",[ftaggedJetsCopyAlg,jetTrkFtagSeq,jetViewAlg]) + + jetAthMenuSeq = seqAND(f"jetRoITrackJetTagHypo_{jetDefString}_MenuSequence", + [InputMakerAlg,jetAthRecoSeq]) # Needs track-to-jet association here, maybe with dR decorator hypoType = JetHypoAlgType.ROIPRESEL if isPresel else JetHypoAlgType.STANDARD - return makeMenuSequence(jetAthMenuSeq,InputMakerAlg,jetsIn,jetDefString,hypoType) + return makeMenuSequence(jetAthMenuSeq,InputMakerAlg,filtered_jetsIn,jetDefString,hypoType) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetRecoCommon.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetRecoCommon.py index 8834d15994f3a49386bb52285de89e4a5bd409b9..8a053c0c666b4a7c68f5857f118575e37029f5c8 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetRecoCommon.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetRecoCommon.py @@ -113,12 +113,15 @@ def jetDefNeedsTracks(jetRecoDict): # Check if track reconstruction is enabled def doTracking(jetRecoDict): return jetRecoDict["trkopt"]!="notrk" +# Check if full scan track reconstruction is enabled +def doFSTracking(jetRecoDict): + return jetRecoDict["trkopt"]=="ftf" # Check if constituent type is pflow. Concurrently check that the tracking option is valid. def isPFlow(jetRecoDict): isPFlow = jetRecoDict["constitType"] == "pf" - if isPFlow and not doTracking(jetRecoDict): - raise ValueError("This is a PFlow chain but no tracking option is given!") + if isPFlow and not doFSTracking(jetRecoDict): + raise ValueError("This is a PFlow chain but an incompatible tracking option is given!") return isPFlow # return the min jet pT in MeV for the configured recoAlg @@ -269,17 +272,22 @@ def getModSpec(modname,modspec=''): # Get list of jet attributes to be calculated for jet def getDecorList(jetRecoDict): # Basic jet info provided by the jet builder - decorlist = [ 'AlgorithmType', 'InputType', + decorlist = [] + + # return empty list for non-calibrated jets + if jetRecoDict['jetCalib'] == 'nojcalib': return decorlist + + decorlist += [ 'AlgorithmType', 'InputType', 'ActiveArea', 'ActiveArea4vec_eta', 'ActiveArea4vec_m', 'ActiveArea4vec_phi', 'ActiveArea4vec_pt', - 'EMFrac','HECFrac','JvtRpt','EnergyPerSampling'] + 'EMFrac','HECFrac','EnergyPerSampling'] - if doTracking(jetRecoDict): - decorlist += ["GhostTrack", + if doFSTracking(jetRecoDict): + decorlist += ["GhostTrack_ftf", "NumTrkPt500","NumTrkPt1000", "SumPtTrkPt500","SumPtTrkPt1000", "TrackWidthPt1000", - "JVFCorr", "Jvt"] + "JVFCorr", "JvtRpt", "Jvt"] if isPFlow(jetRecoDict): decorlist += ["SumPtChargedPFOPt500"] return decorlist @@ -368,7 +376,7 @@ def defineJetConstit(jetRecoDict,clustersKey=None,pfoPrefix=None): # Arbitrary min pt for fastjet, set to be low enough for MHT(?) # Could/should adjust higher for large-R -def defineJets(jetRecoDict,clustersKey=None,prefix='',pfoPrefix=None): +def defineJets(jetRecoDict,clustersKey=None,prefix='',suffix='',pfoPrefix=None): minpt = { 4: 7000, 10: 50000, @@ -377,10 +385,9 @@ def defineJets(jetRecoDict,clustersKey=None,prefix='',pfoPrefix=None): actualradius = float(jetradius)/10 jetConstit = defineJetConstit(jetRecoDict,clustersKey,pfoPrefix) - suffix="_"+jetRecoDict["jetCalib"] + suffix="_"+jetRecoDict["jetCalib"]+'_'*(suffix.strip()!='')+suffix if jetDefNeedsTracks(jetRecoDict): suffix += "_{}".format(jetRecoDict["trkopt"]) - jetDef = JetDefinition( "AntiKt", actualradius, jetConstit, ptmin=minpt[jetradius], prefix=prefix, suffix=suffix, context=jetRecoDict["trkopt"]) return jetDef diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetRecoSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetRecoSequences.py index ec7d72d15ff7d89885ba6c1eb7ca4aa57a39941a..8f9788a735213026e1992d75825b5238ca7ca53e 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetRecoSequences.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetRecoSequences.py @@ -14,6 +14,12 @@ from TrigEDMConfig.TriggerEDMRun3 import recordable from . import JetRecoCommon from TriggerMenuMT.HLT.CommonSequences.CaloSequences import caloClusterRecoSequence, LCCaloClusterRecoSequence from eflowRec.PFHLTSequence import PFHLTSequence +from eflowRec.PFHLTSequence import trackvtxcontainers +from TrigInDetConfig.ConfigSettings import getInDetTrigConfig +from TrigInDetConfig.InDetTrigFastTracking import makeInDetTrigFastTracking, makeInDetTrigFastTrackingNoView +from TrigInDetConfig.InDetTrigVertices import makeInDetTrigVertices +from .JetTrackingConfig import jetTTVA +from JetRec.JetRecConf import JetViewAlg # this code uses CA internally, needs to be in this context manager, # at least until ATLASRECTS-6635 is closed @@ -52,10 +58,28 @@ def jetRecoSequence( configFlags, clustersKey, **jetRecoDict ): configFlags, dataSource=dataSource, clustersKey=clustersKey, **jetRecoDict) else: - return RecoFragmentsPool.retrieve( - standardJetRecoSequence, - configFlags, dataSource=dataSource, - clustersKey=clustersKey, **jetRecoDict) + jetRecoSeq, jetsIn, jetDef = RecoFragmentsPool.retrieve( + standardJetRecoSequence, + configFlags, dataSource=dataSource, + clustersKey=clustersKey, **jetRecoDict) + return jetRecoSeq, jetsIn, jetDef + +# Get a configured JetViewAlg that creates a VIEW_ELEMENTS container of jets above a minimum jet pT +# Filtered jets are given to hypo. +# jetPtMin is minimum jet pt in GeV for jets to be seen by hypo +def getJetViewAlg(configFlags,jetsIn,jetPtMin=10,**jetRecoDict): + + decorList = JetRecoCommon.getDecorList(jetRecoDict) + filteredJetsName = f"{jetsIn}_pt{int(jetPtMin)}" + jetViewAlg= JetViewAlg("jetview_"+filteredJetsName, + InputContainer=jetsIn, + OutputContainer=filteredJetsName, + PtMin=jetPtMin*1e3, #MeV + DecorDeps=decorList + ) + jetsOut = filteredJetsName + + return jetViewAlg,jetsOut def standardJetBuildSequence( configFlags, dataSource, clustersKey, **jetRecoDict ): """This build the standard jet (not groomed or reclustered). @@ -70,7 +94,7 @@ def standardJetBuildSequence( configFlags, dataSource, clustersKey, **jetRecoDic jetDefString = JetRecoCommon.jetRecoDictToString(jetRecoDict) buildSeq = parOR( "JetBuildSeq_"+jetDefString, []) - doesTracking = JetRecoCommon.doTracking(jetRecoDict) + doesFSTracking = JetRecoCommon.doFSTracking(jetRecoDict) context = JetRecoCommon.getJetContext(jetRecoDict) @@ -93,7 +117,7 @@ def standardJetBuildSequence( configFlags, dataSource, clustersKey, **jetRecoDic # build the list of jetModifiers. # Sort and filter jetModList = ["Sort", "Filter:"+str(JetRecoCommon.getFilterCut(jetRecoDict["recoAlg"])), "ConstitFourMom_copy"] - if doesTracking: + if doesFSTracking: jetModList += ["TrackMoments", "JVF", "JVT"] if jetRecoDict["recoAlg"] == "a4": @@ -155,10 +179,6 @@ def standardJetBuildSequence( configFlags, dataSource, clustersKey, **jetRecoDic def standardJetRecoSequence( configFlags, dataSource, clustersKey, **jetRecoDict ): jetDefString = JetRecoCommon.jetRecoDictToString(jetRecoDict) - if jetRecoDict["jetCalib"]=="nojcalib": - return RecoFragmentsPool.retrieve( standardJetBuildSequence, configFlags, dataSource=dataSource, - clustersKey=clustersKey,**jetRecoDict) - # Schedule reconstruction w/o calibration # This is just a starting point -- will change so that # the calibration is only ever done at the end for ungroomed @@ -169,6 +189,13 @@ def standardJetRecoSequence( configFlags, dataSource, clustersKey, **jetRecoDict clustersKey=clustersKey, **_jetRecoDictNoJCalib) recoSeq = parOR( "JetRecSeq_"+jetDefString, [buildSeq]) + + # prepare and return here if original calibration is nojcalib - no further calibration or modifiers required + if jetRecoDict["jetCalib"]=="nojcalib": + jetViewAlg, jetsOut = getJetViewAlg(configFlags,jetsIn=jetDefNoCalib.fullname(),**jetRecoDict) + recoSeq += jetViewAlg + return recoSeq, jetsOut, jetDefNoCalib + # Get the calibration tool if desired. jetDef = jetDefNoCalib.clone() jetDef.suffix = jetDefNoCalib.suffix.replace("nojcalib",jetRecoDict["jetCalib"]) @@ -188,9 +215,8 @@ def standardJetRecoSequence( configFlags, dataSource, clustersKey, **jetRecoDict jetDef.modifiers = JetRecoCommon.getCalibMods(jetRecoDict,dataSource,rhoKey) # If we need JVT, just rerun the JVT modifier decorList = JetRecoCommon.getDecorList(jetRecoDict) - decorList.append("GhostTrack_ftf") - if JetRecoCommon.doTracking(jetRecoDict): + if JetRecoCommon.doFSTracking(jetRecoDict): jetDef.modifiers.append("JVT") #Configuring jet cleaning mods now if not JetRecoCommon.isPFlow(jetRecoDict) and jetRecoDict['recoAlg']=='a4': #Add jet cleaning decorations only to small-R non-PFlow jets for now @@ -225,16 +251,8 @@ def standardJetRecoSequence( configFlags, dataSource, clustersKey, **jetRecoDict ) recoSeq += jetFTagSeq - jetPtMin = 10e3 # 10 GeV minimum pt for jets to be seen by hypo - from JetRec.JetRecConf import JetViewAlg - filteredJetsName = jetDef.fullname()+"_pt10" - recoSeq += JetViewAlg("jetview_"+filteredJetsName, - InputContainer=jetDef.fullname(), - OutputContainer=filteredJetsName, - PtMin=jetPtMin, - DecorDeps=decorList - ) - jetsOut = filteredJetsName + jetViewAlg, jetsOut = getJetViewAlg(configFlags,jetsIn=jetDef.fullname(),**jetRecoDict) + recoSeq += jetViewAlg # End of basic jet reco return recoSeq, jetsOut, jetDef @@ -263,7 +281,6 @@ def jetCaloRecoSequences( configFlags, RoIs, **jetRecoDict ): log.debug("Generating jetCaloRecoSequences for configuration %s",JetRecoCommon.jetRecoDictToString(jetRecoDict)) # Get the topocluster reconstruction sequence - from .JetRecoSequences import jetClusterSequence, jetRecoSequence topoClusterSequence, clustersKey = RecoFragmentsPool.retrieve( jetClusterSequence, configFlags, RoIs=RoIs, clusterCalib=jetRecoDict["clusterCalib"]) @@ -300,22 +317,75 @@ def getFastFlavourTaggingSequence( dummyFlags, name, inputJets, inputVertex, inp return jetFFTSeq -# This sets up the reconstruction where tracks are required. +# Returns reco sequence for full scan track & primary vertex reconstruction +def JetFSTrackingSequence(dummyFlags,trkopt,RoIs): + + IDTrigConfig = getInDetTrigConfig( 'jet' ) + + trackcollmap = None + + viewAlgs = makeInDetTrigFastTrackingNoView( config = IDTrigConfig, rois=RoIs) + + # add the collections for the eflowRec reconstriction in the trigger + trackvtxcontainers[trkopt] = ( IDTrigConfig.tracks_FTF(), IDTrigConfig.vertex_jet ) + + vtxAlgs = makeInDetTrigVertices( "jet", IDTrigConfig.tracks_FTF(), IDTrigConfig.vertex_jet, IDTrigConfig, IDTrigConfig.adaptiveVertex_jet ) + + # now run the actual vertex finders and TTVA tools + if IDTrigConfig.vertex_jet != IDTrigConfig.vertex: + vtxAlgs += makeInDetTrigVertices( "amvf", IDTrigConfig.tracks_FTF(), IDTrigConfig.vertex, IDTrigConfig, IDTrigConfig.adaptiveVertex ) + + jetTrkSeq = parOR(f"JetFSTracking_{trkopt}_RecoSequence", viewAlgs+vtxAlgs) + trackcollmap = jetTTVA( "jet", jetTrkSeq, trkopt, IDTrigConfig, verticesname=IDTrigConfig.vertex_jet, adaptiveVertex=IDTrigConfig.adaptiveVertex_jet ) + + return jetTrkSeq, trackcollmap + + +def getFastFtaggedJetCopyAlg(dummyFlags,jetsIn,jetRecoDict): + + caloJetRecoDict = JetRecoCommon.jetRecoDictFromString(jetsIn) + caloJetDef = JetRecoCommon.defineJets(caloJetRecoDict,clustersKey=JetRecoCommon.getClustersKey(caloJetRecoDict),prefix=jetNamePrefix,suffix='fastftag') + decorList = JetRecoCommon.getDecorList(jetRecoDict) + copyJetAlg = JetRecConfig.getJetCopyAlg(jetsin=jetsIn,jetsoutdef=caloJetDef,decorations=decorList) + ftaggedJetsIn = caloJetDef.fullname() + return copyJetAlg,ftaggedJetsIn + +# Returns reco sequence for RoI-based track reco + low-level flavour tagging +def JetRoITrackJetTagSequence(dummyFlags,jetsIn,trkopt,RoIs): + + IDTrigConfig = getInDetTrigConfig( 'jetSuper' ) + + viewAlgs, viewVerify = makeInDetTrigFastTracking( config = IDTrigConfig, rois=RoIs) + viewVerify.DataObjects += [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+%s' % RoIs ),( 'xAOD::JetContainer' , 'StoreGateSvc+%s' % jetsIn)] + + IDTrigConfig = getInDetTrigConfig('jetSuper') + tracksIn = IDTrigConfig.tracks_FTF() + + jetTrkSeq=getFastFlavourTaggingSequence( + dummyFlags, + f"JetRoITrackJetTag_{trkopt}_RecoSequence", + jetsIn, + "", + tracksIn, + addAlgs=viewAlgs, + ) + + return jetTrkSeq + +# This sets up the reconstruction where full scan tracks are required. # Topoclustering will not be scheduled, we just pass in the name of the cluster collection. def jetTrackingRecoSequences(configFlags, RoIs, clustersKey, **jetRecoDict): - if not JetRecoCommon.doTracking(jetRecoDict): - raise ValueError("Jet reco with tracks called without a tracking option!") + if not JetRecoCommon.doFSTracking(jetRecoDict): + raise ValueError("Jet reco with tracks called without full scan tracking option 'ftf'!") log.debug("Generating jetTrackingRecoSequences for configuration %s",JetRecoCommon.jetRecoDictToString(jetRecoDict)) # Get the track reconstruction sequence - from .JetTrackingConfig import JetFSTrackingSequence (jetTrkSeq, trkcolls) = RecoFragmentsPool.retrieve( JetFSTrackingSequence, configFlags, trkopt=jetRecoDict["trkopt"], RoIs=RoIs) # Get the jet reconstruction sequence including the jet definition and output collection # Pass in the cluster and track collection names - from .JetRecoSequences import jetRecoSequence jetRecoSeq, jetsOut, jetDef = RecoFragmentsPool.retrieve( jetRecoSequence, configFlags, clustersKey=clustersKey, **trkcolls, **jetRecoDict ) @@ -371,13 +441,9 @@ def reclusteredJetRecoSequence( configFlags, dataSource, clustersKey, **jetRecoD **basicJetRecoDict) recoSeq += basicJetRecoSequence - rcJetPtMin = 15e3 # 15 GeV minimum pt for jets to be reclustered - from JetRec.JetRecConf import JetViewAlg - filteredJetsName = basicJetDef.fullname()+"_pt15" - recoSeq += JetViewAlg("jetview_"+filteredJetsName, - InputContainer=basicJetDef.fullname(), - OutputContainer=filteredJetsName, - PtMin=rcJetPtMin) + rcJetPtMin = 15 # 15 GeV minimum pt for jets to be reclustered + jetViewAlg, filteredJetsName = getJetViewAlg(configFlags,jetsIn=basicJetDef.fullname(),jetPtMin=rcJetPtMin,**jetRecoDict) + recoSeq+=jetViewAlg rcJetDef = JetRecoCommon.defineReclusteredJets(jetRecoDict, filteredJetsName, basicJetDef.inputdef.label, jetNamePrefix, '_'+jetRecoDict["jetCalib"]) rcModList = [] # Could set substructure mods @@ -393,7 +459,7 @@ def reclusteredJetRecoSequence( configFlags, dataSource, clustersKey, **jetRecoD rcJetDef._internalAtt['finalPJContainer'] = rcConstitPJKey # Depending on whether running the trackings step - ftf_suffix = "" if not JetRecoCommon.doTracking(jetRecoDict) else "_ftf" + ftf_suffix = "" if not JetRecoCommon.doFSTracking(jetRecoDict) else "_ftf" rcJetRecAlg = JetRecConfig.getJetRecAlg(rcJetDef, monTool, ftf_suffix) recoSeq += conf2toConfigurable( rcJetRecAlg ) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetRecoSequencesConfig.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetRecoSequencesConfig.py index 088c09c7162fc93be8bba6c26b121e288947b3a8..2d1e7eff1b25f9b0b3c67217c6c86a3cbe2e9378 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetRecoSequencesConfig.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetRecoSequencesConfig.py @@ -14,7 +14,7 @@ from .JetRecoCommon import ( defineGroomedJets, defineReclusteredJets, isPFlow, - doTracking + doFSTracking ) from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory @@ -71,8 +71,8 @@ def StandardJetBuildCfg(flags, dataSource, clustersKey, trkcolls=None, **jetReco """ acc = ComponentAccumulator() - use_tracking = doTracking(jetRecoDict) - if use_tracking and not trkcolls: + use_FS_tracking = doFSTracking(jetRecoDict) + if use_FS_tracking and not trkcolls: raise ValueError( f"No track collections supplied for trkopt {jetRecoDict['trkopt']}" ) @@ -114,7 +114,7 @@ def StandardJetBuildCfg(flags, dataSource, clustersKey, trkcolls=None, **jetReco ] if jetRecoDict["recoAlg"] == "a4": jetDef.modifiers += ["CaloEnergies"] # needed for GSC - if use_tracking: + if use_FS_tracking: jetDef.modifiers += getTrackMods(jetRecoDict["trkopt"]) jetsOut = recordable(jetDef.fullname()) @@ -137,7 +137,7 @@ def StandardJetBuildCfg(flags, dataSource, clustersKey, trkcolls=None, **jetReco pj_name = pj_alg.OutputContainer.Path acc.addEventAlgo(pj_alg) - if use_tracking: + if use_FS_tracking: # Make sure that the jets are constructed with the ghost tracks included merge_alg = CompFactory.PseudoJetMerger( @@ -196,13 +196,13 @@ def StandardJetRecoCfg(flags, dataSource, clustersKey, trkcolls=None, **jetRecoD # If we need JVT rerun the JVT modifier - use_tracking = doTracking(jetRecoDict) + use_FS_tracking = doFSTracking(jetRecoDict) is_pflow = isPFlow(jetRecoDict) decorList = getDecorList(jetRecoDict) jetDef.modifiers = getCalibMods(jetRecoDict, dataSource, rhoKey) - if use_tracking: + if use_FS_tracking: jetDef.modifiers += [f"JVT:{jetRecoDict['trkopt']}"] if not is_pflow and jetRecoDict["recoAlg"] == "a4": diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetTrackingConfig.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetTrackingConfig.py index a9ebf70cea4ed51772211de2aeb47a107077d6a0..6d491ccf6c31cb8b18b61fe090d061e6b7ec7dd2 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetTrackingConfig.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetTrackingConfig.py @@ -2,12 +2,10 @@ # Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration # -from AthenaCommon.CFElements import parOR - -from JetRecTools import JetRecToolsConfig as jrtcfg +from JetRecTools import JetRecToolsConfig +from AthenaConfiguration.AllConfigFlags import ConfigFlags from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator, conf2toConfigurable -from TrigInDetConfig.InDetTrigVertices import makeInDetTrigVertices from TrigInDetConfig.ConfigSettings import getInDetTrigConfig @@ -27,7 +25,6 @@ def retrieveJetContext(trkopt): if trkopt not in jetContextDic: # ***************** # Set the options corresponding to trkopt to a new entry in jetContextDic - from TrigInDetConfig.ConfigSettings import getInDetTrigConfig IDTrigConfig = getInDetTrigConfig( 'jet' ) tracksname = IDTrigConfig.tracks_FTF() @@ -56,70 +53,10 @@ def retrieveJetContext(trkopt): return jetContextDic[trkopt], jetContextDic["trackKeys"] -def JetFSTrackingSequence(dummyFlags,trkopt,RoIs): - - from TrigInDetConfig.ConfigSettings import getInDetTrigConfig - # We really want jet, but that does more stuff (Hit-based DV wants L1 JET RoIs) so try bjet for now - # Alternatively we could add the L1 JET RoIs to the ViewDataVerifier - IDTrigConfig = getInDetTrigConfig( 'jet' ) - - trackcollmap = None - - from TrigInDetConfig.InDetTrigFastTracking import makeInDetTrigFastTrackingNoView - viewAlgs = makeInDetTrigFastTrackingNoView( config = IDTrigConfig, rois=RoIs) - - # add the collections for the eflowRec reconstriction in the trigger - - from eflowRec.PFHLTSequence import trackvtxcontainers - trackvtxcontainers[trkopt] = ( IDTrigConfig.tracks_FTF(), IDTrigConfig.vertex_jet ) - - vtxAlgs = makeInDetTrigVertices( "jet", IDTrigConfig.tracks_FTF(), IDTrigConfig.vertex_jet, IDTrigConfig, IDTrigConfig.adaptiveVertex_jet ) - - # now run he actual vertex finders and TTVA tools - if IDTrigConfig.vertex_jet != IDTrigConfig.vertex: - vtxAlgs += makeInDetTrigVertices( "amvf", IDTrigConfig.tracks_FTF(), IDTrigConfig.vertex, IDTrigConfig, IDTrigConfig.adaptiveVertex ) - - jetTrkSeq = parOR(f"JetFSTracking_{trkopt}_RecoSequence", viewAlgs+vtxAlgs) - trackcollmap = jetTTVA( "jet", jetTrkSeq, trkopt, IDTrigConfig, verticesname=IDTrigConfig.vertex_jet, adaptiveVertex=IDTrigConfig.adaptiveVertex_jet ) - - return jetTrkSeq, trackcollmap - - -def JetRoITrackingSequence(dummyFlags,jetsIn,trkopt,RoIs): - - IDTrigConfig = getInDetTrigConfig( 'jetSuper' ) - - # Note: import here is required because this isn't safe for "new" - # job options: it uses `include`. Apparently the new job options - # import this file but don't use this function, so we can hide - # imports here. - from TrigInDetConfig.InDetTrigFastTracking import makeInDetTrigFastTracking - viewAlgs, viewVerify = makeInDetTrigFastTracking( config = IDTrigConfig, rois=RoIs) - viewVerify.DataObjects += [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+%s' % RoIs ),( 'xAOD::JetContainer' , 'StoreGateSvc+%s' % jetsIn)] - - IDTrigConfig = getInDetTrigConfig('jetSuper') - tracksIn = IDTrigConfig.tracks_FTF() - - #importing here getFastFlavourTaggingSequence to avoid breaking newJO - from .JetRecoSequences import getFastFlavourTaggingSequence - - jetTrkSeq=getFastFlavourTaggingSequence( - dummyFlags, - f"JetRoITracking_{trkopt}_RecoSequence", - jetsIn, - "", - tracksIn, - addAlgs=viewAlgs, - ) - - return jetTrkSeq - - @AccumulatorCache def JetFSTrackingCfg(flags, trkopt, RoIs): """ Create the tracking CA and return it as well as the output name dictionary """ acc = ComponentAccumulator() - from TrigInDetConfig.ConfigSettings import getInDetTrigConfig IDTrigConfig = getInDetTrigConfig( 'jet' ) if trkopt == "ftf": from TrigInDetConfig.TrigInDetConfig import trigInDetFastTrackingCfg @@ -181,11 +118,11 @@ def jetTTVA( signature, jetseq, trkopt, config, verticesname=None, adaptiveVerte # ***************************** # Jet track selection algorithm - jettrackselalg = jrtcfg.getTrackSelAlg( trkopt ) + jettrackselalg = JetRecToolsConfig.getTrackSelAlg( trkopt ) # ***************************** # Track-vtx association. - jettrkprepalg = jrtcfg.getJetTrackVtxAlg(trkopt, algname="jetalg_TrackPrep"+trkopt, + jettrkprepalg = JetRecToolsConfig.getJetTrackVtxAlg(trkopt, algname="jetalg_TrackPrep"+trkopt, # # parameters for the CP::TrackVertexAssociationTool (or the TrackVertexAssociationTool.getTTVAToolForReco function) : #WorkingPoint = "Nonprompt_All_MaxWeight", # this is the new default in offline (see also CHS configuration in StandardJetConstits.py) WorkingPoint = "Custom", @@ -209,10 +146,9 @@ def jetTTVA( signature, jetseq, trkopt, config, verticesname=None, adaptiveVerte jetseq += conf2toConfigurable( jettrkprepalg ) jetseq += conf2toConfigurable( pjgalg ) - from AthenaConfiguration.AllConfigFlags import ConfigFlags if ConfigFlags.Trigger.Jet.doVRJets: - pv0_jettvassoc, pv0_ttvatool = jrtcfg.getPV0TrackVertexAssoAlg(trkopt, jetseq) - pv0trackselalg = jrtcfg.getPV0TrackSelAlg(pv0_ttvatool, trkopt) + pv0_jettvassoc, pv0_ttvatool = JetRecToolsConfig.getPV0TrackVertexAssoAlg(trkopt, jetseq) + pv0trackselalg = JetRecToolsConfig.getPV0TrackSelAlg(pv0_ttvatool, trkopt) jetseq += conf2toConfigurable( pv0_jettvassoc ) jetseq += conf2toConfigurable( pv0trackselalg ) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/MET/METRecoSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/MET/METRecoSequences.py index d4dc7c3ce70da5eac44f107ede0798488e7b7139..14b549a6219e0dcc2523e638139e0d12471cac7b 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/MET/METRecoSequences.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/MET/METRecoSequences.py @@ -196,7 +196,7 @@ class TrackingInputConfig(AlgInputConfig): return [] def create_sequence(self, inputs, RoIs, recoDict): - from ..Jet.JetTrackingConfig import JetFSTrackingSequence + from ..Jet.JetRecoSequences import JetFSTrackingSequence trkSeq, trkColls = RecoFragmentsPool.retrieve( JetFSTrackingSequence, flags=ConfigFlags, trkopt="ftf", RoIs=RoIs diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Menu/Dev_pp_run3_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Menu/Dev_pp_run3_v1.py index 96cb2b5657d5bbd3c372b1e70f30cc78f8f89dbd..83c2599ce6a294230457bfa4830b6a486fbda0dd 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Menu/Dev_pp_run3_v1.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Menu/Dev_pp_run3_v1.py @@ -289,9 +289,6 @@ def setupMenu(): # Prototyping RoI jet tracking ChainProp(name="HLT_j80_pf_ftf_preselj20_L1J20", l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+DevGroup), ChainProp(name="HLT_j80_pf_ftf_preselj20b95_L1J20", l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+DevGroup), - ### !! hacky chain to fix ATR-25449 temporarily for SampleA - ChainProp(name="HLT_j2000_pf_ftf_preselj2b77_L1RD0_FILLED", l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+DevGroup), - ### !! ChainProp(name="HLT_j80_pf_ftf_preselj20b77_L1J20", l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+DevGroup), ChainProp(name="HLT_j80_roiftf_preselj20_L1J20", l1SeedThresholds=['FSNOSEED'], groups=SingleJetGroup+DevGroup), diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Menu/PhysicsP1_pp_run3_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Menu/PhysicsP1_pp_run3_v1.py index 1b69767bbbd4ce5aebe2ac14f3353850ac315fde..cb603172d00fcc38c3dddefc318c0ad4ca3c6da1 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Menu/PhysicsP1_pp_run3_v1.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Menu/PhysicsP1_pp_run3_v1.py @@ -44,7 +44,6 @@ def addP1Signatures(chains): # ATR-20650 ChainProp(name='HLT_mu0_muoncalib_L1MU3V_EMPTY', stream=['Muon_Calibration'], groups=['PS:Online', 'RATE:Muon_Calibration','BW:Muon']), ChainProp(name='HLT_mu0_muoncalib_L1MU14FCH', stream=['Muon_Calibration'], groups=['PS:Online', 'RATE:Muon_Calibration','BW:Muon']), - ] chainsP1['Egamma'] = [ diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Menu/Physics_pp_run3_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Menu/Physics_pp_run3_v1.py index 19b498f45b7deada5c738301ca6938a75b533037..43ff05ff89a798005996a8cff8534064051e4d95 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Menu/Physics_pp_run3_v1.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Menu/Physics_pp_run3_v1.py @@ -232,6 +232,9 @@ def setupMenu(): # ATR-24367 (express stream for ID) ChainProp(name='HLT_mu14_mu14_idperf_50invmAB130_L12MU8F', l1SeedThresholds=['MU8F','MU8F'], stream=[PhysicsStream,'express'], groups=MultiMuonGroup+SupportGroup, monGroups=['idMon:shifter']), ChainProp(name='HLT_mu4_mu4_idperf_1invmAB5_L12MU3VF', l1SeedThresholds=['MU3VF','MU3VF'], stream=[PhysicsStream,'express'], groups=MultiMuonGroup+SupportGroup, monGroups=['idMon:t0']), + + # ATR-25219, 1mu, for alignment run + ChainProp(name='HLT_mu15_mucombTag_L1MU20VFC',groups=['PS:Online']+SingleMuonGroup+SupportGroup) ] chains['Egamma'] = [ @@ -463,6 +466,7 @@ def setupMenu(): ChainProp(name='HLT_e5_idperf_tight_nogsf_L1eEM5', groups=SingleElectronGroup+SupportPhIGroup, monGroups=['idMon:t0']), ChainProp(name='HLT_e5_idperf_loose_lrtloose_L1eEM5', groups=SingleElectronGroup+SupportPhIGroup, monGroups=['idMon:shifter']), ChainProp(name='HLT_e26_idperf_loose_L1eEM26M', groups=SingleElectronGroup+SupportPhIGroup), + ChainProp(name='HLT_e26_idperf_tight_nogsf_L1eEM26M', groups=SingleElectronGroup+SupportPhIGroup, monGroups=['idMon:shifter']), ChainProp(name='HLT_e26_idperf_tight_L1eEM26M', stream=[PhysicsStream,'express'], groups=SingleElectronGroup+SupportPhIGroup, monGroups=['idMon:shifter']), ChainProp(name='HLT_e60_idperf_medium_L1eEM26M', groups=SingleElectronGroup+SupportPhIGroup, monGroups=['idMon:t0']), ChainProp(name='HLT_e60_idperf_medium_nogsf_L1eEM26M', groups=SingleElectronGroup+SupportPhIGroup, monGroups=['idMon:t0']), @@ -1256,7 +1260,7 @@ def setupMenu(): ChainProp(name="HLT_tau35_perf_tracktwoMVABDT_L1cTAU30M", groups=SupportPhIGroup+SingleTauGroup, monGroups=['tauMon:t0']), ChainProp(name="HLT_tau35_mediumRNN_tracktwoMVABDT_L1cTAU30M", groups=SupportPhIGroup+SingleTauGroup, monGroups=['tauMon:t0']), - ChainProp(name="HLT_tau80_idperf_tracktwoMVABDT_L1eTAU60", stream=[PhysicsStream,'express'], groups=SingleTauGroup+SupportPhIGroup), + ChainProp(name="HLT_tau80_idperf_tracktwoMVABDT_L1eTAU80", stream=[PhysicsStream,'express'], groups=SingleTauGroup+SupportPhIGroup), # Monitoring and backup MVA for Phase-1 ChainProp(name='HLT_tau20_mediumRNN_tracktwoMVA_L1eTAU12', groups=SupportPhIGroup+SingleTauGroup), diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Menu/SignatureDicts.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Menu/SignatureDicts.py index c183d0e0556a4f8fe1085ef96b699f7c9e34c6a6..ded49714636e5f4309b270d09d9f287a9089f5d6 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Menu/SignatureDicts.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Menu/SignatureDicts.py @@ -274,7 +274,10 @@ JetChainParts = { 'jvt' : # Jet Vertex Tagger pileup discriminant ['010jvt', '011jvt', '015jvt', '020jvt', '050jvt', '059jvt'], 'momCuts' : # Generic moment cut on single jets - ['050momemfrac100', 'momhecfrac010', '050momemfrac100XXmomhecfrac010'], + ['050momemfrac100', 'momhecfrac010', '050momemfrac100XXmomhecfrac010'], + 'timing' : # delayed jets + ['2timing'], + 'prefilters' : # Pre-hypo jet selectors (including cleaning) ['CLEANlb', 'CLEANllp', 'MASK300ceta210XX300nphi10', # ptrangeXrY (X, Y matches regex \d+) triggers a prehypo selection of @@ -328,6 +331,7 @@ JetChainParts_Default = { 'etaRange' : '0eta320', 'jvt' : '', 'momCuts' : '', + 'timing' : '', 'prefilters' : [], 'bdips' : '', 'hypoScenario' : 'simple', @@ -369,7 +373,7 @@ MuonChainParts = { 'etaRange' : ['0eta105'], 'threshold' : '', 'tnpInfo' : ['probe'], - 'extra' : ['noL1', 'lateMu', "muoncalib" ,'noL2Comb','vtx'], + 'extra' : ['noL1', 'lateMu', "muoncalib" ,'noL2Comb','vtx','mucombTag'], 'IDinfo' : [], 'isoInfo' : ['ivarloose', 'ivarmedium', 'ivarperf','iloosems'], 'l2AlgInfo' : ['l2io','l2mt'], diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Muon/MuonChainConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Muon/MuonChainConfiguration.py index 5e945d82b947f1107ec674a0146cadca55a1d3a1..ce30d06c0dd101bfe44ead4abd5ec3d4f7eba1c7 100755 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Muon/MuonChainConfiguration.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Muon/MuonChainConfiguration.py @@ -142,6 +142,7 @@ class MuonChainConfiguration(ChainConfigurationBase): "lateMu":['getLateMuRoI','getLateMu'], #late muon triggers "muoncalib":['getmuFast'], #calibration "vtx":['getmuRoiClu'], #LLP Trigger + "mucombTag":['getmuFast', muCombStep], #Trigger for alignment } return stepDictionary