16#include "AthLinks/ElementLink.h"
29#include "CLHEP/Geometry/Transform3D.h"
30using HepGeom::Transform3D;
43 const std::string& name,
44 const IInterface* parent)
47 declareInterface<SingleTrackConversionTool>(
this);
61 return StatusCode::SUCCESS;
68 return StatusCode::SUCCESS;
82 unsigned int index(0);
89 track->curvilinearParameters(
index);
114 double Ax[3] = { T(0, 0), T(1, 0), T(2, 0) };
115 double Ay[3] = { T(0, 1), T(1, 1), T(2, 1) };
124 double A11 = a11 * p11 + a12 * p21;
125 double A12 = a11 * p12 + a12 * p22;
126 double A21 = a21 * p11 + a22 * p21;
127 double A22 = a21 * p12 + a22 * p22;
128 double A31 = a31 * p11 + a32 * p21;
129 double A32 = a31 * p12 + a32 * p22;
132 double P11 = a11 * A11 + A12 * a12;
133 double P12 = A11 * a21 + A12 * a22;
134 double P13 = A11 * a31 + A12 * a32;
135 double P21 = A21 * a11 + A22 * a12;
136 double P22 = A21 * a21 + A22 * a22;
137 double P23 = A21 * a31 + A22 * a32;
138 double P31 = A31 * a11 + A32 * a12;
139 double P32 = A31 * a21 + A32 * a22;
140 double P33 = A31 * a31 + A32 * a32;
162 double A[3] = {T(0,2),T(1,2),T(2,2)};
170 double Bx =
A[1]*Pz-
A[2]*Py;
171 double By =
A[2]*Px-
A[0]*Pz;
172 double Bz =
A[0]*Py-
A[1]*Px;
173 double Bn = 1./sqrt(Bx*Bx+By*By+Bz*Bz); Bx*=Bn; By*=Bn; Bz*=Bn;
174 double a11 = Bx;
double a12 =
A[0];
175 double a21 = By;
double a22 =
A[1];
176 double a31 = Bz;
double a32 =
A[2];
179 double A11 = a11*p11 + a12*p21;
double A12 = a11*p12 + a12*p22;
180 double A21 = a21*p11 + a22*p21;
double A22 = a21*p12 + a22*p22;
181 double A31 = a31*p11 + a32*p21;
double A32 = a31*p12 + a32*p22;
184 double P11 = a11*A11 + A12*a12;
double P12 = A11*a21 + A12*a22;
double P13 = A11*a31 + A12*a32;
185 double P21 = A21*a11 + A22*a12;
double P22 = A21*a21 + A22*a22;
double P23 = A21*a31 + A22*a32;
186 double P31 = A31*a11 + A32*a12;
double P32 = A31*a21 + A32*a22;
double P33 = A31*a31 + A32*a32;
189 nCovVtx(0,0) = P11; nCovVtx(0,1) = P12; nCovVtx(0,2) = P13;
190 nCovVtx(1,0) = P21; nCovVtx(1,1) = P22; nCovVtx(1,2) = P23;
191 nCovVtx(2,0) = P31; nCovVtx(2,1) = P32; nCovVtx(2,2) = P33;
200 vertex->setPosition(gp);
201 vertex->setCovariancePosition(nCovVtx);
203 vertex->setFitQuality( 0, 0);
216 for(
unsigned int i(0); i< track->numberOfParameters() ; ++i ){
223 ATH_MSG_WARNING(
"Track Particle does not contain first Measurement track parameters");
231 uint8_t expectedHitInBLayer(0);
233 expectedHitInBLayer = dummy;
235 float Rfirst = trk_meas.
position().perp();
236 if (expectedHitInBLayer)
241 ATH_MSG_DEBUG(
"BLayer hit expected. Radius of first hit (" <<
251 ATH_MSG_DEBUG(
"No BLayer hit expected. Radius of first hit (" <<
262 uint8_t nTrtOutliers(0);
264 nTrtOutliers = dummy;
266 uint8_t ntrt = nTrtHits + nTrtOutliers;
268 uint8_t nTrtXenonHits(0);
270 nTrtXenonHits = dummy;
284 ATH_MSG_DEBUG(
"Probability (" << prob <<
") below threshold: "
#define ATH_MSG_WARNING(x)
#define AmgSymMatrix(dim)
virtual const S & associatedSurface() const override final
Access to the Surface method.
const Amg::Vector3D & momentum() const
Access method for the momentum.
const Amg::Vector3D & position() const
Access method for the position.
virtual constexpr SurfaceType type() const override final
Return the surface type.
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
static const InterfaceID IID_ISingleTrackConversionTool("InDet::SingleTrackConversionTool", 1, 0)
CurvilinearParametersT< TrackParametersDim, Charged, PlaneSurface > CurvilinearParameters
@ ConvVtx
Conversion vertex.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.
@ expectInnermostPixelLayerHit
Do we expect a 0th-layer barrel hit for this track?
@ numberOfTRTXenonHits
number of TRT hits on track in straws with xenon [unit8_t].
@ numberOfTRTHits
number of TRT hits [unit8_t].
@ numberOfInnermostPixelLayerOutliers
number of 0th layer barrel outliers
@ eProbabilityHT
Electron probability from High Threshold (HT) information [float].
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
@ numberOfTRTOutliers
number of TRT outliers [unit8_t].
@ FirstMeasurement
Parameter defined at the position of the 1st measurement.
hold the test vectors and ease the comparison