ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkDetDescr
TrkGeometry
src
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
9
#include "
TrkGeometry/TrackingVolumeManipulator.h
"
10
11
#include <utility>
12
13
#include "
TrkGeometry/TrackingVolume.h
"
14
#include "
TrkVolumes/CylinderVolumeBounds.h
"
15
16
void
17
Trk::TrackingVolumeManipulator::glueVolumes
(
18
Trk::TrackingVolume
& firstVol,
19
Trk::BoundarySurfaceFace
firstFace,
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
42
void
43
Trk::TrackingVolumeManipulator::setBoundarySurface
(
44
Trk::TrackingVolume
& tvol,
45
std::shared_ptr<
Trk::BoundarySurface<Trk::TrackingVolume>
> bsurf,
46
Trk::BoundarySurfaceFace
face)
47
{
48
(tvol.
m_boundarySurfaces
)[face] = std::move(bsurf);
49
}
50
51
void
52
Trk::TrackingVolumeManipulator::setInsideVolume
(
Trk::TrackingVolume
& tvol,
53
Trk::BoundarySurfaceFace
face,
54
Trk::TrackingVolume
* insidevol)
55
{
56
57
(tvol.
m_boundarySurfaces
)[face]->
setInsideVolume
(insidevol);
58
}
59
60
void
61
Trk::TrackingVolumeManipulator::setInsideVolumeArray
(
62
Trk::TrackingVolume
& tvol,
63
Trk::BoundarySurfaceFace
face,
64
const
std::shared_ptr<
Trk::BinnedArray<Trk::TrackingVolume>
>&
65
insidevolarray)
66
{
67
(tvol.
m_boundarySurfaces
)[face]->
setInsideVolumeArray
(insidevolarray);
68
}
69
70
void
71
Trk::TrackingVolumeManipulator::setOutsideVolume
(
72
Trk::TrackingVolume
& tvol,
73
Trk::BoundarySurfaceFace
face,
74
Trk::TrackingVolume
* outsidevol)
75
{
76
(tvol.
m_boundarySurfaces
)[face]->
setOutsideVolume
(outsidevol);
77
}
78
79
void
80
Trk::TrackingVolumeManipulator::setOutsideVolumeArray
(
81
Trk::TrackingVolume
& tvol,
82
Trk::BoundarySurfaceFace
face,
83
const
std::shared_ptr<
Trk::BinnedArray<Trk::TrackingVolume>
>&
84
outsidevolarray)
85
{
86
(tvol.
m_boundarySurfaces
)[face]->
setOutsideVolumeArray
(outsidevolarray);
87
}
88
89
void
90
Trk::TrackingVolumeManipulator::confineVolume
(
TrackingVolume
& tvol,
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
}
CylinderVolumeBounds.h
TrackingVolumeManipulator.h
TrackingVolume.h
Trk::BinnedArray
Binned Array for avoiding map searches/.
Definition
BinnedArray.h:36
Trk::BoundarySurface
Description of a BoundarySurface inside the tracking realm, it extends the Surface description to mak...
Definition
BoundarySurface.h:43
Trk::CylinderVolumeBounds
Bounds for a cylindrical Volume, the decomposeToSurfaces method creates a vector of up to 6 surfaces:
Definition
CylinderVolumeBounds.h:70
Trk::TrackingVolumeManipulator::setBoundarySurface
static void setBoundarySurface(TrackingVolume &tvol, std::shared_ptr< BoundarySurface< TrackingVolume > > bsurf, BoundarySurfaceFace face)
protected method to set the boundary surface of a tracking volume
Definition
TrackingVolumeManipulator.cxx:43
Trk::TrackingVolumeManipulator::setOutsideVolumeArray
static void setOutsideVolumeArray(TrackingVolume &tvol, BoundarySurfaceFace face, const std::shared_ptr< BinnedArray< TrackingVolume > > &outsidevolarray)
protected method to set outside VolumeArray of a BoundarySurface: input:
Definition
TrackingVolumeManipulator.cxx:80
Trk::TrackingVolumeManipulator::confineVolume
static void confineVolume(TrackingVolume &tvol, TrackingVolume *outsidevol)
protected method to confine (dense) volumes: input:
Definition
TrackingVolumeManipulator.cxx:90
Trk::TrackingVolumeManipulator::setInsideVolumeArray
static void setInsideVolumeArray(TrackingVolume &tvol, BoundarySurfaceFace face, const std::shared_ptr< BinnedArray< TrackingVolume > > &insidevolarray)
protected method to set inside VolumeArray of a BoundarySurface: input:
Definition
TrackingVolumeManipulator.cxx:61
Trk::TrackingVolumeManipulator::glueVolumes
void glueVolumes(TrackingVolume &firstVol, BoundarySurfaceFace firstFace, TrackingVolume &secondVol, BoundarySurfaceFace secondFace) const
protected method to glue two Volumes together input:
Definition
TrackingVolumeManipulator.cxx:17
Trk::TrackingVolumeManipulator::setOutsideVolume
static void setOutsideVolume(TrackingVolume &tvol, BoundarySurfaceFace face, TrackingVolume *outsidevol)
protected method to set outside Volume of a BoundarySurface: input:
Definition
TrackingVolumeManipulator.cxx:71
Trk::TrackingVolumeManipulator::setInsideVolume
static void setInsideVolume(TrackingVolume &tvol, BoundarySurfaceFace face, TrackingVolume *insidevol)
protected method to set inside Volume of a BoundarySurface: input:
Definition
TrackingVolumeManipulator.cxx:52
Trk::TrackingVolume
Full Volume description used in Tracking, it inherits from Volume to get the geometrical structure,...
Definition
TrackingVolume.h:119
Trk::TrackingVolume::boundarySurfaces
std::vector< std::shared_ptr< BoundarySurface< TrackingVolume > > > & boundarySurfaces()
Method to return the BoundarySurfaces.
Definition
TrackingVolume.cxx:809
Trk::TrackingVolume::m_boundarySurfaces
std::vector< std::shared_ptr< BoundarySurface< TrackingVolume > > > m_boundarySurfaces
Definition
TrackingVolume.h:438
Trk::Volume::volumeBounds
const VolumeBounds & volumeBounds() const
returns the volumeBounds()
Definition
Volume.h:96
Trk::BoundarySurfaceFace
BoundarySurfaceFace
Enum to describe the position of the BoundarySurface respectively to the frame orientatin of the volu...
Definition
BoundarySurfaceFace.h:31
Trk::tubeInnerCover
@ tubeInnerCover
Definition
BoundarySurfaceFace.h:39
Trk::tubeOuterCover
@ tubeOuterCover
Definition
BoundarySurfaceFace.h:40
Generated on
for ATLAS Offline Software by
1.17.0