StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFgtLHHTracking.h
1 /***************************************************************************
2  *
3  * $Id: StFgtLHHTracking.h,v 1.2 2012/03/14 22:22:40 sgliske Exp $
4  * Author: S. Gliske, March 2012
5  *
6  ***************************************************************************
7  *
8  * Description: FGT tracking algorithm using (L)ine tracks and (H)ough
9  * transformations, folowed by estimating the helix parameters once
10  * the points along the line are selected.
11  *
12  ***************************************************************************
13  *
14  * $Log: StFgtLHHTracking.h,v $
15  * Revision 1.2 2012/03/14 22:22:40 sgliske
16  * update
17  *
18  * Revision 1.1 2012/03/14 21:04:17 sgliske
19  * creation
20  *
21  *
22  **************************************************************************/
23 
24 #ifndef _ST_FGT_LHH_TRACKING_
25 #define _ST_FGT_LHH_TRACKING_
26 
27 #include "StFgtTracking.h"
28 #include <vector>
29 
30 #include "StRoot/StFgtUtil/StFgtConsts.h"
31 
32 struct StFgtLHHLine {
33  Int_t pointIdx1, pointIdx2; // the point index values
34  Int_t discIdx1, discIdx2; // the discs of the first and second points. discIdx1 < discIdx2
35  Float_t mx, my, bx, by; // parameters of the line
36  Float_t vertZ; // derived quantity--z of the vertex
37 
38  StFgtLHHLine() : pointIdx1(0), pointIdx2(0), discIdx1(0), discIdx2(0),
39  mx(0), my(0), bx(0), by(0), vertZ(-1e11) { /* */ };
40 
41 
42  StFgtLHHLine( Int_t pointIdx1_, Int_t pointIdx2_, Int_t discIdx1_, Int_t discIdx2_,
43  Float_t mx_, Float_t my_, Float_t bx_, Float_t by_ ) :
44  pointIdx1(pointIdx1_), pointIdx2(pointIdx2_), discIdx1(discIdx1_), discIdx2(discIdx2_),
45  mx(mx_), my(my_), bx(bx_), by(by_) {
46  vertZ = ( mx || my ? -( mx*bx + my*by )/(mx*mx+my*my) : -1e11 );
47  };
48 };
49 
50 typedef std::vector< StFgtLHHLine > StFgtLHHLineVec;
51 
53  public:
54  // constructors
55  StFgtLHHTracking( const Char_t* name = "fgtTracking" );
56 
57  // deconstructor
58  virtual ~StFgtLHHTracking();
59 
60  // default equals operator and copy constructor OK
61 
62  // uses parent's ::Make()
63  virtual void Clear( const Option_t *opt = "" );
64 
65  protected:
66  // array of helixes
67  enum { kFgtNumDiscPairs = kFgtNumDiscs*(kFgtNumDiscs-1)/2 };
68  StFgtLHHLineVec mLineVec[ kFgtNumDiscPairs ];
69 
70  // find the tracks
71  virtual Int_t findTracks();
72 
73  Float_t distanceSqLineToPoint( const StFgtLHHLine& line, const TVector3& pointPos ) const;
74  Float_t distanceSqBetween( const StFgtLHHLine& line1, const StFgtLHHLine& line2 ) const;
75 
76 
77  private:
78  ClassDef(StFgtLHHTracking,1);
79 
80 };
81 
82 #endif