StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFtpcTracker.hh
1 
9 #ifndef STAR_StFtpcTracker
10 #define STAR_StFtpcTracker
11 
12 #include "TObject.h"
13 #include "TBenchmark.h"
14 #include "StFtpcVertex.hh"
15 #include "TObjArray.h"
16 
17 class StFtpcTracker : public TObject {
18 
19 protected:
20 
21  TBenchmark *mBench; // benchmark object (just for run-time measurements)
22  Float_t mTime; // total time consumption
23 
24  StFtpcVertex *mVertex; // vertex used for tracking
25  StFtpcVertex *mVertexEast; // vertex estimation obtained by back extrapolation of east tracks
26  StFtpcVertex *mVertexWest; // vertex estimation obtained by back extrapolation of west tracks
27 
28  TObjArray *mHit; // ObjArray of clusters
29  TObjArray *mTrack; // ObjArray of tracks
30  Bool_t mHitsCreated; // indicator if this class created the mHit ObjArray
31  Bool_t mVertexCreated; // indicator if this class created the mVertex
32  Bool_t mTrackCreated; // indicator if this class created the mTrack
33  Double_t mMaxDca; // cut value for momentum fit
34 
35 public:
36 
37  StFtpcTracker(); // default constructor
39  TObjArray *hit,
40  TObjArray *track,
41  Bool_t bench = (Bool_t)kFALSE,
42  Double_t max_Dca = 100.); // constructor if everything is already there
43  StFtpcTracker(TObjArray *hits,
44  StFtpcVertex *vertex,
45  Bool_t bench = (Bool_t)kFALSE,
46  Double_t max_Dca = 100.); // constructor to handle arbitrary hits
47 
48  virtual ~StFtpcTracker(); // destructor
49 
50  void EstimateVertex(StFtpcVertex *vertex, UChar_t iterations = 1); // vertex estimation with fit tracks for FTPC east amd west
51  void EstimateVertex(StFtpcVertex *vertex, Char_t hemispshere, UChar_t iterations); // vertex estimation with fit tracks
52  StFtpcVertex EstimateVertex(StFtpcVertex *vertex, Char_t hemisphere,
53  Char_t sector, UChar_t iterations = 1); // vertex estimation with fit tracks
54  StFtpcVertex EstimateVertex(StFtpcVertex *vertex, Char_t hemisphere,
55  Double_t lowAngle, Double_t highAngle,
56  Double_t lowRadius, Double_t highRadius,
57  UChar_t iterations = 1); // vertex estimation with fit tracks
58  void CalcEnergyLoss(); // calculates dE/dx
59  void Sorter(Double_t *arr, Int_t *index, Int_t len); // sorts by dE/dx
60  Int_t GlobalFitAnddEdx() { return FitAnddEdx(kFALSE); } // global momentum fit and dE/dx calculation (no writing!)
61  Int_t PrimaryFitAnddEdx() { return FitAnddEdx(kTRUE); } // primary momentum fit and dE/dx calculation (no writing!)
62  Int_t FitAnddEdx(Bool_t primary_fit); // does momentum fit and dE/dx calculation (no writing!)
63  Int_t GlobalFit() { return Fit(kFALSE); } // global momentum fit
64  Int_t PrimaryFit() { return Fit(kTRUE); } // primary momentum fit
65  Int_t Fit(Bool_t primary_fit); // does momentum fit
66 
67  // getter
68  Float_t GetTime() { return mTime; } // returns time consumption
69  Float_t GetTime(char name[10]) { return mBench->GetCpuTime(name); } // returns time consumption for different tracking parts
70  StFtpcVertex *GetVertex() { return mVertex; } // returns the vertex
71  StFtpcVertex *GetVertexEast() { return mVertexEast; } // returns the vertex estimation of FTPC east
72  StFtpcVertex *GetVertexWest() { return mVertexWest; } // returns the vertex estimation of FTPC west
73  Int_t GetNumberOfClusters() { return mHit->GetEntriesFast(); } // returns the number of clusters
74  Int_t GetNumberOfTracks() { return mTrack->GetEntriesFast(); } // returns the number of tracks
75  TObjArray *GetClusters() { return mHit; } // returns ObjArray of clusters
76  TObjArray *GetTracks() { return mTrack; } // returns ObjArray of tracks
77  Double_t GetMaxDca() const { return mMaxDca; } // returns cut value for momentum fir
78 
79  // setter
80  void SetMaxDca(Double_t f) { mMaxDca = f; } // sets cut value for momentum fit
81 
82  ClassDef(StFtpcTracker, 1) //Ftpc tracker interface class
83 };
84 
85 
86 
87 
88 #endif
89 
90 // $Id: StFtpcTracker.hh,v 1.21 2004/09/03 20:36:23 perev Exp $
91 // $Log: StFtpcTracker.hh,v $
92 // Revision 1.21 2004/09/03 20:36:23 perev
93 // Big LeakOff + mem optimisation
94 //
95 // Revision 1.20 2004/02/12 19:37:11 oldi
96 // *** empty log message ***
97 //
98 // Revision 1.19 2003/09/16 16:52:51 jeromel
99 // Multiple constructor entry, zeroing mBench everywhere + doxygenized
100 //
101 // Revision 1.18 2003/09/16 15:27:02 jcs
102 // removed inline as it would leave a few undefined reference
103 //
104 // Revision 1.17 2003/05/20 18:35:02 oldi
105 // Cuts for vertex estimation introduced (globDca < 1 cm, multiplicity >= 200).
106 //
107 // Revision 1.16 2002/11/06 13:47:15 oldi
108 // Vertex handling simplifed.
109 // Global/primary fit handling simplified.
110 // Code clean ups.
111 //
112 // Revision 1.15 2002/10/31 13:41:54 oldi
113 // dE/dx parameters read from database, now.
114 // Vertex estimation for different sectors added.
115 // Vertex estimation for different areas (angle, radius) added.
116 //
117 // Revision 1.14 2002/06/04 13:41:37 oldi
118 // Minor change: 'west' -> 'hemisphere' (just a naming convention)
119 //
120 // Revision 1.13 2002/04/05 16:51:13 oldi
121 // Cleanup of MomentumFit (StFtpcMomentumFit is now part of StFtpcTrack).
122 // Each Track inherits from StHelix, now.
123 // Therefore it is possible to calculate, now:
124 // - residuals
125 // - vertex estimations obtained by back extrapolations of FTPC tracks
126 // Chi2 was fixed.
127 // Many additional minor (and major) changes.
128 //
129 // Revision 1.12 2002/01/29 11:08:29 oldi
130 // Write() renamed to WriteCluster() resp. WriteTrack() to avoid compiler warnings.
131 // As a result the functions TObject::Write() are available again (directly).
132 //
133 // Revision 1.11 2001/07/12 08:35:54 oldi
134 // New function GetTime(char name[10]) introduced.
135 //
136 // Revision 1.10 2001/04/02 14:20:23 oldi
137 // Some minor changes due to Insure++ was reporting problems.
138 // These changes do not affect the physical output of StFtpcTrackMaker!
139 //
140 // Revision 1.9 2001/01/30 13:31:54 oldi
141 // New variable mTime introduced to count total time consumption.
142 //
143 // Revision 1.8 2001/01/25 15:22:34 oldi
144 // Review of the complete code.
145 // Fix of several bugs which caused memory leaks:
146 // - Tracks were not allocated properly.
147 // - Tracks (especially split tracks) were not deleted properly.
148 // - TClonesArray seems to have a problem (it could be that I used it in a
149 // wrong way). I changed all occurences to TObjArray which makes the
150 // program slightly slower but much more save (in terms of memory usage).
151 // Speed up of HandleSplitTracks() which is now 12.5 times faster than before.
152 // Cleanup.
153 //
154 // Revision 1.7 2000/11/23 01:33:16 oldi
155 // Proper initialization of some variables to avoid Insure++ error messages.
156 //
157 // Revision 1.6 2000/11/10 18:39:09 oldi
158 // TBenchmark object 'mBech' moved from StFtpcConfMapper to here. This implied changes in the constructors.
159 // New function CalcEnergyLoss(FDE_FDEPAR_ST *fdepar) which replaces the pams/fde modul.
160 // New function FitAnddEdxAndWrite() introduced which replaces CalcEnergyLoss() and FitAndWrite().
161 //
162 // Revision 1.5 2000/07/18 21:22:17 oldi
163 // Changes due to be able to find laser tracks.
164 // Cleanup: - new functions in StFtpcConfMapper, StFtpcTrack, and StFtpcPoint
165 // to bundle often called functions
166 // - short functions inlined
167 // - formulas of StFormulary made static
168 // - avoid streaming of objects of unknown size
169 // (removes the bunch of CINT warnings during compile time)
170 // - two or three minor bugs cured
171 //
172 // Revision 1.4 2000/07/03 12:48:14 jcs
173 // use (pre)Vertex id to access vertex coordinates for unconstrained fit and
174 // for constrained fit
175 //
176 // Revision 1.3 2000/05/15 14:28:14 oldi
177 // problem of preVertex solved: if no main vertex is found (z = NaN) StFtpcTrackMaker stops with kStWarn,
178 // refitting procedure completed and included in StFtpcTrackMaker (commented),
179 // new constructor of StFtpcVertex due to refitting procedure,
180 // minor cosmetic changes
181 //
182 // Revision 1.2 2000/05/12 12:59:18 oldi
183 // removed delete operator for mSegment in StFtpcConfMapper (mSegment was deleted twice),
184 // add two new constructors for StFtpcTracker to be able to refit already existing tracks,
185 // minor cosmetics
186 //
187 // Revision 1.1 2000/05/10 13:39:33 oldi
188 // Initial version of StFtpcTrackMaker
189 //
Int_t Fit(Bool_t primary_fit)
StFtpcTracker()
Default constructor. Sets the pointers to 0 an cut for momentum fit loosely.
void CalcEnergyLoss()
virtual ~StFtpcTracker()
Destructor.
void EstimateVertex(StFtpcVertex *vertex, UChar_t iterations=1)
Vertex estimation with fit tracks for FTPC east and west.
void Sorter(Double_t *arr, Int_t *index, Int_t len)