3 #include <Math/SMatrix.h> 4 #include <Math/MatrixFunctions.h> 23 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;
49 if (isValid() && !initial) {
52 tsos_ = extrap.extrapolate(tsos_, line);
56 tsos_ = extrap.extrapolate(track_.impactPointState(),
line);
62 lambda_ = (tsos_.globalPosition() - origin) * direction / pred.
rho2();
72 tsos_ = extrap.extrapolate(track_.impactPointState(),
point);
82 bool withMeasurementError)
const {
91 double rho2 = pred.
rho2();
93 double lambda = (tsos_.globalPosition() - origin) * direction / rho2;
97 double mom = momentum.mag();
99 Vector3
b =
conv(direction) / rho;
100 Vector3
d =
conv(momentum) / mom;
101 double l = Dot(b, d);
102 double g = 1. / (1. -
sqr(l));
104 Vector3 ca =
conv(pos - tsos_.globalPosition());
105 Vector3 bd = b - l *
d;
108 Matrix33 pA = TensorProd(b, bd);
109 Matrix33 pB = TensorProd(b, ca);
112 jacobian.Place_at(-pA + Matrix33(SMatrixIdentity()), 0, 0);
113 jacobian.Place_at(pB / rho, 0, 3);
116 if (withMeasurementError) {
117 jacobian.Place_at(pA, 0, 0);
118 jacobian.Place_at(-pB / mom, 0, 3);
119 error += Similarity(jacobian, tsos_.cartesianError().matrix());
122 return Vertex(pos, error);
126 bool withGhostTrackError)
const {
135 double rho2 = pred.
rho2();
137 double lambda = (tsos_.globalPosition() - origin) * direction / rho2;
141 double mom = momentum.mag();
143 Vector3
b =
conv(direction) / rho;
144 Vector3
d =
conv(momentum) / mom;
145 double l = Dot(b, d);
146 double g = 1. / (1. -
sqr(l));
148 Vector3 ca =
conv(tsos_.globalPosition() - pos);
149 Vector3 bd = l * b -
d;
152 Matrix33 pC = TensorProd(d, bd);
153 Matrix33 pD = TensorProd(d, ca);
156 jacobian.Place_at(pC + Matrix33(SMatrixIdentity()), 0, 0);
157 jacobian.Place_at(pD / mom, 0, 3);
158 Matrix3S
error = Similarity(jacobian, tsos_.cartesianError().matrix());
160 if (withGhostTrackError) {
161 jacobian.Place_at(-pC, 0, 0);
162 jacobian.Place_at(-pD / rho, 0, 3);
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
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
Vertex vertexStateOnMeasurement(const GhostTrackPrediction &pred, bool withGhostTrackError) const override
Square< F >::type sqr(const F &f)
GlobalPoint position(double lambda=0.) const
Vertex vertexStateOnGhostTrack(const GhostTrackPrediction &pred, bool withMeasurementError) const override
bool linearize(const GhostTrackPrediction &pred, bool initial, double lambda) override
*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