#include <RecoTracker/TkSeedGenerator/interface/FastLine.h>
Public Member Functions | |
double | c () const |
FastLine (const GlobalPoint &outerHit, const GlobalPoint &innerHit, double rho) | |
FastLine (const GlobalPoint &outerHit, const GlobalPoint &innerHit) | |
bool | isValid () const |
double | n1 () const |
double | n2 () const |
~FastLine () | |
Private Member Functions | |
void | createLineParameters () |
Private Attributes | |
double | theC |
GlobalPoint | theInnerHit |
double | theN1 |
double | theN2 |
GlobalPoint | theOuterHit |
double | theRho |
bool | theValid |
A Line is defined by n1*x + n2*y + c = 0. (== n1*RHOPHI + n2*Z + c) If rho is not specified, the Line parameters are calculated in R-Z.
Implementation: Matthias Winkler 21.02.2001
Definition at line 15 of file FastLine.h.
FastLine::FastLine | ( | const GlobalPoint & | outerHit, | |
const GlobalPoint & | innerHit | |||
) |
Definition at line 3 of file FastLine.cc.
References createLineParameters().
00004 : 00005 theOuterHit(outerHit), 00006 theInnerHit(innerHit), 00007 theRho(0.), 00008 theN1(0.), 00009 theN2(0.), 00010 theC(0.), 00011 theValid(true) { 00012 00013 createLineParameters(); 00014 00015 }
FastLine::FastLine | ( | const GlobalPoint & | outerHit, | |
const GlobalPoint & | innerHit, | |||
double | rho | |||
) |
Definition at line 17 of file FastLine.cc.
References createLineParameters().
00019 : 00020 theOuterHit(outerHit), 00021 theInnerHit(innerHit), 00022 theRho(rho), 00023 theN1(0.), 00024 theN2(0.), 00025 theC(0.), 00026 theValid(true) { 00027 00028 createLineParameters(); 00029 00030 }
FastLine::~FastLine | ( | ) | [inline] |
double FastLine::c | ( | ) | const [inline] |
Definition at line 32 of file FastLine.h.
References theC.
Referenced by RoadSearchTrackCandidateMakerAlgorithm::initialTrajectory(), RoadSearchTrackCandidateMakerAlgorithm::initialTrajectoryFromTriplet(), ConversionFastHelix::straightLineStateAtVertex(), and FastHelix::straightLineStateAtVertex().
00032 {return theC;}
void FastLine::createLineParameters | ( | ) | [private] |
Definition at line 32 of file FastLine.cc.
References n1(), n2(), norm, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::perp2(), funct::sqrt(), theC, theInnerHit, theN1, theN2, theOuterHit, theRho, and PV3DBase< T, PVType, FrameType >::z().
Referenced by FastLine().
00032 { 00033 00034 double rphi0 = 0., rphi1 = 0.; 00035 00036 if(theRho > 0.) { 00037 if (fabs( 1. - theInnerHit.perp2()/(2.*theRho*theRho) ) > 1.) rphi0 = theInnerHit.perp(); 00038 else rphi0 = theRho*acos(1. - theInnerHit.perp2()/(2.*theRho*theRho)); 00039 if (fabs(1. - theOuterHit.perp2()/(2.*theRho*theRho) ) >1.) rphi1 = theOuterHit.perp(); 00040 else rphi1 = theRho*acos(1. - theOuterHit.perp2()/(2.*theRho*theRho)); 00041 } else { 00042 rphi0 = theInnerHit.perp(); 00043 rphi1 = theOuterHit.perp(); 00044 } 00045 00046 double n1 = theInnerHit.z() - theOuterHit.z(); 00047 double n2 = -(rphi0 - rphi1); 00048 double norm = sqrt(n1*n1 + n2*n2); 00049 theN1 = n1/norm; 00050 theN2= n2/norm; 00051 theC = -(theN1*rphi0 + theN2*theInnerHit.z()); 00052 // theC = -(theN1*rphi1 + theN2*theOuterHit.z()); 00053 00054 }
double FastLine::n1 | ( | ) | const [inline] |
Definition at line 28 of file FastLine.h.
References theN1.
Referenced by createLineParameters(), RoadSearchTrackCandidateMakerAlgorithm::initialTrajectory(), ConversionFastHelix::straightLineStateAtVertex(), and FastHelix::straightLineStateAtVertex().
00028 {return theN1;}
double FastLine::n2 | ( | ) | const [inline] |
Definition at line 30 of file FastLine.h.
References theN2.
Referenced by createLineParameters(), RoadSearchTrackCandidateMakerAlgorithm::initialTrajectory(), RoadSearchTrackCandidateMakerAlgorithm::initialTrajectoryFromTriplet(), ConversionFastHelix::straightLineStateAtVertex(), and FastHelix::straightLineStateAtVertex().
00030 {return theN2;}
double FastLine::theC [private] |
GlobalPoint FastLine::theInnerHit [private] |
double FastLine::theN1 [private] |
double FastLine::theN2 [private] |
GlobalPoint FastLine::theOuterHit [private] |
double FastLine::theRho [private] |
bool FastLine::theValid [private] |