CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FallbackLinearizationPointFinder.cc
Go to the documentation of this file.
5 
7  const ModeFinder3d & m ) : theModeFinder ( m.clone() ) {}
8 
10  const std::vector<FreeTrajectoryState> & tracks ) const
11 {
12  return GlobalPoint(0.,0.,0.);
13 }
14 
16  const std::vector<reco::TransientTrack> & tracks ) const
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
FallbackLinearizationPointFinder(const ModeFinder3d &m=HsmModeFinder3d())
virtual GlobalPoint getLinearizationPoint(const std::vector< reco::TransientTrack > &) const
tuple tracks
Definition: testEve_cfg.py:39
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100