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 945 of file LLP1.py.

945def LLP1Cfg(flags):
946 acc = ComponentAccumulator()
947
948 MergedElectronContainer = (
949 "StdWithLRTElectrons" if flags.Tracking.doLargeD0 else "Electrons")
950 MergedMuonContainer = "StdWithLRTMuons" if flags.Tracking.doLargeD0 else "Muons"
951 MergedMuonContainer_wZPH = (
952 "StdWithLRTMuons_wZPH" if flags.Tracking.doLargeD0 else "Muons_wZPH")
953
954 # Get the lists of triggers needed for trigger matching.
955 # This is needed at this scope (for the slimming) and further down in the config chain
956 # for actually configuring the matching, so we create it here and pass it down
957 # TODO: this should ideally be called higher up to avoid it being run multiple times in a train
958 from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
959 LLP1TriggerListsHelper = TriggerListsHelper(flags)
960
961 # Common augmentations
962 acc.merge(LLP1KernelCfg(flags, name="LLP1Kernel", StreamName = 'StreamDAOD_LLP1', TriggerListsHelper = LLP1TriggerListsHelper))
963
964
967 from IsolationSelection.IsolationSelectionConfig import IsoCloseByAlgsCfg
968 # We can't pass non-LRT containers to the LLP algorithm.
969 # Otherwise, if this is run in conjunction with PHYS, the decorations
970 # produced by the PHYS algorithm will be overwritten. To get those
971 # decorations produced when LLP1 is run alone, we schedule a separate
972 # algorithm for those but make it the same as the one in PHYS so that
973 # they'll be merged when both formats are used together.
974 acc.merge(IsoCloseByAlgsCfg(flags, isPhysLite = False,
975 stream_name = 'StreamDAOD_LLP1'))
976
977 contNames = [ MergedMuonContainer, MergedElectronContainer, "Photons" ]
978 acc.merge(IsoCloseByAlgsCfg(flags, suff = "_LLP1_LRTMerged",
979 isPhysLite = False, containerNames = contNames,
980 depContainerNames = ["Muons","MuonsLRT","Electrons","LRTElectrons","Photons"],
981 useSelTools = True, stream_name = 'StreamDAOD_LLP1',
982 isoDecSuffix = "CloseByCorr_LRT",
983 caloDecSuffix = '_LRT',
984 hasLRT = flags.Tracking.doLargeD0))
985 contNames = [ "ZeroPixelHitMuons" ]
986 acc.merge(IsoCloseByAlgsCfg(flags, suff = "_LLP1_ZeroPixelHitsMuons",
987 isPhysLite = False, containerNames = contNames,
988 depContainerNames = ["Muons"],
989 stream_name = 'StreamDAOD_LLP1',
990 isoDecSuffix = "CloseByCorr_ZPH"))
991
992 if flags.Tracking.doLargeD0:
993 contNames = [ "LRTElectrons", "MuonsLRT" ]
994 acc.merge(IsoCloseByAlgsCfg(flags, suff = "_LLP1",
995 isPhysLite = False, containerNames = contNames,
996 useSelTools = True,
997 stream_name = 'StreamDAOD_LLP1', hasLRT = True))
998
999 # ============================
1000 # Define contents of the format
1001 # =============================
1002 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
1003 from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
1004 from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
1005
1006 LLP1SlimmingHelper = SlimmingHelper("LLP1SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
1007
1008 LLP1SlimmingHelper.SmartCollections = ["EventInfo",
1009 "Electrons",
1010 "Photons",
1011 "Muons",
1012 "PrimaryVertices",
1013 "InDetTrackParticles",
1014 "AntiKt4EMTopoJets",
1015 "AntiKt4EMPFlowJets",
1016 "MET_Baseline_AntiKt4EMTopo",
1017 "MET_Baseline_AntiKt4EMPFlow",
1018 "TauJets",
1019 "TauJets_MuonRM",
1020 "DiTauJets",
1021 "DiTauJetsLowPt",
1022 "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets"]
1023 if flags.Tracking.doLargeD0:
1024 LLP1SlimmingHelper.SmartCollections += ["LRTElectrons", "MuonsLRT", "TauJetsLRT",
1025 "InDetLargeD0TrackParticles"]
1026
1027 LLP1SlimmingHelper.AllVariables = ["InDetDisappearingTrackParticles",
1028 "MSDisplacedVertex",
1029 "MuonSpectrometerTrackParticles",
1030 "UnAssocMuonSegments",
1031 "MuonSegments",
1032 "MSonlyTracklets",
1033 "CombinedMuonTrackParticles",
1034 "ExtrapolatedMuonTrackParticles",
1035 "CombinedStauTrackParticles",
1036 "AntiKt4EMTopoJets",
1037 "egammaClusters",
1038 "ElectronRingSets",
1039 "ElectronCaloRings",
1040 "JetRingSets",
1041 "JetCaloRings",
1042 "SlowMuons",
1043 "EMOriginTopoClusters",
1044 "Staus",
1045 "METAssoc_AntiKt4EMTopo",
1046 "MET_Core_AntiKt4EMTopo",
1047 "METAssoc_AntiKt4EMPFlow",
1048 "MET_Core_AntiKt4EMPFlow",
1049 "InDetLowPtRoITrackParticles",
1050 "PixelClusters",
1051 "PixelMSOSs",
1052 "DisappearingPixelMSOSs",
1053 "LowPtRoIPixelMSOSs",
1054 "SCT_Clusters",
1055 "SCT_MSOSs",
1056 "DisappearingSCT_MSOSs",
1057 "LowPtRoISCT_MSOSs",
1058 "LVL1MuonRoIs",
1059 "NCB_MuonSegments",
1060 "HLT_MuRoICluster_Composites"]
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_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 AntiKt4EMTopo
280 from JetRecConfig.JetDefinition import JetDefinition
281 from JetRecConfig.StandardJetConstits import stdConstitDic as cst
282
283 registerAsInputConstit(AntiKt4EMTopo)
284 cst.AntiKt4EMTopoJets.label = "EMTopoRC"
285 cst.AntiKt4TruthJets.label = "TruthRC"
286
287 AntiKt10RCEMTopo = JetDefinition( "AntiKt",1.0,cst.AntiKt4EMTopoJets,
288 ghostdefs = ["Track", "TrackLRT", "LCTopoOrigin"],
289 modifiers = ("Sort", "Filter:200000",),
290 standardRecoMode = True,
291 lock = True,
292 )
293 if flags.Input.isMC:
294 AntiKt10RCTruth = JetDefinition("AntiKt",1.0,cst.AntiKt4TruthJets,
295 ghostdefs = [],
296 modifiers = ("Sort", "Filter:200000",),
297 standardRecoMode = True,
298 lock = True
299 )
300
301 # Do the dedicated LRT-aware tau reconstruction
302 if flags.Tracking.doLargeD0:
303 from JetRecConfig.StandardSmallRJets import AntiKt4LCTopo
304 acc.merge(JetRecCfg(flags, AntiKt4LCTopo))
305
306 # Run tau reconstruction config.
307 from tauRec.TauConfig import TauLRTReconstructionCfg
308 acc.merge(TauLRTReconstructionCfg(flags))
309
310 # Run displaced tau ID decoration.
311 from DerivationFrameworkTau.TauCommonConfig import AddTauIDDisplacedDecorationCfg
312 acc.merge(AddTauIDDisplacedDecorationCfg(flags))
313
314 from DerivationFrameworkPhys.PhysCommonConfig import PhysCommonAugmentationsCfg
315 acc.merge(PhysCommonAugmentationsCfg(flags, TriggerListsHelper = kwargs['TriggerListsHelper']))
316 acc.merge(JetRecCfg(flags,AntiKt10RCEMTopo))
317 if flags.Input.isMC: acc.merge(JetRecCfg(flags,AntiKt10RCTruth))
318
319 if flags.Tracking.doLargeD0:
320 # MET with LRT in association map
321 from DerivationFrameworkJetEtMiss.METCommonConfig import METLRTCfg
322 acc.merge(METLRTCfg(flags, "AntiKt4EMTopo"))
323 acc.merge(METLRTCfg(flags, "AntiKt4EMPFlow"))
324
325 # LRT Egamma
326 from DerivationFrameworkEGamma.EGammaLRTConfig import EGammaLRTCfg
327 acc.merge(EGammaLRTCfg(flags))
328
329 from DerivationFrameworkLLP.LLPToolsConfig import LRTElectronLHSelectorsCfg
330 acc.merge(LRTElectronLHSelectorsCfg(flags))
331
332 # LRT Muons
333 from DerivationFrameworkMuons.MuonsCommonConfig import MuonsCommonCfg
334 acc.merge(MuonsCommonCfg(flags, suff="LRT"))
335
336 #Photon ID Selector
337 from DerivationFrameworkLLP.LLPToolsConfig import PhotonIsEMSelectorsCfg
338 acc.merge(PhotonIsEMSelectorsCfg(flags))
339
340 # Recover Zero Pixel Hit Muons
341 from DerivationFrameworkLLP.LLPToolsConfig import RecoverZeroPixelHitMuonsCfg
342 acc.merge(RecoverZeroPixelHitMuonsCfg(flags))
343
344 # flavor tagging
345 from BTagging.FlavorTaggingConfig import FlavorTaggingCfg
346 acc.merge(FlavorTaggingCfg(flags, 'AntiKt4EMTopoJets'))
347
348 # VrtSecInclusive
349 from VrtSecInclusive.VrtSecInclusiveConfig import VrtSecInclusiveCfg
350
351 # MuSAVtxFitter
352 from MuSAVtxFitter.MuSAVtxFitterConfig import MuSAVtxFitterConfig, MuSAVtxJPsiValidationAlgCfg, MuSAVtxFitterValidationConfig
353
354 acc.merge(VrtSecInclusiveCfg(flags,
355 name = "VrtSecInclusive",
356 AugmentingVersionString = "",
357 FillIntermediateVertices = False,
358 TrackLocation = MergedTrackCollection))
359 LLP1VrtSecInclusiveSuffixes.append("")
360
361 # short-lifetime VSI
362 shortLifetimeSuffix = "_shortLifetime"
363 acc.merge(VrtSecInclusiveCfg(flags,
364 name = "VrtSecInclusive_InDet"+shortLifetimeSuffix,
365 AugmentingVersionString = shortLifetimeSuffix,
366 FillIntermediateVertices = False,
367 TrackLocation = MergedTrackCollection,
368 twoTrkVtxFormingD0Cut = 1.0))
369 LLP1VrtSecInclusiveSuffixes.append(shortLifetimeSuffix)
370
371 # short-lifetime VSI, nod0 for LRSM dHNL analysis
372 shortLifetimeNod0Suffix = "_shortLifetime_nod0"
373 acc.merge(VrtSecInclusiveCfg(flags,
374 name = "VrtSecInclusive_InDet"+shortLifetimeNod0Suffix,
375 AugmentingVersionString = shortLifetimeNod0Suffix,
376 FillIntermediateVertices = False,
377 TrackLocation = MergedTrackCollection,
378 twoTrkVtxFormingD0Cut = 0))
379 LLP1VrtSecInclusiveSuffixes.append(shortLifetimeNod0Suffix)
380
381 # disappearing track + LRT VSI
382 if flags.Tracking.doTrackSegmentsDisappearing:
383 dissapearingSuffix = "_disappearing"
384 acc.merge(VrtSecInclusiveCfg(
385 flags, name = "VrtSecInclusive_"+dissapearingSuffix,
386 AugmentingVersionString = dissapearingSuffix,
387 FillIntermediateVertices = False,
388 TrackLocation = MergedTrackletCollection,
389 doReassembleVertices = True,
390 doMergeByShuffling = False,
391 doMergeFinalVerticesDistance= False,
392 doAssociateNonSelectedTracks= False,
393 DoPVcompatibility = True,
394 RemoveFake2TrkVrt = False,
395 PassThroughTrackSelection = True,
396 TruncateListOfWorkingVertices = False,
397 twoTrkVtxFormingD0Cut = 0.0,
398 SelVrtChi2Cut = 1000000.0,
399 twoTrVrtMaxPerigeeDist = 50.0,
400 twoTrVrtMinRadius = 50.0,
401 doDisappearingTrackVertexing= True))
402 LLP1VrtSecInclusiveSuffixes.append(dissapearingSuffix)
403
404 if flags.Input.isMC and flags.Derivation.LLP.doTrackSystematics:
405 from InDetTrackSystematicsTools.InDetTrackSystematicsToolsConfig import TrackSystematicsAlgCfg
406 TrackSystSuffix = "_TRK_EFF_LARGED0_GLOBAL__1down"
407 acc.merge(TrackSystematicsAlgCfg(
408 flags,
409 name=f"InDetTrackSystematicsAlg{TrackSystSuffix}",
410 InputTrackContainer = MergedTrackCollection,
411 OutputTrackContainer = f"{MergedTrackCollection}{TrackSystSuffix}"))
412 acc.merge(VrtSecInclusiveCfg(flags,
413 name = f"VrtSecInclusive{TrackSystSuffix}",
414 AugmentingVersionString = TrackSystSuffix,
415 FillIntermediateVertices = False,
416 TrackLocation = f"{MergedTrackCollection}{TrackSystSuffix}"))
417 LLP1VrtSecInclusiveSuffixes.append(TrackSystSuffix)
418
419 TrackSystSuffixShortLifetime = "_TRK_EFF_LARGED0_GLOBAL__1down_shortLifetime"
420 acc.merge(TrackSystematicsAlgCfg(
421 flags,
422 name=f"InDetTrackSystematicsAlg{TrackSystSuffixShortLifetime}",
423 InputTrackContainer = MergedTrackCollection,
424 OutputTrackContainer = f"{MergedTrackCollection}{TrackSystSuffixShortLifetime}"))
425 acc.merge(VrtSecInclusiveCfg(flags,
426 name = f"VrtSecInclusive{TrackSystSuffixShortLifetime}",
427 AugmentingVersionString = TrackSystSuffixShortLifetime,
428 FillIntermediateVertices = False,
429 TrackLocation = f"{MergedTrackCollection}{TrackSystSuffixShortLifetime}",
430 twoTrkVtxFormingD0Cut = 1.0))
431 LLP1VrtSecInclusiveSuffixes.append(TrackSystSuffixShortLifetime)
432
433 # LRT muons merge
434 MergedMuonContainer_wZPH = (
435 "StdWithLRTMuons_wZPH" if flags.Tracking.doLargeD0 else "Muons_wZPH")
436 from DerivationFrameworkLLP.LLPToolsConfig import ZeroPixelHitMuonMergerAlgCfg
437 acc.merge(ZeroPixelHitMuonMergerAlgCfg(flags,
438 InputMuonContainers = [MergedMuonContainer, "ZeroPixelHitMuons"],
439 OutputMuonLocation = MergedMuonContainer_wZPH))
440
441
442 # leptons-only VSI
443 LeptonsSuffix = "_Leptons"
444 acc.merge(VrtSecInclusiveCfg(flags,
445 name = "VrtSecInclusive_InDet"+LeptonsSuffix,
446 AugmentingVersionString = LeptonsSuffix,
447 FillIntermediateVertices = False,
448 TrackLocation = MergedTrackCollection,
449 twoTrkVtxFormingD0Cut = 1.0,
450 doSelectTracksFromMuons = True,
451 doRemoveCaloTaggedMuons = True,
452 doSelectTracksFromElectrons = True,
453 MuonLocation = MergedMuonContainer,
454 ElectronLocation = MergedElectronContainer))
455 LLP1VrtSecInclusiveSuffixes.append(LeptonsSuffix)
456
457 # track VSI
458 LepTrackSuffix = "_LepTrack"
459 acc.merge(VrtSecInclusiveCfg(flags,
460 name = "VrtSecInclusive_InDet"+LepTrackSuffix,
461 AugmentingVersionString = LepTrackSuffix,
462 FillIntermediateVertices = False,
463 TrackLocation = MergedTrackCollection,
464 MuonLocation = MergedMuonContainer,
465 ElectronLocation = MergedElectronContainer,
466 twoTrkVtxFormingD0Cut = 1.0,
467 doSelectIDAndGSFTracks = True,
468 doRemoveCaloTaggedMuons = True,
469 doRemoveNonLeptonVertices = True,
470 doAssociateNonSelectedTracks= False))
471 LLP1VrtSecInclusiveSuffixes.append(LepTrackSuffix)
472
473 # Small-d0 Muons VSI
474 BoostedMuonsSuffix = "_BoostedMuons"
475 acc.merge(VrtSecInclusiveCfg(flags,
476 name = "VrtSecInclusive_InDet"+BoostedMuonsSuffix,
477 AugmentingVersionString = BoostedMuonsSuffix,
478 FillIntermediateVertices = False,
479 TrackLocation = MergedTrackCollection,
480 twoTrkVtxFormingD0Cut = 0.0,
481 doSelectTracksFromMuons = True,
482 doRemoveCaloTaggedMuons = True,
483 doSelectTracksFromElectrons = False,
484 MuonLocation = MergedMuonContainer_wZPH,
485 do_PVvetoCut = False,
486 DoTwoTrSoftBtag = True,
487 TwoTrVrtMinDistFromPVCut = 0.5,
488 associatePtCut = 500.))
489 LLP1VrtSecInclusiveSuffixes.append(BoostedMuonsSuffix)
490
491
492 # Small-d0 Electrons VSI
493 BoostedElectronsSuffix = "_BoostedElectrons"
494 acc.merge(VrtSecInclusiveCfg(flags,
495 name = "VrtSecInclusive_InDet"+BoostedElectronsSuffix,
496 AugmentingVersionString = BoostedElectronsSuffix,
497 FillIntermediateVertices = False,
498 TrackLocation = MergedTrackCollection,
499 twoTrkVtxFormingD0Cut = 0.0,
500 doSelectTracksFromMuons = False,
501 doSelectTracksFromElectrons = True,
502 ElectronLocation = MergedElectronContainer,
503 do_PVvetoCut = False,
504 DoTwoTrSoftBtag = True,
505 TwoTrVrtMinDistFromPVCut = 0.5,
506 associatePtCut = 500.))
507 LLP1VrtSecInclusiveSuffixes.append(BoostedElectronsSuffix)
508
509
510 # MuSA Vertices
511 acc.merge(MuSAVtxFitterConfig(flags,
512 MuonContainerName=MergedMuonContainer))
513
514 if flags.Derivation.LLP.doMuSAValidation:
515 #Create JPsi tagged muon container
516 acc.merge(MuSAVtxJPsiValidationAlgCfg(flags,
517 MuonContainer=MergedMuonContainer,
518 JPsiMuonContainer="JPsiMuons"))
519
520 # JPsi validation MuSA Vertices
521 acc.merge(MuSAVtxFitterValidationConfig(flags,
522 name="MuSAVtxFitterValidationJPsi",
523 MuonContainerName="JPsiMuons"))
524 # all MSTPs validation MuSA Vertices
525 acc.merge(MuSAVtxFitterValidationConfig(flags,
526 MuonContainerName=MergedMuonContainer,
527 MuSAVtxContainerName="ValidationMuSAVertices",
528 MuSAExtrapolatedTracksName="ValidationMuSAExtrapolatedTrackParticles",
529 MSTPContainerName="MuonSpectrometerTrackParticles"))
530
531
532 # NewVSI: LepTrack variation
533 from NewVrtSecInclusiveTool.NewVrtSecInclusiveAlgConfig import NewVrtSecInclusiveAlgLLPCfg
534 from NewVrtSecInclusiveTool.NewVrtSecInclusiveConfig import DVFinderToolCfg
535 IDAndGSFSuffix = "_IDAndGSF_LepTrack"
536
537 NVSILepTrack_Tool = acc.popToolsAndMerge(DVFinderToolCfg(flags,FillHist=False,AugmentingVersionString=IDAndGSFSuffix,MaxZVrt=1000.,AntiPileupSigRCut=2.))
538 acc.merge(NewVrtSecInclusiveAlgLLPCfg(flags,
539 algname = "NVSI"+IDAndGSFSuffix,
540 AugmentingVersionString = IDAndGSFSuffix,
541 ElectronContainer = MergedElectronContainer,
542 MuonContainer = MergedMuonContainer,
543 TrackParticleContainer = MergedTrackCollection,
544 GSFTrackParticleContainer = MergedGSFTrackCollection,
545 BVertexContainerName = "NewVrtSecInclusive_SecondaryVertices"+IDAndGSFSuffix,
546 AddIDTracks = True,
547 AddGSFTracks = True,
548 RemoveNonLepVertices = True,
549 BVertexTool = NVSILepTrack_Tool))
550 LLP1NewVSISuffixes.append(IDAndGSFSuffix)
551
552 # bad jet cleaning
553 jet_clean_prefix="DFCommonJets_"
554 jet_clean_container="AntiKt4EMTopoJets"
555 jet_clean_level="SuperLooseBadLLP"
556 from JetSelectorTools.JetSelectorToolsConfig import EventCleaningToolCfg, JetCleaningToolCfg
557 LLP1JetCleanSuperLLPTool = acc.popToolsAndMerge(JetCleaningToolCfg(flags,
558 "LLP1JetCleanSuperLLP",
559 jet_clean_container,
560 jet_clean_level,
561 False))
562 acc.addPublicTool(LLP1JetCleanSuperLLPTool)
563
564 LLP1EventCleanSuperLLPTool = acc.popToolsAndMerge(EventCleaningToolCfg(flags,
565 "LLP1EventCleanSuperLLP",
566 jet_clean_level))
567 LLP1EventCleanSuperLLPTool.JetCleanPrefix = jet_clean_prefix
568 LLP1EventCleanSuperLLPTool.OrDecorator = "passOR_EMTopo"
569 LLP1EventCleanSuperLLPTool.JetContainer = jet_clean_container
570 LLP1EventCleanSuperLLPTool.JetCleaningTool = LLP1JetCleanSuperLLPTool
571 acc.addPublicTool(LLP1EventCleanSuperLLPTool)
572
573 LLP1EventCleanAlg = CompFactory.EventCleaningTestAlg(
574 "LLP1JetCleanDecoratorSuperLLP",
575 EventCleaningTool = LLP1EventCleanSuperLLPTool,
576 JetCollectionName = jet_clean_container,
577 EventCleanPrefix = jet_clean_prefix,
578 CleaningLevel = jet_clean_level,
579 doEvent = True)
580
581 acc.addEventAlgo(LLP1EventCleanAlg)
582
583
584
585 from DerivationFrameworkLLP.LLPToolsConfig import AugmentationToolLeadingJetsCfg
586 augmentationToolLeadingJets = acc.getPrimaryAndMerge(AugmentationToolLeadingJetsCfg(flags))
587 acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(name, AugmentationTools = [augmentationToolLeadingJets]))
588
589 # Thinning tools...
590 from DerivationFrameworkInDet.InDetToolsConfig import TrackParticleThinningCfg, EgammaTrackParticleThinningCfg, MuonTrackParticleThinningCfg, TauTrackParticleThinningCfg, DiTauTrackParticleThinningCfg
591 from DerivationFrameworkTools.DerivationFrameworkToolsConfig import GenericObjectThinningCfg
592 from DerivationFrameworkTau.TauCommonConfig import TauThinningCfg
593
594 # Inner detector tracks need to have greater than 10 GeV of pT
595 LLP1TrackParticleThinningTool = acc.getPrimaryAndMerge(TrackParticleThinningCfg(
596 flags,
597 name = "LLP1TrackParticleThinningTool",
598 StreamName = kwargs['StreamName'],
599 SelectionString = "InDetTrackParticles.pt>10*GeV",
600 InDetTrackParticlesKey = "InDetTrackParticles"))
601
602 # Keep all GSF LRT Tracks
603 if flags.Tracking.doLargeD0:
604 LLP1LRTGSFTrackParticleThinningTool = acc.getPrimaryAndMerge(
605 TrackParticleThinningCfg(
606 flags, name = "LLP1LRTGSFTrackParticleThinningTool",
607 StreamName = kwargs['StreamName'],
608 SelectionString = "LRTGSFTrackParticles.pt>0*GeV",
609 InDetTrackParticlesKey = "LRTGSFTrackParticles"))
610
611 # Pixel tracklets need to have greater than 5 GeV of pT
612 if flags.Tracking.doTrackSegmentsDisappearing:
613 LLP1DTTrackParticleThinningTool = acc.getPrimaryAndMerge(
614 TrackParticleThinningCfg(
615 flags, name = "LLP1DTTrackParticleThinningTool",
616 StreamName = kwargs['StreamName'],
617 SelectionString = "InDetDisappearingTrackParticles.pt>5*GeV",
618 InDetTrackParticlesKey = "InDetDisappearingTrackParticles"))
619
620 # Include inner detector tracks associated with electrons
621 LLP1ElectronTPThinningTool = acc.getPrimaryAndMerge(EgammaTrackParticleThinningCfg(
622 flags,
623 name = "LLP1ElectronTPThinningTool",
624 StreamName = kwargs['StreamName'],
625 SGKey = "Electrons",
626 InDetTrackParticlesKey = "InDetTrackParticles"))
627
628 # Include inner detector tracks associated with LRT electrons
629 if flags.Tracking.doLargeD0:
630 LLP1LRTElectronTPThinningTool = acc.getPrimaryAndMerge(
631 EgammaTrackParticleThinningCfg(
632 flags, name = "LLP1LRTElectronTPThinningTool",
633 StreamName = kwargs['StreamName'],
634 SGKey = "LRTElectrons",
635 InDetTrackParticlesKey = "InDetLargeD0TrackParticles",
636 GSFTrackParticlesKey = "LRTGSFTrackParticles"))
637
638 # Include inner detector tracks associated with muons
639 LLP1MuonTPThinningTool = acc.getPrimaryAndMerge(MuonTrackParticleThinningCfg(
640 flags,
641 name = "LLP1MuonTPThinningTool",
642 StreamName = kwargs['StreamName'],
643 MuonKey = "Muons",
644 InDetTrackParticlesKey = "InDetTrackParticles"))
645
646 # Include LRT inner detector tracks associated with LRT muons
647 if flags.Tracking.doLargeD0:
648 LLP1LRTMuonTPThinningTool = acc.getPrimaryAndMerge(
649 MuonTrackParticleThinningCfg(
650 flags, name = "LLP1LRTMuonTPThinningTool",
651 StreamName = kwargs['StreamName'],
652 MuonKey = "MuonsLRT",
653 InDetTrackParticlesKey = "InDetLargeD0TrackParticles"))
654
655 # GSF tracks associated to photons
656 LLP1PhotonTPThinningTool = acc.getPrimaryAndMerge(EgammaTrackParticleThinningCfg(
657 flags,
658 name = "LLP1PhotonTPThinningTool",
659 StreamName = kwargs['StreamName'],
660 SGKey = "Photons",
661 InDetTrackParticlesKey = "",
662 GSFConversionVerticesKey = "GSFConversionVertices",
663 GSFTrackParticlesKey = "GSFTrackParticles",
664 BestMatchOnly = True,
665 BestVtxMatchOnly = True))
666
667 # Tau-related containers: taus, tau tracks and associated ID tracks, neutral PFOs, secondary vertices
668 tau_thinning_expression = f"TauJets.pt >= {flags.Tau.MinPtDAOD}"
669 LLP1TauJetsThinningTool = acc.getPrimaryAndMerge(TauThinningCfg(
670 flags,
671 name = "LLP1TauJetThinningTool",
672 StreamName = kwargs['StreamName'],
673 Taus = "TauJets",
674 TauTracks = "TauTracks",
675 TrackParticles = "InDetTrackParticles",
676 TauNeutralPFOs = "TauNeutralParticleFlowObjects",
677 TauSecondaryVertices = "TauSecondaryVertices",
678 SelectionString = tau_thinning_expression))
679
680 # Only keep tau tracks (and associated ID tracks) classified as charged tracks
681 LLP1TauTPThinningTool = acc.getPrimaryAndMerge(TauTrackParticleThinningCfg(
682 flags,
683 name = "LLP1TauTPThinningTool",
684 StreamName = kwargs['StreamName'],
685 TauKey = "TauJets",
686 InDetTrackParticlesKey = "InDetTrackParticles",
687 DoTauTracksThinning = True,
688 TauTracksKey = "TauTracks"))
689
690 tau_murm_thinning_expression = tau_thinning_expression.replace('TauJets', 'TauJets_MuonRM')
691 LLP1TauJetMuonRMParticleThinningTool = acc.getPrimaryAndMerge(TauThinningCfg(
692 flags,
693 name = "LLP1TauJets_MuonRMThinningTool",
694 StreamName = kwargs['StreamName'],
695 Taus = "TauJets_MuonRM",
696 TauTracks = "TauTracks_MuonRM",
697 TrackParticles = "InDetTrackParticles",
698 TauNeutralPFOs = "TauNeutralParticleFlowObjects_MuonRM",
699 TauSecondaryVertices = "TauSecondaryVertices_MuonRM",
700 SelectionString = tau_murm_thinning_expression))
701
702 # ID tracks associated with high-pt di-tau
703 LLP1DiTauTPThinningTool = acc.getPrimaryAndMerge(DiTauTrackParticleThinningCfg(
704 flags,
705 name = "LLP1DiTauTPThinningTool",
706 StreamName = kwargs['StreamName'],
707 DiTauKey = "DiTauJets",
708 InDetTrackParticlesKey = "InDetTrackParticles"))
709
710
711 LLP1DiTauLowPtThinningTool = acc.getPrimaryAndMerge(GenericObjectThinningCfg(
712 flags,
713 name = "LLP1DiTauLowPtThinningTool",
714 StreamName = kwargs['StreamName'],
715 ContainerName = "DiTauJetsLowPt",
716 SelectionString = "DiTauJetsLowPt.nSubjets > 1"))
717
718 # ID tracks associated with low-pt ditau
719 LLP1DiTauLowPtTPThinningTool = acc.getPrimaryAndMerge(DiTauTrackParticleThinningCfg(
720 flags,
721 name = "LLP1DiTauLowPtTPThinningTool",
722 StreamName = kwargs['StreamName'],
723 DiTauKey = "DiTauJetsLowPt",
724 InDetTrackParticlesKey = "InDetTrackParticles",
725 SelectionString = "DiTauJetsLowPt.nSubjets > 1"))
726
727 if flags.Tracking.doLargeD0:
728 from DerivationFrameworkLLP.LLPToolsConfig import TauLRTThinningCfg
729 tau_lrt_thinning_expression = f"TauJetsLRT.pt >= {flags.Tau.MinPtDAOD}"
730 LLP1TauJetsLRTThinningTool = acc.getPrimaryAndMerge(TauLRTThinningCfg(
731 flags,
732 name = "LLP1TauJetLRTThinningTool",
733 StreamName = kwargs['StreamName'],
734 Taus = "TauJetsLRT",
735 TauTracks = "TauTracksLRT",
736 TrackParticles = "InDetTrackParticles",
737 TrackLargeD0Particles= "InDetLargeD0TrackParticles",
738 TauNeutralPFOs = "TauNeutralParticleFlowObjectsLRT",
739 TauSecondaryVertices = "TauSecondaryVerticesLRT",
740 SelectionString = tau_lrt_thinning_expression))
741
742 # ID Tracks associated with secondary vertices
743 from DerivationFrameworkLLP.LLPToolsConfig import VSITrackParticleThinningCfg
744 LLP1VSITPThinningTool = acc.getPrimaryAndMerge(VSITrackParticleThinningCfg(flags,
745 name = "LLP1VSITPThinningTool",
746 StreamName = kwargs['StreamName'],
747 InDetTrackParticlesKey = "InDetTrackParticles",
748 AugVerStrings = LLP1VrtSecInclusiveSuffixes + LLP1NewVSISuffixes))
749
750 if flags.Tracking.doLargeD0:
751 LLP1LRTVSITPThinningTool = acc.getPrimaryAndMerge(
752 VSITrackParticleThinningCfg(
753 flags, name = "LLP1LRTVSITPThinningTool",
754 StreamName = kwargs['StreamName'],
755 InDetTrackParticlesKey = "InDetLargeD0TrackParticles",
756 AugVerStrings = LLP1VrtSecInclusiveSuffixes + LLP1NewVSISuffixes))
757
758 LLP1GSFVSITPThinningTool = acc.getPrimaryAndMerge(VSITrackParticleThinningCfg(flags,
759 name = "LLP1GSFVSITPThinningTool",
760 StreamName = kwargs['StreamName'],
761 InDetTrackParticlesKey = "GSFTrackParticles",
762 AugVerStrings = [IDAndGSFSuffix]))
763
764 # ID Tracks associated with jets
765 from DerivationFrameworkLLP.LLPToolsConfig import JetTrackParticleThinningCfg, JetLargeD0TrackParticleThinningCfg
766 LLP1JetTPThinningTool = acc.getPrimaryAndMerge(JetTrackParticleThinningCfg(flags,
767 name = "LLP1JetTPThinningTool",
768 StreamName = kwargs['StreamName'],
769 JetKey = "AntiKt4EMTopoJets",
770 SelectionString = "(AntiKt4EMTopoJets.pt > 20.*GeV) && (abs(AntiKt4EMTopoJets.eta) < 2.5)",
771 InDetTrackParticlesKey = "InDetTrackParticles"))
772
773 LLP1FatJetTPThinningTool = acc.getPrimaryAndMerge(JetTrackParticleThinningCfg( flags,
774 name = "LLP1FatJetTPThinningTool",
775 StreamName = kwargs['StreamName'],
776 JetKey = "AntiKt10EMTopoRCJets",
777 SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
778 InDetTrackParticlesKey = "InDetTrackParticles",
779 ))
780
781 # LRT Tracks associated with jets
782 if flags.Tracking.doLargeD0:
783 LLP1LRTJetTPThinningTool = acc.getPrimaryAndMerge(
784 JetLargeD0TrackParticleThinningCfg(
785 flags, name = "LLP1LRTJetTPThinningTool",
786 StreamName = kwargs['StreamName'],
787 JetKey = "AntiKt4EMTopoJets",
788 SelectionString = "(AntiKt4EMTopoJets.pt > 20.*GeV) && (abs(AntiKt4EMTopoJets.eta) < 2.5)",
789 InDetTrackParticlesKey = "InDetLargeD0TrackParticles"))
790
791 LLP1LRTFatJetTPThinningTool = acc.getPrimaryAndMerge(
792 JetLargeD0TrackParticleThinningCfg(
793 flags, name = "LLP1LRTFatJetTPThinningTool",
794 StreamName = kwargs['StreamName'],
795 JetKey = "AntiKt10EMTopoRCJets",
796 SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
797 InDetTrackParticlesKey = "InDetLargeD0TrackParticles"))
798
799 # high dE/dx and low pT tracks
800 from DerivationFrameworkLLP.LLPToolsConfig import PixeldEdxTrackParticleThinningCfg
801 LLP1PixeldEdxTrackParticleThinningTool = acc.getPrimaryAndMerge(PixeldEdxTrackParticleThinningCfg(
802 flags,
803 name = "LLP1PixeldEdxTrackParticleThinningTool",
804 StreamName = kwargs['StreamName'],
805 InDetTrackParticlesKey = "InDetTrackParticles"))
806
807
808 #Thinning CaloCalTopoClusters associated to AntiKt4EMTopoJets
809 from DerivationFrameworkCalo.DerivationFrameworkCaloConfig import JetCaloClusterThinningCfg
810
811 LLP1CCThinningTool = acc.getPrimaryAndMerge(JetCaloClusterThinningCfg(
812 flags,
813 name = "LLP1CCTool",
814 StreamName = kwargs['StreamName'],
815 SGKey = "AntiKt4EMTopoJets",
816 TopoClCollectionSGKey = "CaloCalTopoClusters",
817 AdditionalClustersKey = ["EMOriginTopoClusters","LCOriginTopoClusters"]
818 ))
819
820
821 # Finally the kernel itself
822 thinningTools = [LLP1TrackParticleThinningTool,
823 LLP1ElectronTPThinningTool,
824 LLP1MuonTPThinningTool,
825 LLP1PhotonTPThinningTool,
826 LLP1TauJetsThinningTool,
827 LLP1TauTPThinningTool,
828 LLP1TauJetMuonRMParticleThinningTool,
829 LLP1DiTauTPThinningTool,
830 LLP1DiTauLowPtThinningTool,
831 LLP1DiTauLowPtTPThinningTool,
832 LLP1VSITPThinningTool,
833 LLP1GSFVSITPThinningTool,
834 LLP1JetTPThinningTool,
835 LLP1FatJetTPThinningTool,
836 LLP1PixeldEdxTrackParticleThinningTool,
837 LLP1CCThinningTool]
838
839 if flags.Tracking.doLargeD0:
840 thinningTools += [ LLP1LRTJetTPThinningTool,
841 LLP1LRTFatJetTPThinningTool,
842 LLP1LRTGSFTrackParticleThinningTool,
843 LLP1LRTElectronTPThinningTool,
844 LLP1LRTMuonTPThinningTool,
845 LLP1TauJetsLRTThinningTool,
846 LLP1LRTVSITPThinningTool ]
847
848 if flags.Tracking.doTrackSegmentsDisappearing:
849 thinningTools += [ LLP1DTTrackParticleThinningTool ]
850
851
852 # Additionnal augmentations
853
854 # Compute RC substructure variables from energy clusters
855 from DerivationFrameworkLLP.LLPToolsConfig import RCJetSubstructureAugCfg
856 LLP1RCJetSubstructureClustTrimAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg(flags,
857 name = "LLP1RCJetSubstructureClustTrimAugTool",
858 StreamName = kwargs['StreamName'],
859 JetContainerKey = "AntiKt10EMTopoRCJets",
860 SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
861 GhostConstitNames = ["GhostLCTopoOrigin"],
862 Suffix = "clusterTrim",
863 Grooming = "Trimming",
864 RClusTrim = 0.2,
865 PtFracTrim = 0.05
866 ))
867 RCSubstructureClusterTrimAug = CompFactory.DerivationFramework.CommonAugmentation("RCSubstructureClusterTrimAug", AugmentationTools = [LLP1RCJetSubstructureClustTrimAugTool])
868 acc.addEventAlgo(RCSubstructureClusterTrimAug)
869
870 LLP1RCJetSubstructureClustSDAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg(flags,
871 name = "LLP1RCJetSubstructureClustSDAugTool",
872 StreamName = kwargs['StreamName'],
873 JetContainerKey = "AntiKt10EMTopoRCJets",
874 SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
875 GhostConstitNames = ["GhostLCTopoOrigin"],
876 Suffix = "clusterSoftDrop",
877 Grooming = "SoftDrop",
878 BetaSoft = 1.0,
879 ZcutSoft = 0.1
880 ))
881 RCSubstructureClusterSDAug = CompFactory.DerivationFramework.CommonAugmentation("RCSubstructureClusterSDAug", AugmentationTools = [LLP1RCJetSubstructureClustSDAugTool])
882 acc.addEventAlgo(RCSubstructureClusterSDAug)
883
884 # Compute RC substructure variables from tracks
885 ghostConstitNames = ["GhostTrack"]
886 if flags.Tracking.doLargeD0:
887 ghostConstitNames += ["GhostTrackLRT"]
888
889 from DerivationFrameworkLLP.LLPToolsConfig import RCJetSubstructureAugCfg
890 LLP1RCJetSubstructureTrackTrimAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg( flags,
891 name = "LLP1RCJetSubstructureTrackTrimAugTool",
892 StreamName = kwargs['StreamName'],
893 JetContainerKey = "AntiKt10EMTopoRCJets",
894 SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
895 GhostConstitNames = ghostConstitNames,
896 Suffix = "trackTrim",
897 Grooming = "Trimming",
898 RClusTrim = 0.2,
899 PtFracTrim = 0.05
900 ))
901 RCSubstructureTrackTrimAug = CompFactory.DerivationFramework.CommonAugmentation("RCSubstructureTrackTrimAug", AugmentationTools = [LLP1RCJetSubstructureTrackTrimAugTool])
902 acc.addEventAlgo(RCSubstructureTrackTrimAug)
903
904 from DerivationFrameworkLLP.LLPToolsConfig import RCJetSubstructureAugCfg
905 LLP1RCJetSubstructureTrackSDAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg( flags,
906 name = "LLP1RCJetSubstructureTrackSDAugTool",
907 StreamName = kwargs['StreamName'],
908 JetContainerKey = "AntiKt10EMTopoRCJets",
909 SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
910 GhostConstitNames = ghostConstitNames,
911 Suffix = "trackSoftDrop",
912 Grooming = "SoftDrop",
913 BetaSoft = 1.0,
914 ZcutSoft = 0.1
915 ))
916 RCSubstructureTrackSDAug = CompFactory.DerivationFramework.CommonAugmentation("RCSubstructureTrackSDAug", AugmentationTools = [LLP1RCJetSubstructureTrackSDAugTool])
917 acc.addEventAlgo(RCSubstructureTrackSDAug)
918
919
920
921 # Skimming
922 skimmingTools = []
923
924 if flags.Trigger.EDMVersion >= 0:
925 from DerivationFrameworkLLP.LLPToolsConfig import LLP1TriggerSkimmingToolCfg
926 LLP1TriggerSkimmingTool = acc.getPrimaryAndMerge(LLP1TriggerSkimmingToolCfg(
927 flags, name = "LLP1TriggerSkimmingTool",
928 TriggerListsHelper = kwargs['TriggerListsHelper']))
929
930 skimmingTools.append(LLP1TriggerSkimmingTool)
931
932 DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
933 acc.addEventAlgo(DerivationKernel(name,
934 SkimmingTools = skimmingTools,
935 ThinningTools = thinningTools,
936 AugmentationTools = augmentationTools))
937
938 return acc
939
940
941
942
943
944

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.