 |
Belle II Software
release-05-01-25
|
10 #include <tracking/trackFindingCDC/filters/facetRelation/FitFacetRelationVarSet.h>
12 #include <tracking/trackFindingCDC/fitting/FacetFitter.h>
13 #include <tracking/trackFindingCDC/fitting/CDCKarimakiFitter.h>
14 #include <tracking/trackFindingCDC/fitting/CDCObservations2D.h>
16 #include <tracking/trackFindingCDC/eventdata/hits/CDCFacet.h>
17 #include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
18 #include <tracking/trackFindingCDC/eventdata/trajectories/CDCTrajectory2D.h>
20 #include <tracking/trackFindingCDC/geometry/UncertainParameterLine2D.h>
21 #include <tracking/trackFindingCDC/geometry/LineParameters.h>
22 #include <tracking/trackFindingCDC/geometry/Vector2D.h>
24 #include <tracking/trackFindingCDC/numerics/Angle.h>
27 using namespace TrackFindingCDC;
31 if (not ptrFacetRelation)
return false;
33 const CDCFacet* fromFacet = ptrFacetRelation->first;
34 const CDCFacet* toFacet = ptrFacetRelation->second;
55 var<
named(
"from_middle_cos_delta")>() = fromMiddleCos;
56 var<
named(
"to_middle_cos_delta")>() = toMiddleCos;
63 double s = fitLine->
lengthOnCurve(frontWirePos2D, backWirePos2D);
76 double s = fitLine->
lengthOnCurve(frontWirePos2D, backWirePos2D);
85 double s = fitLine->
lengthOnCurve(frontWirePos2D, backWirePos2D);
94 using namespace NLineParameterIndices;
97 if (not std::isfinite(phi0_var)) {
98 B2INFO(
"from addr " << *fromFacet);
105 if (not std::isfinite(phi0_var)) {
106 B2INFO(
"to addr " << *toFacet);
112 var<
named(
"phi0_from_sigma")>() = std::sqrt(fromCov(c_Phi0, c_Phi0));
113 var<
named(
"phi0_to_sigma")>() = std::sqrt(toCov(c_Phi0, c_Phi0));
114 var<
named(
"phi0_ref_sigma")>() = std::sqrt(fromCov(c_Phi0, c_Phi0) + toCov(c_Phi0, c_Phi0));
118 std::sqrt((toCov(c_Phi0, c_Phi0) + fromCov(c_Phi0, c_Phi0))));
132 std::fabs(relAvgPar(c_Phi0) / std::sqrt(avgCov(c_Phi0, c_Phi0)));
133 var<
named(
"phi0_comb_diff")>() = relAvgPar(c_Phi0);
134 var<
named(
"phi0_comb_sigma")>() = std::sqrt(avgCov(c_Phi0, c_Phi0));
140 observations2D.
append(*fromFacet);
141 observations2D.
append(*toFacet);
149 CDCObservations2D observations2D(EFitPos::c_RecoPos, EFitVariance::c_DriftLength);
150 observations2D.
append(*fromFacet);
151 observations2D.
append(*toFacet);
160 observations2D.
append(*fromFacet);
161 observations2D.
append(*toFacet);
170 observations2D.
append(*fromFacet);
171 observations2D.
append(*toFacet);
ParameterLine2D getStartToEndLine() const
Getter for the tangential line from the first to the third hit.
Type for two related objects.
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 getCurvature() const
Getter for the curvature as seen from the xy projection.
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 )
double getChi2() const
Getter for the chi2 value of the circle fit.
Particle trajectory as it is seen in xy projection represented as a circle.
LineParameters lineParameters() const
Getter for the three perigee parameters in the order defined by EPerigeeParameter....
bool extract(const Relation< const CDCFacet > *ptrFacetRelation) final
Generate and assign the contained variables.
double chi2() const
Getter for the chi square value of the line fit.
Class serving as a storage of observed drift circles to present to the Riemann fitter.
Abstract base class for different kinds of events.
ParameterLine2D getStartToMiddleLine() const
Getter for the tangential line from the first to the second hit.
CDCTrajectory2D fit(const CDCObservations2D &observations2D) const
Fits a collection of observation drift circles.
double lengthOnCurve(const Vector2D &from, const Vector2D &to) const
Denotes the length on the line between the two points.
Class representing a triple of neighboring oriented wire with additional trajectory information.
double cosWith(const Vector2D &rhs) const
const Vector2D & tangential() const
Gives the tangential vector of the line.
static double average(const double angle1, double angle2)
Combines two angluar values to the one that lies half way between them on the short arc.
ParameterLine2D getMiddleToEndLine() const
Getter for the tangential line from the second to the third hit.
constexpr static int named(const char *name)
Getter for the index from the name.
static double average(const LineUtil::ParameterVector &fromPar, const LineUtil::CovarianceMatrix &fromCov, const LineUtil::ParameterVector &toPar, const LineUtil::CovarianceMatrix &toCov, LineUtil::ParameterVector &avgPar, LineUtil::CovarianceMatrix &avgCov)
Calculates the weighted average between two line parameter sets with their respective covariance matr...
const Vector2D & support() const
Gives the support vector of the line.
static const CDCKarimakiFitter & getFitter()
Static getter for a general fitter instance with Karimakis method.
double angleWith(const Vector2D &rhs) const
The angle between this and rhs.
A matrix implementation to be used as an interface typ through out the track finder.
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...
const LineCovariance & lineCovariance() const
Getter for the whole covariance matrix of the line parameters.
const UncertainParameterLine2D & getFitLine() const
Getter for the contained line fit information.
static double normalised(const double angle)
Normalise an angle to lie in the range from [-pi, pi].
std::size_t append(const CDCWireHit &wireHit, ERightLeft rlInfo=ERightLeft::c_Unknown)
Appends the hit circle at wire reference position without a right left passage hypotheses.
static Vector2D average(const Vector2D &one, const Vector2D &two)
Constructs the average of two vectors.