15 """Configure the derivation framework driving algorithm (kernel) for SUSY20"""
22 augmentationTools = []
26 from DerivationFrameworkBPhys.V0ToolConfig
import BPHY_Reco_V0FinderCfg
as Reco_V0Finder
27 SUSY20_RecoV0_Finder = acc.popToolsAndMerge(Reco_V0Finder(
29 derivation =
"SUSY20",
31 V0ContainerName =
"SUSY20RecoV0Candidates",
32 KshortContainerName =
"SUSY20RecoKshortCandidates",
33 LambdaContainerName =
"SUSY20RecoLambdaCandidates",
34 LambdabarContainerName =
"SUSY20RecoLambdabarCandidates",
35 CheckVertexContainers = [
"PrimaryVertices"]
37 acc.addPublicTool(SUSY20_RecoV0_Finder)
38 augmentationTools.append(SUSY20_RecoV0_Finder)
41 from VrtSecInclusive.VrtSecInclusiveConfig
import VrtSecInclusiveCfg
44 name =
"SUSY20_VrtSecInclusiveTool",
50 SelTrkMaxCutoff = 2000,
51 a0TrkPVDstMinCut = 0.0,
56 DoTruth = flags.Input.isMC,
57 doAugmentDVimpactParametersToMuons =
True,
58 doAugmentDVimpactParametersToElectrons =
True
62 from xAODPrimitives.xAODIso
import xAODIso
as isoPar
63 deco_ptcones = [isoPar.ptcone40, isoPar.ptcone30, isoPar.ptcone20, isoPar.topoetcone40, isoPar.topoetcone30, isoPar.topoetcone20]
64 deco_ptcones_suffix = [
"ptcone40",
"ptcone30",
"ptcone20",
"topoetcone40",
"topoetcone30",
"topoetcone20"]
65 deco_prefix =
'SUSY20_'
67 from IsolationAlgs.IsoToolsConfig
import TrackIsolationToolCfg
70 name =
"SUSY20TrackIsoTool",
72 SUSY20TrackIsoTool.TrackSelectionTool.maxZ0SinTheta = 1.5
73 SUSY20TrackIsoTool.TrackSelectionTool.maxD0 = 1.5
74 SUSY20TrackIsoTool.TrackSelectionTool.minPt = 1000
75 SUSY20TrackIsoTool.TrackSelectionTool.CutLevel =
"TightPrimary"
76 acc.addPublicTool(SUSY20TrackIsoTool)
78 from IsolationAlgs.IsoToolsConfig
import CaloIsolationToolCfg
79 from CaloIdentifier
import SUBCALO
82 name =
"SUSY20CaloIsoTool",
83 EMCaloNums = [SUBCALO.LAREM],
84 HadCaloNums = [SUBCALO.LARHEC, SUBCALO.TILE],
86 UseCaloExtensionCaching =
False,
87 saveOnlyRequestedCorrections =
True
89 acc.addPublicTool(SUSY20CaloIsoTool)
91 from DerivationFrameworkInDet.InDetToolsConfig
import IsolationTrackDecoratorCfg
94 name =
"SUSY20IDTrackDecoratorTool",
95 TrackIsolationTool = SUSY20TrackIsoTool,
96 CaloIsolationTool = SUSY20CaloIsoTool,
97 TargetContainer =
"InDetTrackParticles",
98 SelectionString =
"InDetTrackParticles.pt > 0.5*GeV",
100 isoSuffix = deco_ptcones_suffix,
101 Prefix = deco_prefix,
103 acc.addPublicTool(SUSY20IDTrackDecoratorTool)
104 augmentationTools.append(SUSY20IDTrackDecoratorTool)
107 '''# Electron TrackParticles isolation
108 SUSY20ElectronDecorator = acc.getPrimaryAndMerge(IsolationTrackDecoratorCfg(
110 name = "SUSY20ElectronDecoratorTool",
111 TrackIsolationTool = SUSY20TrackIsoTool,
112 CaloIsolationTool = SUSY20CaloIsoTool,
113 TargetContainer = "Electrons",
114 iso = [isoPar.topoetcone40, isoPar.topoetcone30, isoPar.topoetcone20],
115 isoSuffix = ["topoetcone40", "topoetcone30", "topoetcone20"],
116 Prefix = deco_prefix,
118 acc.addPublicTool(SUSY20ElectronDecorator)
119 augmentationTools.append(SUSY20ElectronDecorator)
121 # Muon TrackParticles isolation
122 SUSY20MuonDecorator = acc.getPrimaryAndMerge(IsolationTrackDecoratorCfg(
124 name = "SUSY20MuonDecoratorTool",
125 TrackIsolationTool = SUSY20TrackIsoTool,
126 CaloIsolationTool = SUSY20CaloIsoTool,
127 TargetContainer = "Muons",
128 iso = [isoPar.topoetcone40, isoPar.topoetcone30, isoPar.topoetcone20],
129 isoSuffix = ["topoetcone40", "topoetcone30", "topoetcone20"],
130 Prefix = deco_prefix,
132 acc.addPublicTool(SUSY20MuonDecorator)
133 augmentationTools.append(SUSY20MuonDecorator)
135 # Photon TrackParticles isolation
136 SUSY20PhotonDecorator = acc.getPrimaryAndMerge(IsolationTrackDecoratorCfg(
138 name = "SUSY20PhotonDecoratorTool",
139 TrackIsolationTool = SUSY20TrackIsoTool,
140 CaloIsolationTool = SUSY20CaloIsoTool,
141 TargetContainer = "Photons",
142 iso = [isoPar.topoetcone40, isoPar.topoetcone30, isoPar.topoetcone20],
143 isoSuffix = ["topoetcone40", "topoetcone30", "topoetcone20"],
144 Prefix = deco_prefix,
146 acc.addPublicTool(SUSY20PhotonDecorator)
147 augmentationTools.append(SUSY20PhotonDecorator)'''
150 from DerivationFrameworkPhys.PhysCommonConfig
import PhysCommonAugmentationsCfg
155 from DerivationFrameworkSUSY.SUSYToolsConfig
import SUSY20EventCleaningToolCfg
159 from IsolationSelection.IsolationSelectionConfig
import IsoCloseByAlgsCfg
160 contNames = [
"Muons",
"Electrons",
"Photons"]
164 containerNames = contNames,
166 stream_name = kwargs[
'StreamName']
170 from DerivationFrameworkFlavourTag.FtagDerivationConfig
import FtagJetCollectionsCfg
174 from DerivationFrameworkInDet.InDetToolsConfig
import InDetTrackSelectionToolWrapperCfg
177 name =
"SUSY20TrackSelection",
178 ContainerName =
"InDetTrackParticles",
179 DecorationName =
"DFLoose"
181 SUSY20TrackSelection.TrackSelectionTool.CutLevel =
"Loose"
182 acc.addPublicTool(SUSY20TrackSelection)
183 augmentationTools.append(SUSY20TrackSelection)
189 thinningExpression =
"InDetTrackParticles.DFLoose && (InDetTrackParticles.pt > 0.5*GeV) && (abs( DFCommonInDetTrackZ0AtPV*sin(InDetTrackParticles.theta) ) < 3.0*mm)"
192 from DerivationFrameworkInDet.InDetToolsConfig
import TrackParticleThinningCfg
195 name =
"SUSY20TrackParticleThinningTool",
196 StreamName = kwargs[
'StreamName'],
197 SelectionString = thinningExpression,
198 InDetTrackParticlesKey =
"InDetTrackParticles"
200 acc.addPublicTool(SUSY20TrackParticleThinningTool)
201 thinningTools.append(SUSY20TrackParticleThinningTool)
204 from DerivationFrameworkInDet.InDetToolsConfig
import MuonTrackParticleThinningCfg
207 name =
"SUSY20MuonTPThinningTool",
208 StreamName = kwargs[
'StreamName'],
210 InDetTrackParticlesKey =
"InDetTrackParticles"
212 acc.addPublicTool(SUSY20MuonTPThinningTool)
213 thinningTools.append(SUSY20MuonTPThinningTool)
216 from DerivationFrameworkInDet.InDetToolsConfig
import EgammaTrackParticleThinningCfg
219 name =
"SUSY20ElectronTPThinningTool",
220 StreamName = kwargs[
'StreamName'],
222 InDetTrackParticlesKey =
"InDetTrackParticles"
224 acc.addPublicTool(SUSY20ElectronTPThinningTool)
225 thinningTools.append(SUSY20ElectronTPThinningTool)
228 from DerivationFrameworkTools.DerivationFrameworkToolsConfig
import GenericObjectThinningCfg
231 name =
"SUSY20PhotonThinningTool",
232 StreamName = kwargs[
'StreamName'],
233 ContainerName =
"Photons",
234 SelectionString =
"Photons.pt > 10*GeV"
236 acc.addPublicTool(SUSY20PhotonThinningTool)
237 thinningTools.append(SUSY20PhotonThinningTool)
242 name =
"SUSY20PhotonTPThinningTool",
243 StreamName = kwargs[
'StreamName'],
245 InDetTrackParticlesKey =
"InDetTrackParticles",
246 GSFConversionVerticesKey =
"GSFConversionVertices"
248 acc.addPublicTool(SUSY20PhotonTPThinningTool)
249 thinningTools.append(SUSY20PhotonTPThinningTool)
253 from DerivationFrameworkMCTruth.TruthDerivationToolsConfig
import MenuTruthThinningCfg
256 name =
"SUSY20TruthThinningTool",
257 WritePartons =
False,
259 WriteBHadrons =
True,
261 GeantPhotonPtThresh = 20000,
263 PartonPtThresh = -1.0,
266 WriteBosonProducts =
False,
267 WriteBSMProducts =
True,
268 WriteTopAndDecays =
True,
269 WriteEverything =
False,
270 WriteAllLeptons =
True,
271 WriteLeptonsNotFromHadrons =
False,
272 WriteNotPhysical =
False,
274 PreserveAncestors =
True,
275 PreserveGeneratorDescendants =
True
277 acc.addPublicTool(SUSY20TruthThinningTool)
278 thinningTools.append(SUSY20TruthThinningTool)
286 from DerivationFrameworkSUSY.SUSYToolsConfig
import SUSY20DTTriggerSkimmingToolCfg
289 name =
"SUSY20TriggerSkimmingTool"
291 acc.addPublicTool(SUSY20TriggerSkimmingTool_DT)
294 jetRequirements_DT =
"AntiKt4EMPFlowJets.pt > 200*GeV && abs(AntiKt4EMPFlowJets.eta) < 2.8"
295 jetSelection_DT =
"(count(" + jetRequirements_DT +
") >= 1)"
297 from DerivationFrameworkTools.DerivationFrameworkToolsConfig
import xAODStringSkimmingToolCfg
300 name =
"SUSY20JetSkimmingTool_DT",
301 expression = jetSelection_DT
303 acc.addPublicTool(SUSY20JetSkimmingTool_DT)
306 from DerivationFrameworkTools.DerivationFrameworkToolsConfig
import FilterCombinationANDCfg
309 name =
"SUSY20SkimmingTool_DT",
310 FilterList = [SUSY20JetSkimmingTool_DT, SUSY20TriggerSkimmingTool_DT]
312 acc.addPublicTool(SUSY20xAODSkimmingTool_DT)
313 skimmingTools.append(SUSY20xAODSkimmingTool_DT)
318 DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
321 SkimmingTools = skimmingTools,
322 ThinningTools = thinningTools,
323 AugmentationTools = augmentationTools,
324 RunSkimmingFirst =
True