 |
ATLAS Offline Software
|
#include <Navigator.h>
|
| Navigator (const std::string &, const std::string &, const IInterface *) |
| Constructor. More...
|
|
virtual | ~Navigator ()=default |
| Destructor. More...
|
|
virtual StatusCode | initialize () override |
| AlgTool initialize method. More...
|
|
virtual const TrackingGeometry * | trackingGeometry (const EventContext &ctx) const override final |
| INavigator interface method - returns the TrackingGeometry used for navigation. More...
|
|
virtual const TrackingVolume * | volume (const EventContext &ctx, const Amg::Vector3D &gp) const override final |
| INavigator interface methods - global search for the Volume one is in. More...
|
|
virtual const TrackingVolume * | highestVolume (const EventContext &ctx) const override final |
| INavigator interface method - forward hightes TrackingVolume. More...
|
|
virtual const TrackParameters * | closestParameters (const Track &trk, const Surface &sf) const override final |
| INavigator interface method - getting the closest TrackParameters from a Track to a Surface. More...
|
|
virtual bool | atVolumeBoundary (const Trk::TrackParameters *parms, const Trk::TrackingVolume *vol, Trk::PropDirection dir, const Trk::TrackingVolume *&nextVol, double tol) const override final |
| INavigator method to resolve navigation at boundary. More...
|
|
virtual const BoundarySurface< TrackingVolume > * | nextBoundarySurface (const EventContext &ctx, const IPropagator &prop, const TrackParameters &parms, PropDirection dir) const override final |
| INavigator interface methods - getting the next BoundarySurface not knowing the Volume. More...
|
|
virtual const BoundarySurface< TrackingVolume > * | nextBoundarySurface (const EventContext &ctx, const IPropagator &prop, const TrackParameters &parms, PropDirection dir, const TrackingVolume &vol) const override final |
| INavigator interface methods - getting the next BoundarySurface when knowing the Volume. More...
|
|
virtual NavigationCell | nextTrackingVolume (const EventContext &ctx, const IPropagator &prop, const TrackParameters &parms, PropDirection dir, const TrackingVolume &vol) const override final |
| INavigator interface method - getting the next Volume and the parameter for the next Navigation. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T, V, H > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
Main AlgTool for Navigation in the TrkExtrapolation realm : It retrieves the TrackingGeometry from the DetectorStore as the reference Geometry.
- Author
- Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch
Definition at line 48 of file Navigator.h.
◆ StoreGateSvc_t
◆ Navigator()
Trk::Navigator::Navigator |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
Constructor.
Definition at line 40 of file Navigator.cxx.
43 declareInterface<INavigator>(
this);
◆ ~Navigator()
virtual Trk::Navigator::~Navigator |
( |
| ) |
|
|
virtualdefault |
◆ atVolumeBoundary()
INavigator method to resolve navigation at boundary.
Implements Trk::INavigator.
Definition at line 253 of file Navigator.cxx.
259 bool isAtBoundary =
false;
265 for (
unsigned int ib = 0;
ib < bounds.size();
ib++) {
277 if (!nextVol && attachedVol) {
278 nextVol = attachedVol;
285 <<
" has loose ends. because the navigation of "
287 << (*parms) << std::endl
288 <<
" failed. Please consult the experts or have a "
289 "look at ATLASRECTS-7147");
296 if (not surfingTheBeamPipe) {
297 ATH_MSG_WARNING(
"navigator detects tangential intersection: switch of volumes reverted ");
299 ATH_MSG_VERBOSE(
"navigator detects particle entering and re-entering the beampipe");
301 if (nextVol and (not surfingTheBeamPipe)) {
304 isAtBoundary =
false;
◆ closestParameters()
INavigator interface method - getting the closest TrackParameters from a Track to a Surface.
Implements Trk::INavigator.
Definition at line 316 of file Navigator.cxx.
326 std::vector<const Trk::TrackParameters *> measuredParameters;
327 measuredParameters.reserve(trk.trackParameters()->size());
328 for (;
it != trk.trackParameters()->
end(); ++
it) {
331 if (!mtp || !mtp->covariance()) {
334 measuredParameters.push_back(*
it);
338 if (measuredParameters.empty()) {
344 std::vector<const Trk::TrackParameters *>::const_iterator tpIter = measuredParameters.begin();
345 std::vector<const Trk::TrackParameters *>::const_iterator tpIterEnd = measuredParameters.end();
347 double closestDistance = 10e10;
350 for (; tpIter != tpIterEnd; ++tpIter) {
357 double firstDistance = std::abs(currentDistance.
first());
359 1 ? std::abs(currentDistance.
second()) : firstDistance;
361 if (firstDistance < closestDistance || secondDistance < closestDistance) {
362 currentClosestParameters = (*tpIter);
363 closestDistance = firstDistance <= secondDistance ? firstDistance : secondDistance;
369 return currentClosestParameters;
374 closestTrackParameters =
375 *(std::min_element(measuredParameters.begin(), measuredParameters.end(),
376 tParFinderCylinder));
377 return closestTrackParameters;
383 sf.center(),
sf.transform().rotation().col(2));
384 closestTrackParameters = *(std::min_element(
385 measuredParameters.begin(), measuredParameters.end(), tParFinderLine));
386 return closestTrackParameters;
390 closestTrackParameters = *(std::min_element(measuredParameters.begin(), measuredParameters.end(), tParFinderCenter));
392 return closestTrackParameters;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ highestVolume()
◆ initialize()
StatusCode Trk::Navigator::initialize |
( |
| ) |
|
|
overridevirtual |
AlgTool initialize method.
Definition at line 49 of file Navigator.cxx.
70 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ interfaceID()
static const InterfaceID& Trk::INavigator::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
AlgTool and IAlgTool interface methods.
Definition at line 74 of file INavigator.h.
74 {
return IID_INavigator; }
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ nextBoundarySurface() [1/2]
◆ nextBoundarySurface() [2/2]
INavigator interface methods - getting the next BoundarySurface when knowing the Volume.
Implements Trk::INavigator.
Definition at line 99 of file Navigator.cxx.
107 parms.position(),
dir * parms.momentum().normalized());
129 << surface_id <<
" of Volume: '"
130 << vol.volumeName() <<
"'.");
132 currentBoundary = vol.boundarySurface(surface_id);
140 ? prop.propagateParameters(
142 : prop.propagateParameters(
143 ctx, parms, currentSurface, searchDir,
true, s_zeroMagneticField);
147 " [N] --> next BoundarySurface found with Parameters: " << *trackPar);
148 return currentBoundary;
◆ nextTrackingVolume()
INavigator interface method - getting the next Volume and the parameter for the next Navigation.
Implements Trk::INavigator.
Definition at line 155 of file Navigator.cxx.
168 parms.position(),
dir * parms.momentum().normalized());
178 << parms.position().perp() <<
", " << parms.position().z()
185 ATH_MSG_VERBOSE(
" [N] Parameters have been flagged as being outside !");
196 currentBoundary = vol.boundarySurface(surface_id);
199 if (!currentBoundary) {
201 << surface_id <<
" of Volume: '"
202 << vol.volumeName() <<
"' NOT FOUND.");
206 << surface_id <<
" of Volume: '"
207 << vol.volumeName() <<
"'.");
213 std::unique_ptr<Trk::TrackParameters> trackPar =
nullptr;
216 if (!currentSurface.
isOnSurface(parms.position(),
true, 0., 0.)) {
219 ? prop.propagateParameters(
221 : prop.propagateParameters(
222 ctx, parms, currentSurface, searchDir,
true, s_zeroMagneticField);
224 trackPar.reset(parms.clone());
230 return {nextVolume, std::move(trackPar),
249 return {
nullptr,
nullptr};
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ trackingGeometry()
INavigator interface method - returns the TrackingGeometry used for navigation.
Implements Trk::INavigator.
Definition at line 396 of file Navigator.cxx.
400 if (!handle.isValid()) {
401 throw std::runtime_error{
402 "Could not retrieve TrackingGeometry from Conditions Store."
405 return handle.cptr();
411 throw std::runtime_error{
412 "Could not retrieve TrackingGeometry from Detector Store."
◆ updateVHKA()
◆ volume()
◆ m_detStore
◆ m_evtStore
◆ m_fastField
BooleanProperty Trk::Navigator::m_fastField {this, "MagneticFieldProperties", false} |
|
private |
◆ m_fieldProperties
◆ m_insideVolumeTolerance
DoubleProperty Trk::Navigator::m_insideVolumeTolerance |
|
private |
Initial value:{
"Tolerance for inside() method of Volumes"}
Definition at line 116 of file Navigator.h.
◆ m_isOnSurfaceTolerance
DoubleProperty Trk::Navigator::m_isOnSurfaceTolerance |
|
private |
Initial value:{
"Tolerance for isOnSurface() method of BoundarySurfaces"}
Definition at line 119 of file Navigator.h.
◆ m_searchWithDistance
BooleanProperty Trk::Navigator::m_searchWithDistance |
|
private |
Initial value:{
this, "SearchWithDistanceToSurface", true,
"search with new distanceToSurface() method"}
search with new distanceToSurface() method
Definition at line 128 of file Navigator.h.
◆ m_trackingGeometryName
std::string Trk::Navigator::m_trackingGeometryName = "AtlasTrackingGeometry" |
|
private |
◆ m_trackingGeometryReadKey
Initial value:{
this, "TrackingGeometryKey", "AtlasTrackingGeometry",
"Key of output of TrackingGeometry for ID"}
Definition at line 105 of file Navigator.h.
◆ m_trackingGeometrySvc
◆ m_useConditions
bool Trk::Navigator::m_useConditions {} |
|
private |
◆ m_useStraightLineApproximation
BooleanProperty Trk::Navigator::m_useStraightLineApproximation |
|
private |
Initial value:{
this, "UseStraightLineApproximation", false,
"use the straight line approximation for the next boundary sf"}
Definition at line 124 of file Navigator.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
double currentDistance(bool signedDist=false) const
Current distance to surface (spatial), signed (along/opposite to surface normal) if input argument tr...
Const iterator class for DataVector/DataList.
std::string m_trackingGeometryName
Name of the TrackingGeometry as given in Detector Store.
bool inverseRetrieval() const
const Amg::Vector3D & position() const
Access method for the position.
GeometrySignature geometrySignature() const
return the Signature
int numberOfSolutions() const
Number of intersection solutions.
virtual DistanceSolution straightLineDistanceEstimate(const Amg::Vector3D &pos, const Amg::Vector3D &dir) const =0
fast straight line distance evaluation to Surface
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
virtual const Tvol * attachedVolume(const TrackParameters &parms, PropDirection dir) const =0
Get the next Volume depending on the TrackParameters and the requested direction.
double first() const
Distance to first intersection solution along direction.
#define ATH_MSG_VERBOSE(x)
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
@ FastField
call the fast field access method of the FieldSvc
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
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...
virtual const Surface & surfaceRepresentation() const =0
The Surface Representation of this.
virtual const BoundarySurface< TrackingVolume > * nextBoundarySurface(const EventContext &ctx, const IPropagator &prop, const TrackParameters &parms, PropDirection dir) const override final
INavigator interface methods - getting the next BoundarySurface not knowing the Volume.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
double second() const
Distance to second intersection solution along direction (for a cylinder surface)
BooleanProperty m_useStraightLineApproximation
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
std::vector< std::shared_ptr< BoundarySurface< TrackingVolume > > > & boundarySurfaces()
Method to return the BoundarySurfaces.
@ FullField
Field is set to be realistic, but within a given Volume.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
BooleanProperty m_searchWithDistance
search with new distanceToSurface() method
Ensure that the ATLAS eigen extensions are properly loaded.
const std::string & volumeName() const
Returns the VolumeName - for debug reason, might be depreciated later.
Eigen::Matrix< double, 3, 1 > Vector3D
SG::ReadCondHandleKey< TrackingGeometry > m_trackingGeometryReadKey
const Amg::Vector3D & momentum() const
Access method for the momentum.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
ServiceHandle< Trk::ITrackingGeometrySvc > m_trackingGeometrySvc
ToolHandle to the TrackingGeometrySvc.
virtual const TrackingGeometry * trackingGeometry(const EventContext &ctx) const override final
INavigator interface method - returns the TrackingGeometry used for navigation.
virtual const TrackingVolume * volume(const EventContext &ctx, const Amg::Vector3D &gp) const override final
INavigator interface methods - global search for the Volume one is in.
Trk::MagneticFieldProperties m_fieldProperties
BooleanProperty m_fastField