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