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 (TrackingUtilities::Vector3D triggerPoint=TrackingUtilities::Vector3D(0, 0, 0))
 Constructor also setting up the flight time lookup table.
 
double getFlightTime2D (const TrackingUtilities::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

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

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()

Constructor also setting up the flight time lookup table.

Definition at line 58 of file FlightTimeEstimator.cc.

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

Member Function Documentation

◆ getFlightTime2D()

double getFlightTime2D ( const TrackingUtilities::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 TrackingUtilities::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 }

◆ instance()

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

Getter for the instance.

Definition at line 22 of file FlightTimeEstimator.cc.

23{
24 static std::unique_ptr<FlightTimeEstimator> s_instance(new FlightTimeEstimator);
25 if (replacement) {
26 s_instance = std::move(replacement);
27 }
28 return *s_instance;
29}

Member Data Documentation

◆ m_halfPeriodAlphaFlightTimeFactor

TrackingUtilities::LookupTable<float> m_halfPeriodAlphaFlightTimeFactor
private

Lookup table for the sinc function.

Definition at line 86 of file FlightTimeEstimator.h.

◆ m_triggerPoint

TrackingUtilities::Vector3D m_triggerPoint
private

Trigger point of the cosmic ray setup.

Definition at line 89 of file FlightTimeEstimator.h.


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