00001
00002
00003
00004
00005
00006 #ifndef _TMUI1DROADO_H_
00007 #define _TMUI1DROADO_H_
00008
00009
00010
00011 #include<TDataType.h>
00012 #include<PHKey.hh>
00013 #include<PHException.h>
00014 #include<TMutFitPar.hh>
00015 #include<MUIOO.h>
00016 #include<PHPoint.h>
00017
00018
00020
00021
00037 class TMui1DRoadO : public PHKey {
00038
00039 public:
00040
00042
00043
00045 TMui1DRoadO(){;}
00046
00048 virtual ~TMui1DRoadO(){;}
00049
00051 TMui1DRoadO(const Key& key) :
00052 PHKey(key){;}
00053
00055 TMui1DRoadO(const Key&,
00056 UShort_t arm,
00057 UShort_t panel,
00058 UShort_t orientation,
00059 UShort_t index){;}
00061
00063
00064
00066 virtual TMutFitPar get_fit_par() const { return TMutFitPar();}
00067
00069 virtual void set_fit_par(const TMutFitPar& fit_par) {}
00070
00072
00074
00075
00080 virtual PHPoint get_gap0_point() const { return PHPoint(); }
00081
00083 virtual void set_depth( UShort_t depth) {}
00084
00086 virtual void set_nhit( UShort_t nhit) {}
00087
00089 virtual void set_max_hit_plane( UShort_t maxhit ) {}
00090
00092 virtual void set_road_quality( Float_t quality) {}
00093
00095 virtual void set_ghost_flag( UShort_t ghostflag) {}
00096
00098 virtual void set_gapbit( UShort_t gapbit) {}
00099
00101 virtual void set_freedom( UShort_t freedom) {}
00102
00104 virtual void set_fitweight( UShort_t fitplane, Double_t fitweight) {}
00105
00107 virtual UShort_t get_depth() const { return 0;}
00108
00110 virtual UShort_t get_nhit() const {return 0;}
00111
00113 virtual int get_numfired() const {return 0;}
00114
00116 virtual int get_numskipped() const {return 0;}
00117
00119 virtual UShort_t get_max_hit_plane() const {return 0;}
00120
00122 virtual Float_t get_road_quality() const {return 0;}
00123
00125 virtual UShort_t get_freedom() const {return 0;}
00126
00128 virtual Double_t get_fitweight(UShort_t fitplane) const {return 0.0;}
00129
00131 virtual UShort_t get_ghost_flag() const {return 0;}
00132
00134 virtual UShort_t get_gapbit() const {return 0;}
00135
00137
00139
00140
00141 virtual void set_arm( UShort_t arm) {}
00142
00144 virtual void set_panel( UShort_t panel) {}
00145
00147 virtual void set_orientation( UShort_t orientation) {}
00148
00150 virtual void set_index( UShort_t index) {}
00151
00153 virtual UShort_t get_arm() const {return 0;}
00154
00156 virtual UShort_t get_panel() const {return 0;}
00157
00159 virtual UShort_t get_orientation() const {return 0;}
00160
00162 virtual UShort_t get_index() const {return 0;}
00163
00165
00167
00168
00169 virtual void print(std::ostream& os = std::cout) const {}
00170
00172
00173 ClassDef(TMui1DRoadO,1)
00174
00175 };
00176
00177
00178 class TMui1DRoadO_v1 : public TMui1DRoadO {
00179
00180 public:
00181
00182 TMui1DRoadO_v1();
00183
00184 virtual ~TMui1DRoadO_v1(){;}
00185
00186 TMui1DRoadO_v1(const Key&,
00187 UShort_t arm,
00188 UShort_t panel,
00189 UShort_t orientation,
00190 UShort_t index);
00191
00192
00193 TMui1DRoadO_v1(const TMui1DRoadO*);
00194
00195 TMui1DRoadO_v1(const TMui1DRoadO&);
00196
00197 TMui1DRoadO_v1(const Key&, const TMui1DRoadO*);
00198
00199 TMutFitPar get_fit_par() const {return _fit_par;}
00200
00201 PHPoint get_gap0_point() const { return PHPoint(_fit_par.get_x(),
00202 _fit_par.get_y(),
00203 _fit_par.get_z());}
00204
00205 void set_fit_par(const TMutFitPar& fit_par) {_fit_par = fit_par;}
00206
00207 void set_depth( UShort_t depth) { _depth=depth;}
00208
00209 void set_nhit( UShort_t nhit) { _nhit=nhit;}
00210
00211 void set_max_hit_plane( UShort_t maxhit ) { _max_hit_plane=maxhit;}
00212
00213 void set_road_quality( Float_t quality) { _road_quality=quality;}
00214
00215 void set_ghost_flag( UShort_t ghostflag) { _ghost_flag=ghostflag;}
00216
00217 void set_gapbit( UShort_t gapbit) { _gapbit=gapbit;}
00218
00219 void set_freedom( UShort_t freedom) { _freedom=freedom;}
00220
00221 void set_fitweight( UShort_t fitplane, Double_t fitweight){
00222 BOUNDS_CHECK(fitplane,FITWEIGHT_SIZE);
00223 _fitweight[fitplane] = fitweight;
00224 }
00225
00226 UShort_t get_depth() const { return _depth;}
00227
00228 UShort_t get_nhit() const { return _nhit;}
00229
00230 int get_numfired() const ;
00231
00232 int get_numskipped() const;
00233
00234 UShort_t get_max_hit_plane() const { return _max_hit_plane;}
00235
00236 Float_t get_road_quality() const { return _road_quality;}
00237
00238 UShort_t get_freedom() const { return _freedom;}
00239
00240 Double_t get_fitweight(UShort_t fitplane) const
00241 {
00242 BOUNDS_CHECK(fitplane,FITWEIGHT_SIZE);
00243 return _fitweight[fitplane];
00244 }
00245
00246 UShort_t get_ghost_flag() const {return _ghost_flag;}
00247
00248 UShort_t get_gapbit() const {return _gapbit;}
00249
00250 void set_arm( UShort_t arm) { _arm=arm;}
00251
00252 void set_panel( UShort_t panel) { _panel=panel;}
00253
00254 void set_orientation( UShort_t orientation) { _orientation=orientation;}
00255
00256 void set_index( UShort_t index) { _index=index;}
00257
00258 UShort_t get_arm() const {return _arm;}
00259
00260 UShort_t get_panel() const {return _panel;}
00261
00262 UShort_t get_orientation() const {return _orientation;}
00263
00264 UShort_t get_index() const {return _index;}
00265
00266 void print(std::ostream& os = std::cout) const {
00267 MUIOO::PRINT(os,GetName());
00268 os << " arm: " << _arm << std::endl;
00269 os << " panel: " << _panel << std::endl;
00270 os << " orientation: " << _orientation << std::endl;
00271 os << " index: " << _index << std::endl;
00272 os << " depth: " << _depth << std::endl;
00273 os << " quality: " << _road_quality << std::endl;
00274 os << " freedom: " << _freedom << std::endl;
00275 os << " ghostflag: " << _ghost_flag << std::endl;
00276 os << " gapbit: " << _gapbit << std::endl;
00277 os << " nhit: " << _nhit << std::endl;
00278 os << " ref position: " << _fit_par.get_x() << " " <<
00279 _fit_par.get_y() << " " <<
00280 _fit_par.get_z() << " " << std::endl;
00281 os << " ref direction: " << _fit_par.get_dxdz() << " " <<
00282 _fit_par.get_dydz() << " "
00283 << std::endl;
00284 MUIOO::PRINT(os,"**");
00285 }
00286
00287 private:
00288
00289 UShort_t _arm;
00290 UShort_t _panel;
00291 UShort_t _orientation;
00292 UShort_t _index;
00293
00294 TMutFitPar _fit_par;
00295
00296 UShort_t _depth;
00297 UShort_t _nhit;
00298 UShort_t _max_hit_plane;
00299 Float_t _road_quality;
00300 UShort_t _freedom;
00301 UShort_t _ghost_flag;
00302 UShort_t _gapbit;
00303 enum { FITWEIGHT_SIZE=6};
00304 double _fitweight[FITWEIGHT_SIZE];
00305
00306 ClassDef(TMui1DRoadO_v1,1)
00307 };
00308
00309 #endif
00310
00311
00312
00313
00314
00315
00316
00317
00318