Skip to content
Snippets Groups Projects
Commit cf4b6d7a authored by Johannes Elmsheuser's avatar Johannes Elmsheuser
Browse files

Merge branch 'cppcheck.TrkDistortedSurfaces-20210604' into 'master'

TrkDistortedSurfaces: Fix cppcheck warnings.

See merge request atlas/athena!44126
parents 457b3900 806c899d
No related branches found
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
......@@ -77,7 +77,7 @@ namespace Trk {
protected:
LineSaggingDescriptor* m_saggingDescriptor; //!< the distortion descriptor
CxxUtils::CachedValue<Amg::Vector3D> m_lineDirection; //!< nominal end position
CxxUtils::CachedValue<Amg::Vector3D> m_saggedLineDirection; //!< nominal end position
};
/** provide the Surface interface */
......
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
......@@ -20,7 +20,7 @@ Trk::SaggedLineSurface::SaggedLineSurface() :
Trk::DistortedSurface(),
Trk::StraightLineSurface(),
m_saggingDescriptor(nullptr),
m_lineDirection{}
m_saggedLineDirection{}
{}
Trk::SaggedLineSurface::SaggedLineSurface(
......@@ -31,14 +31,14 @@ Trk::SaggedLineSurface::SaggedLineSurface(
: Trk::DistortedSurface()
, Trk::StraightLineSurface(htrans, radius, halez)
, m_saggingDescriptor(lsd)
, m_lineDirection{}
, m_saggedLineDirection{}
{}
Trk::SaggedLineSurface::SaggedLineSurface(const Amg::Transform3D& htrans)
: Trk::DistortedSurface()
, Trk::StraightLineSurface(htrans)
, m_saggingDescriptor(nullptr)
, m_lineDirection{}
, m_saggedLineDirection{}
{}
Trk::SaggedLineSurface::SaggedLineSurface(
......@@ -47,7 +47,7 @@ Trk::SaggedLineSurface::SaggedLineSurface(
: Trk::DistortedSurface()
, Trk::StraightLineSurface(detelement, id)
, m_saggingDescriptor()
, m_lineDirection{}
, m_saggedLineDirection{}
{}
Trk::SaggedLineSurface::SaggedLineSurface(const Trk::TrkDetElementBase& detelement, const Identifier& id,
......@@ -55,7 +55,7 @@ Trk::SaggedLineSurface::SaggedLineSurface(const Trk::TrkDetElementBase& deteleme
Trk::DistortedSurface(),
Trk::StraightLineSurface(detelement,id),
m_saggingDescriptor(),
m_lineDirection{}
m_saggedLineDirection{}
{
m_saggingDescriptor = new Trk::LineSaggingDescriptor(wireLength, wireTension, linearDensity);
}
......@@ -64,7 +64,7 @@ Trk::SaggedLineSurface::SaggedLineSurface(const Trk::SaggedLineSurface& sls) :
Trk::DistortedSurface(sls),
Trk::StraightLineSurface(sls),
m_saggingDescriptor(new Trk::LineSaggingDescriptor(sls.distortionDescriptor())),
m_lineDirection{}
m_saggedLineDirection{}
{}
Trk::SaggedLineSurface::~SaggedLineSurface()
......@@ -78,7 +78,7 @@ Trk::SaggedLineSurface& Trk::SaggedLineSurface::operator=(const Trk::SaggedLineS
Trk::DistortedSurface::operator=(sls);
Trk::StraightLineSurface::operator=(sls);
delete m_saggingDescriptor;
m_lineDirection=sls.m_lineDirection;
m_saggedLineDirection=sls.m_saggedLineDirection;
m_saggingDescriptor=new Trk::LineSaggingDescriptor(sls.distortionDescriptor());
}
return *this;
......@@ -88,13 +88,13 @@ Trk::StraightLineSurface* Trk::SaggedLineSurface::correctedSurface(const Amg::Ve
{
// prepare
std::unique_ptr<Amg::Transform3D> newHepTransform =nullptr;
if (!m_lineDirection.isValid()) {
m_lineDirection.set(transform().rotation().col(3));
if (!m_saggedLineDirection.isValid()) {
m_saggedLineDirection.set(transform().rotation().col(3));
}
if (m_saggingDescriptor){
// first get the hep transform from the distortion descriptor
newHepTransform.reset(m_saggingDescriptor->correctedSurfaceTransform(
lp, center(), *(m_lineDirection.ptr())));
lp, center(), *(m_saggedLineDirection.ptr())));
} else if (Trk::Surface::associatedDetectorElement()) {
// get the sagging descriptor and the endpoints from GeoModel
// m_saggingDescriptor
......
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