Belle II Software  release-06-01-15
QualityEstimatorBase.h
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 #pragma once
10 
11 #include <boost/optional.hpp>
12 
13 #include <framework/geometry/B2Vector3.h>
14 #include <tracking/spacePointCreation/SpacePoint.h>
15 
16 
17 namespace Belle2 {
27  double qualityIndicator = 0;
28  boost::optional<double> chiSquared;
29  boost::optional<short> curvatureSign;
30  boost::optional<double> pocaD;
31  boost::optional<double> pt;
32  boost::optional<double> pmag;
33  boost::optional<B2Vector3D> p;
34  };
35 
44 
45  public:
48 
50  virtual ~QualityEstimatorBase() = default;
51 
55  void setMagneticFieldStrength(double magneticFieldZ = 1.5) {m_magneticFieldZ = magneticFieldZ;}
56 
62  virtual double estimateQuality(std::vector<SpacePoint const*> const& measurements) = 0;
63 
70  virtual QualityEstimationResults estimateQualityAndProperties(std::vector<SpacePoint const*> const& measurements)
71  {
74  return m_results;
75  }
76 
77 
78  protected:
79  // utility methods
82  double calcPt(double const radius) const { return m_magneticFieldZ * radius * 0.00299792458; }
83 
84  // Data members
86  double m_magneticFieldZ = 1.5;
87 
93  };
95 }
96 
BaseClass for QualityEstimators.
virtual double estimateQuality(std::vector< SpacePoint const * > const &measurements)=0
Minimal implementation of the quality estimation Calculates quality indicator in range [0,...
void setMagneticFieldStrength(double magneticFieldZ=1.5)
Setter for z component of magnetic field.
virtual QualityEstimationResults estimateQualityAndProperties(std::vector< SpacePoint const * > const &measurements)
Quality estimation providing additional quantities Calculates quality indicator in range [0,...
QualityEstimationResults m_results
Result of the quality estimation This is stored as a member variable, because some values may be calc...
double calcPt(double const radius) const
Returns a value for the transverse momentum in GeV calculated from a provided radius.
double m_magneticFieldZ
Member storing the z component of the magnetic field.
virtual ~QualityEstimatorBase()=default
Destructor.
Abstract base class for different kinds of events.
Container for complete fit/estimation results.
double qualityIndicator
return value of the quality estimator
boost::optional< double > pt
transverse momentum estimate from the QE
boost::optional< double > pocaD
distance to the z-axis of the POCA
boost::optional< double > pmag
momentum magnitute estimate from the QE
boost::optional< short > curvatureSign
direction of curvature as obtained by the QE
boost::optional< double > chiSquared
chi squared value obtained by the fit of the QE
boost::optional< B2Vector3D > p
momentum vector estimate from the QE