00001 #ifndef __MMUIFASTROADFINDERPAR_HH__
00002 #define __MMUIFASTROADFINDERPAR_HH__
00003
00004 #include<PHObject.h>
00005 #include<MUIOO.h>
00006 #include<MuiCommon.hh>
00007 #include<TMuiParBase.h>
00008
00010
00012 class mMuiFastRoadFinderPar : public TMuiParBase
00013 {
00014
00015 public:
00016
00018 enum Mode { ORIGINAL, SIMPLIFIED };
00019
00021 mMuiFastRoadFinderPar() :
00022 _min_valid_hits(3),
00023 _depth_match(1),
00024 _min_depth(2),
00025 _min_slope(0.21255656),
00026 _mode(SIMPLIFIED)
00027 {
00028 _symset_middle[0] = 2;
00029 _symset_middle[1] = 10;
00030 _symset_middle[2] = 24;
00031 _symset_middle[3] = 44;
00032 _symset_middle[4] = 70;
00033
00034 _symset_upper[0] = 4;
00035 _symset_upper[1] = 15;
00036 _symset_upper[2] = 32;
00037 _symset_upper[3] = 55;
00038 _symset_upper[4] = 84;
00039
00040 int iplane;
00041 for (iplane = 0; iplane < MUIOO::MAX_PLANE; iplane++)
00042 {
00043 _symset_per_plane[iplane] = _symset_upper[iplane] - _symset_middle[iplane] + 1;
00044 }
00045 iplane = 0;
00046 for (int isymset = 0; isymset < MAX_SYMSET; isymset++)
00047 {
00048 if (isymset > _symset_upper[iplane]) iplane++;
00049 _symset_plane[isymset] = iplane;
00050 _symset_logical_offset[isymset] = isymset - _symset_middle[iplane];
00051 }
00052
00053 _min_momentum[0][0] = 1.49;
00054 _min_momentum[0][1] = 1.63;
00055 _min_momentum[0][2] = 1.76;
00056 _min_momentum[0][3] = 2.04;
00057 _min_momentum[0][4] = 2.31;
00058
00059 _min_momentum[1][0] = 1.49;
00060 _min_momentum[1][1] = 1.63;
00061 _min_momentum[1][2] = 1.76;
00062 _min_momentum[1][3] = 2.04;
00063 _min_momentum[1][4] = 2.31;
00064
00065
00066 for (iplane = 0; iplane < MUIOO::MAX_PLANE; iplane++)
00067 {
00068 _maxmisshits[iplane] = 1;
00069 for (int jplane = 0; jplane < MUIOO::MAX_PLANE; jplane++)
00070 {
00071
00072 if (iplane>=jplane) {
00073 _showercut[iplane][jplane] = 6;
00074 }
00075 else {
00076 _showercut[iplane][jplane] = 0;
00077 }
00078
00079 if (iplane>=jplane && jplane!=0) {
00080 _swi[iplane][jplane] = 1;
00081 }
00082 else {
00083 _swi[iplane][jplane] = 0;
00084 }
00085
00086 if (iplane>=jplane) {
00087 _maxskip[iplane][jplane] = 1 + iplane/3;
00088 }
00089 else {
00090 _maxskip[iplane][jplane] = 0;
00091 }
00092
00093 }
00094 }
00095 }
00096
00098 ~mMuiFastRoadFinderPar(){;}
00099
00100 enum{MAX_SYMSET = 85};
00101
00103 UShort_t get_min_valid_hits() const {return _min_valid_hits;}
00104
00106 UShort_t get_symset_middle(int plane) const { return _symset_middle[plane];}
00107
00109 UShort_t get_symset_upper(int plane) const { return _symset_upper[plane];}
00110
00112 UShort_t get_symset_per_plane(int plane) const { return _symset_per_plane[plane];}
00113
00115 UShort_t get_symset_plane(int symset) const { return _symset_plane[symset] ;}
00116
00118 UShort_t get_symset_logical_offset(int symset) const
00119 { return _symset_logical_offset[symset] ;}
00120
00123 UShort_t get_depth_match() const { return _depth_match;}
00124
00126 UShort_t get_min_depth() const { return _min_depth;}
00127
00129 Float_t get_min_slope() const { return _min_slope;}
00130
00132 Float_t get_min_momentum(int arm, int plane) const { return _min_momentum[arm][plane];}
00133
00135 void set_min_valid_hits(UShort_t val) { _min_valid_hits = val;}
00136
00138 void set_symset_middle(int plane, UShort_t val) { _symset_middle[plane] = val;}
00139
00141 void set_symset_upper(int plane, UShort_t val) { _symset_upper[plane] = val;}
00142
00144 void set_symset_per_plane(int plane, UShort_t val) { _symset_per_plane[plane] = val;}
00145
00147 void set_symset_plane(int symset, UShort_t val) { _symset_plane[symset] = val;}
00148
00150 void set_symset_logical_offset(int symset, UShort_t val)
00151 { _symset_logical_offset[symset] = val;}
00152
00155 void set_depth_match(UShort_t val) { _depth_match = val;}
00156
00158 void set_min_depth(UShort_t val) { _min_depth = val;}
00159
00161 void set_min_slope(Float_t val) { _min_slope = val;}
00162
00164 void set_min_momentum(int arm, int plane, Float_t val) { _min_momentum[arm][plane] = val;}
00165
00167 void set_mode(Mode mode) { _mode = mode; }
00168
00170 Mode get_mode() const {return _mode;}
00171
00172
00173
00175 UShort_t get_maxmisshits(UShort_t ipla) const
00176 {return _maxmisshits[ipla];}
00178 void set_maxmisshits(UShort_t ipla, UShort_t val)
00179 { _maxmisshits[ipla] = val;}
00180
00182 UShort_t get_showercut(UShort_t ipla, UShort_t jpla) const
00183 {return _showercut[ipla][jpla];}
00185 void set_showercut(UShort_t ipla, UShort_t jpla, UShort_t val)
00186 { _showercut[ipla][jpla] = val;}
00187
00189 UShort_t get_swi(UShort_t ipla, UShort_t jpla) const
00190 {return _swi[ipla][jpla];}
00192 void set_swi(UShort_t ipla, UShort_t jpla, UShort_t val)
00193 { _swi[ipla][jpla] = val;}
00194
00196 UShort_t get_maxskip(UShort_t ipla, UShort_t jpla) const
00197 {return _maxskip[ipla][jpla];}
00199 void set_maxskip(UShort_t ipla, UShort_t jpla, UShort_t val)
00200 { _maxskip[ipla][jpla] = val;}
00201
00202 void print(std::ostream& os = std::cout) const {
00203 os << "** mMuiFastRoadFinderPar - value (excl. arrays) dump **" << endl;
00204 os << " min_valid_hits " << _min_valid_hits << endl
00205 << " depth_match " << _depth_match << endl
00206 << " min_depth " << _min_depth << endl
00207 << " min_slope " << _min_slope << endl
00208 << " mode " << _mode << endl;
00209 if (_mode == SIMPLIFIED) os << " simplified algorithm" << endl;
00210 else if (_mode == ORIGINAL) os << " original algorithm " << endl;
00211 else os << " unknown algorithm " << endl;
00212 os << " ** " << endl;
00213 }
00214 private:
00215
00216 UShort_t _min_valid_hits;
00217 UShort_t _symset_middle[MUIOO::MAX_PLANE];
00218 UShort_t _symset_upper[MUIOO::MAX_PLANE];
00219 UShort_t _symset_per_plane[MUIOO::MAX_PLANE];
00220 UShort_t _symset_plane[MAX_SYMSET];
00221 UShort_t _symset_logical_offset[MAX_SYMSET];
00222
00223 UShort_t _depth_match;
00224 UShort_t _min_depth;
00225 Float_t _min_slope;
00226 Float_t _min_momentum[MUIOO::MAX_ARM][MUIOO::MAX_PLANE];
00227 Mode _mode;
00228
00229 UShort_t _maxmisshits[MUIOO::MAX_PLANE];
00230 UShort_t _showercut[MUIOO::MAX_PLANE][MUIOO::MAX_PLANE];
00231 UShort_t _swi[MUIOO::MAX_PLANE][MUIOO::MAX_PLANE];
00232 UShort_t _maxskip[MUIOO::MAX_PLANE][MUIOO::MAX_PLANE];
00233 };
00234
00235 #endif