CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions
tauImpactParameter::ErrorMatrixPropagator Class Reference

#include <ErrorMatrixPropagator.h>

Public Member Functions

 ErrorMatrixPropagator ()
 
virtual ~ErrorMatrixPropagator ()
 

Static Public Member Functions

static TMatrixTSym< double > propagateError (std::function< TVectorT< double >(const TVectorT< double > &)> f, const TVectorT< double > &inPar, TMatrixTSym< double > &inCov, double epsilon=0.001, double errorEpsilonRatio=1000)
 

Detailed Description

Definition at line 17 of file ErrorMatrixPropagator.h.

Constructor & Destructor Documentation

◆ ErrorMatrixPropagator()

tauImpactParameter::ErrorMatrixPropagator::ErrorMatrixPropagator ( )
inline

Definition at line 19 of file ErrorMatrixPropagator.h.

19 {};

◆ ~ErrorMatrixPropagator()

virtual tauImpactParameter::ErrorMatrixPropagator::~ErrorMatrixPropagator ( )
inlinevirtual

Definition at line 20 of file ErrorMatrixPropagator.h.

20 {};

Member Function Documentation

◆ propagateError()

TMatrixTSym< double > ErrorMatrixPropagator::propagateError ( std::function< TVectorT< double >(const TVectorT< double > &  ) const &
static

Definition at line 12 of file ErrorMatrixPropagator.cc.

16  {
17  TVectorT<double> v = f(inPar);
18  TMatrixT<double> Jacobian(inPar.GetNrows(), v.GetNrows());
19  for (int i = 0; i < inPar.GetNrows(); i++) {
20  TVectorT<double> ParPlusEpsilon = inPar;
21  double error = sqrt(fabs(inCov(i, i)));
22  double delta = epsilon;
23  if (delta * errorEpsilonRatio < error)
24  delta = error / errorEpsilonRatio;
25  ParPlusEpsilon(i) += delta;
26  TVectorT<double> vp = f(ParPlusEpsilon);
27  for (int j = 0; j < v.GetNrows(); j++) {
28  Jacobian(i, j) = (vp(j) - v(j)) / delta;
29  } // Newtons approx.
30  }
31  TMatrixTSym<double> newCov = inCov.SimilarityT(Jacobian);
32  return newCov;
33 }

References dumpMFGeometry_cfg::delta, geometryDiff::epsilon, relativeConstraints::error, f, mps_fire::i, dqmiolumiharvest::j, mathSSE::sqrt(), and findQualityFiles::v.

Referenced by tauImpactParameter::ParticleBuilder::createLorentzVectorParticle(), tauImpactParameter::ParticleBuilder::createTrackParticle(), tauImpactParameter::TauA1NuConstrainedFitter::fit(), tauImpactParameter::TauA1NuConstrainedFitter::getMother(), tauImpactParameter::TrackHelixVertexFitter::getMother(), tauImpactParameter::TauA1NuConstrainedFitter::getRefitDaughters(), tauImpactParameter::TrackHelixVertexFitter::getRefitLorentzVectorParticles(), tauImpactParameter::TrackHelixVertexFitter::getRefitTracks(), tauImpactParameter::TauA1NuConstrainedFitter::getTauRotationSignificance(), tauImpactParameter::TrackTools::lorentzParticleAtPosition(), and tauImpactParameter::TauA1NuConstrainedFitter::TauA1NuConstrainedFitter().

mps_fire.i
i
Definition: mps_fire.py:428
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
findQualityFiles.v
v
Definition: findQualityFiles.py:179
relativeConstraints.error
error
Definition: relativeConstraints.py:53
geometryDiff.epsilon
int epsilon
Definition: geometryDiff.py:26
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
dumpMFGeometry_cfg.delta
delta
Definition: dumpMFGeometry_cfg.py:25
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66