|
ATLAS Offline Software
|
Go to the documentation of this file.
9 #ifndef TRKEXSOLENOIDALINTERSECTOR_SOLENOIDALINTERSECTOR_H
10 #define TRKEXSOLENOIDALINTERSECTOR_SOLENOIDALINTERSECTOR_H
17 #include "GaudiKernel/ContextSpecificPtr.h"
18 #include "GaudiKernel/ToolHandle.h"
54 virtual std::unique_ptr<IIntersectionCache>
clone()
const override {
55 return std::unique_ptr<IIntersectionCache>(
new Constants(*
this));
76 const double qOverP)
const override;
82 const double qOverP)
const override;
89 const double qOverP)
const override;
96 const double qOverP)
const override;
102 const double qOverP)
const override;
108 const double qOverP)
const override;
124 return handle.
cptr();
128 double&,
double&)
const;
130 const Constants& com,
const double radius2,
131 const double endRadius)
const;
133 Constants& com,
const double endRadius)
const;
148 this,
"SolenoidParameterizationKey",
"SolenoidParametrization",
""};
162 double endRadius,
double radiusOfCurvature,
double xCentre,
double yCentre,
163 double cosPhi,
double sinPhi,
double& cosPhiIntersect,
164 double& sinPhiIntersect)
const {
166 double radiusSquared = xCentre * xCentre + yCentre * yCentre;
168 (radiusSquared + radiusOfCurvature * radiusOfCurvature -
169 endRadius * endRadius) /
170 (radiusSquared * radiusOfCurvature);
171 if (std::abs(xCentre) < std::abs(yCentre)) {
172 double dx2 = yCentre * yCentre * (1. / (radiusSquared * term * term) - 1.);
176 if (yCentre * term > 0.) {
177 sinPhiIntersect = term * (-xCentre + std::sqrt(dx2));
179 sinPhiIntersect = term * (-xCentre - std::sqrt(dx2));
182 (sinPhiIntersect * xCentre + radiusSquared * term) / yCentre;
185 double dy2 = xCentre * xCentre * (1. / (radiusSquared * term * term) - 1.);
189 if (xCentre * term > 0.) {
190 cosPhiIntersect = term * (yCentre + std::sqrt(dy2));
192 cosPhiIntersect = term * (yCentre - std::sqrt(dy2));
195 (cosPhiIntersect * yCentre - radiusSquared * term) / xCentre;
200 double sinDeltaPhi = sinPhiIntersect * cosPhi - cosPhiIntersect * sinPhi;
201 if (std::abs(sinDeltaPhi) > 0.1) {
204 deltaPhi = sinDeltaPhi * (1. + 0.166667 * sinDeltaPhi * sinDeltaPhi);
206 return (radiusOfCurvature *
deltaPhi);
208 cosPhiIntersect = cosPhi;
209 sinPhiIntersect = sinPhi;
219 const double radius2,
const double endRadius)
const {
225 double radiusSquared =
226 endRadius * endRadius - radius2 + arcLength * arcLength;
227 if (radiusSquared > 0.) {
228 if (endRadius > 0.) {
229 arcLength += std::sqrt(radiusSquared);
231 arcLength -= std::sqrt(radiusSquared);
239 const Surface& surface)
const {
243 isect.position(), isect.direction(),
false,
false);
244 if (SLIntersect.
valid) {
248 isect.position() = SLIntersect.
position;
249 return std::move(isect);
257 #endif // TRKEXSOLENOIDALINTERSECTOR_SOLENOIDALINTERSECTOR_H
virtual std::optional< TrackSurfaceIntersection > approachPerigeeSurface(const PerigeeSurface &surface, const TrackSurfaceIntersection &trackTrackSurfaceIntersection, const double qOverP) const override
IIntersector interface method for specific Surface type : PerigeeSurface.
Amg::Vector3D m_lastPosition
Intersection straightLineIntersection(const T &pars, bool forceDir=false, const Trk::BoundaryCheck &bchk=false) const
fst straight line intersection schema - templated for charged and neutral parameters
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
double m_surfaceTolerance
static std::optional< TrackSurfaceIntersection > newIntersection(const TrackSurfaceIntersection &oldIsect, const SolenoidParametrization &solpar, const double qOverP, Constants *&com)
virtual std::optional< TrackSurfaceIntersection > intersectPlaneSurface(const PlaneSurface &surface, const TrackSurfaceIntersection &trackTrackSurfaceIntersection, const double qOverP) const override
IIntersector interface method for specific Surface type : PlaneSurface.
SG::ReadCondHandleKey< SolenoidParametrization > m_solenoidParametrizationKey
std::atomic< unsigned long long > m_countExtrapolations
Base class for cache block.
static bool extrapolateToZ(TrackSurfaceIntersection &isect, Constants &com, const double endZ)
virtual bool isValid(Amg::Vector3D startPosition, Amg::Vector3D endPosition) const override
IIntersector interface method to check validity of parametrization within extrapolation range.
virtual std::optional< TrackSurfaceIntersection > approachStraightLineSurface(const StraightLineSurface &surface, const TrackSurfaceIntersection &trackTrackSurfaceIntersection, const double qOverP) const override
IIntersector interface method for specific Surface type : StraightLineSurface.
Constants(const SolenoidParametrization &solpar, const TrackSurfaceIntersection &trackTrackSurfaceIntersection, const double qOverP)
virtual std::unique_ptr< IIntersectionCache > clone() const override
double circularArcLength(double, double, double, double, double, double, double &, double &) const
double m_deltaPhiTolerance
std::optional< TrackSurfaceIntersection > intersection(TrackSurfaceIntersection &&isect, Constants &com, const Surface &surface) const
const Amg::Vector3D & position() const
Method to retrieve the position of the Intersection.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual std::optional< TrackSurfaceIntersection > intersectSurface(const Surface &surface, const TrackSurfaceIntersection &trackTrackSurfaceIntersection, const double qOverP) const override
IIntersector interface method for general Surface type.
virtual StatusCode initialize() override
virtual std::optional< TrackSurfaceIntersection > intersectDiscSurface(const DiscSurface &surface, const TrackSurfaceIntersection &trackTrackSurfaceIntersection, const double qOverP) const override
IIntersector interface method for specific Surface type : DiscSurface.
virtual ~SolenoidalIntersector()=default
Ensure that the ATLAS eigen extensions are properly loaded.
Constants of motion and other cached values.
virtual std::optional< TrackSurfaceIntersection > intersectCylinderSurface(const CylinderSurface &surface, const TrackSurfaceIntersection &trackTrackSurfaceIntersection, const double qOverP) const override
IIntersector interface method for specific Surface type : CylinderSurface.
std::atomic< unsigned long long > m_countRKSwitches
const SolenoidParametrization * getSolenoidParametrization() const
Eigen::Matrix< double, 3, 1 > Vector3D
const Amg::Vector3D & direction() const
Method to retrieve the direction at the Intersection.
SolenoidalIntersector(const std::string &type, const std::string &name, const IInterface *parent)
bool extrapolateToR(TrackSurfaceIntersection &isect, double &radius2, Constants &com, const double endRadius) const
virtual StatusCode finalize() override
void throwMissingCondData() const
const SolenoidParametrization & m_solPar
double linearArcLength(const TrackSurfaceIntersection &isect, const Constants &com, const double radius2, const double endRadius) const
Define macros for attributes used to control the static checker.
SolenoidParametrization::Parameters m_solParams
ToolHandle< IIntersector > m_rungeKuttaIntersector
const_pointer_type cptr()