CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::TangentHelix ( )
inline

Definition at line 9 of file TangentHelix.h.

9 {}
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 13 of file TangentHelix.h.

13  :
14  theInnerPoint(innerPoint), theOuterPoint(outerPoint), theVertexPoint(innerPoint), theCircle(direction, innerPoint, outerPoint),
15  theDirectionAtVertex(direction) {}
GlobalPoint theOuterPoint
Definition: TangentHelix.h:46
GlobalPoint theInnerPoint
Definition: TangentHelix.h:45
GlobalVector theDirectionAtVertex
Definition: TangentHelix.h:51
GlobalPoint theVertexPoint
Definition: TangentHelix.h:47
TangentCircle theCircle
Definition: TangentHelix.h:49
TangentHelix::TangentHelix ( const GlobalPoint outerPoint,
const GlobalPoint innerPoint,
const GlobalPoint vertexPoint 
)
inline

Calculate Helix from 3 points.

Definition at line 18 of file TangentHelix.h.

References theDirectionAtVertex.

18  :
19  theInnerPoint(innerPoint), theOuterPoint(outerPoint), theVertexPoint(vertexPoint), theCircle(outerPoint, innerPoint, vertexPoint) {
20  theDirectionAtVertex = GlobalVector(1000,1000,1000);
21  }
GlobalPoint theOuterPoint
Definition: TangentHelix.h:46
GlobalPoint theInnerPoint
Definition: TangentHelix.h:45
GlobalVector theDirectionAtVertex
Definition: TangentHelix.h:51
GlobalPoint theVertexPoint
Definition: TangentHelix.h:47
TangentCircle theCircle
Definition: TangentHelix.h:49
Global3DVector GlobalVector
Definition: GlobalVector.h:10
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 mag(), theCircle, theDirectionAtVertex, theVertexPoint, TangentCircle::vertexPoint(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

3  :
4  theInnerPoint(innerPoint), theOuterPoint(outerPoint), theCircle(primCircle.circle(), outerPoint, innerPoint) {
5 
6  // Calculation of vertex.z :
7  GlobalPoint inner_T( innerPoint.x() , innerPoint.y() , 0.0 );
8  GlobalPoint outer_T( outerPoint.x() , outerPoint.y() , 0.0 );
9  GlobalPoint vtx_T( theCircle.vertexPoint().x() , theCircle.vertexPoint().y() , 0.0 );
10 
11  double d1 = (inner_T - vtx_T).mag();
12  double d = (inner_T - outer_T).mag();
13 
14  theVertexPoint = GlobalPoint(vtx_T.x() , vtx_T.y(), innerPoint.z() - (outerPoint.z() - innerPoint.z()) * d1 / d );
15  theDirectionAtVertex = GlobalVector(1000, 1000, 1000);
16 }
GlobalPoint theOuterPoint
Definition: TangentHelix.h:46
GlobalPoint theInnerPoint
Definition: TangentHelix.h:45
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
T y() const
Definition: PV3DBase.h:62
GlobalPoint innerPoint() const
Definition: TangentHelix.h:28
T z() const
Definition: PV3DBase.h:63
GlobalVector theDirectionAtVertex
Definition: TangentHelix.h:51
GlobalPoint outerPoint() const
Definition: TangentHelix.h:26
TangentCircle circle() const
Definition: TangentHelix.h:32
GlobalPoint theVertexPoint
Definition: TangentHelix.h:47
T x() const
Definition: PV3DBase.h:61
GlobalPoint vertexPoint() const
Definition: TangentCircle.h:42
TangentCircle theCircle
Definition: TangentHelix.h:49
Global3DVector GlobalVector
Definition: GlobalVector.h:10

Member Function Documentation

int TangentHelix::charge ( float  magz)
inline

Definition at line 36 of file TangentHelix.h.

References TangentCircle::charge(), and theCircle.

Referenced by SeedFromNuclearInteraction::stateWithError().

36 { return theCircle.charge(magz); }
int charge(float magz)
TangentCircle theCircle
Definition: TangentHelix.h:49
TangentCircle TangentHelix::circle ( ) const
inline

Definition at line 32 of file TangentHelix.h.

References theCircle.

32 { return theCircle; }
TangentCircle theCircle
Definition: TangentHelix.h:49
double TangentHelix::curvatureError ( )
inline

Definition at line 40 of file TangentHelix.h.

References TangentCircle::curvatureError(), and theCircle.

40 { return theCircle.curvatureError(); }
double curvatureError()
TangentCircle theCircle
Definition: TangentHelix.h:49
GlobalVector TangentHelix::directionAtVertex ( )

Definition at line 18 of file TangentHelix.cc.

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

Referenced by SeedFromNuclearInteraction::stateWithError().

18  {
19 
20  if(theDirectionAtVertex.z() > 999) {
21  GlobalPoint inner_T( theInnerPoint.x() , theInnerPoint.y() , 0.0 );
22  GlobalPoint outer_T( theOuterPoint.x() , theOuterPoint.y() , 0.0 );
23  double p_z = (theOuterPoint.z() - theInnerPoint.z()) / (outer_T - inner_T).mag();
24 
26  GlobalVector dir( dir_T.x(), dir_T.y(), p_z);
27 
28  dir/=dir.mag();
30  }
31 
32  return theDirectionAtVertex;
33 }
GlobalPoint theOuterPoint
Definition: TangentHelix.h:46
GlobalPoint theInnerPoint
Definition: TangentHelix.h:45
T y() const
Definition: PV3DBase.h:62
T mag() const
Definition: PV3DBase.h:66
T z() const
Definition: PV3DBase.h:63
GlobalVector theDirectionAtVertex
Definition: TangentHelix.h:51
GlobalVector directionAtVertex()
Return the direction at the vertex.
dbl *** dir
Definition: mlp_gen.cc:35
T x() const
Definition: PV3DBase.h:61
TangentCircle theCircle
Definition: TangentHelix.h:49
GlobalPoint TangentHelix::innerPoint ( ) const
inline

Definition at line 28 of file TangentHelix.h.

References theInnerPoint.

28 { return theInnerPoint; }
GlobalPoint theInnerPoint
Definition: TangentHelix.h:45
GlobalPoint TangentHelix::outerPoint ( ) const
inline

Definition at line 26 of file TangentHelix.h.

References theOuterPoint.

26 { return theOuterPoint; }
GlobalPoint theOuterPoint
Definition: TangentHelix.h:46
double TangentHelix::rho ( ) const
inline

Definition at line 38 of file TangentHelix.h.

References TangentCircle::rho(), and theCircle.

Referenced by SeedFromNuclearInteraction::stateWithError().

38 { return theCircle.rho(); }
double rho() const
Definition: TangentCircle.h:36
TangentCircle theCircle
Definition: TangentHelix.h:49
double TangentHelix::vertexError ( )
inline

Definition at line 42 of file TangentHelix.h.

References theCircle, and TangentCircle::vertexError().

Referenced by SeedFromNuclearInteraction::stateWithError().

42 { return theCircle.vertexError(); }
double vertexError() const
Definition: TangentCircle.h:44
TangentCircle theCircle
Definition: TangentHelix.h:49
GlobalPoint TangentHelix::vertexPoint ( ) const
inline

Definition at line 30 of file TangentHelix.h.

References theVertexPoint.

Referenced by SeedFromNuclearInteraction::stateWithError().

30 { return theVertexPoint; }
GlobalPoint theVertexPoint
Definition: TangentHelix.h:47

Member Data Documentation

TangentCircle TangentHelix::theCircle
private
GlobalVector TangentHelix::theDirectionAtVertex
private

Definition at line 51 of file TangentHelix.h.

Referenced by directionAtVertex(), and TangentHelix().

GlobalPoint TangentHelix::theInnerPoint
private

Definition at line 45 of file TangentHelix.h.

Referenced by directionAtVertex(), and innerPoint().

GlobalPoint TangentHelix::theOuterPoint
private

Definition at line 46 of file TangentHelix.h.

Referenced by directionAtVertex(), and outerPoint().

GlobalPoint TangentHelix::theVertexPoint
private

Definition at line 47 of file TangentHelix.h.

Referenced by TangentHelix(), and vertexPoint().