Belle II Software  release-05-01-25
PlanarMomentumMeasurement.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Nils Braun *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <genfit/PlanarMeasurement.h>
14 #include <genfit/RKTrackRep.h>
15 #include <tracking/trackFitting/measurementCreator/measurements/HMatrixQP.h>
16 #include <framework/logging/Logger.h>
17 
18 
19 namespace Belle2 {
28  class PlanarMomentumMeasurement : public genfit::PlanarMeasurement {
29 
30  public:
32  PlanarMomentumMeasurement() : genfit::PlanarMeasurement(1) {}
33 
35  explicit PlanarMomentumMeasurement(const genfit::PlanarMeasurement& parentElement) :
36  genfit::PlanarMeasurement(parentElement)
37  {
38  rawHitCoords_.ResizeTo(1);
39  rawHitCov_.ResizeTo(1, 1);
40  }
41 
43  virtual genfit::AbsMeasurement* clone() const override {return new PlanarMomentumMeasurement(*this);}
44 
46  virtual const genfit::AbsHMatrix* constructHMatrix(const genfit::AbsTrackRep* rep) const override
47  {
48  if (dynamic_cast<const genfit::RKTrackRep*>(rep) == nullptr) {
49  B2FATAL("PlanarMomentumMeasurement default implementation can only handle state vectors of type RKTrackRep!");
50  }
51 
52  return new HMatrixQP();
53  }
54  };
56 }
genfit
Defines for I/O streams used for error and debug printing.
Definition: AlignablePXDRecoHit.h:19
genfit::AbsTrackRep
Abstract base class for a track representation.
Definition: AbsTrackRep.h:66
Belle2::HMatrixQP
AbsHMatrix implementation for one-dimensional MeasurementOnPlane and RKTrackRep parameterization.
Definition: HMatrixQP.h:37
genfit::PlanarMeasurement
Measurement class implementing a planar hit geometry (1 or 2D).
Definition: PlanarMeasurement.h:44
genfit::RKTrackRep
AbsTrackRep with 5D track parameterization in plane coordinates: (q/p, u', v', u, v)
Definition: RKTrackRep.h:72
Belle2::PlanarMomentumMeasurement::PlanarMomentumMeasurement
PlanarMomentumMeasurement(const genfit::PlanarMeasurement &parentElement)
Copy from other planar measurement and resize the hit coords to one dimension.
Definition: PlanarMomentumMeasurement.h:43
genfit::AbsMeasurement
Contains the measurement and covariance in raw detector coordinates.
Definition: AbsMeasurement.h:42
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::PlanarMomentumMeasurement::PlanarMomentumMeasurement
PlanarMomentumMeasurement()
Default contructor with 1 dim.
Definition: PlanarMomentumMeasurement.h:40
genfit::AbsHMatrix
HMatrix for projecting from AbsTrackRep parameters to measured parameters in a DetPlane.
Definition: AbsHMatrix.h:37
Belle2::PlanarMomentumMeasurement::clone
virtual genfit::AbsMeasurement * clone() const override
Clone.
Definition: PlanarMomentumMeasurement.h:51
Belle2::PlanarMomentumMeasurement::constructHMatrix
virtual const genfit::AbsHMatrix * constructHMatrix(const genfit::AbsTrackRep *rep) const override
Construct the QP matrix.
Definition: PlanarMomentumMeasurement.h:54