 |
Belle II Software
release-05-01-25
|
12 #include <tracking/trackFindingCDC/hough/boxes/Z0TanLambdaBox.h>
14 #include <tracking/trackFindingCDC/eventdata/hits/CDCRecoHit3D.h>
16 #include <tracking/trackFindingCDC/topology/CDCWire.h>
17 #include <tracking/trackFindingCDC/topology/WireLine.h>
19 #include <tracking/trackFindingCDC/numerics/Weight.h>
26 namespace TrackFindingCDC {
35 class HitInZ0TanLambdaBoxUsingZ {
49 const CDCWire& wire = recoHit.getWire();
54 const float centerZ0 = 0.5 * (lowerZ0 + upperZ0);
58 const float centerTanLambda = 0.5 * (lowerTanLambda + upperTanLambda);
60 float perpS = recoHit.getArcLength2D();
61 const Vector2D& recoPosition = recoHit.getRecoPos2D();
63 float hitZ = centerTanLambda * perpS + centerZ0;
67 float distanceToRecoPosition = (pos2D - recoPosition).norm();
69 return exp(-distanceToRecoPosition);
78 const double z0Mean = (z0TanLambdaBox.getLowerZ0() + z0TanLambdaBox.getUpperZ0()) / 2.0;
79 const double tanLambdaMean = (z0TanLambdaBox.getLowerTanLambda() + z0TanLambdaBox.getUpperTanLambda()) / 2.0;
81 const double lhsZ = lhsRecoHit.
getRecoZ();
82 const double rhsZ = rhsRecoHit.
getRecoZ();
87 const double lhsZDistance = lhsS * tanLambdaMean + z0Mean - lhsZ;
88 const double rhsZDistance = rhsS * tanLambdaMean + z0Mean - rhsZ;
90 return lhsZDistance < rhsZDistance;
94 static const char*
debugLine() {
return "[0] + [1] * x";}
Vector2D nominalPos2DAtZ(const double z) const
Gives the two dimensional position without wire sag effect of the line at the given z value.
float getLowerTanLambda() const
Concise getter for the lower tan lambda bound.
Class representing a three dimensional reconstructed hit.
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
Z0TanLambdaBox HoughBox
Use a Z0TanLambdaBox.
static bool compareDistances(const HoughBox &z0TanLambdaBox, const CDCRecoHit3D &lhsRecoHit, const CDCRecoHit3D &rhsRecoHit)
Compares distances from two hits to the track represented by the given box.
double getRecoZ() const
Getter for the z coordinate of the reconstructed position.
double getArcLength2D() const
Getter for the travel distance in the xy projection.
float getUpperZ0() const
Concise getter for the upper z0 bound.
A rectangular domain for the hough space over phi0 and two dimensional curvature.
Abstract base class for different kinds of events.
A three dimensional limited line represented by its closest approach to the z-axes (reference positio...
static const char * debugLine()
ROOT-compatible formula for z(s) = z0 + tanlambda * s.
Weight operator()(const CDCRecoHit3D &recoHit, const HoughBox *z0TanLambdaBox)
Return exp{-distance} with distance = distance between the trajectory constructed from the box parame...
const WireLine & getWireLine() const
Getter for the wire line represenation of the wire.
Class representing a sense wire in the central drift chamber.
float getLowerZ0() const
Concise getter for the lower z0 bound.
float getUpperTanLambda() const
Concise getter for the upper tan lambda bound.