16 from DerivationFrameworkBPhys.commonBPHYMethodsCfg
import (BPHY_V0ToolCfg, BPHY_InDetDetailedTrackSelectorToolCfg, BPHY_VertexPointEstimatorCfg, BPHY_TrkVKalVrtFitterCfg)
17 from JpsiUpsilonTools.JpsiUpsilonToolsConfig
import PrimaryVertexRefittingToolCfg
19 from AthenaServices.PartPropSvcConfig
import PartPropSvcCfg
21 isSimulation = flags.Input.isMC
22 V0Tools = acc.popToolsAndMerge(
BPHY_V0ToolCfg(flags, BPHYDerivationName))
24 acc.addPublicTool(vkalvrt)
25 acc.addPublicTool(V0Tools)
27 acc.addPublicTool(trackselect)
29 acc.addPublicTool(vpest)
49 BPHY13PhiFinder_mumu = CompFactory.Analysis.JpsiFinder(
50 name =
"BPHY13PhiFinder_mumu",
53 TrackAndTrack =
False,
55 muonThresholdPt = 2400.,
56 trackThresholdPt = 2400.,
57 invMassLower = Phi_lo,
58 invMassUpper = Phi_hi,
60 oppChargesOnly =
True,
61 atLeastOneComb =
True,
62 useCombinedMeasurement =
False,
63 muonCollectionKey =
"Muons",
64 TrackParticleCollection =
"InDetTrackParticles",
65 V0VertexFitterTool =
None,
67 TrkVertexFitterTool = vkalvrt,
68 TrackSelectorTool = trackselect,
69 VertexPointEstimator = vpest,
71 acc.addPublicTool(BPHY13PhiFinder_mumu)
73 BPHY13JpsiFinder_mumu = CompFactory.Analysis.JpsiFinder(
74 name =
"BPHY13JpsiFinder_mumu",
77 TrackAndTrack =
False,
79 muonThresholdPt = 2400.,
80 trackThresholdPt = 2400.,
81 invMassLower = Jpsi_lo,
82 invMassUpper = Jpsi_hi,
84 oppChargesOnly =
True,
85 atLeastOneComb =
True,
86 useCombinedMeasurement =
False,
87 muonCollectionKey =
"Muons",
88 TrackParticleCollection =
"InDetTrackParticles",
89 V0VertexFitterTool =
None,
91 TrkVertexFitterTool = vkalvrt,
92 TrackSelectorTool = trackselect,
93 VertexPointEstimator = vpest,
95 acc.addPublicTool(BPHY13JpsiFinder_mumu)
97 BPHY13PsiFinder_mumu = CompFactory.Analysis.JpsiFinder(
98 name =
"BPHY13PsiFinder_mumu",
101 TrackAndTrack =
False,
102 assumeDiMuons =
True,
103 muonThresholdPt = 2400.,
104 trackThresholdPt = 2400.,
105 invMassLower = Psi_lo,
106 invMassUpper = Psi_hi,
108 oppChargesOnly =
True,
109 atLeastOneComb =
True,
110 useCombinedMeasurement =
False,
111 muonCollectionKey =
"Muons",
112 TrackParticleCollection =
"InDetTrackParticles",
113 V0VertexFitterTool =
None,
115 TrkVertexFitterTool = vkalvrt,
116 TrackSelectorTool = trackselect,
117 VertexPointEstimator = vpest,
119 acc.addPublicTool(BPHY13PsiFinder_mumu)
121 BPHY13UpsiFinder_mumu = CompFactory.Analysis.JpsiFinder(
122 name =
"BPHY13UpsiFinder_mumu",
125 TrackAndTrack =
False,
126 assumeDiMuons =
True,
127 muonThresholdPt = 2400.,
128 trackThresholdPt = 2400.,
129 invMassLower = Upsi_lo,
130 invMassUpper = Upsi_hi,
132 oppChargesOnly =
True,
133 atLeastOneComb =
True,
134 useCombinedMeasurement =
False,
135 muonCollectionKey =
"Muons",
136 TrackParticleCollection =
"InDetTrackParticles",
137 V0VertexFitterTool =
None,
139 TrkVertexFitterTool = vkalvrt,
140 TrackSelectorTool = trackselect,
141 VertexPointEstimator = vpest,
143 acc.addPublicTool(BPHY13UpsiFinder_mumu)
145 BPHY13DimuFinder_mumu = CompFactory.Analysis.JpsiFinder(
146 name =
"BPHY13DimuFinder_mumu",
149 TrackAndTrack =
False,
150 assumeDiMuons =
True,
151 muonThresholdPt = 2400.,
152 trackThresholdPt = 2400.,
153 invMassLower = Dimu_lo,
154 invMassUpper = Dimu_hi,
156 oppChargesOnly =
True,
157 atLeastOneComb =
True,
158 useCombinedMeasurement =
False,
159 muonCollectionKey =
"Muons",
160 TrackParticleCollection =
"InDetTrackParticles",
161 V0VertexFitterTool =
None,
163 TrkVertexFitterTool = vkalvrt,
164 TrackSelectorTool = trackselect,
165 VertexPointEstimator = vpest,
167 acc.addPublicTool(BPHY13DimuFinder_mumu)
170 BPHY13PhiFinder_mutrk = CompFactory.Analysis.JpsiFinder(
171 name =
"BPHY13PhiFinder_mutrk",
174 TrackAndTrack =
False,
175 assumeDiMuons =
True,
176 muonThresholdPt = 2400.,
177 trackThresholdPt = 2400.,
178 invMassLower = Phi_lo,
179 invMassUpper = Phi_hi,
181 oppChargesOnly =
True,
182 atLeastOneComb =
False,
183 useCombinedMeasurement =
False,
184 muonCollectionKey =
"Muons",
185 TrackParticleCollection =
"InDetTrackParticles",
186 V0VertexFitterTool =
None,
188 TrkVertexFitterTool = vkalvrt,
189 TrackSelectorTool = trackselect,
190 VertexPointEstimator = vpest,
192 doTagAndProbe =
True)
193 acc.addPublicTool(BPHY13PhiFinder_mutrk)
195 BPHY13JpsiFinder_mutrk = CompFactory.Analysis.JpsiFinder(
196 name =
"BPHY13JpsiFinder_mutrk",
199 TrackAndTrack =
False,
200 assumeDiMuons =
True,
201 muonThresholdPt = 2400.,
202 trackThresholdPt = 2400.,
203 invMassLower = Jpsi_lo,
204 invMassUpper = Jpsi_hi,
206 oppChargesOnly =
True,
207 atLeastOneComb =
False,
208 useCombinedMeasurement =
False,
209 muonCollectionKey =
"Muons",
210 TrackParticleCollection =
"InDetTrackParticles",
211 V0VertexFitterTool =
None,
213 TrkVertexFitterTool = vkalvrt,
214 TrackSelectorTool = trackselect,
215 VertexPointEstimator = vpest,
217 doTagAndProbe =
True )
218 acc.addPublicTool(BPHY13JpsiFinder_mutrk)
220 BPHY13PsiFinder_mutrk = CompFactory.Analysis.JpsiFinder(
221 name =
"BPHY13PsiFinder_mutrk",
224 TrackAndTrack =
False,
225 assumeDiMuons =
True,
226 muonThresholdPt = 2400.,
227 trackThresholdPt = 2400.,
228 invMassLower = Psi_lo,
229 invMassUpper = Psi_hi,
231 oppChargesOnly =
True,
232 atLeastOneComb =
False,
233 useCombinedMeasurement =
False,
234 muonCollectionKey =
"Muons",
235 TrackParticleCollection =
"InDetTrackParticles",
236 V0VertexFitterTool =
None,
238 TrkVertexFitterTool = vkalvrt,
239 TrackSelectorTool = trackselect,
240 VertexPointEstimator = vpest,
242 doTagAndProbe =
True )
243 acc.addPublicTool(BPHY13PsiFinder_mutrk)
245 BPHY13UpsiFinder_mutrk = CompFactory.Analysis.JpsiFinder(
246 name =
"BPHY13UpsiFinder_mutrk",
249 TrackAndTrack =
False,
250 assumeDiMuons =
True,
251 muonThresholdPt = 2400.,
252 trackThresholdPt = 2400.,
253 invMassLower = Upsi_lo,
254 invMassUpper = Upsi_hi,
256 oppChargesOnly =
True,
257 atLeastOneComb =
False,
258 useCombinedMeasurement =
False,
259 muonCollectionKey =
"Muons",
260 TrackParticleCollection =
"InDetTrackParticles",
261 V0VertexFitterTool =
None,
263 TrkVertexFitterTool = vkalvrt,
264 TrackSelectorTool = trackselect,
265 VertexPointEstimator = vpest,
267 doTagAndProbe =
True )
268 acc.addPublicTool(BPHY13UpsiFinder_mutrk)
270 BPHY13DimuFinder_mutrk = CompFactory.Analysis.JpsiFinder(
271 name =
"BPHY13DimuFinder_mutrk",
274 TrackAndTrack =
False,
275 assumeDiMuons =
True,
276 muonThresholdPt = 2400.,
277 trackThresholdPt = 2400.,
278 invMassLower = Dimu_lo,
279 invMassUpper = Dimu_hi,
281 oppChargesOnly =
True,
282 atLeastOneComb =
False,
283 useCombinedMeasurement =
False,
284 muonCollectionKey =
"Muons",
285 TrackParticleCollection =
"InDetTrackParticles",
286 V0VertexFitterTool =
None,
288 TrkVertexFitterTool = vkalvrt,
289 TrackSelectorTool = trackselect,
290 VertexPointEstimator = vpest,
292 doTagAndProbe =
True )
293 acc.addPublicTool(BPHY13DimuFinder_mutrk)
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",
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",
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",
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",
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",
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",
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",
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",
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",
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",
398 BPHY13_Rev_Phimumu = CompFactory.DerivationFramework.ReVertex(
399 name =
"BPHY13_Rev_Phimumu",
400 InputVtxContainerName =
"BPHY13Phimumu",
401 TrackIndices = [ 0, 1 ],
403 UseMassConstraint =
True,
404 VertexMass = Phimass,
405 MassInputParticles = [Mumass, Mumass],
409 TrkVertexFitterTool = vkalvrt,
410 OutputVtxContainerName =
"BPHY13Phimumu_revtx")
412 BPHY13_Rev_Jpsimumu = CompFactory.DerivationFramework.ReVertex(
413 name =
"BPHY13_Rev_Jpsimumu",
414 InputVtxContainerName =
"BPHY13Jpsimumu",
415 TrackIndices = [ 0, 1 ],
417 UseMassConstraint =
True,
418 VertexMass = Jpsimass,
419 MassInputParticles = [Mumass, Mumass],
423 TrkVertexFitterTool = vkalvrt,
424 OutputVtxContainerName =
"BPHY13Jpsimumu_revtx")
426 BPHY13_Rev_Psimumu = CompFactory.DerivationFramework.ReVertex(
427 name =
"BPHY13_Rev_Psimumu",
428 InputVtxContainerName =
"BPHY13Psimumu",
429 TrackIndices = [ 0, 1 ],
431 UseMassConstraint =
True,
432 VertexMass = Psi2Smass,
433 MassInputParticles = [Mumass, Mumass],
437 TrkVertexFitterTool = vkalvrt,
438 OutputVtxContainerName =
"BPHY13Psimumu_revtx")
440 BPHY13_Rev_Upsimumu = CompFactory.DerivationFramework.ReVertex(
441 name =
"BPHY13_Rev_Upsimumu",
442 InputVtxContainerName =
"BPHY13Upsimumu",
443 TrackIndices = [ 0, 1 ],
445 UseMassConstraint =
True,
446 VertexMass = Upsimass,
447 MassInputParticles = [Mumass, Mumass],
451 TrkVertexFitterTool = vkalvrt,
452 OutputVtxContainerName =
"BPHY13Upsimumu_revtx")
455 BPHY13_Rev_Phimutrk = CompFactory.DerivationFramework.ReVertex(
456 name =
"BPHY13_Rev_Phimutrk",
457 InputVtxContainerName =
"BPHY13Phimutrk",
458 TrackIndices = [ 0, 1 ],
460 UseMassConstraint =
True,
461 VertexMass = Phimass,
462 MassInputParticles = [Mumass, Mumass],
466 TrkVertexFitterTool = vkalvrt,
467 OutputVtxContainerName =
"BPHY13Phimutrk_revtx")
469 BPHY13_Rev_Jpsimutrk = CompFactory.DerivationFramework.ReVertex(
470 name =
"BPHY13_Rev_Jpsimutrk",
471 InputVtxContainerName =
"BPHY13Jpsimutrk",
472 TrackIndices = [ 0, 1 ],
474 UseMassConstraint =
True,
475 VertexMass = Jpsimass,
476 MassInputParticles = [Mumass, Mumass],
480 TrkVertexFitterTool = vkalvrt,
481 OutputVtxContainerName =
"BPHY13Jpsimutrk_revtx")
483 BPHY13_Rev_Psimutrk = CompFactory.DerivationFramework.ReVertex(
484 name =
"BPHY13_Rev_Psimutrk",
485 InputVtxContainerName =
"BPHY13Psimutrk",
486 TrackIndices = [ 0, 1 ],
488 UseMassConstraint =
True,
489 VertexMass = Psi2Smass,
490 MassInputParticles = [Mumass, Mumass],
494 TrkVertexFitterTool = vkalvrt,
495 OutputVtxContainerName =
"BPHY13Psimutrk_revtx")
497 BPHY13_Rev_Upsimutrk = CompFactory.DerivationFramework.ReVertex(
498 name =
"BPHY13_Rev_Upsimutrk",
499 InputVtxContainerName =
"BPHY13Upsimutrk",
500 TrackIndices = [ 0, 1 ],
502 UseMassConstraint =
True,
503 VertexMass = Upsimass,
504 MassInputParticles = [Mumass, Mumass],
508 TrkVertexFitterTool = vkalvrt,
509 OutputVtxContainerName =
"BPHY13Upsimutrk_revtx")
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",
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",
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,
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,
532 list_4mu_jpsi1mass = [Upsimass, Upsimass, Upsimass, Upsimass,
533 Psi2Smass, Psi2Smass, Psi2Smass,
534 Jpsimass, Jpsimass, Phimass,
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,
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,
544 list_4mu_jpsi2mass = [Upsimass, Psi2Smass, Jpsimass, Phimass,
545 Psi2Smass, Jpsimass, Phimass,
546 Jpsimass, Phimass, Phimass]
549 for hypo
in list_4mu_hypo:
550 list_4mu_obj.append( CompFactory.DerivationFramework.PsiPlusPsiSingleVertex(
"BPHY13_"+hypo) )
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
569 list_4mu_obj[i].Jpsi2Mass = list_4mu_jpsi2mass[i]
570 list_4mu_obj[i].ApplyJpsi2MassConstraint =
True
571 list_4mu_obj[i].Chi2Cut = 25.
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
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,
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,
612 list_3mu1trk_jpsi1mass = [Upsimass, Upsimass, Upsimass, Upsimass,
613 Psi2Smass, Psi2Smass, Psi2Smass,
614 Jpsimass, Jpsimass, Phimass,
615 Psi2Smass, Jpsimass, Phimass,
616 Jpsimass, Phimass, Phimass,
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,
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,
630 list_3mu1trk_jpsi2mass = [Upsimass, Psi2Smass, Jpsimass, Phimass,
631 Psi2Smass, Jpsimass, Phimass,
632 Jpsimass, Phimass, Phimass,
633 Upsimass, Upsimass, Upsimass,
634 Psi2Smass, Psi2Smass, Jpsimass,
637 list_3mu1trk_obj = []
638 for hypo
in list_3mu1trk_hypo:
639 list_3mu1trk_obj.append( CompFactory.DerivationFramework.PsiPlusPsiSingleVertex(
"BPHY13_"+hypo) )
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
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.
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
678 list_all_obj = list_4mu_obj + list_3mu1trk_obj
680 OutputCollections = []
682 RefPVAuxContainers = []
683 passedCandidates = []
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" ]
691 BPHY13_SelectEvent = CompFactory.DerivationFramework.AnyVertexSkimmingTool(name =
"BPHY13_SelectEvent", VertexContainerNames = passedCandidates)
692 acc.addPublicTool(BPHY13_SelectEvent)
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)
697 acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(
699 AugmentationTools = augmentation_tools,
700 SkimmingTools = [BPHY13_SelectEvent]
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
709 BPHY13_StaticContent = []
712 BPHY13SlimmingHelper.IncludeMuonTriggerContent =
True
713 BPHY13SlimmingHelper.IncludeBPhysTriggerContent =
True
716 BPHY13_AllVariables += [
"PrimaryVertices"]
717 BPHY13_StaticContent += RefPVContainers
718 BPHY13_StaticContent += RefPVAuxContainers
721 BPHY13_AllVariables += [
"InDetTrackParticles"]
726 BPHY13_AllVariables += [
"CombinedMuonTrackParticles",
"ExtrapolatedMuonTrackParticles"]
729 BPHY13_AllVariables += [
"Muons",
"MuonSegments"]
732 for output
in OutputCollections:
733 BPHY13_StaticContent += [
"xAOD::VertexContainer#%s" % output]
734 BPHY13_StaticContent += [
"xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % output]
738 BPHY13_AllVariables += [
"TruthEvents",
"TruthParticles",
"TruthVertices",
"MuonTruthParticles"]
740 BPHY13SlimmingHelper.SmartCollections = [
"Muons",
"PrimaryVertices",
"InDetTrackParticles"]
741 BPHY13SlimmingHelper.AllVariables = BPHY13_AllVariables
742 BPHY13SlimmingHelper.StaticContent = BPHY13_StaticContent
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, printComponentsOnly=
False)