Belle II Software  release-08-01-10
BaseMeasurementCreatorFromHit.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 #pragma once
9 
10 #include <tracking/trackFitting/measurementCreator/creators/BaseMeasurementCreator.h>
11 #include <tracking/dataobjects/RecoHitInformation.h>
12 
13 #include <genfit/MeasurementFactory.h>
14 
15 #include <framework/gearbox/Const.h>
16 #include <vector>
17 
18 namespace genfit {
19  class AbsMeasurement;
20 }
21 
22 namespace Belle2 {
27  class RecoTrack;
28 
39  template <class HitType, Const::EDetector detector>
41  public:
44 
47 
49  virtual std::vector<genfit::TrackPoint*> createMeasurementPoints(HitType* hit, RecoTrack& recoTrack,
50  const RecoHitInformation& recoHitInformation) const = 0;
51 
52  protected:
63  genfit::AbsMeasurement* createCoordinateMeasurement(HitType* hit, const RecoHitInformation& recoHitInformation) const;
64 
67  RecoTrack& recoTrack,
68  const RecoHitInformation& recoHitInformation) const;
69 
70  private:
73 
75  std::vector<genfit::TrackPoint*> createMeasurementPoints(RecoTrack&) const override final
76  {
77  return {};
78  }
79  };
80 
92 
93  // Silence Doxygen which is complaining that "no matching class member found for"
94  // But there should be a better way that I just don't know of / find
96 
97  template<>
100  const RecoHitInformation& recoHitInformation) const;
102 
103 }
Base Class to create measurements based on a given hit related to the RecoTrack.
genfit::AbsMeasurement * createCoordinateMeasurement(HitType *hit, const RecoHitInformation &recoHitInformation) const
You probably need a coordinate measurement on which you can base your measurements in createMeasureme...
BaseMeasurementCreatorFromHit(const genfit::MeasurementFactory< genfit::AbsMeasurement > &measurementFactory)
Creates a MeasurementCreator which handles the creation of measurements of a given kind.
std::vector< genfit::TrackPoint * > createMeasurementPoints(RecoTrack &) const override final
We do not need this method in this overload.
const genfit::MeasurementFactory< genfit::AbsMeasurement > & m_measurementFactory
A reference to the prefilled measurement factory.
genfit::TrackPoint * createTrackPointWithRecoHitInformation(genfit::AbsMeasurement *coordinateMeasurement, RecoTrack &recoTrack, const RecoHitInformation &recoHitInformation) const
Helper: Create a TrackPoint from a measurement with a given RecoHitInformation.
virtual std::vector< genfit::TrackPoint * > createMeasurementPoints(HitType *hit, RecoTrack &recoTrack, const RecoHitInformation &recoHitInformation) const =0
Overload this method to create measurement track points from a given hit.
Base class for all measurement creators.
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
Definition: CDCHit.h:40
This class stores additional information to every CDC/SVD/PXD hit stored in a RecoTrack.
This is the Reconstruction Event-Data Model Track.
Definition: RecoTrack.h:79
Contains the measurement and covariance in raw detector coordinates.
Object containing AbsMeasurement and AbsFitterInfo objects.
Definition: TrackPoint.h:46
Abstract base class for different kinds of events.
Defines for I/O streams used for error and debug printing.