|
ATLAS Offline Software
|
Go to the documentation of this file.
43 InDet::TRT_DriftCircleCollection::const_iterator&
sb,
44 InDet::TRT_DriftCircleCollection::const_iterator&
se,
45 std::pair<Amg::Vector3D,double>& gp,
46 const double*
dir,
double width2)
67 InDet::TRT_DriftCircleCollection::const_iterator&
sb,
68 InDet::TRT_DriftCircleCollection::const_iterator&
se,
69 std::pair<Amg::Vector3D,double>& gp,
70 const double*
dir,
double width2)
91 (
double dw, std::pair<Amg::Vector3D,double>& gp)
97 double x = gp.first.x();
98 double y = gp.first.y();
99 double z = gp.first.z();
115 double d = std::abs(
z - C.z());
116 if (
d >
rb->halflengthY() + dw) {
148 InDet::TRT_DriftCircleCollection::const_iterator&
sb,
149 InDet::TRT_DriftCircleCollection::const_iterator&
se,
150 std::pair<Amg::Vector3D, double>& gp,
157 double x = gp.first.x();
158 double y = gp.first.y();
159 double z = gp.first.z();
163 double step = std::abs(
dir[0] * T(0, 2) +
dir[1] * T(1, 2) +
dir[2] * T(2, 2));
170 for (
int ns = 0;
ns != Nstraws; ++
ns) {
183 double Az[3] = {
t(0, 2),
t(1, 2),
t(2, 2) };
184 double D =
dir[0] * Az[0] +
dir[1] * Az[1] +
dir[2] * Az[2];
185 double A = (1. - D) * (1. + D);
186 double dz =
z -
t(2, 3);
187 double S = (
dx * (D * Az[0] -
dir[0]) +
dy * (D * Az[1] -
dir[1]) +
188 dz * (D * Az[2] -
dir[2])) /
193 double Bx = Az[1] *
dir[2] - Az[2] *
dir[1];
194 double By = Az[2] *
dir[0] - Az[0] *
dir[2];
195 double Bz = Az[0] *
dir[1] - Az[1] *
dir[0];
197 (
dx * Bx +
dy * By + dz * Bz) / std::sqrt(Bx * Bx + By * By + Bz * Bz);
198 double zl =
dx * Az[0] +
dy * Az[1] + dz * Az[2];
201 if (
y * xs -
x * ys > 0.) {
211 for (
int ns = 0;
ns != Nstraws; ++
ns) {
217 double as =
m_radius / std::sqrt(xs * xs + ys * ys);
218 double dx =
x - xs * as;
219 double dy =
y - ys * as;
226 double Az[3] = {
t(0, 2),
t(1, 2),
t(2, 2) };
227 double D =
dir[0] * Az[0] +
dir[1] * Az[1] +
dir[2] * Az[2];
228 double A = (1. - D) * (1. + D);
232 double S = (
dx * (D * Az[0] -
dir[0]) +
dy * (D * Az[1] -
dir[1]) +
233 dz * (D * Az[2] -
dir[2])) /
238 double Bx = Az[1] *
dir[2] - Az[2] *
dir[1];
239 double By = Az[2] *
dir[0] - Az[0] *
dir[2];
240 double Bz = Az[0] *
dir[1] - Az[1] *
dir[0];
242 (
dx * Bx +
dy * By + dz * Bz) / std::sqrt(Bx * Bx + By * By + Bz * Bz);
243 double zl =
dx * Az[0] +
dy * Az[1] + dz * Az[2];
246 if (
y * xs -
x * ys > 0.) {
294 (InDet::TRT_DriftCircleCollection::const_iterator&
sb,
295 InDet::TRT_DriftCircleCollection::const_iterator&
se,
296 std::pair<Amg::Vector3D,double>& gp,
297 const double*
dir,
double width2)
302 double x = gp.first.x();
303 double y = gp.first.y();
304 double z = gp.first.z();
309 std::abs(
dir[0] * T(0, 2) +
dir[1] * T(1, 2) +
dir[2] * T(2, 2));
315 for (
int ns = 0;
ns != Nstraws; ++
ns) {
328 double Az[3] = {
t(0, 2),
t(1, 2),
t(2, 2) };
329 double D =
dir[0] * Az[0] +
dir[1] * Az[1] +
dir[2] * Az[2];
330 double A = (1. - D) * (1. + D);
331 double dz =
z -
t(2, 3);
332 double S = (
dx * (D * Az[0] -
dir[0]) +
dy * (D * Az[1] -
dir[1]) +
333 dz * (D * Az[2] -
dir[2])) /
338 double Bx = Az[1] *
dir[2] - Az[2] *
dir[1];
339 double By = Az[2] *
dir[0] - Az[0] *
dir[2];
340 double Bz = Az[0] *
dir[1] - Az[1] *
dir[0];
342 (
dx * Bx +
dy * By + dz * Bz) / std::sqrt(Bx * Bx + By * By + Bz * Bz);
343 double zl =
dx * Az[0] +
dy * Az[1] + dz * Az[2];
346 if (
y * xs -
x * ys > 0.){
360 for (
int ns = 0;
ns != Nstraws; ++
ns) {
366 double as =
m_radius / std::sqrt(xs * xs + ys * ys);
367 double dx =
x - xs * as;
368 double dy =
y - ys * as;
375 double Az[3] = {
t(0, 2),
t(1, 2),
t(2, 2) };
376 double D =
dir[0] * Az[0] +
dir[1] * Az[1] +
dir[2] * Az[2];
377 double A = 1. / ((1. - D) * (1. + D));
381 double Dx = (D * Az[0] -
dir[0]);
382 double Dy = (D * Az[1] -
dir[1]);
383 double S = (
dx * Dx +
dy * Dy + dz * (D * Az[2] -
dir[2])) *
A;
387 double Bx = Az[1] *
dir[2] - Az[2] *
dir[1];
388 double By = Az[2] *
dir[0] - Az[0] *
dir[2];
389 double Bz = Az[0] *
dir[1] - Az[1] *
dir[0];
390 double B = 1. / std::sqrt(Bx * Bx + By * By + Bz * Bz);
391 double im = (
dx * Bx +
dy * By + dz * Bz) * B;
392 double zl =
dx * Az[0] +
dy * Az[1] + dz * Az[2];
396 double dS = (
ax * Dx +
ay * Dy) *
A;
399 double sd = (
sx * Bx +
sy * By) * B;
400 double sz =
sx * Az[0] +
sy * Az[1];
402 if (
y * xs -
x * ys > 0.) {
456 (
double a,
double b,
bool& useDriftTime,
bool&
hole)
467 double ad = std::abs(
d);
469 if(ad > 2.05)
continue;
480 if(!useDriftTime)
return true;
485 if(
r > 2.05)
r = 2.05;
486 double r2 =
r+
e;
if(r2 > 2.05) r2 = 2.05;
487 double r1 =
r-
e;
if(r1 >= r2) r1 = r2-2.*
e;
489 if(ad < r1 || ad > r2) useDriftTime =
false;
else m_status = 2;
502 (
double a,
double b,
bool& useDriftTime,
bool&
hole)
511 double ad = std::abs(
d);
513 if(ad > 2.05)
return false;
523 if(!useDriftTime)
return true;
528 if(
r > 2.05)
r = 2.05;
529 double r2 =
r+
e;
if(r2 > 2.05) r2 = 2.05;
530 double r1 =
r-
e;
if(r1 >= r2) r1 = r2-2.*
e;
531 if(ad < r1 || ad > r2) useDriftTime =
false;
else m_status = 2;
578 std::unique_ptr<Trk::RIO_OnTrack>
606 (Gaudi::Hive::currentContext(),
631 if(Q && Xi2 < 15.)
return Q;
650 if(
l<0 )
return false;
654 double Az[3] = {
t(0,2),
t(1,2),
t(2,2)};
655 double Rc[3] = {
t(0,3),
t(1,3),
t(2,3)};
659 if(std::abs(Az[2]) > .7) {
661 double Ri = 1./std::sqrt(Rc[0]*Rc[0]+Rc[1]*Rc[1]);
662 Bx =-Az[2]*Rc[1]*Ri; By = Az[2]*Rc[0]*Ri;
664 else if(Rc[2] > 0. ) {
666 Bx = Az[1]; By =-Az[0];
670 Bx =-Az[1]; By = Az[0];
674 G[0] = zl*Az[0]+Bx*
im+Rc[0];
675 G[1] = zl*Az[1]+By*
im+Rc[1];
676 G[2] = zl*Az[2] +Rc[2];
690 if(!E1)
return false;
704 double dx = Gp[1][0]-Gp[0][0];
705 double dy = Gp[1][1]-Gp[0][1];
708 Gp[2][2] = Gp[0][2]-(Gp[1][2]-Gp[0][2])*std::sqrt((Gp[0][0]*Gp[0][0]+Gp[0][1]*Gp[0][1])/(
dx*
dx+
dy*
dy));
713 double x0 = Gp[0][0] ;
714 double y0 = Gp[0][1] ;
715 double x1 = Gp[1][0]-x0 ;
716 double y1 = Gp[1][1]-y0 ;
717 double x2 = Gp[2][0]-x0 ;
718 double y2 = Gp[2][1]-y0 ;
719 double r1 = std::sqrt(
x1*
x1+
y1*
y1) ;
724 double u2 = (
a*
x2+
b*
y2)*r2 ;
726 double A =
v2/(u2-u1) ;
727 double B = 2.*(
v2-
A*u2) ;
728 double C = B/std::sqrt(1.+
A*
A) ;
746 double pos0[3]; pos0[0]=Gp[0][0]; pos0[1]=Gp[0][1]; pos0[2]=Gp[0][2];
747 double pos1[3]; pos1[0]=Gp[1][0]; pos1[1]=Gp[1][1]; pos1[2]=Gp[1][2];
748 double pos2[3]; pos2[0]=Gp[2][0]; pos2[1]=Gp[2][1]; pos2[2]=Gp[2][2];
756 double Hz = .333333*(H0[2]+H1[2]+
H2[2]);
761 double T2 = TP[0]*TP[0];
762 if(std::abs(Hz)>1.e-9) {Cm = 1./(300.*Hz*std::sqrt(1.+T2));
P[4] = -C*Cm;}
766 double wa;
mode != 2 ? wa = 1./(Wa[0]-Wa[2]) : wa = 1./Wa[1];
767 const double dS = 4. ;
770 double dp = 8.*
df*wa*Cm ;
773 double c2 =
df*
df*(1.+T2);
794 if(!E1)
return false;
801 double dx = Gp[2][0]-Gp[1][0];
802 double dy = Gp[2][1]-Gp[1][1];
805 Gp[0][2] = Gp[1][2]-(Gp[2][2]-Gp[1][2])*std::sqrt((Gp[1][0]*Gp[1][0]+Gp[1][1]*Gp[1][1])/(
dx*
dx+
dy*
dy));
808 double x0 = Gp[0][0] ;
809 double y0 = Gp[0][1] ;
810 double x1 = Gp[1][0]-x0 ;
811 double y1 = Gp[1][1]-y0 ;
812 double x2 = Gp[2][0]-x0 ;
813 double y2 = Gp[2][1]-y0 ;
814 double r1 = std::sqrt(
x1*
x1+
y1*
y1) ;
819 double u2 = (
a*
x2+
b*
y2)*r2 ;
821 double A =
v2/(u2-u1) ;
822 double B = 2.*(
v2-
A*u2) ;
823 double C = B/std::sqrt(1.+
A*
A) ;
831 double P[5] = {0.,Gp[0][2],
f,atan2(1.,TP[0]),.0001};
833 double pos0[3]; pos0[0]=Gp[0][0]; pos0[1]=Gp[0][1]; pos0[2]=Gp[0][2];
834 double pos1[3]; pos1[0]=Gp[1][0]; pos1[1]=Gp[1][1]; pos1[2]=Gp[1][2];
835 double pos2[3]; pos2[0]=Gp[2][0]; pos2[1]=Gp[2][1]; pos2[2]=Gp[2][2];
843 double Hz = .333333*(H0[2]+H1[2]+
H2[2]);
848 double T2 = TP[0]*TP[0];
849 if(std::abs(Hz)>1.e-9) {Cm = 1./(300.*Hz*std::sqrt(1.+T2));
P[4] = -C*Cm;}
853 double wa = 1./Wa[2];
855 const double dS = 4. ;
857 double dp = 8.*
df*wa*Cm ;
859 double c1 = ZvHW*ZvHW*.1 ;
860 double c2 =
df*
df*(1.+T2);
884 double dx = G1[0]-G0[0] ;
885 double dy = G1[1]-G0[1] ;
886 double dz = G1[2]-G0[2] ;
889 Tp[0] = dz/(
dr*(1.+.04*rc*rc));
891 double r0 = G0[0]*G0[0]+G0[1]*G0[1];
892 double r1 = G1[0]*G1[0]+G1[1]*G1[1];
900 double dT = (dZ+2.*VZ) ;
902 Tp[2] = dT*dT*.1/r0 ;
904 else if(
E->m_barrel) {
906 double T2 = Tp[0]*Tp[0] ;
908 Tp[2] = (VZ*VZ)/((1.+T2)*r0) ;
912 double T2 = Tp[0]*Tp[0] ;
914 Tp[2] = (VZ*VZ)/((1.+T2)*r0) ;
921 double dT = (
E->m_zMax-
E->m_zMin+2.*VZ);
923 Tp[2] = dT*dT*.1/r1 ;
927 double T2 = Tp[0]*Tp[0] ;
928 double dr = std::sqrt(r1)-std::sqrt(r0) ;
929 Tp[1] =
dr*
dr*VZ*VZ/r1 ;
930 Tp[2] = (VZ*VZ)/((1.+T2)*r1) ;
935 double T2 = Tp[0]*Tp[0] ;
937 Tp[2] = (VZ*VZ)/((1.+T2)*r1) ;
double findCloseLink(double, double)
const Trk::IPatternParametersUpdator * m_updatortool
void polarAngleEstimation(TRT_TrajectoryElement_xk *, Amg::Vector3D &, Amg::Vector3D &, double, double, double *) const
const Identifier & identify(const UncalibratedMeasurement *meas)
Returns the associated identifier from the muon measurement.
void setParametersWithCovariance(const Surface *, const double *, const double *)
virtual RIO_OnTrack * correct(const PrepRawData &hit, const TrackParameters &trk, const EventContext &ctx) const =0
abstract base method for the creation of RIO_OnTrack it takes a RIO (PrepRawData) and the given Track...
virtual bool propagate(const ::EventContext &ctx, PatternTrackParameters &, const Surface &, PatternTrackParameters &, PropDirection, const MagneticFieldProperties &, ParticleHypothesis particle=pion) const =0
Interfaces WITH EventContext (new)
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
MagField::AtlasFieldCache m_fieldCache
void getFieldZR(const double *ATH_RESTRICT xyz, double *ATH_RESTRICT bxyz, double *ATH_RESTRICT deriv=nullptr)
get B field valaue on the z-r plane at given position works only inside the solenoid.
virtual bool addToState(PatternTrackParameters &, const Amg::Vector2D &, const Amg::MatrixX &, PatternTrackParameters &) const =0
add a PRD-level local position to a track state given by pattern track pars (no chi2 calculated).
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
void newImpactParameter(const double &)
unsigned int nStraws() const
Number of straws in the element.
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
bool buildForPrecisionSeed(double, double, bool &, bool &)
const Trk::IPatternParametersPropagator * m_proptool
interface for track parameter propagation through the magnetic field, using the Trk::PatternTrackPara...
const double & distance() const
#define AmgSymMatrix(dim)
std::pair< double, ParamDefs > DefinedParameter
Interface for updating Trk::PatternTrackParameters, the fast internal representation of track paramet...
virtual BoundsType type() const =0
Return the bounds type - for persistency optimization.
int straw(const Identifier &id) const
void getInitializedCache(MagField::AtlasFieldCache &cache) const
get B field cache for evaluation as a function of 2-d or 3-d position.
const Trk::IRIO_OnTrackCreator * m_riomakerD
const double & zlocal() const
const Trk::RIO_OnTrack * rioOnTrack()
bool trackParametersEstimation(TRT_TrajectoryElement_xk *, TRT_TrajectoryElement_xk *, Trk::PatternTrackParameters &, double)
Eigen::Affine3d Transform3D
void set(const TRT_ID *, const Trk::IPatternParametersPropagator *, const Trk::IPatternParametersUpdator *, const Trk::IRIO_OnTrackCreator *, const Trk::IRIO_OnTrackCreator *, double)
virtual TRT_BaseElement::Type type() const =0
Type information: returns BARREL or ENDCAP.
Trk::MagneticFieldProperties m_fieldprop
@ NODRIFTTIME
drift time was not used - drift radius is 0.
bool boundaryTest(double, std::pair< Amg::Vector3D, double > &)
@ DECIDED
sign of drift radius has been determined
const double & way() const
const TRT_DriftCircle * cluster() const
const Amg::Vector2D & localPosition() const
return the local position reference
bool propagate(Trk::PatternTrackParameters &, Trk::PatternTrackParameters &)
Eigen::Matrix< double, 3, 1 > Vector3D
virtual const Trk::SurfaceBounds & bounds() const override final
Straw layer bounds.
bool initiateForTRTSeed(bool, const InDetDD::TRT_BaseElement *, InDet::TRT_DriftCircleCollection::const_iterator &, InDet::TRT_DriftCircleCollection::const_iterator &, std::pair< Amg::Vector3D, double > &, const double *, double)
bool addCluster(Trk::PatternTrackParameters &, Trk::PatternTrackParameters &, double &)
bool initiateForPrecisionSeed(bool, const InDetDD::TRT_BaseElement *, InDet::TRT_DriftCircleCollection::const_iterator &, InDet::TRT_DriftCircleCollection::const_iterator &, std::pair< Amg::Vector3D, double > &, const double *, double)
void set(const int &, double &, double &, double &, double &)
const Amg::Transform3D & strawTransform(unsigned int straw) const
Straw transform - fast access in array, in Tracking frame: Amg.
const double & radius() const
virtual const Amg::Vector3D & center() const override final
Element Surface: center of a straw layer.
const Trk::IRIO_OnTrackCreator * m_riomakerN
std::unique_ptr< Trk::RIO_OnTrack > rioOnTrackSimple() const
bool buildForTRTSeed(double, double, bool &, bool &)
const double & impact() const
void initiateLinksForTRTSeed(InDet::TRT_DriftCircleCollection::const_iterator &, InDet::TRT_DriftCircleCollection::const_iterator &, std::pair< Amg::Vector3D, double > &, const double *, double)
Interface class for transforming Trk::PrepRawData to Trk::RIO_OnTrack using a local track hypothesis.
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
const InDetDD::TRT_BaseElement * m_detelement
virtual const Trk::Surface & surface() const override final
Element Surface: access to the Surface (straw layer)
bool trajectoryGlobalPosition(Amg::Vector3D &, double &)
void initiateLinksForPrecisionSeed(InDet::TRT_DriftCircleCollection::const_iterator &, InDet::TRT_DriftCircleCollection::const_iterator &, std::pair< Amg::Vector3D, double > &, const double *, double)
TRT_ExtensionDriftCircleLink_xk m_link[24]