Public Member Functions | Public Attributes | List of all members
recob::tracking::Plane::TrigCache Struct Reference

Struct caching trigonometric function results. More...

Public Member Functions

 TrigCache (const Vector_t &planeDir)
 

Public Attributes

double fCosA
 
double fSinA
 
double fCosB
 
double fSinB
 

Detailed Description

Struct caching trigonometric function results.

Definition at line 41 of file TrackingPlane.h.

Constructor & Destructor Documentation

recob::tracking::Plane::TrigCache::TrigCache ( const Vector_t planeDir)
inline

Definition at line 43 of file TrackingPlane.h.

44  {
45  const double diryz = std::hypot(planeDir.Y(), planeDir.Z());
46  fCosA = diryz;
47  fSinA = planeDir.X();
48  fCosB = (diryz != 0.0) ? planeDir.Z()/diryz : 1.0;
49  fSinB = (diryz != 0.0) ? -planeDir.Y()/diryz : 0.0;
50  }
std::enable_if_t< std::is_arithmetic_v< T >, T > hypot(T x, T y)
Definition: hypot.h:60

Member Data Documentation

double recob::tracking::Plane::TrigCache::fCosA

Definition at line 51 of file TrackingPlane.h.

double recob::tracking::Plane::TrigCache::fCosB

Definition at line 53 of file TrackingPlane.h.

double recob::tracking::Plane::TrigCache::fSinA

Definition at line 52 of file TrackingPlane.h.

double recob::tracking::Plane::TrigCache::fSinB

Definition at line 54 of file TrackingPlane.h.


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