Belle II Software  release-08-01-10
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 <framework/geometry/B2Vector3.h>
12 #include <tracking/spacePointCreation/SpacePoint.h>
13 
14 
15 namespace Belle2 {
25  double qualityIndicator = 0;
26  std::optional<double> chiSquared;
27  std::optional<short> curvatureSign;
28  std::optional<double> pocaD;
29  std::optional<double> pt;
30  std::optional<double> pmag;
31  std::optional<B2Vector3D> p;
32  };
33 
42 
43  public:
46 
48  virtual ~QualityEstimatorBase() = default;
49 
53  void setMagneticFieldStrength(double magneticFieldZ = 1.5) {m_magneticFieldZ = magneticFieldZ;}
54 
60  virtual double estimateQuality(std::vector<SpacePoint const*> const& measurements) = 0;
61 
68  virtual QualityEstimationResults estimateQualityAndProperties(std::vector<SpacePoint const*> const& measurements)
69  {
72  return m_results;
73  }
74 
75 
76  protected:
77  // utility methods
80  double calcPt(double const radius) const { return m_magneticFieldZ * radius * 0.00299792458; }
81 
82  // Data members
84  double m_magneticFieldZ = 1.5;
85 
91  };
93 }
94 
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.
std::optional< double > pt
transverse momentum estimate from the QE
std::optional< short > curvatureSign
direction of curvature as obtained by the QE
double qualityIndicator
return value of the quality estimator
std::optional< double > pocaD
distance to the z-axis of the POCA
std::optional< double > chiSquared
chi squared value obtained by the fit of the QE
std::optional< B2Vector3D > p
momentum vector estimate from the QE
std::optional< double > pmag
momentum magnitute estimate from the QE