ATLAS Offline Software
Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
Trk::AlignableTrackingVolume Class Reference

#include <AlignableTrackingVolume.h>

Inheritance diagram for Trk::AlignableTrackingVolume:
Collaboration diagram for Trk::AlignableTrackingVolume:

Public Member Functions

 AlignableTrackingVolume ()=default
 Default Constructor. More...
 
virtual ~AlignableTrackingVolume () override=default
 
 AlignableTrackingVolume (std::unique_ptr< Amg::Transform3D > htrans, std::shared_ptr< VolumeBounds > volbounds, const BinnedMaterial &matprop, int sampleID, const std::string &volumeName="undefined")
 Constructor. More...
 
const TrackingVolumealignedTrackingVolume () const
 returns the alignedTrackingVolume More...
 
int identify () const
 returns the id More...
 
const BinnedMaterialbinnedMaterial () const
 access to binned material More...
 
virtual bool isAlignable () const override final
 
const LayerassociatedLayer (const Amg::Vector3D &gp) const
 Return the associated Layer. More...
 
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. More...
 
const LayerentryLayer (const Amg::Vector3D &gp, const Amg::Vector3D &dir) const
 Return the entry Layer to a TrackingVolume depending on the entry point. More...
 
const LayerexitLayer (const Amg::Vector3D &gp, const Amg::Vector3D &dir) const
 Return the exit Layer from a TrackingVolume. More...
 
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: More...
 
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. More...
 
const TrackingVolumeassociatedSubVolume (const Amg::Vector3D &gp) const
 Return the associated sub Volume, returns THIS if no subVolume exists. More...
 
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. More...
 
const TrackingVolumenextSubVolume (const Amg::Vector3D &gp, const Amg::Vector3D &dir) const
 Return the next sub Volume if existing, returns THIS if no subVolume exists. More...
 
std::vector< const DetachedTrackingVolume * > assocDetachedSubVolumes (const Amg::Vector3D &gp, double tol) const
 Return the associated detached subvolumes. More...
 
unsigned int layerAttempts (BoundarySurfaceFace exitFace) const
 Layer attempts - as provided by the LayerAttemptCreator. More...
 
unsigned int maxLayerAttempts () const
 Layer attempts - as provided by the LayerAttemptCreator. More...
 
const LayerArrayconfinedLayers () const
 Return the subLayer array. More...
 
LayerArrayconfinedLayers ()
 Return the subLayer array. More...
 
ArraySpan< Layer const *constconfinedArbitraryLayers () const
 Return the confined subLayer array. More...
 
ArraySpan< Layer *constconfinedArbitraryLayers ()
 Return the confined subLayer array. More...
 
const LayerArraycheckoutConfinedLayers () const
 Return the subLayerarray including the ownership. More...
 
const TrackingVolumeArrayconfinedVolumes () const
 Return the subLayer array. More...
 
TrackingVolumeArrayconfinedVolumes ()
 Return the subLayer array. More...
 
ArraySpan< DetachedTrackingVolume const *constconfinedDetachedVolumes () const
 Return detached subVolumes - not the ownership. More...
 
ArraySpan< DetachedTrackingVolume *constconfinedDetachedVolumes ()
 
ArraySpan< TrackingVolume const *constconfinedDenseVolumes () const
 Return unordered subVolumes - not the ownership. More...
 
ArraySpan< TrackingVolume *constconfinedDenseVolumes ()
 
const std::string & volumeName () const
 Returns the VolumeName - for debug reason, might be depreciated later. More...
 
std::vector< std::shared_ptr< BoundarySurface< TrackingVolume > > > & boundarySurfaces ()
 Method to return the BoundarySurfaces. More...
 
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. More...
 
const BoundarySurface< TrackingVolume > * boundarySurface (const ObjectAccessor::value_type &oa) const
 Get the BoundarySurface to the appointed Accessor state. More...
 
template<class T >
bool onVolumeBoundary (const T &pars) const
 show if you are on a boundary surface More...
 
void registerOutsideGlueVolumes (GlueVolumesDescriptor *gvd)
 Register the outside glue volumes - ordering is in the TrackingVolume Frame: More...
 
GlueVolumesDescriptorglueVolumesDescriptor ()
 
const GlueVolumesDescriptorglueVolumesDescriptor () const
 
void sign (GeometrySignature signat, GeometryType gtype=Static)
 sign the volume - the geometry builder has to do that More...
 
GeometrySignature geometrySignature () const
 return the Signature More...
 
GeometryType geometryType () const
 return the Signature More...
 
void registerColorCode (unsigned int icolor)
 Register the color code. More...
 
unsigned int colorCode () const
 Get the color code. More...
 
const TrackingVolumegetMotherVolume () const
 Return the MotherVolume - if it exists. More...
 
void setMotherVolume (const TrackingVolume *mvol)
 set the MotherVolume More...
 
void moveVolume (Amg::Transform3D &shift)
 move Volume More...
 
void addMaterial (const Material &mat, float fact=1.)
 add Material More...
 
void screenDump (MsgStream &msg) const
 
virtual Volumeclone () const
 polymorpic deep copy More...
 
const Amg::Transform3Dtransform () const
 Return methods for geometry transform. More...
 
const Amg::Vector3Dcenter () const
 returns the center of the volume More...
 
const VolumeBoundsvolumeBounds () const
 returns the volumeBounds() More...
 
VolumeBoundsvolumeBounds ()
 
bool inside (const Amg::Vector3D &gp, double tol=0.) const
 Inside() method for checks. More...
 
ObjectAccessor boundarySurfaceAccessor (const Amg::Vector3D &gp, const Amg::Vector3D &mom, bool forceInside=false) const
 Provide accessor for BoundarySurfaces. More...
 
std::unique_ptr< Materialscale (float sf) const
 scaling method More...
 
float zOverAtimesRho () const
 access to members More...
 
float x0 () const
 
float averageZ () const
 
std::string toString () const
 spit out as a string More...
 

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) More...
 
Amg::Vector3D m_center = Trk::s_origin
 center position of the surface More...
 
std::shared_ptr< VolumeBoundsm_volumeBounds = nullptr
 the volumeBounds More...
 

Private Member Functions

void indexContainedStaticLayers (GeometrySignature geoSig, int &offset)
 reIndex the static layers of the TrackingVolume More...
 
void indexContainedMaterialLayers (GeometrySignature geoSig, int &offset)
 reIndex the material layers of the TrackingVolume More...
 
void createBoundarySurfaces ()
 Create Boundary Surface. More...
 
void createLayerAttemptsCalculator ()
 Create Layer Attempts Caluclator. More...
 
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 More...
 
void synchronizeLayers (MsgStream &msgstream, double envelope=1.)
 method to synchronize the layers with potentially updated volume bounds: More...
 
void interlinkLayers ()
 Register Next - Previous for Layers, set volumelink. More...
 
void moveTV (Amg::Transform3D &transform)
 move the Tracking Volume More...
 

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. More...
 

Private Attributes

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

Detailed Description

Base Class for a navigation object (active) in the Calo realm. Takes BinnedMaterial as an argument ( can be dummy )

Author
Sarka.nosp@m..Tod.nosp@m.orova.nosp@m.@cer.nosp@m.n.ch

Definition at line 36 of file AlignableTrackingVolume.h.

Constructor & Destructor Documentation

◆ AlignableTrackingVolume() [1/2]

Trk::AlignableTrackingVolume::AlignableTrackingVolume ( )
default

Default Constructor.

◆ ~AlignableTrackingVolume()

virtual Trk::AlignableTrackingVolume::~AlignableTrackingVolume ( )
overridevirtualdefault

◆ AlignableTrackingVolume() [2/2]

Trk::AlignableTrackingVolume::AlignableTrackingVolume ( std::unique_ptr< Amg::Transform3D htrans,
std::shared_ptr< VolumeBounds volbounds,
const BinnedMaterial matprop,
int  sampleID,
const std::string &  volumeName = "undefined" 
)

Constructor.

Definition at line 15 of file AlignableTrackingVolume.cxx.

21  : Trk::TrackingVolume(std::move(htrans), std::move(volbounds), matprop, nullptr, nullptr, volumeName),
22  m_binnedMaterial(matprop),
23  m_sampleID(sampleID){}

Member Function Documentation

◆ addMaterial()

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

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 }

◆ alignedTrackingVolume()

const TrackingVolume* Trk::AlignableTrackingVolume::alignedTrackingVolume ( ) const

returns the alignedTrackingVolume

◆ assocDetachedSubVolumes()

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

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 }

◆ associatedLayer() [1/2]

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

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
inherited

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)
inherited

Definition at line 556 of file TrackingVolume.cxx.

557 {
558  if (m_confinedVolumes){
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
inherited

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

Definition at line 530 of file TrackingVolume.cxx.

531 {
532  if (m_confinedVolumes){
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; }

◆ binnedMaterial()

const BinnedMaterial * Trk::AlignableTrackingVolume::binnedMaterial ( ) const
inline

access to binned material

Definition at line 68 of file AlignableTrackingVolume.h.

68  {
69  return &m_binnedMaterial;
70 }

◆ boundarySurface()

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

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  }
92  transform().inverse() * gp, dir, forceInside));
93 }

◆ boundarySurfaces() [1/2]

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

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
inherited

Definition at line 815 of file TrackingVolume.cxx.

◆ boundarySurfacesOrdered()

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

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  }

◆ checkoutConfinedLayers()

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

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 }

◆ 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 
)
staticprivateinherited

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 }

◆ closestMaterialLayer()

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

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 }

◆ colorCode()

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

Get the color code.

◆ compactify()

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

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
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
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 }

◆ confinedArbitraryLayers() [1/2]

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

Return the confined subLayer array.

Layers are not const

◆ confinedArbitraryLayers() [2/2]

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

Return the confined subLayer array.

◆ confinedDenseVolumes() [1/2]

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

◆ confinedDenseVolumes() [2/2]

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

Return unordered subVolumes - not the ownership.

◆ confinedDetachedVolumes() [1/2]

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

◆ confinedDetachedVolumes() [2/2]

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

Return detached subVolumes - not the ownership.

◆ confinedLayers() [1/2]

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

Return the subLayer array.

◆ confinedLayers() [2/2]

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

Return the subLayer array.

◆ confinedVolumes() [1/2]

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

Return the subLayer array.

◆ confinedVolumes() [2/2]

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

Return the subLayer array.

◆ createBoundarySurfaces()

void Trk::TrackingVolume::createBoundarySurfaces ( )
privateinherited

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(
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(
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(
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(
942  in, out, *csf));
943  continue;
944  }
945  }
946  }
947 }

◆ createLayerAttemptsCalculator()

void Trk::TrackingVolume::createLayerAttemptsCalculator ( )
privateinherited

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 }

◆ entryLayer()

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

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
inherited

Return the exit Layer from a TrackingVolume.

◆ geometrySignature()

GeometrySignature Trk::TrackingVolume::geometrySignature ( ) const
inherited

return the Signature

◆ geometryType()

GeometryType Trk::TrackingVolume::geometryType ( ) const
inherited

return the Signature

◆ getMotherVolume()

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

Return the MotherVolume - if it exists.

◆ glueVolumesDescriptor() [1/2]

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

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 }

◆ glueVolumesDescriptor() [2/2]

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

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 }

◆ identify()

int Trk::AlignableTrackingVolume::identify ( ) const
inline

returns the id

Definition at line 64 of file AlignableTrackingVolume.h.

64  {
65  return m_sampleID;
66 }

◆ indexContainedMaterialLayers()

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

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 }

◆ indexContainedStaticLayers()

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

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) {
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 ( )
privateinherited

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;
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()

bool Trk::AlignableTrackingVolume::isAlignable ( ) const
inlinefinaloverridevirtual

Reimplemented from Trk::TrackingVolume.

Definition at line 72 of file AlignableTrackingVolume.h.

72  {
73  return true;
74 }

◆ layerAttempts()

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

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
inherited

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
inherited

Layer attempts - as provided by the LayerAttemptCreator.

◆ moveTV()

void Trk::TrackingVolume::moveTV ( Amg::Transform3D transform)
privateinherited

move the Tracking Volume

Definition at line 1063 of file TrackingVolume.cxx.

1064 {
1065 
1066  this->moveVolume(transform);
1067 
1068  // confined 'ordered' layers
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
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 }

◆ moveVolume()

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

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 }

◆ nextLayer()

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

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 &&
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 }

◆ nextSubVolume()

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

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

Definition at line 614 of file TrackingVolume.cxx.

616 {
617  if (m_confinedVolumes){
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
inherited

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 }

◆ onVolumeBoundary()

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

show if you are on a boundary surface

◆ registerColorCode()

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

Register the color code.

◆ registerOutsideGlueVolumes()

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

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 }

◆ screenDump()

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

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 }

◆ setMotherVolume()

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

set the MotherVolume

◆ sign()

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

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
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 }

◆ synchronizeLayers()

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

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
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
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  }

◆ volumeBounds() [1/2]

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

Definition at line 102 of file Volume.h.

103  {
104  return *(m_volumeBounds.get());
105  }

◆ 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
inherited

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; }

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_alignment

std::unique_ptr<Amg::Transform3D> Trk::AlignableTrackingVolume::m_alignment = nullptr
private

Definition at line 59 of file AlignableTrackingVolume.h.

◆ m_binnedMaterial

const BinnedMaterial Trk::AlignableTrackingVolume::m_binnedMaterial {}
private

Definition at line 60 of file AlignableTrackingVolume.h.

◆ m_boundarySurfaces

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

Definition at line 438 of file TrackingVolume.h.

◆ 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}
privateinherited

Color code for displaying.

Definition at line 458 of file TrackingVolume.h.

◆ m_confinedArbitraryLayers

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

Definition at line 448 of file TrackingVolume.h.

◆ m_confinedDenseVolumes

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

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

Definition at line 446 of file TrackingVolume.h.

◆ m_confinedDetachedVolumes

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

Additionally, Unordered subvolumes (we own the elements)

Definition at line 444 of file TrackingVolume.h.

◆ m_confinedLayers

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

Array of Volumes inside the Volume.

Definition at line 440 of file TrackingVolume.h.

◆ m_confinedVolumes

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

Detached subvolumes.

Note that we do not own the volumes/elements

Definition at line 442 of file TrackingVolume.h.

◆ m_geometrySignature

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

Definition at line 456 of file TrackingVolume.h.

◆ m_geometryType

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

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}
privateinherited

defines how the Extrapolator propagates through this

Definition at line 452 of file TrackingVolume.h.

◆ m_motherVolume

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

boundary Surfaces, they can be shared between volumes

Definition at line 436 of file TrackingVolume.h.

◆ m_name

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

Volume name for debug reasons.

Definition at line 457 of file TrackingVolume.h.

◆ m_outsideGlueVolumes

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

provided the number of layer attempts

Definition at line 450 of file TrackingVolume.h.

◆ m_sampleID

int Trk::AlignableTrackingVolume::m_sampleID {}
private

Definition at line 61 of file AlignableTrackingVolume.h.

◆ 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:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Muon::MuonStationIndex::LayerIndex
LayerIndex
enum to classify the different layers in the muon spectrometer
Definition: MuonStationIndex.h:38
CXXUTILS_TRAPPING_FP
#define CXXUTILS_TRAPPING_FP
Definition: trapping_fp.h:24
Trk::Surface::materialLayer
const Trk::MaterialLayer * materialLayer() const
return the material Layer
Trk::TrackingVolume::m_confinedDetachedVolumes
std::unique_ptr< const std::vector< DetachedTrackingVolume * > > m_confinedDetachedVolumes
Additionally, Unordered subvolumes (we own the elements)
Definition: TrackingVolume.h:444
Trk::SubtractedVolumeBounds::boundsOrientation
const std::vector< bool > & boundsOrientation() const
This method returns bounds orientation.
Definition: SubtractedVolumeBounds.h:122
Trk::TrackingVolume::nextLayer
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.
Definition: TrackingVolume.cxx:418
Trk::Intersection
Definition: Intersection.h:24
Trk::VolumeBounds::decomposeToSurfaces
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.
Trk::TrackingVolume::moveVolume
void moveVolume(Amg::Transform3D &shift)
move Volume
Definition: TrackingVolume.cxx:1034
Trk::BoundarySubtractedCylinderSurface
Definition: BoundarySubtractedCylinderSurface.h:38
Trk::Material::L0
float L0
Definition: Material.h:121
Trk::SimplePolygonBrepVolumeBounds
Definition: SimplePolygonBrepVolumeBounds.h:44
Trk::SubtractedCylinderSurface
Definition: SubtractedCylinderSurface.h:33
Trk::DistanceSolution
Definition: DistanceSolution.h:25
Trk::TrackingVolume::closestMaterialLayer
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.
Definition: TrackingVolume.cxx:445
Trk::binZ
@ binZ
Definition: BinningType.h:49
Trk::oppositeMomentum
@ oppositeMomentum
Definition: PropDirection.h:21
Trk::Material::Z
float Z
Definition: Material.h:123
Trk::BinnedArray::nextObject
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...
Trk::Volume::m_volumeBounds
std::shared_ptr< VolumeBounds > m_volumeBounds
the volumeBounds
Definition: Volume.h:80
Trk::Intersection::pathLength
double pathLength
Definition: Intersection.h:26
module_driven_slicing.layers
layers
Definition: module_driven_slicing.py:113
python.SystemOfUnits.second
float second
Definition: SystemOfUnits.py:135
Trk::NavigationLayer
Definition: NavigationLayer.h:41
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:70
PlotCalibFromCool.ib
ib
Definition: PlotCalibFromCool.py:419
Trk::TrackingVolume::confinedDetachedVolumes
ArraySpan< DetachedTrackingVolume const *const > confinedDetachedVolumes() const
Return detached subVolumes - not the ownership.
Trk::TrackingVolume::m_boundarySurfaces
std::vector< std::shared_ptr< BoundarySurface< TrackingVolume > > > m_boundarySurfaces
Definition: TrackingVolume.h:438
Trk::alongMomentum
@ alongMomentum
Definition: PropDirection.h:20
Trk::TrackingVolume::m_confinedDenseVolumes
std::unique_ptr< const std::vector< TrackingVolume * > > m_confinedDenseVolumes
Additionally, Unordered Layers inside the Volume (we own the elements)
Definition: TrackingVolume.h:446
Trk::DiscSurface
Definition: DiscSurface.h:54
Trk::MaterialLayer::surfaceRepresentation
virtual const Surface & surfaceRepresentation() const override=0
Transforms the layer into a Surface representation for extrapolation.
Trk::TrackingVolume::m_confinedLayers
std::unique_ptr< LayerArray > m_confinedLayers
Array of Volumes inside the Volume.
Definition: TrackingVolume.h:440
Trk::TrackingVolume::m_confinedArbitraryLayers
std::unique_ptr< const std::vector< Layer * > > m_confinedArbitraryLayers
Definition: TrackingVolume.h:448
Trk::TrackingVolume::m_confinedVolumes
std::unique_ptr< TrackingVolumeArray > m_confinedVolumes
Detached subvolumes.
Definition: TrackingVolume.h:442
python.RingerConstants.Layer
Layer
Definition: RingerConstants.py:42
Trk::BoundaryPlaneSurface
Definition: BoundaryPlaneSurface.h:37
Trk::CombinedVolumeBounds::boundsOrientation
const std::vector< bool > & boundsOrientation() const
This method returns bounds orientation.
Definition: CombinedVolumeBounds.h:136
TRKDETDESCR_GEOMETRYSIGNATUREWEIGHT
#define TRKDETDESCR_GEOMETRYSIGNATUREWEIGHT
Definition: LayerIndex.h:19
Trk::AlignableTrackingVolume::m_binnedMaterial
const BinnedMaterial m_binnedMaterial
Definition: AlignableTrackingVolume.h:60
Trk::TrackingVolume::confinedLayers
const LayerArray * confinedLayers() const
Return the subLayer array.
Trk::Layer::surfaceArray
const SurfaceArray * surfaceArray() const
Return the entire SurfaceArray, returns nullptr if no SurfaceArray.
Trk::PropDirection
PropDirection
Definition: PropDirection.h:19
Trk::BoundaryDiscSurface
Definition: BoundaryDiscSurface.h:39
A
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
Trk::BoundarySubtractedPlaneSurface
Definition: BoundarySubtractedPlaneSurface.h:38
Trk::SubtractedPlaneSurface
Definition: SubtractedPlaneSurface.h:32
Trk::LayerIndex
Definition: LayerIndex.h:37
Trk::Material::A
float A
Definition: Material.h:122
Trk::ArraySpan
std::span< T > ArraySpan
Definition: TrackingVolume.h:59
Trk::TrackingVolume::confinedArbitraryLayers
ArraySpan< Layer const *const > confinedArbitraryLayers() const
Return the confined subLayer array.
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
MuonR4::inverse
CalibratedSpacePoint::Covariance_t inverse(const CalibratedSpacePoint::Covariance_t &mat)
Inverts the parsed matrix.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/UtilFunctions.cxx:65
Trk::CylinderSurface
Definition: CylinderSurface.h:55
Trk::TrackingVolume::confinedDenseVolumes
ArraySpan< TrackingVolume const *const > confinedDenseVolumes() const
Return unordered subVolumes - not the ownership.
Trk::TrackingVolume::m_geometrySignature
GeometrySignature m_geometrySignature
Definition: TrackingVolume.h:456
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Trk::Layer::nextLayer
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
Trk::Volume::center
const Amg::Vector3D & center() const
returns the center of the volume
Definition: Volume.h:90
Trk::TrackingVolume::boundarySurfaces
std::vector< std::shared_ptr< BoundarySurface< TrackingVolume > > > & boundarySurfaces()
Method to return the BoundarySurfaces.
Definition: TrackingVolume.cxx:809
Trk::LayerIndex::value
int value() const
layerIndex expressed in an integer
Definition: LayerIndex.h:71
Trk::Unsigned
@ Unsigned
Definition: GeometrySignature.h:33
Trk::BinnedArray::arrayObjects
virtual std::span< T *const > arrayObjects()=0
Return all objects of the Array non-const we can still modify the T.
Trk::Volume::boundarySurfaceAccessor
ObjectAccessor boundarySurfaceAccessor(const Amg::Vector3D &gp, const Amg::Vector3D &mom, bool forceInside=false) const
Provide accessor for BoundarySurfaces.
Definition: Volume.cxx:82
Trk::BinUtility::binningValue
BinningValue binningValue(size_t ba=0) const
The type/value of the binning.
Definition: BinUtility.h:230
Trk::Material::X0
float X0
Definition: Material.h:120
beamspotman.dir
string dir
Definition: beamspotman.py:621
Trk::BinUtility
Definition: BinUtility.h:39
Trk::ConstSharedPtrSpan
Definition: TrackingVolume.h:65
Trk::Layer::registerLayerIndex
void registerLayerIndex(const LayerIndex &lIdx)
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::TrackingVolume::volumeName
const std::string & volumeName() const
Returns the VolumeName - for debug reason, might be depreciated later.
Trk::DistanceSolution::absClosest
double absClosest() const
Absolute Distance to closest solution.
Trk::TrackingVolume::moveTV
void moveTV(Amg::Transform3D &transform)
move the Tracking Volume
Definition: TrackingVolume.cxx:1063
Trk::Volume::transform
const Amg::Transform3D & transform() const
Return methods for geometry transform.
Definition: Volume.h:83
Trk::TrackingVolume::m_geometryType
GeometryType m_geometryType
The Signature done by the GeometryBuilder.
Definition: TrackingVolume.h:454
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::Intersection::valid
bool valid
Definition: Intersection.h:28
Trk::Material::rho
float rho
Definition: Material.h:124
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:16
Trk::BoundaryCylinderSurface
Definition: BoundaryCylinderSurface.h:37
Trk::ObjectAccessor
Definition: ObjectAccessor.h:15
Rtt_histogram.n1
n1
Definition: Rtt_histogram.py:21
Trk::binR
@ binR
Definition: BinningType.h:50
mapkey::sf
@ sf
Definition: TElectronEfficiencyCorrectionTool.cxx:38
Trk::PlaneSurface
Definition: PlaneSurface.h:64
Trk::TrackingVolume::nextVolume
const TrackingVolume * nextVolume(const Amg::Vector3D &gp, const Amg::Vector3D &dir, PropDirection pDir=alongMomentum) const
Return the next volume along the navigation stream.
Definition: TrackingVolume.cxx:583
Trk::TrackingVolume::confinedVolumes
const TrackingVolumeArray * confinedVolumes() const
Return the subLayer array.
Trk::Layer::previousLayer
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
DeMoScan.first
bool first
Definition: DeMoScan.py:534
Trk::SubtractedVolumeBounds
Definition: SubtractedVolumeBounds.h:40
Trk::Volume::volumeBounds
const VolumeBounds & volumeBounds() const
returns the volumeBounds()
Definition: Volume.h:96
Trk::SurfaceType::Cylinder
@ Cylinder
Trk::Layer::layerMaterialProperties
const LayerMaterialProperties * layerMaterialProperties() const
getting the LayerMaterialProperties including full/pre/post update
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
Trk::TrackingVolume::m_layerAttemptsCalculator
std::unique_ptr< LayerAttemptsCalculator > m_layerAttemptsCalculator
defines how the Extrapolator propagates through this
Definition: TrackingVolume.h:452
Trk::MaterialLayer
Definition: MaterialLayer.h:42
Trk::Material::dEdX
float dEdX
Definition: Material.h:125
Trk::Material::zOaTr
float zOaTr
Definition: Material.h:126
Trk::Volume::m_transform
std::unique_ptr< Amg::Transform3D > m_transform
Transform3D (optional)
Definition: Volume.h:78
Trk::FullIntersection
Class extension to return the object, a represenation & the result.
Definition: Intersection.h:64
Trk::BinnedArray
Definition: BinnedArray.h:36
Trk::CombinedVolumeBounds
Definition: CombinedVolumeBounds.h:44
Trk::AlignableTrackingVolume::m_sampleID
int m_sampleID
Definition: AlignableTrackingVolume.h:61
Trk::TrackingVolume::m_outsideGlueVolumes
CxxUtils::CachedUniquePtrT< GlueVolumesDescriptor > m_outsideGlueVolumes
provided the number of layer attempts
Definition: TrackingVolume.h:450
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:79
Trk::Volume
Definition: Volume.h:36
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
Trk::TrackingVolume
Definition: TrackingVolume.h:119
Trk::TrackingVolume::associatedLayer
const Layer * associatedLayer(const Amg::Vector3D &gp) const
Return the associated Layer.
Definition: TrackingVolume.cxx:382
Trk::mappingMode
@ mappingMode
Definition: PropDirection.h:23
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
Trk::Layer
Definition: Layer.h:72
Trk::Layer::layerIndex
const LayerIndex & layerIndex() const
get the layerIndex
Trk::Volume::m_center
Amg::Vector3D m_center
center position of the surface
Definition: Volume.h:79