179 {
180
181 double cirr_track = fabs(1./(_rho));
182 double cirx_track = (1./_rho)*
cos(_theta);
183 double ciry_track = (1./_rho)*
sin(_theta);
184 std::vector<HoughHit>::const_iterator
iter= hitlist.
getList().begin();
189 double cirx_hit = hit->
getMidX();
190 double ciry_hit = hit->
getMidY();
192 if( _charge == 1 && (cirx_track*ciry_hit - ciry_track*cirx_hit>=0) ) continue;
193 if( _charge ==-1 && (cirx_track*ciry_hit - ciry_track*cirx_hit<=0) ) continue;
194 double l1l2 = sqrt( (cirx_hit-cirx_track)*(cirx_hit-cirx_track)+(ciry_hit-ciry_track)*(ciry_hit-ciry_track) );
195 double deltaD ;
196 if( l1l2>cirr_track ) deltaD = l1l2-cirr_track-cirr_hit;
197 if( l1l2<=cirr_track ) deltaD = l1l2-cirr_track+cirr_hit;
198
199
200
201 double theta_temp;
202 double l_temp;
203 if(cirx_track==0||cirx_hit-cirx_track==0){
204 theta_temp=0;
205 }
206 else{
207 theta_temp=
M_PI-atan2(ciry_hit-ciry_track,cirx_hit-cirx_track)+atan2(ciry_track,cirx_track);
208 if(theta_temp>2*
M_PI){
209 theta_temp=theta_temp-2*
M_PI;
210 }
211 if(theta_temp<0){
212 theta_temp=theta_temp+2*
M_PI;
213 }
214 }
215
216 if(_charge==-1) {
217 l_temp=cirr_track*theta_temp;
218 }
219 if(_charge==1) {
220 theta_temp=2*
M_PI-theta_temp;
221 l_temp=cirr_track*(theta_temp);
222 }
223 double pt = fabs( (1./_rho)/333.567 );
224
225
226
227 if( pt<0.06 && fabs(deltaD)<0.1&& l_temp<=35 ) _houghPeakHitList.push_back(hit);
228 if( 0.06<pt&&pt<0.07 && fabs(deltaD)<0.1 && l_temp<=35 ) _houghPeakHitList.push_back(hit);
229 if( 0.07<pt&&pt<0.08 && fabs(deltaD)<0.1 && l_temp<=43 ) _houghPeakHitList.push_back(hit);
230 if( 0.08<pt&&pt<0.09 && fabs(deltaD)<0.1 && l_temp<=43 ) _houghPeakHitList.push_back(hit);
231 if( 0.09<pt&&pt<0.10 && fabs(deltaD)<0.1 && l_temp<=41 ) _houghPeakHitList.push_back(hit);
232 if( 0.10<pt&&pt<0.11 && fabs(deltaD)<0.1 && l_temp<=41 ) _houghPeakHitList.push_back(hit);
233 if( 0.11<pt&&pt<0.12 && fabs(deltaD)<0.1 && l_temp<=41 ) _houghPeakHitList.push_back(hit);
234
235 if( pt<0.06 && fabs(deltaD)<0.1&& l_temp>35&&l_temp<45 ) _houghPeakHitList.push_back(hit);
236 if( 0.06<pt&&pt<0.07 && fabs(deltaD)<0.1 && l_temp>35&& l_temp<=45) _houghPeakHitList.push_back(hit);
237 if( 0.07<pt&&pt<0.08 && fabs(deltaD)<0.1 && l_temp>43&& l_temp<=50) _houghPeakHitList.push_back(hit);
238 if( 0.08<pt&&pt<0.09 && fabs(deltaD)<0.1 && l_temp>43&& l_temp<=50) _houghPeakHitList.push_back(hit);
239
240
241
242 if( pt>0.12 && fabs(deltaD)<0.1) _houghPeakHitList.push_back(hit);
243
244
245 }
246 return _houghPeakHitList.size();
247
248}
double sin(const BesAngle a)
double cos(const BesAngle a)
const std::vector< HoughHit > & getList() const
int getSlayerType() const
double getDriftDist() const