CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions
VertexTimeAlgorithmBase Class Referenceabstract

#include <VertexTimeAlgorithmBase.h>

Inheritance diagram for VertexTimeAlgorithmBase:
VertexTimeAlgorithmFromTracksPID VertexTimeAlgorithmLegacy4D

Public Member Functions

virtual void fill_vertex_times (std::vector< TransientVertex > &pvs)
 
VertexTimeAlgorithmBaseoperator= (const VertexTimeAlgorithmBase &)=delete
 
virtual void setEvent (edm::Event &iEvent, edm::EventSetup const &iSetup)=0
 
virtual bool vertexTime (float &vtxTime, float &vtxTimeError, TransientVertex const &vtx) const =0
 
 VertexTimeAlgorithmBase (const edm::ParameterSet &conf, edm::ConsumesCollector &iC)
 
 VertexTimeAlgorithmBase (const VertexTimeAlgorithmBase &)=delete
 
virtual ~VertexTimeAlgorithmBase ()=default
 

Static Public Member Functions

static void fillPSetDescription (edm::ParameterSetDescription &iDesc)
 

Detailed Description

Definition at line 13 of file VertexTimeAlgorithmBase.h.

Constructor & Destructor Documentation

◆ VertexTimeAlgorithmBase() [1/2]

VertexTimeAlgorithmBase::VertexTimeAlgorithmBase ( const edm::ParameterSet conf,
edm::ConsumesCollector iC 
)
inline

Definition at line 15 of file VertexTimeAlgorithmBase.h.

15 {}

◆ ~VertexTimeAlgorithmBase()

virtual VertexTimeAlgorithmBase::~VertexTimeAlgorithmBase ( )
virtualdefault

◆ VertexTimeAlgorithmBase() [2/2]

VertexTimeAlgorithmBase::VertexTimeAlgorithmBase ( const VertexTimeAlgorithmBase )
delete

Member Function Documentation

◆ fill_vertex_times()

virtual void VertexTimeAlgorithmBase::fill_vertex_times ( std::vector< TransientVertex > &  pvs)
inlinevirtual

replace the vertices in the input vector by new vertices with time coordinates determined by the vertexTime method this implementation does not alter the weights from the previous fit must be overridden to change weights, coordinates, tracklists or to add or remove vertices

Definition at line 37 of file VertexTimeAlgorithmBase.h.

References submitPVResolutionJobs::err, f, mps_fire::i, FSQDQM_cfi::pvs, vertexTime(), L1BJetProducer_cff::vtx, and TransientVertex::weightMap().

37  {
38  for (unsigned int i = 0; i < pvs.size(); i++) {
39  auto vtx = pvs[i];
40  if (vtx.isValid()) {
41  auto vtxTime(0.f), vtxTimeError(-1.f);
42  if (vertexTime(vtxTime, vtxTimeError, vtx)) {
43  auto err = vtx.positionError().matrix4D();
44  err(3, 3) = vtxTimeError * vtxTimeError;
45  auto trkWeightMap3d = vtx.weightMap();
46  auto vtx_with_time = TransientVertex(
47  vtx.position(), vtxTime, err, vtx.originalTracks(), vtx.totalChiSquared(), vtx.degreesOfFreedom());
48  vtx_with_time.weightMap(trkWeightMap3d);
49  pvs[i] = vtx_with_time;
50  }
51  }
52  }
53  }
TransientTrackToFloatMap weightMap() const
double f[11][100]
virtual bool vertexTime(float &vtxTime, float &vtxTimeError, TransientVertex const &vtx) const =0

◆ fillPSetDescription()

static void VertexTimeAlgorithmBase::fillPSetDescription ( edm::ParameterSetDescription iDesc)
inlinestatic

◆ operator=()

VertexTimeAlgorithmBase& VertexTimeAlgorithmBase::operator= ( const VertexTimeAlgorithmBase )
delete

◆ setEvent()

virtual void VertexTimeAlgorithmBase::setEvent ( edm::Event iEvent,
edm::EventSetup const &  iSetup 
)
pure virtual

◆ vertexTime()

virtual bool VertexTimeAlgorithmBase::vertexTime ( float &  vtxTime,
float &  vtxTimeError,
TransientVertex const &  vtx 
) const
pure virtual

estimate the vertex time and time uncertainty for transient vertex

returns true when a valid time has been determined, otherwise return false

Implemented in VertexTimeAlgorithmFromTracksPID, and VertexTimeAlgorithmLegacy4D.

Referenced by fill_vertex_times().