Belle II Software development
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
18namespace genfit {
19 class AbsMeasurement;
20}
21
22namespace Belle2 {
27 class RecoTrack;
28
39 template <class HitType, Const::EDetector detector>
41 public:
43 explicit BaseMeasurementCreatorFromHit(const genfit::MeasurementFactory<genfit::AbsMeasurement>& measurementFactory);
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
66 genfit::TrackPoint* createTrackPointWithRecoHitInformation(genfit::AbsMeasurement* coordinateMeasurement,
67 RecoTrack& recoTrack,
68 const RecoHitInformation& recoHitInformation) const;
69
70 private:
72 const genfit::MeasurementFactory<genfit::AbsMeasurement>& m_measurementFactory;
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<>
98 genfit::AbsMeasurement*
100 const RecoHitInformation& recoHitInformation) const;
102
103}
Base Class to create measurements based on a given hit related to the RecoTrack.
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.
genfit::AbsMeasurement * createCoordinateMeasurement(HitType *hit, const RecoHitInformation &recoHitInformation) const
You probably need a coordinate measurement on which you can base your measurements in createMeasureme...
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.
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
Abstract base class for different kinds of events.