10#include <tracking/trackingUtilities/numerics/LookupTable.h>
11#include <tracking/trackingUtilities/geometry/VectorUtil.h>
13#include <Math/Vector2D.h>
14#include <Math/VectorUtil.h>
24 namespace TrackFindingCDC {
45 instance(std::unique_ptr<FlightTimeEstimator> replacement =
nullptr);
56 double getFlightTime2D(
const ROOT::Math::XYVector& pos2D,
double alpha,
double beta = 1)
const override
58 double absAlpha = std::fabs(alpha);
59 double directDist2D = pos2D.R();
76 double getFlightTime2D(
const ROOT::Math::XYVector& pos2D,
double alpha,
double beta = 1)
const override
78 ROOT::Math::XYVector relPos2D = pos2D - VectorUtil::getXYVector(
m_triggerPoint);
79 double deltaAlpha = ROOT::Math::VectorUtil::DeltaPhi(pos2D, relPos2D);
81 double absAlpha = std::fabs(alpha);
82 double directDist2D = relPos2D.R();
double getFlightTime2D(const ROOT::Math::XYVector &pos2D, double alpha, double beta=1) const override
Flight time estimator for regular beam events.
TrackingUtilities::LookupTable< float > m_firstPeriodAlphaFlightTimeFactor
Lookup table for the sinc function.
BeamEventFlightTimeEstimator()
Constructor also setting up the flight time lookup table.
double getFlightTime2D(const ROOT::Math::XYVector &pos2D, double alpha, double beta=1) const override
Flight time estimator for cosmic ray events.
CosmicRayFlightTimeEstimator(ROOT::Math::XYZVector triggerPoint=ROOT::Math::XYZVector(0, 0, 0))
Constructor also setting up the flight time lookup table.
TrackingUtilities::LookupTable< float > m_halfPeriodAlphaFlightTimeFactor
Lookup table for the sinc function.
ROOT::Math::XYZVector m_triggerPoint
Trigger point of the cosmic ray setup.
Helper struct to provide consistent flight time estimation throughout the CDC track finding.
virtual ~FlightTimeEstimator()=default
Making the destructor virtual for this interface class.
static const FlightTimeEstimator & instance(std::unique_ptr< FlightTimeEstimator > replacement=nullptr)
Getter for the instance.
virtual double getFlightTime2D(const ROOT::Math::XYVector &, double, double=1) const
Default estimator for the flight time.
Class which holds precomputed values of a function.
Abstract base class for different kinds of events.