Belle II Software development
CosmicRayFlightTimeEstimator Class Reference

Concrete estimator for the cosmic ray setup - estimates negative times on incoming arm. More...

#include <FlightTimeEstimator.h>

Inheritance diagram for CosmicRayFlightTimeEstimator:
FlightTimeEstimator

Public Member Functions

 CosmicRayFlightTimeEstimator (Vector3D triggerPoint=Vector3D(0, 0, 0))
 Constructor also setting up the flight time lookup table.
 
double getFlightTime2D (const Vector2D &pos2D, double alpha, double beta=1) const override
 Flight time estimator for cosmic ray events.
 

Static Public Member Functions

static const FlightTimeEstimatorinstance (std::unique_ptr< FlightTimeEstimator > replacement=nullptr)
 Getter for the instance.
 

Private Attributes

Vector3D m_triggerPoint
 Trigger point of the cosmic ray setup.
 
LookupTable< float > m_halfPeriodAlphaFlightTimeFactor
 Lookup table for the sinc function.
 

Detailed Description

Concrete estimator for the cosmic ray setup - estimates negative times on incoming arm.

Definition at line 67 of file FlightTimeEstimator.h.

Constructor & Destructor Documentation

◆ CosmicRayFlightTimeEstimator()

CosmicRayFlightTimeEstimator ( Vector3D  triggerPoint = Vector3D(0, 0, 0))
explicit

Constructor also setting up the flight time lookup table.

Definition at line 57 of file FlightTimeEstimator.cc.

58 : m_triggerPoint(triggerPoint)
59 , m_halfPeriodAlphaFlightTimeFactor(getHalfPeriodAlphaFlightTime,
60 512,
61 0,
62 std::nextafter(M_PI, INFINITY))
63{
64}
LookupTable< float > m_halfPeriodAlphaFlightTimeFactor
Lookup table for the sinc function.
Vector3D m_triggerPoint
Trigger point of the cosmic ray setup.

Member Function Documentation

◆ getFlightTime2D()

double getFlightTime2D ( const Vector2D pos2D,
double  alpha,
double  beta = 1 
) const
inlineoverridevirtual

Flight time estimator for cosmic ray events.

Reimplemented from FlightTimeEstimator.

Definition at line 74 of file FlightTimeEstimator.h.

75 {
76 Vector2D relPos2D = pos2D - m_triggerPoint.xy();
77 double deltaAlpha = pos2D.angleWith(relPos2D);
78 alpha += deltaAlpha;
79 double absAlpha = std::fabs(alpha);
80 double directDist2D = relPos2D.cylindricalR();
81 return directDist2D * m_halfPeriodAlphaFlightTimeFactor(absAlpha) / beta;
82 }
double angleWith(const Vector2D &rhs) const
The angle between this and rhs.
Definition: Vector2D.h:197
const Vector2D & xy() const
Getter for the xy projected vector ( reference ! )
Definition: Vector3D.h:508

◆ instance()

const FlightTimeEstimator & instance ( std::unique_ptr< FlightTimeEstimator replacement = nullptr)
staticinherited

Getter for the instance.

Definition at line 21 of file FlightTimeEstimator.cc.

22{
23 static std::unique_ptr<FlightTimeEstimator> s_instance(new FlightTimeEstimator);
24 if (replacement) {
25 s_instance = std::move(replacement);
26 }
27 return *s_instance;
28}
Helper struct to provide consistent flight time estimation throughout the CDC track finding.

Member Data Documentation

◆ m_halfPeriodAlphaFlightTimeFactor

LookupTable<float> m_halfPeriodAlphaFlightTimeFactor
private

Lookup table for the sinc function.

Definition at line 89 of file FlightTimeEstimator.h.

◆ m_triggerPoint

Vector3D m_triggerPoint
private

Trigger point of the cosmic ray setup.

Definition at line 86 of file FlightTimeEstimator.h.


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