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};
Baseclass to create measurement track points based on the coordinate measurements.
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< HitType >::CorrectionFitParameters m_correctionFitParameters
Parameters for the correction function.
bool m_useMCInformation
Use the seeds of the track finder or the seeds of the MC particles.
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...
bool m_useTrackingSeeds
Use the tracking seeds in the origin for calculating the path length rather than the current state.
VXDMomentumEstimation< HitType >::FitParameters m_fitParameters
Parameters for the main function.
virtual ~VXDMomentumEstimationMeasurementCreator()
Destructor.
double m_minimumMomentum
Minimal value for the momentum below the estimation is used.
double m_sigma
Sigma of the measurement.
bool m_useThickness
Use the thickness of the clusters of the path length for estimating dX.
VXDMomentumEstimationMeasurementCreator(const genfit::MeasurementFactory< genfit::AbsMeasurement > &measurementFactory)
Constructor.
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.