ATLAS Offline Software
Loading...
Searching...
No Matches
python.LLP1 Namespace Reference

Functions

 LLP1KernelCfg (flags, name='LLP1Kernel', **kwargs)
 LLP1Cfg (flags)

Variables

list LLP1VrtSecInclusiveSuffixes = []
list LLP1NewVSISuffixes = []

Function Documentation

◆ LLP1Cfg()

python.LLP1.LLP1Cfg ( flags)

Definition at line 949 of file LLP1.py.

949def LLP1Cfg(flags):
950 acc = ComponentAccumulator()
951
952 MergedElectronContainer = (
953 "StdWithLRTElectrons" if flags.Tracking.doLargeD0 else "Electrons")
954 MergedMuonContainer = "StdWithLRTMuons" if flags.Tracking.doLargeD0 else "Muons"
955 MergedMuonContainer_wZPH = (
956 "StdWithLRTMuons_wZPH" if flags.Tracking.doLargeD0 else "Muons_wZPH")
957
958 # Get the lists of triggers needed for trigger matching.
959 # This is needed at this scope (for the slimming) and further down in the config chain
960 # for actually configuring the matching, so we create it here and pass it down
961 # TODO: this should ideally be called higher up to avoid it being run multiple times in a train
962 from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
963 LLP1TriggerListsHelper = TriggerListsHelper(flags)
964
965 # Common augmentations
966 acc.merge(LLP1KernelCfg(flags, name="LLP1Kernel", StreamName = 'StreamDAOD_LLP1', TriggerListsHelper = LLP1TriggerListsHelper))
967
968
971 from IsolationSelection.IsolationSelectionConfig import IsoCloseByAlgsCfg
972 # We can't pass non-LRT containers to the LLP algorithm.
973 # Otherwise, if this is run in conjunction with PHYS, the decorations
974 # produced by the PHYS algorithm will be overwritten. To get those
975 # decorations produced when LLP1 is run alone, we schedule a separate
976 # algorithm for those but make it the same as the one in PHYS so that
977 # they'll be merged when both formats are used together.
978 acc.merge(IsoCloseByAlgsCfg(flags, isPhysLite = False,
979 stream_name = 'StreamDAOD_LLP1'))
980 contNames = [ MergedMuonContainer, MergedElectronContainer, "Photons" ]
981 acc.merge(IsoCloseByAlgsCfg(flags, suff = "_LLP1_LRTMerged",
982 isPhysLite = False, containerNames = contNames,
983 useSelTools = True, stream_name = 'StreamDAOD_LLP1',
984 isoDecSuffix = "CloseByCorr_LRT",
985 caloDecSuffix = '_LRT',
986 hasLRT = flags.Tracking.doLargeD0))
987 contNames = [ "ZeroPixelHitMuons" ]
988 acc.merge(IsoCloseByAlgsCfg(flags, suff = "_LLP1_ZeroPixelHitsMuons",
989 isPhysLite = False, containerNames = contNames,
990 stream_name = 'StreamDAOD_LLP1',
991 isoDecSuffix = "CloseByCorr_ZPH"))
992
993 if flags.Tracking.doLargeD0:
994 contNames = [ "LRTElectrons", "MuonsLRT" ]
995 acc.merge(IsoCloseByAlgsCfg(flags, suff = "_LLP1",
996 isPhysLite = False, containerNames = contNames,
997 useSelTools = True,
998 stream_name = 'StreamDAOD_LLP1', hasLRT = True))
999
1000 # ============================
1001 # Define contents of the format
1002 # =============================
1003 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
1004 from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
1005 from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
1006
1007 LLP1SlimmingHelper = SlimmingHelper("LLP1SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
1008
1009 LLP1SlimmingHelper.SmartCollections = ["EventInfo",
1010 "Electrons",
1011 "Photons",
1012 "Muons",
1013 "PrimaryVertices",
1014 "InDetTrackParticles",
1015 "AntiKt4EMTopoJets",
1016 "AntiKt4EMPFlowJets",
1017 "MET_Baseline_AntiKt4EMTopo",
1018 "MET_Baseline_AntiKt4EMPFlow",
1019 "TauJets",
1020 "TauJets_MuonRM",
1021 "DiTauJets",
1022 "DiTauJetsLowPt",
1023 "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets"]
1024 if flags.Tracking.doLargeD0:
1025 LLP1SlimmingHelper.SmartCollections += ["LRTElectrons", "MuonsLRT", "TauJetsLRT",
1026 "InDetLargeD0TrackParticles"]
1027
1028 LLP1SlimmingHelper.AllVariables = ["InDetDisappearingTrackParticles",
1029 "MSDisplacedVertex",
1030 "MuonSpectrometerTrackParticles",
1031 "UnAssocMuonSegments",
1032 "MuonSegments",
1033 "MSonlyTracklets",
1034 "CombinedMuonTrackParticles",
1035 "ExtrapolatedMuonTrackParticles",
1036 "CombinedStauTrackParticles",
1037 "AntiKt4EMTopoJets",
1038 "egammaClusters",
1039 "ElectronRingSets",
1040 "ElectronCaloRings",
1041 "JetRingSets",
1042 "JetCaloRings",
1043 "SlowMuons",
1044 "EMOriginTopoClusters",
1045 "Staus",
1046 "METAssoc_AntiKt4EMTopo",
1047 "MET_Core_AntiKt4EMTopo",
1048 "METAssoc_AntiKt4EMPFlow",
1049 "MET_Core_AntiKt4EMPFlow",
1050 "InDetLowPtRoITrackParticles",
1051 "PixelClusters",
1052 "PixelMSOSs",
1053 "DisappearingPixelMSOSs",
1054 "LowPtRoIPixelMSOSs",
1055 "SCT_Clusters",
1056 "SCT_MSOSs",
1057 "DisappearingSCT_MSOSs",
1058 "LowPtRoISCT_MSOSs",
1059 "LVL1MuonRoIs",
1060 "NCB_MuonSegments"]
1061 if flags.Tracking.doLargeD0:
1062 LLP1SlimmingHelper.AllVariables += ["MuonSegments_LRT",
1063 "CombinedMuonsLRTTrackParticles",
1064 "ExtraPolatedMuonsLRTTrackParticles",
1065 "MSOnlyExtraPolatedMuonsLRTTrackParticles"]
1066
1067
1068 excludedVertexAuxData = "-vxTrackAtVertex.-MvfFitInfo.-isInitialized.-VTAV"
1069 StaticContent = []
1070 StaticContent += ["xAOD::VertexContainer#SoftBVrtClusterTool_Tight_Vertices"]
1071 StaticContent += ["xAOD::VertexAuxContainer#SoftBVrtClusterTool_Tight_VerticesAux." + excludedVertexAuxData]
1072 StaticContent += ["xAOD::VertexContainer#SoftBVrtClusterTool_Medium_Vertices"]
1073 StaticContent += ["xAOD::VertexAuxContainer#SoftBVrtClusterTool_Medium_VerticesAux." + excludedVertexAuxData]
1074 StaticContent += ["xAOD::VertexContainer#SoftBVrtClusterTool_Loose_Vertices"]
1075 StaticContent += ["xAOD::VertexAuxContainer#SoftBVrtClusterTool_Loose_VerticesAux." + excludedVertexAuxData]
1076 StaticContent += ["xAOD::JetContainer#AntiKt10EMTopoRCJets","xAOD::JetAuxContainer#AntiKt10EMTopoRCJetsAux.-PseudoJet"]
1077
1078 for wp in LLP1VrtSecInclusiveSuffixes:
1079 StaticContent += ["xAOD::VertexContainer#VrtSecInclusive_SecondaryVertices" + wp]
1080 StaticContent += ["xAOD::VertexAuxContainer#VrtSecInclusive_SecondaryVertices" + wp + "Aux."]
1081
1082 for wp in LLP1NewVSISuffixes:
1083 StaticContent += ["xAOD::VertexContainer#NewVrtSecInclusive_SecondaryVertices" + wp]
1084 StaticContent += ["xAOD::VertexAuxContainer#NewVrtSecInclusive_SecondaryVertices" + wp + "Aux." + excludedVertexAuxData]
1085
1086 StaticContent += ["xAOD::VertexContainer#MuSAVertices"]
1087 StaticContent += ["xAOD::VertexAuxContainer#MuSAVerticesAux."]
1088 StaticContent += ["xAOD::TrackParticleContainer#MuSAExtrapolatedTrackParticles"]
1089 StaticContent += ["xAOD::TrackParticleAuxContainer#MuSAExtrapolatedTrackParticlesAux."]
1090
1091 if flags.Derivation.LLP.doMuSAValidation:
1092 StaticContent += ["xAOD::VertexContainer#JPsiMuSAVertices"]
1093 StaticContent += ["xAOD::VertexAuxContainer#JPsiMuSAVerticesAux."]
1094 StaticContent += ["xAOD::VertexContainer#JPsiVertices"]
1095 StaticContent += ["xAOD::VertexAuxContainer#JPsiVerticesAux."]
1096 StaticContent += ["xAOD::TrackParticleContainer#JPsiVerticesTracks"]
1097 StaticContent += ["xAOD::TrackParticleAuxContainer#JPsiVerticesTracksAux."]
1098 StaticContent += ["xAOD::TrackParticleContainer#JPsiMuSAExtrapolatedTrackParticles"]
1099 StaticContent += ["xAOD::TrackParticleAuxContainer#JPsiMuSAExtrapolatedTrackParticlesAux."]
1100 StaticContent += ["xAOD::VertexContainer#ValidationMuSAVertices"]
1101 StaticContent += ["xAOD::VertexAuxContainer#ValidationMuSAVerticesAux."]
1102 StaticContent += ["xAOD::TrackParticleContainer#ValidationMuSAExtrapolatedTrackParticles"]
1103 StaticContent += ["xAOD::TrackParticleAuxContainer#ValidationMuSAExtrapolatedTrackParticlesAux."]
1104
1105 LLP1SlimmingHelper.ExtraVariables += ["Electrons.LHValue.DFCommonElectronsLHVeryLooseNoPixResult.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z.f3",
1106 "Photons.DFCommonPhotonsIsEMMedium.DFCommonPhotonsIsEMMediumIsEMValue.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z.f3",
1107 "Muons.meanDeltaADCCountsMDT",
1108 "egammaClusters.phi_sampl.eta0.phi0",
1109 "AntiKt4EMTopoJets.PartonTruthLabelID.ConeExclBHadronsFinal.ConeExclCHadronsFinal.GhostBHadronsFinal.GhostCHadronsFinal.GhostBHadronsFinalCount.GhostBHadronsFinalPt.GhostCHadronsFinalCount.GhostCHadronsFinalPt.GhostBHadronsFinal.GhostCHadronsFinal.GhostTrack.GhostTrackCount.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z.constituentLinks",
1110 "AntiKt4EMPFlowJets.PartonTruthLabelID.DFCommonJets_fJvt.ConeExclBHadronsFinal.ConeExclCHadronsFinal.GhostBHadronsFinal.GhostCHadronsFinal.GhostBHadronsFinalCount.GhostBHadronsFinalPt.GhostCHadronsFinalCount.GhostCHadronsFinalPt.GhostBHadronsFinal.GhostCHadronsFinal.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z.constituentLinks",
1111 "TruthPrimaryVertices.t.x.y.z.sumPt2",
1112 "PrimaryVertices.t.x.y.z.sumPt2.covariance",
1113 "InDetTrackParticles.d0.z0.vz.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.truthParticleLink.truthMatchProbability.radiusOfFirstHit.hitPattern.patternRecoInfo",
1114 "InDetTrackParticles.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.numberOfTRTHits.numberOfTRTOutliers",
1115 "InDetTrackParticles.numberOfIBLOverflowsdEdx.numberOfUsedHitsdEdx.pixeldEdx",
1116 "InDetTrackParticles.expectInnermostPixelLayerHit.expectNextToInnermostPixelLayerHit.numberOfNextToInnermostPixelLayerHits.numberOfContribPixelLayers.numberOfGangedFlaggedFakes.numberOfPixelOutliers.numberOfPixelSplitHits.numberOfPixelSpoiltHits",
1117 "InDetTrackParticles.numberOfSCTOutliers.numberOfSCTSpoiltHits",
1118 "InDetTrackParticles.numberOfTRTHoles.numberOfTRTDeadStraws.numberOfTRTSharedHits.numberOfTRTHighThresholdHits.numberOfTRTHighThresholdHitsTotal.numberOfTRTHighThresholdOutliers.TRTdEdx.TRTdEdxUsedHits.hitPattern",
1119 "InDetTrackParticles.truthMatchProbability.truthClassification.truthOrigin.truthType",
1120 "InDetTrackParticles.TrkIsoPtPdEdx_ptcone20.TrkIsoPtPdEdx_ptcone30.TrkIsoPtPdEdx_ptcone40.TrkIsoPtTightPdEdx_ptcone20.TrkIsoPtTightPdEdx_ptcone30.TrkIsoPtTightPdEdx_ptcone40",
1121 "InDetTrackParticles.LLP1_ptcone20.LLP1_ptcone30.LLP1_ptcone40.LLP1_ptvarcone20.LLP1_ptvarcone30.LLP1_ptvarcone40.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag",
1122 "InDetTrackParticles.LLP1_topoetcone20.LLP1_topoetcone30.LLP1_topoetcone40.LLP1_topoetcone20NonCoreCone.LLP1_topoetcone30NonCoreCone.LLP1_topoetcone40NonCoreCone",
1123 "InDetTrackParticles.LLP1_CaloCelldEta.LLP1_CaloCelldPhi.LLP1_CaloCelldR.LLP1_CaloCelldX.LLP1_CaloCelldY.LLP1_CaloCelldZ.LLP1_CaloCellE.LLP1_CaloCellEta.LLP1_CaloCellGain.LLP1_CaloCellID.LLP1_CaloCellPhi.LLP1_CaloCellProvenance.LLP1_CaloCellQuality.LLP1_CaloCellR.LLP1_CaloCellSampling.LLP1_CaloCellTime.LLP1_CaloCellX.LLP1_CaloCellY.LLP1_CaloCellZ.LLP1_CaloCellEneDiff.LLP1_CaloCellTimeDiff",
1124 "InDetTrackParticles.Reco_msosLink",
1125
1126 "InDetLargeD0TrackParticles.d0.z0.vz.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.truthParticleLink.truthMatchProbability.radiusOfFirstHit.hitPattern.patternRecoInfo",
1127 "GSFTrackParticles.d0.z0.vz.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.truthParticleLink.truthMatchProbability.radiusOfFirstHit.numberOfPixelHoles.numberOfSCTHoles.numberDoF.chiSquared.hitPattern.truthClassification.truthOrigin.truthType",
1128 "EventInfo.hardScatterVertexLink.timeStampNSOffset",
1129 "EventInfo.GenFiltHT.GenFiltMET.GenFiltHTinclNu.GenFiltPTZ.GenFiltFatJ",
1130 "EventInfo.hardScatterVertexLink.timeStampNSOffset",
1131 "EventInfo.DFCommonJets_eventClean_SuperLooseBadLLP.DFCommonJets_eventClean_SuperLooseBadLLP_EMTopo.DFCommonJets_eventClean_LooseBadLLP_EMTopo",
1132 "TauJets.dRmax.etOverPtLeadTrk.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z",
1133 "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET.ex.ey",
1134 "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_mht.ex.ey"]
1135 if flags.Tracking.doLargeD0:
1136 LLP1SlimmingHelper.ExtraVariables += [
1137 "LRTElectrons.LHValue.DFCommonElectronsLHVeryLooseNoPixResult.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z.f3",
1138 "LRTegammaClusters.phi_sampl.eta0.phi0",
1139 "LRTGSFTrackParticles.d0.z0.vz.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.truthParticleLink.truthMatchProbability.radiusOfFirstHit.numberOfPixelHoles.numberOfSCTHoles.numberDoF.chiSquared.hitPattern.truthOrigin.truthType",
1140 "AntiKt4EMTopoJets.GhostTrackLRT.GhostTrackLRTCount",
1141 ]
1142
1143
1144 # Isolation close by correction content for the LRT included corrections
1145 LLP1SlimmingHelper.ExtraVariables += ["Muons.topoetcone20_CloseByCorr_LRT.neflowisol20_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt500_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt1000_CloseByCorr_LRT",
1146 "Electrons.topoetcone20_CloseByCorr_LRT.ptcone20_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr_LRT",
1147 "Photons.topoetcone20_CloseByCorr_LRT.topoetcone40_CloseByCorr_LRT.ptcone20_CloseByCorr_LRT"]
1148 if flags.Tracking.doLargeD0:
1149 LLP1SlimmingHelper.ExtraVariables += [
1150 "MuonsLRT.topoetcone20_CloseByCorr_LRT.neflowisol20_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt500_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt1000_CloseByCorr_LRT",
1151 "LRTElectrons.topoetcone20_CloseByCorr_LRT.ptcone20_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr_LRT",
1152 "TauJetsLRT.GNdTauScore.GNdTauProbTau.GNdTauProbJet"]
1153
1154 VSITrackAuxVars = [
1155 "is_selected", "is_associated", "is_svtrk_final", "pt_wrtSV", "eta_wrtSV",
1156 "phi_wrtSV", "d0_wrtSV", "z0_wrtSV", "errP_wrtSV", "errd0_wrtSV",
1157 "errz0_wrtSV", "chi2_toSV"
1158 ]
1159
1160 for suffix in LLP1VrtSecInclusiveSuffixes + LLP1NewVSISuffixes:
1161 LLP1SlimmingHelper.ExtraVariables += [ "InDetTrackParticles." + '.'.join( [ var + suffix for var in VSITrackAuxVars] ) ]
1162 LLP1SlimmingHelper.ExtraVariables += [ "GSFTrackParticles." + '.'.join( [ var + suffix for var in VSITrackAuxVars] ) ]
1163 if flags.Tracking.doLargeD0:
1164 LLP1SlimmingHelper.ExtraVariables += [ "InDetLargeD0TrackParticles." + '.'.join( [ var + suffix for var in VSITrackAuxVars] ) ]
1165 LLP1SlimmingHelper.ExtraVariables += [ "LRTGSFTrackParticles." + '.'.join( [ var + suffix for var in VSITrackAuxVars] ) ]
1166
1167 LLP1SlimmingHelper.ExtraVariables.append('CaloCalTopoClusters.e_samplCaloCalTopoClusters.e_sampl.calM.calE.calEta.calPhi.CENTER_MAG.SECOND_TIME.time.CENTER_LAMBDA.rawE.rawM.rawPhi.rawEta.clusterSize.eta0.phi0.altE.altEta.altPhi.altM.AVG_LAR_Q.AVG_TILE_Q.BADLARQ_FRAC.EM_PROBABILITY.ENG_BAD_CELLS.ENG_POS.ISOLATION.N_BAD_CELLS.SECOND_LAMBDA.SECOND_R')
1168 LLP1SlimmingHelper.AppendToDictionary["EMOriginTopoClusters"]='xAOD::CaloClusterContainer'
1169 LLP1SlimmingHelper.AppendToDictionary["EMOriginTopoClustersAux"]='xAOD::ShallowAuxContainer'
1170 LLP1SlimmingHelper.ExtraVariables.append('EMOriginTopoClusters.e_sampl.calM.calE.calEta.calPhi.CENTER_MAG.SECOND_TIME.time.CENTER_LAMBDA.rawE.rawM.rawPhi.rawEta.clusterSize.eta0.phi0.altE.altEta.altPhi.altM.AVG_LAR_Q.AVG_TILE_Q.BADLARQ_FRAC.EM_PROBABILITY.ENG_BAD_CELLS.ENG_POS.ISOLATION.N_BAD_CELLS.SECOND_LAMBDA.SECOND_R')
1171
1172
1173 # Truth containers
1174 if flags.Input.isMC:
1175
1176 from DerivationFrameworkMCTruth.MCTruthCommonConfig import addTruth3ContentToSlimmerTool
1177 addTruth3ContentToSlimmerTool(LLP1SlimmingHelper)
1178 LLP1SlimmingHelper.AllVariables += ['TruthHFWithDecayParticles','TruthHFWithDecayVertices','TruthCharm','TruthPileupParticles','InTimeAntiKt4TruthJets','OutOfTimeAntiKt4TruthJets', 'AntiKt4TruthJets']
1179 LLP1SlimmingHelper.ExtraVariables += ["Electrons.TruthLink",
1180 "Muons.TruthLink",
1181 "Photons.TruthLink"]
1182 if flags.Tracking.doLargeD0:
1183 LLP1SlimmingHelper.ExtraVariables += ["LRTElectrons.TruthLink",
1184 "MuonsLRT.TruthLink"]
1185
1186 if flags.Derivation.LLP.saveFullTruth:
1187 LLP1SlimmingHelper.ExtraVariables += ['TruthParticles', 'TruthVertices',
1188 'AntiKt10TruthSoftDropBeta100Zcut10Jets.constituentLinks',
1189 'AntiKt4TruthDressedWZJets.constituentLinks']
1190 StaticContent += ["xAOD::JetContainer#AntiKt10TruthRCJets","xAOD::JetAuxContainer#AntiKt10TruthRCJetsAux.-PseudoJet"]
1191
1192 # ZeroPixelHitMuons container
1193 StaticContent += ["xAOD::MuonContainer#ZeroPixelHitMuons", "xAOD::MuonAuxContainer#ZeroPixelHitMuonsAux."]
1194
1195 from DerivationFrameworkEGamma.PhotonsCPDetailedContent import (
1196 PhotonsCPDetailedContent,
1197 )
1198 LLP1SlimmingHelper.ExtraVariables += PhotonsCPDetailedContent
1199
1200
1201 from DerivationFrameworkJetEtMiss.JetCommonConfig import addOriginCorrectedClustersToSlimmingTool
1202 addOriginCorrectedClustersToSlimmingTool(LLP1SlimmingHelper,writeLC=True,writeEM=True)
1203 LLP1SlimmingHelper.StaticContent = StaticContent
1204
1205 # Trigger content
1206 LLP1SlimmingHelper.IncludeTriggerNavigation = False
1207 LLP1SlimmingHelper.IncludeJetTriggerContent = False
1208 LLP1SlimmingHelper.IncludeMuonTriggerContent = False
1209 LLP1SlimmingHelper.IncludeEGammaTriggerContent = False
1210 LLP1SlimmingHelper.IncludeTauTriggerContent = False
1211 LLP1SlimmingHelper.IncludeEtMissTriggerContent = False
1212 LLP1SlimmingHelper.IncludeBJetTriggerContent = False
1213 LLP1SlimmingHelper.IncludeBPhysTriggerContent = False
1214 LLP1SlimmingHelper.IncludeMinBiasTriggerContent = False
1215
1216 # Trigger matching
1217 # Run 2
1218 if flags.Trigger.EDMVersion == 2:
1219 from DerivationFrameworkPhys.TriggerMatchingCommonConfig import AddRun2TriggerMatchingToSlimmingHelper
1220 from DerivationFrameworkLLP.LLPToolsConfig import LLP1TriggerMatchingToolRun2Cfg
1221 AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = LLP1SlimmingHelper,
1222 OutputContainerPrefix = "TrigMatch_",
1223 TriggerList = LLP1TriggerListsHelper.Run2TriggerNamesTau)
1224 AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = LLP1SlimmingHelper,
1225 OutputContainerPrefix = "TrigMatch_",
1226 TriggerList = LLP1TriggerListsHelper.Run2TriggerNamesNoTau)
1227 # Schedule additional pre-matching against LLP offline muons and electrons
1228 acc.merge(LLP1TriggerMatchingToolRun2Cfg(flags,
1229 name = "LRTTriggerMatchingTool_LLP1",
1230 OutputContainerPrefix = "LRTTrigMatch_LLP1_",
1231 TriggerList = LLP1TriggerListsHelper.Run2TriggerNamesNoTau,
1232 InputElectrons=MergedElectronContainer,
1233 InputMuons=MergedMuonContainer_wZPH
1234 ))
1235 # And add the additional LLP trigger matching branches to the slimming helper
1236 AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = LLP1SlimmingHelper,
1237 OutputContainerPrefix = "LRTTrigMatch_LLP1_",
1238 TriggerList = LLP1TriggerListsHelper.Run2TriggerNamesNoTau,
1239 InputElectrons=MergedElectronContainer,
1240 InputMuons=MergedMuonContainer_wZPH
1241 )
1242 # Run 3, or Run 2 with navigation conversion
1243 if flags.Trigger.EDMVersion == 3 or (flags.Trigger.EDMVersion == 2 and flags.Trigger.doEDMVersionConversion):
1244 from TrigNavSlimmingMT.TrigNavSlimmingMTConfig import AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
1245 AddRun3TrigNavSlimmingCollectionsToSlimmingHelper(LLP1SlimmingHelper)
1246
1247 # Output stream
1248 LLP1ItemList = LLP1SlimmingHelper.GetItemList()
1249 acc.merge(OutputStreamCfg(flags, "DAOD_LLP1", ItemList=LLP1ItemList, AcceptAlgs=["LLP1Kernel"]))
1250 acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_LLP1", AcceptAlgs=["LLP1Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData, MetadataCategory.TruthMetaData]))
1251
1252 return acc

◆ LLP1KernelCfg()

python.LLP1.LLP1KernelCfg ( flags,
name = 'LLP1Kernel',
** kwargs )
Configure the derivation framework driving algorithm (kernel) for LLP1

Definition at line 18 of file LLP1.py.

18def LLP1KernelCfg(flags, name='LLP1Kernel', **kwargs):
19
20 """Configure the derivation framework driving algorithm (kernel) for LLP1"""
21 acc = ComponentAccumulator()
22
23 # Augmentations
24
25 # LRT track merge
26 MergedElectronContainer = "Electrons"
27 MergedGSFTrackCollection = "GSFTrackParticles"
28 MergedMuonContainer = "Muons"
29 MergedTrackCollection = "InDetTrackParticles"
30 MergedTrackletCollection = "InDetDisappearingTrackParticles"
31
32 if flags.Tracking.doLargeD0:
33 MergedTrackCollection = "InDetWithLRTTrackParticles"
34 from DerivationFrameworkInDet.InDetToolsConfig import InDetLRTMergeCfg
35 acc.merge(InDetLRTMergeCfg(flags))
36
37 MergedGSFTrackCollection = "InDetWithLRTGSFTrackParticles"
38 acc.merge(InDetLRTMergeCfg(
39 flags, name="GSFTrackMergerAlg",
40 InputTrackParticleLocations = ["GSFTrackParticles",
41 "LRTGSFTrackParticles"],
42 OutputTrackParticleLocation = MergedGSFTrackCollection,
43 OutputTrackParticleLocationCopy = MergedGSFTrackCollection))
44
45 if flags.Tracking.doTrackSegmentsDisappearing:
46 MergedTrackletCollection = "InDetDisappearingWithLRTTrackParticles"
47 acc.merge(InDetLRTMergeCfg(
48 flags, name="InDetDisappearingLRTMerge",
49 InputTrackParticleLocations = ["InDetDisappearingTrackParticles",
50 "InDetLargeD0TrackParticles"],
51 OutputTrackParticleLocation = MergedTrackletCollection))
52
53 # LRT muons merge
54 MergedMuonContainer = "StdWithLRTMuons"
55 from DerivationFrameworkLLP.LLPToolsConfig import LRTMuonMergerAlg
56 acc.merge(LRTMuonMergerAlg(flags,
57 PromptMuonLocation = "Muons",
58 LRTMuonLocation = "MuonsLRT",
59 OutputMuonLocation = MergedMuonContainer,
60 CreateViewCollection = True,
61 UseRun3WP = flags.GeoModel.Run >= LHCPeriod.Run3))
62
63 # LRT electrons merge
64 MergedElectronContainer = "StdWithLRTElectrons"
65 from DerivationFrameworkLLP.LLPToolsConfig import LRTElectronMergerAlg
66 acc.merge(LRTElectronMergerAlg(flags,
67 PromptElectronLocation = "Electrons",
68 LRTElectronLocation = "LRTElectrons",
69 OutputCollectionName = MergedElectronContainer,
70 isDAOD = False,
71 CreateViewCollection = True))
72
73
74 # Max Cell sum decoration tool
75 from DerivationFrameworkCalo.DerivationFrameworkCaloConfig import (
76 MaxCellDecoratorCfg, MaxCellDecoratorKernelCfg)
77
78 # Default configuration
79 acc.merge(MaxCellDecoratorKernelCfg(flags))
80
81 # Specific for LRTElectrons
82 if flags.Tracking.doLargeD0:
83 LLP1LRTMaxCellDecoratorTool = acc.popToolsAndMerge(MaxCellDecoratorCfg(
84 flags, name = "LLP1LRTMaxCellDecoratorTool",
85 SGKey_electrons = "LRTElectrons",
86 SGKey_egammaClusters = ("" if flags.GeoModel.Run >= LHCPeriod.Run3
87 else "egammaClusters"),
88 SGKey_photons = ''))
89 acc.addPublicTool(LLP1LRTMaxCellDecoratorTool)
90
91 # Vertex constraint tools
92 if flags.Tracking.doTrackSegmentsDisappearing:
93 from DerivationFrameworkLLP.LLPToolsConfig import TrackParametersKVUCfg
94 LLP1TrackParametersKVUTool = acc.popToolsAndMerge(TrackParametersKVUCfg(
95 flags, name = "LLP1TrackParametersKVU"))
96 acc.addPublicTool(LLP1TrackParametersKVUTool)
97
98 # Track isolation tools
99 import ROOT
100 isoPar = ROOT.xAOD.Iso.IsolationType
101 deco_ptcones = [isoPar.ptcone40, isoPar.ptcone30, isoPar.ptcone20]
102 deco_ptcones_suffix = ["ptcone40", "ptcone30", "ptcone20"]
103 deco_prefix = 'LLP1_'
104
105 from InDetTrackSelectionTool.InDetTrackSelectionToolConfig import (
106 InDetTrackSelectionTool_Loose_Cfg)
107 TrackSelectionToolStd = acc.popToolsAndMerge(InDetTrackSelectionTool_Loose_Cfg(flags,
108 name = "TrackSelectionToolStd",
109 maxZ0SinTheta = 3.0,
110 minPt = 1000.))
111
112 TrackSelectionToolPdEdx = acc.popToolsAndMerge(InDetTrackSelectionTool_Loose_Cfg(flags,
113 name = "TrackSelectionToolPdEdx",
114 maxD0 = 0.5,
115 maxZ0SinTheta = 3.0,
116 minPt = 1000.))
117
118 TrackSelectionToolPdEdxTight = acc.popToolsAndMerge(InDetTrackSelectionTool_Loose_Cfg(flags,
119 name = "TrackSelectionToolPdEdxTight",
120 maxD0 = 0.5,
121 maxZ0SinTheta = 0.5,
122 minPt = 1000.))
123
124 from IsolationAlgs.IsoToolsConfig import TrackIsolationToolCfg, CaloIsolationToolCfg
125 TrackIsoToolStd = acc.popToolsAndMerge(TrackIsolationToolCfg(flags,
126 name = "TrackIsoToolStd",
127 TrackSelectionTool = TrackSelectionToolStd))
128 acc.addPublicTool(TrackIsoToolStd)
129
130 TrackIsoToolPdEdx = acc.popToolsAndMerge(TrackIsolationToolCfg(flags,
131 name = "TrackIsoToolPdEdx",
132 TrackSelectionTool = TrackSelectionToolPdEdx))
133 acc.addPublicTool(TrackIsoToolPdEdx)
134
135 TrackIsoToolPdEdxTight = acc.popToolsAndMerge(TrackIsolationToolCfg(flags,
136 name = "TrackIsoToolPdEdxTight",
137 TrackSelectionTool = TrackSelectionToolPdEdxTight))
138 acc.addPublicTool(TrackIsoToolPdEdxTight)
139
140 from CaloIdentifier import SUBCALO
141 CaloIsoTool = acc.popToolsAndMerge(CaloIsolationToolCfg(flags,
142 name = "CaloIsoTool",
143 EMCaloNums = [SUBCALO.LAREM],
144 HadCaloNums = [SUBCALO.LARHEC, SUBCALO.TILE],
145 UseEMScale = True,
146 UseCaloExtensionCaching = False,
147 saveOnlyRequestedCorrections = True))
148 acc.addPublicTool(CaloIsoTool)
149
150 from DerivationFrameworkInDet.InDetToolsConfig import IsolationTrackDecoratorCfg
151 LLP1IsolationTrackDecoratorTool = acc.getPrimaryAndMerge(IsolationTrackDecoratorCfg(flags,
152 name = "LLP1IsolationTrackDecorator",
153 TrackIsolationTool = TrackIsoToolStd,
154 CaloIsolationTool = CaloIsoTool,
155 TargetContainer = "InDetTrackParticles",
156 SelectionString = "InDetTrackParticles.pt>10*GeV",
157 iso = [isoPar.ptcone40, isoPar.ptcone30, isoPar.ptcone20, isoPar.ptvarcone40, isoPar.ptvarcone30, isoPar.ptvarcone20, isoPar.topoetcone40, isoPar.topoetcone30, isoPar.topoetcone20],
158 isoSuffix = ["ptcone40", "ptcone30", "ptcone20", "ptvarcone40", "ptvarcone30", "ptvarcone20", "topoetcone40", "topoetcone30", "topoetcone20"],
159 Prefix = deco_prefix))
160 acc.addPublicTool(LLP1IsolationTrackDecoratorTool)
161
162 if flags.Tracking.doTrackSegmentsDisappearing:
163 LLP1IsolationTrackDecoratorDTTool = acc.getPrimaryAndMerge(
164 IsolationTrackDecoratorCfg(
165 flags, name = "LLP1IsolationTrackDecoratorDT",
166 TrackIsolationTool = TrackIsoToolStd,
167 CaloIsolationTool = CaloIsoTool,
168 TargetContainer = "InDetDisappearingTrackParticles",
169 SelectionString = "InDetDisappearingTrackParticles.pt>10*GeV",
170 iso = [isoPar.ptcone40, isoPar.ptcone30, isoPar.ptcone20,
171 isoPar.ptvarcone40, isoPar.ptvarcone30, isoPar.ptvarcone20,
172 isoPar.topoetcone40, isoPar.topoetcone30, isoPar.topoetcone20],
173 isoSuffix = ["ptcone40", "ptcone30", "ptcone20",
174 "ptvarcone40", "ptvarcone30", "ptvarcone20",
175 "topoetcone40", "topoetcone30", "topoetcone20"],
176 Prefix = deco_prefix))
177 acc.addPublicTool(LLP1IsolationTrackDecoratorDTTool)
178
179 LLP1IsolationTrackDecoratorPdEdxTool = acc.getPrimaryAndMerge(IsolationTrackDecoratorCfg(flags,
180 name = "LLP1IsolationTrackDecoratorPdEdx",
181 TrackIsolationTool = TrackIsoToolPdEdx,
182 CaloIsolationTool = CaloIsoTool,
183 TargetContainer = "InDetTrackParticles",
184 iso = deco_ptcones,
185 Prefix = 'TrkIsoPtPdEdx_',
186 isoSuffix = deco_ptcones_suffix))
187 acc.addPublicTool(LLP1IsolationTrackDecoratorPdEdxTool)
188
189 if flags.Tracking.doTrackSegmentsDisappearing:
190 LLP1IsolationTrackDecoratorPdEdxDTTool = acc.getPrimaryAndMerge(
191 IsolationTrackDecoratorCfg(
192 flags, name = "LLP1IsolationTrackDecoratorPdEdxDT",
193 TrackIsolationTool = TrackIsoToolPdEdx,
194 CaloIsolationTool = CaloIsoTool,
195 TargetContainer = "InDetDisappearingTrackParticles",
196 iso = deco_ptcones,
197 Prefix = 'TrkIsoPtPdEdx_',
198 isoSuffix = deco_ptcones_suffix))
199 acc.addPublicTool(LLP1IsolationTrackDecoratorPdEdxDTTool)
200
201 LLP1IsolationTrackDecoratorPdEdxTightTool = acc.getPrimaryAndMerge(IsolationTrackDecoratorCfg(flags,
202 name = "LLP1IsolationTrackDecoratorPdEdxTight",
203 TrackIsolationTool = TrackIsoToolPdEdxTight,
204 CaloIsolationTool = CaloIsoTool,
205 TargetContainer = "InDetTrackParticles",
206 iso = deco_ptcones,
207 Prefix = 'TrkIsoPtTightPdEdx_',
208 isoSuffix = deco_ptcones_suffix))
209 acc.addPublicTool(LLP1IsolationTrackDecoratorPdEdxTightTool)
210
211 if flags.Tracking.doTrackSegmentsDisappearing:
212 LLP1IsolationTrackDecoratorPdEdxTightDTTool = acc.getPrimaryAndMerge(
213 IsolationTrackDecoratorCfg(
214 flags, name = "LLP1IsolationTrackDecoratorPdEdxTightDT",
215 TrackIsolationTool = TrackIsoToolPdEdxTight,
216 CaloIsolationTool = CaloIsoTool,
217 TargetContainer = "InDetDisappearingTrackParticles",
218 iso = deco_ptcones,
219 Prefix = 'TrkIsoPtTightPdEdx_',
220 isoSuffix = deco_ptcones_suffix))
221 acc.addPublicTool(LLP1IsolationTrackDecoratorPdEdxTightDTTool)
222
223 from DerivationFrameworkLLP.LLPToolsConfig import TrackParticleCaloCellDecoratorCfg
224 LLP1TrackParticleCaloCellDecoratorTool = acc.getPrimaryAndMerge(TrackParticleCaloCellDecoratorCfg(flags,
225 name = "LLP1TrackParticleCaloCellDecorator",
226 DecorationPrefix = "LLP1",
227 ContainerName = "InDetTrackParticles"))
228 acc.addPublicTool(LLP1TrackParticleCaloCellDecoratorTool)
229
230 augmentationTools = [ LLP1IsolationTrackDecoratorTool,
231 LLP1IsolationTrackDecoratorPdEdxTool,
232 LLP1IsolationTrackDecoratorPdEdxTightTool,
233 LLP1TrackParticleCaloCellDecoratorTool ]
234 if flags.Tracking.doLargeD0:
235 augmentationTools += [ LLP1LRTMaxCellDecoratorTool ]
236 if flags.Tracking.doTrackSegmentsDisappearing:
237 augmentationTools += [ LLP1TrackParametersKVUTool,
238 LLP1IsolationTrackDecoratorDTTool,
239 LLP1IsolationTrackDecoratorPdEdxDTTool,
240 LLP1IsolationTrackDecoratorPdEdxTightDTTool ]
241
242 # Specific for Taus
243 LLP1TauMaxCellDecoratorTool = acc.popToolsAndMerge(MaxCellDecoratorCfg(
244 flags,
245 name = "LLP1TauMaxCellDecoratorTool",
246 SGKey_taus = 'TauJets',
247 SGKey_electrons = '',
248 SGKey_photons = ''))
249 acc.addPublicTool(LLP1TauMaxCellDecoratorTool)
250
251 augmentationTools += [ LLP1TauMaxCellDecoratorTool ]
252
253 # Specific for Jets: AntiKt4EMTopoJets
254 LLP1AntiKt4EMTopoJetMaxCellDecoratorTool = acc.popToolsAndMerge(MaxCellDecoratorCfg(
255 flags,
256 name = "LLP1AntiKt4EMTopoJetMaxCellDecoratorTool",
257 SGKey_jets = 'AntiKt4EMTopoJets',
258 SGKey_taus = '',
259 SGKey_electrons = '',
260 SGKey_photons = ''))
261 acc.addPublicTool(LLP1AntiKt4EMTopoJetMaxCellDecoratorTool)
262
263 augmentationTools += [ LLP1AntiKt4EMTopoJetMaxCellDecoratorTool ]
264
265 # Specific for Jets: AntiKt4EMPFlowJets
266 LLP1AntiKt4EMPFlowJetMaxCellDecoratorTool = acc.popToolsAndMerge(MaxCellDecoratorCfg(
267 flags,
268 name = "LLP1AntiKt4EMPFlowJetMaxCellDecoratorTool",
269 SGKey_jets = 'AntiKt4EMPFlowJets',
270 SGKey_taus = '',
271 SGKey_electrons = '',
272 SGKey_photons = ''))
273 acc.addPublicTool(LLP1AntiKt4EMPFlowJetMaxCellDecoratorTool)
274
275 augmentationTools += [ LLP1AntiKt4EMPFlowJetMaxCellDecoratorTool ]
276
277 # Reclustered jets definitions
278 from JetRecConfig.JetRecConfig import registerAsInputConstit, JetRecCfg
279 from JetRecConfig.StandardSmallRJets import AntiKt4Truth, AntiKt4EMTopo
280 from JetRecConfig.JetDefinition import JetDefinition
281 from JetRecConfig.StandardJetConstits import stdConstitDic as cst
282
283 registerAsInputConstit(AntiKt4EMTopo)
284 registerAsInputConstit(AntiKt4Truth)
285 cst.AntiKt4EMTopoJets.label = "EMTopoRC"
286 cst.AntiKt4TruthJets.label = "TruthRC"
287
288 AntiKt10RCEMTopo = JetDefinition( "AntiKt",1.0,cst.AntiKt4EMTopoJets,
289 ghostdefs = ["Track", "TrackLRT", "LCTopoOrigin"],
290 modifiers = ("Sort", "Filter:200000",),
291 standardRecoMode = True,
292 lock = True,
293 )
294 if flags.Input.isMC:
295 AntiKt10RCTruth = JetDefinition("AntiKt",1.0,cst.AntiKt4TruthJets,
296 ghostdefs = [],
297 modifiers = ("Sort", "Filter:200000",),
298 standardRecoMode = True,
299 lock = True
300 )
301
302 # Do the dedicated LRT-aware tau reconstruction
303 if flags.Tracking.doLargeD0:
304 from JetRecConfig.StandardSmallRJets import AntiKt4LCTopo
305 acc.merge(JetRecCfg(flags, AntiKt4LCTopo))
306
307 # Run tau reconstruction config.
308 from tauRec.TauConfig import TauLRTReconstructionCfg
309 acc.merge(TauLRTReconstructionCfg(flags))
310
311 # Run displaced tau ID decoration.
312 from DerivationFrameworkTau.TauCommonConfig import AddTauIDDisplacedDecorationCfg
313 acc.merge(AddTauIDDisplacedDecorationCfg(flags))
314
315 from DerivationFrameworkPhys.PhysCommonConfig import PhysCommonAugmentationsCfg
316 acc.merge(PhysCommonAugmentationsCfg(flags, TriggerListsHelper = kwargs['TriggerListsHelper']))
317 acc.merge(JetRecCfg(flags,AntiKt10RCEMTopo))
318 if flags.Input.isMC: acc.merge(JetRecCfg(flags,AntiKt10RCTruth))
319
320 if flags.Tracking.doLargeD0:
321 # MET with LRT in association map
322 from DerivationFrameworkJetEtMiss.METCommonConfig import METLRTCfg
323 acc.merge(METLRTCfg(flags, "AntiKt4EMTopo"))
324 acc.merge(METLRTCfg(flags, "AntiKt4EMPFlow"))
325
326 # LRT Egamma
327 from DerivationFrameworkEGamma.EGammaLRTConfig import EGammaLRTCfg
328 acc.merge(EGammaLRTCfg(flags))
329
330 from DerivationFrameworkLLP.LLPToolsConfig import LRTElectronLHSelectorsCfg
331 acc.merge(LRTElectronLHSelectorsCfg(flags))
332
333 # LRT Muons
334 from DerivationFrameworkMuons.MuonsCommonConfig import MuonsCommonCfg
335 acc.merge(MuonsCommonCfg(flags, suff="LRT"))
336
337 #Photon ID Selector
338 from DerivationFrameworkLLP.LLPToolsConfig import PhotonIsEMSelectorsCfg
339 acc.merge(PhotonIsEMSelectorsCfg(flags))
340
341 # Recover Zero Pixel Hit Muons
342 from DerivationFrameworkLLP.LLPToolsConfig import RecoverZeroPixelHitMuonsCfg
343 acc.merge(RecoverZeroPixelHitMuonsCfg(flags))
344
345 # flavor tagging
346 from BTagging.FlavorTaggingConfig import FlavorTaggingCfg
347 acc.merge(FlavorTaggingCfg(flags, 'AntiKt4EMTopoJets'))
348
349 # VrtSecInclusive
350 from VrtSecInclusive.VrtSecInclusiveConfig import VrtSecInclusiveCfg
351
352 # MuSAVtxFitter
353 from MuSAVtxFitter.MuSAVtxFitterConfig import MuSAVtxFitterConfig, MuSAVtxJPsiValidationAlgCfg, MuSAVtxFitterValidationConfig
354
355 acc.merge(VrtSecInclusiveCfg(flags,
356 name = "VrtSecInclusive",
357 AugmentingVersionString = "",
358 FillIntermediateVertices = False,
359 TrackLocation = MergedTrackCollection))
360 LLP1VrtSecInclusiveSuffixes.append("")
361
362 # short-lifetime VSI
363 shortLifetimeSuffix = "_shortLifetime"
364 acc.merge(VrtSecInclusiveCfg(flags,
365 name = "VrtSecInclusive_InDet"+shortLifetimeSuffix,
366 AugmentingVersionString = shortLifetimeSuffix,
367 FillIntermediateVertices = False,
368 TrackLocation = MergedTrackCollection,
369 twoTrkVtxFormingD0Cut = 1.0))
370 LLP1VrtSecInclusiveSuffixes.append(shortLifetimeSuffix)
371
372 # short-lifetime VSI, nod0 for LRSM dHNL analysis
373 shortLifetimeNod0Suffix = "_shortLifetime_nod0"
374 acc.merge(VrtSecInclusiveCfg(flags,
375 name = "VrtSecInclusive_InDet"+shortLifetimeNod0Suffix,
376 AugmentingVersionString = shortLifetimeNod0Suffix,
377 FillIntermediateVertices = False,
378 TrackLocation = MergedTrackCollection,
379 twoTrkVtxFormingD0Cut = 0))
380 LLP1VrtSecInclusiveSuffixes.append(shortLifetimeNod0Suffix)
381
382 # disappearing track + LRT VSI
383 if flags.Tracking.doTrackSegmentsDisappearing:
384 dissapearingSuffix = "_disappearing"
385 acc.merge(VrtSecInclusiveCfg(
386 flags, name = "VrtSecInclusive_"+dissapearingSuffix,
387 AugmentingVersionString = dissapearingSuffix,
388 FillIntermediateVertices = False,
389 TrackLocation = MergedTrackletCollection,
390 doReassembleVertices = True,
391 doMergeByShuffling = False,
392 doMergeFinalVerticesDistance= False,
393 doAssociateNonSelectedTracks= False,
394 DoPVcompatibility = True,
395 RemoveFake2TrkVrt = False,
396 PassThroughTrackSelection = True,
397 TruncateListOfWorkingVertices = False,
398 twoTrkVtxFormingD0Cut = 0.0,
399 SelVrtChi2Cut = 1000000.0,
400 twoTrVrtMaxPerigeeDist = 50.0,
401 twoTrVrtMinRadius = 50.0,
402 doDisappearingTrackVertexing= True))
403 LLP1VrtSecInclusiveSuffixes.append(dissapearingSuffix)
404
405 if flags.Input.isMC and flags.Derivation.LLP.doTrackSystematics:
406 from InDetTrackSystematicsTools.InDetTrackSystematicsToolsConfig import TrackSystematicsAlgCfg
407 TrackSystSuffix = "_TRK_EFF_LARGED0_GLOBAL__1down"
408 acc.merge(TrackSystematicsAlgCfg(
409 flags,
410 name=f"InDetTrackSystematicsAlg{TrackSystSuffix}",
411 InputTrackContainer = MergedTrackCollection,
412 OutputTrackContainer = f"{MergedTrackCollection}{TrackSystSuffix}"))
413 acc.merge(VrtSecInclusiveCfg(flags,
414 name = f"VrtSecInclusive{TrackSystSuffix}",
415 AugmentingVersionString = TrackSystSuffix,
416 FillIntermediateVertices = False,
417 TrackLocation = f"{MergedTrackCollection}{TrackSystSuffix}"))
418 LLP1VrtSecInclusiveSuffixes.append(TrackSystSuffix)
419
420 TrackSystSuffixShortLifetime = "_TRK_EFF_LARGED0_GLOBAL__1down_shortLifetime"
421 acc.merge(TrackSystematicsAlgCfg(
422 flags,
423 name=f"InDetTrackSystematicsAlg{TrackSystSuffixShortLifetime}",
424 InputTrackContainer = MergedTrackCollection,
425 OutputTrackContainer = f"{MergedTrackCollection}{TrackSystSuffixShortLifetime}"))
426 acc.merge(VrtSecInclusiveCfg(flags,
427 name = f"VrtSecInclusive{TrackSystSuffixShortLifetime}",
428 AugmentingVersionString = TrackSystSuffixShortLifetime,
429 FillIntermediateVertices = False,
430 TrackLocation = f"{MergedTrackCollection}{TrackSystSuffixShortLifetime}",
431 twoTrkVtxFormingD0Cut = 1.0))
432 LLP1VrtSecInclusiveSuffixes.append(TrackSystSuffixShortLifetime)
433
434 # LRT muons merge
435 MergedMuonContainer_wZPH = (
436 "StdWithLRTMuons_wZPH" if flags.Tracking.doLargeD0 else "Muons_wZPH")
437 from DerivationFrameworkLLP.LLPToolsConfig import ZeroPixelHitMuonMergerAlgCfg
438 acc.merge(ZeroPixelHitMuonMergerAlgCfg(flags,
439 InputMuonContainers = [MergedMuonContainer, "ZeroPixelHitMuons"],
440 OutputMuonLocation = MergedMuonContainer_wZPH))
441
442
443 # leptons-only VSI
444 LeptonsSuffix = "_Leptons"
445 acc.merge(VrtSecInclusiveCfg(flags,
446 name = "VrtSecInclusive_InDet"+LeptonsSuffix,
447 AugmentingVersionString = LeptonsSuffix,
448 FillIntermediateVertices = False,
449 TrackLocation = MergedTrackCollection,
450 twoTrkVtxFormingD0Cut = 1.0,
451 doSelectTracksFromMuons = True,
452 doRemoveCaloTaggedMuons = True,
453 doSelectTracksFromElectrons = True,
454 MuonLocation = MergedMuonContainer,
455 ElectronLocation = MergedElectronContainer))
456 LLP1VrtSecInclusiveSuffixes.append(LeptonsSuffix)
457
458 # track VSI
459 LepTrackSuffix = "_LepTrack"
460 acc.merge(VrtSecInclusiveCfg(flags,
461 name = "VrtSecInclusive_InDet"+LepTrackSuffix,
462 AugmentingVersionString = LepTrackSuffix,
463 FillIntermediateVertices = False,
464 TrackLocation = MergedTrackCollection,
465 MuonLocation = MergedMuonContainer,
466 ElectronLocation = MergedElectronContainer,
467 twoTrkVtxFormingD0Cut = 1.0,
468 doSelectIDAndGSFTracks = True,
469 doRemoveCaloTaggedMuons = True,
470 doRemoveNonLeptonVertices = True,
471 doAssociateNonSelectedTracks= False))
472 LLP1VrtSecInclusiveSuffixes.append(LepTrackSuffix)
473
474 # Small-d0 Muons VSI
475 BoostedMuonsSuffix = "_BoostedMuons"
476 acc.merge(VrtSecInclusiveCfg(flags,
477 name = "VrtSecInclusive_InDet"+BoostedMuonsSuffix,
478 AugmentingVersionString = BoostedMuonsSuffix,
479 FillIntermediateVertices = False,
480 TrackLocation = MergedTrackCollection,
481 twoTrkVtxFormingD0Cut = 0.0,
482 doSelectTracksFromMuons = True,
483 doRemoveCaloTaggedMuons = True,
484 doSelectTracksFromElectrons = False,
485 MuonLocation = MergedMuonContainer_wZPH,
486 do_PVvetoCut = False,
487 DoTwoTrSoftBtag = True,
488 TwoTrVrtMinDistFromPVCut = 0.5,
489 associatePtCut = 500.))
490 LLP1VrtSecInclusiveSuffixes.append(BoostedMuonsSuffix)
491
492
493 # Small-d0 Electrons VSI
494 BoostedElectronsSuffix = "_BoostedElectrons"
495 acc.merge(VrtSecInclusiveCfg(flags,
496 name = "VrtSecInclusive_InDet"+BoostedElectronsSuffix,
497 AugmentingVersionString = BoostedElectronsSuffix,
498 FillIntermediateVertices = False,
499 TrackLocation = MergedTrackCollection,
500 twoTrkVtxFormingD0Cut = 0.0,
501 doSelectTracksFromMuons = False,
502 doSelectTracksFromElectrons = True,
503 ElectronLocation = MergedElectronContainer,
504 do_PVvetoCut = False,
505 DoTwoTrSoftBtag = True,
506 TwoTrVrtMinDistFromPVCut = 0.5,
507 associatePtCut = 500.))
508 LLP1VrtSecInclusiveSuffixes.append(BoostedElectronsSuffix)
509
510
511 # MuSA Vertices
512 acc.merge(MuSAVtxFitterConfig(flags,
513 MuonContainerName=MergedMuonContainer))
514
515 if flags.Derivation.LLP.doMuSAValidation:
516 #Create JPsi tagged muon container
517 acc.merge(MuSAVtxJPsiValidationAlgCfg(flags,
518 MuonContainer=MergedMuonContainer,
519 JPsiMuonContainer="JPsiMuons"))
520
521 # JPsi validation MuSA Vertices
522 acc.merge(MuSAVtxFitterValidationConfig(flags,
523 name="MuSAVtxFitterValidationJPsi",
524 MuonContainerName="JPsiMuons"))
525 # all MSTPs validation MuSA Vertices
526 acc.merge(MuSAVtxFitterValidationConfig(flags,
527 MuonContainerName=MergedMuonContainer,
528 MuSAVtxContainerName="ValidationMuSAVertices",
529 MuSAExtrapolatedTracksName="ValidationMuSAExtrapolatedTrackParticles",
530 MSTPContainerName="MuonSpectrometerTrackParticles"))
531
532
533 # NewVSI: LepTrack variation
534 from NewVrtSecInclusiveTool.NewVrtSecInclusiveAlgConfig import NewVrtSecInclusiveAlgLLPCfg
535 from NewVrtSecInclusiveTool.NewVrtSecInclusiveConfig import DVFinderToolCfg
536 IDAndGSFSuffix = "_IDAndGSF_LepTrack"
537
538 NVSILepTrack_Tool = acc.popToolsAndMerge(DVFinderToolCfg(flags,FillHist=False,AugmentingVersionString=IDAndGSFSuffix,MaxZVrt=1000.,AntiPileupSigRCut=2.))
539 acc.merge(NewVrtSecInclusiveAlgLLPCfg(flags,
540 algname = "NVSI"+IDAndGSFSuffix,
541 AugmentingVersionString = IDAndGSFSuffix,
542 ElectronContainer = MergedElectronContainer,
543 MuonContainer = MergedMuonContainer,
544 TrackParticleContainer = MergedTrackCollection,
545 GSFTrackParticleContainer = MergedGSFTrackCollection,
546 BVertexContainerName = "NewVrtSecInclusive_SecondaryVertices"+IDAndGSFSuffix,
547 AddIDTracks = True,
548 AddGSFTracks = True,
549 RemoveNonLepVertices = True,
550 BVertexTool = NVSILepTrack_Tool))
551 LLP1NewVSISuffixes.append(IDAndGSFSuffix)
552
553 # bad jet cleaning
554 jet_clean_prefix="DFCommonJets_"
555 jet_clean_container="AntiKt4EMTopoJets"
556 jet_clean_level="SuperLooseBadLLP"
557 from JetSelectorTools.JetSelectorToolsConfig import EventCleaningToolCfg, JetCleaningToolCfg
558 LLP1JetCleanSuperLLPTool = acc.popToolsAndMerge(JetCleaningToolCfg(flags,
559 "LLP1JetCleanSuperLLP",
560 jet_clean_container,
561 jet_clean_level,
562 False))
563 acc.addPublicTool(LLP1JetCleanSuperLLPTool)
564
565 LLP1EventCleanSuperLLPTool = acc.popToolsAndMerge(EventCleaningToolCfg(flags,
566 "LLP1EventCleanSuperLLP",
567 jet_clean_level))
568 LLP1EventCleanSuperLLPTool.JetCleanPrefix = jet_clean_prefix
569 LLP1EventCleanSuperLLPTool.OrDecorator = "passOR_EMTopo"
570 LLP1EventCleanSuperLLPTool.JetContainer = jet_clean_container
571 LLP1EventCleanSuperLLPTool.JetCleaningTool = LLP1JetCleanSuperLLPTool
572 acc.addPublicTool(LLP1EventCleanSuperLLPTool)
573
574 LLP1EventCleanAlg = CompFactory.EventCleaningTestAlg(
575 "LLP1JetCleanDecoratorSuperLLP",
576 EventCleaningTool = LLP1EventCleanSuperLLPTool,
577 JetCollectionName = jet_clean_container,
578 EventCleanPrefix = jet_clean_prefix,
579 CleaningLevel = jet_clean_level,
580 doEvent = True)
581
582 # Sequence for decorator locking.
583 # See comments in JetCommonConfig.AddEventCleanFlagsCfg.
584 acc.addSequence(CompFactory.AthSequencer('EventCleanSeq', Sequential=True))
585 acc.addEventAlgo(LLP1EventCleanAlg, 'EventCleanSeq')
586
587
588
589 from DerivationFrameworkLLP.LLPToolsConfig import AugmentationToolLeadingJetsCfg
590 augmentationToolLeadingJets = acc.getPrimaryAndMerge(AugmentationToolLeadingJetsCfg(flags))
591 acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(name, AugmentationTools = [augmentationToolLeadingJets]))
592
593 # Thinning tools...
594 from DerivationFrameworkInDet.InDetToolsConfig import TrackParticleThinningCfg, EgammaTrackParticleThinningCfg, MuonTrackParticleThinningCfg, TauTrackParticleThinningCfg, DiTauTrackParticleThinningCfg
595 from DerivationFrameworkTools.DerivationFrameworkToolsConfig import GenericObjectThinningCfg
596 from DerivationFrameworkTau.TauCommonConfig import TauThinningCfg
597
598 # Inner detector tracks need to have greater than 10 GeV of pT
599 LLP1TrackParticleThinningTool = acc.getPrimaryAndMerge(TrackParticleThinningCfg(
600 flags,
601 name = "LLP1TrackParticleThinningTool",
602 StreamName = kwargs['StreamName'],
603 SelectionString = "InDetTrackParticles.pt>10*GeV",
604 InDetTrackParticlesKey = "InDetTrackParticles"))
605
606 # Keep all GSF LRT Tracks
607 if flags.Tracking.doLargeD0:
608 LLP1LRTGSFTrackParticleThinningTool = acc.getPrimaryAndMerge(
609 TrackParticleThinningCfg(
610 flags, name = "LLP1LRTGSFTrackParticleThinningTool",
611 StreamName = kwargs['StreamName'],
612 SelectionString = "LRTGSFTrackParticles.pt>0*GeV",
613 InDetTrackParticlesKey = "LRTGSFTrackParticles"))
614
615 # Pixel tracklets need to have greater than 5 GeV of pT
616 if flags.Tracking.doTrackSegmentsDisappearing:
617 LLP1DTTrackParticleThinningTool = acc.getPrimaryAndMerge(
618 TrackParticleThinningCfg(
619 flags, name = "LLP1DTTrackParticleThinningTool",
620 StreamName = kwargs['StreamName'],
621 SelectionString = "InDetDisappearingTrackParticles.pt>5*GeV",
622 InDetTrackParticlesKey = "InDetDisappearingTrackParticles"))
623
624 # Include inner detector tracks associated with electrons
625 LLP1ElectronTPThinningTool = acc.getPrimaryAndMerge(EgammaTrackParticleThinningCfg(
626 flags,
627 name = "LLP1ElectronTPThinningTool",
628 StreamName = kwargs['StreamName'],
629 SGKey = "Electrons",
630 InDetTrackParticlesKey = "InDetTrackParticles"))
631
632 # Include inner detector tracks associated with LRT electrons
633 if flags.Tracking.doLargeD0:
634 LLP1LRTElectronTPThinningTool = acc.getPrimaryAndMerge(
635 EgammaTrackParticleThinningCfg(
636 flags, name = "LLP1LRTElectronTPThinningTool",
637 StreamName = kwargs['StreamName'],
638 SGKey = "LRTElectrons",
639 InDetTrackParticlesKey = "InDetLargeD0TrackParticles",
640 GSFTrackParticlesKey = "LRTGSFTrackParticles"))
641
642 # Include inner detector tracks associated with muons
643 LLP1MuonTPThinningTool = acc.getPrimaryAndMerge(MuonTrackParticleThinningCfg(
644 flags,
645 name = "LLP1MuonTPThinningTool",
646 StreamName = kwargs['StreamName'],
647 MuonKey = "Muons",
648 InDetTrackParticlesKey = "InDetTrackParticles"))
649
650 # Include LRT inner detector tracks associated with LRT muons
651 if flags.Tracking.doLargeD0:
652 LLP1LRTMuonTPThinningTool = acc.getPrimaryAndMerge(
653 MuonTrackParticleThinningCfg(
654 flags, name = "LLP1LRTMuonTPThinningTool",
655 StreamName = kwargs['StreamName'],
656 MuonKey = "MuonsLRT",
657 InDetTrackParticlesKey = "InDetLargeD0TrackParticles"))
658
659 # GSF tracks associated to photons
660 LLP1PhotonTPThinningTool = acc.getPrimaryAndMerge(EgammaTrackParticleThinningCfg(
661 flags,
662 name = "LLP1PhotonTPThinningTool",
663 StreamName = kwargs['StreamName'],
664 SGKey = "Photons",
665 InDetTrackParticlesKey = "",
666 GSFConversionVerticesKey = "GSFConversionVertices",
667 GSFTrackParticlesKey = "GSFTrackParticles",
668 BestMatchOnly = True,
669 BestVtxMatchOnly = True))
670
671 # Tau-related containers: taus, tau tracks and associated ID tracks, neutral PFOs, secondary vertices
672 tau_thinning_expression = f"TauJets.pt >= {flags.Tau.MinPtDAOD}"
673 LLP1TauJetsThinningTool = acc.getPrimaryAndMerge(TauThinningCfg(
674 flags,
675 name = "LLP1TauJetThinningTool",
676 StreamName = kwargs['StreamName'],
677 Taus = "TauJets",
678 TauTracks = "TauTracks",
679 TrackParticles = "InDetTrackParticles",
680 TauNeutralPFOs = "TauNeutralParticleFlowObjects",
681 TauSecondaryVertices = "TauSecondaryVertices",
682 SelectionString = tau_thinning_expression))
683
684 # Only keep tau tracks (and associated ID tracks) classified as charged tracks
685 LLP1TauTPThinningTool = acc.getPrimaryAndMerge(TauTrackParticleThinningCfg(
686 flags,
687 name = "LLP1TauTPThinningTool",
688 StreamName = kwargs['StreamName'],
689 TauKey = "TauJets",
690 InDetTrackParticlesKey = "InDetTrackParticles",
691 DoTauTracksThinning = True,
692 TauTracksKey = "TauTracks"))
693
694 tau_murm_thinning_expression = tau_thinning_expression.replace('TauJets', 'TauJets_MuonRM')
695 LLP1TauJetMuonRMParticleThinningTool = acc.getPrimaryAndMerge(TauThinningCfg(
696 flags,
697 name = "LLP1TauJets_MuonRMThinningTool",
698 StreamName = kwargs['StreamName'],
699 Taus = "TauJets_MuonRM",
700 TauTracks = "TauTracks_MuonRM",
701 TrackParticles = "InDetTrackParticles",
702 TauNeutralPFOs = "TauNeutralParticleFlowObjects_MuonRM",
703 TauSecondaryVertices = "TauSecondaryVertices_MuonRM",
704 SelectionString = tau_murm_thinning_expression))
705
706 # ID tracks associated with high-pt di-tau
707 LLP1DiTauTPThinningTool = acc.getPrimaryAndMerge(DiTauTrackParticleThinningCfg(
708 flags,
709 name = "LLP1DiTauTPThinningTool",
710 StreamName = kwargs['StreamName'],
711 DiTauKey = "DiTauJets",
712 InDetTrackParticlesKey = "InDetTrackParticles"))
713
714
715 LLP1DiTauLowPtThinningTool = acc.getPrimaryAndMerge(GenericObjectThinningCfg(
716 flags,
717 name = "LLP1DiTauLowPtThinningTool",
718 StreamName = kwargs['StreamName'],
719 ContainerName = "DiTauJetsLowPt",
720 SelectionString = "DiTauJetsLowPt.nSubjets > 1"))
721
722 # ID tracks associated with low-pt ditau
723 LLP1DiTauLowPtTPThinningTool = acc.getPrimaryAndMerge(DiTauTrackParticleThinningCfg(
724 flags,
725 name = "LLP1DiTauLowPtTPThinningTool",
726 StreamName = kwargs['StreamName'],
727 DiTauKey = "DiTauJetsLowPt",
728 InDetTrackParticlesKey = "InDetTrackParticles",
729 SelectionString = "DiTauJetsLowPt.nSubjets > 1"))
730
731 if flags.Tracking.doLargeD0:
732 from DerivationFrameworkLLP.LLPToolsConfig import TauLRTThinningCfg
733 tau_lrt_thinning_expression = f"TauJetsLRT.pt >= {flags.Tau.MinPtDAOD}"
734 LLP1TauJetsLRTThinningTool = acc.getPrimaryAndMerge(TauLRTThinningCfg(
735 flags,
736 name = "LLP1TauJetLRTThinningTool",
737 StreamName = kwargs['StreamName'],
738 Taus = "TauJetsLRT",
739 TauTracks = "TauTracksLRT",
740 TrackParticles = "InDetTrackParticles",
741 TrackLargeD0Particles= "InDetLargeD0TrackParticles",
742 TauNeutralPFOs = "TauNeutralParticleFlowObjectsLRT",
743 TauSecondaryVertices = "TauSecondaryVerticesLRT",
744 SelectionString = tau_lrt_thinning_expression))
745
746 # ID Tracks associated with secondary vertices
747 from DerivationFrameworkLLP.LLPToolsConfig import VSITrackParticleThinningCfg
748 LLP1VSITPThinningTool = acc.getPrimaryAndMerge(VSITrackParticleThinningCfg(flags,
749 name = "LLP1VSITPThinningTool",
750 StreamName = kwargs['StreamName'],
751 InDetTrackParticlesKey = "InDetTrackParticles",
752 AugVerStrings = LLP1VrtSecInclusiveSuffixes + LLP1NewVSISuffixes))
753
754 if flags.Tracking.doLargeD0:
755 LLP1LRTVSITPThinningTool = acc.getPrimaryAndMerge(
756 VSITrackParticleThinningCfg(
757 flags, name = "LLP1LRTVSITPThinningTool",
758 StreamName = kwargs['StreamName'],
759 InDetTrackParticlesKey = "InDetLargeD0TrackParticles",
760 AugVerStrings = LLP1VrtSecInclusiveSuffixes + LLP1NewVSISuffixes))
761
762 LLP1GSFVSITPThinningTool = acc.getPrimaryAndMerge(VSITrackParticleThinningCfg(flags,
763 name = "LLP1GSFVSITPThinningTool",
764 StreamName = kwargs['StreamName'],
765 InDetTrackParticlesKey = "GSFTrackParticles",
766 AugVerStrings = [IDAndGSFSuffix]))
767
768 # ID Tracks associated with jets
769 from DerivationFrameworkLLP.LLPToolsConfig import JetTrackParticleThinningCfg, JetLargeD0TrackParticleThinningCfg
770 LLP1JetTPThinningTool = acc.getPrimaryAndMerge(JetTrackParticleThinningCfg(flags,
771 name = "LLP1JetTPThinningTool",
772 StreamName = kwargs['StreamName'],
773 JetKey = "AntiKt4EMTopoJets",
774 SelectionString = "(AntiKt4EMTopoJets.pt > 20.*GeV) && (abs(AntiKt4EMTopoJets.eta) < 2.5)",
775 InDetTrackParticlesKey = "InDetTrackParticles"))
776
777 LLP1FatJetTPThinningTool = acc.getPrimaryAndMerge(JetTrackParticleThinningCfg( flags,
778 name = "LLP1FatJetTPThinningTool",
779 StreamName = kwargs['StreamName'],
780 JetKey = "AntiKt10EMTopoRCJets",
781 SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
782 InDetTrackParticlesKey = "InDetTrackParticles",
783 ))
784
785 # LRT Tracks associated with jets
786 if flags.Tracking.doLargeD0:
787 LLP1LRTJetTPThinningTool = acc.getPrimaryAndMerge(
788 JetLargeD0TrackParticleThinningCfg(
789 flags, name = "LLP1LRTJetTPThinningTool",
790 StreamName = kwargs['StreamName'],
791 JetKey = "AntiKt4EMTopoJets",
792 SelectionString = "(AntiKt4EMTopoJets.pt > 20.*GeV) && (abs(AntiKt4EMTopoJets.eta) < 2.5)",
793 InDetTrackParticlesKey = "InDetLargeD0TrackParticles"))
794
795 LLP1LRTFatJetTPThinningTool = acc.getPrimaryAndMerge(
796 JetLargeD0TrackParticleThinningCfg(
797 flags, name = "LLP1LRTFatJetTPThinningTool",
798 StreamName = kwargs['StreamName'],
799 JetKey = "AntiKt10EMTopoRCJets",
800 SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
801 InDetTrackParticlesKey = "InDetLargeD0TrackParticles"))
802
803 # high dE/dx and low pT tracks
804 from DerivationFrameworkLLP.LLPToolsConfig import PixeldEdxTrackParticleThinningCfg
805 LLP1PixeldEdxTrackParticleThinningTool = acc.getPrimaryAndMerge(PixeldEdxTrackParticleThinningCfg(
806 flags,
807 name = "LLP1PixeldEdxTrackParticleThinningTool",
808 StreamName = kwargs['StreamName'],
809 InDetTrackParticlesKey = "InDetTrackParticles"))
810
811
812 #Thinning CaloCalTopoClusters associated to AntiKt4EMTopoJets
813 from DerivationFrameworkCalo.DerivationFrameworkCaloConfig import JetCaloClusterThinningCfg
814
815 LLP1CCThinningTool = acc.getPrimaryAndMerge(JetCaloClusterThinningCfg(
816 flags,
817 name = "LLP1CCTool",
818 StreamName = kwargs['StreamName'],
819 SGKey = "AntiKt4EMTopoJets",
820 TopoClCollectionSGKey = "CaloCalTopoClusters",
821 AdditionalClustersKey = ["EMOriginTopoClusters","LCOriginTopoClusters"]
822 ))
823
824
825 # Finally the kernel itself
826 thinningTools = [LLP1TrackParticleThinningTool,
827 LLP1ElectronTPThinningTool,
828 LLP1MuonTPThinningTool,
829 LLP1PhotonTPThinningTool,
830 LLP1TauJetsThinningTool,
831 LLP1TauTPThinningTool,
832 LLP1TauJetMuonRMParticleThinningTool,
833 LLP1DiTauTPThinningTool,
834 LLP1DiTauLowPtThinningTool,
835 LLP1DiTauLowPtTPThinningTool,
836 LLP1VSITPThinningTool,
837 LLP1GSFVSITPThinningTool,
838 LLP1JetTPThinningTool,
839 LLP1FatJetTPThinningTool,
840 LLP1PixeldEdxTrackParticleThinningTool,
841 LLP1CCThinningTool]
842
843 if flags.Tracking.doLargeD0:
844 thinningTools += [ LLP1LRTJetTPThinningTool,
845 LLP1LRTFatJetTPThinningTool,
846 LLP1LRTGSFTrackParticleThinningTool,
847 LLP1LRTElectronTPThinningTool,
848 LLP1LRTMuonTPThinningTool,
849 LLP1TauJetsLRTThinningTool,
850 LLP1LRTVSITPThinningTool ]
851
852 if flags.Tracking.doTrackSegmentsDisappearing:
853 thinningTools += [ LLP1DTTrackParticleThinningTool ]
854
855
856 # Additionnal augmentations
857
858 # Compute RC substructure variables from energy clusters
859 from DerivationFrameworkLLP.LLPToolsConfig import RCJetSubstructureAugCfg
860 LLP1RCJetSubstructureClustTrimAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg(flags,
861 name = "LLP1RCJetSubstructureClustTrimAugTool",
862 StreamName = kwargs['StreamName'],
863 JetContainerKey = "AntiKt10EMTopoRCJets",
864 SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
865 GhostConstitNames = ["GhostLCTopoOrigin"],
866 Suffix = "clusterTrim",
867 Grooming = "Trimming",
868 RClusTrim = 0.2,
869 PtFracTrim = 0.05
870 ))
871 RCSubstructureClusterTrimAug = CompFactory.DerivationFramework.CommonAugmentation("RCSubstructureClusterTrimAug", AugmentationTools = [LLP1RCJetSubstructureClustTrimAugTool])
872 acc.addEventAlgo(RCSubstructureClusterTrimAug)
873
874 LLP1RCJetSubstructureClustSDAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg(flags,
875 name = "LLP1RCJetSubstructureClustSDAugTool",
876 StreamName = kwargs['StreamName'],
877 JetContainerKey = "AntiKt10EMTopoRCJets",
878 SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
879 GhostConstitNames = ["GhostLCTopoOrigin"],
880 Suffix = "clusterSoftDrop",
881 Grooming = "SoftDrop",
882 BetaSoft = 1.0,
883 ZcutSoft = 0.1
884 ))
885 RCSubstructureClusterSDAug = CompFactory.DerivationFramework.CommonAugmentation("RCSubstructureClusterSDAug", AugmentationTools = [LLP1RCJetSubstructureClustSDAugTool])
886 acc.addEventAlgo(RCSubstructureClusterSDAug)
887
888 # Compute RC substructure variables from tracks
889 ghostConstitNames = ["GhostTrack"]
890 if flags.Tracking.doLargeD0:
891 ghostConstitNames += ["GhostTrackLRT"]
892
893 from DerivationFrameworkLLP.LLPToolsConfig import RCJetSubstructureAugCfg
894 LLP1RCJetSubstructureTrackTrimAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg( flags,
895 name = "LLP1RCJetSubstructureTrackTrimAugTool",
896 StreamName = kwargs['StreamName'],
897 JetContainerKey = "AntiKt10EMTopoRCJets",
898 SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
899 GhostConstitNames = ghostConstitNames,
900 Suffix = "trackTrim",
901 Grooming = "Trimming",
902 RClusTrim = 0.2,
903 PtFracTrim = 0.05
904 ))
905 RCSubstructureTrackTrimAug = CompFactory.DerivationFramework.CommonAugmentation("RCSubstructureTrackTrimAug", AugmentationTools = [LLP1RCJetSubstructureTrackTrimAugTool])
906 acc.addEventAlgo(RCSubstructureTrackTrimAug)
907
908 from DerivationFrameworkLLP.LLPToolsConfig import RCJetSubstructureAugCfg
909 LLP1RCJetSubstructureTrackSDAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg( flags,
910 name = "LLP1RCJetSubstructureTrackSDAugTool",
911 StreamName = kwargs['StreamName'],
912 JetContainerKey = "AntiKt10EMTopoRCJets",
913 SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
914 GhostConstitNames = ghostConstitNames,
915 Suffix = "trackSoftDrop",
916 Grooming = "SoftDrop",
917 BetaSoft = 1.0,
918 ZcutSoft = 0.1
919 ))
920 RCSubstructureTrackSDAug = CompFactory.DerivationFramework.CommonAugmentation("RCSubstructureTrackSDAug", AugmentationTools = [LLP1RCJetSubstructureTrackSDAugTool])
921 acc.addEventAlgo(RCSubstructureTrackSDAug)
922
923
924
925 # Skimming
926 skimmingTools = []
927
928 if flags.Trigger.EDMVersion >= 0:
929 from DerivationFrameworkLLP.LLPToolsConfig import LLP1TriggerSkimmingToolCfg
930 LLP1TriggerSkimmingTool = acc.getPrimaryAndMerge(LLP1TriggerSkimmingToolCfg(
931 flags, name = "LLP1TriggerSkimmingTool",
932 TriggerListsHelper = kwargs['TriggerListsHelper']))
933
934 skimmingTools.append(LLP1TriggerSkimmingTool)
935
936 DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
937 acc.addEventAlgo(DerivationKernel(name,
938 SkimmingTools = skimmingTools,
939 ThinningTools = thinningTools,
940 AugmentationTools = augmentationTools))
941
942 return acc
943
944
945
946
947
948

Variable Documentation

◆ LLP1NewVSISuffixes

list python.LLP1.LLP1NewVSISuffixes = []

Definition at line 15 of file LLP1.py.

◆ LLP1VrtSecInclusiveSuffixes

list python.LLP1.LLP1VrtSecInclusiveSuffixes = []

Definition at line 14 of file LLP1.py.