120 std::vector<Trk::PositionAndWeight>::const_iterator
begin = VectorOfPoints.begin();
121 std::vector<Trk::PositionAndWeight>::const_iterator
end = VectorOfPoints.end();
125 if ( VectorOfPoints.empty() )
return tmpseed ;
126 if ( VectorOfPoints.size() == 1 )
130 std::vector< Amg::Vector3D > tmpphi;
131 std::vector< Amg::Vector3D > tmpradi;
132 std::vector< Amg::Vector3D > tmpz;
136 std::vector<Trk::PositionAndWeight> vectorOfPoints ;
138 for (std::vector<PositionAndWeight>::const_iterator
i =
begin;
i!=
end; ++
i) {
139 double wght =
i->second ;
140 double px =
i->first.x() ;
if (
px == 0 )
px += 0.000001 ;
141 double py =
i->first.y() ;
142 double phi = atan2 (
py,
px ) ;
146 tmpphi.emplace_back(
phi, wght, 1.0*
idx ) ;
147 tmpradi.emplace_back(
r, wght, 1.0*
idx ) ;
148 tmpz.emplace_back(
i->first.z(), wght, 1.0*
idx ) ;
150 info.pushPoint (
phi,
r,
i->first.z(), wght);
151 vectorOfPoints.push_back( *
i ) ;
157 std::sort( tmpphi.begin(), tmpphi.end(), Compare1dPosition() ) ;
158 std::sort( tmpradi.begin(), tmpradi.end(), Compare1dPosition() ) ;
159 std::sort( tmpz.begin(), tmpz.end(), Compare1dPosition() ) ;
161 std::vector< std::pair< std::pair <double, std::pair<int,int> >,
double > > allphi;
162 std::vector< std::pair< std::pair <double, std::pair<int,int> >,
double > > allradi;
163 std::vector< std::pair< std::pair <double, std::pair<int,int> >,
double > > allz;
166 for (
unsigned i = 0 ;
i < tmpphi.size() ;
i++ )
168 std::pair<int,int> xidphi( (
int)( tmpphi[
i].
z()),
idx ) ;
169 std::pair<int,int> xidradi( (
int)( tmpradi[
i].
z() ),
idx ) ;
170 std::pair<int,int> xidz( (
int)( tmpz[
i].
z() ),
idx ) ;
172 std::pair <double, std::pair<int,int> >
phi( tmpphi[
i].
x(), xidphi ) ;
173 std::pair <double, std::pair<int,int> > radi( tmpradi[
i].
x(), xidradi ) ;
174 std::pair <double, std::pair<int,int> > zz( tmpz[
i].
x(), xidz ) ;
176 std::pair< std::pair <double, std::pair<int,int> >,
double > wghtphi(
phi, tmpphi[
i].
y() ) ;
177 allphi.push_back( wghtphi ) ;
178 std::pair< std::pair <double, std::pair<int,int> >,
double > wghtradi( radi, tmpradi[
i].
y() ) ;
179 allradi.push_back( wghtradi ) ;
180 std::pair< std::pair <double, std::pair<int,int> >,
double > wghtz( zz, tmpz[
i].
y() ) ;
181 allz.push_back( wghtz ) ;
190 bool phibroader = false ;
206 bool radiusbroader = false ;
210 ATH_MSG_DEBUG(
" One more searching for a mode in radius !" );
212 radiusbroader = true ;
219 ATH_MSG_DEBUG(
" " << radisz <<
" modes found along radius " );
237 double tmpsdX = 0., tmpsdY = 0., tmpsdXY = 0. ;
243 if ( olphiradi.empty() )
245 if ( phisz > 1 && radisz > 1 )
251 ATH_MSG_DEBUG(
" One more searching for a mode in phi or/and radius !" );
255 ATH_MSG_DEBUG(
" " <<
" more modes found : " << phisz <<
" "<< radisz );
258 if ( olphiradi.empty() )
261 if ( phibroader && radiusbroader )
266 if ( olphiZ.empty() && olradiZ.empty() )
268 else if ( !olphiZ.empty() && olradiZ.empty() )
270 else if ( olphiZ.empty() && !olradiZ.empty() )
275 if ( ol_phi_radi_Z.empty() )
282 tmpsdX = tmpseed.x() - vx ;
283 tmpsdY = tmpseed.y() - vy ;
284 tmpsdXY = sqrt( tmpsdX*tmpsdX + tmpsdY*tmpsdY ) ;
294 ATH_MSG_DEBUG(
" One more searching for WIDER mode in phi or/and radius !" );
301 if ( ! radiusbroader )
309 if ( olphiradi.empty() )
314 if ( olphiZ.empty() && olradiZ.empty() )
316 else if ( !olphiZ.empty() && olradiZ.empty() )
318 else if ( olphiZ.empty() && !olradiZ.empty() )
323 if ( ol_phi_radi_Z.empty() )
330 tmpsdX = tmpseed.x() - vx ;
331 tmpsdY = tmpseed.y() - vy ;
332 tmpsdXY = sqrt( tmpsdX*tmpsdX + tmpsdY*tmpsdY ) ;
342 ATH_MSG_DEBUG(
" " << olphiradi.size() <<
" modes found with phi-radius correlated " );
345 if ( ol_phi_radi_Z.empty() )
349 ATH_MSG_DEBUG(
" One more searching for a mode in Z after CheckCorrelation !" );
353 if ( ol_phi_radi_Z.empty() )
358 if ( ol_phi_radi_Z.empty() )
362 tmpsdX = tmpseed.x() - vx ;
363 tmpsdY = tmpseed.y() - vy ;
364 tmpsdXY = sqrt( tmpsdX*tmpsdX + tmpsdY*tmpsdY ) ;
378 <<
" modes found with phi-radius-Z fully correlated " );
384 tmpsdX = tmpseed.x() - vx ;
385 tmpsdY = tmpseed.y() - vy ;
386 tmpsdXY = sqrt( tmpsdX*tmpsdX + tmpsdY*tmpsdY ) ;