forked from lhcb/second-analysis-steps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_decays.py
55 lines (47 loc) · 1.69 KB
/
build_decays.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
"""Build D* -> D0 (->K pi) pi decays from scratch."""
from PhysSelPython.Wrappers import (
Selection,
SelectionSequence,
DataOnDemand,
SimpleSelection
)
import GaudiConfUtils.ConfigurableGenerators as ConfigurableGenerators
from Configurables import CombineParticles, DaVinci
Pions = DataOnDemand('Phys/StdAllNoPIDsPions/Particles')
Kaons = DataOnDemand('Phys/StdAllLooseKaons/Particles')
d0_daughters = {
'pi-': '(PT > 750*MeV) & (P > 4000*MeV) & (MIPCHI2DV(PRIMARY) > 4)',
'K+': '(PT > 750*MeV) & (P > 4000*MeV) & (MIPCHI2DV(PRIMARY) > 4)'
}
d0_comb = "(AMAXDOCA('') < 0.2*mm) & (ADAMASS('D0') < 100*MeV)"
# We can split long selections across multiple lines
d0_mother = (
'(VFASPF(VCHI2/VDOF)< 9)'
'& (BPVDIRA > 0.9997)'
"& (ADMASS('D0') < 70*MeV)"
)
d0 = CombineParticles('Combine_D0',
DecayDescriptor='[D0 -> pi- K+]cc',
DaughtersCuts=d0_daughters,
CombinationCut=d0_comb,
MotherCut=d0_mother)
d0_sel = Selection('Sel_D0',
Algorithm=d0,
RequiredSelections=[Pions, Kaons])
dstar_daughters = {'pi+': '(TRCHI2DOF < 3) & (PT > 100*MeV)'}
dstar_comb = "(ADAMASS('D*(2010)+') < 400*MeV)"
dstar_mother = (
"(abs(M-MAXTREE('D0'==ABSID,M)-145.42) < 10*MeV)"
'& (VFASPF(VCHI2/VDOF)< 9)'
)
dstar_sel = SimpleSelection(
'Sel_Dstar',
ConfigurableGenerators.CombineParticles,
[d0_sel, Pions],
DecayDescriptor='[D*(2010)+ -> D0 pi+]cc',
DaughtersCuts=dstar_daughters,
CombinationCut=dstar_comb,
MotherCut=dstar_mother
)
dstar_seq = SelectionSequence('Dstar_Seq', TopSelection=dstar_sel)
DaVinci().UserAlgorithms += [dstar_seq.sequence()]