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.)
379 double zOfIntersect = intersectRmin.
yOfX;
381 if (std::abs(zOfIntersect) <=
m_halfZ && zOfIntersect > 0.)
384 if (std::abs(zOfIntersect) <=
m_halfZ && zOfIntersect < 0.)
387 if (std::abs(zOfIntersect) >
m_halfZ && zOfIntersect > 0.)
397 double posZ = gp.z();
398 double posR = gp.perp();
402 double deltaZ =
diff.z() - posZ;
409 double zOfIntersect = intersectR.
yOfX;
411 if (std::abs(zOfIntersect) <=
m_halfZ && zOfIntersect > 0.)
414 if (std::abs(zOfIntersect) <=
m_halfZ && zOfIntersect < 0.)
417 if (std::abs(zOfIntersect) >
m_halfZ && zOfIntersect > 0.)
432std::shared_ptr<Trk::CylinderBounds>
438std::shared_ptr<Trk::CylinderBounds>
444std::shared_ptr<Trk::RectangleBounds>
450std::shared_ptr<Trk::RectangleBounds>
456std::shared_ptr<Trk::EllipseBounds>
459 return std::make_shared<Trk::EllipseBounds>(
467std::shared_ptr<Trk::EllipseBounds>
470 return std::make_shared<Trk::EllipseBounds>(
478std::shared_ptr<Trk::CylinderBounds>
484std::shared_ptr<Trk::CylinderBounds>
490std::shared_ptr<Trk::DiscBounds>
499std::shared_ptr<Trk::TrapezoidBounds>
502 return std::make_shared<Trk::TrapezoidBounds>(
507std::shared_ptr<Trk::RectangleBounds>
516 return std::make_shared<Trk::RectangleBounds>(0.5 * (ro - ri),
m_halfZ);
526 std::unique_ptr<Trk::Volume> volIn;
527 std::unique_ptr<Trk::Volume> volOut;
529 volIn = std::make_unique<Trk::Volume>(
535 volOut = std::make_unique<Trk::Volume>(
541 return volOut.release();
544 return volIn.release();
547 nullptr, std::make_shared<Trk::CombinedVolumeBounds>(std::move(volIn), std::move(volOut),
false));
555 std::stringstream sl_temp;
556 sl_temp << std::setiosflags(std::ios::fixed);
557 sl_temp << std::setprecision(7);
558 sl_temp <<
"Trk::BevelledCylinderVolumeBounds: (innerR, outerR, "
559 "halfPhiSector, halflengthInZ, thetaMinus, thetaPlus) = ";
570 std::stringstream sl_temp;
571 sl_temp << std::setiosflags(std::ios::fixed);
572 sl_temp << std::setprecision(7);
573 sl_temp <<
"Trk::BevelledCylinderVolumeBounds: (innerR, outerR, "
574 "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