LCFIVertex  0.7.2
gaussellipsoid.cpp
1 #include "../include/gaussellipsoid.h"
2 #include "../include/interactionpoint.h"
3 #include "../../util/inc/matrix.h"
4 #include <cmath>
5 namespace vertex_lcfi { namespace ZVTOP
6 {
8  :_IP(IP)
9  {
10  }
11 
12 
13  double GaussEllipsoid::valueAt(const Vector3 & Point) const
14  {
15  //Normalize to origin
16  Vector3 RelativePoint = Point-(_IP->position());
17  //Calculate value of UNNORMALISED gaussian at point from covarience matrix
18  //Lyons pp 60
19  SymMatrix3x3 InvErr = _IP->inverseErrorMatrix();
20  return exp(-0.5 * prec_inner_prod(RelativePoint,prec_prod(InvErr, RelativePoint)));
21  }
22 
24  {
25  return _IP;
26  }
27 
28 }}
GaussEllipsoid(InteractionPoint *IP)
Construct from an interaction point.
double valueAt(const Vector3 &Point) const
Calculate the value of the ellipsoid at a point.
const Vector3 & position() const
Return position of IP.
const Matrix3x3 & inverseErrorMatrix() const
Return inverse error of IP.
InteractionPoint * ip()
InteractionPoint object used.