Belle II Software  release-06-02-00
KFitVariables.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 // Own include
10 #include <analysis/variables/KFitVariables.h>
11 
12 #include <analysis/VariableManager/Manager.h>
13 #include <analysis/dataobjects/Particle.h>
14 
15 #include <framework/logging/Logger.h>
16 
17 using namespace std;
18 
19 namespace Belle2 {
24  namespace Variable {
25 
26 // Chi2 and Prob -------------------------------------------
27 
28  double FourCKFitChi2(const Particle* part)
29  {
30  if (part->hasExtraInfo("FourCFitChi2")) return part->getExtraInfo("FourCFitChi2");
31  else {
32  B2WARNING("The ExtraInfo 'FourCFitChi2' not found!");
33  return std::numeric_limits<float>::quiet_NaN();
34  }
35  }
36 
37  double FourCKFitProb(const Particle* part)
38  {
39  if (part->hasExtraInfo("FourCFitProb")) return part->getExtraInfo("FourCFitProb");
40  else {
41  B2WARNING("The ExtraInfo 'FourCFitProb' not found!");
42  return std::numeric_limits<float>::quiet_NaN();
43  }
44  }
45 
46 
47  VARIABLE_GROUP("FourCKFit");
48  REGISTER_VARIABLE("FourCKFitChi2", FourCKFitChi2, "Chi2 of four momentum-constraint kinematical fit in KFit");
49  REGISTER_VARIABLE("FourCKFitProb", FourCKFitProb, "Prob of four momentum-constraint kinematical fit in KFit");
50 
51 
52  }
54 }
Abstract base class for different kinds of events.