CMS 3D CMS Logo

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

#include <TrimmedVertexFitter.h>

Inheritance diagram for TrimmedVertexFitter:
VertexFitter< 5 >

Public Types

typedef ReferenceCountingPointer< LinearizedTrackState< 5 > > RefCountedLinearizedTrackState
 
typedef CachingVertex< 5 >::RefCountedVertexTrack RefCountedVertexTrack
 

Public Member Functions

TrimmedVertexFitterclone () const override
 
void setPtCut (float cut)
 
void setTrackCompatibilityCut (float cut)
 
void setVertexFitProbabilityCut (float cut)
 
 TrimmedVertexFitter ()
 
 TrimmedVertexFitter (const edm::ParameterSet &pSet)
 
CachingVertex< 5 > vertex (const std::vector< reco::TransientTrack > &tracks) const override
 
CachingVertex< 5 > vertex (const std::vector< RefCountedVertexTrack > &tracks) const override
 
CachingVertex< 5 > vertex (const std::vector< RefCountedVertexTrack > &tracks, const reco::BeamSpot &spot) const override
 
CachingVertex< 5 > vertex (const std::vector< reco::TransientTrack > &tracks, const GlobalPoint &linPoint) const override
 
CachingVertex< 5 > vertex (const std::vector< reco::TransientTrack > &tracks, const GlobalPoint &priorPos, const GlobalError &priorError) const override
 
CachingVertex< 5 > vertex (const std::vector< RefCountedVertexTrack > &tracks, const GlobalPoint &priorPos, const GlobalError &priorError) const override
 
CachingVertex< 5 > vertex (const std::vector< reco::TransientTrack > &tracks, const reco::BeamSpot &beamSpot) const override
 
 ~TrimmedVertexFitter () override
 
- Public Member Functions inherited from VertexFitter< 5 >
virtual CachingVertex< Nvertex (const std::vector< typename CachingVertex< N >::RefCountedVertexTrack > &tracks) const=0
 
virtual CachingVertex< Nvertex (const std::vector< typename CachingVertex< N >::RefCountedVertexTrack > &tracks, const reco::BeamSpot &spot) const=0
 
virtual CachingVertex< Nvertex (const std::vector< typename CachingVertex< N >::RefCountedVertexTrack > &tracks, const GlobalPoint &priorPos, const GlobalError &priorError) const=0
 
 VertexFitter ()
 
virtual ~VertexFitter ()
 

Private Attributes

double ptcut
 
KalmanTrimmedVertexFinder theRector
 

Detailed Description

Definition at line 12 of file TrimmedVertexFitter.h.

Member Typedef Documentation

◆ RefCountedLinearizedTrackState

Definition at line 15 of file TrimmedVertexFitter.h.

◆ RefCountedVertexTrack

Definition at line 14 of file TrimmedVertexFitter.h.

Constructor & Destructor Documentation

◆ TrimmedVertexFitter() [1/2]

TrimmedVertexFitter::TrimmedVertexFitter ( )

Definition at line 6 of file TrimmedVertexFitter.cc.

References KalmanTrimmedVertexFinder::setMaxNbOfVertices(), setPtCut(), and theRector.

Referenced by clone().

6  {
8  setPtCut(0.);
9 }
KalmanTrimmedVertexFinder theRector
void setPtCut(float cut)

◆ TrimmedVertexFitter() [2/2]

TrimmedVertexFitter::TrimmedVertexFitter ( const edm::ParameterSet pSet)

Definition at line 11 of file TrimmedVertexFitter.cc.

References edm::ParameterSet::getParameter(), KalmanTrimmedVertexFinder::setMaxNbOfVertices(), setPtCut(), setTrackCompatibilityCut(), setVertexFitProbabilityCut(), and theRector.

11  {
13  setPtCut(pSet.getParameter<double>("minPt"));
14  setTrackCompatibilityCut(pSet.getParameter<double>("trackCompatibilityCut"));
15  setVertexFitProbabilityCut(pSet.getParameter<double>("vtxFitProbCut"));
16 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
KalmanTrimmedVertexFinder theRector
void setTrackCompatibilityCut(float cut)
void setVertexFitProbabilityCut(float cut)
void setPtCut(float cut)

◆ ~TrimmedVertexFitter()

TrimmedVertexFitter::~TrimmedVertexFitter ( )
inlineoverride

Definition at line 20 of file TrimmedVertexFitter.h.

20 {}

Member Function Documentation

◆ clone()

TrimmedVertexFitter * TrimmedVertexFitter::clone ( void  ) const
overridevirtual

Fit vertex out of a VertexSeed

Implements VertexFitter< 5 >.

Definition at line 75 of file TrimmedVertexFitter.cc.

References TrimmedVertexFitter().

75 { return new TrimmedVertexFitter(*this); }

◆ setPtCut()

void TrimmedVertexFitter::setPtCut ( float  cut)

◆ setTrackCompatibilityCut()

void TrimmedVertexFitter::setTrackCompatibilityCut ( float  cut)

◆ setVertexFitProbabilityCut()

void TrimmedVertexFitter::setVertexFitProbabilityCut ( float  cut)

◆ vertex() [1/7]

CachingVertex< 5 > TrimmedVertexFitter::vertex ( const std::vector< reco::TransientTrack > &  tracks) const
overridevirtual

Fit vertex out of a set of TransientTracks

Implements VertexFitter< 5 >.

Definition at line 18 of file TrimmedVertexFitter.cc.

References LinearizedTrackStateFactory::linearizedTrackState(), TransientVertex::originalTracks(), TransientVertex::position(), TransientVertex::positionError(), hcal_runs::rt, theRector, TransientVertex::totalChiSquared(), DiMuonV_cfg::tracks, VertexTrackFactory< N >::vertexTrack(), and KalmanTrimmedVertexFinder::vertices().

Referenced by Tau.Tau::dxy().

18  {
19  std::vector<TransientVertex> vtces = theRector.vertices(tracks);
20  if (!vtces.empty()) {
21  const TransientVertex& rv = *(vtces.begin());
25  std::vector<RefCountedVertexTrack> vtrks;
26  std::vector<reco::TransientTrack> mytrks = rv.originalTracks();
27  for (std::vector<reco::TransientTrack>::const_iterator rt = mytrks.begin(); rt != mytrks.end(); ++rt) {
29 
30  RefCountedVertexTrack vtrk = vfac.vertexTrack(lstate, state, 1.0);
31  vtrks.push_back(vtrk);
32  };
33  return CachingVertex<5>(rv.position(), rv.positionError(), vtrks, rv.totalChiSquared());
34  };
35  return CachingVertex<5>();
36 }
RefCountedLinearizedTrackState linearizedTrackState(const GlobalPoint &linP, const reco::TransientTrack &track) const override
float totalChiSquared() const
GlobalPoint position() const
KalmanTrimmedVertexFinder theRector
GlobalError positionError() const
RefCountedVertexTrack vertexTrack(const RefCountedLinearizedTrackState lt, const VertexState vs, float weight=1.0) const
ReferenceCountingPointer< LinearizedTrackState< 5 > > RefCountedLinearizedTrackState
std::vector< reco::TransientTrack > const & originalTracks() const
CachingVertex< 5 >::RefCountedVertexTrack RefCountedVertexTrack
std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &tracks) const override

◆ vertex() [2/7]

CachingVertex< 5 > TrimmedVertexFitter::vertex ( const std::vector< RefCountedVertexTrack > &  tracks) const
override

Definition at line 38 of file TrimmedVertexFitter.cc.

References gather_cfg::cout.

Referenced by Tau.Tau::dxy().

38  {
39  std::cout << "[TrimmedVertexFitter] method not implemented" << std::endl;
40  throw VertexException("not implemented");
41 }
Common base class.

◆ vertex() [3/7]

CachingVertex< 5 > TrimmedVertexFitter::vertex ( const std::vector< RefCountedVertexTrack > &  tracks,
const reco::BeamSpot spot 
) const
override

Definition at line 43 of file TrimmedVertexFitter.cc.

References gather_cfg::cout.

Referenced by Tau.Tau::dxy().

44  {
45  std::cout << "[TrimmedVertexFitter] method not implemented" << std::endl;
46  throw VertexException("not implemented");
47 }
Common base class.

◆ vertex() [4/7]

CachingVertex< 5 > TrimmedVertexFitter::vertex ( const std::vector< reco::TransientTrack > &  tracks,
const GlobalPoint linPoint 
) const
overridevirtual

Fit vertex out of a set of TransientTracks. The specified point will be used as linearization point, but will NOT be used as prior.

Implements VertexFitter< 5 >.

Definition at line 49 of file TrimmedVertexFitter.cc.

References gather_cfg::cout.

Referenced by Tau.Tau::dxy().

50  {
51  std::cout << "[TrimmedVertexFitter] method not implemented" << std::endl;
52  throw VertexException("not implemented");
53 }
Common base class.

◆ vertex() [5/7]

CachingVertex< 5 > TrimmedVertexFitter::vertex ( const std::vector< reco::TransientTrack > &  tracks,
const GlobalPoint priorPos,
const GlobalError priorError 
) const
overridevirtual

Fit vertex out of a set of TransientTracks. Uses the specified point as both the linearization point AND as prior estimate of the vertex position. The error is used for the weight of the prior estimate.

Implements VertexFitter< 5 >.

Definition at line 55 of file TrimmedVertexFitter.cc.

References gather_cfg::cout.

Referenced by Tau.Tau::dxy().

57  {
58  std::cout << "[TrimmedVertexFitter] method not implemented" << std::endl;
59  throw VertexException("not implemented");
60 }
Common base class.

◆ vertex() [6/7]

CachingVertex< 5 > TrimmedVertexFitter::vertex ( const std::vector< RefCountedVertexTrack > &  tracks,
const GlobalPoint priorPos,
const GlobalError priorError 
) const
override

Definition at line 62 of file TrimmedVertexFitter.cc.

References gather_cfg::cout.

Referenced by Tau.Tau::dxy().

64  {
65  std::cout << "[TrimmedVertexFitter] method not implemented" << std::endl;
66  throw VertexException("not implemented");
67 }
Common base class.

◆ vertex() [7/7]

CachingVertex< 5 > TrimmedVertexFitter::vertex ( const std::vector< reco::TransientTrack > &  tracks,
const reco::BeamSpot beamSpot 
) const
overridevirtual

Fit vertex out of a set of TransientTracks. The specified BeamSpot will be used as priot, but NOT for the linearization. The specified LinearizationPointFinder will be used to find the linearization point.

Implements VertexFitter< 5 >.

Definition at line 69 of file TrimmedVertexFitter.cc.

References gather_cfg::cout.

Referenced by Tau.Tau::dxy().

70  {
71  std::cout << "[TrimmedVertexFitter] method not implemented" << std::endl;
72  throw VertexException("not implemented");
73 }
Common base class.

Member Data Documentation

◆ ptcut

double TrimmedVertexFitter::ptcut
private

Definition at line 50 of file TrimmedVertexFitter.h.

Referenced by setPtCut().

◆ theRector

KalmanTrimmedVertexFinder TrimmedVertexFitter::theRector
private