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 GlobalVector &direction, const GlobalPoint &innerPoint, const GlobalPoint &outerPoint)
 
 TangentHelix (const GlobalPoint &outerPoint, const GlobalPoint &innerPoint, const GlobalPoint &vertexPoint)
 Calculate Helix from 3 points. More...
 
 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.

16  theCircle(direction, innerPoint, outerPoint),
17  theDirectionAtVertex(direction) {}
GlobalPoint theOuterPoint
Definition: TangentHelix.h:51
GlobalPoint theInnerPoint
Definition: TangentHelix.h:50
GlobalPoint innerPoint() const
Definition: TangentHelix.h:33
GlobalPoint outerPoint() const
Definition: TangentHelix.h:31
GlobalVector theDirectionAtVertex
Definition: TangentHelix.h:56
GlobalPoint theVertexPoint
Definition: TangentHelix.h:52
TangentCircle theCircle
Definition: TangentHelix.h:54

◆ 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.

25  theDirectionAtVertex = GlobalVector(1000, 1000, 1000);
26  }
GlobalPoint theOuterPoint
Definition: TangentHelix.h:51
GlobalPoint theInnerPoint
Definition: TangentHelix.h:50
GlobalPoint vertexPoint() const
Definition: TangentHelix.h:35
GlobalPoint innerPoint() const
Definition: TangentHelix.h:33
GlobalPoint outerPoint() const
Definition: TangentHelix.h:31
GlobalVector theDirectionAtVertex
Definition: TangentHelix.h:56
GlobalPoint theVertexPoint
Definition: TangentHelix.h:52
TangentCircle theCircle
Definition: TangentHelix.h:54
Global3DVector GlobalVector
Definition: GlobalVector.h:10

◆ 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.

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

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 }
TangentCircle circle() const
Definition: TangentHelix.h:37
GlobalPoint theOuterPoint
Definition: TangentHelix.h:51
GlobalPoint theInnerPoint
Definition: TangentHelix.h:50
T z() const
Definition: PV3DBase.h:61
GlobalPoint innerPoint() const
Definition: TangentHelix.h:33
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
GlobalPoint vertexPoint() const
Definition: TangentCircle.h:48
GlobalPoint outerPoint() const
Definition: TangentHelix.h:31
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
d
Definition: ztail.py:151
GlobalVector theDirectionAtVertex
Definition: TangentHelix.h:56
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
GlobalPoint theVertexPoint
Definition: TangentHelix.h:52
static constexpr float d1
TangentCircle theCircle
Definition: TangentHelix.h:54
Global3DVector GlobalVector
Definition: GlobalVector.h:10

Member Function Documentation

◆ charge()

int TangentHelix::charge ( float  magz)
inline

Definition at line 41 of file TangentHelix.h.

References TangentCircle::charge(), and theCircle.

Referenced by SeedFromNuclearInteraction::stateWithError().

41 { return theCircle.charge(magz); }
int charge(float magz)
TangentCircle theCircle
Definition: TangentHelix.h:54

◆ circle()

TangentCircle TangentHelix::circle ( ) const
inline

Definition at line 37 of file TangentHelix.h.

References theCircle.

37 { return theCircle; }
TangentCircle theCircle
Definition: TangentHelix.h:54

◆ curvatureError()

double TangentHelix::curvatureError ( )
inline

Definition at line 45 of file TangentHelix.h.

References TangentCircle::curvatureError(), and theCircle.

45 { return theCircle.curvatureError(); }
double curvatureError()
TangentCircle theCircle
Definition: TangentHelix.h:54

◆ directionAtVertex()

GlobalVector TangentHelix::directionAtVertex ( )

Definition at line 17 of file TangentHelix.cc.

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

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 }
GlobalPoint theOuterPoint
Definition: TangentHelix.h:51
GlobalPoint theInnerPoint
Definition: TangentHelix.h:50
T z() const
Definition: PV3DBase.h:61
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
GlobalVector theDirectionAtVertex
Definition: TangentHelix.h:56
GlobalVector directionAtVertex()
Return the direction at the vertex.
TangentCircle theCircle
Definition: TangentHelix.h:54

◆ innerPoint()

GlobalPoint TangentHelix::innerPoint ( ) const
inline

Definition at line 33 of file TangentHelix.h.

References theInnerPoint.

Referenced by TangentHelix().

33 { return theInnerPoint; }
GlobalPoint theInnerPoint
Definition: TangentHelix.h:50

◆ outerPoint()

GlobalPoint TangentHelix::outerPoint ( ) const
inline

Definition at line 31 of file TangentHelix.h.

References theOuterPoint.

Referenced by TangentHelix().

31 { return theOuterPoint; }
GlobalPoint theOuterPoint
Definition: TangentHelix.h:51

◆ rho()

double TangentHelix::rho ( ) const
inline

Definition at line 43 of file TangentHelix.h.

References TangentCircle::rho(), and theCircle.

Referenced by Lepton.Lepton::absIsoFromEA(), Muon.Muon::absIsoWithFSR(), and SeedFromNuclearInteraction::stateWithError().

43 { return theCircle.rho(); }
double rho() const
Definition: TangentCircle.h:42
TangentCircle theCircle
Definition: TangentHelix.h:54

◆ vertexError()

double TangentHelix::vertexError ( )
inline

Definition at line 47 of file TangentHelix.h.

References theCircle, and TangentCircle::vertexError().

Referenced by SeedFromNuclearInteraction::stateWithError().

47 { return theCircle.vertexError(); }
double vertexError() const
Definition: TangentCircle.h:50
TangentCircle theCircle
Definition: TangentHelix.h:54

◆ vertexPoint()

GlobalPoint TangentHelix::vertexPoint ( ) const
inline

Definition at line 35 of file TangentHelix.h.

References theVertexPoint.

Referenced by SeedFromNuclearInteraction::stateWithError().

35 { return theVertexPoint; }
GlobalPoint theVertexPoint
Definition: TangentHelix.h:52

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