 |
ATLAS Offline Software
|
#include <CylinderVolumeBounds.h>
Bounds for a cylindrical Volume, the decomposeToSurfaces method creates a vector of up to 6 surfaces:
case A) 3 Surfaces (full cylindrical tube): BoundarySurfaceFace [index]:
case B) 4 Surfaces (tube with inner and outer radius): BoundarySurfaceFace [index]:
case C) 6 Surfaces (sectoral tube with inner and outer radius): BoundarySurfaceFace [index]:
- negativeFaceXY [0] : Trk::DiscSurface with \( r_{inner}>0 \) and \( \phi < \pi \), parallel to \( xy \) plane at negative \( z \)
- positiveFaceXY [1] : Trk::DiscSurface with \( r_{inner}>0 \) and \( \phi < \pi \), parallel to \( xy \) plane at positive \( z \)
- tubeSectorOuterCover [2] : Trk::CylinderSurface with \( r = r_{outer} \)
- tubeSectorInnerCover [3] : Trk::CylinderSurface with \( r = r_{inner} \)
- tubeSectorNegativePhi [4] : Rectangular Trk::PlaneSurface attached to [0] and [1] at negative \( \phi \)
- tubeSectorNegativePhi [5] : Rectangular Trk::PlaneSurface attached to [0] and [1] at positive \( \phi \)
- Author
- Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch
-
Christos Anastopoulos (Athena MT modifications)
Definition at line 70 of file CylinderVolumeBounds.h.
◆ CylinderVolumeBounds() [1/5]
| Trk::CylinderVolumeBounds::CylinderVolumeBounds |
( |
| ) |
|
◆ CylinderVolumeBounds() [2/5]
| Trk::CylinderVolumeBounds::CylinderVolumeBounds |
( |
double |
radius, |
|
|
double |
halez |
|
) |
| |
◆ CylinderVolumeBounds() [3/5]
| Trk::CylinderVolumeBounds::CylinderVolumeBounds |
( |
double |
rinner, |
|
|
double |
router, |
|
|
double |
halez |
|
) |
| |
◆ CylinderVolumeBounds() [4/5]
| Trk::CylinderVolumeBounds::CylinderVolumeBounds |
( |
double |
rinner, |
|
|
double |
router, |
|
|
double |
halfPhiSector, |
|
|
double |
halez |
|
) |
| |
◆ CylinderVolumeBounds() [5/5]
◆ ~CylinderVolumeBounds()
| Trk::CylinderVolumeBounds::~CylinderVolumeBounds |
( |
| ) |
|
|
virtualdefault |
◆ bottomDiscBounds()
| std::shared_ptr< Trk::DiscBounds > Trk::CylinderVolumeBounds::bottomDiscBounds |
( |
| ) |
const |
|
private |
◆ boundarySurfaceAccessor()
Provide accessor for BoundarySurfaces.
Implements Trk::VolumeBounds.
Definition at line 163 of file CylinderVolumeBounds.cxx.
173 double posZ = gp.z();
174 double posR = gp.perp();
182 bool isOnFace =
false;
183 bool intersectionIndicator = (
deltaR > 0.);
184 bool choiceIndicator =
false;
199 (posR < m_innerRadius && deltaR > 0.)) {
216 if (intersectionIndicator) {
220 double zOfIntersect = intersectRmax.yOfX;
222 if (std::abs(zOfIntersect) <=
m_halfZ)
223 return {(choiceIndicator || zOfIntersect > 0.)
230 (choiceIndicator || zOfIntersect > 0.)
238 double zOfIntersect = intersectRmin.yOfX;
240 if (std::abs(zOfIntersect) <=
m_halfZ)
242 (choiceIndicator || zOfIntersect > 0.)
248 (choiceIndicator || zOfIntersect > 0.)
272 double zOfIntersect = intersectRmax.yOfX;
274 if (std::abs(zOfIntersect) <=
m_halfZ && zOfIntersect > 0.)
276 if (std::abs(zOfIntersect) <=
m_halfZ && zOfIntersect < 0.)
278 if (std::abs(zOfIntersect) >
m_halfZ && zOfIntersect < 0.)
280 if (std::abs(zOfIntersect) >
m_halfZ && zOfIntersect > 0.)
288 double zOfIntersect = intersectRmin.yOfX;
290 if (std::abs(zOfIntersect) <=
m_halfZ && zOfIntersect > 0.)
292 if (std::abs(zOfIntersect) <=
m_halfZ && zOfIntersect < 0.)
294 if (std::abs(zOfIntersect) >
m_halfZ && zOfIntersect > 0.)
305 double posZ = gp.z();
306 double posR = gp.perp();
317 int radiusSign =
deltaR > 0. ? 1 : -1;
328 double zOfIntersect = intersectR.yOfX;
330 bool intersectsCylinder =
331 !isOnCylinder ? (zOfIntersect * zOfIntersect <=
m_halfZ *
m_halfZ)
335 if (intersectsCylinder && zOfIntersect > 0.)
337 if (intersectsCylinder && zOfIntersect <= 0.)
◆ clone()
◆ createBoundarySurfaceAccessors()
| void Trk::CylinderVolumeBounds::createBoundarySurfaceAccessors |
( |
| ) |
|
|
private |
Private method to construct the accessors.
◆ decomposeToSurfaces()
Method to decompose the Bounds into boundarySurfaces.
Implements Trk::VolumeBounds.
Definition at line 98 of file CylinderVolumeBounds.cxx.
101 auto retsf = std::vector<std::unique_ptr<Trk::Surface>>();
106 bool isConcentric =
transform.isApprox(Amg::Transform3D::Identity());
113 bottomDiscRot.col(0) = discRot.col(1);
114 bottomDiscRot.col(1) = discRot.col(0);
115 bottomDiscRot.col(2) = -discRot.col(2);
116 retsf.push_back(std::make_unique<Trk::DiscSurface>(
122 retsf.push_back(std::make_unique<Trk::DiscSurface>(
127 retsf.push_back(std::make_unique<Trk::CylinderSurface>(
135 retsf.push_back(std::make_unique<Trk::CylinderSurface>(
143 retsf.push_back(std::make_unique<Trk::PlaneSurface>(
151 retsf.push_back(std::make_unique<Trk::PlaneSurface>(
◆ deltaRadius()
| double Trk::CylinderVolumeBounds::deltaRadius |
( |
| ) |
const |
|
inline |
◆ dump() [1/2]
| MsgStream & Trk::CylinderVolumeBounds::dump |
( |
MsgStream & |
sl | ) |
const |
|
finaloverridevirtual |
Output Method for MsgStream.
Implements Trk::VolumeBounds.
Definition at line 379 of file CylinderVolumeBounds.cxx.
381 std::stringstream temp_sl;
382 temp_sl << std::setiosflags(std::ios::fixed);
383 temp_sl << std::setprecision(2);
384 temp_sl <<
"Trk::CylinderVolumeBounds: (rMin, rMax, halfPhi, halfZ) = ";
◆ dump() [2/2]
| std::ostream & Trk::CylinderVolumeBounds::dump |
( |
std::ostream & |
sl | ) |
const |
|
finaloverridevirtual |
Output Method for std::ostream.
Implements Trk::VolumeBounds.
Definition at line 392 of file CylinderVolumeBounds.cxx.
394 std::stringstream temp_sl;
395 temp_sl << std::setiosflags(std::ios::fixed);
396 temp_sl << std::setprecision(2);
397 temp_sl <<
"Trk::CylinderVolumeBounds: (rMin, rMax, halfPhi, halfZ) = ";
◆ halflengthZ()
| double Trk::CylinderVolumeBounds::halflengthZ |
( |
| ) |
const |
|
inline |
◆ halfPhiSector()
| double Trk::CylinderVolumeBounds::halfPhiSector |
( |
| ) |
const |
|
inline |
◆ innerCylinderBounds()
| std::shared_ptr< Trk::CylinderBounds > Trk::CylinderVolumeBounds::innerCylinderBounds |
( |
| ) |
const |
|
private |
◆ innerRadius()
| double Trk::CylinderVolumeBounds::innerRadius |
( |
| ) |
const |
|
inline |
◆ inside()
| bool Trk::CylinderVolumeBounds::inside |
( |
const Amg::Vector3D & |
pos, |
|
|
double |
tol = 0. |
|
) |
| const |
|
inlinefinaloverridevirtual |
This method checks if position in the 3D volume frame is inside the cylinder.
Implements Trk::VolumeBounds.
Definition at line 175 of file CylinderVolumeBounds.h.
183 bool insideZ = insideR ? (fabs(
pos.z()) <=
m_halfZ + tol) :
false;
184 return (insideZ && insideR && insidePhi);
◆ mediumRadius()
| double Trk::CylinderVolumeBounds::mediumRadius |
( |
| ) |
const |
|
inline |
◆ operator=()
◆ outerCylinderBounds()
| std::shared_ptr< Trk::CylinderBounds > Trk::CylinderVolumeBounds::outerCylinderBounds |
( |
| ) |
const |
|
private |
◆ outerRadius()
| double Trk::CylinderVolumeBounds::outerRadius |
( |
| ) |
const |
|
inline |
◆ sectorPlaneBounds()
This method returns the associated PlaneBounds limiting a sectoral CylinderVolume.
Definition at line 370 of file CylinderVolumeBounds.cxx.
372 return std::make_shared<Trk::RectangleBounds>(
◆ topDiscBounds()
| std::shared_ptr< DiscBounds > Trk::CylinderVolumeBounds::topDiscBounds |
( |
| ) |
const |
|
inlineprivate |
◆ m_boundaryAccessors
Accessors for Boundary surface access - static is not possible due to mismatched delete() / free () with TrkMagFieldUtils.
Definition at line 165 of file CylinderVolumeBounds.h.
◆ m_halfPhiSector
| double Trk::CylinderVolumeBounds::m_halfPhiSector |
|
private |
◆ m_halfZ
| double Trk::CylinderVolumeBounds::m_halfZ |
|
private |
◆ m_innerRadius
| double Trk::CylinderVolumeBounds::m_innerRadius |
|
private |
◆ m_outerRadius
| double Trk::CylinderVolumeBounds::m_outerRadius |
|
private |
◆ s_numericalStable
| const double Trk::CylinderVolumeBounds::s_numericalStable |
|
staticprivate |
The documentation for this class was generated from the following files:
std::shared_ptr< CylinderBounds > outerCylinderBounds() const
This method returns the associated CylinderBounds of the outer CylinderSurfaces.
@ TubeRdecreaseZdecrease
Accessor type [ 3,0,1,2 ].
@ TubeOutsideRmaxRincrease
Accessor type [ 2,1,0,3 ] - inverse case.
const FourObjectsAccessor & tubeAccessor(TubeAccessorType tat) const
Return the accessor for the tube case.
std::shared_ptr< RectangleBounds > sectorPlaneBounds() const
This method returns the associated PlaneBounds limiting a sectoral CylinderVolume.
@ TubeZdecreaseRdecrease
Accessor type [ 0,3,1,2 ].
@ TubeOutsideZmaxZincrease
Accessor type [ 1,3,2,0 ] - inverse case.
@ TubeRincreaseZdecrease
Accessor type [ 2,0,1,3 ].
CylinderVolumeBounds()
Default Constructor.
std::shared_ptr< DiscBounds > topDiscBounds() const
This method returns the associated DiscBounds for the bottom/top DiscSurface.
@ StandardSectoralCylinder
std::shared_ptr< DiscBounds > bottomDiscBounds() const
This method returns the associated DiscBounds for the bottom/top DiscSurface.
const ThreeObjectsAccessor & cylinderAccessor(CylinderAccessorType cat) const
Return the accessor for the cylindrical case.
CylinderVolumeBoundaryAccessors m_boundaryAccessors
Accessors for Boundary surface access - static is not possible due to mismatched delete() / free () w...
Eigen::Affine3d Transform3D
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
double halflengthZ() const
This method returns the halflengthZ.
@ TubeZdecreaseRincrease
Accessor type [ 0,2,1,3 ].
@ CylinderZdecrease
Cylinder hit, the neg.
@ TubeRdecreaseZincrease
Accessor type [ 3,1,0,2 ].
@ CylinderNegativeFace
Neg.
Eigen::Matrix< double, 3, 1 > Vector3D
@ TubeRincreaseZincrease
Accessor type [ 2,1,0,3 ].
double halfPhiSector() const
This method returns the halfPhiSector angle.
std::shared_ptr< CylinderBounds > innerCylinderBounds() const
This method returns the associated CylinderBounds of the inner CylinderSurfaces.
double innerRadius() const
This method returns the inner radius.
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
const SixObjectsAccessor & sectoralTubeAccessor(SectoralTubeAccessorType stat) const
Return the accessor for the sectoral tube case.
@ TubeZincreaseRdecrease
Accessor type [ 1,3,0,2 ].
Eigen::Translation< double, 3 > Translation3D
const FiveObjectsAccessor & sectoralCylinderAccessor(SectoralCylinderAccessorType scat) const
Return the accessor for the sectoral cylinciracl case.
@ CylinderPositiveFace
Pos.
Eigen::AngleAxisd AngleAxis3D
@ CylinderZincrease
Cylinder hit, then pos.
static const double s_numericalStable
numerical stability
@ TubeOutsideRminRdecrease
Accessor type [ 3,1,0,2] - inverse case.
@ TubeOutsideZminZdecrease
Accessor type [ 0,3,2,1 ] - inverse case.
VolumeBounds()
Default Constructor.
double mediumRadius() const
This method returns the medium radius.
@ TubeZincreaseRincrease
Accessor type [ 1,2,0,3 ].