10#include <tracking/trackFitting/measurementCreator/creators/BaseMeasurementCreatorFromCoordinateMeasurement.h>
11#include <tracking/vxdMomentumEstimation/VXDMomentumEstimation.h>
12#include <tracking/trackFitting/measurementCreator/measurements/PlanarVXDMomentumMeasurement.h>
13#include <genfit/PlanarMeasurement.h>
26 template <
class HitType, Const::EDetector detector>
37 void setParameter(
const std::string& parameterName,
const std::string& parameterValue)
override
39 if (parameterName ==
"minimumMomentum") {
41 }
else if (parameterName ==
"aE") {
43 }
else if (parameterName ==
"bE") {
45 }
else if (parameterName ==
"cE") {
47 }
else if (parameterName ==
"dE") {
49 }
else if (parameterName ==
"aM") {
51 }
else if (parameterName ==
"bM") {
53 }
else if (parameterName ==
"cM") {
55 }
else if (parameterName ==
"dM") {
57 }
else if (parameterName ==
"useMCInformation") {
59 }
else if (parameterName ==
"useThickness") {
61 }
else if (parameterName ==
"sigma") {
62 m_sigma = std::stod(parameterValue);
63 }
else if (parameterName ==
"useTrackingSeeds") {
66 B2FATAL(
"A parameter with the name " << parameterName <<
" and the value " << parameterValue <<
" could not be set.");
76 genfit::AbsMeasurement* coordinateMeasurement)
const override
78 genfit::PlanarMeasurement* planarMeasurement =
dynamic_cast<genfit::PlanarMeasurement*
>(coordinateMeasurement);
79 if (planarMeasurement ==
nullptr) {
80 B2FATAL(
"Can only add VXD hits which are based on PlanarMeasurements with momentum estimation!");
100 return {momentumMeasurement};
BaseMeasurementCreatorFromCoordinateMeasurement(const genfit::MeasurementFactory< genfit::AbsMeasurement > &measurementFactory)
Needs the genfit MeasurementFactory for this.
Measurement class implementing a planar hit geometry (1 or 2D) with a momentum measurement based on t...
void setUseTrackingSeeds(bool useTrackingSeeds)
Set whether to use tracking seeds not the current state.
void setSigma(double sigma)
Set the measurement sigma.
void setUseMCInformation(bool useMCInformation)
Set whether to use mc information.
void setUseThickness(bool useThickness)
Set whether to use the thickness.
void setCorrectionFitParameters(const typename VXDMomentumEstimation< HitType >::CorrectionFitParameters &correctionFitParameters)
Set the correction fit parameters.
void setFitParameters(const typename VXDMomentumEstimation< HitType >::FitParameters &fitParameters)
Set the fit parameters.
This is the Reconstruction Event-Data Model Track.
ROOT::Math::XYZVector getMomentumSeed() const
Return the momentum seed stored in the reco track. ATTENTION: This is not the fitted momentum.
Creator for VXDMeasurements with momentum estimation based on the dEdX information.
VXDMomentumEstimation< RecoHitInformation::UsedSVDHit >::CorrectionFitParameters m_correctionFitParameters
virtual std::vector< genfit::AbsMeasurement * > createMeasurementFromCoordinateMeasurement(HitType *hit, const RecoTrack &recoTrack, const RecoHitInformation &, genfit::AbsMeasurement *coordinateMeasurement) const override
Create a measurement based on the momentum estimation given by the VXDMomentumEstimation class.
void setParameter(const std::string ¶meterName, const std::string ¶meterValue) override
Set the parameters of the fit functions and whether to use the thickness or not or the tracking seeds...
VXDMomentumEstimation< RecoHitInformation::UsedSVDHit >::FitParameters m_fitParameters
virtual ~VXDMomentumEstimationMeasurementCreator()
Destructor.
VXDMomentumEstimationMeasurementCreator(const genfit::MeasurementFactory< genfit::AbsMeasurement > &measurementFactory)
Constructor.
VXDMomentumEstimationMeasurementCreator< RecoHitInformation::UsedPXDHit, Const::PXD > PXDMomentumMeasurementCreator
Momentum measurement creator for the PXD.
VXDMomentumEstimationMeasurementCreator< RecoHitInformation::UsedSVDHit, Const::SVD > SVDMomentumMeasurementCreator
Momentum measurement creator for the SVD.
Abstract base class for different kinds of events.
Struct holding the parameters of the correction function to map them median of the estimation functio...
Struct holding the parameters of the estimation function which maps dEdX to p.