CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
TangentHelix Class Reference

#include <TangentHelix.h>

Public Member Functions

int charge (float magz)
 
TangentCircle circle () const
 
double curvatureError ()
 
GlobalVector directionAtVertex ()
 
GlobalPoint innerPoint () const
 
GlobalPoint outerPoint () const
 
double rho () const
 
 TangentHelix ()
 
 TangentHelix (const GlobalPoint &outerPoint, const GlobalPoint &innerPoint, const GlobalPoint &vertexPoint)
 Calculate Helix from 3 points. More...
 
 TangentHelix (const GlobalVector &direction, const GlobalPoint &innerPoint, const GlobalPoint &outerPoint)
 
 TangentHelix (const TangentHelix &primCircle, const GlobalPoint &outerPoint, const GlobalPoint &innerPoint)
 Calculate the parameters of the helix which pass by 2 points (innerPoint and outerPoint) and which is tangent to primHelix. More...
 
double vertexError ()
 
GlobalPoint vertexPoint () const
 

Private Attributes

TangentCircle theCircle
 
GlobalVector theDirectionAtVertex
 
GlobalPoint theInnerPoint
 
GlobalPoint theOuterPoint
 
GlobalPoint theVertexPoint
 

Detailed Description

Definition at line 6 of file TangentHelix.h.

Constructor & Destructor Documentation

◆ TangentHelix() [1/4]

TangentHelix::TangentHelix ( )
inline

Definition at line 8 of file TangentHelix.h.

8 {}

◆ TangentHelix() [2/4]

TangentHelix::TangentHelix ( const GlobalVector direction,
const GlobalPoint innerPoint,
const GlobalPoint outerPoint 
)
inline

Calculate the helix from 2 points on the circle (the vertex=innerPoint and the outerPoint) and the tangent direction at the inner point

Definition at line 12 of file TangentHelix.h.

◆ TangentHelix() [3/4]

TangentHelix::TangentHelix ( const GlobalPoint outerPoint,
const GlobalPoint innerPoint,
const GlobalPoint vertexPoint 
)
inline

Calculate Helix from 3 points.

Definition at line 20 of file TangentHelix.h.

References theDirectionAtVertex.

◆ TangentHelix() [4/4]

TangentHelix::TangentHelix ( const TangentHelix primCircle,
const GlobalPoint outerPoint,
const GlobalPoint innerPoint 
)

Calculate the parameters of the helix which pass by 2 points (innerPoint and outerPoint) and which is tangent to primHelix.

Definition at line 3 of file TangentHelix.cc.

5  // Calculation of vertex.z :
6  GlobalPoint inner_T(innerPoint.x(), innerPoint.y(), 0.0);
7  GlobalPoint outer_T(outerPoint.x(), outerPoint.y(), 0.0);
9 
10  double d1 = (inner_T - vtx_T).mag();
11  double d = (inner_T - outer_T).mag();
12 
13  theVertexPoint = GlobalPoint(vtx_T.x(), vtx_T.y(), innerPoint.z() - (outerPoint.z() - innerPoint.z()) * d1 / d);
14  theDirectionAtVertex = GlobalVector(1000, 1000, 1000);
15 }

References ztail::d, d1, innerPoint(), mag(), outerPoint(), theCircle, theDirectionAtVertex, theVertexPoint, TangentCircle::vertexPoint(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Member Function Documentation

◆ charge()

int TangentHelix::charge ( float  magz)
inline

Definition at line 41 of file TangentHelix.h.

41 { return theCircle.charge(magz); }

References TangentCircle::charge(), and theCircle.

Referenced by SeedFromNuclearInteraction::stateWithError().

◆ circle()

TangentCircle TangentHelix::circle ( ) const
inline

Definition at line 37 of file TangentHelix.h.

37 { return theCircle; }

References theCircle.

◆ curvatureError()

double TangentHelix::curvatureError ( )
inline

Definition at line 45 of file TangentHelix.h.

45 { return theCircle.curvatureError(); }

References TangentCircle::curvatureError(), and theCircle.

◆ directionAtVertex()

GlobalVector TangentHelix::directionAtVertex ( )

Definition at line 17 of file TangentHelix.cc.

17  {
18  if (theDirectionAtVertex.z() > 999) {
19  GlobalPoint inner_T(theInnerPoint.x(), theInnerPoint.y(), 0.0);
20  GlobalPoint outer_T(theOuterPoint.x(), theOuterPoint.y(), 0.0);
21  double p_z = (theOuterPoint.z() - theInnerPoint.z()) / (outer_T - inner_T).mag();
22 
24  GlobalVector dir(dir_T.x(), dir_T.y(), p_z);
25 
26  dir /= dir.mag();
28  }
29 
30  return theDirectionAtVertex;
31 }

References DeadROC_duringRun::dir, TangentCircle::directionAtVertex(), theCircle, theDirectionAtVertex, theInnerPoint, theOuterPoint, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by SeedFromNuclearInteraction::stateWithError().

◆ innerPoint()

GlobalPoint TangentHelix::innerPoint ( ) const
inline

Definition at line 33 of file TangentHelix.h.

33 { return theInnerPoint; }

References theInnerPoint.

Referenced by TangentHelix().

◆ outerPoint()

GlobalPoint TangentHelix::outerPoint ( ) const
inline

Definition at line 31 of file TangentHelix.h.

31 { return theOuterPoint; }

References theOuterPoint.

Referenced by TangentHelix().

◆ rho()

double TangentHelix::rho ( ) const
inline

◆ vertexError()

double TangentHelix::vertexError ( )
inline

Definition at line 47 of file TangentHelix.h.

47 { return theCircle.vertexError(); }

References theCircle, and TangentCircle::vertexError().

Referenced by SeedFromNuclearInteraction::stateWithError().

◆ vertexPoint()

GlobalPoint TangentHelix::vertexPoint ( ) const
inline

Definition at line 35 of file TangentHelix.h.

35 { return theVertexPoint; }

References theVertexPoint.

Referenced by SeedFromNuclearInteraction::stateWithError().

Member Data Documentation

◆ theCircle

TangentCircle TangentHelix::theCircle
private

◆ theDirectionAtVertex

GlobalVector TangentHelix::theDirectionAtVertex
private

Definition at line 56 of file TangentHelix.h.

Referenced by directionAtVertex(), and TangentHelix().

◆ theInnerPoint

GlobalPoint TangentHelix::theInnerPoint
private

Definition at line 50 of file TangentHelix.h.

Referenced by directionAtVertex(), and innerPoint().

◆ theOuterPoint

GlobalPoint TangentHelix::theOuterPoint
private

Definition at line 51 of file TangentHelix.h.

Referenced by directionAtVertex(), and outerPoint().

◆ theVertexPoint

GlobalPoint TangentHelix::theVertexPoint
private

Definition at line 52 of file TangentHelix.h.

Referenced by TangentHelix(), and vertexPoint().

Vector3DBase
Definition: Vector3DBase.h:8
TangentHelix::theVertexPoint
GlobalPoint theVertexPoint
Definition: TangentHelix.h:52
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
TangentHelix::theCircle
TangentCircle theCircle
Definition: TangentHelix.h:54
TangentCircle::curvatureError
double curvatureError()
Definition: TangentCircle.cc:193
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
TangentCircle::vertexError
double vertexError() const
Definition: TangentCircle.h:50
TangentHelix::theOuterPoint
GlobalPoint theOuterPoint
Definition: TangentHelix.h:51
TangentHelix::vertexPoint
GlobalPoint vertexPoint() const
Definition: TangentHelix.h:35
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
TangentHelix::theInnerPoint
GlobalPoint theInnerPoint
Definition: TangentHelix.h:50
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Point3DBase< float, GlobalTag >
TangentHelix::theDirectionAtVertex
GlobalVector theDirectionAtVertex
Definition: TangentHelix.h:56
TangentHelix::circle
TangentCircle circle() const
Definition: TangentHelix.h:37
TangentHelix::innerPoint
GlobalPoint innerPoint() const
Definition: TangentHelix.h:33
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
TangentCircle::vertexPoint
GlobalPoint vertexPoint() const
Definition: TangentCircle.h:48
TangentCircle::charge
int charge(float magz)
Definition: TangentCircle.cc:205
mag
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition: Basic3DVectorLD.h:127
TangentCircle::rho
double rho() const
Definition: TangentCircle.h:42
TangentCircle::directionAtVertex
GlobalVector directionAtVertex()
Return the direction at the vertex.
Definition: TangentCircle.cc:147
TangentHelix::outerPoint
GlobalPoint outerPoint() const
Definition: TangentHelix.h:31
ztail.d
d
Definition: ztail.py:151
d1
static constexpr float d1
Definition: L1EGammaCrystalsEmulatorProducer.cc:85
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23