3 #include <Math/SMatrix.h> 4 #include <Math/MatrixFunctions.h> 23 static inline double sqr(
double arg) {
return arg *
arg; }
27 typedef SVector<double, 3> Vector3;
29 typedef SMatrix<double, 3, 3, MatRepSym<double, 3> > Matrix3S;
30 typedef SMatrix<double, 6, 6, MatRepSym<double, 6> > Matrix6S;
31 typedef SMatrix<double, 3, 3> Matrix33;
32 typedef SMatrix<double, 3, 6> Matrix36;
45 bool initial,
double lambda)
52 if (isValid() && !initial) {
55 tsos_ = extrap.extrapolate(tsos_, line);
59 tsos_ = extrap.extrapolate(track_.impactPointState(),
line);
65 lambda_ = (tsos_.globalPosition() - origin) * direction / pred.
rho2();
77 tsos_ = extrap.extrapolate(track_.impactPointState(),
point);
97 double rho2 = pred.
rho2();
99 double lambda = (tsos_.globalPosition() - origin) * direction / rho2;
103 double mom = momentum.mag();
105 Vector3
b =
conv(direction) / rho;
106 Vector3
d =
conv(momentum) / mom;
107 double l = Dot(b, d);
108 double g = 1. / (1. -
sqr(l));
110 Vector3 ca =
conv(pos - tsos_.globalPosition());
111 Vector3 bd = b - l *
d;
114 Matrix33 pA = TensorProd(b, bd);
115 Matrix33 pB = TensorProd(b, ca);
118 jacobian.Place_at(-pA + Matrix33(SMatrixIdentity()), 0, 0);
119 jacobian.Place_at(pB / rho, 0, 3);
122 if (withMeasurementError) {
123 jacobian.Place_at(pA, 0, 0);
124 jacobian.Place_at(-pB / mom, 0, 3);
125 error += Similarity(jacobian, tsos_.cartesianError().matrix());
128 return Vertex(pos, error);
142 double rho2 = pred.
rho2();
144 double lambda = (tsos_.globalPosition() - origin) * direction / rho2;
148 double mom = momentum.mag();
150 Vector3
b =
conv(direction) / rho;
151 Vector3
d =
conv(momentum) / mom;
152 double l = Dot(b, d);
153 double g = 1. / (1. -
sqr(l));
155 Vector3 ca =
conv(tsos_.globalPosition() - pos);
156 Vector3 bd = l * b -
d;
159 Matrix33 pC = TensorProd(d, bd);
160 Matrix33 pD = TensorProd(d, ca);
163 jacobian.Place_at(pC + Matrix33(SMatrixIdentity()), 0, 0);
164 jacobian.Place_at(pD / mom, 0, 3);
165 Matrix3S
error = Similarity(jacobian, tsos_.cartesianError().matrix());
167 if (withGhostTrackError) {
168 jacobian.Place_at(-pC, 0, 0);
169 jacobian.Place_at(-pD / rho, 0, 3);
Vertex vertexStateOnGhostTrack(const GhostTrackPrediction &pred, bool withMeasurementError) const
std::pair< GlobalPoint, GlobalError > Vertex
const GlobalPoint origin() const
static HepMC::IO_HEPEVT conv
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
bool linearize(const GhostTrackPrediction &pred, bool initial, double lambda)
CartesianError cartesianError(double lambda=0.) const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalVector
vector in glovbal coordinate system
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
Square< F >::type sqr(const F &f)
GlobalPoint position(double lambda=0.) const
Vertex vertexStateOnMeasurement(const GhostTrackPrediction &pred, bool withGhostTrackError) const
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
const GlobalVector direction() const