11 from basf2
import register_module
16 fitterEngine='NewFitterGSL',
17 constraint='HardBeam',
19 addUnmeasuredPhoton=False,
23 Perform a 4C momentum constraint kinematic fit for particles in the given ParticleList.
25 @param list_name name of the input ParticleList
26 @param fitterEngine which fitter engine to use? 'NewFitterGSL' or 'OPALFitterGSL'
27 @param constraint HardBeam or RecoilMass
28 @param daughtersUpdate make copy of the daughters and update them after the vertex fit
29 @param addUnmeasuredPhoton add one unmeasured photon (uses up three constraints)
30 @param path modules are added to this path
33 orca = register_module(
'ParticleKinematicFitter')
34 orca.set_name(
'ParticleKinematicFitter_' + list_name)
35 orca.param(
'debugFitter',
False)
36 orca.param(
'orcaTracer',
'None')
37 orca.param(
'orcaFitterEngine', fitterEngine)
38 orca.param(
'orcaConstraint', constraint)
39 orca.param(
'listName', list_name)
40 orca.param(
'updateDaughters', daughtersUpdate)
41 orca.param(
'addUnmeasuredPhoton', addUnmeasuredPhoton)
45 def UnmeasuredfitKinematic1C(
47 fitterEngine='NewFitterGSL',
48 constraint='HardBeam',
53 Perform 1C momentum constraint kinematic fit with one unmeasured photon for particles in the given ParticleList.
55 @param list_name name of the input ParticleList
56 @param fitterEngine which fitter engine to use? 'NewFitterGSL' or 'OPALFitterGSL'
57 @param constraint HardBeam or RecoilMass
58 @param daughtersUpdate make copy of the daughters and update them after the vertex fit
59 @param path modules are added to this path
62 orca = register_module(
'ParticleKinematicFitter')
63 orca.set_name(
'ParticleKinematicFitter_' + list_name)
64 orca.param(
'debugFitter',
False)
65 orca.param(
'orcaTracer',
'None')
66 orca.param(
'orcaFitterEngine', fitterEngine)
67 orca.param(
'orcaConstraint', constraint)
68 orca.param(
'listName', list_name)
69 orca.param(
'updateDaughters', daughtersUpdate)
70 orca.param(
'addUnmeasuredPhoton',
True)
76 fitterEngine='NewFitterGSL',
77 constraint='HardBeam',
79 addUnmeasuredPhoton=False,
84 Perform 3C momentum constraint kinematic fit with one photon with unmeasured energy for particles
85 in the given ParticleList, the first daughter should be the energy unmeasured Photon.
87 @param list_name name of the input ParticleList
88 @param fitterEngine which fitter engine to use? 'NewFitterGSL' or 'OPALFitterGSL'
89 @param constraint HardBeam or RecoilMass
90 @param daughtersUpdate make copy of the daughters and update them after the vertex fit
91 @param addUnmeasuredPhoton add one unmeasured photon (uses up three constraints)
92 @param add3CPhoton add one photon with unmeasured energy (uses up a constraint)
93 @param path modules are added to this path
96 orca = register_module(
'ParticleKinematicFitter')
97 orca.set_name(
'ParticleKinematicFitter_' + list_name)
98 orca.param(
'debugFitter',
False)
99 orca.param(
'orcaTracer',
'None')
100 orca.param(
'orcaFitterEngine', fitterEngine)
101 orca.param(
'orcaConstraint', constraint)
102 orca.param(
'listName', list_name)
103 orca.param(
'updateDaughters', daughtersUpdate)
104 orca.param(
'addUnmeasuredPhoton', addUnmeasuredPhoton)
105 orca.param(
'add3CPhoton', add3CPhoton)
106 path.add_module(orca)
109 def MassfitKinematic1CRecoil(
112 fitterEngine='NewFitterGSL',
113 constraint='RecoilMass',
114 daughtersUpdate=True,
118 Perform recoil mass kinematic fit for particles in the given ParticleList.
120 @param list_name name of the input ParticleList
121 @param fitterEngine which fitter engine to use? 'NewFitterGSL' or 'OPALFitterGSL'
122 @param constraint HardBeam or RecoilMass
123 @param recoilMass RecoilMass (GeV)
124 @param daughtersUpdate make copy of the daughters and update them after the vertex fit
125 @param path modules are added to this path
128 orca = register_module(
'ParticleKinematicFitter')
129 orca.set_name(
'ParticleKinematicFitter_' + list_name)
130 orca.param(
'debugFitter',
False)
131 orca.param(
'orcaTracer',
'None')
132 orca.param(
'orcaFitterEngine', fitterEngine)
133 orca.param(
'orcaConstraint', constraint)
134 orca.param(
'recoilMass', recoilMass)
135 orca.param(
'listName', list_name)
136 orca.param(
'updateDaughters', daughtersUpdate)
137 orca.param(
'addUnmeasuredPhoton',
False)
138 path.add_module(orca)
141 def MassfitKinematic1C(
144 fitterEngine='NewFitterGSL',
146 daughtersUpdate=True,
150 Perform recoil mass kinematic fit for particles in the given ParticleList.
152 @param list_name name of the input ParticleList
153 @param fitterEngine which fitter engine to use? 'NewFitterGSL' or 'OPALFitterGSL'
154 @param constraint HardBeam or RecoilMass or Mass
155 @param invMass Invariant Mass (GeV)
156 @param daughtersUpdate make copy of the daughters and update them after the vertex fit
157 @param path modules are added to this path
160 orca = register_module(
'ParticleKinematicFitter')
161 orca.set_name(
'ParticleKinematicFitter_' + list_name)
162 orca.param(
'debugFitter',
False)
163 orca.param(
'orcaTracer',
'None')
164 orca.param(
'orcaFitterEngine', fitterEngine)
165 orca.param(
'orcaConstraint', constraint)
166 orca.param(
'invMass', invMass)
167 orca.param(
'listName', list_name)
168 orca.param(
'updateDaughters', daughtersUpdate)
169 orca.param(
'addUnmeasuredPhoton',
False)
170 path.add_module(orca)
173 if __name__ ==
'__main__':
175 pretty_print_module(__name__,
"kinfit")