CMS 3D CMS Logo

Public Member Functions | Private Attributes

FallbackLinearizationPointFinder Class Reference

#include <FallbackLinearizationPointFinder.h>

Inheritance diagram for FallbackLinearizationPointFinder:
LinearizationPointFinder

List of all members.

Public Member Functions

virtual
FallbackLinearizationPointFinder
clone () const
 FallbackLinearizationPointFinder (const ModeFinder3d &m=HsmModeFinder3d())
virtual GlobalPoint getLinearizationPoint (const std::vector< FreeTrajectoryState > &) const
virtual GlobalPoint getLinearizationPoint (const std::vector< reco::TransientTrack > &) const

Private Attributes

ModeFinder3dtheModeFinder

Detailed Description

A fallback linearization point finder that is used if the 'actual' CrossingPtBasedLinPtFinder fails. Computes the mode based on innermost states.

Definition at line 13 of file FallbackLinearizationPointFinder.h.


Constructor & Destructor Documentation

FallbackLinearizationPointFinder::FallbackLinearizationPointFinder ( const ModeFinder3d m = HsmModeFinder3d())

Definition at line 6 of file FallbackLinearizationPointFinder.cc.

Referenced by clone().

                             : theModeFinder ( m.clone() ) {}

Member Function Documentation

virtual FallbackLinearizationPointFinder* FallbackLinearizationPointFinder::clone ( ) const [inline, virtual]

Clone method

Implements LinearizationPointFinder.

Definition at line 20 of file FallbackLinearizationPointFinder.h.

References FallbackLinearizationPointFinder().

  {
    return new FallbackLinearizationPointFinder ( * this );
  };
GlobalPoint FallbackLinearizationPointFinder::getLinearizationPoint ( const std::vector< reco::TransientTrack > &  ) const [virtual]

Virtual method returning the Initial Linearization Point as an object of type GlobalPoint

Implements LinearizationPointFinder.

Definition at line 15 of file FallbackLinearizationPointFinder.cc.

References i, theModeFinder, and tmp.

Referenced by CrossingPtBasedLinearizationPointFinder::getLinearizationPoint(), CrossingPtBasedLinearizationPointFinder::useAllTracks(), and CrossingPtBasedLinearizationPointFinder::useFullMatrix().

{
    switch ( tracks.size() )
    {
      case 0:
        return GlobalPoint ( 0.,0.,0. );
      case 1:
        return tracks.begin()->impactPointState().globalPosition();
      default:
      {
        std::vector < std::pair < GlobalPoint, float > > wtracks;
        wtracks.reserve ( tracks.size() - 1 );
        for ( std::vector< reco::TransientTrack >::const_iterator i=tracks.begin(); 
              i!=tracks.end() ; ++i )
        {
            std::pair < GlobalPoint, float > tmp ( 
                i->impactPointState().globalPosition(), 1. );
            wtracks.push_back ( tmp );
        }
        return (*theModeFinder) ( wtracks );
      }
    }
  return GlobalPoint ( 0.,0.,0. );
}
GlobalPoint FallbackLinearizationPointFinder::getLinearizationPoint ( const std::vector< FreeTrajectoryState > &  tracks) const [virtual]

Reimplemented from LinearizationPointFinder.

Definition at line 9 of file FallbackLinearizationPointFinder.cc.

{
  return GlobalPoint(0.,0.,0.);
}

Member Data Documentation

Definition at line 23 of file FallbackLinearizationPointFinder.h.

Referenced by getLinearizationPoint().