Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <TrackingGeometry.h>
|
| TrackingGeometry (TrackingVolume *highestVolume, NavigationLevel navlevel=globalSearch) |
| Constructor. More...
|
|
virtual | ~TrackingGeometry () |
| Destructor. More...
|
|
const TrackingVolume * | highestTrackingVolume () const |
| return the world More...
|
|
TrackingVolume * | highestTrackingVolume () |
|
const TrackingVolume * | lowestTrackingVolume (const Amg::Vector3D &gp) const |
| return the lowest tracking Volume More...
|
|
std::vector< const Trk::DetachedTrackingVolume * > | lowestDetachedTrackingVolumes (const Amg::Vector3D &gp) const |
| return the vector of lowest detached tracking Volume(->overlaps) More...
|
|
const TrackingVolume * | lowestStaticTrackingVolume (const Amg::Vector3D &gp) const |
| return the lowest static tracking Volume More...
|
|
const TrackingVolume * | trackingVolume (const std::string &name) const |
| return the tracking Volume by name, 0 if it doesn't exist More...
|
|
const Layer * | associatedLayer (const Amg::Vector3D &gp) const |
| Forward the associated Layer information. More...
|
|
const Layer * | nextLayer (const Amg::Vector3D &gp, const Amg::Vector3D &mom, bool skipNavLayer=false) const |
| Forward the next Layer information. More...
|
|
template<class T > |
LayerIntersection< Amg::Vector3D > | closestMaterialLayer (const T &pars, PropDirection pDir=Trk::alongMomentum, const BoundaryCheck &bchk=true) const |
| Closest Material Layer - used for the mapping option. More...
|
|
const std::map< Layer *, int > & | boundaryLayers () |
| Return the unique BoundarySurfaces with MaterialInformation. More...
|
|
constMapRange_t | boundaryLayers () const |
|
size_t | numBoundaryLayers () const |
|
NavigationLevel | navigationLevel () const |
| Return the Navigation Level - only one TrackingGeometry can have full association to GeoModel. More...
|
|
void | printVolumeHierarchy (MsgStream &msgstream) const |
| Print the summary of volume Hierarchy of the TrackingGeometry. More...
|
|
void | indexStaticLayers (GeometrySignature geosit, int offset=0) |
| indexLayers : method to re-set the index of the layers, depending on geometrySignature More...
|
|
void | dump (MsgStream &out, const std::string &head) const |
|
void | addToGarbage (std::vector< std::unique_ptr< Trk::DetachedTrackingVolume >> &&garbageVec) |
|
void | addToGarbage (std::vector< std::unique_ptr< Trk::TrackingVolume >> &&garbageVec) |
|
The TrackingGeometry class is the owner of the constructed TrackingVolumes. It enables both, a global search for an asociatedVolume (respectively, if existing, a global search of an associated Layer or the next associated Layer), such as a continous navigation by BoundarySurfaces between the confined TrackingVolumes.
- 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 66 of file TrackingGeometry.h.
◆ constMapRange_t
◆ iterator_convert_const_t
◆ TrackingGeometry()
◆ ~TrackingGeometry()
Trk::TrackingGeometry::~TrackingGeometry |
( |
| ) |
|
|
virtual |
◆ addToGarbage() [1/2]
Definition at line 36 of file TrackingGeometry.cxx.
38 std::make_move_iterator(garbageVec.begin()),
39 std::make_move_iterator(garbageVec.end()));
◆ addToGarbage() [2/2]
void Trk::TrackingGeometry::addToGarbage |
( |
std::vector< std::unique_ptr< Trk::TrackingVolume >> && |
garbageVec | ) |
|
Definition at line 41 of file TrackingGeometry.cxx.
43 std::make_move_iterator(garbageVec.begin()),
44 std::make_move_iterator(garbageVec.end()));
◆ associatedLayer()
Forward the associated Layer information.
◆ atVolumeBoundary() [1/2]
check position at volume boundary + navigation link
Definition at line 264 of file TrackingGeometry.cxx.
271 bool isAtBoundary =
false;
275 const auto& bounds = vol->boundarySurfaces();
276 for (
size_t ib = 0;
ib < bounds.size(); ++
ib) {
281 bounds[
ib]->attachedVolume(gp,
mom,
dir);
282 if (!nextVol && attachedVol)
283 nextVol = attachedVol;
◆ atVolumeBoundary() [2/2]
check position at volume boundary
Definition at line 246 of file TrackingGeometry.cxx.
250 bool isAtBoundary =
false;
253 const auto& bounds = vol->boundarySurfaces();
254 for (
size_t ib = 0;
ib < bounds.size(); ++
ib) {
◆ boundaryLayers() [1/2]
const std::map<Layer*, int>& Trk::TrackingGeometry::boundaryLayers |
( |
| ) |
|
Return the unique BoundarySurfaces with MaterialInformation.
◆ boundaryLayers() [2/2]
◆ checkoutHighestTrackingVolume()
◆ closestMaterialLayer()
◆ compactify()
void Trk::TrackingGeometry::compactify |
( |
MsgStream & |
msgstream, |
|
|
TrackingVolume * |
vol = nullptr |
|
) |
| |
|
private |
Geometry Builder busineess: set all contained surfaces TG owned - this should save memory and avoid surface copying.
- prints compactification statistics
Definition at line 137 of file TrackingGeometry.cxx.
140 <<
"====== Calling TrackingGeometry::compactify() ===== " << std::endl;
142 size_t cSurfaces = 0;
143 size_t tSurfaces = 0;
147 msg <<
MSG::VERBOSE <<
" --> set TG ownership of " << cSurfaces <<
" out of "
148 << tSurfaces << std::endl;
150 bLayerIter.first->surfaceRepresentation().setOwner(
Trk::TGOwn);
153 <<
" boundary layers." << std::endl;
◆ dump()
void Trk::TrackingGeometry::dump |
( |
MsgStream & |
out, |
|
|
const std::string & |
head |
|
) |
| const |
Definition at line 290 of file TrackingGeometry.cxx.
294 out <<
head <<
" [" << bound_layers.second <<
"] ";
298 for (
const std::pair<const std::string, const TrackingVolume*>& volume :
m_trackingVolumes) {
299 out <<
head <<
" [" <<
counter++ <<
"] " << volume.first <<
" volumeBound=";
300 volume.second->volumeBounds().dump(
out);
303 volume.second->confinedArbitraryLayers();
304 if (!confArbLayers.empty()) {
306 for (
const Layer* confined_layer : confArbLayers) {
308 <<
" confinedArbitrary layer " << j++ <<
" ";
312 if (volume.second->confinedLayers()) {
314 for (
const Layer* confined_layer :
315 volume.second->confinedLayers()->arrayObjects()) {
317 <<
" confined layer" << j++ <<
" ";
◆ dumpLayer()
void Trk::TrackingGeometry::dumpLayer |
( |
MsgStream & |
out, |
|
|
const std::string & |
head, |
|
|
const Layer * |
layer |
|
) |
| |
|
staticprivate |
◆ highestTrackingVolume() [1/2]
◆ highestTrackingVolume() [2/2]
◆ indexStaticLayers()
void Trk::TrackingGeometry::indexStaticLayers |
( |
GeometrySignature |
geosit, |
|
|
int |
offset = 0 |
|
) |
| |
indexLayers : method to re-set the index of the layers, depending on geometrySignature
Definition at line 237 of file TrackingGeometry.cxx.
◆ lowestDetachedTrackingVolumes()
◆ lowestStaticTrackingVolume()
return the lowest static tracking Volume
Definition at line 72 of file TrackingGeometry.cxx.
76 while (currentVolume != searchVolume && searchVolume) {
77 currentVolume = searchVolume;
81 return (currentVolume);
◆ lowestTrackingVolume()
return the lowest tracking Volume
Definition at line 48 of file TrackingGeometry.cxx.
52 while (currentVolume != searchVolume && searchVolume) {
53 currentVolume = searchVolume;
56 return (currentVolume);
◆ navigationLevel()
◆ nextLayer()
Forward the next Layer information.
◆ numBoundaryLayers()
size_t Trk::TrackingGeometry::numBoundaryLayers |
( |
| ) |
const |
◆ printVolumeHierarchy()
void Trk::TrackingGeometry::printVolumeHierarchy |
( |
MsgStream & |
msgstream | ) |
const |
◆ printVolumeInformation()
void Trk::TrackingGeometry::printVolumeInformation |
( |
MsgStream & |
msgstream, |
|
|
const TrackingVolume & |
tvol, |
|
|
int |
lvl |
|
) |
| const |
|
private |
print VolumeInformation with Level
Definition at line 185 of file TrackingGeometry.cxx.
189 int sublevel = lvl + 1;
193 msg <<
"TrackingVolume ( at : " << (&tvol) <<
") name: " << tvol.volumeName()
197 if (confinedLayers) {
198 std::span<Trk::Layer const* const>
layers =
202 msg <<
"- found : " <<
layers.size() <<
" confined Layers" << std::endl;
206 tvol.confinedVolumes();
207 if (confinedVolumes) {
208 std::span<Trk::TrackingVolume const* const> volumes =
213 msg <<
"- found : " << volumes.size() <<
" confined TrackingVolumes"
216 for (
const auto& volumesIter : volumes)
222 tvol.confinedDenseVolumes();
223 if (!confinedDenseVolumes.empty()) {
227 msg <<
"- found : " << confinedDenseVolumes.size()
228 <<
" confined unordered (dense) TrackingVolumes" << std::endl;
230 for (
const auto& volumesIter : (confinedDenseVolumes))
◆ registerNavigationLevel()
void Trk::TrackingGeometry::registerNavigationLevel |
( |
NavigationLevel |
navlevel | ) |
|
|
private |
private method the Navigation Level
◆ registerTrackingVolumes()
private method to register recursively the tracking volumes
should detached tracking volumes be part of the tracking geometry ?
register the boundary layers
Definition at line 85 of file TrackingGeometry.cxx.
91 for (
int l = 0;
l < lvl; ++
l){
98 if (confinedVolumes) {
99 std::span<Trk::TrackingVolume* const> volumes = confinedVolumes->
arrayObjects();
100 for (
const auto& volumesIter : volumes){
108 if (!confinedDenseVolumes.empty()) {
109 for (
const auto& volumesIter : confinedDenseVolumes){
117 if (!confinedDetachedVolumes.empty()) {
118 for (
const auto& volumesIter : confinedDetachedVolumes){
120 tvol.
inside(volumesIter->trackingVolume()->center(), 0.)){
128 for (
const auto & bound : bounds) {
◆ sign()
Geometry Builder busineess: the geometry builder has to sign.
◆ synchronizeLayers()
void Trk::TrackingGeometry::synchronizeLayers |
( |
MsgStream & |
msgstream, |
|
|
TrackingVolume * |
vol = nullptr |
|
) |
| |
|
private |
Geometry Builder business: synchronize all layers to enclosed volume dimensions.
Definition at line 158 of file TrackingGeometry.cxx.
◆ trackingVolume()
return the tracking Volume by name, 0 if it doesn't exist
◆ GeometryBuilder
◆ GeometryBuilderCond
◆ m_boundaryLayers
std::map<Layer*, int> Trk::TrackingGeometry::m_boundaryLayers |
|
private |
◆ m_detachedVolGarbage
In some cases the Tracking Geometry needs to keep certain objectss alive delete them at the end of its lifetime.
This should typically happen for objects that can be referenced but are not owned by any other object
Definition at line 220 of file TrackingGeometry.h.
◆ m_navigationLevel
◆ m_trackingVolumes
◆ m_trkVolumeGarbage
std::vector<std::unique_ptr<TrackingVolume> > Trk::TrackingGeometry::m_trkVolumeGarbage {} |
|
private |
◆ m_world
The documentation for this class was generated from the following files:
const Trk::MaterialLayer * materialLayer() const
return the material Layer
TrackingVolume * m_world
The known world - and the beam.
std::map< Layer *, int > m_boundaryLayers
The unique boundary Layers.
bool inside(const Amg::Vector3D &gp, double tol=0.) const
Inside() method for checks.
const TrackingVolume * associatedSubVolume(const Amg::Vector3D &gp) const
Return the associated sub Volume, returns THIS if no subVolume exists.
void registerTrackingVolumes(TrackingVolume &tvol, TrackingVolume *mvol=nullptr, int lvl=0)
private method to register recursively the tracking volumes
ArraySpan< DetachedTrackingVolume const *const > confinedDetachedVolumes() const
Return detached subVolumes - not the ownership.
virtual const Surface & surfaceRepresentation() const override=0
Transforms the layer into a Surface representation for extrapolation.
void indexContainedMaterialLayers(GeometrySignature geoSig, int &offset)
reIndex the material layers of the TrackingVolume
std::vector< std::unique_ptr< TrackingVolume > > m_trkVolumeGarbage
static void dumpLayer(MsgStream &out, const std::string &head, const Layer *layer)
const TrackingVolume * highestTrackingVolume() const
return the world
virtual bool isOnSurface(const Amg::Vector3D &glopo, const BoundaryCheck &bchk=true, double tol1=0., double tol2=0.) const
This method returns true if the GlobalPosition is on the Surface for both, within or without check of...
void indexContainedStaticLayers(GeometrySignature geoSig, int &offset)
reIndex the static layers of the TrackingVolume
std::vector< const DetachedTrackingVolume * > assocDetachedSubVolumes(const Amg::Vector3D &gp, double tol) const
Return the associated detached subvolumes.
ArraySpan< TrackingVolume const *const > confinedDenseVolumes() const
Return unordered subVolumes - not the ownership.
const TrackingVolume * lowestStaticTrackingVolume(const Amg::Vector3D &gp) const
return the lowest static tracking Volume
void synchronizeLayers(MsgStream &msgstream, double envelope=1.)
method to synchronize the layers with potentially updated volume bounds:
std::vector< std::shared_ptr< BoundarySurface< TrackingVolume > > > & boundarySurfaces()
Method to return the BoundarySurfaces.
virtual std::span< T *const > arrayObjects()=0
Return all objects of the Array non-const we can still modify the T.
std::string head(std::string s, const std::string &pattern)
head of a string
const std::string & volumeName() const
Returns the VolumeName - for debug reason, might be depreciated later.
NavigationLevel m_navigationLevel
The Navigation level for identification.
std::vector< std::unique_ptr< DetachedTrackingVolume > > m_detachedVolGarbage
In some cases the Tracking Geometry needs to keep certain objectss alive delete them at the end of it...
const TrackingVolumeArray * confinedVolumes() const
Return the subLayer array.
void setMotherVolume(const TrackingVolume *mvol)
set the MotherVolume
void compactify(size_t &rSurfaces, size_t &tSurfaces)
compactify the memory usage in the event by setting ownership to TackingGeometry the referenced types...
void printVolumeInformation(MsgStream &msgstream, const TrackingVolume &tvol, int lvl) const
print VolumeInformation with Level
std::map< const std::string, const TrackingVolume * > m_trackingVolumes
The Volumes in a map for later finding.