CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

tauImpactParameter::ErrorMatrixPropagator::ErrorMatrixPropagator ( )
inline

Definition at line 19 of file ErrorMatrixPropagator.h.

19 {};
virtual tauImpactParameter::ErrorMatrixPropagator::~ErrorMatrixPropagator ( )
inlinevirtual

Definition at line 20 of file ErrorMatrixPropagator.h.

20 {};

Member Function Documentation

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

Definition at line 12 of file ErrorMatrixPropagator.cc.

References delta, geometryDiff::epsilon, relativeConstraints::error, f, i, 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().

13  {
14  TVectorT<double> v=f(inPar);
15  TMatrixT<double> Jacobian(inPar.GetNrows(),v.GetNrows());
16  for(int i=0;i<inPar.GetNrows();i++){
17  TVectorT<double> ParPlusEpsilon=inPar;
18  double error=sqrt(fabs(inCov(i,i)));
19  double delta=epsilon;
20  if(delta*errorEpsilonRatio<error) delta=error/errorEpsilonRatio;
21  ParPlusEpsilon(i)+=delta;
22  TVectorT<double> vp=f(ParPlusEpsilon);
23  for(int j=0;j<v.GetNrows();j++){
24  Jacobian(i,j)=(vp(j)-v(j))/delta;
25  }// Newtons approx.
26  }
27  TMatrixTSym<double> newCov=inCov.SimilarityT(Jacobian);
28  return newCov;
29 }
dbl * delta
Definition: mlp_gen.cc:36
int i
Definition: DBlmapReader.cc:9
T sqrt(T t)
Definition: SSEVec.h:18
int j
Definition: DBlmapReader.cc:9
double f[11][100]