diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref index 1c48b6daf6fc81979a43eb58d13571f38abae22f..0d9014873a8844b853ae8da701fe5377830ea757 100644 --- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref +++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref @@ -682,6 +682,20 @@ HLT_e26_lhtight_L1EM22VHI: 2: 6 3: 4 4: 4 +HLT_e26_lhtight_gsf_L1EM22VHI: + eventCount: 4 + stepCounts: + 0: 5 + 1: 4 + 2: 4 + 3: 4 + 4: 4 + stepFeatures: + 0: 5 + 1: 6 + 2: 6 + 3: 4 + 4: 4 HLT_e26_lhtight_ivarloose_L1EM22VHI: eventCount: 3 stepCounts: diff --git a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref index 4a0b0fb8a4f79a708e67221d65ea58f016935063..37eee4a0f8284ffa3d34eb612713e8e1250afcb5 100644 --- a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref +++ b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref @@ -328,6 +328,8 @@ HLT_e26_lhtight_L1EM15VH: eventCount: 0 HLT_e26_lhtight_L1EM22VHI: eventCount: 0 +HLT_e26_lhtight_gsf_L1EM22VHI: + eventCount: 0 HLT_e26_lhtight_ivarloose_L1EM22VHI: eventCount: 0 HLT_e26_lhtight_ivarmedium_L1EM22VHI: diff --git a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py index 97d157309544005369f79c0f7828f76a2fcd8b4d..c04e02bd203df09ac37a00dc354af0bede42d8da 100644 --- a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py +++ b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py @@ -128,7 +128,9 @@ TriggerHLTListRun3 = [ ('xAOD::TrackParticleContainer#HLT_IDTrack_Electron_IDTrig', 'BS ESD AODFULL', 'Egamma', 'inViews:precisionEtcutViews'), ('xAOD::TrackParticleAuxContainer#HLT_IDTrack_Electron_IDTrigAux.', 'BS ESD AODFULL', 'Egamma'), - + + ('xAOD::TrackParticleContainer#HLT_IDTrack_Electron_GSF', 'BS ESD AODFULL', 'Egamma', 'inViews:precisionElectronViews_GSF'), + ('xAOD::TrackParticleAuxContainer#HLT_IDTrack_Electron_GSFAux.', 'BS ESD AODFULL', 'Egamma'), # these two corresponds to the output of the precisionCalo step ('xAOD::CaloClusterContainer#HLT_CaloEMClusters', 'BS ESD AODFULL', 'Egamma', 'inViews:precisionCaloViews'), @@ -148,6 +150,8 @@ TriggerHLTListRun3 = [ # These are for precision photon and precision Electron Keeping same names as in Run2 ('xAOD::ElectronContainer#HLT_egamma_Electrons', 'BS ESD AODFULL', 'Egamma', 'inViews:precisionElectronViews'), ('xAOD::ElectronAuxContainer#HLT_egamma_ElectronsAux.', 'BS ESD AODFULL', 'Egamma'), + ('xAOD::ElectronContainer#HLT_egamma_Electrons_GSF', 'BS ESD AODFULL', 'Egamma', 'inViews:precisionElectronViews_GSF'), + ('xAOD::ElectronAuxContainer#HLT_egamma_Electrons_GSFAux.', 'BS ESD AODFULL', 'Egamma'), # enable when iso chains are present # ('xAOD::ElectronContainer#HLT_egamma_Iso_Electrons', 'BS ESD AODFULL', 'Egamma', 'inViews:precisionIsoElectronViews'), # ('xAOD::ElectronTrigAuxContainer#HLT_egamma_Iso_ElectronsAux.', 'BS ESD AODFULL', 'Egamma'), diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/EgammaDefs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/EgammaDefs.py index 5fa74ab7687d7d0e18285847ef021abbb2cd8ad9..33ac0be2f0a921871b1688c231761346544ab7fd 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/EgammaDefs.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/EgammaDefs.py @@ -4,9 +4,10 @@ # Static classes to configure photon chain container names #---------------------------------------------------------------- +from TrigEDMConfig.TriggerEDMRun3 import recordable + class TrigEgammaKeys(object): """Static class to collect all string manipulation in Electron sequences """ - from TrigEDMConfig.TriggerEDMRun3 import recordable SuperElectronRecCollectionName = 'HLT_ElectronSuperRecCollection' outputElectronKey = recordable('HLT_egamma_Electrons') SuperPhotonRecCollectionName = 'HLT_PhotonSuperRecCollection' @@ -15,10 +16,17 @@ class TrigEgammaKeys(object): outputClusterKey = 'HLT_egammaClusters' outputTopoSeededClusterKey = 'HLT_egammaTopoSeededClusters' TrigEMClusterToolOutputContainer = 'HLT_TrigEMClusterOutput' - TrigElectronTracksCollectionName = 'HLT_IDTrack_Electron_IDTrig' + TrigElectronTracksCollectionName = recordable('HLT_IDTrack_Electron_IDTrig') pidVersion = 'rel21_20180312' +class TrigEgammaKeys_GSF(object): + """Static class to collect all string manipulation in Electron sequences """ + outputElectronKey_GSF = recordable('HLT_egamma_Electrons_GSF') + outputTrackKey_GSF = 'HLT_IDTrkTrack_Electron_GSF' + outputTrackParticleKey_GSF = recordable('HLT_IDTrack_Electron_GSF') + + def TrigElectronSelectors(sel): import logging diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py index 2cd2fadec6b5d8376e3fc70e63abe6fd7189f9cd..f1087e5e0a93893e49bc55e507266a1b67ae23c2 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py @@ -11,6 +11,7 @@ from TriggerMenuMT.HLTMenuConfig.CommonSequences.CaloSequenceSetup import fastCa from TriggerMenuMT.HLTMenuConfig.Egamma.ElectronSequenceSetup import fastElectronMenuSequence from TriggerMenuMT.HLTMenuConfig.Egamma.PrecisionCaloSequenceSetup import precisionCaloMenuSequence from TriggerMenuMT.HLTMenuConfig.Egamma.PrecisionElectronSequenceSetup import precisionElectronMenuSequence +from TriggerMenuMT.HLTMenuConfig.Egamma.PrecisionElectronSequenceSetup_GSF import precisionElectronMenuSequence_GSF from TriggerMenuMT.HLTMenuConfig.Egamma.PrecisionTrackingSequenceSetup import precisionTrackingMenuSequence from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool, defineHistogram @@ -34,6 +35,9 @@ def precisionTrackingSequenceCfg( flags ): def precisionElectronSequenceCfg( flags ): return precisionElectronMenuSequence() +def precisionGSFElectronSequenceCfg( flags ): + return precisionElectronMenuSequence_GSF() + # this must be moved to the HypoTool file: def diElectronMassComboHypoToolFromDict(chainDict): @@ -88,10 +92,25 @@ class ElectronChainConfiguration(ChainConfigurationBase): 'lhtightivarloose' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionElectron'], 'lhtightivarmedium' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionElectron'], 'lhtightivartight' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionElectron'], + # gsf sequences. For now just settin gup as normal non-gsf chains + 'lhloosegsf' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'], + 'lhvloosegsf' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'], + 'lhmediumgsf' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'], + 'lhtightgsf' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'], + 'lhloosegsfivarloose' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'], + 'lhloosegsfivarmedium' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'], + 'lhloosegsfivartight' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'], + 'lhlmediumgsfivarloose' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'], + 'lhlmediumgsfivarmedium': ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'], + 'lhlmediumgsfivartight' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'], + 'lhtightgsfivarloose' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'], + 'lhtightgsfivarmedium' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'], + 'lhtightgsfivartight' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionTracking', 'getPrecisionGSFElectron'], + } log.debug('electron chain part = %s', self.chainPart) - key = self.chainPart['extra'] + self.chainPart['IDinfo'] + self.chainPart['L2IDAlg'] + self.chainPart['isoInfo'] + key = self.chainPart['extra'] + self.chainPart['IDinfo'] + self.chainPart['L2IDAlg'] + self.chainPart['isoInfo'] + self.chainPart['trkInfo'] for addInfo in self.chainPart['addInfo']: @@ -145,3 +164,14 @@ class ElectronChainConfiguration(ChainConfigurationBase): stepName = "precision_electron"+isocut return self.getStep(5,stepName,[ precisionElectronSequenceCfg]) + def getPrecisionGSFElectron(self): + + isocut = self.chainPart['isoInfo'] + log.debug(' isolation cut = ' + str(isocut)) + + if "Zee" in self.chainName: + stepName = "precision_topoelectron_GSF"+isocut + return self.getStep(5,stepName,sequenceCfgArray=[precisionGSFElectronSequenceCfg], comboTools=[diElectronMassComboHypoToolFromDict]) + else: + stepName = "precision_electron_GSF"+isocut + return self.getStep(5,stepName,[ precisionGSFElectronSequenceCfg]) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PrecisionElectronSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PrecisionElectronSequenceSetup.py index 332c5fc44181e7f6bd823397bf02d3a3153d8f74..ef7b200b835d8a56bfff17a7aa4056754336f45a 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PrecisionElectronSequenceSetup.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PrecisionElectronSequenceSetup.py @@ -12,7 +12,7 @@ from DecisionHandling.DecisionHandlingConf import ViewCreatorPreviousROITool def precisionElectronSequence(ConfigFlags): - """ fourth step: precision electron.....""" + """ fifth step: precision electron.....""" InViewRoIs = "precisionElectron" # EVCreator: precisionElectronViewsMaker = EventViewCreatorAlgorithm("IMprecisionElectron") @@ -40,7 +40,7 @@ def precisionElectronMenuSequence(): # make the Hypo from TrigEgammaHypo.TrigEgammaHypoConf import TrigEgammaPrecisionElectronHypoAlgMT - thePrecisionElectronHypo = TrigEgammaPrecisionElectronHypoAlgMT("TrigEgammaPrecisionElectronHypoAlgMT") + thePrecisionElectronHypo = TrigEgammaPrecisionElectronHypoAlgMT("TrigEgammaPrecisionElectronHypoAlgMT_noGSF") thePrecisionElectronHypo.Electrons = sequenceOut thePrecisionElectronHypo.RunInView = True @@ -52,3 +52,4 @@ def precisionElectronMenuSequence(): HypoToolGen = TrigEgammaPrecisionElectronHypoToolFromDict ) + diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PrecisionElectronSequenceSetup_GSF.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PrecisionElectronSequenceSetup_GSF.py new file mode 100644 index 0000000000000000000000000000000000000000..7f39e31df3ac1707d0588042622862e68fadf19b --- /dev/null +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PrecisionElectronSequenceSetup_GSF.py @@ -0,0 +1,57 @@ +# +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# + +from AthenaConfiguration.AllConfigFlags import ConfigFlags + +# menu components +from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import MenuSequence, RecoFragmentsPool +from AthenaCommon.CFElements import parOR, seqAND +from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm +from DecisionHandling.DecisionHandlingConf import ViewCreatorPreviousROITool + + +def precisionElectronSequence_GSF(ConfigFlags): + """ + Similar setup as ../PrecisionElectronSequenceSetup.py; tailored for GSF chains + """ + InViewRoIs = "precisionElectron" + # EVCreator: + precisionElectronViewsMaker = EventViewCreatorAlgorithm("IMprecisionElectron_GSF") + precisionElectronViewsMaker.RoIsLink = "initialRoI" + precisionElectronViewsMaker.RoITool = ViewCreatorPreviousROITool() + precisionElectronViewsMaker.InViewRoIs = InViewRoIs + precisionElectronViewsMaker.Views = "precisionElectronViews_GSF" #precisionElectronViews_GSF + precisionElectronViewsMaker.ViewFallThrough = True + precisionElectronViewsMaker.RequireParentView = True + + # Configure the reconstruction algorithm sequence + from TriggerMenuMT.HLTMenuConfig.Electron.PrecisionElectronRecoSequences_GSF import precisionElectronRecoSequence_GSF + (electronPrecisionRec, sequenceOut) = precisionElectronRecoSequence_GSF(InViewRoIs) + + electronPrecisionInViewAlgs = parOR("electronPrecisionInViewAlgs_GSF", [electronPrecisionRec]) + precisionElectronViewsMaker.ViewNodeName = "electronPrecisionInViewAlgs_GSF" + + electronPrecisionAthSequence = seqAND("electronPrecisionAthSequence_GSF", [precisionElectronViewsMaker, electronPrecisionInViewAlgs ] ) + return (electronPrecisionAthSequence, precisionElectronViewsMaker, sequenceOut) + + +def precisionElectronMenuSequence_GSF(): + # retrieve the reco seuqence+EVC + (electronPrecisionAthSequence, precisionElectronViewsMaker, sequenceOut) = RecoFragmentsPool.retrieve(precisionElectronSequence_GSF, ConfigFlags) + + # make the Hypo + from TrigEgammaHypo.TrigEgammaHypoConf import TrigEgammaPrecisionElectronHypoAlgMT + thePrecisionElectronHypo = TrigEgammaPrecisionElectronHypoAlgMT("TrigEgammaPrecisionElectronHypoAlgMT_GSF") + thePrecisionElectronHypo.Electrons = sequenceOut + thePrecisionElectronHypo.RunInView = True + + from TrigEgammaHypo.TrigEgammaPrecisionElectronHypoTool import TrigEgammaPrecisionElectronHypoToolFromDict + + return MenuSequence( Maker = precisionElectronViewsMaker, + Sequence = electronPrecisionAthSequence, + Hypo = thePrecisionElectronHypo, + HypoToolGen = TrigEgammaPrecisionElectronHypoToolFromDict ) + + + diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/TrigEgammaFactories.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/TrigEgammaFactories.py index afbde59905740bdb11f284f37e23afb7afb7b586..0b9ebbffe454946ade18483fc1eee37a7f565262 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/TrigEgammaFactories.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/TrigEgammaFactories.py @@ -174,6 +174,7 @@ def TrigPhotonIsoBuilderCfg(name='TrigPhotonIsolationBuilder'): return TrigPhotonIsolationBuilder() + def TrigEgammaDecorationTools(): #Return a list with the tools that decorate both electrons and photons. return [ EMFourMomBuilder() ] @@ -186,3 +187,5 @@ def TrigElectronDecorationTools(): #Return a list with the tools that decorate only photons return [ ElectronPIDBuilder()] + + diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/PrecisionElectronRecoSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/PrecisionElectronRecoSequences.py index 1e795360a20c67197c4c4330e0dca7e97698b49d..e72d715774f2b0708f94c6999e0ee0638766941f 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/PrecisionElectronRecoSequences.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/PrecisionElectronRecoSequences.py @@ -13,7 +13,7 @@ def precisionElectronRecoSequence(RoIs): Sequence of algorithms is the following: - egammaRecBuilder/TrigEgammaRecElectron creates egammaObjects out of clusters and tracks. - - electronSuperClusterBuilder algorithm will create superclusters out of the toposlusters and tracks in egammaRec under the electron hypothesis + - electronSuperClusterBuilder algorithm will create superclusters out of the topoclusters and tracks in egammaRec under the electron hypothesis https://gitlab.cern.ch/atlas/athena/blob/master/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py#L26 - TopoEgammBuilder will create photons and electrons out of trakcs and SuperClusters. Here at HLT electrons the aim is to ignore photons. https://gitlab.cern.ch/atlas/athena/blob/master/Reconstruction/egamma/egammaAlgs/src/topoEgammaBuilder.cxx @@ -25,7 +25,7 @@ def precisionElectronRecoSequence(RoIs): # First the data verifiers: # Here we define the data dependencies. What input needs to be available for the Fexs (i.e. TopoClusters from precisionCalo) in order to run from TriggerMenuMT.HLTMenuConfig.Egamma.PrecisionCaloSequenceSetup import precisionCaloMenuDefs - + # precision Tracking related data dependencies from TriggerMenuMT.HLTMenuConfig.Egamma.EgammaDefs import TrigEgammaKeys @@ -38,47 +38,53 @@ def precisionElectronRecoSequence(RoIs): """ Retrieve the factories now """ from TriggerMenuMT.HLTMenuConfig.Electron.TrigElectronFactories import TrigEgammaRecElectron, TrigElectronSuperClusterBuilder, TrigTopoEgammaElectronCfg - from TriggerMenuMT.HLTMenuConfig.Egamma.TrigEgammaFactories import TrigEMTrackMatchBuilder - - #The sequence of these algorithms - thesequence = parOR( "precisionElectron_%s" % RoIs) - - thesequence += ViewVerifyTrk + from TriggerMenuMT.HLTMenuConfig.Egamma.TrigEgammaFactories import TrigEMTrackMatchBuilder, TrigElectronIsoBuilderCfg + # Create the sequence of three steps: # - TrigEgammaRecElectron, TrigElectronSuperClusterBuilder, TrigTopoEgammaElectron - trackMatchBuilder = TrigEMTrackMatchBuilder() - trackMatchBuilder.TrackParticlesName = TrigEgammaKeys.TrigElectronTracksCollectionName - TrigEgammaAlgo = TrigEgammaRecElectron() - - TrigEgammaAlgo.InputTopoClusterContainerName = precisionCaloMenuDefs.precisionCaloClusters - TrigEgammaAlgo.TrackMatchBuilderTool = trackMatchBuilder - thesequence += TrigEgammaAlgo - - trigElectronAlgo = TrigElectronSuperClusterBuilder() - - trigElectronAlgo.InputEgammaRecContainerName = TrigEgammaAlgo.egammaRecContainer - thesequence += trigElectronAlgo - trigTopoEgammaAlgo = TrigTopoEgammaElectronCfg() - trigTopoEgammaAlgo.SuperElectronRecCollectionName = trigElectronAlgo.SuperElectronRecCollectionName - collectionOut = trigTopoEgammaAlgo.ElectronOutputName - thesequence += trigTopoEgammaAlgo + # Create the sequence of three steps: + # - TrigEgammaRecElectron, TrigElectronSuperClusterBuilder, TrigTopoEgammaElectron + #The sequence of these algorithms + thesequence = parOR( "precisionElectron%s" % RoIs) + thesequence += ViewVerifyTrk - from TriggerMenuMT.HLTMenuConfig.Egamma.TrigEgammaFactories import TrigElectronIsoBuilderCfg - isoBuilder = TrigElectronIsoBuilderCfg() + ## TrigEMTrackMatchBuilder_noGSF ## + TrigEMTrackMatchBuilder = TrigEMTrackMatchBuilder("TrigEMTrackMatchBuilder_noGSF") + TrigEMTrackMatchBuilder.TrackParticlesName = TrigEgammaKeys.TrigElectronTracksCollectionName + + ## TrigEgammaRecElectron_noGSF ## + TrigEgammaRecAlgo = TrigEgammaRecElectron("TrigEgammaRecElectron_noGSF") + thesequence += TrigEgammaRecAlgo + TrigEgammaRecAlgo.TrackMatchBuilderTool = TrigEMTrackMatchBuilder + TrigEgammaRecAlgo.InputTopoClusterContainerName = precisionCaloMenuDefs.precisionCaloClusters + + ## TrigElectronSuperClusterBuilder_noGSF ## + TrigSuperElectronAlgo = TrigElectronSuperClusterBuilder("TrigElectronSuperClusterBuilder_noGSF") + thesequence += TrigSuperElectronAlgo + TrigSuperElectronAlgo.InputEgammaRecContainerName = TrigEgammaRecAlgo.egammaRecContainer + TrigSuperElectronAlgo.TrackMatchBuilderTool = TrigEMTrackMatchBuilder + + ## TrigTopoEgammaElectronCfg_noGSF ## + TrigTopoEgammaAlgo = TrigTopoEgammaElectronCfg("TrigTopoEgammaElectronCfg_noGSF") + thesequence += TrigTopoEgammaAlgo + TrigTopoEgammaAlgo.SuperElectronRecCollectionName = TrigSuperElectronAlgo.SuperElectronRecCollectionName + collectionOut = TrigTopoEgammaAlgo.ElectronOutputName + + ## TrigElectronIsoBuilderCfg_noGSF ## + isoBuilder = TrigElectronIsoBuilderCfg("TrigElectronIsoBuilderCfg_noGSF") thesequence += isoBuilder #online monitoring for topoEgammaBuilder from TriggerMenuMT.HLTMenuConfig.Electron.TrigElectronFactories import PrecisionElectronTopoMonitorCfg PrecisionElectronRecoMonAlgo = PrecisionElectronTopoMonitorCfg() - PrecisionElectronRecoMonAlgo.ElectronKey = trigTopoEgammaAlgo.ElectronOutputName + PrecisionElectronRecoMonAlgo.ElectronKey = TrigTopoEgammaAlgo.ElectronOutputName thesequence += PrecisionElectronRecoMonAlgo #online monitoring for TrigElectronSuperClusterBuilder from TriggerMenuMT.HLTMenuConfig.Electron.TrigElectronFactories import PrecisionElectronSuperClusterMonitorCfg PrecisionElectronSuperClusterMonAlgo = PrecisionElectronSuperClusterMonitorCfg() - PrecisionElectronSuperClusterMonAlgo.InputEgammaRecContainerName = trigElectronAlgo.SuperElectronRecCollectionName + PrecisionElectronSuperClusterMonAlgo.InputEgammaRecContainerName = TrigSuperElectronAlgo.SuperElectronRecCollectionName thesequence += PrecisionElectronSuperClusterMonAlgo - return (thesequence, collectionOut) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/PrecisionElectronRecoSequences_GSF.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/PrecisionElectronRecoSequences_GSF.py new file mode 100644 index 0000000000000000000000000000000000000000..9cec71f80791d6fc8f9ee606a59c4d30f2b9ec4b --- /dev/null +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/PrecisionElectronRecoSequences_GSF.py @@ -0,0 +1,85 @@ +# +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# + +from AthenaCommon.CFElements import parOR + +#logging +from AthenaCommon.Logging import logging +log = logging.getLogger( 'TriggerMenuMT.HLTMenuConfig.Egamma.PrecisionElectronRecoSequences_GSF') + +def precisionElectronRecoSequence_GSF(RoIs): + """ + Similar reconstruction sequence as ../PrecisionElectronRecoSequences.py, tailored to run GSF + """ + + log.debug('precisionElectronRecoSequence_GSF(RoIs = %s)',RoIs) + + import AthenaCommon.CfgMgr as CfgMgr + # First the data verifiers: + # Here we define the data dependencies. What input needs to be available for the Fexs (i.e. TopoClusters from precisionCalo) in order to run + from TriggerMenuMT.HLTMenuConfig.Egamma.PrecisionCaloSequenceSetup import precisionCaloMenuDefs + + # precision Tracking related data dependencies + from TriggerMenuMT.HLTMenuConfig.Egamma.EgammaDefs import TrigEgammaKeys, TrigEgammaKeys_GSF + + ViewVerifyTrk_GSF = CfgMgr.AthViews__ViewDataVerifier("PrecisionTrackViewDataVerifier_GSF") + + ViewVerifyTrk_GSF.DataObjects = [( 'CaloCellContainer' , 'StoreGateSvc+CaloCells' ), + ( 'xAOD::CaloClusterContainer' , 'StoreGateSvc+%s' % precisionCaloMenuDefs.precisionCaloClusters ), + ( 'xAOD::TrackParticleContainer','StoreGateSvc+%s' % TrigEgammaKeys.TrigElectronTracksCollectionName), + # verifier object needed by GSF + ( 'SG::AuxElement' , 'StoreGateSvc+EventInfo.averageInteractionsPerCrossing' ), + ( 'TRT_RDO_Container' , 'StoreGateSvc+TRT_RDOs' ), + ( 'IDCInDetBSErrContainer' , 'StoreGateSvc+PixelByteStreamErrs' ), + ( 'InDet::PixelGangedClusterAmbiguities' , 'StoreGateSvc+PixelClusterAmbiguitiesMap' ), + ( 'InDet::PixelGangedClusterAmbiguities' , 'StoreGateSvc+SplitClusterAmbiguityMap' ), + ( 'InDet::TRT_DriftCircleContainer' , 'StoreGateSvc+TRT_DriftCircles' ), + ( 'SG::AuxElement' , 'StoreGateSvc+EventInfo.AveIntPerXDecor' )] + + + """ Retrieve the factories now """ + from TriggerMenuMT.HLTMenuConfig.Electron.TrigElectronFactories import TrigEgammaRecElectron, TrigElectronSuperClusterBuilder, TrigTopoEgammaElectronCfg + from TriggerMenuMT.HLTMenuConfig.Egamma.TrigEgammaFactories import TrigEMTrackMatchBuilder, TrigElectronIsoBuilderCfg + + # Create the sequence of three steps: + # - TrigEgammaRecElectron, TrigElectronSuperClusterBuilder, TrigTopoEgammaElectron + + + from TriggerMenuMT.HLTMenuConfig.Electron.TrigEMBremCollectionBuilder import TrigEMBremCollectionBuilder + # Create the sequence of steps: + # - TrigEgammaRecElectron, TrigElectronSuperClusterBuilder, TrigTopoEgammaElectron + #The sequence of these algorithms + thesequence_GSF = parOR( "precisionElectron_GSF%s" % RoIs) + thesequence_GSF += ViewVerifyTrk_GSF + + ## TrigEMBremCollectionBuilder ## + track_GSF = TrigEMBremCollectionBuilder() + thesequence_GSF += track_GSF + + ## TrigEMTrackMatchBuilder_GSF ## + TrigEMTrackMatchBuilder_GSF = TrigEMTrackMatchBuilder("TrigEMTrackMatchBuilder_GSF") + TrigEMTrackMatchBuilder_GSF.TrackParticlesName = track_GSF.OutputTrkPartContainerName + + ## TrigEgammaRecElectron_GSF ## + TrigEgammaRecAlgo_GSF = TrigEgammaRecElectron("TrigEgammaRecElectron_GSF") + thesequence_GSF += TrigEgammaRecAlgo_GSF + TrigEgammaRecAlgo_GSF.TrackMatchBuilderTool = TrigEMTrackMatchBuilder_GSF + TrigEgammaRecAlgo_GSF.InputTopoClusterContainerName = precisionCaloMenuDefs.precisionCaloClusters + + ## TrigElectronSuperClusterBuilder_GSF ## + TrigSuperElectronAlgo_GSF = TrigElectronSuperClusterBuilder("TrigElectronSuperClusterBuilder_GSF") + thesequence_GSF += TrigSuperElectronAlgo_GSF + TrigSuperElectronAlgo_GSF.TrackMatchBuilderTool = TrigEMTrackMatchBuilder_GSF + + ## TrigTopoEgammaElectronCfg_GSF ## + TrigTopoEgammaAlgo_GSF = TrigTopoEgammaElectronCfg("TrigTopoEgammaElectronCfg_GSF") + thesequence_GSF += TrigTopoEgammaAlgo_GSF + TrigTopoEgammaAlgo_GSF.ElectronOutputName = TrigEgammaKeys_GSF.outputElectronKey_GSF + collectionOut_GSF = TrigTopoEgammaAlgo_GSF.ElectronOutputName + + ## TrigElectronIsoBuilderCfg_GSF ## + isoBuilder_GSF = TrigElectronIsoBuilderCfg("TrigElectronIsoBuilderCfg_GSF") + thesequence_GSF += isoBuilder_GSF + isoBuilder_GSF.ElectronCollectionContainerName = TrigEgammaKeys_GSF.outputElectronKey_GSF + return (thesequence_GSF, collectionOut_GSF) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/TrigEMBremCollectionBuilder.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/TrigEMBremCollectionBuilder.py new file mode 100644 index 0000000000000000000000000000000000000000..0f3e3789730449a0404ffc117fe2d395647562d0 --- /dev/null +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/TrigEMBremCollectionBuilder.py @@ -0,0 +1,146 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +__doc__ = """ToolFactory to instantiate TrigEMBremCollectionBuilder +with default configuration""" + +import InDetRecExample.TrackingCommon as TrackingCommon +from AthenaCommon.DetFlags import DetFlags +from AthenaCommon.Logging import logging +# import base class +from egammaAlgs import egammaAlgsConf +from egammaRec.Factories import AlgFactory +from egammaTools.egammaExtrapolators import (AtlasPublicExtrapolator, + egammaExtrapolator) + +# default configuration of the EMBremCollectionBuilder +from InDetRecExample.InDetJobProperties import InDetFlags +from RecExConfig.RecFlags import rec +from TriggerMenuMT.HLTMenuConfig.Egamma.EgammaDefs import TrigEgammaKeys_GSF + +class TrigEgammaBremCollectionBuilder (egammaAlgsConf.EMBremCollectionBuilder): + __slots__ = () + + def __init__(self, name="TrigEgammaBremCollectionBuilder", **kw): + mlog = logging.getLogger(name + '::__init__') + mlog.info("entering") + + super(TrigEgammaBremCollectionBuilder, self).__init__(name, **kw) + + import egammaRec.EMCommonRefitter + # import TriggerMenuMT.HLTMenuConfig.Electron.TrigEMCommonRefitter as TrigEMCommonRefitter + # Extrapolator to be used for GSF (private) + GSFBuildInDetExtrapolator = egammaExtrapolator() + + # GsfReffiter (private not in ToolSvc) + from egammaTrackTools.egammaTrackToolsConf import egammaTrkRefitterTool + GSFRefitterTool = egammaTrkRefitterTool( + name='GSFRefitterTool', + FitterTool=egammaRec.EMCommonRefitter.getGSFTrackFitter(), + #FitterTool=TrigEMCommonRefitter.getGSFTrackFitter(), + useBeamSpot=False, + Extrapolator=GSFBuildInDetExtrapolator, + ReintegrateOutliers=True) + + # + # BLayer and Pixel Related Tools (private = True) + # + GSFBuildTestBLayerTool = None + GSFBuildPixelToTPIDTool = None + if DetFlags.haveRIO.pixel_on(): + GSFPixelConditionsSummaryTool = ( + TrackingCommon.getInDetPixelConditionsSummaryTool()) + if InDetFlags.usePixelDCS(): + GSFPixelConditionsSummaryTool.IsActiveStates = [ + 'READY', 'ON', 'UNKNOWN', 'TRANSITION', 'UNDEFINED'] + GSFPixelConditionsSummaryTool.IsActiveStatus = [ + 'OK', 'WARNING', 'ERROR', 'FATAL'] + + GSFBuildTestBLayerTool = TrackingCommon.getInDetRecTestBLayerTool( + name="GSFBuildTestBLayerTool", + PixelSummaryTool=GSFPixelConditionsSummaryTool, + Extrapolator=GSFBuildInDetExtrapolator, + private=True) + + GSFBuildPixelToTPIDTool = TrackingCommon.getInDetPixelToTPIDTool( + name="GSFBuildPixelToTPIDTool", + private=True) + # + # TRT_ElectronPidTool (private =True) + # + GSFBuildTRT_ElectronPidTool = None + if DetFlags.haveRIO.TRT_on() and not InDetFlags.doSLHC( + ) and not InDetFlags.doHighPileup(): + GSFBuildTRT_ElectronPidTool = ( + TrackingCommon.getInDetTRT_ElectronPidTool( + name="GSFBuildTRT_ElectronPidTool", + private=True)) + + # + # InDet Track Summary Helper, no Association and no hole + # as we do not redo them (private = true) + # + GSFBuildTrackSummaryHelperTool = TrackingCommon.getInDetSummaryHelper( + name="GSFBuildTrackSummaryHelperTool", + AssoTool=None, + HoleSearch=None, + PixelToTPIDTool=GSFBuildPixelToTPIDTool, + TestBLayerTool=GSFBuildTestBLayerTool, + isHLT = True, + DoSharedHits=False, + private=True) + + # + # TrkTrackSummaryTool: no shared hits no hole search + # + GSFBuildInDetTrigTrackSummaryTool = ( + TrackingCommon.getInDetTrackSummaryTool( + name="GSFBuildInDetTrigTrackSummaryTool", + InDetSummaryHelperTool=GSFBuildTrackSummaryHelperTool, + doSharedHits=False, + doHolesInDet=False, + TRT_ElectronPidTool=GSFBuildTRT_ElectronPidTool, + PixelToTPIDTool=GSFBuildPixelToTPIDTool, + private=True) + ) + + # + # Track Particle Creator tool (private not in ToolSvc) + # But needs a public extrapolator + # + from TrkParticleCreator.TrkParticleCreatorConf import ( + Trk__TrackParticleCreatorTool) + + GSFBuildInDetParticleCreatorTool = Trk__TrackParticleCreatorTool( + name="GSFBuildInDetParticleCreatorTool", + KeepParameters=True, + Extrapolator=AtlasPublicExtrapolator(), + UseTrackSummaryTool=False) + # + # Track slimming (private not in ToolSvc) + # + from TrkTrackSlimmingTool.TrkTrackSlimmingToolConf import ( + Trk__TrackSlimmingTool as ConfigurableTrackSlimmingTool) + GSFBuildInDetTrkSlimmingTool = ConfigurableTrackSlimmingTool( + name="GSFBuildInDetTrackSlimmingTool", + KeepParameters=False, + KeepOutliers=True) + # + # Default Configuration + # + self.TrackRefitTool = GSFRefitterTool + self.TrackParticleCreatorTool = GSFBuildInDetParticleCreatorTool + self.TrackSlimmingTool = GSFBuildInDetTrkSlimmingTool + self.TrackSummaryTool = GSFBuildInDetTrigTrackSummaryTool + +""" This is an instance of GSF fitter tool will be used on track particles """ +TrigEMBremCollectionBuilder = AlgFactory(TrigEgammaBremCollectionBuilder, + doAdd = False, + name='TrigEMBremCollectionBuilder', + TrackParticleContainerName="HLT_IDTrack_Electron_IDTrig", + SelectedTrackParticleContainerName="HLT_IDTrack_Electron_IDTrig", + OutputTrkPartContainerName = TrigEgammaKeys_GSF.outputTrackParticleKey_GSF, + OutputTrackContainerName=TrigEgammaKeys_GSF.outputTrackKey_GSF, + DoTruth=rec.doTruth(), + usePixel=DetFlags.haveRIO.pixel_on(), + useSCT=DetFlags.haveRIO.SCT_on() + ) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py index 3010ba64162c359f3f60a639ada9126d27e6d715..eed3f74a05793348dfd36ba8d5a1442b35d6baf5 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py @@ -115,7 +115,7 @@ def setupMenu(): ChainProp(name='HLT_e5_lhmedium_L1EM3', groups=SingleElectronGroup), ChainProp(name='HLT_e5_lhtight_L1EM3', groups=SingleElectronGroup), ChainProp(name='HLT_e5_lhtight_nod0_L1EM3', groups=SingleElectronGroup), - + # Primary ChainProp(name='HLT_e17_lhvloose_nod0_L1EM15VH', groups=SingleElectronGroup), ChainProp(name='HLT_e24_lhvloose_L1EM20VH', groups=SingleElectronGroup), @@ -125,7 +125,7 @@ def setupMenu(): ChainProp(name='HLT_e26_lhloose_L1EM22VHI', groups=SingleElectronGroup), ChainProp(name='HLT_e26_lhmedium_L1EM22VHI', groups=SingleElectronGroup), ChainProp(name='HLT_e26_lhtight_L1EM22VHI', groups=SingleElectronGroup), - #ChainProp(name='HLT_e26_lhtight_gsf_L1EM22VHI', groups=SingleElectronGroup), Placeholder for GSF chain + ChainProp(name='HLT_e26_lhtight_gsf_L1EM22VHI', groups=SingleElectronGroup), #Placeholder for GSF chain ChainProp(name='HLT_e26_lhtight_ivarloose_L1EM22VHI', groups=SingleElectronGroup), ChainProp(name='HLT_e26_lhtight_ivarmedium_L1EM22VHI', groups=SingleElectronGroup), ChainProp(name='HLT_e26_lhtight_ivartight_L1EM22VHI', groups=SingleElectronGroup), diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py index 22cb4f5be5a7d7df402402e4b0305a0aa93b5782..ea2d5c08347ca558f1cd67851e61e95d3a1809a9 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py @@ -385,7 +385,7 @@ ElectronChainParts = { 'etaRange' : [], 'IDinfo' : ['lhvloose','lhloose','lhmedium','lhtight'], 'isoInfo' : ['ivarloose','ivarmedium','ivartight'], - 'trkInfo' : ['nod0', 'idperf', 'gsf'], + 'trkInfo' : ['idperf', 'gsf'], 'caloInfo' : [], 'lhInfo' : [], 'L2IDAlg' : ['noringer'],