diff --git a/Reconstruction/Jet/JetCalibTools/python/JetCalibToolsConfig.py b/Reconstruction/Jet/JetCalibTools/python/JetCalibToolsConfig.py index f85a90b9e5ae64d6536c3414c00f7ce404190f60..bbb25889e44f87e93d0506963f17ca4037128504 100644 --- a/Reconstruction/Jet/JetCalibTools/python/JetCalibToolsConfig.py +++ b/Reconstruction/Jet/JetCalibTools/python/JetCalibToolsConfig.py @@ -25,6 +25,7 @@ pflowcontexts = { "T0":("JES_MC15cRecommendation_PFlow_Aug2016_rel21.config","00-04-77","JetArea_Residual_EtaJES"), # Omit smearing, to avoid any efficiency loss "AnalysisLatest":("JES_data2017_2016_2015_Consolidated_PFlow_2018_Rel21.config","00-04-82","JetArea_Residual_EtaJES_GSC_Insitu"), + "TrigLS2":("JES_MC16Recommendation_Consolidated_PFlow_Apr2019_Rel21_Trigger.config","00-04-82","JetArea_Residual_EtaJES_GSC_Insitu"), } topocontexts = { diff --git a/Reconstruction/Jet/JetMomentTools/python/JetMomentToolsConfig.py b/Reconstruction/Jet/JetMomentTools/python/JetMomentToolsConfig.py index 58348c5602d26d32e64e5b0963fe10766abf0442..010fcc69f87bb3df12bc082cb1fd170138023372 100644 --- a/Reconstruction/Jet/JetMomentTools/python/JetMomentToolsConfig.py +++ b/Reconstruction/Jet/JetMomentTools/python/JetMomentToolsConfig.py @@ -18,24 +18,16 @@ from JetMomentTools import JetMomentToolsConf # Testing code -- move to another module and perhaps allow extensions # e.g. in a dedicated trigger collections module to keep online/offline # code more factorised -trackcolls = { - "":"InDetTrackParticles", - "ftf":"HLT_xAODTracks_FS", -} - -vertexcolls = { - "":"PrimaryVertices", - "ftf":"HLT_EFHistoPrmVtx" -} - -tvacolls = { - "":"JetTrackVtxAssoc", - "ftf":"JetTrackVtxAssoc_ftf" -} - -assoctracks = { - "":"GhostTrack", - "ftf":"GhostTrack_ftf" +trackcollectionmap = { + # Offline track collections + "": { + "Tracks": "InDetTrackParticles", + "JetTracks": "JetSelectedTracks", + "Vertices": "PrimaryVertices", + "TVA": "JetTrackVtxAssoc", + "GhostTracks": "PseudoJetGhostTrack", + "GhostTracksLabel": "GhostTrack", + } } def getCaloQualityTool(): @@ -95,10 +87,10 @@ def getJVFTool(modspec=""): jvf = JetMomentToolsConf.JetVertexFractionTool( "jvf", - VertexContainer = vertexcolls[modspec], - AssociatedTracks = assoctracks[modspec], - TrackVertexAssociation = tvacolls[modspec], - TrackParticleContainer = trackcolls[modspec], + VertexContainer = trackcollectionmap[modspec]["Vertices"], + AssociatedTracks = trackcollectionmap[modspec]["GhostTracksLabel"], + TrackVertexAssociation = trackcollectionmap[modspec]["TVA"], + TrackParticleContainer = trackcollectionmap[modspec]["Tracks"], TrackSelector = jettrackselloose, ) return jvf @@ -106,10 +98,9 @@ def getJVFTool(modspec=""): # Jet vertex fraction with selection. def getJVTTool(modspec=""): - jvt = JetMomentToolsConf.JetVertexTaggerTool( "jvt", - VertexContainer = vertexcolls[modspec], + VertexContainer = trackcollectionmap[modspec]["Vertices"], ) return jvt @@ -119,9 +110,9 @@ def getTrackMomentsTool(modspec=""): trackmoments = JetMomentToolsConf.JetTrackMomentsTool( "trkmoms", - VertexContainer = vertexcolls[modspec], - AssociatedTracks = assoctracks[modspec], - TrackVertexAssociation = tvacolls[modspec], + VertexContainer = trackcollectionmap[modspec]["Vertices"], + AssociatedTracks = trackcollectionmap[modspec]["GhostTracksLabel"], + TrackVertexAssociation = trackcollectionmap[modspec]["TVA"], TrackMinPtCuts = [500, 1000], TrackSelector = jettrackselloose ) @@ -132,9 +123,9 @@ def getTrackSumMomentsTool(modspec=""): tracksummoments = JetMomentToolsConf.JetTrackSumMomentsTool( "trksummoms", - VertexContainer = vertexcolls[modspec], - AssociatedTracks = assoctracks[modspec], - TrackVertexAssociation = tvacolls[modspec], + VertexContainer = trackcollectionmap[modspec]["Vertices"], + AssociatedTracks = trackcollectionmap[modspec]["GhostTracksLabel"], + TrackVertexAssociation = trackcollectionmap[modspec]["TVA"], RequireTrackPV = True, TrackSelector = jettrackselloose ) @@ -142,10 +133,10 @@ def getTrackSumMomentsTool(modspec=""): # This tool sets a decoration saying which the nominal HS PV was. # Historically it did the origin correction, but now we do this to constituents -def getOriginCorrVxTool(): +def getOriginCorrVxTool(modspec=""): origin_setpv = JetMomentToolsConf.JetOriginCorrectionTool( "jetorigin_setpv", - VertexContainer = "PrimaryVertices", + VertexContainer = trackcollectionmap[modspec]["Vertices"], OriginCorrectedName = "", OnlyAssignPV = True, ) diff --git a/Reconstruction/Jet/JetRecConfig/python/ConstModHelpers.py b/Reconstruction/Jet/JetRecConfig/python/ConstModHelpers.py index 87e8063a67dae37e8aafe6229e2bfc68e0859a91..26be06e6bd7909fe1651963fe7619a9b643f9980 100644 --- a/Reconstruction/Jet/JetRecConfig/python/ConstModHelpers.py +++ b/Reconstruction/Jet/JetRecConfig/python/ConstModHelpers.py @@ -54,7 +54,7 @@ ConstModConfigs = { "SK": {} } -def getConstitModAlg(constit,suffix=""): +def getConstitModAlg(constit,suffix="",tvaKey="JetTrackVtxAssociation",vtxKey="PrimaryVertices"): inputtype = constit.basetype # Need to extend to TCC @@ -83,6 +83,15 @@ def getConstitModAlg(constit,suffix=""): toolname = "ConstitMod{0}_{1}{2}".format(typename,step,suffix) tool = ConstModTools[step](toolname,**ConstModConfigs[step]) + + # May want to set also for cluster origin correction + # but so far unused + if step=="CorrectPFO": + tool.VertexContainerKey = vtxKey + if step=="CHS": + tool.TrackVertexAssociation = tvaKey + tool.VertexContainerKey = vtxKey + if inputtype == xAODType.ParticleFlow and step not in ["CorrectPFO","CHS"]: tool.IgnoreChargedPFO=True tool.ApplyToChargedPFO=False diff --git a/Reconstruction/eflowRec/python/PFHLTConfig.py b/Reconstruction/eflowRec/python/PFHLTConfig.py index 684a248cda279779c667c31dc83834c5f7b2749e..541da95a4dd9710b4143adbc7193563e34707de7 100644 --- a/Reconstruction/eflowRec/python/PFHLTConfig.py +++ b/Reconstruction/eflowRec/python/PFHLTConfig.py @@ -92,11 +92,8 @@ def getPFCellLevelSelectionTool(): from eflowRec.eflowRecConf import PFTrackClusterMatchingTool MatchingTool = PFTrackClusterMatchingTool("CalObjBldMatchingTool") - MatchingTool.OutputLevel=1 MatchingTool_Pull_02 = PFTrackClusterMatchingTool("MatchingTool_Pull_02") - MatchingTool_Pull_02.OutputLevel=1 MatchingTool_Pull_015 = PFTrackClusterMatchingTool("MatchingTool_Pull_015") - MatchingTool_Pull_015.OutputLevel=1 MatchingTool_Pull_015.TrackPositionType = 'EM2EtaPhi' # str MatchingTool_Pull_015.ClusterPositionType = 'PlainEtaPhi' # str diff --git a/Reconstruction/eflowRec/python/PFHLTSequence.py b/Reconstruction/eflowRec/python/PFHLTSequence.py index 6306f77441fb6c32684a576a64b5220a45e58d4b..304de439c2b2a877f9e5fe196329e1f2f1f3761b 100644 --- a/Reconstruction/eflowRec/python/PFHLTSequence.py +++ b/Reconstruction/eflowRec/python/PFHLTSequence.py @@ -1,10 +1,18 @@ from eflowRec import eflowRecConf from InDetTrackSelectionTool import InDetTrackSelectionToolConf + +# Use the appropriate containers based on what config is desired +trackvtxcontainers = { + "offline": ("InDetTrackParticles","PrimaryVertices"), + "ftf": ("HLT_xAODTracks_FS","HLT_EFHistoPrmVtx"), + } + # PFTrackSelector # This handles the track selection (including lepton veto) # and extrapolation into the calorimeter. # Parameters: track & vertex container names (offline, HLT, FTK) -def getPFTrackSel(tracksin, verticesin): +def getPFTrackSel(tracktype): + tracksin,verticesin = trackvtxcontainers[tracktype] # Configure the extrapolator def getExtrapolator(): @@ -13,12 +21,16 @@ def getPFTrackSel(tracksin, verticesin): # from TrkExTools.AtlasExtrapolator import AtlasExtrapolator from TrackToCalo.TrackToCaloConf import Trk__ParticleCaloExtensionTool from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigExtrapolator - return Trk__ParticleCaloExtensionTool(Extrapolator = InDetTrigExtrapolator) + return Trk__ParticleCaloExtensionTool("HLTPF_ParticleCaloExtension",Extrapolator = InDetTrigExtrapolator) - TrackCaloExtensionTool = eflowRecConf.eflowTrackCaloExtensionTool(TrackCaloExtensionTool=getExtrapolator()) + TrackCaloExtensionTool = eflowRecConf.eflowTrackCaloExtensionTool("HLTPF_eflowTrkCaloExt",TrackCaloExtensionTool=getExtrapolator()) + # Don't assume the existence of a pre-built cache + # We expect to run PF at most once per event, and not overlap with + # other use cases like taus + TrackCaloExtensionTool.PFParticleCache = "" # Configure the track selector - PFTrackSelector = eflowRecConf.PFTrackSelector("PFTrackSelector") + PFTrackSelector = eflowRecConf.PFTrackSelector("PFTrackSelector_"+tracktype) PFTrackSelector.trackExtrapolatorTool = TrackCaloExtensionTool TrackSelectionTool = InDetTrackSelectionToolConf.InDet__InDetTrackSelectionTool( @@ -43,7 +55,7 @@ def getPFTrackSel(tracksin, verticesin): # For HLT purposes, no LC calibration is applied and only # one essential moment (CENTER_MAG) is computed. This is # needed for origin corrections. -def getPFAlg(clustersin): +def getPFAlg(clustersin,tracktype): # The tool to handle cell-level subtraction, default parameters CellEOverPTool = eflowRecConf.eflowCellEOverPTool_mc12_JetETMiss() @@ -55,6 +67,7 @@ def getPFAlg(clustersin): matchingtool.ClusterPositionType = 'PlainEtaPhi' # str matchingtool.DistanceType = 'EtaPhiSquareDistance' # str matchingtool.MatchCut = matchcut*matchcut + return matchingtool # Default energy subtraction where a single cluster satisfies the expected # track calo energy @@ -93,7 +106,7 @@ def getPFAlg(clustersin): pfClusterSel = eflowRecConf.PFClusterSelectorTool("PFClusterSelectorTool", clustersName=clustersin, calClustersName="") - PFAlgorithm = eflowRecConf.PFAlgorithm("PFAlgorithm", + PFAlgorithm = eflowRecConf.PFAlgorithm("PFAlgorithm_"+tracktype, PFClusterSelectorTool = pfClusterSel, SubtractionToolList = [PFCellLevelSubtractionTool,PFRecoverSplitShowersTool], BaseToolList = [PFMomentCalculatorTool] @@ -103,36 +116,33 @@ def getPFAlg(clustersin): # Convert internal eflowRec track/cluster objects into xAOD neutral/charged # particle flow objects -def getPFOCreators(): - PFOChargedCreatorAlgorithm = eflowRecConf.PFOChargedCreatorAlgorithm("PFOChargedCreatorAlgorithm", - PFOOutputName="HLTChargedParticleFlowObjects" +def getPFOCreators(tracktype): + PFOChargedCreatorAlgorithm = eflowRecConf.PFOChargedCreatorAlgorithm( + "PFOChargedCreatorAlgorithm_"+tracktype, + PFOOutputName="HLT_{}ChargedParticleFlowObjects".format(tracktype) ) - PFONeutralCreatorAlgorithm = eflowRecConf.PFONeutralCreatorAlgorithm("PFONeutralCreatorAlgorithm", - PFOOutputName="HLTNeutralParticleFlowObjects", + PFONeutralCreatorAlgorithm = eflowRecConf.PFONeutralCreatorAlgorithm( + "PFONeutralCreatorAlgorithm_"+tracktype, + PFOOutputName="HLT_{}NeutralParticleFlowObjects".format(tracktype), DoClusterMoments=False # Only CENTER_MAG ) return PFOChargedCreatorAlgorithm, PFONeutralCreatorAlgorithm # Generate the full PF reco sequence, assuming tracks, vertices, clusters # will be created upstream -def PFHLTSequence(clustersin,tracktype="Offline"): - trackvtxcontainers = { - "Offline": ("InDetTrackParticles","PrimaryVertices"), - "HLT": ("",""), # Not set up -- ask MET? - "FTK": ("FTK_TrackParticleContainer","FTK_VertexContainer"), - "FTKRefit": ("FTK_TrackParticleContainer_Refit","FTK_VertexContainer_Refit") - } +def PFHLTSequence(dummyflags,clustersin,tracktype): - tracksin,verticesin = trackvtxcontainers[tracktype] - - PFTrkSel = getPFTrackSel(tracksin, verticesin) - PFAlg = getPFAlg(clustersin) - PFNCreator, PFCCreator = getPFOCreators() + PFTrkSel = getPFTrackSel(tracktype) + PFAlg = getPFAlg(clustersin,tracktype) + PFCCreator, PFNCreator = getPFOCreators(tracktype) # Create HLT "parallel OR" sequence holding the PF algs # Can be inserted into the jet building sequence from AthenaCommon.CFElements import parOR - pfSequence = parOR("PFSeq_"+tracktype, [PFTrkSel,PFAlg,PFCCreator,PFNCreator]) + pfSequence = parOR("HLTPFlow_"+tracktype, [PFTrkSel,PFAlg,PFCCreator,PFNCreator]) + pfoPrefix = "HLT_"+tracktype + + print pfSequence - return pfSequence + return pfSequence, pfoPrefix diff --git a/Reconstruction/eflowRec/src/PFOChargedCreatorAlgorithm.cxx b/Reconstruction/eflowRec/src/PFOChargedCreatorAlgorithm.cxx index c8ae4e717ab8e794810a8d8561033fe2007bb4c3..e8f8761e4cbfc4cd6d030f41c3e48d90473155cd 100644 --- a/Reconstruction/eflowRec/src/PFOChargedCreatorAlgorithm.cxx +++ b/Reconstruction/eflowRec/src/PFOChargedCreatorAlgorithm.cxx @@ -131,9 +131,15 @@ void PFOChargedCreatorAlgorithm::createChargedPFO(const eflowCaloObject& energyF else usedClusterList.push_back(theOriginalClusterLink); ElementLink<xAOD::CaloClusterContainer> theSisterClusterLink = (*theOriginalClusterLink)->getSisterClusterLink(); - ATH_MSG_DEBUG("PFO with e and eta of " << thisPFO->e() << " and " << thisPFO->eta() << " is adding cluster with e, eta of " << (*theSisterClusterLink)->e() << " and " << (*theSisterClusterLink)->eta() << " an sistser has " << (*theOriginalClusterLink)->e() << " and " << (*theOriginalClusterLink)->eta()); - bool isSet = thisPFO->addClusterLink(theSisterClusterLink); - if (!isSet) ATH_MSG_WARNING("Could not set Cluster in PFO"); + if(theSisterClusterLink.isValid()) { + ATH_MSG_DEBUG("PFO with e and eta of " << thisPFO->e() << " and " << thisPFO->eta() << " is adding cluster with e, eta of " << (*theSisterClusterLink)->e() << " and " << (*theSisterClusterLink)->eta() << " an sistser has " << (*theOriginalClusterLink)->e() << " and " << (*theOriginalClusterLink)->eta()); + bool isSet = thisPFO->setClusterLink(theSisterClusterLink); + if (!isSet) { ATH_MSG_WARNING( "Could not set Cluster in PFO " ); } + } else { + ATH_MSG_DEBUG("PFO with e and eta of " << thisPFO->e() << " and " << thisPFO->eta() << " is adding cluster with e, eta of " << (*theOriginalClusterLink)->e() << " and " << (*theOriginalClusterLink)->eta()); + bool isSet = thisPFO->setClusterLink(theOriginalClusterLink); + if (!isSet) { ATH_MSG_WARNING( "Could not set Cluster in PFO " ); } + } }//track-cluster link loop }//addClusters is set to true - so we added the clusters to the xAOD::PFO diff --git a/Reconstruction/eflowRec/src/PFONeutralCreatorAlgorithm.cxx b/Reconstruction/eflowRec/src/PFONeutralCreatorAlgorithm.cxx index 2893e4bb31dfa8265cbb79c58f39c2c5353322f9..eb2d1a8a57c770f4e53f188bae3e3c2db185e09a 100644 --- a/Reconstruction/eflowRec/src/PFONeutralCreatorAlgorithm.cxx +++ b/Reconstruction/eflowRec/src/PFONeutralCreatorAlgorithm.cxx @@ -84,8 +84,14 @@ void PFONeutralCreatorAlgorithm::createNeutralPFO(const eflowCaloObject& energyF ElementLink<xAOD::CaloClusterContainer> theOriginalClusterLink = thisEfRecCluster->getOriginalClusElementLink(); ATH_MSG_VERBOSE(" Get sister cluster link"); ElementLink<xAOD::CaloClusterContainer> theSisterClusterLink = (*theOriginalClusterLink)->getSisterClusterLink(); - bool isSet = thisPFO->setClusterLink(theSisterClusterLink); - if (!isSet) { msg(MSG::WARNING) << "Could not set Cluster in PFO " << endmsg; } + if(theSisterClusterLink.isValid()) { + bool isSet = thisPFO->setClusterLink(theSisterClusterLink); + if (!isSet) { ATH_MSG_WARNING( "Could not set Cluster in PFO " ); } + } else { + bool isSet = thisPFO->setClusterLink(theOriginalClusterLink); + if (!isSet) { ATH_MSG_WARNING( "Could not set Cluster in PFO " ); } + } + ATH_MSG_VERBOSE(" Sucessfully set cluster link"); diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/q221_RDOtoRDOTrig_mt1_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/q221_RDOtoRDOTrig_mt1_build.ref index 0fff34ec9054bff3d842eddcdd7f271a2dce2b95..bfaf5f5c2c7d57be0440bf7035b4a1e219fdb3d2 100644 --- a/Trigger/TrigValidation/TrigAnalysisTest/share/q221_RDOtoRDOTrig_mt1_build.ref +++ b/Trigger/TrigValidation/TrigAnalysisTest/share/q221_RDOtoRDOTrig_mt1_build.ref @@ -84,6 +84,8 @@ TrigSignatureMoniMT INFO HLT_j45_L1J15 TrigSignatureMoniMT INFO HLT_j45_L1J15 decisions 18 0 0 0 0 0 TrigSignatureMoniMT INFO HLT_j45_ftf_L1J15 20 20 18 0 0 0 0 0 18 TrigSignatureMoniMT INFO HLT_j45_ftf_L1J15 decisions 18 0 0 0 0 0 +TrigSignatureMoniMT INFO HLT_j45_ftf_pf_L1J20 19 19 16 0 0 0 0 0 16 +TrigSignatureMoniMT INFO HLT_j45_ftf_pf_L1J20 decisions 16 0 0 0 0 0 TrigSignatureMoniMT INFO HLT_j45_ftf_subjesgscIS_L1J15 20 20 18 0 0 0 0 0 18 TrigSignatureMoniMT INFO HLT_j45_ftf_subjesgscIS_L1J15 decisions 18 0 0 0 0 0 TrigSignatureMoniMT INFO HLT_j45_ftf_subjesgscIS_bmv2c1070_split_L1J2019 19 18 18 18 18 0 0 18 @@ -110,6 +112,8 @@ TrigSignatureMoniMT INFO HLT_j85_L1J20 TrigSignatureMoniMT INFO HLT_j85_L1J20 decisions 13 0 0 0 0 0 TrigSignatureMoniMT INFO HLT_j85_ftf_L1J20 19 19 13 0 0 0 0 0 13 TrigSignatureMoniMT INFO HLT_j85_ftf_L1J20 decisions 13 0 0 0 0 0 +TrigSignatureMoniMT INFO HLT_j85_ftf_pf_L1J20 19 19 10 0 0 0 0 0 10 +TrigSignatureMoniMT INFO HLT_j85_ftf_pf_L1J20 decisions 10 0 0 0 0 0 TrigSignatureMoniMT INFO HLT_mu10_lateMu_L1MU10 10 10 0 0 0 0 0 0 0 TrigSignatureMoniMT INFO HLT_mu10_lateMu_L1MU10 decisions 0 0 0 0 0 0 TrigSignatureMoniMT INFO HLT_mu20_ivar_L1MU6 10 10 10 5 3 0 0 0 3 diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/full_menu_build.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/full_menu_build.ref index 4c39dfe402241f057af174dacfe6a8156437abe4..f2994193ed20d5acce426387f7b15b066a52f920 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/full_menu_build.ref +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/full_menu_build.ref @@ -88,6 +88,8 @@ TrigSignatureMoniMT INFO HLT_j45_L1J15 TrigSignatureMoniMT INFO HLT_j45_L1J15 decisions 5 0 0 0 0 0 TrigSignatureMoniMT INFO HLT_j45_ftf_L1J15 20 20 5 0 0 0 0 0 5 TrigSignatureMoniMT INFO HLT_j45_ftf_L1J15 decisions 5 0 0 0 0 0 +TrigSignatureMoniMT INFO HLT_j45_ftf_pf_L1J20 20 20 4 0 0 0 0 0 4 +TrigSignatureMoniMT INFO HLT_j45_ftf_pf_L1J20 decisions 4 0 0 0 0 0 TrigSignatureMoniMT INFO HLT_j45_ftf_subjesgscIS_L1J15 20 20 5 0 0 0 0 0 5 TrigSignatureMoniMT INFO HLT_j45_ftf_subjesgscIS_L1J15 decisions 5 0 0 0 0 0 TrigSignatureMoniMT INFO HLT_j45_ftf_subjesgscIS_bmv2c1070_split_L1J2020 20 5 5 5 5 0 0 5 @@ -114,6 +116,8 @@ TrigSignatureMoniMT INFO HLT_j85_L1J20 TrigSignatureMoniMT INFO HLT_j85_L1J20 decisions 1 0 0 0 0 0 TrigSignatureMoniMT INFO HLT_j85_ftf_L1J20 20 20 1 0 0 0 0 0 1 TrigSignatureMoniMT INFO HLT_j85_ftf_L1J20 decisions 1 0 0 0 0 0 +TrigSignatureMoniMT INFO HLT_j85_ftf_pf_L1J20 20 20 1 0 0 0 0 0 1 +TrigSignatureMoniMT INFO HLT_j85_ftf_pf_L1J20 decisions 1 0 0 0 0 0 TrigSignatureMoniMT INFO HLT_mu10_lateMu_L1MU10 20 20 0 0 0 0 0 0 0 TrigSignatureMoniMT INFO HLT_mu10_lateMu_L1MU10 decisions 0 0 0 0 0 0 TrigSignatureMoniMT INFO HLT_mu20_ivar_L1MU6 20 20 3 1 1 0 0 0 1 diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/slice_jet.ref b/Trigger/TrigValidation/TrigUpgradeTest/share/slice_jet.ref index 67a49b10b25d3e5ba017d84007a696a465eb306f..e273506975eec3331e4f1c0beb19caeb55eadb18 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/slice_jet.ref +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/slice_jet.ref @@ -22,8 +22,10 @@ TrigSignatureMoniMT INFO HLT_j45_L1J15 TrigSignatureMoniMT INFO HLT_j45_L1J15 decisions 5 TrigSignatureMoniMT INFO HLT_j45_ftf_L1J15 20 20 5 5 TrigSignatureMoniMT INFO HLT_j45_ftf_L1J15 decisions 5 -TrigSignatureMoniMT INFO HLT_j45_ftf_subjesgscIS_L1J15 20 20 4 4 -TrigSignatureMoniMT INFO HLT_j45_ftf_subjesgscIS_L1J15 decisions 4 +TrigSignatureMoniMT INFO HLT_j45_ftf_pf_L1J20 20 20 4 4 +TrigSignatureMoniMT INFO HLT_j45_ftf_pf_L1J20 decisions 4 +TrigSignatureMoniMT INFO HLT_j45_ftf_subjesgscIS_L1J15 20 20 5 5 +TrigSignatureMoniMT INFO HLT_j45_ftf_subjesgscIS_L1J15 decisions 5 TrigSignatureMoniMT INFO HLT_j460_a10_lcw_subjes_L1J10020 20 0 0 TrigSignatureMoniMT INFO HLT_j460_a10_lcw_subjes_L1J100 decisions 0 TrigSignatureMoniMT INFO HLT_j460_a10_lcw_subjes_L1J20 20 20 0 0 @@ -44,3 +46,5 @@ TrigSignatureMoniMT INFO HLT_j85_L1J20 TrigSignatureMoniMT INFO HLT_j85_L1J20 decisions 1 TrigSignatureMoniMT INFO HLT_j85_ftf_L1J20 20 20 1 1 TrigSignatureMoniMT INFO HLT_j85_ftf_L1J20 decisions 1 +TrigSignatureMoniMT INFO HLT_j85_ftf_pf_L1J20 20 20 0 0 +TrigSignatureMoniMT INFO HLT_j85_ftf_pf_L1J20 decisions 0 diff --git a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py index ea1c4c62fca371a91cb52f85a9ee504fedfa73fd..f9d3b496107bc5287115b5168c21993cdc33bf19 100644 --- a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py +++ b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py @@ -234,6 +234,15 @@ TriggerHLTListRun3 = [ ('xAOD::JetContainer#HLT_AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets_jes', 'BS ESD AODFULL AODSLIM AODVERYSLIM', 'Jet'), ('xAOD::JetAuxContainer#HLT_AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets_jesAux.'+JetVars, 'BS ESD AODFULL AODSLIM AODVERYSLIM', 'Jet'), + ('xAOD::JetContainer#HLT_AntiKt4EMTopoSKJets_nojcalib', 'BS ESD AODFULL', 'Jet'), + ('xAOD::JetAuxContainer#HLT_AntiKt4EMTopoSKJets_nojcalibAux.', 'BS ESD AODFULL', 'Jet'), + + ('xAOD::JetContainer#HLT_AntiKt4EMPFlowJets_subjesIS_ftf', 'BS ESD AODFULL', 'Jet'), + ('xAOD::JetAuxContainer#HLT_AntiKt4EMPFlowJets_subjesIS_ftfAux.', 'BS ESD AODFULL', 'Jet'), + + ('xAOD::TrackParticleContainer#HLT_xAODTracks_FS', 'BS ESD AODFULL', 'Jet'), + ('xAOD::TrackParticleAuxContainer#HLT_xAODTracks_FSAux.', 'BS ESD AODFULL', 'Jet'), + # MET ('xAOD::TrigMissingETContainer#HLT_MET_cell', 'BS ESD AODFULL AODSLIM AODVERYSLIM', 'MET'), ('xAOD::TrigMissingETAuxContainer#HLT_MET_cellAux.', 'BS ESD AODFULL AODSLIM AODVERYSLIM', 'MET'), diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoConfiguration.py index 5dce2d46d8b3859709de1cb3d6f631254caeec8b..8f1beefc995fa1248c2fea6600f1d85512844a6d 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoConfiguration.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoConfiguration.py @@ -20,18 +20,29 @@ def extractRecoDict(chainParts): # When actually specifying the reco, clustersKey should be # set, but default to None to allow certain checks, in particular # grooming configuration -def defineJetConstit(jetRecoDict,clustersKey=None): +def defineJetConstit(jetRecoDict,clustersKey=None,pfoPrefix=None): + constitMods = [] + if "sk" in jetRecoDict["dataType"]: + constitMods.append("SK") + # Get the details of the constituent definition: # type, mods and the input container name + if jetRecoDict["dataType"]=="pf": + jetConstit = JetConstit( xAODType.ParticleFlow, constitMods) + if pfoPrefix is None: + raise RuntimeError("JetRecoConfiguration: Cannot define PF jets without pfo prefix!") + jetConstit.rawname = pfoPrefix+"ParticleFlowObjects" + jetConstit.inputname = pfoPrefix+"CHSParticleFlowObjects" + if "tc" in jetRecoDict["dataType"]: # apply this scale if jetRecoDict["calib"] == "em": - constitMods = ["EM"] + constitMods = ["EM"] + constitMods elif jetRecoDict["calib"] == "lcw": - constitMods = ["LC"] + constitMods = ["LC"] + constitMods # read from this cluster collection, # overriding the standard offline collection - jetConstit = JetConstit( xAODType.CaloCluster, constitMods ) + jetConstit = JetConstit( xAODType.CaloCluster, constitMods) if clustersKey is not None: jetConstit.rawname = clustersKey if jetRecoDict["dataType"]=="tc": @@ -45,9 +56,9 @@ def defineJetConstit(jetRecoDict,clustersKey=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): +def defineJets(jetRecoDict,clustersKey=None,pfoPrefix=None): radius = float(jetRecoDict["recoAlg"].lstrip("a").rstrip("tr"))/10 - jetConstit = defineJetConstit(jetRecoDict,clustersKey) + jetConstit = defineJetConstit(jetRecoDict,clustersKey,pfoPrefix) jetDef = JetDefinition( "AntiKt", radius, jetConstit, ptmin=5000.) return jetDef @@ -93,13 +104,20 @@ def defineCalibFilterMods(jetRecoDict,dataSource,rhoKey="auto"): if jetRecoDict["trkopt"]=="notrk" and "gsc" in jetRecoDict["jetCalib"]: raise ValueError("Track GSC requested but no track source provided!") - calibContext,calibSeq = { - ("a4","subjes"): ("TrigRun2","JetArea_EtaJES_GSC"), # Calo GSC only - ("a4","subjesIS"): ("TrigRun2","JetArea_EtaJES_GSC_Insitu"), # Calo GSC only - ("a4","subjesgscIS"): ("TrigRun2GSC","JetArea_EtaJES_GSC_Insitu"), # Calo+Trk GSC - ("a10","subjes"): ("TrigUngroomed","JetArea_EtaJES"), - ("a10t","jes"): ("TrigTrimmed","EtaJES_JMS"), - }[(jetRecoDict["recoAlg"],jetRecoDict["jetCalib"])] + if jetRecoDict["dataType"]=="tc": + calibContext,calibSeq = { + ("a4","subjes"): ("TrigRun2","JetArea_EtaJES_GSC"), # Calo GSC only + ("a4","subjesIS"): ("TrigRun2","JetArea_EtaJES_GSC_Insitu"), # Calo GSC only + ("a4","subjesgscIS"): ("TrigRun2GSC","JetArea_EtaJES_GSC_Insitu"), # Calo+Trk GSC + ("a10","subjes"): ("TrigUngroomed","JetArea_EtaJES"), + ("a10t","jes"): ("TrigTrimmed","EtaJES_JMS"), + }[(jetRecoDict["recoAlg"],jetRecoDict["jetCalib"])] + elif jetRecoDict["dataType"]=="pf": + calibContext,calibSeq = { + ("a4","subjes"): ("TrigLS2","JetArea_EtaJES_GSC"), + ("a4","subjesIS"): ("TrigLS2","JetArea_EtaJES_GSC_Insitu"), + ("a4","subjesgscIS"): ("TrigLS2","JetArea_EtaJES_GSC_Insitu"), + }[(jetRecoDict["recoAlg"],jetRecoDict["jetCalib"])] gscDepth = "auto" if "gsc" in jetRecoDict["jetCalib"]: diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoSequences.py index 56645137907bf343ba138ebd4ec3dc31684b4482..86834e0e636acd26af765de39b2551e6753c4d9d 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoSequences.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoSequences.py @@ -99,8 +99,7 @@ def jetRecoSequence( dummyFlags, dataSource, RoIs = 'FSJETRoI', **jetRecoDict): # Normal jet reconstruction, no reclustering or grooming # Start by adding the topocluster reco sequence - # We always make LCW topoclusters, then deal with - # calibration states later + # This makes EM clusters! from TrigT2CaloCommon.CaloDef import HLTFSTopoRecoSequence (topoClusterSequence, clustersKey) = RecoFragmentsPool.retrieve(HLTFSTopoRecoSequence,RoIs) recoSeq += topoClusterSequence @@ -116,15 +115,22 @@ def jetRecoSequence( dummyFlags, dataSource, RoIs = 'FSJETRoI', **jetRecoDict): # Potentially add particle flow reconstruction # Work in progress if jetRecoDict["dataType"] == "pf": + if jetRecoDict["trkopt"] == "notrk": + raise RuntimeError("PFlow jet chain requested with no tracking option!") from eflowRec.PFHLTSequence import PFHLTSequence - pfseq = RecoFragmentsPool.retrieve(PFHLTSequence,clustersKey) + (pfseq, pfoPrefix) = RecoFragmentsPool.retrieve(PFHLTSequence, None, clustersin=clustersKey, tracktype=jetRecoDict["trkopt"]) recoSeq += pfseq - - jetDef = JetRecoConfiguration.defineJets(jetRecoDict,clustersKey) - doConstitMods = ("sk" in jetRecoDict["dataType"]) + jetDef = JetRecoConfiguration.defineJets(jetRecoDict,pfoPrefix=pfoPrefix) + else: + jetDef = JetRecoConfiguration.defineJets(jetRecoDict,clustersKey=clustersKey) + useConstitMods = ["sk", "pf"] + doConstitMods = jetRecoDict["dataType"] in useConstitMods if doConstitMods: from JetRecConfig.ConstModHelpers import getConstitModAlg - recoSeq += getConstitModAlg(jetDef.inputdef,"HLT") + if jetRecoDict["trkopt"] == "notrk": + recoSeq += getConstitModAlg(jetDef.inputdef,"HLT") + else: + recoSeq += getConstitModAlg(jetDef.inputdef,"HLT",tvaKey=trkcolls["TVA"],vtxKey=trkcolls["Vertices"]) # Add the PseudoJetGetter alg to the sequence constitPJAlg = getConstitPJGAlg( jetDef.inputdef ) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetTrackingConfig.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetTrackingConfig.py index 66af99bb6a2bb319bb06fd4fc934f6eff10d379a..afa024cd09f2a904a31580badc4061261b38c65f 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetTrackingConfig.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetTrackingConfig.py @@ -95,11 +95,16 @@ def JetTrackingSequence(dummyFlags,trkopt,RoIs): jetTrkSeq += pjgalg trkcolls = { - "Tracks": tracksname, - "Vertices": verticesname, - "JetTracks": jettracksname, - "TVA": tvaname, - "GhostTracks": ghosttracksname + "Tracks": tracksname, + "Vertices": verticesname, + "JetTracks": jettracksname, + "TVA": tvaname, + "GhostTracks": ghosttracksname, + "GhostTracksLabel": label } + from JetMomentTools.JetMomentToolsConfig import trackcollectionmap + if trkopt not in trackcollectionmap.keys(): + trackcollectionmap[trkopt] = trkcolls + return jetTrkSeq, trkcolls diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py index 7905dc1d7b5f60013c89e1eb902ad5feb228d114..89b12c6760bfb6c9e6571f7e0bfbd7c01864bd99 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py @@ -97,6 +97,9 @@ def setupMenu(): ChainProp(name='HLT_j45_ftf_L1J15', groups=SingleJetGroup), ChainProp(name='HLT_j85_ftf_L1J20', groups=SingleJetGroup), + ChainProp(name='HLT_j45_ftf_pf_L1J20', groups=SingleJetGroup), + ChainProp(name='HLT_j85_ftf_pf_L1J20', groups=SingleJetGroup), + ChainProp(name='HLT_j420_ftf_subjesgscIS_L1J20', groups=SingleJetGroup), ChainProp(name='HLT_j260_320eta490_L1J20', groups=SingleJetGroup), diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py index 2bf1600c8e8384d8a2ffaf0053088d9f3de10777..2eba4a927e22a11e9c1cff3ff377eb278e4ae4e1 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py @@ -99,7 +99,7 @@ JetChainParts = { 'extra' : [], 'cleaning' : ['noCleaning',], 'recoAlg' : ['a4', 'a10', 'a10r', 'a10t'], - 'dataType' : ['tc'], + 'dataType' : ['tc','sktc','pf'], 'calib' : ['em', 'lcw'], 'jetCalib' : ['jes', 'subjes', 'subjesIS', 'subjesgscIS', 'nojcalib'], 'scan' : ['FS',],