Belle II Software development
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
17namespace Belle2 {
26 class PlanarMomentumMeasurement : public genfit::PlanarMeasurement {
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 constructor with 1 dim.
Abstract base class for different kinds of events.