#include <TrackingTools/GeomPropagators/interface/HelixBarrelPlaneCrossing2OrderLocal.h>
Public Types | |
typedef Surface::GlobalPoint | GlobalPoint |
typedef Surface::GlobalVector | GlobalVector |
typedef Surface::LocalPoint | LocalPoint |
typedef Surface::LocalVector | LocalVector |
Public Member Functions | |
LocalVector | direction () const |
HelixBarrelPlaneCrossing2OrderLocal (const GlobalPoint &startingPos, const GlobalVector &startingDir, double rho, const Plane &plane) | |
HelixBarrelPlaneCrossing2OrderLocal () | |
LocalPoint | position () const |
Private Types | |
typedef Basic2DVector< float > | Vector2D |
Private Attributes | |
LocalVector | theDir |
LocalPoint | thePos |
The helix circle is approximated with a parabola. The current class name is misleading, since it does not have the HelixPlaneCrossing interface.
Definition at line 12 of file HelixBarrelPlaneCrossing2OrderLocal.h.
Definition at line 15 of file HelixBarrelPlaneCrossing2OrderLocal.h.
Definition at line 16 of file HelixBarrelPlaneCrossing2OrderLocal.h.
Definition at line 17 of file HelixBarrelPlaneCrossing2OrderLocal.h.
Definition at line 18 of file HelixBarrelPlaneCrossing2OrderLocal.h.
typedef Basic2DVector<float> HelixBarrelPlaneCrossing2OrderLocal::Vector2D [private] |
Definition at line 32 of file HelixBarrelPlaneCrossing2OrderLocal.h.
HelixBarrelPlaneCrossing2OrderLocal::HelixBarrelPlaneCrossing2OrderLocal | ( | ) | [inline] |
HelixBarrelPlaneCrossing2OrderLocal::HelixBarrelPlaneCrossing2OrderLocal | ( | const GlobalPoint & | startingPos, | |
const GlobalVector & | startingDir, | |||
double | rho, | |||
const Plane & | plane | |||
) |
Definition at line 6 of file HelixBarrelPlaneCrossing2OrderLocal.cc.
References d, diff, dir, f, PV3DBase< T, PVType, FrameType >::mag2(), theDir, thePos, GloballyPositioned< T >::toLocal(), PV3DBase< T, PVType, FrameType >::x(), Basic2DVector< T >::x(), x, PV3DBase< T, PVType, FrameType >::y(), Basic2DVector< T >::y(), y, and PV3DBase< T, PVType, FrameType >::z().
00009 { 00010 // translate problem to local frame of the plane 00011 LocalPoint lPos = plane.toLocal(startingPos); 00012 LocalVector lDir = plane.toLocal(startingDir); 00013 00014 // check if local frame is already special (local Y axis == global Z axis) 00015 LocalVector yPrime = plane.toLocal( GlobalVector(0,0,1.f)); 00016 LocalVector diff = yPrime - LocalVector(0,-1.f,0); 00017 float sinPhi=0, cosPhi=0; 00018 bool rotated; 00019 Vector2D pos; 00020 Vector2D dir; 00021 00022 if (diff.mag2() < 1.e-10) { 00023 00024 // cout << "Plane already oriented, yPrime = " << yPrime << endl; 00025 00026 // we are already in the special orientation 00027 pos = Vector2D( lPos.x(), lPos.y()); 00028 dir = Vector2D( lDir.x(), lDir.y());; 00029 rotated = false; 00030 } 00031 else { 00032 00033 // cout << "Plane needs rotation, yPrime = " << yPrime << endl; 00034 00035 // we need to rotate the problem 00036 sinPhi = yPrime.y(); 00037 cosPhi = yPrime.x(); 00038 pos = Vector2D( lPos.x()*cosPhi + lPos.y()*sinPhi, 00039 -lPos.x()*sinPhi + lPos.y()*cosPhi); 00040 dir = Vector2D( lDir.x()*cosPhi + lDir.y()*sinPhi, 00041 -lDir.x()*sinPhi + lDir.y()*cosPhi); 00042 rotated = true; 00043 } 00044 00045 double d = -lPos.z(); 00046 double x = pos.x() + dir.x()/lDir.z()*d - 0.5*rho*d*d; 00047 double y = pos.y() + dir.y()/lDir.z()*d; 00048 00049 // cout << "d= " << d << ", pos.x()= " << pos.x() 00050 // << ", dir.x()/lDir.z()= " << dir.x()/lDir.z() 00051 // << ", 0.5*rho*d*d= " << 0.5*rho*d*d << endl; 00052 00053 if (!rotated) { 00054 thePos = LocalPoint( x, y, 0); 00055 theDir = LocalVector( dir.x()+rho*d, dir.y(), lDir.z()); 00056 } 00057 else { 00058 thePos = LocalPoint( x*cosPhi - y*sinPhi, 00059 x*sinPhi + y*cosPhi, 0); 00060 float px = dir.x()+rho*d; 00061 theDir = LocalVector( px*cosPhi - dir.y()*sinPhi, 00062 px*sinPhi + dir.y()*cosPhi, lDir.z()); 00063 } 00064 }
LocalVector HelixBarrelPlaneCrossing2OrderLocal::direction | ( | void | ) | const [inline] |
Definition at line 28 of file HelixBarrelPlaneCrossing2OrderLocal.h.
References theDir.
00028 { return theDir;}
LocalPoint HelixBarrelPlaneCrossing2OrderLocal::position | ( | void | ) | const [inline] |
Definition at line 27 of file HelixBarrelPlaneCrossing2OrderLocal.h.
References thePos.
00027 { return thePos;}
Definition at line 35 of file HelixBarrelPlaneCrossing2OrderLocal.h.
Referenced by direction(), and HelixBarrelPlaneCrossing2OrderLocal().
Definition at line 34 of file HelixBarrelPlaneCrossing2OrderLocal.h.
Referenced by HelixBarrelPlaneCrossing2OrderLocal(), and position().