|
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 35 of file TrackingGeometry.cxx.
36 std::copy_if(std::make_move_iterator(garbageVec.begin()), std::make_move_iterator(garbageVec.end()),
38 [](
const std::unique_ptr<DetachedTrackingVolume>&
ptr){
39 return ptr.get () != nullptr;
◆ addToGarbage() [2/2]
void Trk::TrackingGeometry::addToGarbage |
( |
std::vector< std::unique_ptr< Trk::TrackingVolume >> && |
garbageVec | ) |
|
Definition at line 43 of file TrackingGeometry.cxx.
44 std::copy_if(std::make_move_iterator(garbageVec.begin()), std::make_move_iterator(garbageVec.end()),
46 [](
const std::unique_ptr<TrackingVolume>&
ptr){
47 return ptr.get () != nullptr;
◆ associatedLayer()
Forward the associated Layer information.
◆ atVolumeBoundary() [1/2]
check position at volume boundary + navigation link
Definition at line 268 of file TrackingGeometry.cxx.
275 bool isAtBoundary =
false;
279 const auto& bounds = vol->boundarySurfaces();
280 for (
size_t ib = 0;
ib < bounds.size(); ++
ib) {
285 bounds[
ib]->attachedVolume(gp,
mom,
dir);
286 if (!nextVol && attachedVol)
287 nextVol = attachedVol;
◆ atVolumeBoundary() [2/2]
check position at volume boundary
Definition at line 250 of file TrackingGeometry.cxx.
254 bool isAtBoundary =
false;
257 const auto& bounds = vol->boundarySurfaces();
258 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 141 of file TrackingGeometry.cxx.
144 <<
"====== Calling TrackingGeometry::compactify() ===== " << std::endl;
146 size_t cSurfaces = 0;
147 size_t tSurfaces = 0;
151 msg <<
MSG::VERBOSE <<
" --> set TG ownership of " << cSurfaces <<
" out of "
152 << tSurfaces << std::endl;
154 bLayerIter.first->surfaceRepresentation().setOwner(
Trk::TGOwn);
157 <<
" boundary layers." << std::endl;
◆ dump()
void Trk::TrackingGeometry::dump |
( |
MsgStream & |
out, |
|
|
const std::string & |
head |
|
) |
| const |
Definition at line 294 of file TrackingGeometry.cxx.
298 out <<
head <<
" [" << bound_layers.second <<
"] ";
302 for (
const std::pair<const std::string, const TrackingVolume*>& volume :
304 out <<
head <<
" [" <<
counter++ <<
"] " << volume.first <<
" volumeBound=";
305 volume.second->volumeBounds().dump(
out);
308 volume.second->confinedArbitraryLayers();
309 if (!confArbLayers.empty()) {
311 for (
const Layer* confined_layer : confArbLayers) {
313 <<
" confinedArbitrary layer " << j++ <<
" ";
317 if (volume.second->confinedLayers()) {
319 for (
const Layer* confined_layer :
320 volume.second->confinedLayers()->arrayObjects()) {
322 <<
" 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 241 of file TrackingGeometry.cxx.
◆ lowestDetachedTrackingVolumes()
◆ lowestStaticTrackingVolume()
return the lowest static tracking Volume
Definition at line 77 of file TrackingGeometry.cxx.
81 while (currentVolume != searchVolume && searchVolume) {
82 currentVolume = searchVolume;
86 return (currentVolume);
◆ lowestTrackingVolume()
return the lowest tracking Volume
Definition at line 53 of file TrackingGeometry.cxx.
57 while (currentVolume != searchVolume && searchVolume) {
58 currentVolume = searchVolume;
61 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 189 of file TrackingGeometry.cxx.
193 int sublevel = lvl + 1;
197 msg <<
"TrackingVolume ( at : " << (&tvol) <<
") name: " << tvol.volumeName()
201 if (confinedLayers) {
206 msg <<
"- found : " <<
layers.size() <<
" confined Layers" << std::endl;
210 tvol.confinedVolumes();
211 if (confinedVolumes) {
217 msg <<
"- found : " << volumes.size() <<
" confined TrackingVolumes"
220 for (
const auto& volumesIter : volumes)
226 tvol.confinedDenseVolumes();
227 if (!confinedDenseVolumes.empty()) {
231 msg <<
"- found : " << confinedDenseVolumes.size()
232 <<
" confined unordered (dense) TrackingVolumes" << std::endl;
234 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 90 of file TrackingGeometry.cxx.
96 for (
int l = 0;
l < lvl; ++
l,
indent +=
" ")
103 if (confinedVolumes) {
106 for (
const auto& volumesIter : volumes)
113 if (!confinedDenseVolumes.empty()) {
114 for (
const auto& volumesIter : confinedDenseVolumes)
121 if (!confinedDetachedVolumes.empty()) {
122 for (
const auto& volumesIter : confinedDetachedVolumes)
124 tvol.
inside(volumesIter->trackingVolume()->center(), 0.))
126 *(volumesIter->trackingVolume()), &tvol, sublvl);
131 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 162 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
keep ownership of MuonTrackingGeometry elements in here
Definition at line 217 of file TrackingGeometry.h.
◆ m_navigationLevel
◆ m_trackingVolumes
◆ m_trkVolumeGarbage
std::vector<std::shared_ptr<TrackingVolume> > Trk::TrackingGeometry::m_trkVolumeGarbage {} |
|
private |
◆ m_world
The documentation for this class was generated from the following files:
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.
std::vector< SharedObject< BoundarySurface< TrackingVolume > > > & boundarySurfaces()
Method to return the BoundarySurfaces.
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.
void indexContainedMaterialLayers(GeometrySignature geoSig, int &offset)
reIndex the material layers of the TrackingVolume
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
virtual const Surface & surfaceRepresentation() const =0
Transforms the layer into a Surface representation for extrapolation.
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:
Out copy_if(In first, const In &last, Out res, const Pred &p)
const Trk::Layer * materialLayer() const
return the material Layer
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.
virtual BinnedArraySpan< T *const > arrayObjects()=0
Return all objects of the Array non-const we can still modify the T.
NavigationLevel m_navigationLevel
The Navigation level for identification.
std::vector< std::shared_ptr< DetachedTrackingVolume > > m_detachedVolGarbage
keep ownership of MuonTrackingGeometry elements in here
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...
std::vector< std::shared_ptr< TrackingVolume > > m_trkVolumeGarbage
void printVolumeInformation(MsgStream &msgstream, const TrackingVolume &tvol, int lvl) const
print VolumeInformation with Level
std::span< T > BinnedArraySpan
std::map< const std::string, const TrackingVolume * > m_trackingVolumes
The Volumes in a map for later finding.