CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes
OptimalHelixPlaneCrossing Class Reference

#include <OptimalHelixPlaneCrossing.h>

Classes

union  Tmp
 

Public Types

using Base = HelixPlaneCrossing
 

Public Member Functions

Baseoperator* ()
 
const Baseoperator* () const
 
template<typename... Args>
 OptimalHelixPlaneCrossing (Plane const &plane, Args &&... args)
 
 ~OptimalHelixPlaneCrossing ()
 

Private Types

using aligned_union_t = typename std::aligned_storage< sizeof(Tmp), alignof(Tmp)>::type
 

Private Member Functions

Baseget ()
 
const Baseget () const
 

Private Attributes

aligned_union_t mem
 

Detailed Description

Definition at line 10 of file OptimalHelixPlaneCrossing.h.

Member Typedef Documentation

◆ aligned_union_t

using OptimalHelixPlaneCrossing::aligned_union_t = typename std::aligned_storage<sizeof(Tmp), alignof(Tmp)>::type
private

Definition at line 48 of file OptimalHelixPlaneCrossing.h.

◆ Base

Definition at line 12 of file OptimalHelixPlaneCrossing.h.

Constructor & Destructor Documentation

◆ OptimalHelixPlaneCrossing()

template<typename... Args>
OptimalHelixPlaneCrossing::OptimalHelixPlaneCrossing ( Plane const &  plane,
Args &&...  args 
)
inline

Definition at line 15 of file OptimalHelixPlaneCrossing.h.

15  {
16  GlobalVector u = plane.normalVector();
17  constexpr float small = 1.e-6; // for orientation of planes
18 
19  if (std::abs(u.z()) < small) {
20  // barrel plane:
21  // instantiate HelixBarrelPlaneCrossing,
23  } else if ((std::abs(u.x()) < small) & (std::abs(u.y()) < small)) {
24  // forward plane:
25  // instantiate HelixForwardPlaneCrossing
27  } else {
28  // arbitrary plane:
29  // instantiate HelixArbitraryPlaneCrossing
31  }
32  }

References funct::abs(), writedatasetfile::args, get(), Plane::normalVector(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

◆ ~OptimalHelixPlaneCrossing()

OptimalHelixPlaneCrossing::~OptimalHelixPlaneCrossing ( )
inline

Definition at line 34 of file OptimalHelixPlaneCrossing.h.

34 { get()->~Base(); }

References get().

Member Function Documentation

◆ get() [1/2]

Base* OptimalHelixPlaneCrossing::get ( )
inlineprivate

◆ get() [2/2]

const Base* OptimalHelixPlaneCrossing::get ( ) const
inlineprivate

◆ operator*() [1/2]

Base& OptimalHelixPlaneCrossing::operator* ( void  )
inline

Definition at line 36 of file OptimalHelixPlaneCrossing.h.

36 { return *get(); }

References get().

◆ operator*() [2/2]

const Base& OptimalHelixPlaneCrossing::operator* ( void  ) const
inline

Definition at line 37 of file OptimalHelixPlaneCrossing.h.

37 { return *get(); }

References get().

Member Data Documentation

◆ mem

aligned_union_t OptimalHelixPlaneCrossing::mem
private

Definition at line 49 of file OptimalHelixPlaneCrossing.h.

Referenced by get().

Vector3DBase
Definition: Vector3DBase.h:8
writedatasetfile.args
args
Definition: writedatasetfile.py:18
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
OptimalHelixPlaneCrossing::get
Base * get()
Definition: OptimalHelixPlaneCrossing.h:40
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
HelixArbitraryPlaneCrossing
Definition: HelixArbitraryPlaneCrossing.h:10
OptimalHelixPlaneCrossing::mem
aligned_union_t mem
Definition: OptimalHelixPlaneCrossing.h:49
HelixBarrelPlaneCrossingByCircle
Definition: HelixBarrelPlaneCrossingByCircle.h:13
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
OptimalHelixPlaneCrossing::Base
HelixPlaneCrossing Base
Definition: OptimalHelixPlaneCrossing.h:12
HelixForwardPlaneCrossing
Definition: HelixForwardPlaneCrossing.h:14
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22