Belle II Software  release-08-01-10
PlanarMomentumMeasurement.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 <genfit/PlanarMeasurement.h>
12 #include <genfit/RKTrackRep.h>
13 #include <tracking/trackFitting/measurementCreator/measurements/HMatrixQP.h>
14 #include <framework/logging/Logger.h>
15 
16 
17 namespace Belle2 {
27 
28  public:
30  PlanarMomentumMeasurement() : genfit::PlanarMeasurement(1) {}
31 
33  explicit PlanarMomentumMeasurement(const genfit::PlanarMeasurement& parentElement) :
34  genfit::PlanarMeasurement(parentElement)
35  {
36  rawHitCoords_.ResizeTo(1);
37  rawHitCov_.ResizeTo(1, 1);
38  }
39 
41  virtual genfit::AbsMeasurement* clone() const override {return new PlanarMomentumMeasurement(*this);}
42 
44  virtual const genfit::AbsHMatrix* constructHMatrix(const genfit::AbsTrackRep* rep) const override
45  {
46  if (dynamic_cast<const genfit::RKTrackRep*>(rep) == nullptr) {
47  B2FATAL("PlanarMomentumMeasurement default implementation can only handle state vectors of type RKTrackRep!");
48  }
49 
50  return new HMatrixQP();
51  }
52  };
54 }
AbsHMatrix implementation for one-dimensional MeasurementOnPlane and RKTrackRep parameterization.
Definition: HMatrixQP.h:27
Measurement class implementing a planar hit geometry (1 or 2D) with only a momentum measurement.
virtual const genfit::AbsHMatrix * constructHMatrix(const genfit::AbsTrackRep *rep) const override
Construct the QP matrix.
virtual genfit::AbsMeasurement * clone() const override
Clone.
PlanarMomentumMeasurement(const genfit::PlanarMeasurement &parentElement)
Copy from other planar measurement and resize the hit coords to one dimension.
PlanarMomentumMeasurement()
Default contructor with 1 dim.
HMatrix for projecting from AbsTrackRep parameters to measured parameters in a DetPlane.
Definition: AbsHMatrix.h:37
Contains the measurement and covariance in raw detector coordinates.
Abstract base class for a track representation.
Definition: AbsTrackRep.h:66
Measurement class implementing a planar hit geometry (1 or 2D).
AbsTrackRep with 5D track parameterization in plane coordinates: (q/p, u', v', u, v)
Definition: RKTrackRep.h:72
Abstract base class for different kinds of events.
Defines for I/O streams used for error and debug printing.