00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef FTFTRACK
00013 #define FTFTRACK
00014 #include "FtfGeneral.h"
00015
00016 #include "rtsLog.h"
00017
00018 #include "FtfBaseTrack.h"
00019 #include "FtfHit.h"
00020 #include "FtfPara.h"
00021
00022 int const USE_SEGMENT= 1 ;
00023 int const USE_FOLLOW = 2 ;
00024 int const GO_DOWN =-1 ;
00025 int const GO_UP = 1 ;
00026
00027 class FtfTrack : public FtfBaseTrack {
00028
00029 public:
00030 friend class FtfFinder ;
00031
00032 void add ( FtfHit *thisHit, int way ) ;
00033 void add ( FtfTrack *thisTrack ) ;
00034 int buildTrack ( FtfHit *firstHit, FtfContainer *volume ) ;
00035 void dEdx ( ) ;
00036 void deleteCandidate ( ) ;
00037 void fill ( ) ;
00038 void fillPrimary ( double &xc, double &yc, double &rc,
00039 double xPar, double yPar ) ;
00040 void fillSecondary ( double &xc, double &yc, double xPar, double yPar ) ;
00041 int follow ( FtfContainer *volume, int way, int rowToStop ) ;
00042 int followHitSelection ( FtfHit *baseHit, FtfHit *candidateHit, int way ) ;
00043 FtfTrack* getNextTrack ( ) { return (FtfTrack *)nxatrk ; } ;
00044 int mergePrimary ( FtfContainer *trackArea ) ;
00045 void reset ( ) ;
00046 FtfHit *seekNextHit ( FtfContainer *volume, FtfHit *baseHit,
00047 int nradiusSteps, int whichFunction ) ;
00048 int segment ( FtfContainer *volume, int way ) ;
00049 int segmentHitSelection ( FtfHit *baseHit, FtfHit *candidateHit ) ;
00050 void *nxatrk ;
00051
00052 #ifdef DEBUG
00053 void debugAsk ( ) ;
00054 void debugDeleteCandidate ( ) ;
00055 void debugFill ( ) ;
00056 void debugFollowCandidate ( FtfHit *candidate_hit ) ;
00057 void debugFollowSuccess ( double dxy, double dsz, double lchi2_xy,
00058 double lchi2_sz, double chi2_min,
00059 FtfHit *candidate_hit ) ;
00060 void debugInVolume ( FtfHit *base_hit, FtfHit *current_hit ) ;
00061 void debugNew ( ) ;
00062 #endif
00063
00064 float lastXyAngle ;
00065 typedef double vfit ;
00066
00067 vfit xRefHit ;
00068 vfit yRefHit ;
00069 vfit xLastHit ;
00070 vfit yLastHit ;
00071
00072 vfit s11Xy ;
00073 vfit s12Xy ;
00074 vfit s22Xy ;
00075 vfit g1Xy ;
00076 vfit g2Xy ;
00077 vfit s11Sz ;
00078 vfit s12Sz ;
00079 vfit s22Sz ;
00080 vfit g1Sz ;
00081 vfit g2Sz ;
00082
00083 vfit ddXy, a1Xy, a2Xy ;
00084 vfit ddSz, a1Sz, a2Sz ;
00085
00086
00087 inline virtual void nextHit (){ currentHit = ((FtfBaseHit *)currentHit)->nextTrackHit ; } ;
00088
00089 } ;
00090 #endif
00091