ATLAS Offline Software
Loading...
Searching...
No Matches
TrackingVolumeManipulator.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6// TrackingVolumeManipulator.cxx, (c) ATLAS Detector software
8
10
11#include <utility>
12
15
16void
18 Trk::TrackingVolume& firstVol,
20 Trk::TrackingVolume& secondVol,
21 Trk::BoundarySurfaceFace secondFace) const
22{
23 // check if it is a cylinder volume
24 const Trk::CylinderVolumeBounds* cylBounds =
25 dynamic_cast<const Trk::CylinderVolumeBounds*>(&(firstVol.volumeBounds()));
26
27 if (firstFace == Trk::tubeOuterCover && secondFace == Trk::tubeInnerCover)
28 return glueVolumes(secondVol, secondFace, firstVol, firstFace);
29
30 // the second volume gets the face of the first volume assigned
31 (secondVol.m_boundarySurfaces)[secondFace] =
32 (firstVol.m_boundarySurfaces)[firstFace];
33 // the face of the first volume has been an inner tube
34 if (cylBounds && firstFace == Trk::tubeInnerCover &&
35 secondFace == Trk::tubeOuterCover) {
36 (secondVol.m_boundarySurfaces)[secondFace]->setInsideVolume(&secondVol);
37 } else {
38 (secondVol.m_boundarySurfaces)[secondFace]->setOutsideVolume(&secondVol);
39 }
40}
41
42void
50
51void
59
60void
69
70void
78
79void
88
89void
91 TrackingVolume* outsideVol)
92{
93
94 const auto& bounds = tvol.boundarySurfaces();
95 for (const auto & bound : bounds) {
96 if (bound->outsideVolume() == nullptr) {
97 bound->setOutsideVolume(outsideVol);
98 }
99 if (bound->insideVolume() == nullptr) {
100 bound->setInsideVolume(outsideVol);
101 }
102 }
103}
Binned Array for avoiding map searches/.
Definition BinnedArray.h:36
Description of a BoundarySurface inside the tracking realm, it extends the Surface description to mak...
Bounds for a cylindrical Volume, the decomposeToSurfaces method creates a vector of up to 6 surfaces:
static void setBoundarySurface(TrackingVolume &tvol, std::shared_ptr< BoundarySurface< TrackingVolume > > bsurf, BoundarySurfaceFace face)
protected method to set the boundary surface of a tracking volume
static void setOutsideVolumeArray(TrackingVolume &tvol, BoundarySurfaceFace face, const std::shared_ptr< BinnedArray< TrackingVolume > > &outsidevolarray)
protected method to set outside VolumeArray of a BoundarySurface: input:
static void confineVolume(TrackingVolume &tvol, TrackingVolume *outsidevol)
protected method to confine (dense) volumes: input:
static void setInsideVolumeArray(TrackingVolume &tvol, BoundarySurfaceFace face, const std::shared_ptr< BinnedArray< TrackingVolume > > &insidevolarray)
protected method to set inside VolumeArray of a BoundarySurface: input:
void glueVolumes(TrackingVolume &firstVol, BoundarySurfaceFace firstFace, TrackingVolume &secondVol, BoundarySurfaceFace secondFace) const
protected method to glue two Volumes together input:
static void setOutsideVolume(TrackingVolume &tvol, BoundarySurfaceFace face, TrackingVolume *outsidevol)
protected method to set outside Volume of a BoundarySurface: input:
static void setInsideVolume(TrackingVolume &tvol, BoundarySurfaceFace face, TrackingVolume *insidevol)
protected method to set inside Volume of a BoundarySurface: input:
Full Volume description used in Tracking, it inherits from Volume to get the geometrical structure,...
std::vector< std::shared_ptr< BoundarySurface< TrackingVolume > > > & boundarySurfaces()
Method to return the BoundarySurfaces.
std::vector< std::shared_ptr< BoundarySurface< TrackingVolume > > > m_boundarySurfaces
const VolumeBounds & volumeBounds() const
returns the volumeBounds()
Definition Volume.h:96
BoundarySurfaceFace
Enum to describe the position of the BoundarySurface respectively to the frame orientatin of the volu...