00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 #ifndef FTSuperLayer_FLAG_
00056 #define FTSuperLayer_FLAG_
00057
00058 #include <iostream>
00059 #include "MdcFastTrkAlg/FTList.h"
00060 #include "MdcFastTrkAlg/MdcParameter.h"
00061
00062 class FTWire;
00063 class FTSegment;
00064 class FTFinder;
00065 class FTSuperLayer{
00066 public:
00068 FTSuperLayer(const int firstWireID,const int NWire,
00069 const int firstLayerID,const int NLayer,
00070 const int superLayerID);
00071 ~FTSuperLayer();
00072
00073 public:
00075 void clear(void);
00076
00078 void mkSegmentList(void);
00079
00081 void appendHit(FTWire *);
00082
00084 void reAppendSalvage(void);
00085
00087 void reduce_noise(FTList<float> (&Estime)[10]);
00088
00089 public:
00091 FTList<FTWire *> & wireHits(void) const;
00092
00094 FTList<FTSegment *> & segments(void) const;
00095
00097 const int nWire(void) const;
00098
00100 const int nLayer(void) const;
00101
00103 const int layerMaxId(void) const;
00104
00106 const int localMaxId(void) const;
00107
00109 const int superLayerId(void) const;
00110
00112 FTList<FTSegment *> & complecated_segments(void);
00113
00114 static MdcParameter * param;
00115
00116 static const float _maxDphi[11];
00117
00118 private:
00120 void clustering(void);
00121
00123 void connect_short_segments(FTList<FTSegment *> & inner_short,
00124 FTList<FTSegment *> & outer_short);
00125
00127 void connect_singleHit(FTList<FTSegment *> &);
00128
00129
00130 private:
00131
00132
00133 private:
00134 const int _superLayerId;
00135 const int _firstLayerId;
00136 const int _firstWireId;
00137 const int _Nlayer;
00138 const int _Nwire;
00139 FTList<FTSegment *> * const _complecated_segments;
00140 FTList<FTWire *>& _wireHits;
00141 FTList<FTWire *>& _singleHits;
00142 FTList<FTSegment *>& _segments;
00143 };
00144
00145
00146
00147 #ifdef FTSuperLayer_NO_INLINE
00148 #define inline
00149 #else
00150 #undef inline
00151 #define FTSuperLayer_INLINE_DEFINE_HERE
00152 #endif
00153
00154 #ifdef FTSuperLayer_INLINE_DEFINE_HERE
00155
00156 inline
00157 FTSuperLayer::FTSuperLayer(const int firstWireID,const int NWire,
00158 const int firstLayerID,const int NLayer,
00159 const int superLayerID)
00160 : _superLayerId(superLayerID),
00161 _firstLayerId(firstLayerID),
00162 _firstWireId(firstWireID),
00163 _Nlayer(NLayer),
00164 _Nwire(NWire),
00165
00166 _complecated_segments(new FTList<FTSegment *>(20)),
00167 _wireHits(*(new FTList<FTWire *>(500))),
00168 _singleHits(*(new FTList<FTWire *>(100))),
00169 _segments(*(new FTList<FTSegment *>(20)))
00170 {
00171 }
00172
00173 inline
00174 FTSuperLayer::~FTSuperLayer()
00175 {
00176 clear();
00177 delete &_wireHits;
00178 delete &_singleHits;
00179 delete &_segments;
00180 if (_complecated_segments) delete _complecated_segments;
00181 }
00182
00183 inline
00184 FTList<FTWire *> &
00185 FTSuperLayer::wireHits(void) const{
00186 return _wireHits;
00187 }
00188
00189 inline
00190 const int
00191 FTSuperLayer::nWire(void) const{
00192 return _Nwire;
00193 }
00194
00195 inline
00196 const int
00197 FTSuperLayer::nLayer(void) const{
00198 return _Nlayer;
00199 }
00200
00201 inline
00202 const int
00203 FTSuperLayer::localMaxId(void) const{
00204 return (_Nwire - 1);
00205 }
00206
00207 inline
00208 const int
00209 FTSuperLayer::layerMaxId(void) const{
00210 return (_Nlayer - 1);
00211 }
00212
00213 inline
00214 FTList<FTSegment *> &
00215 FTSuperLayer::segments(void) const{
00216 return _segments;
00217 }
00218
00219 inline
00220 const int
00221 FTSuperLayer::superLayerId(void) const{
00222 return _superLayerId;
00223 }
00224
00225 inline
00226 FTList<FTSegment *> &
00227 FTSuperLayer::complecated_segments(void){
00228 return *_complecated_segments;
00229 }
00230
00231 inline
00232 void
00233 FTSuperLayer::appendHit(FTWire * h){
00234 _wireHits.append(h);
00235 }
00236
00237 #endif
00238
00239 #undef inline
00240
00241 #endif
00242