diff --git a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/TrkExRungeKuttaIntersector/IntersectorWrapper.h b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/TrkExRungeKuttaIntersector/IntersectorWrapper.h index 557bf75a74117330a7efba6b506e89e1c4522b1f..6699616b027eeb910da1622cb7d61be6539571df 100755 --- a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/TrkExRungeKuttaIntersector/IntersectorWrapper.h +++ b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/TrkExRungeKuttaIntersector/IntersectorWrapper.h @@ -108,6 +108,7 @@ public: BoundaryCheck, const MagneticFieldProperties&, TransportJacobian*&, + double&, ParticleHypothesis, bool, const TrackingVolume*) const; @@ -173,7 +174,6 @@ public: private: - typedef TrackSurfaceIntersection Intersection; // private methods void createParameters (const Surface& surface, @@ -188,12 +188,12 @@ private: ToolHandle<IPropagator> m_linePropagator; // current parameter cache - mutable double m_charge; - mutable const Intersection* m_intersection; - mutable Amg::Vector3D m_momentum; - mutable const TrackParameters* m_parameters; - mutable Amg::Vector3D m_position; - mutable double m_qOverP; + mutable double m_charge; + mutable const TrackSurfaceIntersection* m_intersection; + mutable Amg::Vector3D m_momentum; + mutable const TrackParameters* m_parameters; + mutable Amg::Vector3D m_position; + mutable double m_qOverP; }; } // end of namespace diff --git a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/TrkExRungeKuttaIntersector/RungeKuttaIntersector.h b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/TrkExRungeKuttaIntersector/RungeKuttaIntersector.h index 96ba24ae704d25327ab597128ea03cc6d3862c7b..1d890ab43da0229e05d8fed918fa755945c4d916 100755 --- a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/TrkExRungeKuttaIntersector/RungeKuttaIntersector.h +++ b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/TrkExRungeKuttaIntersector/RungeKuttaIntersector.h @@ -36,33 +36,33 @@ public: StatusCode finalize(); /**IIntersector interface method for general Surface type */ - const Intersection* intersectSurface(const Surface& surface, - const Intersection* trackIntersection, + const TrackSurfaceIntersection* intersectSurface(const Surface& surface, + const TrackSurfaceIntersection* trackIntersection, const double qOverP); /**IIntersector interface method for specific Surface type : PerigeeSurface */ - const Intersection* approachPerigeeSurface(const PerigeeSurface& surface, - const Intersection* trackIntersection, + const TrackSurfaceIntersection* approachPerigeeSurface(const PerigeeSurface& surface, + const TrackSurfaceIntersection* trackIntersection, const double qOverP); /**IIntersector interface method for specific Surface type : StraightLineSurface */ - const Intersection* approachStraightLineSurface(const StraightLineSurface& surface, - const Intersection* trackIntersection, + const TrackSurfaceIntersection* approachStraightLineSurface(const StraightLineSurface& surface, + const TrackSurfaceIntersection* trackIntersection, const double qOverP); /**IIntersector interface method for specific Surface type : CylinderSurface */ - const Intersection* intersectCylinderSurface (const CylinderSurface& surface, - const Intersection* trackIntersection, + const TrackSurfaceIntersection* intersectCylinderSurface (const CylinderSurface& surface, + const TrackSurfaceIntersection* trackIntersection, const double qOverP); /**IIntersector interface method for specific Surface type : DiscSurface */ - const Intersection* intersectDiscSurface (const DiscSurface& surface, - const Intersection* trackIntersection, + const TrackSurfaceIntersection* intersectDiscSurface (const DiscSurface& surface, + const TrackSurfaceIntersection* trackIntersection, const double qOverP); /**IIntersector interface method for specific Surface type : PlaneSurface */ - const Intersection* intersectPlaneSurface(const PlaneSurface& surface, - const Intersection* trackIntersection, + const TrackSurfaceIntersection* intersectPlaneSurface(const PlaneSurface& surface, + const TrackSurfaceIntersection* trackIntersection, const double qOverP); /**IIntersector interface method for validity check over a particular extrapolation range */ @@ -84,7 +84,7 @@ private: const Amg::Vector3D& planeNormal); Amg::Vector3D field (const Amg::Vector3D& point) const; bool notTrapped (void); - void setCache (const Intersection* trackIntersection, + void setCache (const TrackSurfaceIntersection* trackIntersection, const double qOverP); void shortStep (void); void step (void); @@ -221,7 +221,7 @@ RungeKuttaIntersector::field (const Amg::Vector3D& position) const } inline void -RungeKuttaIntersector::setCache (const Intersection* trackIntersection, +RungeKuttaIntersector::setCache (const TrackSurfaceIntersection* trackIntersection, const double qOverP) { if (trackIntersection->serialNumber() == m_intersectionNumber diff --git a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/cmt/requirements b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/cmt/requirements index 5c046137f5dbd9ab3a5a6e7de1256561aef9fd72..51e382695e753643a273b86edd402ddc274c95c0 100755 --- a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/cmt/requirements +++ b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/cmt/requirements @@ -6,6 +6,7 @@ private use TrkGeometry TrkGeometry-* Tracking/TrkDetDescr use TrkParameters TrkParameters-* Tracking/TrkEvent use TrkSurfaces TrkSurfaces-* Tracking/TrkDetDescr +use TrkDetDescrUtils TrkDetDescrUtils-* Tracking/TrkDetDescr public use AtlasPolicy AtlasPolicy-* diff --git a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/src/IntersectorWrapper.cxx b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/src/IntersectorWrapper.cxx index 85a90f95cdbd12e5ac27e11ffe01b50891be844f..3afd8035b360dc28ca00a02ee1d6c7e1e49f5a46 100755 --- a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/src/IntersectorWrapper.cxx +++ b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/src/IntersectorWrapper.cxx @@ -110,6 +110,7 @@ IntersectorWrapper::propagate (const TrackParameters& parameters, BoundaryCheck boundsCheck, const MagneticFieldProperties& /*magProperties*/, TransportJacobian*& /*transportJac*/, + double&, ParticleHypothesis /*particle*/, bool curvilinear, const TrackingVolume*) const @@ -216,11 +217,11 @@ IntersectorWrapper::findIntersection (const TrackParameters& parameters, m_position = parameters.position(); m_position = Amg::Vector3D(parameters.position()); m_qOverP = 1./m_momentum.mag(); - m_intersection = new Intersection(m_position,m_momentum*m_qOverP,0.); + m_intersection = new TrackSurfaceIntersection(m_position,m_momentum*m_qOverP,0.); m_qOverP *= m_charge; } - const Intersection* oldIntersection = m_intersection; + const TrackSurfaceIntersection* oldIntersection = m_intersection; m_intersection = m_intersector->intersectSurface(surface, oldIntersection, m_qOverP); @@ -263,3 +264,4 @@ IntersectorWrapper::findIntersection (const TrackParameters& parameters, } } // end of namespace + diff --git a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/src/RungeKuttaIntersector.cxx b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/src/RungeKuttaIntersector.cxx index ba6095d0d96862db93401cdfd76a0539584b81bc..38476f56020e38229ab400fa632348f789425f23 100755 --- a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/src/RungeKuttaIntersector.cxx +++ b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/src/RungeKuttaIntersector.cxx @@ -18,6 +18,8 @@ #include "TrkSurfaces/PlaneSurface.h" #include "TrkSurfaces/StraightLineSurface.h" #include "TrkSurfaces/Surface.h" +#include "TrkDetDescrUtils/Intersection.h" + namespace Trk { @@ -149,7 +151,7 @@ RungeKuttaIntersector::finalize() /**IIntersector interface method for general Surface type */ const Trk::TrackSurfaceIntersection* RungeKuttaIntersector::intersectSurface(const Surface& surface, - const Intersection* trackIntersection, + const TrackSurfaceIntersection* trackIntersection, const double qOverP) { // trap low momentum @@ -181,7 +183,7 @@ RungeKuttaIntersector::intersectSurface(const Surface& surface, /**IIntersector interface method for specific Surface type : PerigeeSurface */ const Trk::TrackSurfaceIntersection* RungeKuttaIntersector::approachPerigeeSurface(const PerigeeSurface& surface, - const Intersection* trackIntersection, + const TrackSurfaceIntersection* trackIntersection, const double qOverP) { // set member data @@ -210,9 +212,9 @@ RungeKuttaIntersector::approachPerigeeSurface(const PerigeeSurface& surface, if (m_distance > m_shortStepMin) shortStep(); // ensure intersection is valid (ie. on surface) - SurfaceIntersection SLIntersect = surface.straightLineIntersection(m_position, m_direction, false, false); + Intersection SLIntersect = surface.straightLineIntersection(m_position, m_direction, false, false); if (! SLIntersect.valid) return 0; - const Intersection* intersection = new Intersection(SLIntersect.intersection, + const TrackSurfaceIntersection* intersection = new TrackSurfaceIntersection(SLIntersect.position, m_direction, m_pathLength); m_intersectionNumber = intersection->serialNumber(); @@ -222,7 +224,7 @@ RungeKuttaIntersector::approachPerigeeSurface(const PerigeeSurface& surface, /**IIntersector interface method for specific Surface type : StraightLineSurface */ const Trk::TrackSurfaceIntersection* RungeKuttaIntersector::approachStraightLineSurface(const StraightLineSurface& surface, - const Intersection* trackIntersection, + const TrackSurfaceIntersection* trackIntersection, const double qOverP) { // set member data @@ -251,9 +253,9 @@ RungeKuttaIntersector::approachStraightLineSurface(const StraightLineSurface& su if (m_distance > m_shortStepMin) shortStep(); // ensure intersection is valid (ie. on surface) - SurfaceIntersection SLIntersect = surface.straightLineIntersection(m_position, m_direction, false, false); + Intersection SLIntersect = surface.straightLineIntersection(m_position, m_direction, false, false); if (! SLIntersect.valid) return 0; - const Intersection* intersection = new Intersection(SLIntersect.intersection, + const TrackSurfaceIntersection* intersection = new TrackSurfaceIntersection(SLIntersect.position, m_direction, m_pathLength); m_intersectionNumber = intersection->serialNumber(); @@ -263,7 +265,7 @@ RungeKuttaIntersector::approachStraightLineSurface(const StraightLineSurface& su /**IIntersector interface method for specific Surface type : CylinderSurface */ const Trk::TrackSurfaceIntersection* RungeKuttaIntersector::intersectCylinderSurface (const CylinderSurface& surface, - const Intersection* trackIntersection, + const TrackSurfaceIntersection* trackIntersection, const double qOverP) { // set member data @@ -310,9 +312,9 @@ RungeKuttaIntersector::intersectCylinderSurface (const CylinderSurface& surface, if (m_distance > m_shortStepMin) shortStep(); // ensure intersection is valid (ie. on surface) - SurfaceIntersection SLIntersect = surface.straightLineIntersection(m_position, m_direction, false, false); + Intersection SLIntersect = surface.straightLineIntersection(m_position, m_direction, false, false); if (! SLIntersect.valid) return 0; - const Intersection* intersection = new Intersection(SLIntersect.intersection, + const TrackSurfaceIntersection* intersection = new TrackSurfaceIntersection(SLIntersect.position, m_direction, m_pathLength); m_intersectionNumber = intersection->serialNumber(); @@ -322,7 +324,7 @@ RungeKuttaIntersector::intersectCylinderSurface (const CylinderSurface& surface, /**IIntersector interface method for specific Surface type : DiscSurface */ const Trk::TrackSurfaceIntersection* RungeKuttaIntersector::intersectDiscSurface (const DiscSurface& surface, - const Intersection* trackIntersection, + const TrackSurfaceIntersection* trackIntersection, const double qOverP) { setCache(trackIntersection, qOverP); @@ -349,9 +351,9 @@ RungeKuttaIntersector::intersectDiscSurface (const DiscSurface& surface, if (std::abs(m_stepLength) > m_shortStepMin) shortStep(); // ensure intersection is valid (ie. on surface) - SurfaceIntersection SLIntersect = surface.straightLineIntersection(m_position, m_direction, false, false); + Intersection SLIntersect = surface.straightLineIntersection(m_position, m_direction, false, false); if (! SLIntersect.valid) return 0; - const Intersection* intersection = new Intersection(SLIntersect.intersection, + const TrackSurfaceIntersection* intersection = new TrackSurfaceIntersection(SLIntersect.position, m_direction, m_pathLength); m_intersectionNumber = intersection->serialNumber(); @@ -361,7 +363,7 @@ RungeKuttaIntersector::intersectDiscSurface (const DiscSurface& surface, /**IIntersector interface method for specific Surface type : PlaneSurface */ const Trk::TrackSurfaceIntersection* RungeKuttaIntersector::intersectPlaneSurface(const PlaneSurface& surface, - const Intersection* trackIntersection, + const TrackSurfaceIntersection* trackIntersection, const double qOverP) { // set member data @@ -389,9 +391,9 @@ RungeKuttaIntersector::intersectPlaneSurface(const PlaneSurface& surface, if (m_distance > m_shortStepMin) shortStep(); // ensure intersection is valid (ie. on surface) - SurfaceIntersection SLIntersect = surface.straightLineIntersection(m_position, m_direction, false, false); + Intersection SLIntersect = surface.straightLineIntersection(m_position, m_direction, false, false); if (! SLIntersect.valid) return 0; - const Intersection* intersection = new Intersection(SLIntersect.intersection, + const TrackSurfaceIntersection* intersection = new TrackSurfaceIntersection(SLIntersect.position, m_direction, m_pathLength); m_intersectionNumber = intersection->serialNumber();