4 from basf2
import register_module
10 fitterEngine='NewFitterGSL',
11 constraint='HardBeam',
13 addUnmeasuredPhoton=False,
17 Perform 4C momentum constraint kinematic fit for particles in the given ParticleList.
19 @param list_name name of the input ParticleList
20 @param fitterEngine NewFitterGSL or OPALFitterGSL
21 @param constraint HardBeam or RecoilMass
22 @param daughtersUpdate make copy of the daughters and update them after the vertex fit
23 @param addUnmeasuredPhoton add one unmeasured photon (costs 3C)
24 @param path modules are added to this path
27 orca = register_module(
'ParticleKinematicFitter')
28 orca.set_name(
'ParticleKinematicFitter_' + list_name)
29 orca.param(
'debugFitter',
False)
30 orca.param(
'orcaTracer',
'None')
31 orca.param(
'orcaFitterEngine', fitterEngine)
32 orca.param(
'orcaConstraint', constraint)
33 orca.param(
'listName', list_name)
34 orca.param(
'updateDaughters', daughtersUpdate)
35 orca.param(
'addUnmeasuredPhoton', addUnmeasuredPhoton)
39 def UnmeasuredfitKinematic1C(
41 fitterEngine='NewFitterGSL',
42 constraint='HardBeam',
44 addUnmeasuredPhoton=True,
48 Perform 1C momentum constraint kinematic fit with one unmeasured photon for particles in the given ParticleList.
50 @param list_name name of the input ParticleList
51 @param fitterEngine NewFitterGSL or OPALFitterGSL
52 @param constraint HardBeam or RecoilMass
53 @param daughtersUpdate make copy of the daughters and update them after the vertex fit
54 @param addUnmeasuredPhoton add one unmeasured photon (costs 3C)
55 @param path modules are added to this path
58 orca = register_module(
'ParticleKinematicFitter')
59 orca.set_name(
'ParticleKinematicFitter_' + list_name)
60 orca.param(
'debugFitter',
False)
61 orca.param(
'orcaTracer',
'None')
62 orca.param(
'orcaFitterEngine', fitterEngine)
63 orca.param(
'orcaConstraint', constraint)
64 orca.param(
'listName', list_name)
65 orca.param(
'updateDaughters', daughtersUpdate)
66 orca.param(
'addUnmeasuredPhoton', addUnmeasuredPhoton)
72 fitterEngine='NewFitterGSL',
73 constraint='HardBeam',
75 addUnmeasuredPhoton=False,
80 Perform 3C momentum constraint kinematic fit with one photon with unmeasured energy for particles
81 in the given ParticleList, the first daughter should be the energy unmeasured Photon.
83 @param list_name name of the input ParticleList
84 @param fitterEngine NewFitterGSL or OPALFitterGSL
85 @param constraint HardBeam or RecoilMass
86 @param daughtersUpdate make copy of the daughters and update them after the vertex fit
87 @param addUnmeasuredPhoton add one unmeasured photon (costs 3C)
88 @param add3CPhoton add one photon with unmeasured energy (costs 1C)
89 @param path modules are added to this path
92 orca = register_module(
'ParticleKinematicFitter')
93 orca.set_name(
'ParticleKinematicFitter_' + list_name)
94 orca.param(
'debugFitter',
False)
95 orca.param(
'orcaTracer',
'None')
96 orca.param(
'orcaFitterEngine', fitterEngine)
97 orca.param(
'orcaConstraint', constraint)
98 orca.param(
'listName', list_name)
99 orca.param(
'updateDaughters', daughtersUpdate)
100 orca.param(
'addUnmeasuredPhoton', addUnmeasuredPhoton)
101 orca.param(
'add3CPhoton', add3CPhoton)
102 path.add_module(orca)
105 def MassfitKinematic1CRecoil(
108 fitterEngine='NewFitterGSL',
109 constraint='RecoilMass',
110 daughtersUpdate=True,
111 addUnmeasuredPhoton=False,
115 Perform recoil mass kinematic fit for particles in the given ParticleList.
117 @param list_name name of the input ParticleList
118 @param fitterEngine NewFitterGSL or OPALFitterGSL
119 @param constraint HardBeam or RecoilMass
120 @param recoilMass RecoilMass (GeV)
121 @param daughtersUpdate make copy of the daughters and update them after the vertex fit
122 @param addUnmeasuredPhoton add one unmeasured photon (costs 3C)
123 @param path modules are added to this path
126 orca = register_module(
'ParticleKinematicFitter')
127 orca.set_name(
'ParticleKinematicFitter_' + list_name)
128 orca.param(
'debugFitter',
False)
129 orca.param(
'orcaTracer',
'None')
130 orca.param(
'orcaFitterEngine', fitterEngine)
131 orca.param(
'orcaConstraint', constraint)
132 orca.param(
'recoilMass', recoilMass)
133 orca.param(
'listName', list_name)
134 orca.param(
'updateDaughters', daughtersUpdate)
135 orca.param(
'addUnmeasuredPhoton', addUnmeasuredPhoton)
136 path.add_module(orca)
139 def MassfitKinematic1C(
142 fitterEngine='NewFitterGSL',
144 daughtersUpdate=True,
145 addUnmeasuredPhoton=False,
149 Perform recoil mass kinematic fit for particles in the given ParticleList.
151 @param list_name name of the input ParticleList
152 @param fitterEngine NewFitterGSL or OPALFitterGSL
153 @param constraint HardBeam or RecoilMass or Mass
154 @param invMass Inviriant Mass (GeV)
155 @param daughtersUpdate make copy of the daughters and update them after the vertex fit
156 @param addUnmeasuredPhoton add one unmeasured photon (costs 3C)
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', addUnmeasuredPhoton)
170 path.add_module(orca)
173 if __name__ ==
'__main__':
175 pretty_print_module(__name__,
"kinfit")