00001 00009 #ifndef STAR_StFtpcTracker 00010 #define STAR_StFtpcTracker 00011 00012 #include "TObject.h" 00013 #include "TBenchmark.h" 00014 #include "StFtpcVertex.hh" 00015 #include "TObjArray.h" 00016 00017 class StFtpcTracker : public TObject { 00018 00019 protected: 00020 00021 TBenchmark *mBench; // benchmark object (just for run-time measurements) 00022 Float_t mTime; // total time consumption 00023 00024 StFtpcVertex *mVertex; // vertex used for tracking 00025 StFtpcVertex *mVertexEast; // vertex estimation obtained by back extrapolation of east tracks 00026 StFtpcVertex *mVertexWest; // vertex estimation obtained by back extrapolation of west tracks 00027 00028 TObjArray *mHit; // ObjArray of clusters 00029 TObjArray *mTrack; // ObjArray of tracks 00030 Bool_t mHitsCreated; // indicator if this class created the mHit ObjArray 00031 Bool_t mVertexCreated; // indicator if this class created the mVertex 00032 Bool_t mTrackCreated; // indicator if this class created the mTrack 00033 Double_t mMaxDca; // cut value for momentum fit 00034 00035 public: 00036 00037 StFtpcTracker(); // default constructor 00038 StFtpcTracker(StFtpcVertex *vertex, 00039 TObjArray *hit, 00040 TObjArray *track, 00041 Bool_t bench = (Bool_t)kFALSE, 00042 Double_t max_Dca = 100.); // constructor if everything is already there 00043 StFtpcTracker(TObjArray *hits, 00044 StFtpcVertex *vertex, 00045 Bool_t bench = (Bool_t)kFALSE, 00046 Double_t max_Dca = 100.); // constructor to handle arbitrary hits 00047 00048 virtual ~StFtpcTracker(); // destructor 00049 00050 void EstimateVertex(StFtpcVertex *vertex, UChar_t iterations = 1); // vertex estimation with fit tracks for FTPC east amd west 00051 void EstimateVertex(StFtpcVertex *vertex, Char_t hemispshere, UChar_t iterations); // vertex estimation with fit tracks 00052 StFtpcVertex EstimateVertex(StFtpcVertex *vertex, Char_t hemisphere, 00053 Char_t sector, UChar_t iterations = 1); // vertex estimation with fit tracks 00054 StFtpcVertex EstimateVertex(StFtpcVertex *vertex, Char_t hemisphere, 00055 Double_t lowAngle, Double_t highAngle, 00056 Double_t lowRadius, Double_t highRadius, 00057 UChar_t iterations = 1); // vertex estimation with fit tracks 00058 void CalcEnergyLoss(); // calculates dE/dx 00059 void Sorter(Double_t *arr, Int_t *index, Int_t len); // sorts by dE/dx 00060 Int_t GlobalFitAnddEdx() { return FitAnddEdx(kFALSE); } // global momentum fit and dE/dx calculation (no writing!) 00061 Int_t PrimaryFitAnddEdx() { return FitAnddEdx(kTRUE); } // primary momentum fit and dE/dx calculation (no writing!) 00062 Int_t FitAnddEdx(Bool_t primary_fit); // does momentum fit and dE/dx calculation (no writing!) 00063 Int_t GlobalFit() { return Fit(kFALSE); } // global momentum fit 00064 Int_t PrimaryFit() { return Fit(kTRUE); } // primary momentum fit 00065 Int_t Fit(Bool_t primary_fit); // does momentum fit 00066 00067 // getter 00068 Float_t GetTime() { return mTime; } // returns time consumption 00069 Float_t GetTime(char name[10]) { return mBench->GetCpuTime(name); } // returns time consumption for different tracking parts 00070 StFtpcVertex *GetVertex() { return mVertex; } // returns the vertex 00071 StFtpcVertex *GetVertexEast() { return mVertexEast; } // returns the vertex estimation of FTPC east 00072 StFtpcVertex *GetVertexWest() { return mVertexWest; } // returns the vertex estimation of FTPC west 00073 Int_t GetNumberOfClusters() { return mHit->GetEntriesFast(); } // returns the number of clusters 00074 Int_t GetNumberOfTracks() { return mTrack->GetEntriesFast(); } // returns the number of tracks 00075 TObjArray *GetClusters() { return mHit; } // returns ObjArray of clusters 00076 TObjArray *GetTracks() { return mTrack; } // returns ObjArray of tracks 00077 Double_t GetMaxDca() const { return mMaxDca; } // returns cut value for momentum fir 00078 00079 // setter 00080 void SetMaxDca(Double_t f) { mMaxDca = f; } // sets cut value for momentum fit 00081 00082 ClassDef(StFtpcTracker, 1) //Ftpc tracker interface class 00083 }; 00084 00085 00086 00087 00088 #endif 00089 00090 // $Id: StFtpcTracker.hh,v 1.21 2004/09/03 20:36:23 perev Exp $ 00091 // $Log: StFtpcTracker.hh,v $ 00092 // Revision 1.21 2004/09/03 20:36:23 perev 00093 // Big LeakOff + mem optimisation 00094 // 00095 // Revision 1.20 2004/02/12 19:37:11 oldi 00096 // *** empty log message *** 00097 // 00098 // Revision 1.19 2003/09/16 16:52:51 jeromel 00099 // Multiple constructor entry, zeroing mBench everywhere + doxygenized 00100 // 00101 // Revision 1.18 2003/09/16 15:27:02 jcs 00102 // removed inline as it would leave a few undefined reference 00103 // 00104 // Revision 1.17 2003/05/20 18:35:02 oldi 00105 // Cuts for vertex estimation introduced (globDca < 1 cm, multiplicity >= 200). 00106 // 00107 // Revision 1.16 2002/11/06 13:47:15 oldi 00108 // Vertex handling simplifed. 00109 // Global/primary fit handling simplified. 00110 // Code clean ups. 00111 // 00112 // Revision 1.15 2002/10/31 13:41:54 oldi 00113 // dE/dx parameters read from database, now. 00114 // Vertex estimation for different sectors added. 00115 // Vertex estimation for different areas (angle, radius) added. 00116 // 00117 // Revision 1.14 2002/06/04 13:41:37 oldi 00118 // Minor change: 'west' -> 'hemisphere' (just a naming convention) 00119 // 00120 // Revision 1.13 2002/04/05 16:51:13 oldi 00121 // Cleanup of MomentumFit (StFtpcMomentumFit is now part of StFtpcTrack). 00122 // Each Track inherits from StHelix, now. 00123 // Therefore it is possible to calculate, now: 00124 // - residuals 00125 // - vertex estimations obtained by back extrapolations of FTPC tracks 00126 // Chi2 was fixed. 00127 // Many additional minor (and major) changes. 00128 // 00129 // Revision 1.12 2002/01/29 11:08:29 oldi 00130 // Write() renamed to WriteCluster() resp. WriteTrack() to avoid compiler warnings. 00131 // As a result the functions TObject::Write() are available again (directly). 00132 // 00133 // Revision 1.11 2001/07/12 08:35:54 oldi 00134 // New function GetTime(char name[10]) introduced. 00135 // 00136 // Revision 1.10 2001/04/02 14:20:23 oldi 00137 // Some minor changes due to Insure++ was reporting problems. 00138 // These changes do not affect the physical output of StFtpcTrackMaker! 00139 // 00140 // Revision 1.9 2001/01/30 13:31:54 oldi 00141 // New variable mTime introduced to count total time consumption. 00142 // 00143 // Revision 1.8 2001/01/25 15:22:34 oldi 00144 // Review of the complete code. 00145 // Fix of several bugs which caused memory leaks: 00146 // - Tracks were not allocated properly. 00147 // - Tracks (especially split tracks) were not deleted properly. 00148 // - TClonesArray seems to have a problem (it could be that I used it in a 00149 // wrong way). I changed all occurences to TObjArray which makes the 00150 // program slightly slower but much more save (in terms of memory usage). 00151 // Speed up of HandleSplitTracks() which is now 12.5 times faster than before. 00152 // Cleanup. 00153 // 00154 // Revision 1.7 2000/11/23 01:33:16 oldi 00155 // Proper initialization of some variables to avoid Insure++ error messages. 00156 // 00157 // Revision 1.6 2000/11/10 18:39:09 oldi 00158 // TBenchmark object 'mBech' moved from StFtpcConfMapper to here. This implied changes in the constructors. 00159 // New function CalcEnergyLoss(FDE_FDEPAR_ST *fdepar) which replaces the pams/fde modul. 00160 // New function FitAnddEdxAndWrite() introduced which replaces CalcEnergyLoss() and FitAndWrite(). 00161 // 00162 // Revision 1.5 2000/07/18 21:22:17 oldi 00163 // Changes due to be able to find laser tracks. 00164 // Cleanup: - new functions in StFtpcConfMapper, StFtpcTrack, and StFtpcPoint 00165 // to bundle often called functions 00166 // - short functions inlined 00167 // - formulas of StFormulary made static 00168 // - avoid streaming of objects of unknown size 00169 // (removes the bunch of CINT warnings during compile time) 00170 // - two or three minor bugs cured 00171 // 00172 // Revision 1.4 2000/07/03 12:48:14 jcs 00173 // use (pre)Vertex id to access vertex coordinates for unconstrained fit and 00174 // for constrained fit 00175 // 00176 // Revision 1.3 2000/05/15 14:28:14 oldi 00177 // problem of preVertex solved: if no main vertex is found (z = NaN) StFtpcTrackMaker stops with kStWarn, 00178 // refitting procedure completed and included in StFtpcTrackMaker (commented), 00179 // new constructor of StFtpcVertex due to refitting procedure, 00180 // minor cosmetic changes 00181 // 00182 // Revision 1.2 2000/05/12 12:59:18 oldi 00183 // removed delete operator for mSegment in StFtpcConfMapper (mSegment was deleted twice), 00184 // add two new constructors for StFtpcTracker to be able to refit already existing tracks, 00185 // minor cosmetics 00186 // 00187 // Revision 1.1 2000/05/10 13:39:33 oldi 00188 // Initial version of StFtpcTrackMaker 00189 //
1.5.9