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

FallbackLinearizationPointFinderclone () const override
 
 FallbackLinearizationPointFinder (const ModeFinder3d &m=HsmModeFinder3d())
 
GlobalPoint getLinearizationPoint (const std::vector< FreeTrajectoryState > &) const override
 
GlobalPoint getLinearizationPoint (const std::vector< reco::TransientTrack > &) const override
 
- 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::FallbackLinearizationPointFinder ( const ModeFinder3d m = HsmModeFinder3d())

Definition at line 6 of file FallbackLinearizationPointFinder.cc.

6 : theModeFinder(m.clone()) {}

Member Function Documentation

◆ clone()

FallbackLinearizationPointFinder* FallbackLinearizationPointFinder::clone ( ) const
inlineoverridevirtual

Clone method

Implements LinearizationPointFinder.

Definition at line 19 of file FallbackLinearizationPointFinder.h.

19 { return new FallbackLinearizationPointFinder(*this); };

◆ getLinearizationPoint() [1/2]

GlobalPoint FallbackLinearizationPointFinder::getLinearizationPoint ( const std::vector< FreeTrajectoryState > &  tracks) const
overridevirtual

Reimplemented from LinearizationPointFinder.

Definition at line 8 of file FallbackLinearizationPointFinder.cc.

9  {
10  return GlobalPoint(0., 0., 0.);
11 }

◆ getLinearizationPoint() [2/2]

GlobalPoint FallbackLinearizationPointFinder::getLinearizationPoint ( const std::vector< reco::TransientTrack > &  ) const
overridevirtual

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

Implements LinearizationPointFinder.

Definition at line 13 of file FallbackLinearizationPointFinder.cc.

14  {
15  switch (tracks.size()) {
16  case 0:
17  return GlobalPoint(0., 0., 0.);
18  case 1:
19  return tracks.begin()->impactPointState().globalPosition();
20  default: {
21  std::vector<std::pair<GlobalPoint, float> > wtracks;
22  wtracks.reserve(tracks.size() - 1);
23  for (std::vector<reco::TransientTrack>::const_iterator i = tracks.begin(); i != tracks.end(); ++i) {
24  std::pair<GlobalPoint, float> tmp(i->impactPointState().globalPosition(), 1.);
25  wtracks.push_back(tmp);
26  }
27  return (*theModeFinder)(wtracks);
28  }
29  }
30  return GlobalPoint(0., 0., 0.);
31 }

References mps_fire::i, theModeFinder, createJobs::tmp, and tracks.

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

Member Data Documentation

◆ theModeFinder

ModeFinder3d* FallbackLinearizationPointFinder::theModeFinder
private

Definition at line 19 of file FallbackLinearizationPointFinder.h.

Referenced by getLinearizationPoint().

mps_fire.i
i
Definition: mps_fire.py:428
FallbackLinearizationPointFinder::FallbackLinearizationPointFinder
FallbackLinearizationPointFinder(const ModeFinder3d &m=HsmModeFinder3d())
Definition: FallbackLinearizationPointFinder.cc:6
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:78
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
tracks
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
Definition: CAHitNtupletGeneratorKernelsImpl.h:176
FallbackLinearizationPointFinder::theModeFinder
ModeFinder3d * theModeFinder
Definition: FallbackLinearizationPointFinder.h:19