193 {
194
195 double cirr_track = fabs( 1. / ( _rho ) );
196 double cirx_track = ( 1. / _rho ) *
cos( _theta );
197 double ciry_track = ( 1. / _rho ) *
sin( _theta );
198 std::vector<HoughHit>::const_iterator
iter = hitlist.
getList().begin();
200 {
201 const HoughHit* hit = &( *iter );
204 double cirx_hit = hit->
getMidX();
205 double ciry_hit = hit->
getMidY();
207 if ( _charge == 1 && ( cirx_track * ciry_hit - ciry_track * cirx_hit >= 0 ) )
208 continue;
209 if ( _charge == -1 && ( cirx_track * ciry_hit - ciry_track * cirx_hit <= 0 ) )
210 continue;
211 double l1l2 = sqrt( ( cirx_hit - cirx_track ) * ( cirx_hit - cirx_track ) +
212 ( ciry_hit - ciry_track ) * ( ciry_hit - ciry_track ) );
213 double deltaD = 1.e9;
214 if ( l1l2 > cirr_track ) deltaD = l1l2 - cirr_track - cirr_hit;
215 if ( l1l2 <= cirr_track ) deltaD = l1l2 - cirr_track + cirr_hit;
216
217
218
219 double theta_temp;
220 double l_temp = 1.e9;
221 if ( cirx_track == 0 || cirx_hit - cirx_track == 0 ) { theta_temp = 0; }
222 else
223 {
224 theta_temp =
M_PI - atan2( ciry_hit - ciry_track, cirx_hit - cirx_track ) +
225 atan2( ciry_track, cirx_track );
226 if ( theta_temp > 2 *
M_PI ) { theta_temp = theta_temp - 2 *
M_PI; }
227 if ( theta_temp < 0 ) { theta_temp = theta_temp + 2 *
M_PI; }
228 }
229
230 if ( _charge == -1 ) { l_temp = cirr_track * theta_temp; }
231 if ( _charge == 1 )
232 {
233 theta_temp = 2 *
M_PI - theta_temp;
234 l_temp = cirr_track * ( theta_temp );
235 }
236 double pt = fabs( ( 1. / _rho ) / 333.567 );
237
238
239
240 if ( pt < 0.06 && fabs( deltaD ) < 0.1 && l_temp <= 35 )
241 _houghPeakHitList.push_back( hit );
242 if ( 0.06 < pt && pt < 0.07 && fabs( deltaD ) < 0.1 && l_temp <= 35 )
243 _houghPeakHitList.push_back( hit );
244 if ( 0.07 < pt && pt < 0.08 && fabs( deltaD ) < 0.1 && l_temp <= 43 )
245 _houghPeakHitList.push_back( hit );
246 if ( 0.08 < pt && pt < 0.09 && fabs( deltaD ) < 0.1 && l_temp <= 43 )
247 _houghPeakHitList.push_back( hit );
248 if ( 0.09 < pt && pt < 0.10 && fabs( deltaD ) < 0.1 && l_temp <= 41 )
249 _houghPeakHitList.push_back( hit );
250 if ( 0.10 < pt && pt < 0.11 && fabs( deltaD ) < 0.1 && l_temp <= 41 )
251 _houghPeakHitList.push_back( hit );
252 if ( 0.11 < pt && pt < 0.12 && fabs( deltaD ) < 0.1 && l_temp <= 41 )
253 _houghPeakHitList.push_back( hit );
254
255 if ( pt < 0.06 && fabs( deltaD ) < 0.1 && l_temp > 35 && l_temp < 45 )
256 _houghPeakHitList.push_back( hit );
257 if ( 0.06 < pt && pt < 0.07 && fabs( deltaD ) < 0.1 && l_temp > 35 && l_temp <= 45 )
258 _houghPeakHitList.push_back( hit );
259 if ( 0.07 < pt && pt < 0.08 && fabs( deltaD ) < 0.1 && l_temp > 43 && l_temp <= 50 )
260 _houghPeakHitList.push_back( hit );
261 if ( 0.08 < pt && pt < 0.09 && fabs( deltaD ) < 0.1 && l_temp > 43 && l_temp <= 50 )
262 _houghPeakHitList.push_back( hit );
263
264
265
266
267 if ( pt > 0.12 && fabs( deltaD ) < 0.1 ) _houghPeakHitList.push_back( hit );
268 }
269 return _houghPeakHitList.size();
270}
double sin(const BesAngle a)
double cos(const BesAngle a)
const std::vector< HoughHit > & getList() const
int getSlayerType() const
double getDriftDist() const