ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::TrackingVolume Class Reference

Full Volume description used in Tracking, it inherits from Volume to get the geometrical structure, such as from MaterialProperties and from MagneticFieldProperties. More...

#include <TrackingVolume.h>

Inheritance diagram for Trk::TrackingVolume:

Public Member Functions

 TrackingVolume ()=default
 Default Constructor.
 TrackingVolume (std::unique_ptr< Amg::Transform3D > htrans, std::shared_ptr< VolumeBounds > volbounds, std::unique_ptr< LayerArray > subLayers=nullptr, std::unique_ptr< TrackingVolumeArray > subVolumes=nullptr, const std::string &volumeName="undefined")
 Constructor for a full equipped Tracking Volume.
 TrackingVolume (const Volume &volume, const Material &matprop, std::unique_ptr< LayerArray > subLayers=nullptr, std::unique_ptr< TrackingVolumeArray > subVolumes=nullptr, const std::string &volumeName="undefined")
 Constructor for a full equipped Tracking Volume.
 TrackingVolume (std::unique_ptr< Amg::Transform3D > htrans, std::shared_ptr< VolumeBounds > volbounds, const Material &matprop, std::unique_ptr< LayerArray > subLayers=nullptr, std::unique_ptr< TrackingVolumeArray > subVolumes=nullptr, const std::string &volumeName="undefined")
 Constructor for a full equipped Tracking Volume.
 TrackingVolume (std::unique_ptr< Amg::Transform3D > htrans, std::shared_ptr< VolumeBounds > volbounds, const Material &matprop, std::unique_ptr< std::vector< DetachedTrackingVolume * > > detachedSubVolumes, const std::string &volumeName="undefined")
 Constructor for a full equipped Tracking Volume with detached subvolumes.
 TrackingVolume (const Volume &volume, const Material &matprop, std::unique_ptr< std::vector< DetachedTrackingVolume * > > detachedSubVolumes, const std::string &volumeName="undefined")
 Constructor for a full equipped Tracking Volume with detached subvolumes.
 TrackingVolume (std::unique_ptr< Amg::Transform3D > htrans, std::shared_ptr< VolumeBounds > volbounds, const Material &matprop, std::unique_ptr< const std::vector< TrackingVolume * > > unorderedSubVolumes, const std::string &volumeName="undefined")
 Constructor for a full equipped Tracking Volume with unordered subvolumes.
 TrackingVolume (const Volume &volume, const Material &matprop, std::unique_ptr< const std::vector< TrackingVolume * > > unorderedSubVolumes, const std::string &volumeName="undefined")
 Constructor for a full equipped Tracking Volume with unordered subvolumes.
 TrackingVolume (std::unique_ptr< Amg::Transform3D > htrans, std::shared_ptr< VolumeBounds > volbounds, const Material &matprop, std::unique_ptr< const std::vector< Layer * > > arbitraryLayers, const std::string &volumeName="undefined")
 Constructor for a full equipped Tracking Volume with arbitrary layers.
 TrackingVolume (const Volume &volume, const Material &matprop, std::unique_ptr< const std::vector< Layer * > > arbitraryLayers, const std::string &volumeName="undefined")
 Constructor for a full equipped Tracking Volume with arbitrary layers.
 TrackingVolume (std::unique_ptr< Amg::Transform3D > htrans, std::shared_ptr< VolumeBounds > volbounds, std::unique_ptr< const std::vector< Layer * > > arbitraryLayers, std::unique_ptr< const std::vector< TrackingVolume * > > unorderedSubVolumes, const Material &matprop, const std::string &volumeName="undefined")
 Constructor for a full equipped Tracking Volume with arbitrary layers AND subVolumes -.
 TrackingVolume (const Volume &volume, std::unique_ptr< const std::vector< Layer * > > arbitraryLayers, std::unique_ptr< const std::vector< TrackingVolume * > > unorderedSubVolumes, const Material &matprop, const std::string &volumeName="undefined")
 Constructor for a full equipped Tracking Volume with arbitrary layers AND subVolumes -.
 TrackingVolume (const TrackingVolume &trVol, Amg::Transform3D &transform)
 copy constructor with shift
virtual ~TrackingVolume () override
 Destructor.
const LayerassociatedLayer (const Amg::Vector3D &gp) const
 Return the associated Layer.
LayerassociatedLayer (const Amg::Vector3D &gp)
const LayernextLayer (const Amg::Vector3D &gp, const Amg::Vector3D &mom, bool asres=true, bool skipNavLayer=false) const
 Return the next Layer if existing, NULL if no next layer corresponds.
const LayerentryLayer (const Amg::Vector3D &gp, const Amg::Vector3D &dir) const
 Return the entry Layer to a TrackingVolume depending on the entry point.
const LayerexitLayer (const Amg::Vector3D &gp, const Amg::Vector3D &dir) const
 Return the exit Layer from a TrackingVolume.
template<class T>
std::vector< LayerIntersection< T > > materialLayersOrdered (const Layer *sLayer, const Layer *eLayer, const T &parameters, PropDirection pDir=alongMomentum, const BoundaryCheck &bchk=true, bool resolveSubSurfaces=false) const
 Return the material layers ordered based on straight line intersections:
LayerIntersection< Amg::Vector3DclosestMaterialLayer (const Amg::Vector3D &gp, const Amg::Vector3D &dir, PropDirection pDir=alongMomentum, const BoundaryCheck &bchk=true) const
 Return the closest layer with material description.
const TrackingVolumeassociatedSubVolume (const Amg::Vector3D &gp) const
 Return the associated sub Volume, returns THIS if no subVolume exists.
TrackingVolumeassociatedSubVolume (const Amg::Vector3D &gp)
const TrackingVolumenextVolume (const Amg::Vector3D &gp, const Amg::Vector3D &dir, PropDirection pDir=alongMomentum) const
 Return the next volume along the navigation stream.
const TrackingVolumenextSubVolume (const Amg::Vector3D &gp, const Amg::Vector3D &dir) const
 Return the next sub Volume if existing, returns THIS if no subVolume exists.
std::vector< const DetachedTrackingVolume * > assocDetachedSubVolumes (const Amg::Vector3D &gp, double tol) const
 Return the associated detached subvolumes.
unsigned int layerAttempts (BoundarySurfaceFace exitFace) const
 Layer attempts - as provided by the LayerAttemptCreator.
unsigned int maxLayerAttempts () const
 Layer attempts - as provided by the LayerAttemptCreator.
const LayerArrayconfinedLayers () const
 Return the subLayer array.
LayerArrayconfinedLayers ()
 Return the subLayer array.
ArraySpan< Layer const *const > confinedArbitraryLayers () const
 Return the confined subLayer array.
ArraySpan< Layer *const > confinedArbitraryLayers ()
 Return the confined subLayer array.
const LayerArraycheckoutConfinedLayers () const
 Return the subLayerarray including the ownership.
const TrackingVolumeArrayconfinedVolumes () const
 Return the subLayer array.
TrackingVolumeArrayconfinedVolumes ()
 Return the subLayer array.
ArraySpan< DetachedTrackingVolume const *const > confinedDetachedVolumes () const
 Return detached subVolumes - not the ownership.
ArraySpan< DetachedTrackingVolume *const > confinedDetachedVolumes ()
ArraySpan< TrackingVolume const *const > confinedDenseVolumes () const
 Return unordered subVolumes - not the ownership.
ArraySpan< TrackingVolume *const > confinedDenseVolumes ()
const std::string & volumeName () const
 Returns the VolumeName - for debug reason, might be depreciated later.
std::vector< std::shared_ptr< BoundarySurface< TrackingVolume > > > & boundarySurfaces ()
 Method to return the BoundarySurfaces.
ConstSharedPtrSpan< BoundarySurface< TrackingVolume > > boundarySurfaces () const
template<class T>
std::vector< BoundaryIntersection< T > > boundarySurfacesOrdered (const T &parameters, PropDirection pDir=alongMomentum, bool startOffBoundary=false) const
 Returns the boundary surfaces ordered in probability to hit them based on straight line intersection.
const BoundarySurface< TrackingVolume > * boundarySurface (const ObjectAccessor::value_type &oa) const
 Get the BoundarySurface to the appointed Accessor state.
template<class T>
bool onVolumeBoundary (const T &pars) const
 show if you are on a boundary surface
void registerOutsideGlueVolumes (GlueVolumesDescriptor *gvd)
 Register the outside glue volumes - ordering is in the TrackingVolume Frame:
GlueVolumesDescriptorglueVolumesDescriptor ()
const GlueVolumesDescriptorglueVolumesDescriptor () const
void sign (GeometrySignature signat, GeometryType gtype=Static)
 sign the volume - the geometry builder has to do that
GeometrySignature geometrySignature () const
 return the Signature
GeometryType geometryType () const
 return the Signature
void registerColorCode (unsigned int icolor)
 Register the color code.
unsigned int colorCode () const
 Get the color code.
const TrackingVolumegetMotherVolume () const
 Return the MotherVolume - if it exists.
void setMotherVolume (const TrackingVolume *mvol)
 set the MotherVolume
void moveVolume (Amg::Transform3D &shift)
 move Volume
void addMaterial (const Material &mat, float fact=1.)
 add Material
virtual bool isAlignable () const
void screenDump (MsgStream &msg) const
virtual Volumeclone () const
 polymorpic deep copy
const Amg::Transform3Dtransform () const
 Return methods for geometry transform.
const Amg::Vector3Dcenter () const
 returns the center of the volume
const VolumeBoundsvolumeBounds () const
 returns the volumeBounds()
VolumeBoundsvolumeBounds ()
bool inside (const Amg::Vector3D &gp, double tol=0.) const
 Inside() method for checks.
ObjectAccessor boundarySurfaceAccessor (const Amg::Vector3D &gp, const Amg::Vector3D &mom, bool forceInside=false) const
 Provide accessor for BoundarySurfaces.
std::unique_ptr< Materialscale (float sf) const
 scaling method
float zOverAtimesRho () const
 access to members
float x0 () const
float averageZ () const
std::string toString () const
 spit out as a string

Public Attributes

float X0
float L0
float A
float Z
float rho
float dEdX
float zOaTr
MaterialCompositioncomposition

Protected Attributes

std::unique_ptr< Amg::Transform3Dm_transform = nullptr
 Transform3D (optional)
Amg::Vector3D m_center = Trk::s_origin
 center position of the surface
std::shared_ptr< VolumeBoundsm_volumeBounds = nullptr
 the volumeBounds

Private Member Functions

void indexContainedStaticLayers (GeometrySignature geoSig, int &offset)
 reIndex the static layers of the TrackingVolume
void indexContainedMaterialLayers (GeometrySignature geoSig, int &offset)
 reIndex the material layers of the TrackingVolume
void createBoundarySurfaces ()
 Create Boundary Surface.
void createLayerAttemptsCalculator ()
 Create Layer Attempts Caluclator.
void compactify (size_t &rSurfaces, size_t &tSurfaces)
 compactify the memory usage in the event by setting ownership to TackingGeometry the referenced types are the number of registered surfaces & total surfaces
void synchronizeLayers (MsgStream &msgstream, double envelope=1.)
 method to synchronize the layers with potentially updated volume bounds:
void interlinkLayers ()
 Register Next - Previous for Layers, set volumelink.
void moveTV (Amg::Transform3D &transform)
 move the Tracking Volume
 TrackingVolume (const TrackingVolume &)=delete
 Forbidden copy constructor.
TrackingVolumeoperator= (const TrackingVolume &)=delete
 Forbid assignment.

Static Private Member Functions

static const Layerclosest (const Amg::Vector3D &pos, const Amg::Vector3D &dir, const Layer &first, const Layer &second)
 Helper method - find closest of two layers.

Private Attributes

const TrackingVolumem_motherVolume {nullptr}
 boundary Surfaces, they can be shared between volumes
std::vector< std::shared_ptr< BoundarySurface< TrackingVolume > > > m_boundarySurfaces {nullptr}
std::unique_ptr< LayerArraym_confinedLayers {nullptr}
 Array of Volumes inside the Volume.
std::unique_ptr< TrackingVolumeArraym_confinedVolumes {nullptr}
 Detached subvolumes.
std::unique_ptr< const std::vector< DetachedTrackingVolume * > > m_confinedDetachedVolumes {nullptr}
 Additionally, Unordered subvolumes (we own the elements)
std::unique_ptr< const std::vector< TrackingVolume * > > m_confinedDenseVolumes {nullptr}
 Additionally, Unordered Layers inside the Volume (we own the elements)
std::unique_ptr< const std::vector< Layer * > > m_confinedArbitraryLayers {nullptr}
CxxUtils::CachedUniquePtrT< GlueVolumesDescriptorm_outsideGlueVolumes {nullptr}
 provided the number of layer attempts
std::unique_ptr< LayerAttemptsCalculatorm_layerAttemptsCalculator {nullptr}
 defines how the Extrapolator propagates through this
GeometryType m_geometryType {Trk::NumberOfGeometryTypes}
 The Signature done by the GeometryBuilder.
GeometrySignature m_geometrySignature {Trk::Unsigned}
std::string m_name {"undefined"}
 Volume name for debug reasons.
unsigned int m_colorCode {20}
 Color code for displaying.

Friends

class TrackingVolumeManipulator
 The TrackingVolumeManipulator has to be a friend.
class TrackingGeometry
 Give the TrackingGeometry friend rights.
class DetachedTrackingVolume
 Give the DetachedTrackingVolume friend rights.

Detailed Description

Full Volume description used in Tracking, it inherits from Volume to get the geometrical structure, such as from MaterialProperties and from MagneticFieldProperties.

A TrackingVolume can provide the (layer) material information / internal

navigation with in 5 different ways:

    --- a) Static confinement of Layers
    --- b) detached sub volumes
    --- b) unordered (arbitrarily oriented) layers
    --- d) unordered sub volumes
    --- e) unordered layers AND unordered subvolumes

Static configurations can have a BendingCorrector that allows for correction of the path due to the bending of the track

    --- dedicated entry/exit layers can be defined for holding
        two perpenticular layers that are accessed in an entry/exit action

In addition it is capable of holding a subarray of Layers and TrackingVolumes, Layers and TrackingVolumes are then owned by the TrackingVolume holding them.

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 116 of file TrackingVolume.h.

Constructor & Destructor Documentation

◆ TrackingVolume() [1/14]

Trk::TrackingVolume::TrackingVolume ( )
default

Default Constructor.

◆ TrackingVolume() [2/14]

Trk::TrackingVolume::TrackingVolume ( std::unique_ptr< Amg::Transform3D > htrans,
std::shared_ptr< VolumeBounds > volbounds,
std::unique_ptr< LayerArray > subLayers = nullptr,
std::unique_ptr< TrackingVolumeArray > subVolumes = nullptr,
const std::string & volumeName = "undefined" )

Constructor for a full equipped Tracking Volume.

  • explicitely ======> 1 a) static confinement

Definition at line 50 of file TrackingVolume.cxx.

56 : Volume(std::move(htrans), std::move(volbounds))
57 , Material()
59 , m_confinedLayers(std::move(subLayers))
60 , m_confinedVolumes(std::move(subVolumes))
62{
66}
Material()
Default Constructor needed for POOL.
Definition Material.h:130
const std::string & volumeName() const
Returns the VolumeName - for debug reason, might be depreciated later.
std::unique_ptr< LayerArray > m_confinedLayers
Array of Volumes inside the Volume.
std::unique_ptr< TrackingVolumeArray > m_confinedVolumes
Detached subvolumes.
std::string m_name
Volume name for debug reasons.
void interlinkLayers()
Register Next - Previous for Layers, set volumelink.
std::vector< std::shared_ptr< BoundarySurface< TrackingVolume > > > m_boundarySurfaces
void createLayerAttemptsCalculator()
Create Layer Attempts Caluclator.
void createBoundarySurfaces()
Create Boundary Surface.
Volume()=default
Defaults copies are special due ot unique ptr data member.

◆ TrackingVolume() [3/14]

Trk::TrackingVolume::TrackingVolume ( const Volume & volume,
const Material & matprop,
std::unique_ptr< LayerArray > subLayers = nullptr,
std::unique_ptr< TrackingVolumeArray > subVolumes = nullptr,
const std::string & volumeName = "undefined" )

Constructor for a full equipped Tracking Volume.

  • full by inheritance ======> 2 a) static confinement

Definition at line 69 of file TrackingVolume.cxx.

74 : Volume(volume)
75 , Material(matprop)
76 , m_confinedLayers(std::move(subLayers))
77 , m_confinedVolumes(std::move(subVolumes))
79{
83}

◆ TrackingVolume() [4/14]

Trk::TrackingVolume::TrackingVolume ( std::unique_ptr< Amg::Transform3D > htrans,
std::shared_ptr< VolumeBounds > volbounds,
const Material & matprop,
std::unique_ptr< LayerArray > subLayers = nullptr,
std::unique_ptr< TrackingVolumeArray > subVolumes = nullptr,
const std::string & volumeName = "undefined" )

Constructor for a full equipped Tracking Volume.

  • mixed ======> 3 a) static confinement

Definition at line 86 of file TrackingVolume.cxx.

93 : Volume(std::move(htrans), std::move(volbounds))
94 , Material(matprop)
95 , m_confinedLayers(std::move(subLayers))
96 , m_confinedVolumes(std::move(subVolumes))
98{
102}

◆ TrackingVolume() [5/14]

Trk::TrackingVolume::TrackingVolume ( std::unique_ptr< Amg::Transform3D > htrans,
std::shared_ptr< VolumeBounds > volbounds,
const Material & matprop,
std::unique_ptr< std::vector< DetachedTrackingVolume * > > detachedSubVolumes,
const std::string & volumeName = "undefined" )

Constructor for a full equipped Tracking Volume with detached subvolumes.

  • mixed =======> 1 b) detached volumes

Definition at line 105 of file TrackingVolume.cxx.

111 : Volume(std::move(htrans), std::move(volbounds))
112 , Material(matprop)
113 , m_confinedDetachedVolumes(std::move(detachedSubVolumes))
115{
117}
std::unique_ptr< const std::vector< DetachedTrackingVolume * > > m_confinedDetachedVolumes
Additionally, Unordered subvolumes (we own the elements)

◆ TrackingVolume() [6/14]

Trk::TrackingVolume::TrackingVolume ( const Volume & volume,
const Material & matprop,
std::unique_ptr< std::vector< DetachedTrackingVolume * > > detachedSubVolumes,
const std::string & volumeName = "undefined" )

Constructor for a full equipped Tracking Volume with detached subvolumes.

  • mixed =======> 2 b) detached volumes

Definition at line 120 of file TrackingVolume.cxx.

125 : Volume(volume)
126 , Material(matprop)
127 , m_confinedDetachedVolumes(std::move(detachedSubVolumes))
129{
131}

◆ TrackingVolume() [7/14]

Trk::TrackingVolume::TrackingVolume ( std::unique_ptr< Amg::Transform3D > htrans,
std::shared_ptr< VolumeBounds > volbounds,
const Material & matprop,
std::unique_ptr< const std::vector< TrackingVolume * > > unorderedSubVolumes,
const std::string & volumeName = "undefined" )

Constructor for a full equipped Tracking Volume with unordered subvolumes.

  • mixed =======> 1 d) unordered volumes

Definition at line 134 of file TrackingVolume.cxx.

140 : Volume(std::move(htrans), std::move(volbounds))
141 , Material(matprop)
142 , m_confinedDenseVolumes(std::move(unorderedSubVolumes))
144{
146}
std::unique_ptr< const std::vector< TrackingVolume * > > m_confinedDenseVolumes
Additionally, Unordered Layers inside the Volume (we own the elements)

◆ TrackingVolume() [8/14]

Trk::TrackingVolume::TrackingVolume ( const Volume & volume,
const Material & matprop,
std::unique_ptr< const std::vector< TrackingVolume * > > unorderedSubVolumes,
const std::string & volumeName = "undefined" )

Constructor for a full equipped Tracking Volume with unordered subvolumes.

  • mixed =======> 2 d) unordered volumes

Definition at line 149 of file TrackingVolume.cxx.

154 : Volume(volume)
155 , Material(matprop)
156 , m_confinedDenseVolumes(std::move(unorderedSubVolumes))
158{
160}

◆ TrackingVolume() [9/14]

Trk::TrackingVolume::TrackingVolume ( std::unique_ptr< Amg::Transform3D > htrans,
std::shared_ptr< VolumeBounds > volbounds,
const Material & matprop,
std::unique_ptr< const std::vector< Layer * > > arbitraryLayers,
const std::string & volumeName = "undefined" )

Constructor for a full equipped Tracking Volume with arbitrary layers.

  • mixed =======> 1 c) arbitrarily oriented layers

Definition at line 163 of file TrackingVolume.cxx.

169 : Volume(std::move(htrans), std::move(volbounds))
170 , Material(matprop)
171 , m_confinedArbitraryLayers(std::move(layers))
173{
175}
std::unique_ptr< const std::vector< Layer * > > m_confinedArbitraryLayers

◆ TrackingVolume() [10/14]

Trk::TrackingVolume::TrackingVolume ( const Volume & volume,
const Material & matprop,
std::unique_ptr< const std::vector< Layer * > > arbitraryLayers,
const std::string & volumeName = "undefined" )

Constructor for a full equipped Tracking Volume with arbitrary layers.

  • mixed =======> 2 c) arbitrarily oriented layers

Definition at line 178 of file TrackingVolume.cxx.

182 : Volume(volume)
183 , Material(matprop)
184 , m_confinedArbitraryLayers(std::move(layers))
186{
188}

◆ TrackingVolume() [11/14]

Trk::TrackingVolume::TrackingVolume ( std::unique_ptr< Amg::Transform3D > htrans,
std::shared_ptr< VolumeBounds > volbounds,
std::unique_ptr< const std::vector< Layer * > > arbitraryLayers,
std::unique_ptr< const std::vector< TrackingVolume * > > unorderedSubVolumes,
const Material & matprop,
const std::string & volumeName = "undefined" )

Constructor for a full equipped Tracking Volume with arbitrary layers AND subVolumes -.

  • mixed =======> 1 e) unordered layers AND unordered subvolumes

Definition at line 191 of file TrackingVolume.cxx.

198 : Volume(std::move(htrans), std::move(volbounds))
199 , Material(matprop)
200 , m_confinedDenseVolumes(std::move(unorderedSubVolumes))
201 , m_confinedArbitraryLayers(std::move(layers))
203{
205}

◆ TrackingVolume() [12/14]

Trk::TrackingVolume::TrackingVolume ( const Volume & volume,
std::unique_ptr< const std::vector< Layer * > > arbitraryLayers,
std::unique_ptr< const std::vector< TrackingVolume * > > unorderedSubVolumes,
const Material & matprop,
const std::string & volumeName = "undefined" )

Constructor for a full equipped Tracking Volume with arbitrary layers AND subVolumes -.

  • mixed =======> 2 e) unordered layers AND unordered subvolumes

Definition at line 208 of file TrackingVolume.cxx.

214 : Volume(volume)
215 , Material(matprop)
216 , m_confinedDenseVolumes(std::move(unorderedSubVolumes))
217 , m_confinedArbitraryLayers(std::move(layers))
219{
221}

◆ TrackingVolume() [13/14]

Trk::TrackingVolume::TrackingVolume ( const TrackingVolume & trVol,
Amg::Transform3D & transform )

copy constructor with shift

Definition at line 223 of file TrackingVolume.cxx.

225 : Volume(trVol, transform)
226 , Material(trVol)
227 , m_motherVolume(trVol.m_motherVolume)
229 , m_name(trVol.m_name)
230 , m_colorCode(trVol.m_colorCode)
231{
232 // createBoundarySurfaces
233 m_boundarySurfaces.reserve(trVol.boundarySurfaces().size());
234 const Trk::TrackingVolume* in = nullptr;
235 const Trk::TrackingVolume* out = nullptr;
236 for (size_t ib = 0; ib < trVol.boundarySurfaces().size(); ib++) {
237 in = trVol.boundarySurfaces()[ib]->insideVolume() == &trVol ? this : nullptr;
238 out = in == nullptr ? this : nullptr;
239 const Trk::CylinderSurface* cyl =
240 dynamic_cast<const Trk::CylinderSurface*>(trVol.boundarySurfaces()[ib]);
241 const Trk::DiscSurface* dis =
242 dynamic_cast<const Trk::DiscSurface*>(trVol.boundarySurfaces()[ib]);
243 const Trk::PlaneSurface* pla =
244 dynamic_cast<const Trk::PlaneSurface*>(trVol.boundarySurfaces()[ib]);
245 const Trk::SubtractedCylinderSurface* scyl =
246 dynamic_cast<const Trk::SubtractedCylinderSurface*>(
247 trVol.boundarySurfaces()[ib]);
248 const Trk::SubtractedPlaneSurface* spla =
249 dynamic_cast<const Trk::SubtractedPlaneSurface*>(
250 trVol.boundarySurfaces()[ib]);
251 if (scyl) {
252 m_boundarySurfaces.push_back(
253 std::make_shared<Trk::BoundarySubtractedCylinderSurface<Trk::TrackingVolume>>(in, out, *scyl, transform));
254 } else if (spla) {
255 m_boundarySurfaces.push_back(
256 std::make_shared<Trk::BoundarySubtractedPlaneSurface<Trk::TrackingVolume>>(in, out, *spla, transform));
257 } else if (cyl) {
258 m_boundarySurfaces.push_back(
259 std::make_shared<Trk::BoundaryCylinderSurface<Trk::TrackingVolume>>(in, out, *cyl, transform));
260 } else if (dis) {
261 m_boundarySurfaces.push_back(
262 std::make_shared<Trk::BoundaryDiscSurface<Trk::TrackingVolume>>(in, out, *dis, transform));
263 } else if (pla) {
264 m_boundarySurfaces.push_back(
265 std::make_shared<Trk::BoundaryPlaneSurface<Trk::TrackingVolume>>(in, out, *pla, transform));
266 }
267 }
268
269 // confined layers
270 const Trk::BinnedArray<Trk::Layer>* confinedLayers = trVol.confinedLayers();
271 if (confinedLayers) {
272 std::span<Trk::Layer const* const> layers = confinedLayers->arrayObjects();
273 std::vector<std::shared_ptr<Trk::Layer>> layerOrder;
274 layerOrder.reserve(layers.size());
275 for (const auto *layer : layers) {
276 const Trk::PlaneLayer* lay = dynamic_cast<const Trk::PlaneLayer*>(layer);
277 if (lay) {
278 Trk::PlaneLayer* newlay = new Trk::PlaneLayer(*lay, transform);
279 layerOrder.push_back(std::shared_ptr<Trk::Layer>(newlay));
280 }
281 }
282 const Trk::NavBinnedArray1D<Trk::Layer>* confLays =
283 dynamic_cast<const Trk::NavBinnedArray1D<Trk::Layer>*>(confinedLayers);
284 if (confLays) {
285 m_confinedLayers = std::make_unique<Trk::NavBinnedArray1D<Trk::Layer>>(
286 *confLays,
287 std::vector<std::shared_ptr<Trk::Layer>>(layerOrder),
288 transform);
289 }
290 }
291
292 // confined 'unordered' layers
294 trVol.confinedArbitraryLayers();
295 if (!confinedArbitraryLayers.empty()) {
296 // clone & apply the transform
297 std::vector<Trk::Layer*> uLayers;
298 uLayers.reserve(confinedArbitraryLayers.size());
299 for (const auto *confinedArbitraryLayer : confinedArbitraryLayers) {
300 const Trk::SubtractedPlaneLayer* slayer =
301 dynamic_cast<const Trk::SubtractedPlaneLayer*>(
302 confinedArbitraryLayer);
303 const Trk::SubtractedCylinderLayer* sclayer =
304 dynamic_cast<const Trk::SubtractedCylinderLayer*>(
305 confinedArbitraryLayer);
306 const Trk::PlaneLayer* layer =
307 dynamic_cast<const Trk::PlaneLayer*>(confinedArbitraryLayer);
308 const Trk::CylinderLayer* clayer =
309 dynamic_cast<const Trk::CylinderLayer*>(confinedArbitraryLayer);
310
311 if (slayer) {
312 Trk::SubtractedPlaneLayer* lay = new Trk::SubtractedPlaneLayer(*slayer, transform);
313 uLayers.push_back(lay);
314 } else if (layer) {
315 Trk::PlaneLayer* lay = new Trk::PlaneLayer(*layer, transform);
316 uLayers.push_back(lay);
317 } else if (sclayer) {
318 Trk::SubtractedCylinderLayer* lay = new Trk::SubtractedCylinderLayer(*sclayer, transform);
319 uLayers.push_back(lay);
320 } else if (clayer) {
321 Trk::CylinderLayer* lay = new Trk::CylinderLayer(*clayer, transform);
322 uLayers.push_back(lay);
323 }
324 }
325 m_confinedArbitraryLayers = std::make_unique<std::vector<Trk::Layer*>>(uLayers);
326 }
327
328 // confined volumes
329 const Trk::BinnedArray<Trk::TrackingVolume>* confinedVolumes =
330 trVol.confinedVolumes();
331 if (confinedVolumes) {
332 // retrieve array objects and apply the transform
333 std::span<Trk::TrackingVolume const * const > volumes =
334 confinedVolumes->arrayObjects();
335 std::vector<std::shared_ptr<Trk::TrackingVolume>> volOrder;
336 volOrder.reserve(volumes.size());
337 for (const auto *volume : volumes) {
338 Trk::TrackingVolume* vol = new Trk::TrackingVolume(*volume, transform);
339 volOrder.push_back(std::shared_ptr<TrackingVolume>(vol));
340 }
341 const Trk::NavBinnedArray1D<Trk::TrackingVolume>* confVols =
342 dynamic_cast<const Trk::NavBinnedArray1D<Trk::TrackingVolume>*>(
344 if (confVols)
345 m_confinedVolumes = std::make_unique<Trk::NavBinnedArray1D<Trk::TrackingVolume>>(
346 *confVols,
347 std::vector<std::shared_ptr<Trk::TrackingVolume>>(volOrder),
348 transform);
349 }
350
351 // confined unordered volumes
353 trVol.confinedDenseVolumes();
354 if (!confinedDenseVolumes.empty()) {
355 std::vector<Trk::TrackingVolume*> newVol;
356 newVol.reserve(confinedDenseVolumes.size());
357 // retrieve array objects and apply the transform
358 for (const auto *confinedDenseVolume : confinedDenseVolumes) {
359 Trk::TrackingVolume* vol = new Trk::TrackingVolume(*confinedDenseVolume, transform);
360 newVol.push_back(vol);
361 }
362 m_confinedDenseVolumes = std::make_unique<const std::vector<Trk::TrackingVolume*>>(newVol);
363 }
364}
const LayerArray * confinedLayers() const
Return the subLayer array.
unsigned int m_colorCode
Color code for displaying.
const TrackingVolumeArray * confinedVolumes() const
Return the subLayer array.
std::vector< std::shared_ptr< BoundarySurface< TrackingVolume > > > & boundarySurfaces()
Method to return the BoundarySurfaces.
const TrackingVolume * m_motherVolume
boundary Surfaces, they can be shared between volumes
ArraySpan< Layer const *const > confinedArbitraryLayers() const
Return the confined subLayer array.
ArraySpan< TrackingVolume const *const > confinedDenseVolumes() const
Return unordered subVolumes - not the ownership.
const Amg::Transform3D & transform() const
Return methods for geometry transform.
Definition Volume.h:83
layers(flags, cells_name, *args, **kw)
Here we define wrapper functions to set up all of the standard corrections.
@ layer
Definition HitInfo.h:79
std::span< T > ArraySpan

◆ ~TrackingVolume()

Trk::TrackingVolume::~TrackingVolume ( )
overridevirtual

Destructor.

Definition at line 366 of file TrackingVolume.cxx.

367{
368 //We need to clean the elements we own from the vectors
370 for (auto * confinedDenseVolume : *m_confinedDenseVolumes){
371 delete confinedDenseVolume;
372 }
373 }
375 for (auto * confinedArbitraryLayer : *m_confinedArbitraryLayers){
376 delete confinedArbitraryLayer;
377 }
378 }
379}

◆ TrackingVolume() [14/14]

Trk::TrackingVolume::TrackingVolume ( const TrackingVolume & )
privatedelete

Forbidden copy constructor.

Member Function Documentation

◆ addMaterial()

void Trk::TrackingVolume::addMaterial ( const Material & mat,
float fact = 1. )

add Material

Definition at line 736 of file TrackingVolume.cxx.

737{
738 // assume the scaling factor refers to the volume scaling
739 float flin = pow(fact, 0.33);
740 // average X0
741 double invX0 = X0 > 0. ? 1. / X0 : 0.;
742 double sum_invX0 = invX0 + flin / mprop.X0;
743 X0 = 1. / sum_invX0;
744 // average L0
745 double invL0 = L0 > 0. ? 1. / L0 : 0.;
746 double sum_invL0 = invL0 + flin / mprop.L0;
747 L0 = 1. / sum_invL0;
748 // add density
749 float rho1 = rho;
750 rho += fact * mprop.rho;
751 // averageZ
752 float n1 = Z > 0. ? rho1 / Z : 0.;
753 float n2 = fact * mprop.rho / mprop.Z;
754 Z = rho / (n1 + n2);
755 // averageA
756 n1 = A > 0. ? rho1 / A : 0.;
757 n2 = fact * mprop.rho / mprop.A;
758 A = rho / (n1 + n2);
759 // zOverAtimesRho
760 zOaTr = Z / A * rho;
761 // mean energy loss (linear scaling)
762 dEdX += flin * mprop.dEdX;
763}
constexpr int pow(int base, int exp) noexcept

◆ assocDetachedSubVolumes()

std::vector< const Trk::DetachedTrackingVolume * > Trk::TrackingVolume::assocDetachedSubVolumes ( const Amg::Vector3D & gp,
double tol ) const

Return the associated detached subvolumes.

Definition at line 624 of file TrackingVolume.cxx.

626{
627 auto currVols = std::vector<const Trk::DetachedTrackingVolume*>();
628
631 if (!detVols.empty()) {
632 for (const auto *detVol : detVols) {
633 if (detVol->trackingVolume()->inside(gp, tol)){
634 currVols.push_back(detVol);
635 }
636 }
637 }
638 return currVols;
639}
ArraySpan< DetachedTrackingVolume const *const > confinedDetachedVolumes() const
Return detached subVolumes - not the ownership.

◆ associatedLayer() [1/2]

Trk::Layer * Trk::TrackingVolume::associatedLayer ( const Amg::Vector3D & gp)

Definition at line 400 of file TrackingVolume.cxx.

401{
402 // confined layers
403 if (m_confinedLayers){
404 return (confinedLayers()->object(gp));
405 }
406 // confined arbitrary
408 for (auto * confinedArbitraryLayer : *m_confinedArbitraryLayers){
409 if (confinedArbitraryLayer->isOnLayer(gp)){
410 return confinedArbitraryLayer;
411 }
412 }
413 }
414 return nullptr;
415}

◆ associatedLayer() [2/2]

const Trk::Layer * Trk::TrackingVolume::associatedLayer ( const Amg::Vector3D & gp) const

Return the associated Layer.

Definition at line 382 of file TrackingVolume.cxx.

383{
384 // confined layers
385 if (m_confinedLayers){
386 return (confinedLayers()->object(gp));
387 }
388 // confined arbitrary
390 for (auto* confinedArbitraryLayer : *m_confinedArbitraryLayers){
391 if (confinedArbitraryLayer->isOnLayer(gp)){
392 return confinedArbitraryLayer;
393 }
394 }
395 }
396 return nullptr;
397}

◆ associatedSubVolume() [1/2]

Trk::TrackingVolume * Trk::TrackingVolume::associatedSubVolume ( const Amg::Vector3D & gp)

Definition at line 556 of file TrackingVolume.cxx.

557{
559 return (m_confinedVolumes->object(gp));
560 }
561
563 for (auto *confinedDetachedVolume : *m_confinedDetachedVolumes) {
564 if (confinedDetachedVolume->trackingVolume()->inside(gp, 0.001)){
565 return confinedDetachedVolume->trackingVolume();
566 }
567 }
568 }
569
571 for (auto * confinedDenseVolume : *m_confinedDenseVolumes){
572 if (confinedDenseVolume->inside(gp, 0.001)){
573 return confinedDenseVolume;
574 }
575 }
576 }
577
578 return this;
579}

◆ associatedSubVolume() [2/2]

const Trk::TrackingVolume * Trk::TrackingVolume::associatedSubVolume ( const Amg::Vector3D & gp) const

Return the associated sub Volume, returns THIS if no subVolume exists.

Definition at line 530 of file TrackingVolume.cxx.

531{
533 return (m_confinedVolumes->object(gp));
534 }
535
537 for (auto *confinedDetachedVolume : *m_confinedDetachedVolumes) {
538 if (confinedDetachedVolume->trackingVolume()->inside(gp, 0.001)){
539 return confinedDetachedVolume->trackingVolume();
540 }
541 }
542 }
543
545 for (auto *confinedDenseVolume : *m_confinedDenseVolumes){
546 if (confinedDenseVolume->inside(gp, 0.001)){
547 return confinedDenseVolume;
548 }
549 }
550 }
551
552 return this;
553}

◆ averageZ()

float Trk::Material::averageZ ( ) const
inlineinherited

Definition at line 228 of file Material.h.

228{ return (*this).Z; }

◆ boundarySurface()

const Trk::BoundarySurface< Trk::TrackingVolume > * Trk::TrackingVolume::boundarySurface ( const ObjectAccessor::value_type & oa) const

Get the BoundarySurface to the appointed Accessor state.

Definition at line 822 of file TrackingVolume.cxx.

823{
824 return (std::as_const(m_boundarySurfaces)[oa]).get();
825}

◆ boundarySurfaceAccessor()

Trk::ObjectAccessor Trk::Volume::boundarySurfaceAccessor ( const Amg::Vector3D & gp,
const Amg::Vector3D & mom,
bool forceInside = false ) const
inherited

Provide accessor for BoundarySurfaces.

Definition at line 82 of file Volume.cxx.

86{
87 if (!m_transform) {
88 return Trk::ObjectAccessor(
89 volumeBounds().boundarySurfaceAccessor(gp, dir, forceInside));
90 }
91 return Trk::ObjectAccessor(volumeBounds().boundarySurfaceAccessor(
92 transform().inverse() * gp, dir, forceInside));
93}
VolumeBounds & volumeBounds()
Definition Volume.h:102
std::unique_ptr< Amg::Transform3D > m_transform
Transform3D (optional)
Definition Volume.h:78
ObjectAccessor boundarySurfaceAccessor(const Amg::Vector3D &gp, const Amg::Vector3D &mom, bool forceInside=false) const
Provide accessor for BoundarySurfaces.
Definition Volume.cxx:82

◆ boundarySurfaces() [1/2]

std::vector< std::shared_ptr< Trk::BoundarySurface< Trk::TrackingVolume > > > & Trk::TrackingVolume::boundarySurfaces ( )

Method to return the BoundarySurfaces.

Definition at line 809 of file TrackingVolume.cxx.

810{
811 return m_boundarySurfaces;
812}

◆ boundarySurfaces() [2/2]

Trk::ConstSharedPtrSpan< Trk::BoundarySurface< Trk::TrackingVolume > > Trk::TrackingVolume::boundarySurfaces ( ) const

Definition at line 815 of file TrackingVolume.cxx.

816{
817 return Trk::ConstSharedPtrSpan<Trk::BoundarySurface<Trk::TrackingVolume>>(
819}

◆ boundarySurfacesOrdered()

template<class T>
std::vector< BoundaryIntersection< T > > Trk::TrackingVolume::boundarySurfacesOrdered ( const T & parameters,
PropDirection pDir = alongMomentum,
bool startOffBoundary = false ) const

Returns the boundary surfaces ordered in probability to hit them based on straight line intersection.

◆ center()

const Amg::Vector3D & Trk::Volume::center ( ) const
inlineinherited

returns the center of the volume

Definition at line 90 of file Volume.h.

91 {
92 return m_center;
93 }
Amg::Vector3D m_center
center position of the surface
Definition Volume.h:79

◆ checkoutConfinedLayers()

const Trk::LayerArray * Trk::TrackingVolume::checkoutConfinedLayers ( ) const

Return the subLayerarray including the ownership.

Definition at line 1003 of file TrackingVolume.cxx.

1004{
1005 const Trk::LayerArray* checkoutLayers = m_confinedLayers.get();
1006 return checkoutLayers;
1007}
BinnedArray< Layer > LayerArray
simply for the eye

◆ clone()

Trk::Volume * Trk::Volume::clone ( ) const
virtualinherited

polymorpic deep copy

Definition at line 60 of file Volume.cxx.

61{
62 return new Trk::Volume(*this);
63}

◆ closest()

const Trk::Layer * Trk::TrackingVolume::closest ( const Amg::Vector3D & pos,
const Amg::Vector3D & dir,
const Layer & first,
const Layer & second )
staticprivate

Helper method - find closest of two layers.

Definition at line 1046 of file TrackingVolume.cxx.

1050{
1051 // use the distance solution for assigning the layer
1052 Trk::DistanceSolution distSolToPrevious =
1053 first.surfaceRepresentation().straightLineDistanceEstimate(pos, dir);
1054 Trk::DistanceSolution distSolToNext =
1055 second.surfaceRepresentation().straightLineDistanceEstimate(pos, dir);
1056 // find out which one
1057 return (distSolToPrevious.absClosest() < distSolToNext.absClosest()
1058 ? &first
1059 : &second);
1060}
double absClosest() const
Absolute Distance to closest solution.
bool first
Definition DeMoScan.py:534

◆ closestMaterialLayer()

Trk::LayerIntersection< Amg::Vector3D > Trk::TrackingVolume::closestMaterialLayer ( const Amg::Vector3D & gp,
const Amg::Vector3D & dir,
PropDirection pDir = alongMomentum,
const BoundaryCheck & bchk = true ) const

Return the closest layer with material description.

  • it assumes to be on lowest navigation level
  • does not step down to eventually confined TrackingVolumes
  • navigates to the next trackign volume IF PropDirection == mappingMode

Definition at line 445 of file TrackingVolume.cxx.

449{
450 // the layer candidates to check
451 std::vector<const Layer*> layerCandidates;
452
453 // ---------------- BOUNDARY LAYER SECTION (only for mapping) ----------
454 if (pDir == mappingMode) {
455 const auto& bSurfaces = boundarySurfaces();
456 for (size_t ib = 0; ib < bSurfaces.size(); ++ib) {
457 if (bSurfaces[ib]->surfaceRepresentation().materialLayer()){
458 layerCandidates.push_back(bSurfaces[ib]->surfaceRepresentation().materialLayer());
459 }
460 }
461 }
462 // ---------------- CONFINED LAYER SECTION --------------
463 if (m_confinedLayers) {
464 // the associated layer
465 const Trk::Layer* assocLayer = associatedLayer(gp);
466 const Trk::Layer* previousMatLayer = nullptr;
467 const Trk::Layer* nextMatLayer = nullptr;
468 // if the associated layer is a navigation layer - get the previous and next
469 // from this one
470 const Trk::NavigationLayer* navLayer =
471 dynamic_cast<const Trk::NavigationLayer*>(assocLayer);
472 if (navLayer) {
473 // get previous / next
474 previousMatLayer = navLayer->previousLayer();
475 nextMatLayer = navLayer->nextLayer();
476 if (previousMatLayer){
477 layerCandidates.push_back(previousMatLayer);
478 }
479 if (nextMatLayer){
480 layerCandidates.push_back(nextMatLayer);
481 }
482 } else{
483 layerCandidates.push_back(assocLayer);
484 }
485 }
486 // --- solve for the layer candidates ---------------------
487 //
488 Trk::Intersection laySurfIntersection(Amg::Vector3D(0., 0., 0.), 10e10, false);
489 // layer candidates found - continue
490 if (!layerCandidates.empty()) {
491 const Layer* cLayer = nullptr;
492 // iterate through and chose
493 for (auto& lcIter : layerCandidates) {
494 // only the forceFwd solution is possible here
495 bool forceDir = (pDir == alongMomentum || pDir == oppositeMomentum);
496 double dirScalor = (pDir == oppositeMomentum) ? -1. : 1.;
497 // get the intersection soltuion
498 Trk::Intersection sfI =
499 (*lcIter).surfaceRepresentation().straightLineIntersection(
500 gp, dirScalor * dir, forceDir, bchk);
501 if (sfI.valid &&
502 (sfI.pathLength * sfI.pathLength) <
503 (laySurfIntersection.pathLength * laySurfIntersection.pathLength)) {
504 laySurfIntersection = sfI;
505 cLayer = lcIter;
506 }
507 }
508 // now return the pair: in case of a valid intersection, or if no mapping
509 // mode is chosen
510 if (cLayer){
512 laySurfIntersection,
513 cLayer,
514 &(cLayer->surfaceRepresentation()),
515 nullptr,
516 pDir);
517 }
518 }
519 // mapping mode chosen, but no valid intersection yet
520 const Trk::TrackingVolume* nVolume = nextVolume(gp, dir, pDir);
521
522 // forward the next Volume solution or a 0 solution
523 return (nVolume && nVolume != this)
524 ? nVolume->closestMaterialLayer(gp, dir, pDir, bchk)
526 laySurfIntersection, nullptr, nullptr, nullptr, pDir);
527}
const Layer * previousLayer(bool skipNavLayer=false) const
getting what's stored to be the previous Layer, boolean to skip navigation layers
Definition Layer.cxx:141
const Layer * nextLayer(const Amg::Vector3D &gp, const Amg::Vector3D &udir) const
getting the next/previous Layer if registered - unit for direction vector required
Definition Layer.cxx:161
const TrackingVolume * nextVolume(const Amg::Vector3D &gp, const Amg::Vector3D &dir, PropDirection pDir=alongMomentum) const
Return the next volume along the navigation stream.
LayerIntersection< Amg::Vector3D > closestMaterialLayer(const Amg::Vector3D &gp, const Amg::Vector3D &dir, PropDirection pDir=alongMomentum, const BoundaryCheck &bchk=true) const
Return the closest layer with material description.
const Layer * associatedLayer(const Amg::Vector3D &gp) const
Return the associated Layer.
Eigen::Matrix< double, 3, 1 > Vector3D
@ oppositeMomentum
@ alongMomentum
@ mappingMode
FullIntersection< Layer, Surface, T > LayerIntersection

◆ colorCode()

unsigned int Trk::TrackingVolume::colorCode ( ) const

Get the color code.

◆ compactify()

void Trk::TrackingVolume::compactify ( size_t & rSurfaces,
size_t & tSurfaces )
private

compactify the memory usage in the event by setting ownership to TackingGeometry the referenced types are the number of registered surfaces & total surfaces

Definition at line 1131 of file TrackingVolume.cxx.

1132{
1133 // confined 'ordered' layers
1134 Trk::BinnedArray<Trk::Layer>* confLayers = confinedLayers();
1135 if (confLayers) {
1136 std::span<Trk::Layer* const> layers = confLayers->arrayObjects();
1137 for (const auto& clayIter : layers) {
1138 if (&(*clayIter) != nullptr){
1139 clayIter->compactify(cSurfaces, tSurfaces);
1140 }
1141 else{
1142 std::cout << "WARNING: Attempt to compactify nullptr layer in volume : "
1143 << volumeName() << std::endl;
1144 }
1145 }
1146 }
1147 // confined 'unordered' layers
1149 if (!confArbLayers.empty()) {
1150 for (const auto& calayIter : confArbLayers) {
1151 if (calayIter != nullptr) {
1152 calayIter->compactify(cSurfaces, tSurfaces);
1153 } else {
1154 std::cout << "WARNING: Attempt to compactify nullptr layer."
1155 << std::endl;
1156 }
1157 }
1158 }
1159 // confined volumes
1160 Trk::BinnedArray<Trk::TrackingVolume>* confVolumes = confinedVolumes();
1161 if (confVolumes) {
1162 std::span<Trk::TrackingVolume* const> volumes =
1163 confVolumes->arrayObjects();
1164 for (const auto& cVolumesIter : volumes) {
1165 cVolumesIter->compactify(cSurfaces, tSurfaces);
1166 }
1167 }
1168 // confined unordered volumes
1170 if (!confDenseVolumes.empty()){
1171 for (const auto& cVolumesIter : (confDenseVolumes)) {
1172 cVolumesIter->compactify(cSurfaces, tSurfaces);
1173 }
1174 }
1175
1176 // detached volumes if any
1178 for (const auto& cdVolumesIter : (*m_confinedDetachedVolumes)) {
1179 cdVolumesIter->compactify(cSurfaces, tSurfaces);
1180 }
1181 }
1182}
virtual std::span< T *const > arrayObjects()=0
Return all objects of the Array non-const we can still modify the T.

◆ confinedArbitraryLayers() [1/2]

ArraySpan< Layer *const > Trk::TrackingVolume::confinedArbitraryLayers ( )

Return the confined subLayer array.

Layers are not const

◆ confinedArbitraryLayers() [2/2]

ArraySpan< Layer const *const > Trk::TrackingVolume::confinedArbitraryLayers ( ) const

Return the confined subLayer array.

◆ confinedDenseVolumes() [1/2]

ArraySpan< TrackingVolume *const > Trk::TrackingVolume::confinedDenseVolumes ( )

◆ confinedDenseVolumes() [2/2]

ArraySpan< TrackingVolume const *const > Trk::TrackingVolume::confinedDenseVolumes ( ) const

Return unordered subVolumes - not the ownership.

◆ confinedDetachedVolumes() [1/2]

ArraySpan< DetachedTrackingVolume *const > Trk::TrackingVolume::confinedDetachedVolumes ( )

◆ confinedDetachedVolumes() [2/2]

ArraySpan< DetachedTrackingVolume const *const > Trk::TrackingVolume::confinedDetachedVolumes ( ) const

Return detached subVolumes - not the ownership.

◆ confinedLayers() [1/2]

LayerArray * Trk::TrackingVolume::confinedLayers ( )

Return the subLayer array.

◆ confinedLayers() [2/2]

const LayerArray * Trk::TrackingVolume::confinedLayers ( ) const

Return the subLayer array.

◆ confinedVolumes() [1/2]

TrackingVolumeArray * Trk::TrackingVolume::confinedVolumes ( )

Return the subLayer array.

◆ confinedVolumes() [2/2]

const TrackingVolumeArray * Trk::TrackingVolume::confinedVolumes ( ) const

Return the subLayer array.

◆ createBoundarySurfaces()

void Trk::TrackingVolume::createBoundarySurfaces ( )
private

Create Boundary Surface.

Definition at line 828 of file TrackingVolume.cxx.

829{
830 // prepare the BoundarySurfaces
832 std::vector<std::shared_ptr<Trk::BoundarySurface<Trk::TrackingVolume>>>();
833 // transform Surfaces To BoundarySurfaces
834 std::vector<std::unique_ptr<Trk::Surface>> surfaces =
836 auto surfIter = surfaces.begin();
837
838 // counter to flip the inner/outer position for Cylinders
839 unsigned int sfCounter = 0;
840 unsigned int sfNumber = surfaces.size();
841
842 // memory optimisation
843 m_boundarySurfaces.reserve(sfNumber + 1);
844
845 // identify Subtracted/CombinedVolumes
846 const Trk::SubtractedVolumeBounds* subtrVol =
847 dynamic_cast<const Trk::SubtractedVolumeBounds*>(
849 const Trk::CombinedVolumeBounds* combVol =
850 dynamic_cast<const Trk::CombinedVolumeBounds*>(
852 bool subtr = (subtrVol) ? 1 : 0;
853 bool comb = (combVol) ? 1 : 0;
854
855 if (!subtr && !comb) {
856 const Trk::SimplePolygonBrepVolumeBounds* spbVol =
857 dynamic_cast<const Trk::SimplePolygonBrepVolumeBounds*>(
859
860 for (; surfIter != surfaces.end(); ++surfIter) {
861 sfCounter++;
862
863 Trk::TrackingVolume* in = this;
864 Trk::TrackingVolume* out = nullptr;
865
866 // ST update: subtracted surfaces may appear in 'simple' volumes
867 // (SimplePolygonBrep...)
868 const Trk::SubtractedPlaneSurface* spsf =
869 dynamic_cast<const Trk::SubtractedPlaneSurface*>((*surfIter).get());
870 const Trk::PlaneSurface* psf =
871 dynamic_cast<const Trk::PlaneSurface*>((*surfIter).get());
872 if (spsf) {
873 if (spbVol && sfCounter == 1) {
874 in = nullptr;
875 out = this;
876 }
877 m_boundarySurfaces.push_back(
878 std::make_shared<Trk::BoundarySubtractedPlaneSurface<Trk::TrackingVolume>>(
879 in, out, *spsf));
880 continue;
881 }
882 if (psf) {
883 m_boundarySurfaces.push_back(
884 std::make_shared<Trk::BoundaryPlaneSurface<Trk::TrackingVolume>>(in, out, *psf));
885 continue;
886 }
887
888 const Trk::DiscSurface* dsf =
889 dynamic_cast<const Trk::DiscSurface*>((*surfIter).get());
890 if (dsf) {
891 m_boundarySurfaces.push_back(
892 std::make_shared<Trk::BoundaryDiscSurface<Trk::TrackingVolume>>(in, out, *dsf));
893 continue;
894 }
895
896 const Trk::SubtractedCylinderSurface* scsf =
897 dynamic_cast<const Trk::SubtractedCylinderSurface*>((*surfIter).get());
898 const Trk::CylinderSurface* csf =
899 dynamic_cast<const Trk::CylinderSurface*>((*surfIter).get());
900 if (scsf) {
901 Trk::TrackingVolume* inner =
902 (sfCounter == 4 && sfNumber > 3) ? nullptr : this;
903 Trk::TrackingVolume* outer = (inner) ? nullptr : this;
904 m_boundarySurfaces.push_back(
905 std::make_shared<Trk::BoundarySubtractedCylinderSurface<Trk::TrackingVolume>>(inner, outer, *scsf));
906 continue;
907 }
908 if (csf) {
909 Trk::TrackingVolume* inner =
910 (sfCounter == 4 && sfNumber > 3) ? nullptr : this;
911 Trk::TrackingVolume* outer = (inner) ? nullptr : this;
912 m_boundarySurfaces.push_back(
913 std::make_shared<Trk::BoundaryCylinderSurface<Trk::TrackingVolume>>(
914 inner, outer, *csf));
915 continue;
916 }
917 }
918
919 } else {
920 const std::vector<bool> bOrient =
921 subtrVol ? subtrVol->boundsOrientation() : combVol->boundsOrientation();
922
923 for (; surfIter != surfaces.end(); ++surfIter) {
924 Trk::TrackingVolume* in = bOrient[sfCounter] ? this : nullptr;
925 Trk::TrackingVolume* out = bOrient[sfCounter] ? nullptr : this;
926 sfCounter++;
927
928 const Trk::SubtractedPlaneSurface* psf =
929 dynamic_cast<const Trk::SubtractedPlaneSurface*>((*surfIter).get());
930 if (psf) {
931 m_boundarySurfaces.push_back(
932 std::make_shared<Trk::BoundarySubtractedPlaneSurface<Trk::TrackingVolume>>(
933 in, out, *psf));
934 continue;
935 }
936
937 const Trk::SubtractedCylinderSurface* csf =
938 dynamic_cast<const Trk::SubtractedCylinderSurface*>((*surfIter).get());
939 if (csf) {
940 m_boundarySurfaces.push_back(
941 std::make_shared<Trk::BoundarySubtractedCylinderSurface<Trk::TrackingVolume>>(
942 in, out, *csf));
943 continue;
944 }
945 }
946 }
947}
const std::vector< bool > & boundsOrientation() const
This method returns bounds orientation.
const std::vector< bool > & boundsOrientation() const
This method returns bounds orientation.
virtual std::vector< std::unique_ptr< Trk::Surface > > decomposeToSurfaces(const Amg::Transform3D &transform)=0
Method to decompose the Bounds into Surfaces, the Volume can turn them into BoundarySurfaces.
const VolumeBounds & volumeBounds() const
returns the volumeBounds()
Definition Volume.h:96

◆ createLayerAttemptsCalculator()

void Trk::TrackingVolume::createLayerAttemptsCalculator ( )
private

Create Layer Attempts Caluclator.

Definition at line 950 of file TrackingVolume.cxx.

951{
952 // check whether there's a static array
953 if (m_confinedLayers) {
954 // BinUtility
955 const Trk::BinUtility* binUtility = m_confinedLayers->binUtility();
956 if (binUtility) {
957 if (binUtility->binningValue() == Trk::binR){
958 m_layerAttemptsCalculator = std::make_unique<Trk::CylinderLayerAttemptsCalculator>(1, 5);
959 }
960 if (binUtility->binningValue() == Trk::binZ){
961 m_layerAttemptsCalculator = std::make_unique<Trk::DiscLayerAttemptsCalculator>(1, 5);
962 }
963 }
964 }
965}
BinningValue binningValue(size_t ba=0) const
The type/value of the binning.
Definition BinUtility.h:230
std::unique_ptr< LayerAttemptsCalculator > m_layerAttemptsCalculator
defines how the Extrapolator propagates through this
@ binR
Definition BinningType.h:50
@ binZ
Definition BinningType.h:49

◆ entryLayer()

const Layer * Trk::TrackingVolume::entryLayer ( const Amg::Vector3D & gp,
const Amg::Vector3D & dir ) const

Return the entry Layer to a TrackingVolume depending on the entry point.

◆ exitLayer()

const Layer * Trk::TrackingVolume::exitLayer ( const Amg::Vector3D & gp,
const Amg::Vector3D & dir ) const

Return the exit Layer from a TrackingVolume.

◆ geometrySignature()

GeometrySignature Trk::TrackingVolume::geometrySignature ( ) const

return the Signature

◆ geometryType()

GeometryType Trk::TrackingVolume::geometryType ( ) const

return the Signature

◆ getMotherVolume()

const TrackingVolume * Trk::TrackingVolume::getMotherVolume ( ) const

Return the MotherVolume - if it exists.

◆ glueVolumesDescriptor() [1/2]

Trk::GlueVolumesDescriptor & Trk::TrackingVolume::glueVolumesDescriptor ( )

Definition at line 1016 of file TrackingVolume.cxx.

1017{
1018 if (!m_outsideGlueVolumes) {
1019 m_outsideGlueVolumes.store(std::make_unique<Trk::GlueVolumesDescriptor>());
1020 }
1021 return (*m_outsideGlueVolumes);
1022}
CxxUtils::CachedUniquePtrT< GlueVolumesDescriptor > m_outsideGlueVolumes
provided the number of layer attempts

◆ glueVolumesDescriptor() [2/2]

const Trk::GlueVolumesDescriptor & Trk::TrackingVolume::glueVolumesDescriptor ( ) const

Definition at line 1025 of file TrackingVolume.cxx.

1026{
1027 if (!m_outsideGlueVolumes) {
1028 m_outsideGlueVolumes.set(std::make_unique<Trk::GlueVolumesDescriptor>());
1029 }
1030 return (*m_outsideGlueVolumes);
1031}

◆ indexContainedMaterialLayers()

void Trk::TrackingVolume::indexContainedMaterialLayers ( GeometrySignature geoSig,
int & offset )
private

reIndex the material layers of the TrackingVolume

Definition at line 689 of file TrackingVolume.cxx.

691{
692 // the offset gets increased internally
693 // the static layers first and check if they have surfaces with material
694 // layers that need index
695 if (m_confinedLayers) {
696 std::span<Trk::Layer * const> layers = confinedLayers()->arrayObjects();
697 for (Trk::Layer* layerIter : layers) {
698 // only index the material layers & only those that have not yet been
699 // singed
700 if (layerIter) {
701 Trk::SurfaceArray* surfArray = layerIter->surfaceArray();
702 if (surfArray) {
703 std::span<Trk::Surface * const> layerSurfaces = surfArray->arrayObjects();
704 // loop over the surfaces - there can be 0 entries
705 for (Trk::Surface* const laySurf : layerSurfaces) {
706 Trk::MaterialLayer* materialLayer = laySurf ? laySurf->materialLayer() : nullptr;
707 if (materialLayer && materialLayer->layerIndex().value() < 0) {
708 // sign only those with material properties - rest goes to 0
709 Trk::LayerIndex layIndex =
710 materialLayer->layerMaterialProperties()
711 ? Trk::LayerIndex(int(geoSig) *
713 (++offset))
714 : Trk::LayerIndex(0);
715 // now register the index
716 materialLayer->registerLayerIndex(layIndex);
717 }
718 }
719 }
720 }
721 }
722 }
723
724 // step down the hierarchy to the contained volumes and index those
725 // ------------------------
726 if (confinedVolumes()) {
727 std::span<Trk::TrackingVolume * const> volumes = confinedVolumes()->arrayObjects();
728 for (Trk::TrackingVolume* volumesIter : volumes) {
729 if (volumesIter)
730 volumesIter->indexContainedMaterialLayers(geoSig, offset);
731 }
732 }
733}
#define TRKDETDESCR_GEOMETRYSIGNATUREWEIGHT
Definition LayerIndex.h:19
int value() const
layerIndex expressed in an integer
Definition LayerIndex.h:71
const LayerMaterialProperties * layerMaterialProperties() const
getting the LayerMaterialProperties including full/pre/post update
void registerLayerIndex(const LayerIndex &lIdx)
const LayerIndex & layerIndex() const
get the layerIndex
LayerIndex
enum to classify the different layers in the muon spectrometer
BinnedArray< Surface > SurfaceArray
Definition Layer.h:40

◆ indexContainedStaticLayers()

void Trk::TrackingVolume::indexContainedStaticLayers ( GeometrySignature geoSig,
int & offset )
private

reIndex the static layers of the TrackingVolume

Definition at line 642 of file TrackingVolume.cxx.

644{
645 // the offset gets increased internally
646 // the static layers first
647 // ------------------------------------------------------------------
648 if (m_confinedLayers) {
649 std::span<Trk::Layer* const> layers = confinedLayers()->arrayObjects();
650 for (Trk::Layer* layerptr : layers) {
651 // only index the material layers & only those that have not yet been
652 // singed
653 if (layerptr && layerptr->layerIndex().value() < 0) {
654 // sign only those with material properties - rest goes to 0
655 Trk::LayerIndex layIndex =
656 layerptr->layerMaterialProperties()
657 ? Trk::LayerIndex(
658 int(geoSig) * TRKDETDESCR_GEOMETRYSIGNATUREWEIGHT + (++offset))
659 : Trk::LayerIndex(0);
660 // now register the index
661 layerptr->registerLayerIndex(layIndex);
662 }
663 }
664 }
665
666 // the boundary surface layer
667 auto& bSurfaces = boundarySurfaces();
668 for (const auto& bsIter : bSurfaces) {
669 Trk::MaterialLayer* mLayer = bsIter->surfaceRepresentation().materialLayer();
670 if (mLayer && mLayer->layerIndex().value() < 0.) {
671 Trk::LayerIndex layIndex = Trk::LayerIndex(
672 int(geoSig) * TRKDETDESCR_GEOMETRYSIGNATUREWEIGHT + (++offset));
673 mLayer->registerLayerIndex(layIndex);
674 }
675 }
676
677 // step down the hierarchy to the contained volumes and index those
678 // ------------------------
679 if (confinedVolumes()) {
680 std::span<Trk::TrackingVolume* const > volumes = confinedVolumes()->arrayObjects();
681 for (const auto& volumesIter : volumes) {
682 if (volumesIter)
683 volumesIter->indexContainedStaticLayers(geoSig, offset);
684 }
685 }
686}

◆ inside()

ATH_FLATTEN bool Trk::Volume::inside ( const Amg::Vector3D & gp,
double tol = 0. ) const
inherited

Inside() method for checks.

Definition at line 72 of file Volume.cxx.

73{
74 if (!m_transform) {
75 return (volumeBounds()).inside(gp, tol);
76 }
77 Amg::Vector3D posInVolFrame((transform().inverse()) * gp);
78 return (volumeBounds()).inside(posInVolFrame, tol);
79}

◆ interlinkLayers()

void Trk::TrackingVolume::interlinkLayers ( )
private

Register Next - Previous for Layers, set volumelink.

Definition at line 967 of file TrackingVolume.cxx.

968{
969 if (m_confinedLayers) {
970 std::span<Trk::Layer* const> layers = m_confinedLayers->arrayObjects();
971 // forward loop
972 const Trk::Layer* lastLayer = nullptr;
973 std::span<Trk::Layer* const>::iterator layerIter = layers.begin();
974 for (; layerIter != layers.end(); ++layerIter) {
975 if (*layerIter) {
976 // register the layers
977 (**layerIter).setBinUtility(confinedLayers()->binUtility()
978 ? confinedLayers()->binUtility()
979 : nullptr);
980 (**layerIter).setPreviousLayer(lastLayer);
981 // register the volume
982 (**layerIter).encloseTrackingVolume(*this);
983 }
984 lastLayer = (*layerIter);
985 }
986 // backward loop
987 lastLayer = nullptr;
988 layerIter = layers.end();
989 --layerIter;
990 for (;; --layerIter) {
991 if (*layerIter) {
992 (**layerIter).setNextLayer(lastLayer);
993 }
994 lastLayer = (*layerIter);
995 if (layerIter == layers.begin()) {
996 break;
997 }
998 }
999 }
1000}

◆ isAlignable()

virtual bool Trk::TrackingVolume::isAlignable ( ) const
virtual

Reimplemented in Trk::AlignableTrackingVolume.

◆ layerAttempts()

unsigned int Trk::TrackingVolume::layerAttempts ( BoundarySurfaceFace exitFace) const

Layer attempts - as provided by the LayerAttemptCreator.

◆ materialLayersOrdered()

template<class T>
std::vector< LayerIntersection< T > > Trk::TrackingVolume::materialLayersOrdered ( const Layer * sLayer,
const Layer * eLayer,
const T & parameters,
PropDirection pDir = alongMomentum,
const BoundaryCheck & bchk = true,
bool resolveSubSurfaces = false ) const

Return the material layers ordered based on straight line intersections:

  • startLayer and endLayer are included in the list

◆ maxLayerAttempts()

unsigned int Trk::TrackingVolume::maxLayerAttempts ( ) const

Layer attempts - as provided by the LayerAttemptCreator.

◆ moveTV()

void Trk::TrackingVolume::moveTV ( Amg::Transform3D & transform)
private

move the Tracking Volume

Definition at line 1063 of file TrackingVolume.cxx.

1064{
1065
1066 this->moveVolume(transform);
1067
1068 // confined 'ordered' layers
1069 Trk::BinnedArray<Trk::Layer>* confLayers = confinedLayers();
1070 if (confLayers)
1071 for (Trk::Layer* clayIter : confLayers->arrayObjects()){
1072 clayIter->moveLayer(transform);
1073 }
1074
1075 // confined 'unordered' layers
1076 Trk::ArraySpan<Trk::Layer* const> confArbLayers =
1078 if (!confArbLayers.empty()){
1079 for (Trk::Layer* calayIter : confArbLayers){
1080 calayIter->moveLayer(transform);
1081 }
1082 }
1083
1084 // confined volumes
1085 Trk::BinnedArray<Trk::TrackingVolume>* confVolumes = confinedVolumes();
1086 if (confVolumes){
1087 // retrieve array objects and apply the transform
1088 for (Trk::TrackingVolume* cVolumesIter : confVolumes->arrayObjects()){
1089 (cVolumesIter)->moveTV(transform);
1090 }
1091 }
1092
1093 // confined unordered volumes
1095 if (!confDenseVolumes.empty())
1096 // retrieve array objects and apply the transform
1097 for (Trk::TrackingVolume* cVolumesIter : confDenseVolumes){
1098 cVolumesIter->moveTV(transform);
1099 }
1100}
void moveTV(Amg::Transform3D &transform)
move the Tracking Volume
void moveVolume(Amg::Transform3D &shift)
move Volume

◆ moveVolume()

void Trk::TrackingVolume::moveVolume ( Amg::Transform3D & shift)

move Volume

Definition at line 1034 of file TrackingVolume.cxx.

1035{
1036 if (m_transform) {
1037 Amg::Transform3D transf = shift * (*m_transform);
1038 this->m_transform = std::make_unique<Amg::Transform3D>(transf);
1039 } else {
1040 this->m_transform = std::make_unique<Amg::Transform3D>(shift);
1041 }
1042 this->m_center = (m_transform->translation());
1043}
Eigen::Affine3d Transform3D

◆ nextLayer()

const Trk::Layer * Trk::TrackingVolume::nextLayer ( const Amg::Vector3D & gp,
const Amg::Vector3D & mom,
bool asres = true,
bool skipNavLayer = false ) const

Return the next Layer if existing, NULL if no next layer corresponds.

Definition at line 418 of file TrackingVolume.cxx.

422{
423 const Trk::Layer* nextLayer = nullptr;
424 if (m_confinedLayers){
425 nextLayer = (confinedLayers()->nextObject(gp, mom, associatedResult));
426 }
427 // forward it in this case
428 if (!skipNavLayer){
429 return nextLayer;
430 }
431 // if only material or layers
432 if (nextLayer &&
433 (nextLayer->layerMaterialProperties() || nextLayer->surfaceArray())){
434 return nextLayer;
435 }
436 // try to get the next layer that has either material or sub surfaces
437 while (nextLayer && (!(nextLayer->layerMaterialProperties()) &&
438 !(nextLayer->surfaceArray()))){
439 nextLayer = (confinedLayers()->nextObject(gp, mom, associatedResult));
440 }
441 return nextLayer;
442}
virtual T * nextObject(const Amg::Vector3D &gp, const Amg::Vector3D &mom, bool associatedResult=true) const =0
Returns the pointer to the templated class object from the BinnedArray, takes 3D position & direction...
const Layer * nextLayer(const Amg::Vector3D &gp, const Amg::Vector3D &mom, bool asres=true, bool skipNavLayer=false) const
Return the next Layer if existing, NULL if no next layer corresponds.

◆ nextSubVolume()

const Trk::TrackingVolume * Trk::TrackingVolume::nextSubVolume ( const Amg::Vector3D & gp,
const Amg::Vector3D & dir ) const

Return the next sub Volume if existing, returns THIS if no subVolume exists.

Definition at line 614 of file TrackingVolume.cxx.

616{
618 return (m_confinedVolumes->nextObject(gp, mom));
619 }
620 return this;
621}

◆ nextVolume()

const Trk::TrackingVolume * Trk::TrackingVolume::nextVolume ( const Amg::Vector3D & gp,
const Amg::Vector3D & dir,
Trk::PropDirection pDir = alongMomentum ) const

Return the next volume along the navigation stream.

Definition at line 583 of file TrackingVolume.cxx.

586{
587 // get the boundary surfaces & intersect them
588 const Trk::TrackingVolume* nVolume = nullptr;
589 // fix the direction once
590 bool forceDir = (pDir == Trk::alongMomentum || pDir == Trk::oppositeMomentum);
591 double dirScalor = (pDir == Trk::oppositeMomentum) ? -1. : 1.;
592 Amg::Vector3D cDir = dirScalor * dir;
593 double pathLength = 10e10;
594 // now loop through the and find the closest
595 const auto& bSurfaces = boundarySurfaces();
596 for (size_t ib = 0; ib < bSurfaces.size(); ++ib) {
597 // get the intersection soltuion
598 Trk::Intersection sfI =
599 bSurfaces[ib]->surfaceRepresentation().straightLineIntersection(
600 gp, cDir, forceDir, true);
601 if (sfI.valid &&
602 (sfI.pathLength * sfI.pathLength) < (pathLength * pathLength)) {
603 // assign the next Volume
604 Trk::PropDirection attachedDir =
606 pathLength = sfI.pathLength;
607 nVolume = bSurfaces[ib]->attachedVolume(gp, cDir, attachedDir);
608 }
609 }
610 return nVolume;
611}
PropDirection
PropDirection, enum for direction of the propagation.

◆ onVolumeBoundary()

template<class T>
bool Trk::TrackingVolume::onVolumeBoundary ( const T & pars) const

show if you are on a boundary surface

◆ operator=()

TrackingVolume & Trk::TrackingVolume::operator= ( const TrackingVolume & )
privatedelete

Forbid assignment.

mother volume of this volume view ptr

◆ registerColorCode()

void Trk::TrackingVolume::registerColorCode ( unsigned int icolor)

Register the color code.

◆ registerOutsideGlueVolumes()

void Trk::TrackingVolume::registerOutsideGlueVolumes ( Trk::GlueVolumesDescriptor * gvd)

Register the outside glue volumes - ordering is in the TrackingVolume Frame:

  • negativeFaceXY
  • (faces YZ, ZY, radial faces)
  • positiveFaceXY

Definition at line 1010 of file TrackingVolume.cxx.

1011{
1012 m_outsideGlueVolumes.store(std::unique_ptr<Trk::GlueVolumesDescriptor>(gvd));
1013}

◆ scale()

std::unique_ptr< Material > Trk::Material::scale ( float sf) const
inlineinherited

scaling method

Definition at line 240 of file Material.h.

240 {
241 // Tell clang to optimize assuming that FP exceptions can trap.
242 // Otherwise, it can vectorize the division, which can lead to
243 // spurious division-by-zero traps from unused vector lanes.
245 return std::make_unique<Material>(X0 / sf, L0 / sf, sf * A, sf * Z, sf * rho);
246}
#define CXXUTILS_TRAPPING_FP
Definition trapping_fp.h:24

◆ screenDump()

void Trk::TrackingVolume::screenDump ( MsgStream & msg) const

Definition at line 1185 of file TrackingVolume.cxx.

1186{
1187 msg << "[[ Trk::TrackingVolume ]] called: " << volumeName() << std::endl;
1188 msg << '\t' << '\t' << "# position (x,y,z) : " << center().x() << ", "
1189 << center().y() << ", " << center().z() << std::endl;
1190 msg << '\t' << '\t' << "# bounds : " << volumeBounds() << endmsg;
1191}
#define endmsg
const Amg::Vector3D & center() const
returns the center of the volume
Definition Volume.h:90
MsgStream & msg
Definition testRead.cxx:32

◆ setMotherVolume()

void Trk::TrackingVolume::setMotherVolume ( const TrackingVolume * mvol)

set the MotherVolume

◆ sign()

void Trk::TrackingVolume::sign ( GeometrySignature signat,
GeometryType gtype = Static )

sign the volume - the geometry builder has to do that

Definition at line 766 of file TrackingVolume.cxx.

768{
769 // never overwrite what is already signed, that's a crime
771 m_geometrySignature = geosign;
772 }
773 m_geometryType = geotype;
774
775 // confined volumes
776 Trk::BinnedArray<Trk::TrackingVolume>* confVolumes = confinedVolumes();
777 if (confVolumes) {
778 std::span<Trk::TrackingVolume* const> volumes =
779 confVolumes->arrayObjects();
780 for (const auto& volumesIter : volumes){
781 if (volumesIter){
782 volumesIter->sign(geosign, geotype);
783 }
784 }
785 }
786 // same procedure for the detached volumes
789 if (!confDetachedVolumes.empty()) {
790 for (const auto& volumesIter : confDetachedVolumes) {
791 if (volumesIter) {
792 volumesIter->sign(geosign, geotype);
793 }
794 }
795 }
796 // confined dense volumes
799 if (!confDenseVolumes.empty()) {
800 for (const auto& volumesIter : confDenseVolumes) {
801 if (volumesIter) {
802 volumesIter->sign(geosign, geotype);
803 }
804 }
805 }
806}
GeometryType m_geometryType
The Signature done by the GeometryBuilder.
GeometrySignature m_geometrySignature

◆ synchronizeLayers()

void Trk::TrackingVolume::synchronizeLayers ( MsgStream & msgstream,
double envelope = 1. )
private

method to synchronize the layers with potentially updated volume bounds:

  • adapts the layer dimensions to the new volumebounds + envelope
  • adapts entry layer position where necessary to the new volumebounds

Definition at line 1103 of file TrackingVolume.cxx.

1104{
1105 // case a : Layers exist
1106 Trk::BinnedArray<Trk::Layer>* confLayers = confinedLayers();
1107 if (confLayers) {
1108 for (Trk::Layer* clay : confLayers->arrayObjects())
1109 if (clay) {
1110 if (clay->surfaceRepresentation().type() ==
1112 !(center().isApprox(clay->surfaceRepresentation().center()))) {
1113 clay->resizeAndRepositionLayer(volumeBounds(), center(), envelope);
1114 } else {
1115 clay->resizeLayer(volumeBounds(), envelope);
1116 }
1117 } else
1118 msgstream << MSG::WARNING
1119 << " ---> found 0 pointer to layer in Volume [ "
1120 << volumeName() << " ], indicates problem." << endmsg;
1121 }
1122 // case b : container volume -> step down
1123 Trk::BinnedArray<Trk::TrackingVolume>* confVolumes = confinedVolumes();
1124 if (confVolumes) {
1125 for (const auto& cVolumesIter : confVolumes->arrayObjects())
1126 cVolumesIter->synchronizeLayers(msgstream, envelope);
1127 }
1128}

◆ toString()

std::string Trk::Material::toString ( ) const
inlineinherited

spit out as a string

Definition at line 231 of file Material.h.

231 {
232 std::ostringstream sout;
233 sout << std::setiosflags(std::ios::fixed) << std::setprecision(4);
234 sout << "(" << X0 << " | " << L0 << " | " << A << " | " << Z << " | " << rho
235 << ")";
236 return sout.str();
237 }

◆ transform()

const Amg::Transform3D & Trk::Volume::transform ( ) const
inlineinherited

Return methods for geometry transform.

Definition at line 83 of file Volume.h.

83 {
84 if (m_transform) {
85 return (*m_transform);
86 }
87 return Trk::s_idTransform;
88 }
static const Amg::Transform3D s_idTransform
idendity transformation

◆ volumeBounds() [1/2]

VolumeBounds & Trk::Volume::volumeBounds ( )
inlineinherited

Definition at line 102 of file Volume.h.

103 {
104 return *(m_volumeBounds.get());
105 }
std::shared_ptr< VolumeBounds > m_volumeBounds
the volumeBounds
Definition Volume.h:80

◆ volumeBounds() [2/2]

const VolumeBounds & Trk::Volume::volumeBounds ( ) const
inlineinherited

returns the volumeBounds()

Definition at line 96 of file Volume.h.

97 {
98 return *(m_volumeBounds.get());
99 }

◆ volumeName()

const std::string & Trk::TrackingVolume::volumeName ( ) const

Returns the VolumeName - for debug reason, might be depreciated later.

◆ x0()

float Trk::Material::x0 ( ) const
inlineinherited

Definition at line 227 of file Material.h.

227{ return (*this).X0; }

◆ zOverAtimesRho()

float Trk::Material::zOverAtimesRho ( ) const
inlineinherited

access to members

Definition at line 226 of file Material.h.

226{ return (*this).zOaTr; }

◆ DetachedTrackingVolume

friend class DetachedTrackingVolume
friend

Give the DetachedTrackingVolume friend rights.

Definition at line 128 of file TrackingVolume.h.

◆ TrackingGeometry

friend class TrackingGeometry
friend

Give the TrackingGeometry friend rights.

Definition at line 125 of file TrackingVolume.h.

◆ TrackingVolumeManipulator

friend class TrackingVolumeManipulator
friend

The TrackingVolumeManipulator has to be a friend.

Definition at line 122 of file TrackingVolume.h.

Member Data Documentation

◆ A

float Trk::Material::A
inherited

Definition at line 122 of file Material.h.

◆ composition

MaterialComposition* Trk::Material::composition
inherited

Definition at line 127 of file Material.h.

◆ dEdX

float Trk::Material::dEdX
inherited

Definition at line 125 of file Material.h.

◆ L0

float Trk::Material::L0
inherited

Definition at line 121 of file Material.h.

◆ m_boundarySurfaces

std::vector<std::shared_ptr<BoundarySurface<TrackingVolume> > > Trk::TrackingVolume::m_boundarySurfaces {nullptr}
private

Definition at line 438 of file TrackingVolume.h.

438{nullptr};

◆ m_center

Amg::Vector3D Trk::Volume::m_center = Trk::s_origin
protectedinherited

center position of the surface

Definition at line 79 of file Volume.h.

◆ m_colorCode

unsigned int Trk::TrackingVolume::m_colorCode {20}
private

Color code for displaying.

Definition at line 458 of file TrackingVolume.h.

458{20} ;

◆ m_confinedArbitraryLayers

std::unique_ptr<const std::vector<Layer*> > Trk::TrackingVolume::m_confinedArbitraryLayers {nullptr}
private

Definition at line 448 of file TrackingVolume.h.

448{nullptr};

◆ m_confinedDenseVolumes

std::unique_ptr<const std::vector<TrackingVolume*> > Trk::TrackingVolume::m_confinedDenseVolumes {nullptr}
private

Additionally, Unordered Layers inside the Volume (we own the elements)

Definition at line 446 of file TrackingVolume.h.

446{nullptr};

◆ m_confinedDetachedVolumes

std::unique_ptr<const std::vector<DetachedTrackingVolume*> > Trk::TrackingVolume::m_confinedDetachedVolumes {nullptr}
private

Additionally, Unordered subvolumes (we own the elements)

Definition at line 444 of file TrackingVolume.h.

444{nullptr};

◆ m_confinedLayers

std::unique_ptr<LayerArray> Trk::TrackingVolume::m_confinedLayers {nullptr}
private

Array of Volumes inside the Volume.

Definition at line 440 of file TrackingVolume.h.

440{nullptr};

◆ m_confinedVolumes

std::unique_ptr<TrackingVolumeArray> Trk::TrackingVolume::m_confinedVolumes {nullptr}
private

Detached subvolumes.

Note that we do not own the volumes/elements

Definition at line 442 of file TrackingVolume.h.

442{nullptr};

◆ m_geometrySignature

GeometrySignature Trk::TrackingVolume::m_geometrySignature {Trk::Unsigned}
private

Definition at line 456 of file TrackingVolume.h.

◆ m_geometryType

GeometryType Trk::TrackingVolume::m_geometryType {Trk::NumberOfGeometryTypes}
private

The Signature done by the GeometryBuilder.

Definition at line 454 of file TrackingVolume.h.

◆ m_layerAttemptsCalculator

std::unique_ptr<LayerAttemptsCalculator> Trk::TrackingVolume::m_layerAttemptsCalculator {nullptr}
private

defines how the Extrapolator propagates through this

Definition at line 452 of file TrackingVolume.h.

452{nullptr};

◆ m_motherVolume

const TrackingVolume* Trk::TrackingVolume::m_motherVolume {nullptr}
private

boundary Surfaces, they can be shared between volumes

Definition at line 436 of file TrackingVolume.h.

436{nullptr};

◆ m_name

std::string Trk::TrackingVolume::m_name {"undefined"}
private

Volume name for debug reasons.

Definition at line 457 of file TrackingVolume.h.

457{"undefined"};

◆ m_outsideGlueVolumes

CxxUtils::CachedUniquePtrT<GlueVolumesDescriptor> Trk::TrackingVolume::m_outsideGlueVolumes {nullptr}
private

provided the number of layer attempts

Definition at line 450 of file TrackingVolume.h.

450{nullptr};

◆ m_transform

std::unique_ptr<Amg::Transform3D> Trk::Volume::m_transform = nullptr
protectedinherited

Transform3D (optional)

Definition at line 78 of file Volume.h.

◆ m_volumeBounds

std::shared_ptr<VolumeBounds> Trk::Volume::m_volumeBounds = nullptr
protectedinherited

the volumeBounds

Definition at line 80 of file Volume.h.

◆ rho

float Trk::Material::rho
inherited

Definition at line 124 of file Material.h.

◆ X0

float Trk::Material::X0
inherited

Definition at line 120 of file Material.h.

◆ Z

float Trk::Material::Z
inherited

Definition at line 123 of file Material.h.

◆ zOaTr

float Trk::Material::zOaTr
inherited

Definition at line 126 of file Material.h.


The documentation for this class was generated from the following files: