Belle II Software development
SegmentInPhi0CurvBox Class Reference

Predicate class to check for the containment of segments in a phi0 curv hough space part. More...

#include <SegmentInPhi0CurvBox.h>

Private Member Functions

TrackingUtilities::Weight operator() (const TrackingUtilities::CDCSegment2D *segment, const Phi0CurvBox *phi0CurvBox)
 Checks if the segment is contained in a phi0 curv hough space.
 
TrackingUtilities::Weight operator() (const TrackingUtilities::CDCTrajectory2D *trajectory2D, const Phi0CurvBox *phi0CurvBox)
 Checks if the given trajectory is considered part of the hough box in phi0, curvature space.
 
TrackingUtilities::Weight operator() (const TrackingUtilities::CDCFacet *facet, const Phi0CurvBox *phi0CurvBox)
 Checks if the given hit triplet is considered part of the hough box in phi0, curvature space.
 
bool isPhi0CurvPointIn (const ROOT::Math::XYVector &phi0Vec, const double curvature, const Phi0CurvBox *phi0CurvBox)
 Predicate checking if the phi0 vector and curvature are contained in the given box.
 

Detailed Description

Predicate class to check for the containment of segments in a phi0 curv hough space part.

Unlike hits segments occupy only a point in the hough space.

Definition at line 28 of file SegmentInPhi0CurvBox.h.

Member Function Documentation

◆ isPhi0CurvPointIn()

bool isPhi0CurvPointIn ( const ROOT::Math::XYVector & phi0Vec,
const double curvature,
const Phi0CurvBox * phi0CurvBox )
inlineprivate

Predicate checking if the phi0 vector and curvature are contained in the given box.

Definition at line 87 of file SegmentInPhi0CurvBox.h.

90 {
91
92 const ROOT::Math::XYVector& lowerPhi0Vec = phi0CurvBox->getLowerPhi0Vec();
93 const ROOT::Math::XYVector& upperPhi0Vec = phi0CurvBox->getUpperPhi0Vec();
94
95 // Allow containment to keep the reversal symmetry
96 if (phi0CurvBox->isIn<1>(curvature)) {
97 return VectorUtil::isBetween(phi0Vec, lowerPhi0Vec, upperPhi0Vec);
98
99 } else if (phi0CurvBox->isIn<1>(-curvature)) {
100 return VectorUtil::isBetween(-phi0Vec, lowerPhi0Vec, upperPhi0Vec);
101
102 } else {
103 return false;
104
105 }
106
107 }

◆ operator()() [1/3]

TrackingUtilities::Weight operator() ( const TrackingUtilities::CDCFacet * facet,
const Phi0CurvBox * phi0CurvBox )
inlineprivate

Checks if the given hit triplet is considered part of the hough box in phi0, curvature space.

Returns a finit weight if it is contained, NAN if not contained.

Definition at line 65 of file SegmentInPhi0CurvBox.h.

67 {
68 const ParameterLine2D& line = facet->getStartToEndLine();
69
70 const ROOT::Math::XYVector pos2D = facet->getMiddleRecoPos2D();
71 const ROOT::Math::XYVector phiVec = VectorUtil::unit(line.tangential());
72
73 // Calculate the curvature and phi0 of the circle through the origin
74 // that touches the position pos2D under the angle phiVec.
75 double curvature = 2 * VectorUtil::Cross(pos2D, phiVec) / pos2D.Mag2();
76 ROOT::Math::XYVector phi0Vec = VectorUtil::flippedOver(phiVec, pos2D);
77
78 bool in = isPhi0CurvPointIn(phi0Vec, curvature, phi0CurvBox);
79 return in ? 1 : NAN;
80 // All facets are currently worth the same weight
81 // Facets contain three hits but in general contribute only one
82 // additional hit due to overlaps with neighboring facets.
83 // Hence we stick with 1 as weight here.
84 }

◆ operator()() [2/3]

TrackingUtilities::Weight operator() ( const TrackingUtilities::CDCSegment2D * segment,
const Phi0CurvBox * phi0CurvBox )
inlineprivate

Checks if the segment is contained in a phi0 curv hough space.

Returns the size of the segment if it is contained, returns NAN if it is not contained. The method simply assumes that the segment has been fitted with origin constraint and simply uses the values from the contained trajectory The calling code has to ensure this situation

Definition at line 37 of file SegmentInPhi0CurvBox.h.

39 {
40 if (segment->empty()) return NAN;
41 const TrackingUtilities::CDCTrajectory2D& trajectory2D = segment->getTrajectory2D();
42 TrackingUtilities::Weight weight = operator()(&trajectory2D, phi0CurvBox);
43 return weight * segment->size();
44 }

◆ operator()() [3/3]

TrackingUtilities::Weight operator() ( const TrackingUtilities::CDCTrajectory2D * trajectory2D,
const Phi0CurvBox * phi0CurvBox )
inlineprivate

Checks if the given trajectory is considered part of the hough box in phi0, curvature space.

Returns a finit weight if it is contained, NAN if not contained.

Definition at line 50 of file SegmentInPhi0CurvBox.h.

52 {
53 double curvature = trajectory2D->getCurvature();
54 const ROOT::Math::XYVector& phi0Vec = trajectory2D->getStartUnitMom2D();
55
56 bool in = isPhi0CurvPointIn(phi0Vec, curvature, phi0CurvBox);
57 return in ? 1 : NAN;
58 }

The documentation for this class was generated from the following file: