00001 #ifndef TREESEARCH_H
00002 #define TREESEARCH_H
00003 #include <iostream>
00004 #include "tree.h"
00005
00006 #ifndef TLAYERS
00007 #define TLAYERS 6
00008 #endif
00009
00013 class treesearch{
00014
00015 public:
00016 char **static_pattern;
00017 int **static_hash;
00018 int static_maxlevel;
00019
00020 int tlayers;
00021
00022 treesearch();
00023 ~treesearch();
00024 void wireselection( Hit **x, Hit **X, Hit **xn, Hit**Xn, double maxdist);
00025
00026 void setpoint( double off,double h1, double res1,double h2, double res2,
00027 double width, unsigned bwidth, char *pa, char *pb,
00028 int *hasha, int *hashb);
00029 int TsSetPoint(double detectorwidth, double zdistance, Hit *Ha, Hit *Hb,
00030 char *patterna, char *patternb, int *hasha, int *hashb,
00031 unsigned binwidth);
00032 int TsSetPoint(double detectorwidth, Hit *H,char *pattern, int *hash,unsigned binwidth);
00033
00034 int exists( int *newa, int front, int back, TreeLine *treeline);
00035
00036 void TsSearch(shortnode *node, char *pattern[16], int *hashpat[16],
00037 int maxlevel, int numWires);
00038
00039
00040 private:
00041 void _TsSearch(shortnode *node,int level,int offset,int row_offset,int reverse,int numWires);
00042 void _setpoints(double posStart,double posEnd,double detectorwidth,unsigned binwidth,char *pattern,int *hash);
00043 void _setpoint(double position, double resolution,double detectorwidth,
00044 unsigned binwidth, char *pattern, int *hash);
00045 };
00046
00047
00048 #endif