StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFgtTracking.h
1 /***************************************************************************
2  *
3  * $Id: StFgtTracking.h,v 1.4 2012/04/11 22:13:30 sgliske Exp $
4  * Author: S. Gliske, March 2012
5  *
6  ***************************************************************************
7  *
8  * Description: Abstract base class for FGT tracking.
9  *
10  ***************************************************************************
11  *
12  * $Log: StFgtTracking.h,v $
13  * Revision 1.4 2012/04/11 22:13:30 sgliske
14  * update
15  *
16  * Revision 1.3 2012/03/16 21:51:26 sgliske
17  * update
18  *
19  * Revision 1.2 2012/03/14 22:22:40 sgliske
20  * update
21  *
22  * Revision 1.1 2012/03/07 15:38:04 sgliske
23  * creation
24  *
25  * Revision 1.1 2012/03/06 01:32:35 sgliske
26  * creation
27  *
28  *
29  **************************************************************************/
30 
31 #ifndef _ST_FGT_TRACKING_
32 #define _ST_FGT_TRACKING_
33 
34 #include "StMaker.h"
35 #include <vector>
36 #include <TVector3.h>
37 
38 #include "StRoot/StFgtUtil/StFgtConsts.h"
39 
40 // reduced amount of data for a cluster
41 struct StFgtTrClus {
42  Int_t idx;
43  Float_t pos;
44 
45  StFgtTrClus( Int_t i = -1, Float_t p = 0 ) : idx(i), pos(p) { /* */ };
46 };
47 
48 // basic space point info for tracking
49 struct StFgtTrPoint {
50  Int_t ptIdx, rIdx, pIdx; // ptIdx is the index value of this point
51  TVector3 pos;
52 
53  static Int_t lastIdx;
54 
55  StFgtTrPoint( Int_t rI = -1, Int_t pI = -1 ) : ptIdx(++lastIdx), rIdx(rI), pIdx(pI) { /* */ };
56  StFgtTrPoint( const StFgtTrClus& rClus, const StFgtTrClus& pClus, Float_t z ) : ptIdx(++lastIdx), rIdx(rClus.idx), pIdx(pClus.idx), pos(rClus.pos,0,z) {
57  pos.SetPhi(pClus.pos);
58  };
59  StFgtTrPoint( Float_t x, Float_t y, Float_t z ) : ptIdx(++lastIdx), rIdx(-1), pIdx(-1), pos( x,y,z ) { /* */ };
60 };
61 
62 
63 typedef std::vector< StFgtTrPoint > StFgtTrPointVec;
64 typedef std::vector< StFgtTrClus > StFgtTrClusVec;
65 
66 class StFgtTracking : public StMaker {
67  public:
68  // constructors
69  StFgtTracking( const Char_t* name = "fgtTracking" );
70 
71  // deconstructor
72  virtual ~StFgtTracking();
73 
74  // default equals operator and copy constructor OK
75 
76  virtual Int_t Make();
77  virtual Int_t Init();
78  virtual void Clear( const Option_t *opt = "" );
79 
80  protected:
81  // array of clusters and points per disc
82  StFgtTrClusVec mRclusVecPerOctDisc[ kFgtNumDiscs*kFgtNumOctantsPerDisc ];
83  StFgtTrClusVec mPclusVecPerOctDisc[ kFgtNumDiscs*kFgtNumOctantsPerDisc ];
84  StFgtTrPointVec mPointVecPerDisc[ kFgtNumDiscs ];
85 
86  // to keep track of total number of points per event
87  Int_t mPointsTot;
88 
89  // functions
90  Int_t computePointsFromStEvent();
91  Int_t computePointsFromMuDst();
92  void addClus( Int_t clusIdx, Int_t geoId, Float_t rPos, Float_t pPos );
93  Int_t makePoints();
94 
95  // virtual function to find the tracks, given that the
96  // 'pointVecPerDisc' has been properly set for the event.
97  virtual Int_t findTracks() = 0;
98 
99  private:
100  ClassDef(StFgtTracking,1);
101 
102 };
103 
104 #endif
virtual Int_t Make()