|
ATLAS Offline Software
|
#include <TargetSurfaces.h>
|
| TargetSurfaces ()=default |
| Constructor. More...
|
|
| ~TargetSurfaces ()=default |
| Destructor. More...
|
|
Trk::ExtrapolationCode | setOnInput (const Trk::ExCellCharged &, const Trk::Surface *sf, const BoundaryCheck &bc) |
| Extract surfaces for charged propagation, step into new frame volume. More...
|
|
Trk::ExtrapolationCode | setOnInput (const Amg::Vector3D &position, const Amg::Vector3D &direction, const Trk::TrackingVolume *, const Trk::Surface *sf, const BoundaryCheck &bc) |
| Extract surfaces for charged propagation, step into new frame volume. More...
|
|
TargetSurfaceVector | orderedIntersections (const Trk::ExCellNeutral &, const Trk::Surface *sf, const BoundaryCheck &bc) |
| Ordered intersections for neutral transport, step into new frame volume. More...
|
|
TargetSurfaceVector | orderedIntersections (const Amg::Vector3D &position, const Amg::Vector3D &direction, const Trk::TrackingVolume *, const Trk::Surface *sf, const BoundaryCheck &bc) |
| Ordered intersections for neutral transport, step into new frame volume. More...
|
|
bool | initFrameVolume (const Amg::Vector3D &position, const Amg::Vector3D &direction, const Trk::TrackingVolume *) |
| update of target surfaces at input or at frame volume boundary More...
|
|
void | fillSolutions (int index, Amg::Vector3D gp, TargetSurfaceVector &solutions) |
| intersections More...
|
|
bool | checkDistance (const Amg::Vector3D &position, const Amg::Vector3D &direction, double nextStep) |
| distance reevaluation More...
|
|
double | distanceToNext () |
| estimated distance along path to the nearest surface More...
|
|
bool | flipDirection () |
| step over intersection More...
|
|
int | nextSf () |
| index of nearest surface More...
|
|
unsigned | numSf () |
| number of intersections along path More...
|
|
bool | debugMode () |
| debug mode More...
|
|
void | setDebugModeOn () |
| set debug mode More...
|
|
void | setDebugModeOff () |
| set debug mode More...
|
|
const Trk::TrackingVolume * | currentDense () |
| current material volume/input for propagation More...
|
|
const Trk::TrackingVolume * | currentFrame () |
| current material volume/input for propagation More...
|
|
This class handles selection and distance estimate of surfaces whis can be reached in propagation/transport of particles.
- Author
- sarka.nosp@m..tod.nosp@m.orova.nosp@m.@cer.nosp@m.n.ch
Definition at line 125 of file TargetSurfaces.h.
◆ TargetSurfaces()
Trk::TargetSurfaces::TargetSurfaces |
( |
| ) |
|
|
default |
◆ ~TargetSurfaces()
Trk::TargetSurfaces::~TargetSurfaces |
( |
| ) |
|
|
default |
◆ checkDistance()
distance reevaluation
Definition at line 471 of file TargetSurfaces.cxx.
480 std::cout <<
"DEBUG:check distance with 0 step:"
489 int nextSfCandidate = -1;
507 if ((*is).status == -1 ||
517 std::cout <<
"DEBUG:check distance:" <<
index <<
":" << (*is).status
518 <<
"," << (*is).distanceAlongPath <<
"," << (*is).distance
519 <<
"," << (*is).signAbsDist
522 if ((*is).status != -1 || (*is).distanceAlongPath >
m_tolerance) {
525 double dd = (*is).distanceAlongPath;
529 nextSfCandidate =
index;
542 if (nextSfCandidate < 0 && m_distanceToNext > 0.) {
544 std::cout <<
"ERROR:frame volume left, aborting:"
552 if ((*is).status != -1 || (*is).distance >
m_tolerance) {
555 double dd = (*is).distance;
557 nextSfCandidate =
index;
566 std::cout <<
"DEBUG:closest frame estimate based on absolute distance:"
574 is = tempSurface.begin();
576 while (is != tempSurface.end()) {
578 if ((*is).status == -1 ||
579 (fabs((*is).distance) -
m_lastStep) < 2 * fabs(nextStep)) {
585 if ((*is).status != -1 || (*is).distanceAlongPath >
m_tolerance) {
588 double dd = (*is).distanceAlongPath;
592 nextSfCandidate =
index;
617 std::cout <<
"DEBUG:check distance returns:next,dist:" <<
m_nextSf <<
","
◆ currentDense()
◆ currentFrame()
◆ debugMode()
bool Trk::TargetSurfaces::debugMode |
( |
| ) |
|
|
inline |
◆ distanceToNext()
double Trk::TargetSurfaces::distanceToNext |
( |
| ) |
|
|
inline |
estimated distance along path to the nearest surface
Definition at line 237 of file TargetSurfaces.h.
◆ evaluateInputDistance()
Definition at line 218 of file TargetSurfaces.cxx.
224 tt.surf->straightLineDistanceEstimate(
pos,
mom);
226 double dist = distSol.
first();
241 tt.setPosition(posi);
256 tt.setPosition(posi);
275 tt.setPosition(posi);
◆ fillSolutions()
intersections
Definition at line 624 of file TargetSurfaces.cxx.
632 std::cout <<
"fill solutions at R,z,phi:" << gp.perp() <<
"," << gp.z()
633 <<
"," << gp.phi() << std::endl;
638 if ((*is).status != -1) {
640 if (
index == hitSf ||
641 fabs((*is).distanceAlongPath) < 0.01) {
643 std::cout <<
"DEBUG: onSurface, without bcheck, twice tolerance:"
644 << (*is).surf->isOnSurface(
647 << (*is).surf->isOnSurface(
650 << (*is).surf->isOnSurface(
654 solutions.push_back((*is));
655 else if ((*is).surf->isOnSurface(
660 solutions.push_back((*is));
663 std::cout <<
"DEBUG: frame boundary crossed outside volume "
665 }
else if (
index == hitSf)
675 is = tempSurface.begin();
677 while (is != tempSurface.end()) {
679 if ((*is).status != -1) {
681 if (
index == hitSf ||
682 (*is).distanceAlongPath < 0.01) {
683 if ((*is).surf->isOnSurface(
685 solutions.push_back((*is));
686 else if (
index == hitSf)
◆ findNext()
void Trk::TargetSurfaces::findNext |
( |
| ) |
|
|
private |
Definition at line 418 of file TargetSurfaces.cxx.
430 if ((*is).status == -1 && (*is).distanceAlongPath >
m_tolerance) {
432 double dd = (*is).distanceAlongPath;
438 if ((*is).status != -1 && (*is).distanceAlongPath >
m_tolerance) {
440 double dd = (*is).distanceAlongPath;
452 is = tempSurface.begin();
453 while (is != tempSurface.end()) {
454 if ((*is).status != -1 && (*is).distanceAlongPath >
m_tolerance) {
456 double dd = (*is).distanceAlongPath;
◆ flipDirection()
bool Trk::TargetSurfaces::flipDirection |
( |
| ) |
|
|
inline |
◆ initFrameVolume()
update of target surfaces at input or at frame volume boundary
Definition at line 117 of file TargetSurfaces.cxx.
128 std::cout <<
"DEBUG:input frame volume:" << fVol->
volumeName()
129 <<
" at position z:" << fVol->
center().z() << std::endl;
148 for (
unsigned int ib = 0;
ib < bounds.size(); ++
ib) {
158 std::cout <<
"DEBUG:frame input:id:status:distance:" <<
ib <<
":"
159 << bb.status <<
":" << bb.distanceAlongPath << std::endl;
172 double dist = (*is).distanceAlongPath;
173 if (dist < m_tolerance && dist > dExit) {
177 bounds[(*is).index]->attachedVolume(
179 if (nextVolume != fVol) {
200 std::cout <<
"DEBUG:early exit detected at boundary index:" <<
m_nextSf
201 <<
"," << dExit << std::endl;
211 std::cout <<
"DEBUG:volume exit resolved (SL estimate):" <<
m_nextSf <<
","
◆ nextSf()
int Trk::TargetSurfaces::nextSf |
( |
| ) |
|
|
inline |
◆ numSf()
unsigned int Trk::TargetSurfaces::numSf |
( |
| ) |
|
|
inline |
◆ orderedIntersections() [1/2]
Ordered intersections for neutral transport, step into new frame volume.
Definition at line 81 of file TargetSurfaces.cxx.
◆ orderedIntersections() [2/2]
Ordered intersections for neutral transport, step into new frame volume.
Definition at line 69 of file TargetSurfaces.cxx.
◆ orderIntersections()
Definition at line 385 of file TargetSurfaces.cxx.
399 unsigned int itest = 1;
400 while (itest < sols.size()) {
403 unsigned int iex = sols[itest - 1];
404 sols[itest - 1] = sols[itest];
◆ save()
◆ setDebugModeOff()
void Trk::TargetSurfaces::setDebugModeOff |
( |
| ) |
|
|
inline |
◆ setDebugModeOn()
void Trk::TargetSurfaces::setDebugModeOn |
( |
| ) |
|
|
inline |
◆ setOnInput() [1/2]
Extract surfaces for charged propagation, step into new frame volume.
Definition at line 35 of file TargetSurfaces.cxx.
◆ setOnInput() [2/2]
Extract surfaces for charged propagation, step into new frame volume.
Definition at line 23 of file TargetSurfaces.cxx.
◆ updateDistance()
Definition at line 286 of file TargetSurfaces.cxx.
291 double previousDistance =
tt.distanceAlongPath;
294 tt.surf->straightLineDistanceEstimate(
pos,
dir);
300 dist = distSol.
first();
310 if (previousDistance * dist < 0. && fabs(dist) >
m_tolerance) {
322 std::cout <<
"DEBUG:flipping intersection:signed ? true dist:"
339 if (
tt.status != -1) {
350 if (
index ==
m_nextSf && dist < 0. && previousDistance < dist)
360 tt.setPosition(posi);
362 tt.status = dist > 0 ? 1 : 0;
◆ m_absDist
bool Trk::TargetSurfaces::m_absDist {false} |
|
private |
◆ m_baseSurfaces
◆ m_currentDense
◆ m_currentFrame
◆ m_debugMode
bool Trk::TargetSurfaces::m_debugMode {false} |
|
private |
◆ m_distanceToNext
double Trk::TargetSurfaces::m_distanceToNext {1e6} |
|
private |
◆ m_flipDirection
bool Trk::TargetSurfaces::m_flipDirection {false} |
|
private |
◆ m_flipDistance
double Trk::TargetSurfaces::m_flipDistance {0} |
|
private |
◆ m_lastStep
double Trk::TargetSurfaces::m_lastStep {0} |
|
private |
◆ m_nextSf
int Trk::TargetSurfaces::m_nextSf {-1} |
|
private |
◆ m_numAlongPath
unsigned int Trk::TargetSurfaces::m_numAlongPath {0} |
|
private |
◆ m_ordered
◆ m_orderTrue
bool Trk::TargetSurfaces::m_orderTrue {true} |
|
private |
◆ m_probeDir
◆ m_probePos
◆ m_tempSurfaces
◆ m_tolerance
float Trk::TargetSurfaces::m_tolerance {0.001} |
|
private |
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
double currentDistance(bool signedDist=false) const
Current distance to surface (spatial), signed (along/opposite to surface normal) if input argument tr...
bool signedDistance() const
This method indicates availability of signed current distance (false for Perigee and StraighLineSurfa...
unsigned int m_numAlongPath
void save(Trk::TargetSurface &tt, bool base)
bool inside(const Amg::Vector3D &gp, double tol=0.) const
Inside() method for checks.
target surface info ( navigation )
int numberOfSolutions() const
Number of intersection solutions.
std::vector< SharedObject< BoundarySurface< TrackingVolume > > > & boundarySurfaces()
Method to return the BoundarySurfaces.
const Trk::TrackingVolume * m_currentDense
double first() const
Distance to first intersection solution along direction.
double second() const
Distance to second intersection solution along direction (for a cylinder surface)
const Amg::Vector3D & center() const
returns the center of the volume
bool updateDistance(int index, Trk::TargetSurface &tt, const Amg::Vector3D &position, const Amg::Vector3D &direction)
TargetSurfaceVector orderIntersections() const
const std::string & volumeName() const
Returns the VolumeName - for debug reason, might be depreciated later.
TargetSurfaceVector m_ordered
bool initFrameVolume(const Amg::Vector3D &position, const Amg::Vector3D &direction, const Trk::TrackingVolume *)
update of target surfaces at input or at frame volume boundary
std::vector< TargetSurfaceVector > m_tempSurfaces
Eigen::Matrix< double, 3, 1 > Vector3D
void evaluateInputDistance(Trk::TargetSurface &tt, const Amg::Vector3D &pos, const Amg::Vector3D &dir, bool base)
std::vector< TargetSurface > TargetSurfaceVector
TargetSurfaceVector orderedIntersections(const Trk::ExCellNeutral &, const Trk::Surface *sf, const BoundaryCheck &bc)
Ordered intersections for neutral transport, step into new frame volume.
Scalar mag() const
mag method
Trk::ExtrapolationCode setOnInput(const Trk::ExCellCharged &, const Trk::Surface *sf, const BoundaryCheck &bc)
Extract surfaces for charged propagation, step into new frame volume.
TargetSurfaceVector m_baseSurfaces
const Trk::TrackingVolume * m_currentFrame