11import modularAnalysis
as ma
14def stdKKinks(path=None, writeOut=False, daughter='pi+'):
16 Load a list of kaon kinks from Kink objects using only kinks created
from track pairs (Filter 1
and 2).
17 Kaon to muon
and kaon to pion decays are hard to distinguish, so they are both saved by default.
19 The ParticleList
is named ``K+:kinks``. A simple clone suppression
is applied based on the
20 combined fit result flag. Loose kinematic cuts to suppress pion decays :math:`pPimu > 0.05~GeV`
and
21 muon decays :math:`pPemu > 0.07~GeV` are applied. In addition, events
with wrong kinematics are discarded
22 :math:`pKpi < 0.3~GeV`.
25 path (basf2.Path): the path to load the modules
26 writeOut (bool): whether RootOutput module should save the created ParticleList
27 daughter (str): the daughter to use
in the decay string
30 decayString =
'K+:kinks -> ' + daughter
31 ma.fillParticleList(decayString,
'', writeOut=writeOut, path=path)
32 clonesCut = (
'kinkCombinedFitResultFlag > 15 or kinkCombinedFitResultFlagB1==0 and '
33 'kinkCombinedFitResultFlagB2==0 and kinkCombinedFitResultFlagB4==0')
34 ma.applyCuts(
'K+:kinks',
39 'kinkDaughterMomentumInMotherRestFramePiMuHypothesis > 0.05 and \
40 kinkDaughterMomentumInMotherRestFrameMuEHypothesis > 0.07 and \
41 kinkDaughterMomentumInMotherRestFrameKPiHypothesis < 0.3 and \
46def stdPiKinks(path=None, writeOut=False, daughter='mu+'):
48 Load a list of pion kinks from Kink objects using only kinks created
from track pairs (Filter 1
and 2).
50 The ParticleList
is named ``pi+:kinks``. A simple clone suppression
is applied based on the
51 combined fit result flag. Loose kinematic cut to suppress other decays
is applied :math:`pPimu < 0.1~GeV`.
54 path (basf2.Path): the path to load the modules
55 writeOut (bool): whether RootOutput module should save the created ParticleList
56 daughter (str): the daughter to use
in the decay string
59 decayString =
'pi+:kinks -> ' + daughter
60 ma.fillParticleList(decayString,
'', writeOut=writeOut, path=path)
61 clonesCut = (
'kinkCombinedFitResultFlag > 15 or kinkCombinedFitResultFlagB1==0 and '
62 'kinkCombinedFitResultFlagB2==0 and kinkCombinedFitResultFlagB4==0')
63 ma.applyCuts(
'pi+:kinks',
66 ma.applyCuts(
'pi+:kinks',
'kinkDaughterMomentumInMotherRestFramePiMuHypothesis < 0.1 and kinkFilterID < 3', path=path)
69def stdMuKinks(path=None, writeOut=False, daughter='e+'):
71 Load a list of muon kinks from Kink objects using only kinks created
from track pairs (Filter 1
and 2).
73 The ParticleList
is named ``mu+:kinks``. A simple clone suppression
is applied based on the
74 combined fit result flag. Loose kinematic cuts to suppress pion decays :math:`pPimu > 0.05~GeV`
and
75 kaon decays :math:`pMue < 0.1~GeV` are applied.
78 path (basf2.Path): the path to load the modules
79 writeOut (bool): whether RootOutput module should save the created ParticleList
80 daughter (str): the daughter to use
in the decay string
83 decayString =
'mu+:kinks -> ' + daughter
84 ma.fillParticleList(decayString,
'', writeOut=writeOut, path=path)
85 clonesCut = (
'kinkCombinedFitResultFlag > 15 or kinkCombinedFitResultFlagB1==0 and '
86 'kinkCombinedFitResultFlagB2==0 and kinkCombinedFitResultFlagB4==0')
87 ma.applyCuts(
'mu+:kinks',
92 'kinkDaughterMomentumInMotherRestFramePiMuHypothesis > 0.05 and \
93 kinkDaughterMomentumInMotherRestFrameMuEHypothesis < 0.1 and kinkFilterID < 3',