ATLAS Offline Software
Loading...
Searching...
No Matches
BPHY15.py
Go to the documentation of this file.
1# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3#====================================================================
4# BPHY15.py
5#====================================================================
6
7from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
8from AthenaConfiguration.ComponentFactory import CompFactory
9from AthenaConfiguration.Enums import MetadataCategory
10
11
12BPHYDerivationName = "BPHY15"
13streamName = "StreamDAOD_BPHY15"
14
15def BPHY15Cfg(flags):
16 from AthenaServices.PartPropSvcConfig import PartPropSvcCfg
17 from DerivationFrameworkBPhys.commonBPHYMethodsCfg import (
18 BPHY_V0ToolCfg, BPHY_InDetDetailedTrackSelectorToolCfg,
19 BPHY_VertexPointEstimatorCfg, BPHY_TrkVKalVrtFitterCfg,
20 AugOriginalCountsCfg)
21 from JpsiUpsilonTools.JpsiUpsilonToolsConfig import PrimaryVertexRefittingToolCfg
22 acc = ComponentAccumulator()
23 acc.getPrimaryAndMerge(PartPropSvcCfg(flags))
24 V0Tools = acc.popToolsAndMerge(BPHY_V0ToolCfg(flags, BPHYDerivationName))
25 vkalvrt = acc.popToolsAndMerge(BPHY_TrkVKalVrtFitterCfg(flags, BPHYDerivationName)) # VKalVrt vertex fitter
26 acc.addPublicTool(vkalvrt)
27 acc.addPublicTool(V0Tools)
28 trackselect = acc.popToolsAndMerge(BPHY_InDetDetailedTrackSelectorToolCfg(flags, BPHYDerivationName))
29 acc.addPublicTool(trackselect)
30 vpest = acc.popToolsAndMerge(BPHY_VertexPointEstimatorCfg(flags, BPHYDerivationName))
31 acc.addPublicTool(vpest)
32 PVrefit = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags))
33 acc.addPublicTool(PVrefit)
34 isSimulation = flags.Input.isMC
35
36 BPHY15JpsiFinder = CompFactory.Analysis.JpsiFinder(
37 name = "BPHY15JpsiFinder",
38 muAndMu = True,
39 muAndTrack = False,
40 TrackAndTrack = False,
41 assumeDiMuons = True,
42 muonThresholdPt = 2700,
43 invMassUpper = 3400.0,
44 invMassLower = 2800.0,
45 Chi2Cut = 10.,
46 oppChargesOnly = True,
47 allMuons = True,
48 combOnly = False,
49 atLeastOneComb = False,
50 useCombinedMeasurement = False, # Only takes effect if combOnly=True
51 muonCollectionKey = "Muons",
52 TrackParticleCollection = "InDetTrackParticles",
53 V0VertexFitterTool = None, # V0 vertex fitter
54 useV0Fitter = False,
55 TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter
56 TrackSelectorTool = trackselect,
57 VertexPointEstimator = vpest,
58 useMCPCuts = False)
59 acc.addPublicTool(BPHY15JpsiFinder)
60 BPHY15JpsiSelectAndWrite = CompFactory.DerivationFramework.Reco_Vertex(
61 name = "BPHY15JpsiSelectAndWrite",
62 VertexSearchTool = BPHY15JpsiFinder,
63 OutputVtxContainerName = "BPHY15JpsiCandidates",
64 V0Tools = V0Tools,
65 PVRefitter = PVrefit,
66 PVContainerName = "PrimaryVertices",
67 RefPVContainerName = "SHOULDNOTBEUSED",
68 DoVertexType = 1)
69
70 BPHY15_Select_Jpsi2mumu = CompFactory.DerivationFramework.Select_onia2mumu(
71 name = "BPHY15_Select_Jpsi2mumu",
72 HypothesisName = "Jpsi",
73 InputVtxContainerName = "BPHY15JpsiCandidates",
74 V0Tools = V0Tools,
75 VtxMassHypo = 3096.900,
76 MassMin = 2600.0,
77 MassMax = 3600.0,
78 Chi2Max = 200,
79 LxyMin = 0.1,
80 DoVertexType = 1)
81
82 BPHY15BcJpsipi = CompFactory.Analysis.JpsiPlus1Track(
83 name = "BPHY15BcJpsipi",
84 pionHypothesis = True,
85 kaonHypothesis = False,
86 trkThresholdPt = 2700,
87 trkMaxEta = 2.7,
88 BThresholdPt = 100.0,
89 BMassUpper = 6900.0,
90 BMassLower = 5600.0,
91 JpsiContainerKey = "BPHY15JpsiCandidates",
92 TrackParticleCollection = "InDetTrackParticles",
93 MuonsUsedInJpsi = "Muons",
94 TrkVertexFitterTool = vkalvrt,
95 TrackSelectorTool = trackselect,
96 UseMassConstraint = True,
97 Chi2Cut = 5,
98 TrkTrippletMassUpper = 6900,
99 TrkTrippletMassLower = 5600)
100 acc.addPublicTool(BPHY15BcJpsipi)
101 BPHY15BcJpsipiSelectAndWrite = CompFactory.DerivationFramework.Reco_Vertex(
102 name = "BPHY15BcJpsipiSelectAndWrite",
103 VertexSearchTool = BPHY15BcJpsipi,
104 V0Tools = V0Tools,
105 PVRefitter = PVrefit,
106 OutputVtxContainerName = "BPHY15BcJpsipiCandidates",
107 PVContainerName = "PrimaryVertices",
108 RefPVContainerName = "BPHY15RefittedPrimaryVertices1",
109 RefitPV = True,
110 MaxPVrefit = 1000)
111 BPHY15_Select_Bc2Jpsipi = CompFactory.DerivationFramework.Select_onia2mumu(
112 name = "BPHY15_Select_Bc2Jpsipi",
113 HypothesisName = "Bc",
114 InputVtxContainerName = "BPHY15BcJpsipiCandidates",
115 V0Tools = V0Tools,
116 TrkMasses = [105.658, 105.658, 139.571],
117 VtxMassHypo = 6274.9,
118 MassMin = 5600.0,
119 MassMax = 6900.0,
120 Chi2Max = 200)
121 BPHY15JpsipiFinder = CompFactory.Analysis.JpsiPlus1Track(
122 name = "BPHY15JpsipiFinder",
123 pionHypothesis = True,
124 kaonHypothesis = False,
125 trkThresholdPt = 350.0,
126 trkMaxEta = 2.7,
127 BThresholdPt = 5000.0,
128 BMassUpper = 3600.0,
129 BMassLower = 3200.0,
130 TrkDeltaZ = 20.,
131 TrkQuadrupletPt = 5000,
132 JpsiContainerKey = "BPHY15JpsiCandidates",
133 TrackParticleCollection = "InDetTrackParticles",
134 MuonsUsedInJpsi = "Muons",
135 TrkVertexFitterTool = vkalvrt,
136 TrackSelectorTool = trackselect,
137 UseMassConstraint = True,
138 Chi2Cut = 5,
139 TrkTrippletMassUpper = 3600,
140 TrkTrippletMassLower = 3200)
141 acc.addPublicTool(BPHY15JpsipiFinder)
142
143 BPHY15JpsipiSelectAndWrite = CompFactory.DerivationFramework.Reco_Vertex(
144 name = "BPHY15JpsipiSelectAndWrite",
145 VertexSearchTool = BPHY15JpsipiFinder,
146 PVRefitter = PVrefit,
147 V0Tools = V0Tools,
148 OutputVtxContainerName = "BPHY15JpsipiCandidates",
149 PVContainerName = "PrimaryVertices",
150 RefPVContainerName = "SHOULDNOTBEUSED",
151 MaxPVrefit = 1000)
152
153 BPHY15_Select_Jpsipi = CompFactory.DerivationFramework.Select_onia2mumu(
154 name = "BPHY15_Select_Jpsipi",
155 HypothesisName = "Jpsipi",
156 V0Tools = V0Tools,
157 TrkMasses = [105.658, 105.658, 139.571],
158 InputVtxContainerName = "BPHY15JpsipiCandidates",
159 VtxMassHypo = 3396.900,
160 MassMin = 3200.0,
161 MassMax = 3600.0,
162 Chi2Max = 200,
163 LxyMin = 0.1,
164 DoVertexType = 1)
165
166 BPHY15DiTrkFinder = CompFactory.Analysis.JpsiFinder(
167 name = "BPHY15DiTrkFinder",
168 muAndMu = False,
169 muAndTrack = False,
170 TrackAndTrack = True,
171 assumeDiMuons = False, # If true, will assume dimu hypothesis and use PDG value for mu mass
172 trackThresholdPt = 900,
173 invMassUpper = 1900.0,
174 invMassLower = 280.0,
175 Chi2Cut = 10.,
176 oppChargesOnly = True,
177 atLeastOneComb = False,
178 useCombinedMeasurement = False, # Only takes effect if combOnly=True
179 muonCollectionKey = "Muons",
180 TrackParticleCollection = "InDetTrackParticles",
181 V0VertexFitterTool = None,
182 useV0Fitter = False,
183 TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter
184 TrackSelectorTool = trackselect,
185 VertexPointEstimator = vpest,
186 useMCPCuts = False,
187 track1Mass = 139.571, # Not very important, only used to calculate inv. mass cut, leave it loose here
188 track2Mass = 139.571)
189 acc.addPublicTool(BPHY15DiTrkFinder)
190 BPHY15DiTrkSelectAndWrite = CompFactory.DerivationFramework.Reco_Vertex(
191 name = "BPHY15DiTrkSelectAndWrite",
192 VertexSearchTool = BPHY15DiTrkFinder,
193 OutputVtxContainerName = "BPHY15DiTrkCandidates",
194 PVContainerName = "PrimaryVertices",
195 V0Tools = V0Tools,
196 PVRefitter = PVrefit,
197 RefPVContainerName = "SHOULDNOTBEUSED",
198 CheckCollections = True,
199 CheckVertexContainers = ['BPHY15JpsiCandidates'],
200 DoVertexType = 1)
201
202 BPHY15_Select_D0 = CompFactory.DerivationFramework.Select_onia2mumu(
203 name = "BPHY15_Select_D0",
204 HypothesisName = "D0",
205 InputVtxContainerName = "BPHY15DiTrkCandidates",
206 V0Tools = V0Tools,
207 TrkMasses = [139.571, 493.677],
208 VtxMassHypo = 1864.83,
209 MassMin = 1864.83-170,
210 MassMax = 1864.83+170,
211 LxyMin = 0.15,
212 Chi2Max = 200)
213
214 BPHY15_Select_D0b = CompFactory.DerivationFramework.Select_onia2mumu(
215 name = "BPHY15_Select_D0b",
216 HypothesisName = "D0b",
217 InputVtxContainerName = "BPHY15DiTrkCandidates",
218 V0Tools = V0Tools,
219 TrkMasses = [493.677, 139.571],
220 VtxMassHypo = 1864.83,
221 MassMin = 1864.83-170,
222 MassMax = 1864.83+170,
223 LxyMin = 0.15,
224 Chi2Max = 200)
225
226 BPHY15Dh3Finder = CompFactory.Analysis.JpsiPlus1Track(
227 name = "BPHY15Dh3Finder",
228 pionHypothesis = True,
229 kaonHypothesis = False,
230 trkThresholdPt = 900.0,
231 trkMaxEta = 2.7, # is this value fine?? default would be 102.5
232 BThresholdPt = 2000.0,
233 BMassUpper = 1800.0, # What is this??
234 BMassLower = 500.0,
235 TrkDeltaZ = 20.,
236 TrkTrippletMassUpper = 1800,
237 TrkTrippletMassLower = 500,
238 TrkQuadrupletPt = 2000,
239 JpsiContainerKey = "BPHY15DiTrkCandidates",
240 TrackParticleCollection = "InDetTrackParticles",
241 MuonsUsedInJpsi = "NONE", # ?
242 ExcludeCrossJpsiTracks = False,
243 TrkVertexFitterTool = vkalvrt,
244 TrackSelectorTool = trackselect,
245 UseMassConstraint = False,
246 Chi2Cut = 5) #Cut on chi2/Ndeg_of_freedom
247 acc.addPublicTool(BPHY15Dh3Finder)
248 BPHY15Dh3SelectAndWrite = CompFactory.DerivationFramework.Reco_Vertex(
249 name = "BPHY15Dh3SelectAndWrite",
250 VertexSearchTool = BPHY15Dh3Finder,
251 V0Tools = V0Tools,
252 PVRefitter = PVrefit,
253 OutputVtxContainerName = "BPHY15Dh3Candidates",
254 PVContainerName = "PrimaryVertices",
255 RefPVContainerName = "SHOULDNOTBEUSED",
256 MaxPVrefit = 1000)
257
258 BPHY15_Select_Ds = CompFactory.DerivationFramework.Select_onia2mumu(
259 name = "BPHY15_Select_Ds",
260 HypothesisName = "Ds",
261 V0Tools = V0Tools,
262 TrkMasses = [493.677, 493.677, 139.571],
263 InputVtxContainerName = "BPHY15Dh3Candidates",
264 VtxMassHypo = 1968.28,
265 MassMin = 1968.28-200,
266 MassMax = 1968.28+200,
267 Chi2Max = 200,
268 LxyMin = 0.1,
269 DoVertexType = 1)
270
271 BPHY15_Select_Dp = CompFactory.DerivationFramework.Select_onia2mumu(
272 name = "BPHY15_Select_Dp",
273 HypothesisName = "Dp",
274 V0Tools = V0Tools,
275 TrkMasses = [139.571, 493.677, 139.571],
276 InputVtxContainerName = "BPHY15Dh3Candidates",
277 VtxMassHypo = 1869.59,
278 MassMin = 1869.59-200,
279 MassMax = 1869.59+200,
280 Chi2Max = 200,
281 LxyMin = 0.1,
282 DoVertexType = 1)
283
284 BPHY15_Select_Dm = CompFactory.DerivationFramework.Select_onia2mumu(
285 name = "BPHY15_Select_Dm",
286 HypothesisName = "Dm",
287 V0Tools = V0Tools,
288 TrkMasses = [493.677, 139.571, 139.571],
289 InputVtxContainerName = "BPHY15Dh3Candidates",
290 VtxMassHypo = 1869.59,
291 MassMin = 1869.59-200,
292 MassMax = 1869.59+200,
293 Chi2Max = 200,
294 LxyMin = 0.1,
295 DoVertexType = 1)
296
297 BcJpsiDxVertexFit = acc.popToolsAndMerge(BPHY_TrkVKalVrtFitterCfg(flags, BPHYDerivationName + "BcJpsiDx", CascadeCnstPrecision = 1e-6))
298 acc.addPublicTool(BcJpsiDxVertexFit)
299 BPHY15JpsiDs = CompFactory.DerivationFramework.JpsiPlusDsCascade(
300 name = "BPHY15JpsiDs",
301 HypothesisName = "Bc",
302 V0Tools = V0Tools,
303 TrkVertexFitterTool = BcJpsiDxVertexFit,
304 PVRefitter = PVrefit,
305 DxHypothesis = 431,
306 ApplyDxMassConstraint = True,
307 ApplyJpsiMassConstraint = True,
308 JpsiMassLowerCut = 2600.,
309 JpsiMassUpperCut = 3600.,
310 DxMassLowerCut = 1968.28 - 200.,
311 DxMassUpperCut = 1968.28 + 200.,
312 MassLowerCut = 6274.90 - 600.,
313 MassUpperCut = 6274.90 + 600.,
314 Chi2Cut = 10,
315 RefitPV = True,
316 RefPVContainerName = "BPHY15RefittedPrimaryVertices2",
317 JpsiVertices = "BPHY15JpsiCandidates",
318 CascadeVertexCollections = ["BcJpsiDsCascadeSV2", "BcJpsiDsCascadeSV1"],
319 DxVertices = "BPHY15Dh3Candidates")
320
321 BPHY15JpsiDp = CompFactory.DerivationFramework.JpsiPlusDsCascade(
322 name = "BPHY15JpsiDp",
323 HypothesisName = "Bc",
324 V0Tools = V0Tools,
325 TrkVertexFitterTool = BcJpsiDxVertexFit,
326 PVRefitter = PVrefit,
327 DxHypothesis = 411,
328 ApplyDxMassConstraint = True,
329 ApplyJpsiMassConstraint = True,
330 JpsiMassLowerCut = 2600.,
331 JpsiMassUpperCut = 3600.,
332 DxMassLowerCut = 1869.59 - 180.,
333 DxMassUpperCut = 1869.59 + 180.,
334 MassLowerCut = 6274.90 - 600.,
335 MassUpperCut = 6274.90 + 600.,
336 Chi2Cut = 10,
337 RefitPV = True,
338 RefPVContainerName = "BPHY15RefittedPrimaryVertices3",
339 JpsiVertices = "BPHY15JpsiCandidates",
340 CascadeVertexCollections = ["BcJpsiDpCascadeSV2", "BcJpsiDpCascadeSV1"],
341 DxVertices = "BPHY15Dh3Candidates")
342
343 BcJpsiDstVertexFit = acc.popToolsAndMerge(BPHY_TrkVKalVrtFitterCfg(flags, BPHYDerivationName + "BcJpsiDst", CascadeCnstPrecision = 1e-6))
344 acc.addPublicTool(BcJpsiDstVertexFit)
345
346 BPHY15JpsiDpst = CompFactory.DerivationFramework.JpsiPlusDpstCascade(
347 name = "BPHY15JpsiDpst",
348 HypothesisName = "Bc",
349 V0Tools = V0Tools,
350 TrkVertexFitterTool = BcJpsiDstVertexFit,
351 PVRefitter = PVrefit,
352 DxHypothesis = 421,
353 ApplyD0MassConstraint = True,
354 ApplyJpsiMassConstraint = True,
355 JpsiMassLowerCut = 2600.,
356 JpsiMassUpperCut = 3600.,
357 JpsipiMassLowerCut = 2600.,
358 JpsipiMassUpperCut = 6800.,
359 D0MassLowerCut = 1864.83 - 200.,
360 D0MassUpperCut = 1864.83 + 200.,
361 DstMassLowerCut = 2010.26 - 300.,
362 DstMassUpperCut = 2010.26 + 300.,
363 MassLowerCut = 5400,
364 MassUpperCut = 6274.90 + 600.,
365 Chi2Cut = 10,
366 RefitPV = True,
367 RefPVContainerName = "BPHY15RefittedPrimaryVertices4",
368 JpsipiVertices = "BPHY15JpsipiCandidates",
369 CascadeVertexCollections = ["BcJpsiDpstCascadeSV2", "BcJpsiDpstCascadeSV1"],
370 D0Vertices = "BPHY15DiTrkCandidates")
371
372 from TrkConfig.TrkV0FitterConfig import TrkV0VertexFitter_InDetExtrCfg
373 v0Vertexfit = acc.popToolsAndMerge(TrkV0VertexFitter_InDetExtrCfg(flags))
374 acc.addPublicTool(v0Vertexfit)
375 BPHY15K0Finder = CompFactory.Analysis.JpsiFinder(
376 name = "BPHY15K0Finder",
377 muAndMu = False,
378 muAndTrack = False,
379 TrackAndTrack = True,
380 assumeDiMuons = False, # If true, will assume dimu hypothesis and use PDG value for mu mass
381 trackThresholdPt = 400,
382 invMassUpper = 600.0,
383 invMassLower = 400.0,
384 Chi2Cut = 20,
385 oppChargesOnly = True,
386 atLeastOneComb = False,
387 useCombinedMeasurement = False, # Only takes effect if combOnly=True
388 muonCollectionKey = "Muons",
389 TrackParticleCollection = "InDetTrackParticles",
390 V0VertexFitterTool = v0Vertexfit, # V0 vertex fitter
391 useV0Fitter = True, # if False a TrkVertexFitterTool will be used
392 TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter
393 TrackSelectorTool = trackselect,
394 VertexPointEstimator = vpest,
395 useMCPCuts = False,
396 track1Mass = 139.571, # Not very important, only used to calculate inv. mass cut, leave it loose here
397 track2Mass = 139.571)
398 acc.addPublicTool(BPHY15K0Finder)
399 BPHY15K0SelectAndWrite = CompFactory.DerivationFramework.Reco_Vertex(
400 name = "BPHY15K0SelectAndWrite",
401 VertexSearchTool = BPHY15K0Finder,
402 OutputVtxContainerName = "BPHY15K0Candidates",
403 PVContainerName = "PrimaryVertices",
404 RefPVContainerName = "SHOULDNOTBEUSED",
405 V0Tools = V0Tools,
406 PVRefitter = PVrefit,
407 CheckCollections = True,
408 CheckVertexContainers = ['BPHY15JpsipiCandidates','BPHY15DiTrkCandidates','BcJpsiDpstCascadeSV1'],
409 DoVertexType = 1)
410
411 BPHY15_Select_K0 = CompFactory.DerivationFramework.Select_onia2mumu(
412 name = "BPHY15_Select_K0",
413 HypothesisName = "K0",
414 InputVtxContainerName = "BPHY15K0Candidates",
415 V0Tools = V0Tools,
416 TrkMasses = [139.571, 139.571],
417 VtxMassHypo = 497.672,
418 MassMin = 400,
419 MassMax = 600,
420 LxyMin = 0.2,
421 Chi2Max = 200)
422
423 BcJpsiDs1VertexFit = acc.popToolsAndMerge(BPHY_TrkVKalVrtFitterCfg(flags, BPHYDerivationName + "BcJpsiDs1", CascadeCnstPrecision = 1e-6))
424 acc.addPublicTool(BcJpsiDs1VertexFit)
425
426 BPHY15JpsiDps1 = CompFactory.DerivationFramework.JpsiPlusDs1Cascade(
427 name = "BPHY15JpsiDps1",
428 HypothesisName = "Bc",
429 TrkVertexFitterTool = BcJpsiDs1VertexFit,
430 PVRefitter = PVrefit,
431 V0Tools = V0Tools,
432 DxHypothesis = 421,
433 ApplyD0MassConstraint = True,
434 ApplyK0MassConstraint = True,
435 ApplyJpsiMassConstraint = True,
436 JpsiMassLowerCut = 2600.,
437 JpsiMassUpperCut = 3600.,
438 JpsipiMassLowerCut = 2600.,
439 JpsipiMassUpperCut = 6800.,
440 D0MassLowerCut = 1864.83 - 180.,
441 D0MassUpperCut = 1864.83 + 180.,
442 K0MassLowerCut = 400.,
443 K0MassUpperCut = 600.,
444 DstMassLowerCut = 2010.26 - 300.,
445 DstMassUpperCut = 2010.26 + 300.,
446 MassLowerCut = 6274.90 - 600,
447 MassUpperCut = 6274.90 + 600.,
448 Chi2Cut = 10,
449 RefitPV = True,
450 RefPVContainerName = "BPHY15RefittedPrimaryVertices5",
451 JpsipiVertices = "BPHY15JpsipiCandidates",
452 CascadeVertexCollections = ["BcJpsiDps1CascadeSV3", "BcJpsiDps1CascadeSV2", "BcJpsiDps1CascadeSV1"],
453 K0Vertices = "BPHY15K0Candidates",
454 D0Vertices = "BPHY15DiTrkCandidates")
455
456 #--------------------------------------------------------------------
457
458 CascadeCollections = []
459
460 CascadeCollections += BPHY15JpsiDs.CascadeVertexCollections
461 CascadeCollections += BPHY15JpsiDp.CascadeVertexCollections
462
463 CascadeCollections += BPHY15JpsiDpst.CascadeVertexCollections
464 CascadeCollections += BPHY15JpsiDps1.CascadeVertexCollections
465
466 BPHY15_AugOriginalCounts = acc.popToolsAndMerge(
467 AugOriginalCountsCfg(flags, name = "BPHY15_AugOriginalCounts"))
468
469 #--------------------------------------------------------------------
470 if not isSimulation: #Only Skim Data
471 BPHY15_SelectBcJpsipiEvent = CompFactory.DerivationFramework.xAODStringSkimmingTool(
472 name = "BPHY15_SelectBcJpsipiEvent",
473 expression = "( count(BPHY15BcJpsipiCandidates.passed_Bc) > 0)")
474 acc.addPublicTool(BPHY15_SelectBcJpsipiEvent)
475 BPHY15_AnyVertexSkimmingTool = CompFactory.DerivationFramework.AnyVertexSkimmingTool("BPHY15_AnyVertexSkimmingTool", UseHandles = True,
476 VertexContainerNames =CascadeCollections )
477 acc.addPublicTool(BPHY15_AnyVertexSkimmingTool)
478 #====================================================================
479 # Make event selection based on an OR of the input skimming tools
480 #====================================================================
481
482 BPHY15SkimmingOR = CompFactory.DerivationFramework.FilterCombinationOR(
483 "BPHY15SkimmingOR",
484 FilterList = [BPHY15_SelectBcJpsipiEvent, BPHY15_AnyVertexSkimmingTool] )
485 acc.addPublicTool(BPHY15SkimmingOR)
486
487 augTools = [BPHY15JpsiSelectAndWrite, BPHY15_Select_Jpsi2mumu,
488 BPHY15BcJpsipiSelectAndWrite, BPHY15_Select_Bc2Jpsipi,
489 BPHY15JpsipiSelectAndWrite, BPHY15_Select_Jpsipi,
490 BPHY15DiTrkSelectAndWrite, BPHY15_Select_D0, BPHY15_Select_D0b,
491 BPHY15Dh3SelectAndWrite, BPHY15_Select_Ds, BPHY15_Select_Dp, BPHY15_Select_Dm,
492 BPHY15JpsiDs, BPHY15JpsiDp, BPHY15JpsiDpst,
493 BPHY15K0SelectAndWrite, BPHY15_Select_K0,
494 BPHY15JpsiDps1,
495 BPHY15_AugOriginalCounts]
496 for t in augTools : acc.addPublicTool(t)
497
498 acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel("BPHY15Kernel",
499 AugmentationTools = augTools,
500 #Only skim if not MC
501 SkimmingTools = [BPHY15SkimmingOR] if not isSimulation else [],
502 ThinningTools = []))
503
504 from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
505 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
506 from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
507 BPHY15SlimmingHelper = SlimmingHelper("BPHY15SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
508 from DerivationFrameworkBPhys.commonBPHYMethodsCfg import getDefaultAllVariables
509 AllVariables = getDefaultAllVariables()
510 StaticContent = []
511
512 # Needed for trigger objects
513 BPHY15SlimmingHelper.IncludeMuonTriggerContent = True
514 BPHY15SlimmingHelper.IncludeBPhysTriggerContent = True
515
516
517 AllVariables += ["PrimaryVertices"]
518 for x in range(1,6):
519 StaticContent += ["xAOD::VertexContainer#BPHY15RefittedPrimaryVertices%s" % str(x)]
520 StaticContent += ["xAOD::VertexAuxContainer#BPHY15RefittedPrimaryVertices%sAux." % str(x)]
521
522
523 AllVariables += ["InDetTrackParticles"]
524
525
528 AllVariables += ["CombinedMuonTrackParticles"]
529 AllVariables += ["ExtrapolatedMuonTrackParticles"]
530
531
532 AllVariables += ["Muons"]
533
534
535
536 StaticContent += ["xAOD::VertexContainer#%s" % BPHY15JpsiSelectAndWrite.OutputVtxContainerName]
537
538 StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY15JpsiSelectAndWrite.OutputVtxContainerName]
539
540
541 StaticContent += ["xAOD::VertexContainer#%s" % BPHY15BcJpsipiSelectAndWrite.OutputVtxContainerName]
542 StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY15BcJpsipiSelectAndWrite.OutputVtxContainerName]
543
544
545
546 for cascades in CascadeCollections:
547 StaticContent += ["xAOD::VertexContainer#%s" % cascades]
548 StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % cascades]
549
550 # Tagging information (in addition to that already requested by usual algorithms)
551 AllVariables += ["GSFTrackParticles", "MuonSpectrometerTrackParticles" ]
552
553 # Truth information for MC only
554 if isSimulation:
555 AllVariables += ["TruthEvents","TruthParticles","TruthVertices","MuonTruthParticles"]
556
557 AllVariables = list(set(AllVariables)) # remove duplicates
558
559 BPHY15SlimmingHelper.AllVariables = AllVariables
560 BPHY15SlimmingHelper.StaticContent = StaticContent
561
562 BPHY15ItemList = BPHY15SlimmingHelper.GetItemList()
563 acc.merge(OutputStreamCfg(flags, "DAOD_BPHY15", ItemList=BPHY15ItemList, AcceptAlgs=["BPHY15Kernel"]))
564 acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_BPHY15", AcceptAlgs=["BPHY15Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))
565 acc.printConfig(withDetails=True, summariseProps=True, onlyComponents = [], printDefaults=True)
566 return acc
STL class.
BPHY15Cfg(flags)
Definition BPHY15.py:15