 |
Belle II Software
release-05-01-25
|
10 #include <tracking/trackFindingCDC/filters/facet/FitFacetVarSet.h>
12 #include <tracking/trackFindingCDC/fitting/FacetFitter.h>
14 #include <tracking/trackFindingCDC/eventdata/hits/CDCFacet.h>
15 #include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
17 #include <tracking/trackFindingCDC/numerics/Quadratic.h>
20 using namespace TrackFindingCDC;
24 if (not ptrFacet)
return false;
33 constexpr
const int nSteps = 0;
36 const double s = fitLine->
lengthOnCurve(startWirePos2D, endWirePos2D);
39 var<
named(
"chi2_0_per_s")>() = chi2_0 / s;
41 var<
named(
"fit_0_phi0_sigma")>() = std::sqrt(fitLine.
variance(ELineParameter::c_Phi0));
46 constexpr
const int nSteps = 1;
49 const double s = fitLine->
lengthOnCurve(startWirePos2D, endWirePos2D);
52 var<
named(
"chi2_1_per_s")>() = chi2_1 / s;
54 var<
named(
"fit_1_phi0_sigma")>() = std::sqrt(fitLine.
variance(ELineParameter::c_Phi0));
61 const double s = fitLine->
lengthOnCurve(startWirePos2D, endWirePos2D);
64 var<
named(
"chi2_per_s")>() = chi2 / s;
67 constexpr
const double erfWidth = 120.0;
68 constexpr
const double tanhWidth = 1.64 * erfWidth;
70 var<
named(
"erf")>() = std::erf(chi2 / erfWidth);
71 var<
named(
"tanh")>() = std::tanh(chi2 / tanhWidth);
73 var<
named(
"fit_phi0_sigma")>() = std::sqrt(fitLine.
variance(ELineParameter::c_Phi0));
83 const double startDistance = fitLine->
distance(startWirePos2D) - startL;
84 const double middleDistance = fitLine->
distance(middleWirePos2D) - middleL;
85 const double endDistance = fitLine->
distance(endWirePos2D) - endL;
87 var<
named(
"start_distance")>() = startDistance;
88 var<
named(
"middle_distance")>() = middleDistance;
89 var<
named(
"end_distance")>() = endDistance;
90 var<
named(
"d2")>() = square(startDistance) + square(middleDistance) + square(endDistance);
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
const CDCWireHit & getStartWireHit() const
Getter for the hit wire of the first oriented wire hit.
const Vector2D & getRefPos2D() const
The two dimensional reference position (z=0) of the underlying wire.
static double fit(const CDCFacet &facet, int nSteps=100)
Fits a proper line to facet and returns the chi2.
double getSignedRefDriftLength() const
Getter for the drift length at the reference position of the wire.
const CDCWireHit & getEndWireHit() const
Getter for the hit wire of the third oriented wire hit.
double phi() const
Gives the azimuth angle being the angle to the x axes ( range -M_PI to M_PI )
const CDCWireHit & getMiddleWireHit() const
Getter for the hit wire of the second oriented wire hit.
Abstract base class for different kinds of events.
Class representing an oriented hit wire including a hypotheses whether the causing track passes left ...
double lengthOnCurve(const Vector2D &from, const Vector2D &to) const
Denotes the length on the line between the two points.
CDCRLWireHit & getMiddleRLWireHit()
Getter for the second oriented wire hit.
Class representing a triple of neighboring oriented wire with additional trajectory information.
double distance(const Vector2D &point) const
Gives the signed distance of a point to the line.
const Vector2D & tangential() const
Gives the tangential vector of the line.
double variance(const ELineParameter &i) const
Getter for individual diagonal elements of the covariance matrix.
CDCRLWireHit & getEndRLWireHit()
Getter for the third oriented wire hit.
constexpr static int named(const char *name)
Getter for the index from the name.
Float_t & var()
Reference getter for the value of the ith variable. Static version.
A parameter line including including an line covariance matrix which is interpreted as located in the...
bool extract(const CDCFacet *ptrFacet) final
Generate and assign the contained variables.
CDCRLWireHit & getStartRLWireHit()
Getter for the first oriented wire hit.
const UncertainParameterLine2D & getFitLine() const
Getter for the contained line fit information.