25#include "GaudiKernel/MsgStream.h"
26#include "GaudiKernel/SystemOfUnits.h"
32 10
e-2 * Gaudi::Units::millimeter;
98std::vector<std::unique_ptr<Trk::Surface>>
102 auto retsf = std::vector<std::unique_ptr<Trk::Surface>>();
116 retsf.push_back(std::make_unique<Trk::PlaneSurface>(
132 retsf.push_back(std::make_unique<Trk::SubtractedDiscSurface>(
133 bottomDisc, std::make_shared<Trk::VolumeExcluder>(std::move(subtrVol)),
false));
135 retsf.push_back(std::make_unique<Trk::DiscSurface>(
144 retsf.push_back(std::make_unique<Trk::PlaneSurface>(
158 retsf.push_back(std::make_unique<Trk::SubtractedDiscSurface>(
159 topDisc, std::make_shared<Trk::VolumeExcluder>(std::move(subtrVol)),
false));
161 retsf.push_back(std::make_unique<Trk::DiscSurface>(
169 retsf.push_back(std::make_unique<Trk::CylinderSurface>(
172 retsf.push_back(std::make_unique<Trk::CylinderSurface>(
175 retsf.push_back(std::make_unique<Trk::PlaneSurface>(
186 retsf.push_back(std::make_unique<Trk::CylinderSurface>(
189 retsf.push_back(std::make_unique<Trk::CylinderSurface>(
192 retsf.push_back(std::make_unique<Trk::PlaneSurface>(
205 retsf.push_back(std::make_unique<Trk::PlaneSurface>(
213 retsf.push_back(std::make_unique<Trk::PlaneSurface>(
228 retsf.push_back(std::make_unique<Trk::PlaneSurface>(
236 retsf.push_back(std::make_unique<Trk::PlaneSurface>(
257 double posZ = gp.z();
258 double posR = gp.perp();
262 double deltaZ =
diff.z() - posZ;
266 bool isOnFace =
false;
267 bool intersectionIndicator = (
deltaR > 0.);
268 bool choiceIndicator =
false;
274 (posZ < (-
m_halfZ) && deltaZ > 0.)) {
278 (posZ >
m_halfZ && deltaZ < 0.)) {
283 (posR < m_innerRadius && deltaR > 0.)) {
300 if (intersectionIndicator) {
304 double zOfIntersect = intersectRmax.
yOfX;
306 if (std::abs(zOfIntersect) <=
m_halfZ)
307 return {(choiceIndicator || zOfIntersect > 0.)
313 return {(choiceIndicator || zOfIntersect > 0.)
322 double zOfIntersect = intersectRmin.
yOfX;
324 if (std::abs(zOfIntersect) <=
m_halfZ)
325 return {(choiceIndicator || zOfIntersect > 0.)
331 return {(choiceIndicator || zOfIntersect > 0.)
348 if (posZ < -
m_halfZ && deltaZ < 0.)
351 if (posZ >
m_halfZ && deltaZ > 0.)
360 double zOfIntersect = intersectRmax.
yOfX;
362 if (std::abs(zOfIntersect) <=
m_halfZ && zOfIntersect > 0.)
365 if (std::abs(zOfIntersect) <=
m_halfZ && zOfIntersect < 0.)
368 if (std::abs(zOfIntersect) >
m_halfZ && zOfIntersect < 0.)
371 if (std::abs(zOfIntersect) >
m_halfZ && zOfIntersect > 0.)
377 throw std::runtime_error(
"deltaR is zero in BevelledCylinderVolumeBounds::boundarySurfaceAccessor");
382 double zOfIntersect = intersectRmin.
yOfX;
384 if (std::abs(zOfIntersect) <=
m_halfZ && zOfIntersect > 0.)
387 if (std::abs(zOfIntersect) <=
m_halfZ && zOfIntersect < 0.)
390 if (std::abs(zOfIntersect) >
m_halfZ && zOfIntersect > 0.)
400 double posZ = gp.z();
401 double posR = gp.perp();
405 double deltaZ =
diff.z() - posZ;
412 double zOfIntersect = intersectR.
yOfX;
414 if (std::abs(zOfIntersect) <=
m_halfZ && zOfIntersect > 0.)
417 if (std::abs(zOfIntersect) <=
m_halfZ && zOfIntersect < 0.)
420 if (std::abs(zOfIntersect) >
m_halfZ && zOfIntersect > 0.)
435std::shared_ptr<Trk::CylinderBounds>
441std::shared_ptr<Trk::CylinderBounds>
447std::shared_ptr<Trk::RectangleBounds>
453std::shared_ptr<Trk::RectangleBounds>
459std::shared_ptr<Trk::EllipseBounds>
462 return std::make_shared<Trk::EllipseBounds>(
470std::shared_ptr<Trk::EllipseBounds>
473 return std::make_shared<Trk::EllipseBounds>(
481std::shared_ptr<Trk::CylinderBounds>
487std::shared_ptr<Trk::CylinderBounds>
493std::shared_ptr<Trk::DiscBounds>
502std::shared_ptr<Trk::TrapezoidBounds>
505 return std::make_shared<Trk::TrapezoidBounds>(
510std::shared_ptr<Trk::RectangleBounds>
519 return std::make_shared<Trk::RectangleBounds>(0.5 * (ro - ri),
m_halfZ);
529 std::unique_ptr<Trk::Volume> volIn;
530 std::unique_ptr<Trk::Volume> volOut;
532 volIn = std::make_unique<Trk::Volume>(
538 volOut = std::make_unique<Trk::Volume>(
544 return volOut.release();
547 return volIn.release();
550 nullptr, std::make_shared<Trk::CombinedVolumeBounds>(std::move(volIn), std::move(volOut),
false));
558 std::stringstream sl_temp;
559 sl_temp << std::setiosflags(std::ios::fixed);
560 sl_temp << std::setprecision(7);
561 sl_temp <<
"Trk::BevelledCylinderVolumeBounds: (innerR, outerR, "
562 "halfPhiSector, halflengthInZ, thetaMinus, thetaPlus) = ";
573 std::stringstream sl_temp;
574 sl_temp << std::setiosflags(std::ios::fixed);
575 sl_temp << std::setprecision(7);
576 sl_temp <<
"Trk::BevelledCylinderVolumeBounds: (innerR, outerR, "
577 "halfPhiSector, halflengthInZ, thetaMinus, thetaPlus) = ";
Scalar deltaR(const MatrixBase< Derived > &vec) const
void diff(const Jet &rJet1, const Jet &rJet2, std::map< std::string, double > varDiff)
Difference between jets - Non-Class function required by trigger.
Bounds for a cylindrical Volume, the decomposeToSurfaces method creates a vector of up to 6 surfaces:
std::shared_ptr< RectangleBounds > outerBevelledPlaneBounds() const
This method returns the associated BevelledCylinderBounds of the outer BevelledCylinderSurfaces.
std::shared_ptr< DiscBounds > discBounds() const
This method returns the associated DiscBounds for the bottom/top DiscSurface.
virtual std::vector< std::unique_ptr< Trk::Surface > > decomposeToSurfaces(const Amg::Transform3D &transform) override
Method to decompose the Bounds into boundarySurfaces.
std::shared_ptr< EllipseBounds > bottomEllipseBounds() const
This method returns the associated EllipseBounds for the bottom/top EllipseSurface.
virtual ~BevelledCylinderVolumeBounds()
Destructor.
Volume * subtractedVolume() const
This method returns the bevelled area volume.
int type() const
This method returns the type.
ObjectAccessor boundarySurfaceAccessor(const Amg::Vector3D &gp, const Amg::Vector3D &dir, bool forceInside=false) const override
Provide accessor for BoundarySurfaces.
std::shared_ptr< RectangleBounds > innerBevelledPlaneBounds() const
This method returns the associated plane surface bounds of the inner bevelled surface.
static const double s_numericalStable
numerical stability
CxxUtils::CachedUniquePtr< Trk::Volume > m_subtractedVolume
double halflengthZ() const
This method returns the halflengthZ.
double mediumRadius() const
This method returns the medium radius.
MsgStream & dump(MsgStream &sl) const override
Output Method for MsgStream.
double innerRadius() const
This method returns the inner radius.
std::shared_ptr< TrapezoidBounds > sectorTrdBounds() const
This method returns the associated PlaneBounds limiting a sectoral BevelledCylinderVolume.
BevelledCylinderVolumeBounds & operator=(const BevelledCylinderVolumeBounds &cylbo)
Assignment operator.
std::shared_ptr< CylinderBounds > outerBevelledCylinderBounds() const
This method returns the associated BevelledCylinderBounds of the outer BevelledCylinderSurfaces.
std::shared_ptr< CylinderBounds > outerCylinderBounds() const
This method returns the associated CylinderBounds of the outer CylinderSurfaces.
std::shared_ptr< RectangleBounds > sectorPlaneBounds() const
double outerRadius() const
This method returns the outer radius.
std::shared_ptr< EllipseBounds > topEllipseBounds() const
This method returns the associated EllipseBounds for the bottom/top EllipseSurface.
double halfPhiSector() const
This method returns the halfPhiSector angle.
std::shared_ptr< CylinderBounds > innerBevelledCylinderBounds() const
This method returns the associated BevelledCylinderBounds of the inner BevelledCylinderSurfaces.
BevelledCylinderVolumeBounds()
Default Constructor.
BevelledCylinderVolumeBoundaryAccessors m_boundaryAccessors
Accessors for Boundary surface access - static is not possible due to mismatched delete() / free () w...
std::shared_ptr< CylinderBounds > innerCylinderBounds() const
This method returns the associated CylinderBounds of the inner CylinderSurfaces.
Class for a DiscSurface in the ATLAS detector.
VolumeBounds()
Default Constructor.
Base class for all volumes inside the tracking realm, it defines the interface for inherited Volume c...
Eigen::AngleAxisd AngleAxis3D
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
Eigen::Translation< double, 3 > Translation3D
@ StandardSectoralBevelledCylinder
@ StandardSectoralBevelledTube
@ BevelledCylinderNegativeFace
Neg.
@ BevelledCylinderZincrease
Cylinder hit, then pos.
@ BevelledCylinderZdecrease
Cylinder hit, the neg.
@ BevelledCylinderPositiveFace
Pos.
@ BevelledTubeOutsideRminRdecrease
Accessor type [ 3,1,0,2] - inverse case.
@ BevelledTubeOutsideZmaxZincrease
Accessor type [ 1,3,2,0 ] - inverse case.
@ BevelledTubeRincreaseZincrease
Accessor type [ 2,1,0,3 ].
@ BevelledTubeZincreaseRdecrease
Accessor type [ 1,3,0,2 ].
@ BevelledTubeRdecreaseZincrease
Accessor type [ 3,1,0,2 ].
@ BevelledTubeZdecreaseRdecrease
Accessor type [ 0,3,1,2 ].
@ BevelledTubeRdecreaseZdecrease
Accessor type [ 3,0,1,2 ].
@ BevelledTubeRincreaseZdecrease
Accessor type [ 2,0,1,3 ].
@ BevelledTubeZincreaseRincrease
Accessor type [ 1,2,0,3 ].
@ BevelledTubeOutsideZminZdecrease
Accessor type [ 0,3,2,1 ] - inverse case.
@ BevelledTubeZdecreaseRincrease
Accessor type [ 0,2,1,3 ].
@ BevelledTubeOutsideRmaxRincrease
Accessor type [ 2,1,0,3 ] - inverse case.
double yOfX
the result of x