Skip to content
Snippets Groups Projects

Revert "Merge branch 'DistanceSolution_default_move_inline_to_icc' into 'master'"

Merged Frank Winklmeier requested to merge revert-39ee4258 into master
3 files
+ 92
91
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -9,7 +9,9 @@
@@ -9,7 +9,9 @@
#ifndef TRKSURFACES_DISTANCESOLUTION_H
#ifndef TRKSURFACES_DISTANCESOLUTION_H
#define TRKSURFACES_DISTANCESOLUTION_H
#define TRKSURFACES_DISTANCESOLUTION_H
#include <cmath>
// STD
 
#include <iostream>
 
#include <math.h>
namespace Trk {
namespace Trk {
@@ -24,19 +26,14 @@ namespace Trk {
@@ -24,19 +26,14 @@ namespace Trk {
class DistanceSolution
class DistanceSolution
{
{
public:
public:
DistanceSolution() = default;
/**Default Constructor*/
DistanceSolution(const DistanceSolution&) = default;
DistanceSolution();
DistanceSolution(DistanceSolution&&) = default;
DistanceSolution& operator=(const DistanceSolution&) = default;
/**Constructor*/
DistanceSolution& operator=(DistanceSolution&&) = default;
DistanceSolution(int num, double current = 0., bool signedDist = false, double first = 0., double second = 0.);
~DistanceSolution() = default;
/**Destructor*/
/**Constructor*/
virtual ~DistanceSolution() = default;
DistanceSolution(int num,
double current = 0.,
bool signedDist = false,
double first = 0.,
double second = 0.);
// methods to access solutions
// methods to access solutions
/** Number of intersection solutions*/
/** Number of intersection solutions*/
@@ -45,8 +42,7 @@ public:
@@ -45,8 +42,7 @@ public:
/** Distance to first intersection solution along direction*/
/** Distance to first intersection solution along direction*/
double first() const;
double first() const;
/** Distance to second intersection solution along direction (for a cylinder
/** Distance to second intersection solution along direction (for a cylinder surface)*/
* surface)*/
double second() const;
double second() const;
/** Absolute Distance to closest solution */
/** Absolute Distance to closest solution */
@@ -55,15 +51,14 @@ public:
@@ -55,15 +51,14 @@ public:
/** Distance to point of closest approach along direction*/
/** Distance to point of closest approach along direction*/
double toPointOfClosestApproach() const;
double toPointOfClosestApproach() const;
/** Current distance to surface (spatial), signed (along/opposite to surface
/** Current distance to surface (spatial), signed (along/opposite to surface normal) if input argument true (absolute
* normal) if input argument true (absolute value by default)*/
* value by default)*/
double currentDistance(bool signedDist = false) const;
double currentDistance(bool signedDist = false) const;
/** This method indicates availability of signed current distance (false for
/** This method indicates availability of signed current distance (false for Perigee and StraighLineSurface) */
* Perigee and StraighLineSurface) */
bool signedDistance() const;
bool signedDistance() const;
private:
protected:
int m_num;
int m_num;
double m_first;
double m_first;
double m_second;
double m_second;
@@ -71,7 +66,54 @@ private:
@@ -71,7 +66,54 @@ private:
bool m_signedDist;
bool m_signedDist;
};
};
 
inline int
 
DistanceSolution::numberOfSolutions() const
 
{
 
return m_num;
 
}
 
 
inline double
 
DistanceSolution::first() const
 
{
 
return m_first;
 
}
 
 
inline double
 
DistanceSolution::second() const
 
{
 
return m_second;
 
}
 
 
inline double
 
DistanceSolution::absClosest() const
 
{
 
if (m_num > 1)
 
return (m_first * m_first < m_second * m_second) ? fabs(m_first) : fabs(m_second);
 
else
 
return fabs(m_first);
 
}
 
 
inline double
 
DistanceSolution::toPointOfClosestApproach() const
 
{
 
return m_first;
 
}
 
 
inline double
 
DistanceSolution::currentDistance(bool signedDist) const
 
{
 
if (signedDist)
 
return m_current;
 
else
 
return fabs(m_current);
 
}
 
 
inline bool
 
DistanceSolution::signedDistance() const
 
{
 
return m_signedDist;
 
}
 
} // end of namespace
} // end of namespace
#include "TrkSurfaces/DistanceSolution.icc"
#endif // TRKSURFACES_DISTANCESOLUTION_H
#endif // TRKSURFACES_DISTANCESOLUTION_H
Loading