Skip to content
Snippets Groups Projects
Commit ad4f9705 authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'surface_move_inline' into 'master'

Surface move virtual method from the .icc to the .cxx

See merge request !58855
parents cd7425c6 96e1a6d6
No related branches found
No related tags found
4 merge requests!59674InDetPerformanceMonitoring with LumiBlock selection,!59383cppcheck in trigger code: Prefer prefix ++/-- operators for non-primitive types.,!58990Draft:Fixing bug in FTF config when running with Reco_tf,!58855Surface move virtual method from the .icc to the .cxx
Showing
with 276 additions and 340 deletions
......@@ -16,61 +16,6 @@ ConeSurface::type() const
return ConeSurface::staticType;
}
/** Use the Surface as a ParametersBase constructor, from local parameters -
* charged */
inline Surface::ChargedTrackParametersUniquePtr
ConeSurface::createUniqueTrackParameters(
double l1,
double l2,
double phi,
double theta,
double qop,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Charged, ConeSurface>>(
l1, l2, phi, theta, qop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* charged*/
inline Surface::ChargedTrackParametersUniquePtr
ConeSurface::createUniqueTrackParameters(
const Amg::Vector3D& position,
const Amg::Vector3D& momentum,
double charge,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Charged, ConeSurface>>(
position, momentum, charge, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from local parameters -
* neutral */
inline Surface::NeutralTrackParametersUniquePtr
ConeSurface::createUniqueNeutralParameters(
double l1,
double l2,
double phi,
double theta,
double qop,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Neutral, ConeSurface>>(
l1, l2, phi, theta, qop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* neutral */
inline Surface::NeutralTrackParametersUniquePtr
ConeSurface::createUniqueNeutralParameters(
const Amg::Vector3D& position,
const Amg::Vector3D& momentum,
double charge,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Neutral, ConeSurface>>(
position, momentum, charge, *this, std::move(cov));
}
template<int DIM, class T>
std::unique_ptr<ParametersT<DIM, T, ConeSurface>>
ConeSurface::createUniqueParameters(double l1,
......
......@@ -16,62 +16,6 @@ CylinderSurface::type() const
return CylinderSurface::staticType;
}
/** Use the Surface as a ParametersBase constructor, from local parameters -
* charged */
inline Surface::ChargedTrackParametersUniquePtr
CylinderSurface::createUniqueTrackParameters(
double l1,
double l2,
double phi,
double theta,
double qop,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Charged, CylinderSurface>>(
l1, l2, phi, theta, qop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* charged*/
inline Surface::ChargedTrackParametersUniquePtr
CylinderSurface::createUniqueTrackParameters(
const Amg::Vector3D& position,
const Amg::Vector3D& momentum,
double charge,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Charged, CylinderSurface>>(
position, momentum, charge, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from local parameters -
* neutral */
inline Surface::NeutralTrackParametersUniquePtr
CylinderSurface::createUniqueNeutralParameters(
double l1,
double l2,
double phi,
double theta,
double qop,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Neutral, CylinderSurface>>(
l1, l2, phi, theta, qop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* neutral */
inline Surface::NeutralTrackParametersUniquePtr
CylinderSurface::createUniqueNeutralParameters(
const Amg::Vector3D& position,
const Amg::Vector3D& momentum,
double charge,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Neutral, CylinderSurface>>(
position, momentum, charge, *this, std::move(cov));
}
template<int DIM, class T>
std::unique_ptr<ParametersT<DIM, T, CylinderSurface>>
CylinderSurface::createUniqueParameters(
......
......@@ -15,60 +15,6 @@ DiscSurface::type() const
return DiscSurface::staticType;
}
/* Use the Surface as a ParametersBase constructor, from local parameters -
* charged */
inline Surface::ChargedTrackParametersUniquePtr
DiscSurface::createUniqueTrackParameters(
double l1,
double l2,
double phi,
double theta,
double qop,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Charged, DiscSurface>>(
l1, l2, phi, theta, qop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* charged*/
inline Surface::ChargedTrackParametersUniquePtr
DiscSurface::createUniqueTrackParameters(
const Amg::Vector3D& position,
const Amg::Vector3D& momentum,
double charge,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Charged, DiscSurface>>(
position, momentum, charge, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from local parameters -
* neutral */
inline Surface::NeutralTrackParametersUniquePtr
DiscSurface::createUniqueNeutralParameters(
double l1,
double l2,
double phi,
double theta,
double qop,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Neutral, DiscSurface>>(
l1, l2, phi, theta, qop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* neutral */
inline Surface::NeutralTrackParametersUniquePtr
DiscSurface::createUniqueNeutralParameters(
const Amg::Vector3D& position,
const Amg::Vector3D& momentum,
double charge,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Neutral, DiscSurface>>(
position, momentum, charge, *this, std::move(cov));
}
template<int DIM, class T>
std::unique_ptr<ParametersT<DIM, T, DiscSurface>>
DiscSurface::createUniqueParameters(double l1,
......
......@@ -15,63 +15,6 @@ PerigeeSurface::type() const
{
return PerigeeSurface::staticType;
}
/** Use the Surface as a ParametersBase constructor, from local parameters -
* charged */
inline Surface::ChargedTrackParametersUniquePtr
PerigeeSurface::createUniqueTrackParameters(
double l1,
double l2,
double phi,
double theta,
double qop,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Charged, PerigeeSurface>>(
l1, l2, phi, theta, qop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* charged*/
inline Surface::ChargedTrackParametersUniquePtr
PerigeeSurface::createUniqueTrackParameters(
const Amg::Vector3D& position,
const Amg::Vector3D& momentum,
double charge,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Charged, PerigeeSurface>>(
position, momentum, charge, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from local parameters -
* neutral */
inline Surface::NeutralTrackParametersUniquePtr
PerigeeSurface::createUniqueNeutralParameters(
double l1,
double l2,
double phi,
double theta,
double qop,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Neutral, PerigeeSurface>>(
l1, l2, phi, theta, qop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* neutral */
inline Surface::NeutralTrackParametersUniquePtr
PerigeeSurface::createUniqueNeutralParameters(
const Amg::Vector3D& position,
const Amg::Vector3D& momentum,
double charge,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Neutral, PerigeeSurface>>(
position, momentum, charge, *this, std::move(cov));
}
template<int DIM, class T>
std::unique_ptr<ParametersT<DIM, T, PerigeeSurface>>
PerigeeSurface::createUniqueParameters(
......
......@@ -15,61 +15,6 @@ PlaneSurface::type() const
return PlaneSurface::staticType;
}
/** Use the Surface as a ParametersBase constructor, from local parameters -
* charged */
inline Surface::ChargedTrackParametersUniquePtr
PlaneSurface::createUniqueTrackParameters(
double l1,
double l2,
double phi,
double theta,
double qop,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Charged, PlaneSurface>>(
l1, l2, phi, theta, qop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* charged*/
inline Surface::ChargedTrackParametersUniquePtr
PlaneSurface::createUniqueTrackParameters(
const Amg::Vector3D& position,
const Amg::Vector3D& momentum,
double charge,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Charged, PlaneSurface>>(
position, momentum, charge, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from local parameters -
* neutral */
inline Surface::NeutralTrackParametersUniquePtr
PlaneSurface::createUniqueNeutralParameters(
double l1,
double l2,
double phi,
double theta,
double oop,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Neutral, PlaneSurface>>(
l1, l2, phi, theta, oop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* neutral */
inline Surface::NeutralTrackParametersUniquePtr
PlaneSurface::createUniqueNeutralParameters(
const Amg::Vector3D& position,
const Amg::Vector3D& momentum,
double charge,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Neutral, PlaneSurface>>(
position, momentum, charge, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from local parameters */
template<int DIM, class T>
std::unique_ptr<ParametersT<DIM, T, PlaneSurface>>
......
......@@ -15,61 +15,6 @@ StraightLineSurface::type() const
return StraightLineSurface::staticType;
}
/** Use the Surface as a ParametersBase constructor, from local parameters -
* charged */
inline Surface::ChargedTrackParametersUniquePtr
StraightLineSurface::createUniqueTrackParameters(
double l1,
double l2,
double phi,
double theta,
double qop,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Charged, StraightLineSurface>>(
l1, l2, phi, theta, qop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* charged*/
inline Surface::ChargedTrackParametersUniquePtr
StraightLineSurface::createUniqueTrackParameters(
const Amg::Vector3D& position,
const Amg::Vector3D& momentum,
double charge,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Charged, StraightLineSurface>>(
position, momentum, charge, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from local parameters -
* neutral */
inline Surface::NeutralTrackParametersUniquePtr
StraightLineSurface::createUniqueNeutralParameters(
double l1,
double l2,
double phi,
double theta,
double qop,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Neutral, StraightLineSurface>>(
l1, l2, phi, theta, qop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* neutral */
inline Surface::NeutralTrackParametersUniquePtr
StraightLineSurface::createUniqueNeutralParameters(
const Amg::Vector3D& position,
const Amg::Vector3D& momentum,
double charge,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Neutral, StraightLineSurface>>(
position, momentum, charge, *this, std::move(cov));
}
template<int DIM, class T>
std::unique_ptr<ParametersT<DIM, T, StraightLineSurface>>
StraightLineSurface::createUniqueParameters(
......
......@@ -94,6 +94,45 @@ Trk::ConeSurface::operator=(const ConeSurface& csf)
return *this;
}
/** Use the Surface as a ParametersBase constructor, from local parameters -
* charged */
Trk::Surface::ChargedTrackParametersUniquePtr
Trk::ConeSurface::createUniqueTrackParameters(
double l1, double l2, double phi, double theta, double qop,
std::optional<AmgSymMatrix(5)> cov) const {
return std::make_unique<ParametersT<5, Charged, ConeSurface>>(
l1, l2, phi, theta, qop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* charged*/
Trk::Surface::ChargedTrackParametersUniquePtr
Trk::ConeSurface::createUniqueTrackParameters(
const Amg::Vector3D& position, const Amg::Vector3D& momentum, double charge,
std::optional<AmgSymMatrix(5)> cov) const {
return std::make_unique<ParametersT<5, Charged, ConeSurface>>(
position, momentum, charge, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from local parameters -
* neutral */
Trk::Surface::NeutralTrackParametersUniquePtr
Trk::ConeSurface::createUniqueNeutralParameters(
double l1, double l2, double phi, double theta, double qop,
std::optional<AmgSymMatrix(5)> cov) const {
return std::make_unique<ParametersT<5, Neutral, ConeSurface>>(
l1, l2, phi, theta, qop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* neutral */
Trk::Surface::NeutralTrackParametersUniquePtr
Trk::ConeSurface::createUniqueNeutralParameters(
const Amg::Vector3D& position, const Amg::Vector3D& momentum, double charge,
std::optional<AmgSymMatrix(5)> cov) const {
return std::make_unique<ParametersT<5, Neutral, ConeSurface>>(
position, momentum, charge, *this, std::move(cov));
}
// TODO: is the 0 always the cone center?
const Amg::Vector3D&
Trk::ConeSurface::globalReferencePoint() const
......
......@@ -121,6 +121,46 @@ Trk::CylinderSurface::operator=(const CylinderSurface& csf)
return *this;
}
/** Use the Surface as a ParametersBase constructor, from local parameters -
* charged */
Trk::Surface::ChargedTrackParametersUniquePtr
Trk::CylinderSurface::createUniqueTrackParameters(
double l1, double l2, double phi, double theta, double qop,
std::optional<AmgSymMatrix(5)> cov) const {
return std::make_unique<ParametersT<5, Charged, CylinderSurface>>(
l1, l2, phi, theta, qop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* charged*/
Trk::Surface::ChargedTrackParametersUniquePtr
Trk::CylinderSurface::createUniqueTrackParameters(
const Amg::Vector3D& position, const Amg::Vector3D& momentum, double charge,
std::optional<AmgSymMatrix(5)> cov) const {
return std::make_unique<ParametersT<5, Charged, CylinderSurface>>(
position, momentum, charge, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from local parameters -
* neutral */
Trk::Surface::NeutralTrackParametersUniquePtr
Trk::CylinderSurface::createUniqueNeutralParameters(
double l1, double l2, double phi, double theta, double qop,
std::optional<AmgSymMatrix(5)> cov) const {
return std::make_unique<ParametersT<5, Neutral, CylinderSurface>>(
l1, l2, phi, theta, qop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* neutral */
Trk::Surface::NeutralTrackParametersUniquePtr
Trk::CylinderSurface::createUniqueNeutralParameters(
const Amg::Vector3D& position, const Amg::Vector3D& momentum, double charge,
std::optional<AmgSymMatrix(5)> cov) const {
return std::make_unique<ParametersT<5, Neutral, CylinderSurface>>(
position, momentum, charge, *this, std::move(cov));
}
const Amg::Vector3D&
Trk::CylinderSurface::globalReferencePoint() const
{
......@@ -339,7 +379,7 @@ Trk::CylinderSurface::straightLineIntersection(const Amg::Vector3D& pos,
// to out-of-line Eigen code that is linked from other DSOs; in that case,
// it would not be optimized. Avoid this by forcing all Eigen code
// to be inlined here if possible.
__attribute__((flatten))
[[gnu::flatten]]
#endif
Trk::DistanceSolution
Trk::CylinderSurface::straightLineDistanceEstimate(
......
......@@ -168,6 +168,45 @@ Trk::DiscSurface::operator==(const Trk::Surface& sf) const
return boundsEqual;
}
/* Use the Surface as a ParametersBase constructor, from local parameters -
* charged */
Trk::Surface::ChargedTrackParametersUniquePtr
Trk::DiscSurface::createUniqueTrackParameters(
double l1, double l2, double phi, double theta, double qop,
std::optional<AmgSymMatrix(5)> cov) const {
return std::make_unique<ParametersT<5, Charged, DiscSurface>>(
l1, l2, phi, theta, qop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* charged*/
Trk::Surface::ChargedTrackParametersUniquePtr
Trk::DiscSurface::createUniqueTrackParameters(
const Amg::Vector3D& position, const Amg::Vector3D& momentum, double charge,
std::optional<AmgSymMatrix(5)> cov) const {
return std::make_unique<ParametersT<5, Charged, DiscSurface>>(
position, momentum, charge, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from local parameters -
* neutral */
Trk::Surface::NeutralTrackParametersUniquePtr
Trk::DiscSurface::createUniqueNeutralParameters(
double l1, double l2, double phi, double theta, double qop,
std::optional<AmgSymMatrix(5)> cov) const {
return std::make_unique<ParametersT<5, Neutral, DiscSurface>>(
l1, l2, phi, theta, qop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* neutral */
Trk::Surface::NeutralTrackParametersUniquePtr
Trk::DiscSurface::createUniqueNeutralParameters(
const Amg::Vector3D& position, const Amg::Vector3D& momentum, double charge,
std::optional<AmgSymMatrix(5)> cov) const {
return std::make_unique<ParametersT<5, Neutral, DiscSurface>>(
position, momentum, charge, *this, std::move(cov));
}
const Amg::Vector3D&
Trk::DiscSurface::globalReferencePoint() const
{
......@@ -270,7 +309,7 @@ Trk::DiscSurface::globalToLocalCartesian(const Amg::Vector3D& glopos,
// to out-of-line Eigen code that is linked from other DSOs; in that case,
// it would not be optimized. Avoid this by forcing all Eigen code
// to be inlined here if possible.
__attribute__((flatten))
[[gnu::flatten]]
#endif
bool
Trk::DiscSurface::isOnSurface(const Amg::Vector3D& glopo,
......
......@@ -46,7 +46,7 @@ Trk::PerigeeSurface::PerigeeSurface(const Amg::Transform3D& tTransform)
// to out-of-line Eigen code that is linked from other DSOs; in that case,
// it would not be optimized. Avoid this by forcing all Eigen code
// to be inlined here if possible.
__attribute__ ((flatten))
[[gnu::flatten]]
#endif
Trk::PerigeeSurface::PerigeeSurface(const PerigeeSurface& pesf)
: Surface(pesf)
......@@ -96,6 +96,61 @@ Trk::PerigeeSurface::operator==(const Trk::Surface& sf) const
return (center() == persf->center());
}
/** Use the Surface as a ParametersBase constructor, from local parameters -
* charged */
Trk::Surface::ChargedTrackParametersUniquePtr
Trk::PerigeeSurface::createUniqueTrackParameters(
double l1,
double l2,
double phi,
double theta,
double qop,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Charged, PerigeeSurface>>(
l1, l2, phi, theta, qop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* charged*/
Trk::Surface::ChargedTrackParametersUniquePtr
Trk::PerigeeSurface::createUniqueTrackParameters(
const Amg::Vector3D& position,
const Amg::Vector3D& momentum,
double charge,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Charged, PerigeeSurface>>(
position, momentum, charge, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from local parameters -
* neutral */
Trk::Surface::NeutralTrackParametersUniquePtr
Trk::PerigeeSurface::createUniqueNeutralParameters(
double l1,
double l2,
double phi,
double theta,
double qop,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Neutral, PerigeeSurface>>(
l1, l2, phi, theta, qop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* neutral */
Trk::Surface::NeutralTrackParametersUniquePtr
Trk::PerigeeSurface::createUniqueNeutralParameters(
const Amg::Vector3D& position,
const Amg::Vector3D& momentum,
double charge,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Neutral, PerigeeSurface>>(
position, momentum, charge, *this, std::move(cov));
}
// simple local to global - from LocalParameters /
Amg::Vector3D
Trk::PerigeeSurface::localToGlobal(const Trk::LocalParameters& locpars) const
......
......@@ -49,7 +49,7 @@ Trk::PlaneSurface::PlaneSurface(const PlaneSurface& psf, const Amg::Transform3D&
// to out-of-line Eigen code that is linked from other DSOs; in that case,
// it would not be optimized. Avoid this by forcing all Eigen code
// to be inlined here if possible.
__attribute__ ((flatten))
[[gnu::flatten]]
#endif
// constructor from CurvilinearUVT
Trk::PlaneSurface::PlaneSurface(const Amg::Vector3D& position, const CurvilinearUVT& curvUVT)
......@@ -183,6 +183,62 @@ Trk::PlaneSurface::operator==(const Trk::Surface& sf) const
bool boundsEqual = bounds() == psf->bounds();
return transfEqual && centerEqual && boundsEqual;
}
/** Use the Surface as a ParametersBase constructor, from local parameters -
* charged */
Trk::Surface::ChargedTrackParametersUniquePtr
Trk::PlaneSurface::createUniqueTrackParameters(
double l1,
double l2,
double phi,
double theta,
double qop,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Charged, PlaneSurface>>(
l1, l2, phi, theta, qop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* charged*/
Trk::Surface::ChargedTrackParametersUniquePtr
Trk::PlaneSurface::createUniqueTrackParameters(
const Amg::Vector3D& position,
const Amg::Vector3D& momentum,
double charge,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Charged, PlaneSurface>>(
position, momentum, charge, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from local parameters -
* neutral */
Trk::Surface::NeutralTrackParametersUniquePtr
Trk::PlaneSurface::createUniqueNeutralParameters(
double l1,
double l2,
double phi,
double theta,
double oop,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Neutral, PlaneSurface>>(
l1, l2, phi, theta, oop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* neutral */
Trk::Surface::NeutralTrackParametersUniquePtr
Trk::PlaneSurface::createUniqueNeutralParameters(
const Amg::Vector3D& position,
const Amg::Vector3D& momentum,
double charge,
std::optional<AmgSymMatrix(5)> cov) const
{
return std::make_unique<ParametersT<5, Neutral, PlaneSurface>>(
position, momentum, charge, *this, std::move(cov));
}
#if defined(__GNUC__)
[[gnu::flatten]]
// Avoid out-of-line Eigen calls
......
......@@ -94,6 +94,45 @@ Trk::StraightLineSurface::operator==(const Trk::Surface& sf) const
return boundsEqual;
}
/** Use the Surface as a ParametersBase constructor, from local parameters -
* charged */
Trk::Surface::ChargedTrackParametersUniquePtr
Trk::StraightLineSurface::createUniqueTrackParameters(
double l1, double l2, double phi, double theta, double qop,
std::optional<AmgSymMatrix(5)> cov) const {
return std::make_unique<ParametersT<5, Charged, StraightLineSurface>>(
l1, l2, phi, theta, qop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* charged*/
Trk::Surface::ChargedTrackParametersUniquePtr
Trk::StraightLineSurface::createUniqueTrackParameters(
const Amg::Vector3D& position, const Amg::Vector3D& momentum, double charge,
std::optional<AmgSymMatrix(5)> cov) const {
return std::make_unique<ParametersT<5, Charged, StraightLineSurface>>(
position, momentum, charge, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from local parameters -
* neutral */
Trk::Surface::NeutralTrackParametersUniquePtr
Trk::StraightLineSurface::createUniqueNeutralParameters(
double l1, double l2, double phi, double theta, double qop,
std::optional<AmgSymMatrix(5)> cov) const {
return std::make_unique<ParametersT<5, Neutral, StraightLineSurface>>(
l1, l2, phi, theta, qop, *this, std::move(cov));
}
/** Use the Surface as a ParametersBase constructor, from global parameters -
* neutral */
Trk::Surface::NeutralTrackParametersUniquePtr
Trk::StraightLineSurface::createUniqueNeutralParameters(
const Amg::Vector3D& position, const Amg::Vector3D& momentum, double charge,
std::optional<AmgSymMatrix(5)> cov) const {
return std::make_unique<ParametersT<5, Neutral, StraightLineSurface>>(
position, momentum, charge, *this, std::move(cov));
}
// true local to global method - fully defined
#if defined(__GNUC__)
[[gnu::flatten]]
......@@ -145,7 +184,7 @@ Trk::StraightLineSurface::globalToLocal(const Amg::Vector3D& glopos,
// to out-of-line Eigen code that is linked from other DSOs; in that case,
// it would not be optimized. Avoid this by forcing all Eigen code
// to be inlined here if possible.
__attribute__ ((flatten))
[[gnu::flatten]]
#endif
// isOnSurface check
bool
......
......@@ -34,7 +34,7 @@ Trk::Surface::Surface()
// to out-of-line Eigen code that is linked from other DSOs; in that case,
// it would not be optimized. Avoid this by forcing all Eigen code
// to be inlined here if possible.
__attribute__((flatten))
[[gnu::flatten]]
#endif
Trk::Surface::Surface(const Amg::Transform3D& tform)
: Trk::ObjectCounter<Trk::Surface>()
......@@ -76,7 +76,7 @@ Trk::Surface::Surface(const Trk::TrkDetElementBase& detelement,
// to out-of-line Eigen code that is linked from other DSOs; in that case,
// it would not be optimized. Avoid this by forcing all Eigen code
// to be inlined here if possible.
__attribute__((flatten))
[[gnu::flatten]]
#endif
// copy constructor - Attention! sets the associatedDetElement to 0 and the
// identifier to invalid
......@@ -97,7 +97,7 @@ Trk::Surface::Surface(const Surface& sf)
// to out-of-line Eigen code that is linked from other DSOs; in that case,
// it would not be optimized. Avoid this by forcing all Eigen code
// to be inlined here if possible.
__attribute__((flatten))
[[gnu::flatten]]
#endif
// copy constructor with shift - Attention! sets the associatedDetElement to 0
// and the identifier to invalid also invalidates the material layer
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment