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

Definition at line 17 of file TrimmedVertexFitter.h.

Definition at line 16 of file TrimmedVertexFitter.h.

Constructor & Destructor Documentation

TrimmedVertexFitter::TrimmedVertexFitter ( )

Definition at line 8 of file TrimmedVertexFitter.cc.

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

Referenced by clone().

9 {
11  setPtCut(0.);
12 }
KalmanTrimmedVertexFinder theRector
TrimmedVertexFitter::TrimmedVertexFitter ( const edm::ParameterSet pSet)

Definition at line 14 of file TrimmedVertexFitter.cc.

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

15 {
17  setPtCut(pSet.getParameter<double>("minPt"));
18  setTrackCompatibilityCut ( pSet.getParameter<double>("trackCompatibilityCut") );
19  setVertexFitProbabilityCut ( pSet.getParameter<double>("vtxFitProbCut") );
20 }
T getParameter(std::string const &) const
KalmanTrimmedVertexFinder theRector
void setTrackCompatibilityCut(float cut)
void setVertexFitProbabilityCut(float cut)
TrimmedVertexFitter::~TrimmedVertexFitter ( )
inlineoverride

Member Function Documentation

TrimmedVertexFitter * TrimmedVertexFitter::clone ( void  ) const
overridevirtual

Fit vertex out of a VertexSeed

Implements VertexFitter< 5 >.

Definition at line 97 of file TrimmedVertexFitter.cc.

References TrimmedVertexFitter().

Referenced by ~TrimmedVertexFitter().

98 {
99  return new TrimmedVertexFitter( * this );
100 }
void TrimmedVertexFitter::setPtCut ( float  cut)
void TrimmedVertexFitter::setTrackCompatibilityCut ( float  cut)
void TrimmedVertexFitter::setVertexFitProbabilityCut ( float  cut)
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 23 of file TrimmedVertexFitter.cc.

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

Referenced by Tau.Tau::dxy(), and ~TrimmedVertexFitter().

24 {
25  std::vector<TransientVertex> vtces = theRector.vertices ( tracks );
26  if (!vtces.empty() )
27  {
28  const TransientVertex & rv = *(vtces.begin());
31  VertexState state ( rv.position(), rv.positionError() );
32  std::vector < RefCountedVertexTrack > vtrks;
33  std::vector<reco::TransientTrack> mytrks = rv.originalTracks();
34  for ( std::vector<reco::TransientTrack>::const_iterator rt=mytrks.begin();
35  rt!=mytrks.end() ; ++rt )
36  {
38  ( rv.position(), *rt );
39 
40  RefCountedVertexTrack vtrk = vfac.vertexTrack ( lstate, state, 1.0 );
41  vtrks.push_back ( vtrk );
42  };
43  return CachingVertex<5> ( rv.position(), rv.positionError(), vtrks, rv.totalChiSquared() );
44  };
45  return CachingVertex<5>();
46 }
GlobalError positionError() const
std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &tracks) const override
KalmanTrimmedVertexFinder theRector
RefCountedVertexTrack vertexTrack(const RefCountedLinearizedTrackState lt, const VertexState vs, float weight=1.0) const
float totalChiSquared() const
std::vector< reco::TransientTrack > const & originalTracks() const
GlobalPoint position() const
ReferenceCountingPointer< LinearizedTrackState< 5 > > RefCountedLinearizedTrackState
CachingVertex< 5 >::RefCountedVertexTrack RefCountedVertexTrack
RefCountedLinearizedTrackState linearizedTrackState(const GlobalPoint &linP, const reco::TransientTrack &track) const override
CachingVertex< 5 > TrimmedVertexFitter::vertex ( const std::vector< RefCountedVertexTrack > &  tracks) const
override

Definition at line 48 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.
CachingVertex< 5 > TrimmedVertexFitter::vertex ( const std::vector< RefCountedVertexTrack > &  tracks,
const reco::BeamSpot spot 
) const
override

Definition at line 55 of file TrimmedVertexFitter.cc.

References gather_cfg::cout.

Referenced by Tau.Tau::dxy().

58 {
59  std::cout << "[TrimmedVertexFitter] method not implemented" << std::endl;
60  throw VertexException("not implemented");
61 }
Common base class.
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 64 of file TrimmedVertexFitter.cc.

References gather_cfg::cout.

Referenced by Tau.Tau::dxy().

66 {
67  std::cout << "[TrimmedVertexFitter] method not implemented" << std::endl;
68  throw VertexException("not implemented");
69 }
Common base class.
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 71 of file TrimmedVertexFitter.cc.

References gather_cfg::cout.

Referenced by Tau.Tau::dxy().

74 {
75  std::cout << "[TrimmedVertexFitter] method not implemented" << std::endl;
76  throw VertexException("not implemented");
77 }
Common base class.
CachingVertex< 5 > TrimmedVertexFitter::vertex ( const std::vector< RefCountedVertexTrack > &  tracks,
const GlobalPoint priorPos,
const GlobalError priorError 
) const
override

Definition at line 79 of file TrimmedVertexFitter.cc.

References gather_cfg::cout.

Referenced by Tau.Tau::dxy().

83 {
84  std::cout << "[TrimmedVertexFitter] method not implemented" << std::endl;
85  throw VertexException("not implemented");
86 }
Common base class.
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 89 of file TrimmedVertexFitter.cc.

References gather_cfg::cout.

Referenced by Tau.Tau::dxy().

91 {
92  std::cout << "[TrimmedVertexFitter] method not implemented" << std::endl;
93  throw VertexException("not implemented");
94 }
Common base class.

Member Data Documentation

double TrimmedVertexFitter::ptcut
private

Definition at line 56 of file TrimmedVertexFitter.h.

Referenced by setPtCut().

KalmanTrimmedVertexFinder TrimmedVertexFitter::theRector
private