10 #include <analysis/variables/OrcaKinFitVariables.h>
13 #include <analysis/VariableManager/Manager.h>
15 #include <analysis/dataobjects/Particle.h>
17 #include <framework/logging/Logger.h>
29 double OrcaKinFitChi2(
const Particle* part)
31 if (part->hasExtraInfo(
"OrcaKinFitChi2"))
return part->getExtraInfo(
"OrcaKinFitChi2");
33 B2WARNING(
"The ExtraInfo 'OrcaKinFitChi2' not found!");
34 return Const::doubleNaN;
38 double OrcaKinFitProb(
const Particle* part)
40 if (part->hasExtraInfo(
"OrcaKinFitProb"))
return part->getExtraInfo(
"OrcaKinFitProb");
42 B2WARNING(
"The ExtraInfo 'OrcaKinFitProb' not found!");
43 return Const::doubleNaN;
47 double ErrorCode(
const Particle* part)
49 if (part->hasExtraInfo(
"OrcaKinFitErrorCode"))
return part->getExtraInfo(
"OrcaKinFitErrorCode");
51 B2WARNING(
"The ExtraInfo 'OrcaKinFitErrorCode' not found!");
52 return Const::doubleNaN;
58 double UnmeasuredTheta(
const Particle* part)
60 if (part->hasExtraInfo(
"OrcaKinFitUnmeasuredTheta"))
return part->getExtraInfo(
"OrcaKinFitUnmeasuredTheta");
62 B2WARNING(
"The ExtraInfo 'OrcaKinFitUnmeasuredTheta' not found!");
63 return Const::doubleNaN;
67 double UnmeasuredPhi(
const Particle* part)
69 if (part->hasExtraInfo(
"OrcaKinFitUnmeasuredPhi"))
return part->getExtraInfo(
"OrcaKinFitUnmeasuredPhi");
71 B2WARNING(
"The ExtraInfo 'OrcaKinFitUnmeasuredPhi' not found!");
72 return Const::doubleNaN;
76 double UnmeasuredE(
const Particle* part)
78 if (part->hasExtraInfo(
"OrcaKinFitUnmeasuredE"))
return part->getExtraInfo(
"OrcaKinFitUnmeasuredE");
80 B2WARNING(
"The ExtraInfo 'OrcaKinFitUnmeasuredE' not found!");
81 return Const::doubleNaN;
85 double UnmeasuredErrorTheta(
const Particle* part)
87 if (part->hasExtraInfo(
"OrcaKinFitUnmeasuredErrorTheta"))
return part->getExtraInfo(
"OrcaKinFitUnmeasuredErrorTheta");
89 B2WARNING(
"The ExtraInfo 'OrcaKinFitUnmeasuredErrorTheta' not found!");
90 return Const::doubleNaN;
94 double UnmeasuredErrorPhi(
const Particle* part)
96 if (part->hasExtraInfo(
"OrcaKinFitUnmeasuredErrorPhi"))
return part->getExtraInfo(
"OrcaKinFitUnmeasuredErrorPhi");
98 B2WARNING(
"The ExtraInfo 'OrcaKinFitUnmeasuredErrorPhi' not found!");
99 return Const::doubleNaN;
103 double UnmeasuredErrorE(
const Particle* part)
105 if (part->hasExtraInfo(
"OrcaKinFitUnmeasuredErrorE"))
return part->getExtraInfo(
"OrcaKinFitUnmeasuredErrorE");
107 B2WARNING(
"The ExtraInfo 'OrcaKinFitUnmeasuredErrorE' not found!");
108 return Const::doubleNaN;
113 VARIABLE_GROUP(
"OrcaKinFit");
114 REGISTER_VARIABLE(
"OrcaKinFitChi2", OrcaKinFitChi2, R
"DOC(
115 The :math:`\chi^2` returned by the Orca kinematic fitter.
116 Returns NaN if Orca was not run.
118 .. warning:: this is the raw :math:`\chi^2`, not over ndf.
120 .. seealso:: :ref:`kinfit`
122 REGISTER_VARIABLE("OrcaKinFitProb", OrcaKinFitProb, R
"DOC(
123 The p-value returned by the Orca kinematic fitter.
124 Returns NaN if Orca was not run.
126 .. seealso:: :ref:`kinfit`
129 REGISTER_VARIABLE(
"OrcaKinFitErrorCode", ErrorCode, R
"DOC(
130 The error code returned by the Orca kinematic fitter.
131 Returns NaN if Orca was not run.
133 .. seealso:: :ref:`kinfit`
135 REGISTER_VARIABLE("OrcaKinFitUnmeasuredTheta", UnmeasuredTheta, R
"DOC(
136 The polar angle of the "unmeasured photon" returned by Orca kinematic fitter for specific 1C fits with the ``addUnmeasuredPhoton`` parameter set.
137 I.e. for fits with sufficient constraints remaining to constrain a missing 3-vector.
138 Returns NaN if Orca was not run or if the ``addUnmeasuredPhoton`` parameter was not set.
140 .. seealso:: :ref:`kinfit`
143 REGISTER_VARIABLE(
"OrcaKinFitUnmeasuredPhi", UnmeasuredPhi, R
"DOC(
144 The azimuthal angle of the "unmeasured photon" returned by Orca kinematic fitter for specific 1C fits with the ``addUnmeasuredPhoton`` parameter set.
145 I.e. for fits with sufficient constraints remaining to constrain a missing 3-vector.
146 Returns NaN if Orca was not run or if the ``addUnmeasuredPhoton`` parameter was not set.
148 .. seealso:: :ref:`kinfit`
151 REGISTER_VARIABLE(
"OrcaKinFitUnmeasuredE", UnmeasuredE, R
"DOC(
152 The energy of the "unmeasured photon" returned by Orca kinematic fitter for specific 1C fits with the ``addUnmeasuredPhoton`` parameter set.
153 I.e. for fits with sufficient constraints remaining to constrain a missing 3-vector.
154 Returns NaN if Orca was not run or if the ``addUnmeasuredPhoton`` parameter was not set.
156 .. seealso:: :ref:`kinfit`
159 REGISTER_VARIABLE(
"OrcaKinFitUnmeasuredErrorTheta", UnmeasuredErrorTheta,
160 "The uncertainty on :b2:var:`OrcaKinFitUnmeasuredTheta`.\n\n",
"rad");
161 REGISTER_VARIABLE(
"OrcaKinFitUnmeasuredErrorPhi", UnmeasuredErrorPhi,
"The uncertainty on :b2:var:`OrcaKinFitUnmeasuredPhi`.\n\n",
163 REGISTER_VARIABLE(
"OrcaKinFitUnmeasuredErrorE", UnmeasuredErrorE,
"The uncertainty on :b2:var:`OrcaKinFitUnmeasuredE`.\n\n",
"GeV");
Abstract base class for different kinds of events.