|
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 > &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 |
|
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.
49 declareInterface<INavigator>(
this);
◆ ~Navigator()
virtual Trk::Navigator::~Navigator |
( |
| ) |
|
|
virtualdefault |
◆ atVolumeBoundary()
INavigator method to resolve navigation at boundary.
Implements Trk::INavigator.
Definition at line 267 of file Navigator.cxx.
273 bool isAtBoundary =
false;
279 for (
unsigned int ib = 0;
ib < bounds.size();
ib++) {
291 if (!nextVol && attachedVol) {
292 nextVol = attachedVol;
299 <<
" has loose ends. because the navigation of "
301 << (*parms) << std::endl
302 <<
" failed. Please consult the experts or have a "
303 "look at ATLASRECTS-7147");
310 if (not surfingTheBeamPipe) {
311 ATH_MSG_WARNING(
"navigator detects tangential intersection: switch of volumes reverted ");
313 ATH_MSG_VERBOSE(
"navigator detects particle entering and re-entering the beampipe");
315 if (nextVol and (not surfingTheBeamPipe)) {
318 isAtBoundary =
false;
◆ closestParameters()
INavigator interface method - getting the closest TrackParameters from a Track to a Surface.
Implements Trk::INavigator.
Definition at line 330 of file Navigator.cxx.
340 std::vector<const Trk::TrackParameters *> measuredParameters;
341 measuredParameters.reserve(trk.trackParameters()->size());
342 for (;
it != trk.trackParameters()->
end(); ++
it) {
345 if (!mtp || !mtp->covariance()) {
348 measuredParameters.push_back(*
it);
352 if (measuredParameters.empty()) {
358 std::vector<const Trk::TrackParameters *>::const_iterator tpIter = measuredParameters.begin();
359 std::vector<const Trk::TrackParameters *>::const_iterator tpIterEnd = measuredParameters.end();
361 double closestDistance = 10e10;
364 for (; tpIter != tpIterEnd; ++tpIter) {
371 double firstDistance = std::abs(currentDistance.
first());
373 1 ? std::abs(currentDistance.
second()) : firstDistance;
375 if (firstDistance < closestDistance || secondDistance < closestDistance) {
376 currentClosestParameters = (*tpIter);
377 closestDistance = firstDistance <= secondDistance ? firstDistance : secondDistance;
383 return currentClosestParameters;
388 closestTrackParameters =
389 *(std::min_element(measuredParameters.begin(), measuredParameters.end(),
390 tParFinderCylinder));
391 return closestTrackParameters;
397 sf.center(),
sf.transform().rotation().col(2));
398 closestTrackParameters = *(std::min_element(
399 measuredParameters.begin(), measuredParameters.end(), tParFinderLine));
400 return closestTrackParameters;
404 closestTrackParameters = *(std::min_element(measuredParameters.begin(), measuredParameters.end(), tParFinderCenter));
406 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 63 of file Navigator.cxx.
84 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 113 of file Navigator.cxx.
121 parms.position(),
dir * parms.momentum().normalized());
143 << surface_id <<
" of Volume: '"
144 << vol.volumeName() <<
"'.");
146 currentBoundary = vol.boundarySurface(surface_id);
154 ? prop.propagateParameters(
156 : prop.propagateParameters(
157 ctx, parms, currentSurface, searchDir,
true, s_zeroMagneticField);
161 " [N] --> next BoundarySurface found with Parameters: " << *trackPar);
162 return currentBoundary;
◆ nextTrackingVolume()
INavigator interface method - getting the next Volume and the parameter for the next Navigation.
Implements Trk::INavigator.
Definition at line 169 of file Navigator.cxx.
182 parms.position(),
dir * parms.momentum().normalized());
192 << parms.position().perp() <<
", " << parms.position().z()
199 ATH_MSG_VERBOSE(
" [N] Parameters have been flagged as being outside !");
210 currentBoundary = vol.boundarySurface(surface_id);
213 if (!currentBoundary) {
215 << surface_id <<
" of Volume: '"
216 << vol.volumeName() <<
"' NOT FOUND.");
220 << surface_id <<
" of Volume: '"
221 << vol.volumeName() <<
"'.");
227 std::unique_ptr<Trk::TrackParameters> trackPar =
nullptr;
230 if (!currentSurface.
isOnSurface(parms.position(),
true, 0., 0.)) {
233 ? prop.propagateParameters(
235 : prop.propagateParameters(
236 ctx, parms, currentSurface, searchDir,
true, s_zeroMagneticField);
238 trackPar.reset(parms.clone());
244 return {nextVolume, std::move(trackPar),
263 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 410 of file Navigator.cxx.
414 if (!handle.isValid()) {
415 throw std::runtime_error{
416 "Could not retrieve TrackingGeometry from Conditions Store."
419 return handle.cptr();
425 throw std::runtime_error{
426 "Could not retrieve TrackingGeometry from Detector Store."
◆ updateVHKA()
◆ volume()
◆ m_detStore
◆ m_evtStore
◆ m_fastField
bool Trk::Navigator::m_fastField |
|
private |
◆ m_fieldProperties
◆ m_insideVolumeTolerance
double Trk::Navigator::m_insideVolumeTolerance |
|
private |
◆ m_isOnSurfaceTolerance
double Trk::Navigator::m_isOnSurfaceTolerance |
|
private |
Tolerance for isOnSurface() method of BoundarySurfaces.
Definition at line 118 of file Navigator.h.
◆ m_searchWithDistance
bool Trk::Navigator::m_searchWithDistance |
|
private |
search with new distanceToSurface() method
Definition at line 124 of file Navigator.h.
◆ m_trackingGeometryName
std::string Trk::Navigator::m_trackingGeometryName |
|
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
bool Trk::Navigator::m_useStraightLineApproximation |
|
private |
use the straight line approximation for the next boundary sf
Definition at line 122 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.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
virtual DistanceSolution straightLineDistanceEstimate(const Amg::Vector3D &pos, const Amg::Vector3D &dir) const =0
fast straight line distance evaluation to Surface
std::vector< SharedObject< BoundarySurface< TrackingVolume > > > & boundarySurfaces()
Method to return the BoundarySurfaces.
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
double m_insideVolumeTolerance
Tolerance for inside() method of Volumes.
@ FastField
call the fast field access method of the FieldSvc
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.
double second() const
Distance to second intersection solution along direction (for a cylinder surface)
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
@ FullField
Field is set to be realistic, but within a given Volume.
double m_isOnSurfaceTolerance
Tolerance for isOnSurface() method of BoundarySurfaces.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
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
bool m_useStraightLineApproximation
use the straight line approximation for the next boundary sf
SG::ReadCondHandleKey< TrackingGeometry > m_trackingGeometryReadKey
const Amg::Vector3D & momentum() const
Access method for the momentum.
bool m_searchWithDistance
search with new distanceToSurface() method
#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.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
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