ATLAS Offline Software
Loading...
Searching...
No Matches
BPHY13.py
Go to the documentation of this file.
1# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3#====================================================================
4# BPHY13.py for 4-muon resonance search
5# Contact: xin.chen@cern.ch
6#====================================================================
7
8from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
9from AthenaConfiguration.ComponentFactory import CompFactory
10from AthenaConfiguration.Enums import MetadataCategory
11
12BPHYDerivationName = "BPHY13"
13streamName = "StreamDAOD_BPHY13"
14
15def BPHY13Cfg(flags):
16 from DerivationFrameworkBPhys.commonBPHYMethodsCfg import (BPHY_V0ToolCfg, BPHY_InDetDetailedTrackSelectorToolCfg, BPHY_VertexPointEstimatorCfg, BPHY_TrkVKalVrtFitterCfg)
17 from JpsiUpsilonTools.JpsiUpsilonToolsConfig import PrimaryVertexRefittingToolCfg
18 acc = ComponentAccumulator()
19 from AthenaServices.PartPropSvcConfig import PartPropSvcCfg
20 acc.getPrimaryAndMerge(PartPropSvcCfg(flags))
21 isSimulation = flags.Input.isMC
22 V0Tools = acc.popToolsAndMerge(BPHY_V0ToolCfg(flags, BPHYDerivationName))
23 vkalvrt = acc.popToolsAndMerge(BPHY_TrkVKalVrtFitterCfg(flags, BPHYDerivationName)) # VKalVrt vertex fitter
24 acc.addPublicTool(vkalvrt)
25 acc.addPublicTool(V0Tools)
26 trackselect = acc.popToolsAndMerge(BPHY_InDetDetailedTrackSelectorToolCfg(flags, BPHYDerivationName))
27 acc.addPublicTool(trackselect)
28 vpest = acc.popToolsAndMerge(BPHY_VertexPointEstimatorCfg(flags, BPHYDerivationName))
29 acc.addPublicTool(vpest)
30
31 # mass bounds and constants used in the following
32 Phi_lo = 770.0
33 Phi_hi = 1300.0
34 Jpsi_lo = 2600.0
35 Jpsi_hi = 3600.0
36 Psi_lo = 3300.0
37 Psi_hi = 4200.0
38 Upsi_lo = 8800.0
39 Upsi_hi = 10000.0
40 Dimu_lo = 5000.0
41 Dimu_hi = 9100.0
42
43 Mumass = 105.658
44 Phimass = 1019.461
45 Jpsimass = 3096.916
46 Psi2Smass = 3686.10
47 Upsimass = 9460.30
48
49 BPHY13PhiFinder_mumu = CompFactory.Analysis.JpsiFinder(
50 name = "BPHY13PhiFinder_mumu",
51 muAndMu = True,
52 muAndTrack = False,
53 TrackAndTrack = False,
54 assumeDiMuons = True, # If true, will assume dimu hypothesis and use PDG value for mu mass
55 muonThresholdPt = 2400.,
56 trackThresholdPt = 2400.,
57 invMassLower = Phi_lo,
58 invMassUpper = Phi_hi,
59 Chi2Cut = 50.,
60 oppChargesOnly = True,
61 atLeastOneComb = True,
62 useCombinedMeasurement = False, # Only takes effect if combOnly=True
63 muonCollectionKey = "Muons",
64 TrackParticleCollection = "InDetTrackParticles",
65 V0VertexFitterTool = None, # V0 vertex fitter
66 useV0Fitter = False, # if False a TrkVertexFitterTool will be used
67 TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter
68 TrackSelectorTool = trackselect,
69 VertexPointEstimator = vpest,
70 useMCPCuts = False )
71 acc.addPublicTool(BPHY13PhiFinder_mumu)
72
73 BPHY13JpsiFinder_mumu = CompFactory.Analysis.JpsiFinder(
74 name = "BPHY13JpsiFinder_mumu",
75 muAndMu = True,
76 muAndTrack = False,
77 TrackAndTrack = False,
78 assumeDiMuons = True, # If true, will assume dimu hypothesis and use PDG value for mu mass
79 muonThresholdPt = 2400.,
80 trackThresholdPt = 2400.,
81 invMassLower = Jpsi_lo,
82 invMassUpper = Jpsi_hi,
83 Chi2Cut = 50.,
84 oppChargesOnly = True,
85 atLeastOneComb = True,
86 useCombinedMeasurement = False, # Only takes effect if combOnly=True
87 muonCollectionKey = "Muons",
88 TrackParticleCollection = "InDetTrackParticles",
89 V0VertexFitterTool = None, # V0 vertex fitter
90 useV0Fitter = False, # if False a TrkVertexFitterTool will be used
91 TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter
92 TrackSelectorTool = trackselect,
93 VertexPointEstimator = vpest,
94 useMCPCuts = False )
95 acc.addPublicTool(BPHY13JpsiFinder_mumu)
96
97 BPHY13PsiFinder_mumu = CompFactory.Analysis.JpsiFinder(
98 name = "BPHY13PsiFinder_mumu",
99 muAndMu = True,
100 muAndTrack = False,
101 TrackAndTrack = False,
102 assumeDiMuons = True, # If true, will assume dimu hypothesis and use PDG value for mu mass
103 muonThresholdPt = 2400.,
104 trackThresholdPt = 2400.,
105 invMassLower = Psi_lo,
106 invMassUpper = Psi_hi,
107 Chi2Cut = 50.,
108 oppChargesOnly = True,
109 atLeastOneComb = True,
110 useCombinedMeasurement = False, # Only takes effect if combOnly=True
111 muonCollectionKey = "Muons",
112 TrackParticleCollection = "InDetTrackParticles",
113 V0VertexFitterTool = None, # V0 vertex fitter
114 useV0Fitter = False, # if False a TrkVertexFitterTool will be used
115 TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter
116 TrackSelectorTool = trackselect,
117 VertexPointEstimator = vpest,
118 useMCPCuts = False )
119 acc.addPublicTool(BPHY13PsiFinder_mumu)
120
121 BPHY13UpsiFinder_mumu = CompFactory.Analysis.JpsiFinder(
122 name = "BPHY13UpsiFinder_mumu",
123 muAndMu = True,
124 muAndTrack = False,
125 TrackAndTrack = False,
126 assumeDiMuons = True, # If true, will assume dimu hypothesis and use PDG value for mu mass
127 muonThresholdPt = 2400.,
128 trackThresholdPt = 2400.,
129 invMassLower = Upsi_lo,
130 invMassUpper = Upsi_hi,
131 Chi2Cut = 50.,
132 oppChargesOnly = True,
133 atLeastOneComb = True,
134 useCombinedMeasurement = False, # Only takes effect if combOnly=True
135 muonCollectionKey = "Muons",
136 TrackParticleCollection = "InDetTrackParticles",
137 V0VertexFitterTool = None, # V0 vertex fitter
138 useV0Fitter = False, # if False a TrkVertexFitterTool will be used
139 TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter
140 TrackSelectorTool = trackselect,
141 VertexPointEstimator = vpest,
142 useMCPCuts = False )
143 acc.addPublicTool(BPHY13UpsiFinder_mumu)
144
145 BPHY13DimuFinder_mumu = CompFactory.Analysis.JpsiFinder(
146 name = "BPHY13DimuFinder_mumu",
147 muAndMu = True,
148 muAndTrack = False,
149 TrackAndTrack = False,
150 assumeDiMuons = True, # If true, will assume dimu hypothesis and use PDG value for mu mass
151 muonThresholdPt = 2400.,
152 trackThresholdPt = 2400.,
153 invMassLower = Dimu_lo,
154 invMassUpper = Dimu_hi,
155 Chi2Cut = 50.,
156 oppChargesOnly = True,
157 atLeastOneComb = True,
158 useCombinedMeasurement = False, # Only takes effect if combOnly=True
159 muonCollectionKey = "Muons",
160 TrackParticleCollection = "InDetTrackParticles",
161 V0VertexFitterTool = None, # V0 vertex fitter
162 useV0Fitter = False, # if False a TrkVertexFitterTool will be used
163 TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter
164 TrackSelectorTool = trackselect,
165 VertexPointEstimator = vpest,
166 useMCPCuts = False )
167 acc.addPublicTool(BPHY13DimuFinder_mumu)
168
169
170 BPHY13PhiFinder_mutrk = CompFactory.Analysis.JpsiFinder(
171 name = "BPHY13PhiFinder_mutrk",
172 muAndMu = False,
173 muAndTrack = True,
174 TrackAndTrack = False,
175 assumeDiMuons = True, # If true, will assume dimu hypothesis and use PDG value for mu mass
176 muonThresholdPt = 2400.,
177 trackThresholdPt = 2400.,
178 invMassLower = Phi_lo,
179 invMassUpper = Phi_hi,
180 Chi2Cut = 50.,
181 oppChargesOnly = True,
182 atLeastOneComb = False,
183 useCombinedMeasurement = False, # Only takes effect if combOnly=True
184 muonCollectionKey = "Muons",
185 TrackParticleCollection = "InDetTrackParticles",
186 V0VertexFitterTool = None, # V0 vertex fitter
187 useV0Fitter = False, # if False a TrkVertexFitterTool will be used
188 TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter
189 TrackSelectorTool = trackselect,
190 VertexPointEstimator = vpest,
191 useMCPCuts = False,
192 doTagAndProbe = True)
193 acc.addPublicTool(BPHY13PhiFinder_mutrk)
194
195 BPHY13JpsiFinder_mutrk = CompFactory.Analysis.JpsiFinder(
196 name = "BPHY13JpsiFinder_mutrk",
197 muAndMu = False,
198 muAndTrack = True,
199 TrackAndTrack = False,
200 assumeDiMuons = True, # If true, will assume dimu hypothesis and use PDG value for mu mass
201 muonThresholdPt = 2400.,
202 trackThresholdPt = 2400.,
203 invMassLower = Jpsi_lo,
204 invMassUpper = Jpsi_hi,
205 Chi2Cut = 50.,
206 oppChargesOnly = True,
207 atLeastOneComb = False,
208 useCombinedMeasurement = False, # Only takes effect if combOnly=True
209 muonCollectionKey = "Muons",
210 TrackParticleCollection = "InDetTrackParticles",
211 V0VertexFitterTool = None, # V0 vertex fitter
212 useV0Fitter = False, # if False a TrkVertexFitterTool will be used
213 TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter
214 TrackSelectorTool = trackselect,
215 VertexPointEstimator = vpest,
216 useMCPCuts = False,
217 doTagAndProbe = True )
218 acc.addPublicTool(BPHY13JpsiFinder_mutrk)
219
220 BPHY13PsiFinder_mutrk = CompFactory.Analysis.JpsiFinder(
221 name = "BPHY13PsiFinder_mutrk",
222 muAndMu = False,
223 muAndTrack = True,
224 TrackAndTrack = False,
225 assumeDiMuons = True, # If true, will assume dimu hypothesis and use PDG value for mu mass
226 muonThresholdPt = 2400.,
227 trackThresholdPt = 2400.,
228 invMassLower = Psi_lo,
229 invMassUpper = Psi_hi,
230 Chi2Cut = 50.,
231 oppChargesOnly = True,
232 atLeastOneComb = False,
233 useCombinedMeasurement = False, # Only takes effect if combOnly=True
234 muonCollectionKey = "Muons",
235 TrackParticleCollection = "InDetTrackParticles",
236 V0VertexFitterTool = None, # V0 vertex fitter
237 useV0Fitter = False, # if False a TrkVertexFitterTool will be used
238 TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter
239 TrackSelectorTool = trackselect,
240 VertexPointEstimator = vpest,
241 useMCPCuts = False,
242 doTagAndProbe = True )
243 acc.addPublicTool(BPHY13PsiFinder_mutrk)
244
245 BPHY13UpsiFinder_mutrk = CompFactory.Analysis.JpsiFinder(
246 name = "BPHY13UpsiFinder_mutrk",
247 muAndMu = False,
248 muAndTrack = True,
249 TrackAndTrack = False,
250 assumeDiMuons = True, # If true, will assume dimu hypothesis and use PDG value for mu mass
251 muonThresholdPt = 2400.,
252 trackThresholdPt = 2400.,
253 invMassLower = Upsi_lo,
254 invMassUpper = Upsi_hi,
255 Chi2Cut = 50.,
256 oppChargesOnly = True,
257 atLeastOneComb = False,
258 useCombinedMeasurement = False, # Only takes effect if combOnly=True
259 muonCollectionKey = "Muons",
260 TrackParticleCollection = "InDetTrackParticles",
261 V0VertexFitterTool = None, # V0 vertex fitter
262 useV0Fitter = False, # if False a TrkVertexFitterTool will be used
263 TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter
264 TrackSelectorTool = trackselect,
265 VertexPointEstimator = vpest,
266 useMCPCuts = False,
267 doTagAndProbe = True )
268 acc.addPublicTool(BPHY13UpsiFinder_mutrk)
269
270 BPHY13DimuFinder_mutrk = CompFactory.Analysis.JpsiFinder(
271 name = "BPHY13DimuFinder_mutrk",
272 muAndMu = False,
273 muAndTrack = True,
274 TrackAndTrack = False,
275 assumeDiMuons = True, # If true, will assume dimu hypothesis and use PDG value for mu mass
276 muonThresholdPt = 2400.,
277 trackThresholdPt = 2400.,
278 invMassLower = Dimu_lo,
279 invMassUpper = Dimu_hi,
280 Chi2Cut = 50.,
281 oppChargesOnly = True,
282 atLeastOneComb = False,
283 useCombinedMeasurement = False, # Only takes effect if combOnly=True
284 muonCollectionKey = "Muons",
285 TrackParticleCollection = "InDetTrackParticles",
286 V0VertexFitterTool = None, # V0 vertex fitter
287 useV0Fitter = False, # if False a TrkVertexFitterTool will be used
288 TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter
289 TrackSelectorTool = trackselect,
290 VertexPointEstimator = vpest,
291 useMCPCuts = False,
292 doTagAndProbe = True )
293 acc.addPublicTool(BPHY13DimuFinder_mutrk)
294
295
296 BPHY13_Reco_Phimumu = CompFactory.DerivationFramework.Reco_Vertex(
297 name = "BPHY13_Reco_Phimumu",
298 VertexSearchTool = BPHY13PhiFinder_mumu,
299 OutputVtxContainerName = "BPHY13Phimumu",
300 PVContainerName = "PrimaryVertices",
301 RefPVContainerName = "SHOULDNOTBEUSED",
302 V0Tools = V0Tools,
303 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
304 DoVertexType = 1)
305
306 BPHY13_Reco_Jpsimumu = CompFactory.DerivationFramework.Reco_Vertex(
307 name = "BPHY13_Reco_Jpsimumu",
308 VertexSearchTool = BPHY13JpsiFinder_mumu,
309 OutputVtxContainerName = "BPHY13Jpsimumu",
310 PVContainerName = "PrimaryVertices",
311 RefPVContainerName = "SHOULDNOTBEUSED",
312 V0Tools = V0Tools,
313 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
314 DoVertexType = 1)
315
316 BPHY13_Reco_Psimumu = CompFactory.DerivationFramework.Reco_Vertex(
317 name = "BPHY13_Reco_Psimumu",
318 VertexSearchTool = BPHY13PsiFinder_mumu,
319 OutputVtxContainerName = "BPHY13Psimumu",
320 PVContainerName = "PrimaryVertices",
321 RefPVContainerName = "SHOULDNOTBEUSED",
322 V0Tools = V0Tools,
323 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
324 DoVertexType = 1)
325
326 BPHY13_Reco_Upsimumu = CompFactory.DerivationFramework.Reco_Vertex(
327 name = "BPHY13_Reco_Upsimumu",
328 VertexSearchTool = BPHY13UpsiFinder_mumu,
329 OutputVtxContainerName = "BPHY13Upsimumu",
330 PVContainerName = "PrimaryVertices",
331 RefPVContainerName = "SHOULDNOTBEUSED",
332 V0Tools = V0Tools,
333 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
334 DoVertexType = 1)
335
336 BPHY13_Reco_Dimumumu = CompFactory.DerivationFramework.Reco_Vertex(
337 name = "BPHY13_Reco_Dimumumu",
338 VertexSearchTool = BPHY13DimuFinder_mumu,
339 OutputVtxContainerName = "BPHY13Dimumumu",
340 PVContainerName = "PrimaryVertices",
341 RefPVContainerName = "SHOULDNOTBEUSED",
342 V0Tools = V0Tools,
343 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
344 DoVertexType = 1)
345
346
347 BPHY13_Reco_Phimutrk = CompFactory.DerivationFramework.Reco_Vertex(
348 name = "BPHY13_Reco_Phimutrk",
349 VertexSearchTool = BPHY13PhiFinder_mutrk,
350 OutputVtxContainerName = "BPHY13Phimutrk",
351 PVContainerName = "PrimaryVertices",
352 RefPVContainerName = "SHOULDNOTBEUSED",
353 V0Tools = V0Tools,
354 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
355 DoVertexType = 1)
356
357 BPHY13_Reco_Jpsimutrk = CompFactory.DerivationFramework.Reco_Vertex(
358 name = "BPHY13_Reco_Jpsimutrk",
359 VertexSearchTool = BPHY13JpsiFinder_mutrk,
360 OutputVtxContainerName = "BPHY13Jpsimutrk",
361 PVContainerName = "PrimaryVertices",
362 RefPVContainerName = "SHOULDNOTBEUSED",
363 V0Tools = V0Tools,
364 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
365 DoVertexType = 1)
366
367 BPHY13_Reco_Psimutrk = CompFactory.DerivationFramework.Reco_Vertex(
368 name = "BPHY13_Reco_Psimutrk",
369 VertexSearchTool = BPHY13PsiFinder_mutrk,
370 OutputVtxContainerName = "BPHY13Psimutrk",
371 PVContainerName = "PrimaryVertices",
372 RefPVContainerName = "SHOULDNOTBEUSED",
373 V0Tools = V0Tools,
374 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
375 DoVertexType = 1)
376
377 BPHY13_Reco_Upsimutrk = CompFactory.DerivationFramework.Reco_Vertex(
378 name = "BPHY13_Reco_Upsimutrk",
379 VertexSearchTool = BPHY13UpsiFinder_mutrk,
380 OutputVtxContainerName = "BPHY13Upsimutrk",
381 PVContainerName = "PrimaryVertices",
382 RefPVContainerName = "SHOULDNOTBEUSED",
383 V0Tools = V0Tools,
384 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
385 DoVertexType = 1)
386
387 BPHY13_Reco_Dimumutrk = CompFactory.DerivationFramework.Reco_Vertex(
388 name = "BPHY13_Reco_Dimumutrk",
389 VertexSearchTool = BPHY13DimuFinder_mutrk,
390 OutputVtxContainerName = "BPHY13Dimumutrk",
391 PVContainerName = "PrimaryVertices",
392 RefPVContainerName = "SHOULDNOTBEUSED",
393 V0Tools = V0Tools,
394 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
395 DoVertexType = 1)
396
397
398 BPHY13_Rev_Phimumu = CompFactory.DerivationFramework.ReVertex(
399 name = "BPHY13_Rev_Phimumu",
400 InputVtxContainerName = "BPHY13Phimumu",
401 TrackIndices = [ 0, 1 ],
402 RefitPV = False,
403 UseMassConstraint = True,
404 VertexMass = Phimass,
405 MassInputParticles = [Mumass, Mumass],
406 Chi2Cut = 50.,
407 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
408 V0Tools = V0Tools,
409 TrkVertexFitterTool = vkalvrt,
410 OutputVtxContainerName = "BPHY13Phimumu_revtx")
411
412 BPHY13_Rev_Jpsimumu = CompFactory.DerivationFramework.ReVertex(
413 name = "BPHY13_Rev_Jpsimumu",
414 InputVtxContainerName = "BPHY13Jpsimumu",
415 TrackIndices = [ 0, 1 ],
416 RefitPV = False,
417 UseMassConstraint = True,
418 VertexMass = Jpsimass,
419 MassInputParticles = [Mumass, Mumass],
420 Chi2Cut = 50.,
421 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
422 V0Tools = V0Tools,
423 TrkVertexFitterTool = vkalvrt,
424 OutputVtxContainerName = "BPHY13Jpsimumu_revtx")
425
426 BPHY13_Rev_Psimumu = CompFactory.DerivationFramework.ReVertex(
427 name = "BPHY13_Rev_Psimumu",
428 InputVtxContainerName = "BPHY13Psimumu",
429 TrackIndices = [ 0, 1 ],
430 RefitPV = False,
431 UseMassConstraint = True,
432 VertexMass = Psi2Smass,
433 MassInputParticles = [Mumass, Mumass],
434 Chi2Cut = 50.,
435 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
436 V0Tools = V0Tools,
437 TrkVertexFitterTool = vkalvrt,
438 OutputVtxContainerName = "BPHY13Psimumu_revtx")
439
440 BPHY13_Rev_Upsimumu = CompFactory.DerivationFramework.ReVertex(
441 name = "BPHY13_Rev_Upsimumu",
442 InputVtxContainerName = "BPHY13Upsimumu",
443 TrackIndices = [ 0, 1 ],
444 RefitPV = False,
445 UseMassConstraint = True,
446 VertexMass = Upsimass,
447 MassInputParticles = [Mumass, Mumass],
448 Chi2Cut = 50.,
449 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
450 V0Tools = V0Tools,
451 TrkVertexFitterTool = vkalvrt,
452 OutputVtxContainerName = "BPHY13Upsimumu_revtx")
453
454
455 BPHY13_Rev_Phimutrk = CompFactory.DerivationFramework.ReVertex(
456 name = "BPHY13_Rev_Phimutrk",
457 InputVtxContainerName = "BPHY13Phimutrk",
458 TrackIndices = [ 0, 1 ],
459 RefitPV = False,
460 UseMassConstraint = True,
461 VertexMass = Phimass,
462 MassInputParticles = [Mumass, Mumass],
463 Chi2Cut = 50.,
464 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
465 V0Tools = V0Tools,
466 TrkVertexFitterTool = vkalvrt,
467 OutputVtxContainerName = "BPHY13Phimutrk_revtx")
468
469 BPHY13_Rev_Jpsimutrk = CompFactory.DerivationFramework.ReVertex(
470 name = "BPHY13_Rev_Jpsimutrk",
471 InputVtxContainerName = "BPHY13Jpsimutrk",
472 TrackIndices = [ 0, 1 ],
473 RefitPV = False,
474 UseMassConstraint = True,
475 VertexMass = Jpsimass,
476 MassInputParticles = [Mumass, Mumass],
477 Chi2Cut = 50.,
478 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
479 V0Tools = V0Tools,
480 TrkVertexFitterTool = vkalvrt,
481 OutputVtxContainerName = "BPHY13Jpsimutrk_revtx")
482
483 BPHY13_Rev_Psimutrk = CompFactory.DerivationFramework.ReVertex(
484 name = "BPHY13_Rev_Psimutrk",
485 InputVtxContainerName = "BPHY13Psimutrk",
486 TrackIndices = [ 0, 1 ],
487 RefitPV = False,
488 UseMassConstraint = True,
489 VertexMass = Psi2Smass,
490 MassInputParticles = [Mumass, Mumass],
491 Chi2Cut = 50.,
492 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
493 V0Tools = V0Tools,
494 TrkVertexFitterTool = vkalvrt,
495 OutputVtxContainerName = "BPHY13Psimutrk_revtx")
496
497 BPHY13_Rev_Upsimutrk = CompFactory.DerivationFramework.ReVertex(
498 name = "BPHY13_Rev_Upsimutrk",
499 InputVtxContainerName = "BPHY13Upsimutrk",
500 TrackIndices = [ 0, 1 ],
501 RefitPV = False,
502 UseMassConstraint = True,
503 VertexMass = Upsimass,
504 MassInputParticles = [Mumass, Mumass],
505 Chi2Cut = 50.,
506 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
507 V0Tools = V0Tools,
508 TrkVertexFitterTool = vkalvrt,
509 OutputVtxContainerName = "BPHY13Upsimutrk_revtx")
510
511
512 list_4mu_hypo = ["UpsiUpsi_4mu", "UpsiPsi_4mu", "UpsiJpsi_4mu", "UpsiPhi_4mu",
513 "PsiPsi_4mu", "PsiJpsi_4mu", "PsiPhi_4mu",
514 "JpsiJpsi_4mu", "JpsiPhi_4mu", "PhiPhi_4mu",
515 "UpsiDimu_4mu"]
516 list_4mu_psi1Input = ["BPHY13Upsimumu_revtx", "BPHY13Upsimumu_revtx", "BPHY13Upsimumu_revtx", "BPHY13Upsimumu_revtx",
517 "BPHY13Psimumu_revtx", "BPHY13Psimumu_revtx", "BPHY13Psimumu_revtx",
518 "BPHY13Jpsimumu_revtx", "BPHY13Jpsimumu_revtx", "BPHY13Phimumu_revtx",
519 "BPHY13Upsimumu_revtx"]
520 list_4mu_psi2Input = ["BPHY13Upsimumu_revtx", "BPHY13Psimumu_revtx", "BPHY13Jpsimumu_revtx", "BPHY13Phimumu_revtx",
521 "BPHY13Psimumu_revtx", "BPHY13Jpsimumu_revtx", "BPHY13Phimumu_revtx",
522 "BPHY13Jpsimumu_revtx", "BPHY13Phimumu_revtx", "BPHY13Phimumu_revtx",
523 "BPHY13Dimumumu"]
524 list_4mu_jpsi1lo = [Upsi_lo,Upsi_lo,Upsi_lo,Upsi_lo,
525 Psi_lo,Psi_lo,Psi_lo,
526 Jpsi_lo,Jpsi_lo,Phi_lo,
527 Upsi_lo]
528 list_4mu_jpsi1hi = [Upsi_hi,Upsi_hi,Upsi_hi,Upsi_hi,
529 Psi_hi,Psi_hi,Psi_hi,
530 Jpsi_hi,Jpsi_hi,Phi_hi,
531 Upsi_hi]
532 list_4mu_jpsi1mass = [Upsimass, Upsimass, Upsimass, Upsimass,
533 Psi2Smass, Psi2Smass, Psi2Smass,
534 Jpsimass, Jpsimass, Phimass,
535 Upsimass]
536 list_4mu_jpsi2lo = [Upsi_lo,Psi_lo,Jpsi_lo,Phi_lo,
537 Psi_lo,Jpsi_lo,Phi_lo,
538 Jpsi_lo,Phi_lo,Phi_lo,
539 Dimu_lo]
540 list_4mu_jpsi2hi = [Upsi_hi,Psi_hi,Jpsi_hi,Phi_hi,
541 Psi_hi,Jpsi_hi,Phi_hi,
542 Jpsi_hi,Phi_hi,Phi_hi,
543 Dimu_hi]
544 list_4mu_jpsi2mass = [Upsimass, Psi2Smass, Jpsimass, Phimass,
545 Psi2Smass, Jpsimass, Phimass,
546 Jpsimass, Phimass, Phimass]
547
548 list_4mu_obj = []
549 for hypo in list_4mu_hypo:
550 list_4mu_obj.append( CompFactory.DerivationFramework.PsiPlusPsiSingleVertex("BPHY13_"+hypo) )
551
552 for i in range(len(list_4mu_obj)):
553 list_4mu_obj[i].HypothesisName = list_4mu_hypo[i]
554 list_4mu_obj[i].Psi1Vertices = list_4mu_psi1Input[i]
555 list_4mu_obj[i].Psi2Vertices = list_4mu_psi2Input[i]
556 list_4mu_obj[i].NumberOfPsi1Daughters = 2
557 list_4mu_obj[i].NumberOfPsi2Daughters = 2
558 list_4mu_obj[i].Jpsi1MassLowerCut = list_4mu_jpsi1lo[i]
559 list_4mu_obj[i].Jpsi1MassUpperCut = list_4mu_jpsi1hi[i]
560 list_4mu_obj[i].Jpsi2MassLowerCut = list_4mu_jpsi2lo[i]
561 list_4mu_obj[i].Jpsi2MassUpperCut = list_4mu_jpsi2hi[i]
562 list_4mu_obj[i].MassLowerCut = 0.
563 list_4mu_obj[i].MassUpperCut = 31000.
564 list_4mu_obj[i].Jpsi1Mass = list_4mu_jpsi1mass[i]
565 list_4mu_obj[i].ApplyJpsi1MassConstraint = True
566 if i == len(list_4mu_obj)-1:
567 list_4mu_obj[i].ApplyJpsi2MassConstraint = False
568 else:
569 list_4mu_obj[i].Jpsi2Mass = list_4mu_jpsi2mass[i]
570 list_4mu_obj[i].ApplyJpsi2MassConstraint = True
571 list_4mu_obj[i].Chi2Cut = 25.
572 list_4mu_obj[i].PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags))
573 list_4mu_obj[i].TrkVertexFitterTool = vkalvrt
574 list_4mu_obj[i].VxPrimaryCandidateName = "PrimaryVertices"
575 list_4mu_obj[i].OutputVertexCollections = ["BPHY13_"+list_4mu_hypo[i]+"_SubVtx1","BPHY13_"+list_4mu_hypo[i]+"_SubVtx2","BPHY13_"+list_4mu_hypo[i]+"_MainVtx"]
576 list_4mu_obj[i].VxPrimaryCandidateName = "PrimaryVertices"
577 list_4mu_obj[i].RefPVContainerName = "BPHY13_"+list_4mu_hypo[i]+"_RefPrimaryVertices"
578 list_4mu_obj[i].RefitPV = True
579 list_4mu_obj[i].MaxnPV = 100
580
581
582 list_3mu1trk_hypo = ["UpsiUpsi_3mu1trk", "UpsiPsi_3mu1trk", "UpsiJpsi_3mu1trk", "UpsiPhi_3mu1trk",
583 "PsiPsi_3mu1trk", "PsiJpsi_3mu1trk", "PsiPhi_3mu1trk",
584 "JpsiJpsi_3mu1trk", "JpsiPhi_3mu1trk", "PhiPhi_3mu1trk",
585 "PsiUpsi_3mu1trk", "JpsiUpsi_3mu1trk", "PhiUpsi_3mu1trk",
586 "JpsiPsi_3mu1trk", "PhiPsi_3mu1trk", "PhiJpsi_3mu1trk",
587 "UpsiDimu_3mu1trk", "DimuUpsi_3mu1trk"]
588 list_3mu1trk_psi1Input = ["BPHY13Upsimumu_revtx", "BPHY13Upsimumu_revtx", "BPHY13Upsimumu_revtx", "BPHY13Upsimumu_revtx",
589 "BPHY13Psimumu_revtx", "BPHY13Psimumu_revtx", "BPHY13Psimumu_revtx",
590 "BPHY13Jpsimumu_revtx", "BPHY13Jpsimumu_revtx", "BPHY13Phimumu_revtx",
591 "BPHY13Psimumu_revtx", "BPHY13Jpsimumu_revtx", "BPHY13Phimumu_revtx",
592 "BPHY13Jpsimumu_revtx", "BPHY13Phimumu_revtx", "BPHY13Phimumu_revtx",
593 "BPHY13Upsimumu_revtx", "BPHY13Dimumumu"]
594 list_3mu1trk_psi2Input = ["BPHY13Upsimutrk_revtx", "BPHY13Psimutrk_revtx", "BPHY13Jpsimutrk_revtx", "BPHY13Phimutrk_revtx",
595 "BPHY13Psimutrk_revtx", "BPHY13Jpsimutrk_revtx", "BPHY13Phimutrk_revtx",
596 "BPHY13Jpsimutrk_revtx", "BPHY13Phimutrk_revtx", "BPHY13Phimutrk_revtx",
597 "BPHY13Upsimutrk_revtx", "BPHY13Upsimutrk_revtx", "BPHY13Upsimutrk_revtx",
598 "BPHY13Psimutrk_revtx", "BPHY13Psimutrk_revtx", "BPHY13Jpsimutrk_revtx",
599 "BPHY13Dimumutrk", "BPHY13Upsimutrk_revtx"]
600 list_3mu1trk_jpsi1lo = [Upsi_lo,Upsi_lo,Upsi_lo,Upsi_lo,
601 Psi_lo,Psi_lo,Psi_lo,
602 Jpsi_lo,Jpsi_lo,Phi_lo,
603 Psi_lo,Jpsi_lo,Phi_lo,
604 Jpsi_lo,Phi_lo,Phi_lo,
605 Upsi_lo, Dimu_lo]
606 list_3mu1trk_jpsi1hi = [Upsi_hi,Upsi_hi,Upsi_hi,Upsi_hi,
607 Psi_hi,Psi_hi,Psi_hi,
608 Jpsi_hi,Jpsi_hi,Phi_hi,
609 Psi_hi,Jpsi_hi,Phi_hi,
610 Jpsi_hi,Phi_hi,Phi_hi,
611 Upsi_hi, Dimu_hi]
612 list_3mu1trk_jpsi1mass = [Upsimass, Upsimass, Upsimass, Upsimass,
613 Psi2Smass, Psi2Smass, Psi2Smass,
614 Jpsimass, Jpsimass, Phimass,
615 Psi2Smass, Jpsimass, Phimass,
616 Jpsimass, Phimass, Phimass,
617 Upsimass, 0.0] # 0.0 is dummy
618 list_3mu1trk_jpsi2lo = [Upsi_lo,Psi_lo,Jpsi_lo,Phi_lo,
619 Psi_lo,Jpsi_lo,Phi_lo,
620 Jpsi_lo,Phi_lo,Phi_lo,
621 Upsi_lo,Upsi_lo,Upsi_lo,
622 Psi_lo,Psi_lo,Jpsi_lo,
623 Dimu_lo, Upsi_lo]
624 list_3mu1trk_jpsi2hi = [Upsi_hi,Psi_hi,Jpsi_hi,Phi_hi,
625 Psi_hi,Jpsi_hi,Phi_hi,
626 Jpsi_hi,Phi_hi,Phi_hi,
627 Upsi_hi,Upsi_hi,Upsi_hi,
628 Psi_hi,Psi_hi,Jpsi_hi,
629 Dimu_hi, Upsi_lo]
630 list_3mu1trk_jpsi2mass = [Upsimass, Psi2Smass, Jpsimass, Phimass,
631 Psi2Smass, Jpsimass, Phimass,
632 Jpsimass, Phimass, Phimass,
633 Upsimass, Upsimass, Upsimass,
634 Psi2Smass, Psi2Smass, Jpsimass,
635 0.0, Upsimass] # 0.0 is dummy
636
637 list_3mu1trk_obj = []
638 for hypo in list_3mu1trk_hypo:
639 list_3mu1trk_obj.append( CompFactory.DerivationFramework.PsiPlusPsiSingleVertex("BPHY13_"+hypo) )
640
641 for i in range(len(list_3mu1trk_obj)):
642 list_3mu1trk_obj[i].HypothesisName = list_3mu1trk_hypo[i]
643 list_3mu1trk_obj[i].Psi1Vertices = list_3mu1trk_psi1Input[i]
644 list_3mu1trk_obj[i].Psi2Vertices = list_3mu1trk_psi2Input[i]
645 list_3mu1trk_obj[i].NumberOfPsi1Daughters = 2
646 list_3mu1trk_obj[i].NumberOfPsi2Daughters = 2
647 list_3mu1trk_obj[i].MaxCandidates = 20
648 list_3mu1trk_obj[i].Jpsi1MassLowerCut = list_3mu1trk_jpsi1lo[i]
649 list_3mu1trk_obj[i].Jpsi1MassUpperCut = list_3mu1trk_jpsi1hi[i]
650 list_3mu1trk_obj[i].Jpsi2MassLowerCut = list_3mu1trk_jpsi2lo[i]
651 list_3mu1trk_obj[i].Jpsi2MassUpperCut = list_3mu1trk_jpsi2hi[i]
652 list_3mu1trk_obj[i].MassLowerCut = 0.
653 list_3mu1trk_obj[i].MassUpperCut = 31000.
654 if i == len(list_3mu1trk_obj)-2:
655 list_3mu1trk_obj[i].Jpsi1Mass = list_3mu1trk_jpsi1mass[i]
656 list_3mu1trk_obj[i].ApplyJpsi1MassConstraint = True
657 list_3mu1trk_obj[i].ApplyJpsi2MassConstraint = False
658 elif i == len(list_3mu1trk_obj)-1:
659 list_3mu1trk_obj[i].Jpsi2Mass = list_3mu1trk_jpsi2mass[i]
660 list_3mu1trk_obj[i].ApplyJpsi1MassConstraint = False
661 list_3mu1trk_obj[i].ApplyJpsi2MassConstraint = True
662 else:
663 list_3mu1trk_obj[i].Jpsi1Mass = list_3mu1trk_jpsi1mass[i]
664 list_3mu1trk_obj[i].Jpsi2Mass = list_3mu1trk_jpsi2mass[i]
665 list_3mu1trk_obj[i].ApplyJpsi1MassConstraint = True
666 list_3mu1trk_obj[i].ApplyJpsi2MassConstraint = True
667 list_3mu1trk_obj[i].Chi2Cut = 25.
668 list_3mu1trk_obj[i].PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags))
669 list_3mu1trk_obj[i].TrkVertexFitterTool = vkalvrt
670 list_3mu1trk_obj[i].VxPrimaryCandidateName = "PrimaryVertices"
671 list_3mu1trk_obj[i].OutputVertexCollections = ["BPHY13_"+list_3mu1trk_hypo[i]+"_SubVtx1","BPHY13_"+list_3mu1trk_hypo[i]+"_SubVtx2","BPHY13_"+list_3mu1trk_hypo[i]+"_MainVtx"]
672 list_3mu1trk_obj[i].VxPrimaryCandidateName = "PrimaryVertices"
673 list_3mu1trk_obj[i].RefPVContainerName = "BPHY13_"+list_3mu1trk_hypo[i]+"_RefPrimaryVertices"
674 list_3mu1trk_obj[i].RefitPV = True
675 list_3mu1trk_obj[i].MaxnPV = 100
676
677
678 list_all_obj = list_4mu_obj + list_3mu1trk_obj
679
680 OutputCollections = []
681 RefPVContainers = []
682 RefPVAuxContainers = []
683 passedCandidates = []
684
685 for obj in list_all_obj:
686 OutputCollections += obj.OutputVertexCollections
687 RefPVContainers += ["xAOD::VertexContainer#BPHY13_" + obj.HypothesisName + "_RefPrimaryVertices"]
688 RefPVAuxContainers += ["xAOD::VertexAuxContainer#BPHY13_" + obj.HypothesisName + "_RefPrimaryVerticesAux."]
689 passedCandidates += [ "BPHY13_" + obj.HypothesisName + "_MainVtx" ]
690
691 BPHY13_SelectEvent = CompFactory.DerivationFramework.AnyVertexSkimmingTool(name = "BPHY13_SelectEvent", VertexContainerNames = passedCandidates)
692 acc.addPublicTool(BPHY13_SelectEvent)
693
694 augmentation_tools = [BPHY13_Reco_Phimumu, BPHY13_Reco_Jpsimumu, BPHY13_Reco_Psimumu, BPHY13_Reco_Upsimumu, BPHY13_Reco_Dimumumu, BPHY13_Reco_Phimutrk, BPHY13_Reco_Jpsimutrk, BPHY13_Reco_Psimutrk, BPHY13_Reco_Upsimutrk, BPHY13_Reco_Dimumutrk, BPHY13_Rev_Phimumu, BPHY13_Rev_Jpsimumu, BPHY13_Rev_Psimumu, BPHY13_Rev_Upsimumu, BPHY13_Rev_Phimutrk, BPHY13_Rev_Jpsimutrk, BPHY13_Rev_Psimutrk, BPHY13_Rev_Upsimutrk] + list_all_obj
695 for t in augmentation_tools : acc.addPublicTool(t)
696
697 acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(
698 "BPHY13Kernel",
699 AugmentationTools = augmentation_tools,
700 SkimmingTools = [BPHY13_SelectEvent]
701 ))
702
703 from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
704 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
705 from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
706 BPHY13SlimmingHelper = SlimmingHelper("BPHY13SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
707 from DerivationFrameworkBPhys.commonBPHYMethodsCfg import getDefaultAllVariables
708 BPHY13_AllVariables = getDefaultAllVariables()
709 BPHY13_StaticContent = []
710
711 # Needed for trigger objects
712 BPHY13SlimmingHelper.IncludeMuonTriggerContent = True
713 BPHY13SlimmingHelper.IncludeBPhysTriggerContent = True
714
715
716 BPHY13_AllVariables += ["PrimaryVertices"]
717 BPHY13_StaticContent += RefPVContainers
718 BPHY13_StaticContent += RefPVAuxContainers
719
720
721 BPHY13_AllVariables += ["InDetTrackParticles"]
722
723
726 BPHY13_AllVariables += ["CombinedMuonTrackParticles", "ExtrapolatedMuonTrackParticles"]
727
728
729 BPHY13_AllVariables += ["Muons", "MuonSegments"]
730
731
732 for output in OutputCollections:
733 BPHY13_StaticContent += ["xAOD::VertexContainer#%s" % output]
734 BPHY13_StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % output]
735
736 # Truth information for MC only
737 if isSimulation:
738 BPHY13_AllVariables += ["TruthEvents","TruthParticles","TruthVertices","MuonTruthParticles"]
739
740 BPHY13SlimmingHelper.SmartCollections = ["Muons", "PrimaryVertices", "InDetTrackParticles"]
741 BPHY13SlimmingHelper.AllVariables = BPHY13_AllVariables
742 BPHY13SlimmingHelper.StaticContent = BPHY13_StaticContent
743
744 BPHY13ItemList = BPHY13SlimmingHelper.GetItemList()
745 acc.merge(OutputStreamCfg(flags, "DAOD_BPHY13", ItemList=BPHY13ItemList, AcceptAlgs=["BPHY13Kernel"]))
746 acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_BPHY13", AcceptAlgs=["BPHY13Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))
747 acc.printConfig(withDetails=True, summariseProps=True, onlyComponents = [], printDefaults=True)
748 return acc
BPHY13Cfg(flags)
Definition BPHY13.py:15