CMS 3D CMS Logo

Functions
svhelper Namespace Reference

Functions

double cov33 (const reco::Vertex &sv)
 
double cov33 (const reco::VertexCompositePtrCandidate &sv)
 
void updateVertexTime (TransientVertex &vtx)
 

Function Documentation

double svhelper::cov33 ( const reco::Vertex sv)
inline

Definition at line 51 of file TrackVertexArbitration.h.

References reco::Vertex::covariance().

Referenced by TrackVertexArbitration< VTX >::trackVertexArbitrator().

51 { return sv.covariance(3,3); }
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:130
double svhelper::cov33 ( const reco::VertexCompositePtrCandidate sv)
inline

Definition at line 52 of file TrackVertexArbitration.h.

References reco::VertexCompositePtrCandidate::vertexCovariance().

52 { return sv.vertexCovariance(3,3); }
double vertexCovariance(int i, int j) const override
(i, j)-th element of error matrix, i, j = 0, ... 3
void svhelper::updateVertexTime ( TransientVertex vtx)
inline

Definition at line 11 of file SVTimeHelpers.h.

References edm::isFinite(), GlobalErrorBase< T, ErrorWeightType >::matrix4D(), TransientVertex::originalTracks(), TransientVertex::position(), TransientVertex::positionError(), ntuplemaker::time, TransientVertex::totalChiSquared(), and w.

Referenced by TemplatedInclusiveVertexFinder< InputContainer, VTX >::produce(), and TrackVertexArbitration< VTX >::trackVertexArbitrator().

11  {
12  const auto& trks = vtx.originalTracks();
13  double meantime = 0., expv_x2 = 0., normw = 0., timecov = 0.;
14  for( const auto& trk : trks ) {
15  if( edm::isFinite(trk.timeExt()) ) {
16  const double time = trk.timeExt();
17  const double inverr = 1.0/trk.dtErrorExt();
18  const double w = inverr*inverr;
19  meantime += time*w;
20  expv_x2 += time*time*w;
21  normw += w;
22  }
23  }
24  if( normw > 0. ) {
25  meantime = meantime/normw;
26  expv_x2 = expv_x2/normw;
27  timecov = expv_x2 - meantime*meantime;
28  auto err = vtx.positionError().matrix4D();
29  err(3,3) = timecov/(double)trks.size();
30  vtx = TransientVertex(vtx.position(),meantime,err,vtx.originalTracks(),vtx.totalChiSquared());
31  }
32  }
GlobalError positionError() const
const double w
Definition: UKUtility.cc:23
float totalChiSquared() const
const AlgebraicSymMatrix44 & matrix4D() const
bool isFinite(T x)
std::vector< reco::TransientTrack > const & originalTracks() const
GlobalPoint position() const