CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
FallbackLinearizationPointFinder Class Reference

#include <FallbackLinearizationPointFinder.h>

Inheritance diagram for FallbackLinearizationPointFinder:
LinearizationPointFinder

Public Member Functions

virtual FallbackLinearizationPointFinderclone () const
 
 FallbackLinearizationPointFinder (const ModeFinder3d &m=HsmModeFinder3d())
 
virtual GlobalPoint getLinearizationPoint (const std::vector< reco::TransientTrack > &) const
 
virtual GlobalPoint getLinearizationPoint (const std::vector< FreeTrajectoryState > &) const
 
- Public Member Functions inherited from LinearizationPointFinder
virtual ~LinearizationPointFinder ()
 

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().

7  : theModeFinder ( m.clone() ) {}
virtual ModeFinder3d * clone() const =0

Member Function Documentation

virtual FallbackLinearizationPointFinder* FallbackLinearizationPointFinder::clone ( ) const
inlinevirtual

Clone method

Implements LinearizationPointFinder.

Definition at line 20 of file FallbackLinearizationPointFinder.h.

References FallbackLinearizationPointFinder().

21  {
22  return new FallbackLinearizationPointFinder ( * this );
23  };
FallbackLinearizationPointFinder(const ModeFinder3d &m=HsmModeFinder3d())
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().

17 {
18  switch ( tracks.size() )
19  {
20  case 0:
21  return GlobalPoint ( 0.,0.,0. );
22  case 1:
23  return tracks.begin()->impactPointState().globalPosition();
24  default:
25  {
26  std::vector < std::pair < GlobalPoint, float > > wtracks;
27  wtracks.reserve ( tracks.size() - 1 );
28  for ( std::vector< reco::TransientTrack >::const_iterator i=tracks.begin();
29  i!=tracks.end() ; ++i )
30  {
31  std::pair < GlobalPoint, float > tmp (
32  i->impactPointState().globalPosition(), 1. );
33  wtracks.push_back ( tmp );
34  }
35  return (*theModeFinder) ( wtracks );
36  }
37  }
38  return GlobalPoint ( 0.,0.,0. );
39 }
int i
Definition: DBlmapReader.cc:9
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
GlobalPoint FallbackLinearizationPointFinder::getLinearizationPoint ( const std::vector< FreeTrajectoryState > &  tracks) const
virtual

Reimplemented from LinearizationPointFinder.

Definition at line 9 of file FallbackLinearizationPointFinder.cc.

11 {
12  return GlobalPoint(0.,0.,0.);
13 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10

Member Data Documentation

ModeFinder3d* FallbackLinearizationPointFinder::theModeFinder
private

Definition at line 23 of file FallbackLinearizationPointFinder.h.

Referenced by getLinearizationPoint().