338 std::cout<<
" DiMuonSeedGeneratorHIC::forwardUpdateSeed::EndcapSeed::start "<<std::endl;
347 std::cout<<
" DiMuonSeedGeneratorHIC::forwardUpdateSeed::EndcapSeed::EndcapSeed::hit is not valid "<<std::endl;
350 return pair<TrajectoryMeasurement,bool>(tm,good);
354 std::cout<<
" DiMuonSeedGeneratorHIC::forwardUpdateSeed::EndcapSeed::EndcapSeed::valid "<<std::endl;
371 double pi=4.*atan(1.);
372 double twopi=8.*atan(1.);
379 double df = fabs(realhit.
phi() -
phi);
381 if(df > pi) df = twopi-df;
384 cout<<
" DiMuonSeedGeneratorHIC::forwardUpdateSeed::phipred::phihit::df "<<phi<<
" "<<realhit.
phi()<<
" "<<df<<endl;
392 double delr =
sqrt(realhit.
y()*realhit.
y()+realhit.
x()*realhit.
x());
393 double theta = atan2( delr, delx );
404 cout<<
" First parametrization "<<df<<endl;
406 pznew = fabs(( df - 0.0191878 )/(-0.0015952))/3.;
408 if( df > 0.1 ) pznew = 5.;
409 if( fabs(pznew)<3.) pznew = 3.;
412 ptnew = pznew *
tan( theta );
417 cout<<
" Second parametrization "<<df<<endl;
419 pznew = fabs(( df - 0.38 )/(-0.009))/3.;
420 if( fabs(pznew)<2.) pznew = 2.;
423 ptnew = pznew *
tan( theta );
428 cout<<
" Third parametrization "<<df<<endl;
430 pznew = fabs(( df - 0.9 )/(-0.02))/3.;
431 if( fabs(pznew)<1.) pznew = 1.;
433 ptnew = pznew *
tan( theta );
438 cout<<
" Forth parametrization "<<df<<endl;
441 if( df < 0.0000001 ) {
448 ptmin = (dfinv - 4.)/0.7 + 3.;
449 if( ptmin < 2. ) ptmin = 2.;
450 ptmax = (dfinv - 0.5)/0.3 + 3.;
451 ptnew = ( ptmin + ptmax )/2.;
452 pznew = ptnew/
tan( theta );
457 std::cout<<
" dfinv "<<dfinv<<
" ptmax "<<ptmax<<
" ptmin "<<ptmin<<std::endl;
464 if( (pt - ptnew)/pt < -2 || (pt - ptnew)/pt > 1 )
467 cout<<
" Return fake 0 pt::ptnew "<<pt<<
" "<<ptnew<<endl;
469 return pair<TrajectoryMeasurement,bool>(tm,good);
476 double alfnew = realhit.
phi() + aCharge*alf;
485 if( realhit.
perp() < 80. ) {
488 cout<<
" Return fake 1 "<<realhit.
perp()<<endl;
490 return pair<TrajectoryMeasurement,bool>(tm,good);
498 if( realhit.
perp() > 100. || realhit.
perp() < 60. ) {
500 cout<<
" Return fake 2 "<<endl;
502 return pair<TrajectoryMeasurement,bool>(tm,good);
507 if( realhit.
perp() > 75. || realhit.
perp() < 40. ) {
510 cout<<
" Return fake 3 "<<endl;
512 return pair<TrajectoryMeasurement,bool>(tm,good);
521 if( realhit.
perp() > 84. || realhit.
perp() < 40. ) {
523 cout<<
" Return fake 4 "<<endl;
525 return pair<TrajectoryMeasurement,bool>(tm,good);
530 if( realhit.
perp() > 84. || realhit.
perp() < 40. ) {
532 cout<<
" Return fake 5 "<<endl;
534 return pair<TrajectoryMeasurement,bool>(tm,good);
539 cout<<
" Create new TM "<<endl;
542 m(0,0) = fabs(0.5*pznew);
555 pair<TrajectoryMeasurement,bool> newtmr(newtm,good);
557 std::cout<<
" Endcap newtm estimate= "<<newtmr.first.estimate()<<
" "<<newtmr.second<<
" pt "<<pnew0.perp()<<
" pz "<<pnew0.z()<<std::endl;
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
const GlobalTrajectoryParameters & parameters() const
TrajectoryStateOnSurface forwardPredictedState() const
Access to forward predicted state (from fitter or builder)
FreeTrajectoryState * freeTrajectoryState(bool withErrors=true) const
Sin< T >::type sin(const T &t)
Geom::Phi< T > phi() const
Geom::Theta< T > theta() const
ConstRecHitPointer recHit() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
const MagneticField * magfield
GlobalVector momentum() const
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
const DetLayer * layer() const
GlobalPoint position() const
TrackCharge charge() const
const HICConst * theHICConst