ATLAS Offline Software
BPHY25.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 #====================================================================
4 # BPHY25.py
5 # Contact: xin.chen@cern.ch
6 #====================================================================
7 
8 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
9 from AthenaConfiguration.ComponentFactory import CompFactory
10 from AthenaConfiguration.Enums import MetadataCategory
11 
12 BPHYDerivationName = "BPHY25"
13 streamName = "StreamDAOD_BPHY25"
14 
15 def BPHY25Cfg(flags):
16  from DerivationFrameworkBPhys.commonBPHYMethodsCfg import (BPHY_V0ToolCfg, BPHY_InDetDetailedTrackSelectorToolCfg, BPHY_VertexPointEstimatorCfg, BPHY_TrkVKalVrtFitterCfg)
17  from JpsiUpsilonTools.JpsiUpsilonToolsConfig import PrimaryVertexRefittingToolCfg
18  acc = ComponentAccumulator()
19  isSimulation = flags.Input.isMC
20  V0Tools = acc.popToolsAndMerge(BPHY_V0ToolCfg(flags, BPHYDerivationName))
21  vkalvrt = acc.popToolsAndMerge(BPHY_TrkVKalVrtFitterCfg(flags, BPHYDerivationName)) # VKalVrt vertex fitter
22  acc.addPublicTool(vkalvrt)
23  acc.addPublicTool(V0Tools)
24  trackselect = acc.popToolsAndMerge(BPHY_InDetDetailedTrackSelectorToolCfg(flags, BPHYDerivationName))
25  acc.addPublicTool(trackselect)
26  vpest = acc.popToolsAndMerge(BPHY_VertexPointEstimatorCfg(flags, BPHYDerivationName))
27  acc.addPublicTool(vpest)
28  pvrefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags))
29  acc.addPublicTool(pvrefitter)
30  from TrkConfig.TrkV0FitterConfig import TrkV0VertexFitter_InDetExtrCfg
31  v0fitter = acc.popToolsAndMerge(TrkV0VertexFitter_InDetExtrCfg(flags))
32  acc.addPublicTool(v0fitter)
33  from TrackToVertex.TrackToVertexConfig import InDetTrackToVertexCfg
34  tracktovtxtool = acc.popToolsAndMerge(InDetTrackToVertexCfg(flags))
35  acc.addPublicTool(tracktovtxtool)
36  from TrkConfig.TrkVKalVrtFitterConfig import V0VKalVrtFitterCfg
37  gammafitter = acc.popToolsAndMerge(V0VKalVrtFitterCfg(
38  flags, BPHYDerivationName+"_GammaFitter",
39  Robustness = 6,
40  usePhiCnst = True,
41  useThetaCnst = True,
42  InputParticleMasses = [0.511,0.511] ))
43  acc.addPublicTool(gammafitter)
44  from InDetConfig.InDetTrackSelectorToolConfig import V0InDetConversionTrackSelectorToolCfg
45  v0trackselect = acc.popToolsAndMerge(V0InDetConversionTrackSelectorToolCfg(flags))
46  acc.addPublicTool(v0trackselect)
47 
48  # mass limits and constants used in the following
49  Jpsi_lo = 2600.0
50  Jpsi_hi = 3500.0
51  Zc_lo = 3650.0
52  Zc_hi = 4150.0
53  Psi_lo = 3350.0
54  Psi_hi = 4200.0
55  B_lo = 4850.0
56  B_hi = 5700.0
57  Bs0_lo = 4950.0
58  Bs0_hi = 5800.0
59  Phi_lo = 770.0
60  Phi_hi = 1270.0
61  Upsi_lo = 8900.0
62  Upsi_hi = 9900.0
63  Ds_lo = 1660.0
64  Ds_hi = 2230.0
65  Ks_lo = 300.0
66  Ks_hi = 700.0
67  Ld_lo = 900.0
68  Ld_hi = 1350.0
69  Xi_lo = 1100.0
70  Xi_hi = 1550.0
71  Omg_lo = 1450.0
72  Omg_hi = 1900.0
73  Xib_lo = 5350.0
74  Xib_hi = 6250.0
75  Sigmabp_lo = 5360.0
76  Sigmabp_hi = 6260.0
77  Sigmabm_lo = 5365.0
78  Sigmabm_hi = 6265.0
79 
80  Mumass = 105.658
81  Pimass = 139.570
82  Kmass = 493.677
83  Protonmass = 938.2721
84  Phimass = 1019.461
85  Dpmmass = 1869.66
86  Dspmmass = 1968.35
87  Jpsimass = 3096.916
88  Psi2Smass = 3686.10
89  X3872mass = 3871.65
90  Zcmass = 3887.1
91  Bpmmass = 5279.34
92  B0mass = 5279.66
93  Bs0mass = 5366.92
94  Upsimass = 9460.30
95  Lambdamass = 1115.683
96  Lambdab0mass = 5619.60
97  Ximass = 1321.71
98  Omegamass = 1672.45
99  Xibmass = 5797.0
100  Sigmabpmass = 5810.56
101  Sigmabmmass = 5815.64
102 
103  BPHY25JpsiFinder = CompFactory.Analysis.JpsiFinder(
104  name = "BPHY25JpsiFinder",
105  muAndMu = True,
106  muAndTrack = False,
107  TrackAndTrack = False,
108  assumeDiMuons = True, # If true, will assume dimu hypothesis and use PDG value for mu mass
109  trackThresholdPt = 2400.,
110  invMassLower = Phi_lo,
111  invMassUpper = Upsi_hi,
112  Chi2Cut = 10.,
113  oppChargesOnly = True,
114  atLeastOneComb = True,
115  useCombinedMeasurement = False, # Only takes effect if combOnly=True
116  muonCollectionKey = "Muons",
117  TrackParticleCollection = "InDetTrackParticles",
118  V0VertexFitterTool = None,
119  useV0Fitter = False, # if False a TrkVertexFitterTool will be used
120  TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter
121  TrackSelectorTool = trackselect,
122  VertexPointEstimator = vpest,
123  useMCPCuts = False )
124  acc.addPublicTool(BPHY25JpsiFinder)
125 
126  BPHY25_Reco_mumu = CompFactory.DerivationFramework.Reco_Vertex(
127  name = "BPHY25_Reco_mumu",
128  VertexSearchTool = BPHY25JpsiFinder,
129  OutputVtxContainerName = "BPHY25OniaCandidates",
130  PVContainerName = "PrimaryVertices",
131  RefPVContainerName = "SHOULDNOTBEUSED",
132  V0Tools = V0Tools,
133  PVRefitter = pvrefitter,
134  DoVertexType = 1)
135 
136 
137  # X(3872), Psi(2S) -> J/psi + pi pi
138  BPHY25PsiX3872_Jpsi2Trk = CompFactory.Analysis.JpsiPlus2Tracks(
139  name = "BPHY25PsiX3872_Jpsi2Trk",
140  kaonkaonHypothesis = False,
141  pionpionHypothesis = True,
142  kaonpionHypothesis = False,
143  kaonprotonHypothesis = False,
144  trkThresholdPt = 380.,
145  trkMaxEta = 2.6,
146  oppChargesOnly = False,
147  JpsiMassLower = Jpsi_lo,
148  JpsiMassUpper = Jpsi_hi,
149  TrkQuadrupletMassLower = Psi_lo,
150  TrkQuadrupletMassUpper = Psi_hi,
151  Chi2Cut = 10.,
152  JpsiContainerKey = "BPHY25OniaCandidates",
153  TrackParticleCollection = "InDetTrackParticles",
154  MuonsUsedInJpsi = "Muons",
155  ExcludeJpsiMuonsOnly = True,
156  TrkVertexFitterTool = vkalvrt,
157  TrackSelectorTool = trackselect,
158  UseMassConstraint = False)
159  acc.addPublicTool(BPHY25PsiX3872_Jpsi2Trk)
160 
161  # Bs0 -> J/psi + K K
162  BPHY25Bs0_Jpsi2Trk = CompFactory.Analysis.JpsiPlus2Tracks(
163  name = "BPHY25Bs0_Jpsi2Trk",
164  kaonkaonHypothesis = True,
165  pionpionHypothesis = False,
166  kaonpionHypothesis = False,
167  kaonprotonHypothesis = False,
168  trkThresholdPt = 380.,
169  trkMaxEta = 2.6,
170  oppChargesOnly = False,
171  JpsiMassLower = Jpsi_lo,
172  JpsiMassUpper = Jpsi_hi,
173  TrkQuadrupletMassLower = Bs0_lo,
174  TrkQuadrupletMassUpper = Bs0_hi,
175  Chi2Cut = 10.,
176  JpsiContainerKey = "BPHY25OniaCandidates",
177  TrackParticleCollection = "InDetTrackParticles",
178  MuonsUsedInJpsi = "Muons",
179  ExcludeJpsiMuonsOnly = True,
180  TrkVertexFitterTool = vkalvrt,
181  TrackSelectorTool = trackselect,
182  UseMassConstraint = False)
183  acc.addPublicTool(BPHY25Bs0_Jpsi2Trk)
184 
185  # B0 -> J/psi + K pi
186  BPHY25B0_Jpsi2Trk = CompFactory.Analysis.JpsiPlus2Tracks(
187  name = "BPHY25B0_Jpsi2Trk",
188  kaonkaonHypothesis = False,
189  pionpionHypothesis = False,
190  kaonpionHypothesis = True,
191  kaonprotonHypothesis = False,
192  trkThresholdPt = 380.,
193  trkMaxEta = 2.6,
194  oppChargesOnly = False,
195  JpsiMassLower = Jpsi_lo,
196  JpsiMassUpper = Jpsi_hi,
197  TrkQuadrupletMassLower = B_lo,
198  TrkQuadrupletMassUpper = B_hi,
199  Chi2Cut = 10.,
200  JpsiContainerKey = "BPHY25OniaCandidates",
201  TrackParticleCollection = "InDetTrackParticles",
202  MuonsUsedInJpsi = "Muons",
203  ExcludeJpsiMuonsOnly = True,
204  TrkVertexFitterTool = vkalvrt,
205  TrackSelectorTool = trackselect,
206  UseMassConstraint = False)
207  acc.addPublicTool(BPHY25B0_Jpsi2Trk)
208 
209  # Zc(3900)+ -> J/psi pi
210  BPHY25Zc3900_Jpsi1Trk = CompFactory.Analysis.JpsiPlus1Track(
211  name = "BPHY25Zc3900_Jpsi1Trk",
212  pionHypothesis = True,
213  kaonHypothesis = False,
214  trkThresholdPt = 380.,
215  trkMaxEta = 2.6,
216  JpsiMassLower = Jpsi_lo,
217  JpsiMassUpper = Jpsi_hi,
218  TrkTrippletMassLower = Zc_lo,
219  TrkTrippletMassUpper = Zc_hi,
220  Chi2Cut = 10.0,
221  JpsiContainerKey = "BPHY25OniaCandidates",
222  TrackParticleCollection = "InDetTrackParticles",
223  MuonsUsedInJpsi = "Muons",
224  ExcludeJpsiMuonsOnly = True,
225  TrkVertexFitterTool = vkalvrt,
226  TrackSelectorTool = trackselect,
227  UseMassConstraint = False)
228  acc.addPublicTool(BPHY25Zc3900_Jpsi1Trk)
229 
230  # B+ -> J/psi K
231  BPHY25Bpm_Jpsi1Trk = CompFactory.Analysis.JpsiPlus1Track(
232  name = "BPHY25Bpm_Jpsi1Trk",
233  pionHypothesis = False,
234  kaonHypothesis = True,
235  trkThresholdPt = 380.,
236  trkMaxEta = 2.6,
237  JpsiMassLower = Jpsi_lo,
238  JpsiMassUpper = Jpsi_hi,
239  TrkTrippletMassLower = B_lo,
240  TrkTrippletMassUpper = B_hi,
241  Chi2Cut = 10.0,
242  JpsiContainerKey = "BPHY25OniaCandidates",
243  TrackParticleCollection = "InDetTrackParticles",
244  MuonsUsedInJpsi = "Muons",
245  ExcludeJpsiMuonsOnly = True,
246  TrkVertexFitterTool = vkalvrt,
247  TrackSelectorTool = trackselect,
248  UseMassConstraint = False)
249  acc.addPublicTool(BPHY25Bpm_Jpsi1Trk)
250 
251  # D+, Ds+ -> phi pi
252  BPHY25DpmDs_Jpsi1Trk = CompFactory.Analysis.JpsiPlus1Track(
253  name = "BPHY25DpmDs_Jpsi1Trk",
254  pionHypothesis = True,
255  kaonHypothesis = False,
256  trkThresholdPt = 380.0,
257  trkMaxEta = 2.6,
258  JpsiMassLower = Phi_lo,
259  JpsiMassUpper = Phi_hi,
260  TrkTrippletMassLower = Ds_lo,
261  TrkTrippletMassUpper = Ds_hi,
262  Chi2Cut = 10.0,
263  JpsiContainerKey = "BPHY25OniaCandidates",
264  TrackParticleCollection = "InDetTrackParticles",
265  MuonsUsedInJpsi = "Muons",
266  ExcludeJpsiMuonsOnly = True,
267  TrkVertexFitterTool = vkalvrt,
268  TrackSelectorTool = trackselect,
269  UseMassConstraint = False)
270  acc.addPublicTool(BPHY25DpmDs_Jpsi1Trk)
271 
272 
273  BPHY25FourTrackReco_PsiX3872 = CompFactory.DerivationFramework.Reco_Vertex(
274  name = "BPHY25FourTrackReco_PsiX3872",
275  VertexSearchTool = BPHY25PsiX3872_Jpsi2Trk,
276  OutputVtxContainerName = "BPHY25FourTrack_PsiX3872",
277  PVContainerName = "PrimaryVertices",
278  V0Tools = V0Tools,
279  PVRefitter = pvrefitter,
280  RefitPV = False,
281  DoVertexType = 0)
282 
283  BPHY25FourTrackReco_Bs0 = CompFactory.DerivationFramework.Reco_Vertex(
284  name = "BPHY25FourTrackReco_Bs0",
285  VertexSearchTool = BPHY25Bs0_Jpsi2Trk,
286  OutputVtxContainerName = "BPHY25FourTrack_Bs0",
287  PVContainerName = "PrimaryVertices",
288  V0Tools = V0Tools,
289  PVRefitter = pvrefitter,
290  RefitPV = False,
291  DoVertexType = 0)
292 
293  BPHY25FourTrackReco_B0 = CompFactory.DerivationFramework.Reco_Vertex(
294  name = "BPHY25FourTrackReco_B0",
295  VertexSearchTool = BPHY25B0_Jpsi2Trk,
296  OutputVtxContainerName = "BPHY25FourTrack_B0",
297  PVContainerName = "PrimaryVertices",
298  V0Tools = V0Tools,
299  PVRefitter = pvrefitter,
300  RefitPV = False,
301  DoVertexType = 0)
302 
303 
304  BPHY25ThreeTrackReco_Zc3900 = CompFactory.DerivationFramework.Reco_Vertex(
305  name = "BPHY25ThreeTrackReco_Zc3900",
306  VertexSearchTool = BPHY25Zc3900_Jpsi1Trk,
307  OutputVtxContainerName = "BPHY25ThreeTrack_Zc3900",
308  PVContainerName = "PrimaryVertices",
309  V0Tools = V0Tools,
310  PVRefitter = pvrefitter,
311  RefitPV = False,
312  DoVertexType = 0)
313 
314  BPHY25ThreeTrackReco_Bpm = CompFactory.DerivationFramework.Reco_Vertex(
315  name = "BPHY25ThreeTrackReco_Bpm",
316  VertexSearchTool = BPHY25Bpm_Jpsi1Trk,
317  OutputVtxContainerName = "BPHY25ThreeTrack_Bpm",
318  PVContainerName = "PrimaryVertices",
319  V0Tools = V0Tools,
320  PVRefitter = pvrefitter,
321  RefitPV = False,
322  DoVertexType = 0)
323 
324  BPHY25ThreeTrackReco_DpmDs = CompFactory.DerivationFramework.Reco_Vertex(
325  name = "BPHY25ThreeTrackReco_DpmDs",
326  VertexSearchTool = BPHY25DpmDs_Jpsi1Trk,
327  OutputVtxContainerName = "BPHY25ThreeTrack_DpmDs",
328  PVContainerName = "PrimaryVertices",
329  V0Tools = V0Tools,
330  PVRefitter = pvrefitter,
331  RefitPV = False,
332  DoVertexType = 0)
333 
334  # revertex with mass constraints to reduce combinatorics
335  # X(3872) -> J/psi pi pi
336  BPHY25Rev_X3872 = CompFactory.DerivationFramework.ReVertex(
337  name = "BPHY25Rev_X3872",
338  InputVtxContainerName = "BPHY25FourTrack_PsiX3872",
339  TrackIndices = [ 0, 1, 2, 3 ],
340  SubVertexTrackIndices = [ 1, 2 ],
341  RefitPV = False,
342  UseMassConstraint = True,
343  VertexMass = X3872mass,
344  SubVertexMass = Jpsimass,
345  MassInputParticles = [Mumass, Mumass, Pimass, Pimass],
346  Chi2Cut = 15.,
347  TrkVertexFitterTool = vkalvrt,
348  PVRefitter = pvrefitter,
349  V0Tools = V0Tools,
350  OutputVtxContainerName = "BPHY25Revtx_X3872")
351 
352  # Bs0 -> J/psi K K
353  BPHY25Rev_Bs0 = CompFactory.DerivationFramework.ReVertex(
354  name = "BPHY25Rev_Bs0",
355  InputVtxContainerName = "BPHY25FourTrack_Bs0",
356  TrackIndices = [ 0, 1, 2, 3 ],
357  SubVertexTrackIndices = [ 1, 2 ],
358  RefitPV = False,
359  UseMassConstraint = True,
360  VertexMass = Bs0mass,
361  SubVertexMass = Jpsimass,
362  MassInputParticles = [Mumass, Mumass, Kmass, Kmass],
363  Chi2Cut = 15.,
364  TrkVertexFitterTool = vkalvrt,
365  PVRefitter = pvrefitter,
366  V0Tools = V0Tools,
367  OutputVtxContainerName = "BPHY25Revtx_Bs0")
368 
369  # B0 -> J/psi K pi
370  BPHY25Rev_B0Kpi = CompFactory.DerivationFramework.ReVertex(
371  name = "BPHY25Rev_B0Kpi",
372  InputVtxContainerName = "BPHY25FourTrack_B0",
373  TrackIndices = [ 0, 1, 2, 3 ],
374  SubVertexTrackIndices = [ 1, 2 ],
375  RefitPV = False,
376  UseMassConstraint = True,
377  VertexMass = B0mass,
378  SubVertexMass = Jpsimass,
379  MassInputParticles = [Mumass, Mumass, Kmass, Pimass],
380  Chi2Cut = 15.,
381  TrkVertexFitterTool = vkalvrt,
382  PVRefitter = pvrefitter,
383  V0Tools = V0Tools,
384  OutputVtxContainerName = "BPHY25Revtx_B0Kpi")
385 
386  # B0 -> J/psi pi K
387  BPHY25Rev_B0piK = CompFactory.DerivationFramework.ReVertex(
388  name = "BPHY25Rev_B0piK",
389  InputVtxContainerName = "BPHY25FourTrack_B0",
390  TrackIndices = [ 0, 1, 2, 3 ],
391  SubVertexTrackIndices = [ 1, 2 ],
392  RefitPV = False,
393  UseMassConstraint = True,
394  VertexMass = B0mass,
395  SubVertexMass = Jpsimass,
396  MassInputParticles = [Mumass, Mumass, Pimass, Kmass],
397  Chi2Cut = 15.,
398  TrkVertexFitterTool = vkalvrt,
399  PVRefitter = pvrefitter,
400  V0Tools = V0Tools,
401  OutputVtxContainerName = "BPHY25Revtx_B0piK")
402 
403  # Zc3900 -> J/psi pi
404  BPHY25Rev_Zc3900 = CompFactory.DerivationFramework.ReVertex(
405  name = "BPHY25Rev_Zc3900",
406  InputVtxContainerName = "BPHY25ThreeTrack_Zc3900",
407  TrackIndices = [ 0, 1, 2 ],
408  SubVertexTrackIndices = [ 1, 2 ],
409  RefitPV = False,
410  UseMassConstraint = True,
411  SubVertexMass = Jpsimass,
412  MassInputParticles = [Mumass, Mumass, Pimass],
413  Chi2Cut = 15.,
414  BMassLower = Zc_lo,
415  BMassUpper = Zc_hi,
416  TrkVertexFitterTool = vkalvrt,
417  PVRefitter = pvrefitter,
418  V0Tools = V0Tools,
419  OutputVtxContainerName = "BPHY25Revtx_Zc3900")
420 
421  # Bpm -> J/psi K
422  BPHY25Rev_Bpm = CompFactory.DerivationFramework.ReVertex(
423  name = "BPHY25Rev_Bpm",
424  InputVtxContainerName = "BPHY25ThreeTrack_Bpm",
425  TrackIndices = [ 0, 1, 2 ],
426  SubVertexTrackIndices = [ 1, 2 ],
427  RefitPV = False,
428  UseMassConstraint = True,
429  VertexMass = Bpmmass,
430  SubVertexMass = Jpsimass,
431  MassInputParticles = [Mumass, Mumass, Kmass],
432  Chi2Cut = 15.,
433  TrkVertexFitterTool = vkalvrt,
434  PVRefitter = pvrefitter,
435  V0Tools = V0Tools,
436  OutputVtxContainerName = "BPHY25Revtx_Bpm")
437 
438  # Ds -> phi pi
439  BPHY25Rev_Ds = CompFactory.DerivationFramework.ReVertex(
440  name = "BPHY25Rev_Ds",
441  InputVtxContainerName = "BPHY25ThreeTrack_DpmDs",
442  TrackIndices = [ 0, 1, 2 ],
443  RefitPV = False,
444  UseMassConstraint = True,
445  VertexMass = Dspmmass,
446  MassInputParticles = [Mumass, Mumass, Pimass],
447  Chi2Cut = 15.,
448  TrkVertexFitterTool = vkalvrt,
449  PVRefitter = pvrefitter,
450  V0Tools = V0Tools,
451  OutputVtxContainerName = "BPHY25Revtx_Ds")
452 
453  # Dpm -> phi pi
454  BPHY25Rev_Dpm = CompFactory.DerivationFramework.ReVertex(
455  name = "BPHY25Rev_Dpm",
456  InputVtxContainerName = "BPHY25ThreeTrack_DpmDs",
457  TrackIndices = [ 0, 1, 2 ],
458  RefitPV = False,
459  UseMassConstraint = True,
460  VertexMass = Dpmmass,
461  MassInputParticles = [Mumass, Mumass, Pimass],
462  Chi2Cut = 15.,
463  TrkVertexFitterTool = vkalvrt,
464  PVRefitter = pvrefitter,
465  V0Tools = V0Tools,
466  OutputVtxContainerName = "BPHY25Revtx_Dpm")
467 
468 
469  BPHY25Select_Phi = CompFactory.DerivationFramework.Select_onia2mumu(
470  name = "BPHY25Select_Phi",
471  HypothesisName = "Phi",
472  InputVtxContainerName = "BPHY25OniaCandidates",
473  V0Tools = V0Tools,
474  TrkMasses = [Mumass, Mumass],
475  MassMin = Phi_lo,
476  MassMax = Phi_hi,
477  DoVertexType = 0)
478 
479  BPHY25Select_Jpsi = CompFactory.DerivationFramework.Select_onia2mumu(
480  name = "BPHY25Select_Jpsi",
481  HypothesisName = "Jpsi",
482  InputVtxContainerName = "BPHY25OniaCandidates",
483  V0Tools = V0Tools,
484  TrkMasses = [Mumass, Mumass],
485  MassMin = Jpsi_lo,
486  MassMax = Jpsi_hi,
487  DoVertexType = 0)
488 
489  BPHY25Select_Psi = CompFactory.DerivationFramework.Select_onia2mumu(
490  name = "BPHY25Select_Psi",
491  HypothesisName = "Psi",
492  InputVtxContainerName = "BPHY25OniaCandidates",
493  V0Tools = V0Tools,
494  TrkMasses = [Mumass, Mumass],
495  MassMin = Psi_lo,
496  MassMax = Psi_hi,
497  DoVertexType = 0)
498 
499  BPHY25Select_Upsi = CompFactory.DerivationFramework.Select_onia2mumu(
500  name = "BPHY25Select_Upsi",
501  HypothesisName = "Upsi",
502  InputVtxContainerName = "BPHY25OniaCandidates",
503  V0Tools = V0Tools,
504  TrkMasses = [Mumass, Mumass],
505  MassMin = Upsi_lo,
506  MassMax = Upsi_hi,
507  DoVertexType = 0)
508 
509 
510  from DerivationFrameworkBPhys.V0ToolConfig import BPHY_Reco_V0FinderCfg
511  BPHY25_Reco_V0Finder = acc.popToolsAndMerge(BPHY_Reco_V0FinderCfg(
512  flags, derivation = BPHYDerivationName,
513  V0ContainerName = "BPHY25V0Candidates",
514  KshortContainerName = "BPHY25KsCandidates_dummy",
515  LambdaContainerName = "BPHY25LambdaCandidates_dummy",
516  LambdabarContainerName = "BPHY25LambdabarCandidates_dummy",
517  CheckVertexContainers = ["BPHY25OniaCandidates"]
518  ))
519 
520 
521 
524 
525  list_0trkLd_hypo = ["PhiLd", "JpsiLd", "Psi0Ld", "UpsiLd"]
526  list_0trkLd_jpsiHypo = ["Phi", "Jpsi", "Psi", "Upsi"]
527  list_0trkLd_jpsiMass = [Phimass, Jpsimass, Psi2Smass, Upsimass]
528 
529  list_0trkLd_obj = []
530  for hypo in list_0trkLd_hypo:
531  list_0trkLd_obj.append( CompFactory.DerivationFramework.JpsiXPlusDisplaced("BPHY25_"+hypo) )
532 
533  for i in range(len(list_0trkLd_obj)):
534  list_0trkLd_obj[i].JXVertices = "BPHY25OniaCandidates"
535  if i == 0:
536  list_0trkLd_obj[i].V0Vertices = "BPHY25V0Candidates"
537  list_0trkLd_obj[i].RefitV0 = True
538  list_0trkLd_obj[i].OutoutV0VtxCollection = "LambdaCollection"
539  list_0trkLd_obj[i].V0MassLowerCut = Ld_lo
540  list_0trkLd_obj[i].V0MassUpperCut = Ld_hi
541  list_0trkLd_obj[i].DoV0Enumeration = True
542  list_0trkLd_obj[i].DecorateV0Momentum = True
543  else:
544  list_0trkLd_obj[i].V0Vertices = "LambdaCollection"
545  list_0trkLd_obj[i].RefitV0 = False
546  list_0trkLd_obj[i].JXVtxHypoNames = [list_0trkLd_jpsiHypo[i]]
547  list_0trkLd_obj[i].CascadeVertexCollections = ["BPHY25_"+list_0trkLd_hypo[i]+"_CascadeVtx1","BPHY25_"+list_0trkLd_hypo[i]+"_CascadeMainVtx"]
548  list_0trkLd_obj[i].HasJXSubVertex = False
549  list_0trkLd_obj[i].VxPrimaryCandidateName = "PrimaryVertices"
550  list_0trkLd_obj[i].V0Hypothesis = "Lambda"
551  list_0trkLd_obj[i].MassCutGamma = 10.
552  list_0trkLd_obj[i].Chi2CutGamma = 5.
553  list_0trkLd_obj[i].LxyV0Cut = 20.
554  list_0trkLd_obj[i].HypothesisName = list_0trkLd_hypo[i]
555  list_0trkLd_obj[i].NumberOfJXDaughters = 2
556  list_0trkLd_obj[i].JXDaug1MassHypo = Mumass
557  list_0trkLd_obj[i].JXDaug2MassHypo = Mumass
558  list_0trkLd_obj[i].NumberOfDisVDaughters = 2
559  list_0trkLd_obj[i].JpsiMass = list_0trkLd_jpsiMass[i]
560  list_0trkLd_obj[i].V0Mass = Lambdamass
561  list_0trkLd_obj[i].ApplyJpsiMassConstraint = True
562  list_0trkLd_obj[i].ApplyV0MassConstraint = True
563  list_0trkLd_obj[i].Chi2CutV0 = 10.
564  list_0trkLd_obj[i].Chi2Cut = 8.
565  list_0trkLd_obj[i].Trackd0Cut = 3.
566  list_0trkLd_obj[i].MaxJXCandidates = 10
567  list_0trkLd_obj[i].MaxV0Candidates = 10
568  list_0trkLd_obj[i].RefitPV = True
569  list_0trkLd_obj[i].MaxnPV = 20
570  list_0trkLd_obj[i].RefPVContainerName = "BPHY25_"+list_0trkLd_hypo[i]+"_RefPrimaryVertices"
571  list_0trkLd_obj[i].TrkVertexFitterTool = vkalvrt
572  list_0trkLd_obj[i].V0VertexFitterTool = v0fitter
573  list_0trkLd_obj[i].GammaFitterTool = gammafitter
574  list_0trkLd_obj[i].PVRefitter = pvrefitter
575  list_0trkLd_obj[i].V0Tools = V0Tools
576  list_0trkLd_obj[i].TrackToVertexTool = tracktovtxtool
577  list_0trkLd_obj[i].V0TrackSelectorTool = v0trackselect
578  list_0trkLd_obj[i].TrackSelectorTool = trackselect
579 
580 
583 
584  list_0trkXi_hypo = ["PhiXi", "JpsiXi", "UpsiXi"]
585  list_0trkXi_jpsiHypo = ["Phi", "Jpsi", "Upsi"]
586  list_0trkXi_jpsiMass = [Phimass, Jpsimass, Upsimass]
587 
588  list_0trkXi_obj = []
589  for hypo in list_0trkXi_hypo:
590  list_0trkXi_obj.append( CompFactory.DerivationFramework.JpsiXPlusDisplaced("BPHY25_"+hypo) )
591 
592  for i in range(len(list_0trkXi_obj)):
593  list_0trkXi_obj[i].JXVertices = "BPHY25OniaCandidates"
594  list_0trkXi_obj[i].V0Vertices = "LambdaCollection"
595  list_0trkXi_obj[i].RefitV0 = False
596  if i == 0:
597  list_0trkXi_obj[i].OutoutDisVtxCollection = "XiCollection"
598  list_0trkXi_obj[i].DisplacedMassLowerCut = Xi_lo
599  list_0trkXi_obj[i].DisplacedMassUpperCut = Xi_hi
600  list_0trkXi_obj[i].Chi2CutDisV = 10.
601  else:
602  list_0trkXi_obj[i].DisplacedVertices = "XiCollection"
603  list_0trkXi_obj[i].JXVtxHypoNames = [list_0trkXi_jpsiHypo[i]]
604  list_0trkXi_obj[i].CascadeVertexCollections = ["BPHY25_"+list_0trkXi_hypo[i]+"_CascadeVtx1_sub","BPHY25_"+list_0trkXi_hypo[i]+"_CascadeVtx1","BPHY25_"+list_0trkXi_hypo[i]+"_CascadeMainVtx"]
605  list_0trkXi_obj[i].HasJXSubVertex = False
606  list_0trkXi_obj[i].VxPrimaryCandidateName = "PrimaryVertices"
607  list_0trkXi_obj[i].V0Hypothesis = "Lambda"
608  list_0trkXi_obj[i].MassCutGamma = 10.
609  list_0trkXi_obj[i].Chi2CutGamma = 5.
610  list_0trkXi_obj[i].LxyV0Cut = 20.
611  list_0trkXi_obj[i].LxyDisVtxCut = 20.
612  list_0trkXi_obj[i].HypothesisName = list_0trkXi_hypo[i]
613  list_0trkXi_obj[i].NumberOfJXDaughters = 2
614  list_0trkXi_obj[i].JXDaug1MassHypo = Mumass
615  list_0trkXi_obj[i].JXDaug2MassHypo = Mumass
616  list_0trkXi_obj[i].NumberOfDisVDaughters = 3
617  list_0trkXi_obj[i].DisVDaug3MassHypo = Pimass
618  list_0trkXi_obj[i].JpsiMass = list_0trkXi_jpsiMass[i]
619  list_0trkXi_obj[i].V0Mass = Lambdamass
620  list_0trkXi_obj[i].DisVtxMass = Ximass
621  list_0trkXi_obj[i].ApplyJpsiMassConstraint = True
622  list_0trkXi_obj[i].ApplyV0MassConstraint = True
623  list_0trkXi_obj[i].ApplyDisVMassConstraint = True
624  list_0trkXi_obj[i].Chi2CutV0 = 10.
625  list_0trkXi_obj[i].Chi2Cut = 8.
626  list_0trkXi_obj[i].Trackd0Cut = 3.
627  list_0trkXi_obj[i].MaxJXCandidates = 10
628  list_0trkXi_obj[i].MaxV0Candidates = 10
629  list_0trkXi_obj[i].MaxDisVCandidates = 20
630  list_0trkXi_obj[i].RefitPV = True
631  list_0trkXi_obj[i].MaxnPV = 20
632  list_0trkXi_obj[i].RefPVContainerName = "BPHY25_"+list_0trkXi_hypo[i]+"_RefPrimaryVertices"
633  list_0trkXi_obj[i].TrkVertexFitterTool = vkalvrt
634  list_0trkXi_obj[i].V0VertexFitterTool = v0fitter
635  list_0trkXi_obj[i].GammaFitterTool = gammafitter
636  list_0trkXi_obj[i].PVRefitter = pvrefitter
637  list_0trkXi_obj[i].V0Tools = V0Tools
638  list_0trkXi_obj[i].TrackToVertexTool = tracktovtxtool
639  list_0trkXi_obj[i].V0TrackSelectorTool = v0trackselect
640  list_0trkXi_obj[i].TrackSelectorTool = trackselect
641 
642 
645 
646  list_0trkOmg_hypo = ["PhiOmg", "JpsiOmg", "UpsiOmg"]
647  list_0trkOmg_jpsiHypo = ["Phi", "Jpsi", "Upsi"]
648  list_0trkOmg_jpsiMass = [Phimass, Jpsimass, Upsimass]
649 
650  list_0trkOmg_obj = []
651  for hypo in list_0trkOmg_hypo:
652  list_0trkOmg_obj.append( CompFactory.DerivationFramework.JpsiXPlusDisplaced("BPHY25_"+hypo) )
653 
654  for i in range(len(list_0trkOmg_obj)):
655  list_0trkOmg_obj[i].JXVertices = "BPHY25OniaCandidates"
656  list_0trkOmg_obj[i].V0Vertices = "LambdaCollection"
657  list_0trkOmg_obj[i].RefitV0 = False
658  if i == 0:
659  list_0trkOmg_obj[i].OutoutDisVtxCollection = "OmegaCollection"
660  list_0trkOmg_obj[i].DisplacedMassLowerCut = Omg_lo
661  list_0trkOmg_obj[i].DisplacedMassUpperCut = Omg_hi
662  list_0trkOmg_obj[i].Chi2CutDisV = 10.
663  else:
664  list_0trkOmg_obj[i].DisplacedVertices = "OmegaCollection"
665  list_0trkOmg_obj[i].JXVtxHypoNames = [list_0trkOmg_jpsiHypo[i]]
666  list_0trkOmg_obj[i].CascadeVertexCollections = ["BPHY25_"+list_0trkOmg_hypo[i]+"_CascadeVtx1_sub","BPHY25_"+list_0trkOmg_hypo[i]+"_CascadeVtx1","BPHY25_"+list_0trkOmg_hypo[i]+"_CascadeMainVtx"]
667  list_0trkOmg_obj[i].HasJXSubVertex = False
668  list_0trkOmg_obj[i].VxPrimaryCandidateName = "PrimaryVertices"
669  list_0trkOmg_obj[i].V0Hypothesis = "Lambda"
670  list_0trkOmg_obj[i].MassCutGamma = 10.
671  list_0trkOmg_obj[i].Chi2CutGamma = 5.
672  list_0trkOmg_obj[i].LxyV0Cut = 20.
673  list_0trkOmg_obj[i].LxyDisVtxCut = 20.
674  list_0trkOmg_obj[i].HypothesisName = list_0trkOmg_hypo[i]
675  list_0trkOmg_obj[i].NumberOfJXDaughters = 2
676  list_0trkOmg_obj[i].JXDaug1MassHypo = Mumass
677  list_0trkOmg_obj[i].JXDaug2MassHypo = Mumass
678  list_0trkOmg_obj[i].NumberOfDisVDaughters = 3
679  list_0trkOmg_obj[i].DisVDaug3MassHypo = Kmass
680  list_0trkOmg_obj[i].JpsiMass = list_0trkOmg_jpsiMass[i]
681  list_0trkOmg_obj[i].V0Mass = Lambdamass
682  list_0trkOmg_obj[i].DisVtxMass = Omegamass
683  list_0trkOmg_obj[i].ApplyJpsiMassConstraint = True
684  list_0trkOmg_obj[i].ApplyV0MassConstraint = True
685  list_0trkOmg_obj[i].ApplyDisVMassConstraint = True
686  list_0trkOmg_obj[i].Chi2CutV0 = 10.
687  list_0trkOmg_obj[i].Chi2Cut = 8.
688  list_0trkOmg_obj[i].Trackd0Cut = 3.
689  list_0trkOmg_obj[i].MaxJXCandidates = 10
690  list_0trkOmg_obj[i].MaxV0Candidates = 10
691  list_0trkOmg_obj[i].MaxDisVCandidates = 20
692  list_0trkOmg_obj[i].RefitPV = True
693  list_0trkOmg_obj[i].MaxnPV = 20
694  list_0trkOmg_obj[i].RefPVContainerName = "BPHY25_"+list_0trkOmg_hypo[i]+"_RefPrimaryVertices"
695  list_0trkOmg_obj[i].TrkVertexFitterTool = vkalvrt
696  list_0trkOmg_obj[i].V0VertexFitterTool = v0fitter
697  list_0trkOmg_obj[i].GammaFitterTool = gammafitter
698  list_0trkOmg_obj[i].PVRefitter = pvrefitter
699  list_0trkOmg_obj[i].V0Tools = V0Tools
700  list_0trkOmg_obj[i].TrackToVertexTool = tracktovtxtool
701  list_0trkOmg_obj[i].V0TrackSelectorTool = v0trackselect
702  list_0trkOmg_obj[i].TrackSelectorTool = trackselect
703 
704 
705 
708 
709  list_1trkLd_hypo = ["Zc3900Ld", "BpmLd", "DsLd", "DpmLd"]
710  list_1trkLd_jxInput = ["BPHY25Revtx_Zc3900", "BPHY25Revtx_Bpm", "BPHY25Revtx_Ds", "BPHY25Revtx_Dpm"]
711  list_1trkLd_jxMass = [Zcmass, Bpmmass, Dspmmass, Dpmmass]
712  list_1trkLd_jpsiMass = [Jpsimass, Jpsimass, Phimass, Phimass]
713  list_1trkLd_jxDau3Mass = [Pimass, Kmass, Pimass, Pimass]
714 
715  list_1trkLd_obj = []
716  for hypo in list_1trkLd_hypo:
717  list_1trkLd_obj.append( CompFactory.DerivationFramework.JpsiXPlusDisplaced("BPHY25_"+hypo) )
718 
719  for i in range(len(list_1trkLd_obj)):
720  list_1trkLd_obj[i].JXVertices = list_1trkLd_jxInput[i]
721  list_1trkLd_obj[i].V0Vertices = "LambdaCollection"
722  list_1trkLd_obj[i].RefitV0 = False
723  if i == 0:
724  list_1trkLd_obj[i].CascadeVertexCollections = ["BPHY25_"+list_1trkLd_hypo[i]+"_CascadeVtx1","BPHY25_"+list_1trkLd_hypo[i]+"_CascadeMainVtx"]
725  list_1trkLd_obj[i].HasJXSubVertex = False
726  else:
727  list_1trkLd_obj[i].CascadeVertexCollections = ["BPHY25_"+list_1trkLd_hypo[i]+"_CascadeVtx1","BPHY25_"+list_1trkLd_hypo[i]+"_CascadeVtx2","BPHY25_"+list_1trkLd_hypo[i]+"_CascadeMainVtx"]
728  list_1trkLd_obj[i].HasJXSubVertex = True
729  list_1trkLd_obj[i].VxPrimaryCandidateName = "PrimaryVertices"
730  list_1trkLd_obj[i].V0Hypothesis = "Lambda"
731  list_1trkLd_obj[i].MassCutGamma = 10.
732  list_1trkLd_obj[i].Chi2CutGamma = 5.
733  list_1trkLd_obj[i].LxyV0Cut = 20.
734  list_1trkLd_obj[i].HypothesisName = list_1trkLd_hypo[i]
735  list_1trkLd_obj[i].NumberOfJXDaughters = 3
736  list_1trkLd_obj[i].JXDaug1MassHypo = Mumass
737  list_1trkLd_obj[i].JXDaug2MassHypo = Mumass
738  list_1trkLd_obj[i].JXDaug3MassHypo = list_1trkLd_jxDau3Mass[i]
739  list_1trkLd_obj[i].NumberOfDisVDaughters = 2
740  list_1trkLd_obj[i].JXMass = list_1trkLd_jxMass[i]
741  list_1trkLd_obj[i].JpsiMass = list_1trkLd_jpsiMass[i]
742  list_1trkLd_obj[i].V0Mass = Lambdamass
743  list_1trkLd_obj[i].ApplyJXMassConstraint = True
744  list_1trkLd_obj[i].ApplyJpsiMassConstraint = True
745  list_1trkLd_obj[i].ApplyV0MassConstraint = True
746  list_1trkLd_obj[i].Chi2CutV0 = 10.
747  list_1trkLd_obj[i].Chi2Cut = 8.
748  list_1trkLd_obj[i].Trackd0Cut = 3.
749  list_1trkLd_obj[i].MaxJXCandidates = 10
750  list_1trkLd_obj[i].MaxV0Candidates = 10
751  list_1trkLd_obj[i].RefitPV = True
752  list_1trkLd_obj[i].MaxnPV = 20
753  list_1trkLd_obj[i].RefPVContainerName = "BPHY25_"+list_1trkLd_hypo[i]+"_RefPrimaryVertices"
754  list_1trkLd_obj[i].TrkVertexFitterTool = vkalvrt
755  list_1trkLd_obj[i].V0VertexFitterTool = v0fitter
756  list_1trkLd_obj[i].GammaFitterTool = gammafitter
757  list_1trkLd_obj[i].PVRefitter = pvrefitter
758  list_1trkLd_obj[i].V0Tools = V0Tools
759  list_1trkLd_obj[i].TrackToVertexTool = tracktovtxtool
760  list_1trkLd_obj[i].V0TrackSelectorTool = v0trackselect
761  list_1trkLd_obj[i].TrackSelectorTool = trackselect
762 
763 
766 
767  list_1trkXi_hypo = ["Zc3900Xi", "BpmXi", "DsXi", "DpmXi"]
768  list_1trkXi_jxInput = ["BPHY25Revtx_Zc3900", "BPHY25Revtx_Bpm", "BPHY25Revtx_Ds", "BPHY25Revtx_Dpm"]
769  list_1trkXi_jxMass = [Zcmass, Bpmmass, Dspmmass, Dpmmass]
770  list_1trkXi_jpsiMass = [Jpsimass, Jpsimass, Phimass, Phimass]
771  list_1trkXi_jxDau3Mass = [Pimass, Kmass, Pimass, Pimass]
772 
773  list_1trkXi_obj = []
774  for hypo in list_1trkXi_hypo:
775  list_1trkXi_obj.append( CompFactory.DerivationFramework.JpsiXPlusDisplaced("BPHY25_"+hypo) )
776 
777  for i in range(len(list_1trkXi_obj)):
778  list_1trkXi_obj[i].JXVertices = list_1trkXi_jxInput[i]
779  list_1trkXi_obj[i].V0Vertices = "LambdaCollection"
780  list_1trkXi_obj[i].RefitV0 = False
781  list_1trkXi_obj[i].DisplacedVertices = "XiCollection"
782  if i == 0:
783  list_1trkXi_obj[i].CascadeVertexCollections = ["BPHY25_"+list_1trkXi_hypo[i]+"_CascadeVtx1_sub","BPHY25_"+list_1trkXi_hypo[i]+"_CascadeVtx1","BPHY25_"+list_1trkXi_hypo[i]+"_CascadeMainVtx"]
784  list_1trkXi_obj[i].HasJXSubVertex = False
785  else:
786  list_1trkXi_obj[i].CascadeVertexCollections = ["BPHY25_"+list_1trkXi_hypo[i]+"_CascadeVtx1_sub","BPHY25_"+list_1trkXi_hypo[i]+"_CascadeVtx1","BPHY25_"+list_1trkXi_hypo[i]+"_CascadeVtx2","BPHY25_"+list_1trkXi_hypo[i]+"_CascadeMainVtx"]
787  list_1trkXi_obj[i].HasJXSubVertex = True
788  list_1trkXi_obj[i].VxPrimaryCandidateName = "PrimaryVertices"
789  list_1trkXi_obj[i].V0Hypothesis = "Lambda"
790  list_1trkXi_obj[i].MassCutGamma = 10.
791  list_1trkXi_obj[i].Chi2CutGamma = 5.
792  list_1trkXi_obj[i].LxyV0Cut = 20.
793  list_1trkXi_obj[i].LxyDisVtxCut = 20.
794  list_1trkXi_obj[i].HypothesisName = list_1trkXi_hypo[i]
795  list_1trkXi_obj[i].NumberOfJXDaughters = 3
796  list_1trkXi_obj[i].JXDaug1MassHypo = Mumass
797  list_1trkXi_obj[i].JXDaug2MassHypo = Mumass
798  list_1trkXi_obj[i].JXDaug3MassHypo = list_1trkXi_jxDau3Mass[i]
799  list_1trkXi_obj[i].NumberOfDisVDaughters = 3
800  list_1trkXi_obj[i].DisVDaug3MassHypo = Pimass
801  list_1trkXi_obj[i].JXMass = list_1trkXi_jxMass[i]
802  list_1trkXi_obj[i].JpsiMass = list_1trkXi_jpsiMass[i]
803  list_1trkXi_obj[i].V0Mass = Lambdamass
804  list_1trkXi_obj[i].DisVtxMass = Ximass
805  list_1trkXi_obj[i].ApplyJXMassConstraint = True
806  list_1trkXi_obj[i].ApplyJpsiMassConstraint = True
807  list_1trkXi_obj[i].ApplyV0MassConstraint = True
808  list_1trkXi_obj[i].ApplyDisVMassConstraint = True
809  list_1trkXi_obj[i].Chi2CutV0 = 10.
810  list_1trkXi_obj[i].Chi2Cut = 8.
811  list_1trkXi_obj[i].Trackd0Cut = 3.
812  list_1trkXi_obj[i].MaxJXCandidates = 10
813  list_1trkXi_obj[i].MaxV0Candidates = 10
814  list_1trkXi_obj[i].MaxDisVCandidates = 20
815  list_1trkXi_obj[i].RefitPV = True
816  list_1trkXi_obj[i].MaxnPV = 20
817  list_1trkXi_obj[i].RefPVContainerName = "BPHY25_"+list_1trkXi_hypo[i]+"_RefPrimaryVertices"
818  list_1trkXi_obj[i].TrkVertexFitterTool = vkalvrt
819  list_1trkXi_obj[i].V0VertexFitterTool = v0fitter
820  list_1trkXi_obj[i].GammaFitterTool = gammafitter
821  list_1trkXi_obj[i].PVRefitter = pvrefitter
822  list_1trkXi_obj[i].V0Tools = V0Tools
823  list_1trkXi_obj[i].TrackToVertexTool = tracktovtxtool
824  list_1trkXi_obj[i].V0TrackSelectorTool = v0trackselect
825  list_1trkXi_obj[i].TrackSelectorTool = trackselect
826 
827 
830 
831  list_1trkOmg_hypo = ["Zc3900Omg", "BpmOmg", "DsOmg", "DpmOmg"]
832  list_1trkOmg_jxInput = ["BPHY25Revtx_Zc3900", "BPHY25Revtx_Bpm", "BPHY25Revtx_Ds", "BPHY25Revtx_Dpm"]
833  list_1trkOmg_jxMass = [Zcmass, Bpmmass, Dspmmass, Dpmmass]
834  list_1trkOmg_jpsiMass = [Jpsimass, Jpsimass, Phimass, Phimass]
835  list_1trkOmg_jxDau3Mass = [Pimass, Kmass, Pimass, Pimass]
836 
837  list_1trkOmg_obj = []
838  for hypo in list_1trkOmg_hypo:
839  list_1trkOmg_obj.append( CompFactory.DerivationFramework.JpsiXPlusDisplaced("BPHY25_"+hypo) )
840 
841  for i in range(len(list_1trkOmg_obj)):
842  list_1trkOmg_obj[i].JXVertices = list_1trkOmg_jxInput[i]
843  list_1trkOmg_obj[i].V0Vertices = "LambdaCollection"
844  list_1trkOmg_obj[i].RefitV0 = False
845  list_1trkOmg_obj[i].DisplacedVertices = "OmegaCollection"
846  if i == 0:
847  list_1trkOmg_obj[i].CascadeVertexCollections = ["BPHY25_"+list_1trkOmg_hypo[i]+"_CascadeVtx1_sub","BPHY25_"+list_1trkOmg_hypo[i]+"_CascadeVtx1","BPHY25_"+list_1trkOmg_hypo[i]+"_CascadeMainVtx"]
848  list_1trkOmg_obj[i].HasJXSubVertex = False
849  else:
850  list_1trkOmg_obj[i].CascadeVertexCollections = ["BPHY25_"+list_1trkOmg_hypo[i]+"_CascadeVtx1_sub","BPHY25_"+list_1trkOmg_hypo[i]+"_CascadeVtx1","BPHY25_"+list_1trkOmg_hypo[i]+"_CascadeVtx2","BPHY25_"+list_1trkOmg_hypo[i]+"_CascadeMainVtx"]
851  list_1trkOmg_obj[i].HasJXSubVertex = True
852  list_1trkOmg_obj[i].VxPrimaryCandidateName = "PrimaryVertices"
853  list_1trkOmg_obj[i].V0Hypothesis = "Lambda"
854  list_1trkOmg_obj[i].MassCutGamma = 10.
855  list_1trkOmg_obj[i].Chi2CutGamma = 5.
856  list_1trkOmg_obj[i].LxyV0Cut = 20.
857  list_1trkOmg_obj[i].LxyDisVtxCut = 20.
858  list_1trkOmg_obj[i].HypothesisName = list_1trkOmg_hypo[i]
859  list_1trkOmg_obj[i].NumberOfJXDaughters = 3
860  list_1trkOmg_obj[i].JXDaug1MassHypo = Mumass
861  list_1trkOmg_obj[i].JXDaug2MassHypo = Mumass
862  list_1trkOmg_obj[i].JXDaug3MassHypo = list_1trkOmg_jxDau3Mass[i]
863  list_1trkOmg_obj[i].NumberOfDisVDaughters = 3
864  list_1trkOmg_obj[i].DisVDaug3MassHypo = Kmass
865  list_1trkOmg_obj[i].JXMass = list_1trkOmg_jxMass[i]
866  list_1trkOmg_obj[i].JpsiMass = list_1trkOmg_jpsiMass[i]
867  list_1trkOmg_obj[i].V0Mass = Lambdamass
868  list_1trkOmg_obj[i].DisVtxMass = Omegamass
869  list_1trkOmg_obj[i].ApplyJXMassConstraint = True
870  list_1trkOmg_obj[i].ApplyJpsiMassConstraint = True
871  list_1trkOmg_obj[i].ApplyV0MassConstraint = True
872  list_1trkOmg_obj[i].ApplyDisVMassConstraint = True
873  list_1trkOmg_obj[i].Chi2CutV0 = 10.
874  list_1trkOmg_obj[i].Chi2Cut = 8.
875  list_1trkOmg_obj[i].Trackd0Cut = 3.
876  list_1trkOmg_obj[i].MaxJXCandidates = 10
877  list_1trkOmg_obj[i].MaxV0Candidates = 10
878  list_1trkOmg_obj[i].MaxDisVCandidates = 20
879  list_1trkOmg_obj[i].RefitPV = True
880  list_1trkOmg_obj[i].MaxnPV = 20
881  list_1trkOmg_obj[i].RefPVContainerName = "BPHY25_"+list_1trkOmg_hypo[i]+"_RefPrimaryVertices"
882  list_1trkOmg_obj[i].TrkVertexFitterTool = vkalvrt
883  list_1trkOmg_obj[i].V0VertexFitterTool = v0fitter
884  list_1trkOmg_obj[i].GammaFitterTool = gammafitter
885  list_1trkOmg_obj[i].PVRefitter = pvrefitter
886  list_1trkOmg_obj[i].V0Tools = V0Tools
887  list_1trkOmg_obj[i].TrackToVertexTool = tracktovtxtool
888  list_1trkOmg_obj[i].V0TrackSelectorTool = v0trackselect
889  list_1trkOmg_obj[i].TrackSelectorTool = trackselect
890 
891 
892 
895 
896  list_2trkLd_hypo = ["X3872Ld", "Bs2KLd", "B0KpiLd", "B0piKLd"]
897  list_2trkLd_jxInput = ["BPHY25Revtx_X3872", "BPHY25Revtx_Bs0", "BPHY25Revtx_B0Kpi", "BPHY25Revtx_B0piK"]
898  list_2trkLd_jxMass = [X3872mass, Bs0mass, B0mass, B0mass]
899  list_2trkLd_jpsiMass = [Jpsimass, Jpsimass, Jpsimass, Jpsimass]
900  list_2trkLd_jxDau3Mass = [Pimass, Kmass, Kmass, Pimass]
901  list_2trkLd_jxDau4Mass = [Pimass, Kmass, Pimass, Kmass]
902 
903  list_2trkLd_obj = []
904  for hypo in list_2trkLd_hypo:
905  list_2trkLd_obj.append( CompFactory.DerivationFramework.JpsiXPlusDisplaced("BPHY25_"+hypo) )
906 
907  for i in range(len(list_2trkLd_obj)):
908  list_2trkLd_obj[i].JXVertices = list_2trkLd_jxInput[i]
909  list_2trkLd_obj[i].V0Vertices = "LambdaCollection"
910  list_2trkLd_obj[i].RefitV0 = False
911  if i == 0:
912  list_2trkLd_obj[i].CascadeVertexCollections = ["BPHY25_"+list_2trkLd_hypo[i]+"_CascadeVtx1","BPHY25_"+list_2trkLd_hypo[i]+"_CascadeMainVtx"]
913  list_2trkLd_obj[i].HasJXSubVertex = False
914  else:
915  list_2trkLd_obj[i].CascadeVertexCollections = ["BPHY25_"+list_2trkLd_hypo[i]+"_CascadeVtx1","BPHY25_"+list_2trkLd_hypo[i]+"_CascadeVtx2","BPHY25_"+list_2trkLd_hypo[i]+"_CascadeMainVtx"]
916  list_2trkLd_obj[i].HasJXSubVertex = True
917  list_2trkLd_obj[i].VxPrimaryCandidateName = "PrimaryVertices"
918  list_2trkLd_obj[i].V0Hypothesis = "Lambda"
919  list_2trkLd_obj[i].MassCutGamma = 10.
920  list_2trkLd_obj[i].Chi2CutGamma = 5.
921  list_2trkLd_obj[i].LxyV0Cut = 25.
922  list_2trkLd_obj[i].HypothesisName = list_2trkLd_hypo[i]
923  list_2trkLd_obj[i].NumberOfJXDaughters = 4
924  list_2trkLd_obj[i].JXDaug1MassHypo = Mumass
925  list_2trkLd_obj[i].JXDaug2MassHypo = Mumass
926  list_2trkLd_obj[i].JXDaug3MassHypo = list_2trkLd_jxDau3Mass[i]
927  list_2trkLd_obj[i].JXDaug4MassHypo = list_2trkLd_jxDau4Mass[i]
928  list_2trkLd_obj[i].NumberOfDisVDaughters = 2
929  list_2trkLd_obj[i].JXMass = list_2trkLd_jxMass[i]
930  list_2trkLd_obj[i].JpsiMass = list_2trkLd_jpsiMass[i]
931  list_2trkLd_obj[i].V0Mass = Lambdamass
932  list_2trkLd_obj[i].ApplyJXMassConstraint = True
933  list_2trkLd_obj[i].ApplyJpsiMassConstraint = True
934  list_2trkLd_obj[i].ApplyV0MassConstraint = True
935  list_2trkLd_obj[i].Chi2CutV0 = 10.
936  list_2trkLd_obj[i].Chi2Cut = 8.
937  list_2trkLd_obj[i].Trackd0Cut = 3.
938  list_2trkLd_obj[i].MaxJXCandidates = 10
939  list_2trkLd_obj[i].MaxV0Candidates = 10
940  list_2trkLd_obj[i].RefitPV = True
941  list_2trkLd_obj[i].MaxnPV = 20
942  list_2trkLd_obj[i].RefPVContainerName = "BPHY25_"+list_2trkLd_hypo[i]+"_RefPrimaryVertices"
943  list_2trkLd_obj[i].TrkVertexFitterTool = vkalvrt
944  list_2trkLd_obj[i].V0VertexFitterTool = v0fitter
945  list_2trkLd_obj[i].GammaFitterTool = gammafitter
946  list_2trkLd_obj[i].PVRefitter = pvrefitter
947  list_2trkLd_obj[i].V0Tools = V0Tools
948  list_2trkLd_obj[i].TrackToVertexTool = tracktovtxtool
949  list_2trkLd_obj[i].V0TrackSelectorTool = v0trackselect
950  list_2trkLd_obj[i].TrackSelectorTool = trackselect
951 
952 
955 
956  list_2trkXi_hypo = ["Bs2KXi", "B0KpiXi", "B0piKXi"]
957  list_2trkXi_jxInput = ["BPHY25Revtx_Bs0", "BPHY25Revtx_B0Kpi", "BPHY25Revtx_B0piK"]
958  list_2trkXi_jxMass = [Bs0mass, B0mass, B0mass]
959  list_2trkXi_jpsiMass = [Jpsimass, Jpsimass, Jpsimass]
960  list_2trkXi_jxDau3Mass = [Kmass, Kmass, Pimass]
961  list_2trkXi_jxDau4Mass = [Kmass, Pimass, Kmass]
962 
963  list_2trkXi_obj = []
964  for hypo in list_2trkXi_hypo:
965  list_2trkXi_obj.append( CompFactory.DerivationFramework.JpsiXPlusDisplaced("BPHY25_"+hypo) )
966 
967  for i in range(len(list_2trkXi_obj)):
968  list_2trkXi_obj[i].JXVertices = list_2trkXi_jxInput[i]
969  list_2trkXi_obj[i].V0Vertices = "LambdaCollection"
970  list_2trkXi_obj[i].RefitV0 = False
971  list_2trkXi_obj[i].DisplacedVertices = "XiCollection"
972  list_2trkXi_obj[i].CascadeVertexCollections = ["BPHY25_"+list_2trkXi_hypo[i]+"_CascadeVtx1_sub","BPHY25_"+list_2trkXi_hypo[i]+"_CascadeVtx1","BPHY25_"+list_2trkXi_hypo[i]+"_CascadeVtx2","BPHY25_"+list_2trkXi_hypo[i]+"_CascadeMainVtx"]
973  list_2trkXi_obj[i].HasJXSubVertex = True
974  list_2trkXi_obj[i].VxPrimaryCandidateName = "PrimaryVertices"
975  list_2trkXi_obj[i].V0Hypothesis = "Lambda"
976  list_2trkXi_obj[i].MassCutGamma = 10.
977  list_2trkXi_obj[i].Chi2CutGamma = 5.
978  list_2trkXi_obj[i].LxyV0Cut = 20.
979  list_2trkXi_obj[i].LxyDisVtxCut = 20.
980  list_2trkXi_obj[i].HypothesisName = list_2trkXi_hypo[i]
981  list_2trkXi_obj[i].NumberOfJXDaughters = 4
982  list_2trkXi_obj[i].JXDaug1MassHypo = Mumass
983  list_2trkXi_obj[i].JXDaug2MassHypo = Mumass
984  list_2trkXi_obj[i].JXDaug3MassHypo = list_2trkXi_jxDau3Mass[i]
985  list_2trkXi_obj[i].JXDaug4MassHypo = list_2trkXi_jxDau4Mass[i]
986  list_2trkXi_obj[i].NumberOfDisVDaughters = 3
987  list_2trkXi_obj[i].DisVDaug3MassHypo = Pimass
988  list_2trkXi_obj[i].JXMass = list_2trkXi_jxMass[i]
989  list_2trkXi_obj[i].JpsiMass = list_2trkXi_jpsiMass[i]
990  list_2trkXi_obj[i].V0Mass = Lambdamass
991  list_2trkXi_obj[i].DisVtxMass = Ximass
992  list_2trkXi_obj[i].ApplyJXMassConstraint = True
993  list_2trkXi_obj[i].ApplyJpsiMassConstraint = True
994  list_2trkXi_obj[i].ApplyV0MassConstraint = True
995  list_2trkXi_obj[i].ApplyDisVMassConstraint = True
996  list_2trkXi_obj[i].Chi2CutV0 = 10.
997  list_2trkXi_obj[i].Chi2Cut = 8.
998  list_2trkXi_obj[i].Trackd0Cut = 3.
999  list_2trkXi_obj[i].MaxJXCandidates = 10
1000  list_2trkXi_obj[i].MaxV0Candidates = 10
1001  list_2trkXi_obj[i].MaxDisVCandidates = 20
1002  list_2trkXi_obj[i].RefitPV = True
1003  list_2trkXi_obj[i].MaxnPV = 20
1004  list_2trkXi_obj[i].RefPVContainerName = "BPHY25_"+list_2trkXi_hypo[i]+"_RefPrimaryVertices"
1005  list_2trkXi_obj[i].TrkVertexFitterTool = vkalvrt
1006  list_2trkXi_obj[i].V0VertexFitterTool = v0fitter
1007  list_2trkXi_obj[i].GammaFitterTool = gammafitter
1008  list_2trkXi_obj[i].PVRefitter = pvrefitter
1009  list_2trkXi_obj[i].V0Tools = V0Tools
1010  list_2trkXi_obj[i].TrackToVertexTool = tracktovtxtool
1011  list_2trkXi_obj[i].V0TrackSelectorTool = v0trackselect
1012  list_2trkXi_obj[i].TrackSelectorTool = trackselect
1013 
1014 
1017 
1018  list_2trkOmg_hypo = ["Bs2KOmg", "B0KpiOmg", "B0piKOmg"]
1019  list_2trkOmg_jxInput = ["BPHY25Revtx_Bs0", "BPHY25Revtx_B0Kpi", "BPHY25Revtx_B0piK"]
1020  list_2trkOmg_jxMass = [Bs0mass, B0mass, B0mass]
1021  list_2trkOmg_jpsiMass = [Jpsimass, Jpsimass, Jpsimass]
1022  list_2trkOmg_jxDau3Mass = [Kmass, Kmass, Pimass]
1023  list_2trkOmg_jxDau4Mass = [Kmass, Pimass, Kmass]
1024 
1025  list_2trkOmg_obj = []
1026  for hypo in list_2trkOmg_hypo:
1027  list_2trkOmg_obj.append( CompFactory.DerivationFramework.JpsiXPlusDisplaced("BPHY25_"+hypo) )
1028 
1029  for i in range(len(list_2trkOmg_obj)):
1030  list_2trkOmg_obj[i].JXVertices = list_2trkOmg_jxInput[i]
1031  list_2trkOmg_obj[i].V0Vertices = "LambdaCollection"
1032  list_2trkOmg_obj[i].RefitV0 = False
1033  list_2trkOmg_obj[i].DisplacedVertices = "OmegaCollection"
1034  list_2trkOmg_obj[i].CascadeVertexCollections = ["BPHY25_"+list_2trkOmg_hypo[i]+"_CascadeVtx1_sub","BPHY25_"+list_2trkOmg_hypo[i]+"_CascadeVtx1","BPHY25_"+list_2trkOmg_hypo[i]+"_CascadeVtx2","BPHY25_"+list_2trkOmg_hypo[i]+"_CascadeMainVtx"]
1035  list_2trkOmg_obj[i].HasJXSubVertex = True
1036  list_2trkOmg_obj[i].VxPrimaryCandidateName = "PrimaryVertices"
1037  list_2trkOmg_obj[i].V0Hypothesis = "Lambda"
1038  list_2trkOmg_obj[i].MassCutGamma = 10.
1039  list_2trkOmg_obj[i].Chi2CutGamma = 5.
1040  list_2trkOmg_obj[i].LxyV0Cut = 20.
1041  list_2trkOmg_obj[i].LxyDisVtxCut = 20.
1042  list_2trkOmg_obj[i].HypothesisName = list_2trkOmg_hypo[i]
1043  list_2trkOmg_obj[i].NumberOfJXDaughters = 4
1044  list_2trkOmg_obj[i].JXDaug1MassHypo = Mumass
1045  list_2trkOmg_obj[i].JXDaug2MassHypo = Mumass
1046  list_2trkOmg_obj[i].JXDaug3MassHypo = list_2trkOmg_jxDau3Mass[i]
1047  list_2trkOmg_obj[i].JXDaug4MassHypo = list_2trkOmg_jxDau4Mass[i]
1048  list_2trkOmg_obj[i].NumberOfDisVDaughters = 3
1049  list_2trkOmg_obj[i].DisVDaug3MassHypo = Kmass
1050  list_2trkOmg_obj[i].JXMass = list_2trkOmg_jxMass[i]
1051  list_2trkOmg_obj[i].JpsiMass = list_2trkOmg_jpsiMass[i]
1052  list_2trkOmg_obj[i].V0Mass = Lambdamass
1053  list_2trkOmg_obj[i].DisVtxMass = Omegamass
1054  list_2trkOmg_obj[i].ApplyJXMassConstraint = True
1055  list_2trkOmg_obj[i].ApplyJpsiMassConstraint = True
1056  list_2trkOmg_obj[i].ApplyV0MassConstraint = True
1057  list_2trkOmg_obj[i].ApplyDisVMassConstraint = True
1058  list_2trkOmg_obj[i].Chi2CutV0 = 10.
1059  list_2trkOmg_obj[i].Chi2Cut = 8.
1060  list_2trkOmg_obj[i].Trackd0Cut = 3.
1061  list_2trkOmg_obj[i].MaxJXCandidates = 10
1062  list_2trkOmg_obj[i].MaxV0Candidates = 10
1063  list_2trkOmg_obj[i].MaxDisVCandidates = 20
1064  list_2trkOmg_obj[i].RefitPV = True
1065  list_2trkOmg_obj[i].MaxnPV = 20
1066  list_2trkOmg_obj[i].RefPVContainerName = "BPHY25_"+list_2trkOmg_hypo[i]+"_RefPrimaryVertices"
1067  list_2trkOmg_obj[i].TrkVertexFitterTool = vkalvrt
1068  list_2trkOmg_obj[i].V0VertexFitterTool = v0fitter
1069  list_2trkOmg_obj[i].GammaFitterTool = gammafitter
1070  list_2trkOmg_obj[i].PVRefitter = pvrefitter
1071  list_2trkOmg_obj[i].V0Tools = V0Tools
1072  list_2trkOmg_obj[i].TrackToVertexTool = tracktovtxtool
1073  list_2trkOmg_obj[i].V0TrackSelectorTool = v0trackselect
1074  list_2trkOmg_obj[i].TrackSelectorTool = trackselect
1075 
1076 
1077 
1080 
1081  list_3body_obj = []
1082 
1083  list_3body_obj.append( CompFactory.DerivationFramework.JpsiXPlusDisplaced("BPHY25_Bpm_3body") )
1084  list_3body_obj[0].JXVertices = "BPHY25OniaCandidates"
1085  list_3body_obj[0].JXVtxHypoNames = ["Jpsi"]
1086  list_3body_obj[0].V0Vertices = "LambdaCollection"
1087  list_3body_obj[0].RefitV0 = False
1088  list_3body_obj[0].CascadeVertexCollections = ["BPHY25_Bpm_3body_CascadeVtx1","BPHY25_Bpm_3body_CascadeMainVtx"]
1089  list_3body_obj[0].HasJXSubVertex = False
1090  list_3body_obj[0].VxPrimaryCandidateName = "PrimaryVertices"
1091  list_3body_obj[0].V0Hypothesis = "Lambda"
1092  list_3body_obj[0].MassCutGamma = 10.
1093  list_3body_obj[0].Chi2CutGamma = 5.
1094  list_3body_obj[0].LxyV0Cut = 20.
1095  list_3body_obj[0].HypothesisName = "Bpm_3body"
1096  list_3body_obj[0].NumberOfJXDaughters = 2
1097  list_3body_obj[0].JXDaug1MassHypo = Mumass
1098  list_3body_obj[0].JXDaug2MassHypo = Mumass
1099  list_3body_obj[0].NumberOfDisVDaughters = 2
1100  list_3body_obj[0].ExtraTrackMassHypo = Protonmass
1101  list_3body_obj[0].ExtraTrackMinPt = 500.
1102  list_3body_obj[0].MassLowerCut = B_lo
1103  list_3body_obj[0].MassUpperCut = B_hi
1104  list_3body_obj[0].JpsiMass = Jpsimass
1105  list_3body_obj[0].V0Mass = Lambdamass
1106  list_3body_obj[0].MainVtxMass = Bpmmass
1107  list_3body_obj[0].ApplyJpsiMassConstraint = True
1108  list_3body_obj[0].ApplyV0MassConstraint = True
1109  list_3body_obj[0].ApplyMainVMassConstraint = True
1110  list_3body_obj[0].Chi2CutV0 = 10.
1111  list_3body_obj[0].Chi2Cut = 8.
1112  list_3body_obj[0].Trackd0Cut = 3.
1113  list_3body_obj[0].MaxJXCandidates = 10
1114  list_3body_obj[0].MaxV0Candidates = 10
1115  list_3body_obj[0].MaxMainVCandidates = 20
1116  list_3body_obj[0].RefitPV = True
1117  list_3body_obj[0].MaxnPV = 20
1118  list_3body_obj[0].RefPVContainerName = "BPHY25_Bpm_3body_RefPrimaryVertices"
1119  list_3body_obj[0].TrkVertexFitterTool = vkalvrt
1120  list_3body_obj[0].V0VertexFitterTool = v0fitter
1121  list_3body_obj[0].GammaFitterTool = gammafitter
1122  list_3body_obj[0].PVRefitter = pvrefitter
1123  list_3body_obj[0].V0Tools = V0Tools
1124  list_3body_obj[0].TrackToVertexTool = tracktovtxtool
1125  list_3body_obj[0].V0TrackSelectorTool = v0trackselect
1126  list_3body_obj[0].TrackSelectorTool = trackselect
1127 
1128 
1131 
1132  list_3body_obj.append( CompFactory.DerivationFramework.JpsiXPlusDisplaced("BPHY25_Xib_3body") )
1133  list_3body_obj[1].JXVertices = "BPHY25OniaCandidates"
1134  list_3body_obj[1].JXVtxHypoNames = ["Jpsi"]
1135  list_3body_obj[1].V0Vertices = "LambdaCollection"
1136  list_3body_obj[1].RefitV0 = False
1137  list_3body_obj[1].CascadeVertexCollections = ["BPHY25_Xib_3body_CascadeVtx1","BPHY25_Xib_3body_CascadeMainVtx"]
1138  list_3body_obj[1].HasJXSubVertex = False
1139  list_3body_obj[1].VxPrimaryCandidateName = "PrimaryVertices"
1140  list_3body_obj[1].V0Hypothesis = "Lambda"
1141  list_3body_obj[1].MassCutGamma = 10.
1142  list_3body_obj[1].Chi2CutGamma = 5.
1143  list_3body_obj[1].LxyV0Cut = 20.
1144  list_3body_obj[1].HypothesisName = "Xib_3body"
1145  list_3body_obj[1].NumberOfJXDaughters = 2
1146  list_3body_obj[1].JXDaug1MassHypo = Mumass
1147  list_3body_obj[1].JXDaug2MassHypo = Mumass
1148  list_3body_obj[1].NumberOfDisVDaughters = 2
1149  list_3body_obj[1].ExtraTrackMassHypo = Kmass
1150  list_3body_obj[1].ExtraTrackMinPt = 500.
1151  list_3body_obj[1].MassLowerCut = Xib_lo
1152  list_3body_obj[1].MassUpperCut = Xib_hi
1153  list_3body_obj[1].JpsiMass = Jpsimass
1154  list_3body_obj[1].V0Mass = Lambdamass
1155  list_3body_obj[1].MainVtxMass = Xibmass
1156  list_3body_obj[1].ApplyJpsiMassConstraint = True
1157  list_3body_obj[1].ApplyV0MassConstraint = True
1158  list_3body_obj[1].ApplyMainVMassConstraint = True
1159  list_3body_obj[1].Chi2CutV0 = 10.
1160  list_3body_obj[1].Chi2Cut = 8.
1161  list_3body_obj[1].Trackd0Cut = 3.
1162  list_3body_obj[1].MaxJXCandidates = 10
1163  list_3body_obj[1].MaxV0Candidates = 10
1164  list_3body_obj[1].MaxMainVCandidates = 20
1165  list_3body_obj[1].RefitPV = True
1166  list_3body_obj[1].MaxnPV = 20
1167  list_3body_obj[1].RefPVContainerName = "BPHY25_Xib_3body_RefPrimaryVertices"
1168  list_3body_obj[1].TrkVertexFitterTool = vkalvrt
1169  list_3body_obj[1].V0VertexFitterTool = v0fitter
1170  list_3body_obj[1].GammaFitterTool = gammafitter
1171  list_3body_obj[1].PVRefitter = pvrefitter
1172  list_3body_obj[1].V0Tools = V0Tools
1173  list_3body_obj[1].TrackToVertexTool = tracktovtxtool
1174  list_3body_obj[1].V0TrackSelectorTool = v0trackselect
1175  list_3body_obj[1].TrackSelectorTool = trackselect
1176 
1177 
1180 
1181  list_3body_obj.append( CompFactory.DerivationFramework.JpsiXPlusDisplaced("BPHY25_Sigmabp_3body") )
1182  list_3body_obj[2].JXVertices = "BPHY25OniaCandidates"
1183  list_3body_obj[2].JXVtxHypoNames = ["Jpsi"]
1184  list_3body_obj[2].V0Vertices = "LambdaCollection"
1185  list_3body_obj[2].RefitV0 = False
1186  list_3body_obj[2].CascadeVertexCollections = ["BPHY25_Sigmabp_3body_CascadeVtx1","BPHY25_Sigmabp_3body_CascadeMainVtx"]
1187  list_3body_obj[2].HasJXSubVertex = False
1188  list_3body_obj[2].VxPrimaryCandidateName = "PrimaryVertices"
1189  list_3body_obj[2].V0Hypothesis = "Lambda"
1190  list_3body_obj[2].MassCutGamma = 10.
1191  list_3body_obj[2].Chi2CutGamma = 5.
1192  list_3body_obj[2].LxyV0Cut = 20.
1193  list_3body_obj[2].HypothesisName = "Sigmabp_3body"
1194  list_3body_obj[2].NumberOfJXDaughters = 2
1195  list_3body_obj[2].JXDaug1MassHypo = Mumass
1196  list_3body_obj[2].JXDaug2MassHypo = Mumass
1197  list_3body_obj[2].NumberOfDisVDaughters = 2
1198  list_3body_obj[2].ExtraTrackMassHypo = Pimass
1199  list_3body_obj[2].ExtraTrackMinPt = 500.
1200  list_3body_obj[2].MassLowerCut = Sigmabp_lo
1201  list_3body_obj[2].MassUpperCut = Sigmabp_hi
1202  list_3body_obj[2].JpsiMass = Jpsimass
1203  list_3body_obj[2].V0Mass = Lambdamass
1204  list_3body_obj[2].MainVtxMass = Sigmabpmass
1205  list_3body_obj[2].ApplyJpsiMassConstraint = True
1206  list_3body_obj[2].ApplyV0MassConstraint = True
1207  list_3body_obj[2].ApplyMainVMassConstraint = True
1208  list_3body_obj[2].Chi2CutV0 = 10.
1209  list_3body_obj[2].Chi2Cut = 8.
1210  list_3body_obj[2].Trackd0Cut = 3.
1211  list_3body_obj[2].MaxJXCandidates = 10
1212  list_3body_obj[2].MaxV0Candidates = 10
1213  list_3body_obj[2].MaxMainVCandidates = 20
1214  list_3body_obj[2].RefitPV = True
1215  list_3body_obj[2].MaxnPV = 20
1216  list_3body_obj[2].RefPVContainerName = "BPHY25_Sigmabp_3body_RefPrimaryVertices"
1217  list_3body_obj[2].TrkVertexFitterTool = vkalvrt
1218  list_3body_obj[2].V0VertexFitterTool = v0fitter
1219  list_3body_obj[2].GammaFitterTool = gammafitter
1220  list_3body_obj[2].PVRefitter = pvrefitter
1221  list_3body_obj[2].V0Tools = V0Tools
1222  list_3body_obj[2].TrackToVertexTool = tracktovtxtool
1223  list_3body_obj[2].V0TrackSelectorTool = v0trackselect
1224  list_3body_obj[2].TrackSelectorTool = trackselect
1225 
1226 
1229 
1230  list_3body_obj.append( CompFactory.DerivationFramework.JpsiXPlusDisplaced("BPHY25_Sigmabm_3body") )
1231  list_3body_obj[3].JXVertices = "BPHY25OniaCandidates"
1232  list_3body_obj[3].JXVtxHypoNames = ["Jpsi"]
1233  list_3body_obj[3].V0Vertices = "LambdaCollection"
1234  list_3body_obj[3].RefitV0 = False
1235  list_3body_obj[3].CascadeVertexCollections = ["BPHY25_Sigmabm_3body_CascadeVtx1","BPHY25_Sigmabm_3body_CascadeMainVtx"]
1236  list_3body_obj[3].HasJXSubVertex = False
1237  list_3body_obj[3].VxPrimaryCandidateName = "PrimaryVertices"
1238  list_3body_obj[3].V0Hypothesis = "Lambda"
1239  list_3body_obj[3].MassCutGamma = 10.
1240  list_3body_obj[3].Chi2CutGamma = 5.
1241  list_3body_obj[3].LxyV0Cut = 20.
1242  list_3body_obj[3].HypothesisName = "Sigmabm_3body"
1243  list_3body_obj[3].NumberOfJXDaughters = 2
1244  list_3body_obj[3].JXDaug1MassHypo = Mumass
1245  list_3body_obj[3].JXDaug2MassHypo = Mumass
1246  list_3body_obj[3].NumberOfDisVDaughters = 2
1247  list_3body_obj[3].ExtraTrackMassHypo = Pimass
1248  list_3body_obj[3].ExtraTrackMinPt = 500.
1249  list_3body_obj[3].MassLowerCut = Sigmabm_lo
1250  list_3body_obj[3].MassUpperCut = Sigmabm_hi
1251  list_3body_obj[3].JpsiMass = Jpsimass
1252  list_3body_obj[3].V0Mass = Lambdamass
1253  list_3body_obj[3].MainVtxMass = Sigmabmmass
1254  list_3body_obj[3].ApplyJpsiMassConstraint = True
1255  list_3body_obj[3].ApplyV0MassConstraint = True
1256  list_3body_obj[3].ApplyMainVMassConstraint = True
1257  list_3body_obj[3].Chi2CutV0 = 10.
1258  list_3body_obj[3].Chi2Cut = 8.
1259  list_3body_obj[3].Trackd0Cut = 3.
1260  list_3body_obj[3].MaxJXCandidates = 10
1261  list_3body_obj[3].MaxV0Candidates = 10
1262  list_3body_obj[3].MaxMainVCandidates = 20
1263  list_3body_obj[3].RefitPV = True
1264  list_3body_obj[3].MaxnPV = 20
1265  list_3body_obj[3].RefPVContainerName = "BPHY25_Sigmabm_3body_RefPrimaryVertices"
1266  list_3body_obj[3].TrkVertexFitterTool = vkalvrt
1267  list_3body_obj[3].V0VertexFitterTool = v0fitter
1268  list_3body_obj[3].GammaFitterTool = gammafitter
1269  list_3body_obj[3].PVRefitter = pvrefitter
1270  list_3body_obj[3].V0Tools = V0Tools
1271  list_3body_obj[3].TrackToVertexTool = tracktovtxtool
1272  list_3body_obj[3].V0TrackSelectorTool = v0trackselect
1273  list_3body_obj[3].TrackSelectorTool = trackselect
1274 
1275  list_1V0_obj = list_0trkLd_obj + list_0trkXi_obj + list_0trkOmg_obj + list_1trkLd_obj + list_1trkXi_obj + list_1trkOmg_obj + list_2trkLd_obj + list_2trkXi_obj + list_2trkOmg_obj + list_3body_obj
1276 
1277 
1278 
1281 
1282  list_2V0_obj = []
1283 
1284  list_2V0_obj.append( CompFactory.DerivationFramework.JpsiXPlus2V0("BPHY25_Bs0_2V0") )
1285  list_2V0_obj[0].JXVertices = "BPHY25OniaCandidates"
1286  list_2V0_obj[0].JXVtxHypoNames = ["Jpsi"]
1287  list_2V0_obj[0].V0Containers = ["LambdaCollection"]
1288  list_2V0_obj[0].RefitV0 = False
1289  list_2V0_obj[0].CascadeVertexCollections = ["BPHY25_Bs0_2V0_CascadeVtx1","BPHY25_Bs0_2V0_CascadeVtx2","BPHY25_Bs0_2V0_CascadeMainVtx"]
1290  list_2V0_obj[0].HasJXSubVertex = False
1291  list_2V0_obj[0].HasJXV02SubVertex = False
1292  list_2V0_obj[0].VxPrimaryCandidateName = "PrimaryVertices"
1293  list_2V0_obj[0].V01Hypothesis = "Lambda"
1294  list_2V0_obj[0].LxyV01Cut = 20.
1295  list_2V0_obj[0].V02Hypothesis = "Lambda"
1296  list_2V0_obj[0].LxyV02Cut = 20.
1297  list_2V0_obj[0].MassCutGamma = 10.
1298  list_2V0_obj[0].Chi2CutGamma = 5.
1299  list_2V0_obj[0].HypothesisName = "Bs0_2V0"
1300  list_2V0_obj[0].NumberOfJXDaughters = 2
1301  list_2V0_obj[0].JXDaug1MassHypo = Mumass
1302  list_2V0_obj[0].JXDaug2MassHypo = Mumass
1303  list_2V0_obj[0].MassLowerCut = Bs0_lo
1304  list_2V0_obj[0].MassUpperCut = Bs0_hi
1305  list_2V0_obj[0].JpsiMass = Jpsimass
1306  list_2V0_obj[0].MainVtxMass = Bs0mass
1307  list_2V0_obj[0].ApplyJpsiMassConstraint = True
1308  list_2V0_obj[0].ApplyV01MassConstraint = True
1309  list_2V0_obj[0].ApplyV02MassConstraint = True
1310  list_2V0_obj[0].ApplyMainVMassConstraint = True
1311  list_2V0_obj[0].Chi2CutV0 = 10.
1312  list_2V0_obj[0].Chi2Cut = 8.
1313  list_2V0_obj[0].MaxJXCandidates = 10
1314  list_2V0_obj[0].MaxV0Candidates = 10
1315  list_2V0_obj[0].MaxMainVCandidates = 20
1316  list_2V0_obj[0].RefitPV = True
1317  list_2V0_obj[0].MaxnPV = 20
1318  list_2V0_obj[0].RefPVContainerName = "BPHY25_Bs0_2V0_RefPrimaryVertices"
1319  list_2V0_obj[0].TrkVertexFitterTool = vkalvrt
1320  list_2V0_obj[0].V0VertexFitterTool = v0fitter
1321  list_2V0_obj[0].GammaFitterTool = gammafitter
1322  list_2V0_obj[0].PVRefitter = pvrefitter
1323  list_2V0_obj[0].V0Tools = V0Tools
1324 
1325 
1328 
1329  list_2V0_obj.append( CompFactory.DerivationFramework.JpsiXPlus2V0("BPHY25_Xibc_2V0") )
1330  list_2V0_obj[1].JXVertices = "BPHY25OniaCandidates"
1331  list_2V0_obj[1].JXVtxHypoNames = ["Jpsi"]
1332  list_2V0_obj[1].V0Containers = ["BPHY25V0Candidates"]
1333  list_2V0_obj[1].RefitV0 = True
1334  list_2V0_obj[1].ApplyV0MassConstraint = True
1335  list_2V0_obj[1].DoV0Enumeration = True
1336  list_2V0_obj[1].DecorateV0Momentum = True
1337  list_2V0_obj[1].CascadeVertexCollections = ["BPHY25_Xibc_2V0_CascadeVtx1","BPHY25_Xibc_2V0_CascadeVtx2","BPHY25_Xibc_2V0_CascadeVtx3","BPHY25_Xibc_2V0_CascadeMainVtx"]
1338  list_2V0_obj[1].HasJXSubVertex = True
1339  list_2V0_obj[1].HasJXV02SubVertex = True
1340  list_2V0_obj[1].VxPrimaryCandidateName = "PrimaryVertices"
1341  list_2V0_obj[1].V01Hypothesis = "Ks"
1342  list_2V0_obj[1].V01MassLowerCut = Ks_lo
1343  list_2V0_obj[1].V01MassUpperCut = Ks_hi
1344  list_2V0_obj[1].LxyV01Cut = 20.
1345  list_2V0_obj[1].V02Hypothesis = "Lambda"
1346  list_2V0_obj[1].V02MassLowerCut = Ld_lo
1347  list_2V0_obj[1].V02MassUpperCut = Ld_hi
1348  list_2V0_obj[1].LxyV02Cut = 20.
1349  list_2V0_obj[1].MassCutGamma = 10.
1350  list_2V0_obj[1].Chi2CutGamma = 5.
1351  list_2V0_obj[1].HypothesisName = "Xibc_2V0"
1352  list_2V0_obj[1].NumberOfJXDaughters = 2
1353  list_2V0_obj[1].JXDaug1MassHypo = Mumass
1354  list_2V0_obj[1].JXDaug2MassHypo = Mumass
1355  list_2V0_obj[1].JpsiMass = Jpsimass
1356  list_2V0_obj[1].JXV02VtxMass = Lambdab0mass
1357  list_2V0_obj[1].ApplyJpsiMassConstraint = True
1358  list_2V0_obj[1].ApplyV01MassConstraint = True
1359  list_2V0_obj[1].ApplyV02MassConstraint = True
1360  list_2V0_obj[1].ApplyJXV02MassConstraint = True
1361  list_2V0_obj[1].Chi2CutV0 = 10.
1362  list_2V0_obj[1].Chi2Cut = 8.
1363  list_2V0_obj[1].MaxJXCandidates = 10
1364  list_2V0_obj[1].MaxV0Candidates = 10
1365  list_2V0_obj[1].MaxMainVCandidates = 20
1366  list_2V0_obj[1].RefitPV = True
1367  list_2V0_obj[1].MaxnPV = 20
1368  list_2V0_obj[1].RefPVContainerName = "BPHY25_Xibc_2V0_RefPrimaryVertices"
1369  list_2V0_obj[1].TrkVertexFitterTool = vkalvrt
1370  list_2V0_obj[1].V0VertexFitterTool = v0fitter
1371  list_2V0_obj[1].GammaFitterTool = gammafitter
1372  list_2V0_obj[1].PVRefitter = pvrefitter
1373  list_2V0_obj[1].V0Tools = V0Tools
1374 
1375 
1376  CascadeCollections = []
1377  RefPVContainers = []
1378  RefPVAuxContainers = []
1379  passedCandidates = []
1380 
1381  for obj in list_1V0_obj:
1382  CascadeCollections += obj.CascadeVertexCollections
1383  RefPVContainers += ["xAOD::VertexContainer#BPHY25_" + obj.HypothesisName + "_RefPrimaryVertices"]
1384  RefPVAuxContainers += ["xAOD::VertexAuxContainer#BPHY25_" + obj.HypothesisName + "_RefPrimaryVerticesAux."]
1385  passedCandidates += ["BPHY25_" + obj.HypothesisName + "_CascadeMainVtx"]
1386 
1387  for obj in list_2V0_obj:
1388  CascadeCollections += obj.CascadeVertexCollections
1389  RefPVContainers += ["xAOD::VertexContainer#BPHY25_" + obj.HypothesisName + "_RefPrimaryVertices"]
1390  RefPVAuxContainers += ["xAOD::VertexAuxContainer#BPHY25_" + obj.HypothesisName + "_RefPrimaryVerticesAux."]
1391  passedCandidates += ["BPHY25_" + obj.HypothesisName + "_CascadeMainVtx"]
1392 
1393  BPHY25_SelectEvent = CompFactory.DerivationFramework.AnyVertexSkimmingTool(name = "BPHY25_SelectEvent", VertexContainerNames = passedCandidates)
1394 
1395  augmentation_tools = [BPHY25_Reco_mumu, BPHY25FourTrackReco_PsiX3872, BPHY25FourTrackReco_Bs0, BPHY25FourTrackReco_B0, BPHY25ThreeTrackReco_Zc3900, BPHY25ThreeTrackReco_Bpm, BPHY25ThreeTrackReco_DpmDs, BPHY25Rev_X3872, BPHY25Rev_Bs0, BPHY25Rev_B0Kpi, BPHY25Rev_B0piK, BPHY25Rev_Zc3900, BPHY25Rev_Bpm, BPHY25Rev_Ds, BPHY25Rev_Dpm, BPHY25Select_Phi, BPHY25Select_Jpsi, BPHY25Select_Psi, BPHY25Select_Upsi, BPHY25_Reco_V0Finder] + list_1V0_obj + list_2V0_obj
1396  for t in augmentation_tools : acc.addPublicTool(t)
1397 
1398  acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(
1399  "BPHY25Kernel",
1400  AugmentationTools = augmentation_tools,
1401  SkimmingTools = [BPHY25_SelectEvent]
1402  ))
1403 
1404  from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
1405  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
1406  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
1407  BPHY25SlimmingHelper = SlimmingHelper("BPHY25SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
1408  from DerivationFrameworkBPhys.commonBPHYMethodsCfg import getDefaultAllVariables
1409  BPHY25_AllVariables = getDefaultAllVariables()
1410  BPHY25_StaticContent = []
1411 
1412  # Needed for trigger objects
1413  BPHY25SlimmingHelper.IncludeMuonTriggerContent = True
1414  BPHY25SlimmingHelper.IncludeBPhysTriggerContent = True
1415 
1416 
1417  BPHY25_AllVariables += ["PrimaryVertices"]
1418  BPHY25_StaticContent += RefPVContainers
1419  BPHY25_StaticContent += RefPVAuxContainers
1420 
1421 
1422  BPHY25_AllVariables += ["InDetTrackParticles"]
1423 
1424 
1427  BPHY25_AllVariables += ["CombinedMuonTrackParticles", "ExtrapolatedMuonTrackParticles"]
1428 
1429 
1430  BPHY25_AllVariables += ["Muons", "MuonSegments"]
1431 
1432 
1433  for cascade in CascadeCollections:
1434  BPHY25_StaticContent += ["xAOD::VertexContainer#%s" % cascade]
1435  BPHY25_StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % cascade]
1436 
1437  # Truth information for MC only
1438  if isSimulation:
1439  BPHY25_AllVariables += ["TruthEvents","TruthParticles","TruthVertices","MuonTruthParticles"]
1440 
1441  BPHY25SlimmingHelper.SmartCollections = ["Muons", "PrimaryVertices", "InDetTrackParticles"]
1442  BPHY25SlimmingHelper.AllVariables = BPHY25_AllVariables
1443  BPHY25SlimmingHelper.StaticContent = BPHY25_StaticContent
1444 
1445  BPHY25ItemList = BPHY25SlimmingHelper.GetItemList()
1446  acc.merge(OutputStreamCfg(flags, "DAOD_BPHY25", ItemList=BPHY25ItemList, AcceptAlgs=["BPHY25Kernel"]))
1447  acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_BPHY25", AcceptAlgs=["BPHY25Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))
1448  acc.printConfig(withDetails=True, summariseProps=True, onlyComponents = [], printDefaults=True, printComponentsOnly=False)
1449  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
BPHY25.BPHY25Cfg
def BPHY25Cfg(flags)
Definition: BPHY25.py:15
V0ToolConfig.BPHY_Reco_V0FinderCfg
def BPHY_Reco_V0FinderCfg(flags, derivation="", suffix="", V0ContainerName="", KshortContainerName="", LambdaContainerName="", LambdabarContainerName="", CheckVertexContainers=[], **kwargs)
Definition: V0ToolConfig.py:46
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
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
python.TrkVKalVrtFitterConfig.V0VKalVrtFitterCfg
def V0VKalVrtFitterCfg(flags, name="V0VKalVrtFitter", **kwargs)
Definition: TrkVKalVrtFitterConfig.py:57
TrackToVertexConfig.InDetTrackToVertexCfg
def InDetTrackToVertexCfg(flags, name='InDetTrackToVertex', **kwargs)
Definition: TrackToVertexConfig.py:14
python.InDetTrackSelectorToolConfig.V0InDetConversionTrackSelectorToolCfg
def V0InDetConversionTrackSelectorToolCfg(flags, name='InDetV0VxTrackSelector', **kwargs)
Definition: InDetTrackSelectorToolConfig.py:38
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