ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/IPHCalignment2/TrackingTools/PatternTools/interface/TwoTrackMinimumDistanceHelixHelix.h
Revision: 1.1
Committed: Fri Nov 25 16:38:24 2011 UTC (13 years, 5 months ago) by econte
Content type: text/plain
Branch: MAIN
CVS Tags: TBD2011, TBD_2011, HEAD
Log Message:
new IPHC alignment

File Contents

# Content
1 #ifndef _Tracker_TwoTrackMinimumDistanceHelixHelix_H_
2 #define _Tracker_TwoTrackMinimumDistanceHelixHelix_H_
3
4 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
5 // #include <string>
6 // #include <sstream>
7 #include <utility>
8
9 /** \class TwoTrackMinimumDistanceHelixHelix
10 * This is a helper class for TwoTrackMinimumDistance.
11 * No user should need direct access to this class.
12 * It actually implements a Newton-Kantorowitsch method
13 * for finding the minimum distance between two tracks.
14 */
15
16 class GlobalTrajectoryParameters;
17
18 class TwoTrackMinimumDistanceHelixHelix {
19
20 public:
21 TwoTrackMinimumDistanceHelixHelix();
22 ~TwoTrackMinimumDistanceHelixHelix();
23
24 bool calculate( const GlobalTrajectoryParameters &,
25 const GlobalTrajectoryParameters &,
26 const float qual=.001 ); // retval=true? error occured.
27
28 std::pair <GlobalPoint, GlobalPoint> points() const {
29 if (!pointsUpdated) finalPoints();
30 return std::pair<GlobalPoint, GlobalPoint> (pointG, pointH);
31 }
32
33 std::pair <double, double> pathLength() const {
34 if (!pointsUpdated) finalPoints();
35 return std::pair <double, double> ( pathG, pathH);
36 }
37
38
39
40 double firstAngle() const {return thepG;}
41 double secondAngle() const {return thepH;}
42
43 private:
44 bool updateCoeffs( const GlobalPoint & , const GlobalPoint & );
45 bool oneIteration ( double &, double & ) const;
46
47 // bool parallelTracks () const;
48 void finalPoints() const;
49
50 private:
51 GlobalTrajectoryParameters const *theH, *theG;
52 // the 'GH-track data' (constants)
53 double thea, theb, thec1, thec2, thed1, thed2, thee1, thee2, theg, theh;
54 // double thelambdaG, thelambdaH;
55 double thetanlambdaG, thetanlambdaH;
56 double thesinpG0, thecospG0;
57 double thesinpH0, thecospH0;
58 double thepG0, thepH0;
59
60 // the variable stuff
61 // = the point we are currently looking at.
62 mutable double thepG, thepH;
63 mutable double thesinpG, thesinpH;
64 mutable double thecospG, thecospH;
65 mutable GlobalPoint pointG, pointH;
66 mutable double pathG, pathH;
67 mutable bool pointsUpdated;
68
69 double themaxjump, thesingjacI;
70 int themaxiter;
71
72 };
73 #endif