Skip to content
Snippets Groups Projects
Commit bbe6c6e6 authored by Scott Snyder's avatar Scott Snyder Committed by Walter Lampl
Browse files

MuonAlignErrorBase: Fix cppcheck warnings.

MuonAlignErrorBase: Fix cppcheck warnings.

Base class initialization.
parent 8739616f
No related merge requests found
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
*/
#ifndef MUONALIGNERRORBASE_ALIGNMENTDEVIATION_H
......@@ -19,6 +19,10 @@ namespace Trk {
*/
class AlignmentDeviation {
public:
AlignmentDeviation (const std::vector<const Trk::RIO_OnTrack*>& hits, // not owned
std::size_t hitshash,
bool hitshashdone);
virtual ~AlignmentDeviation() {}
/**
......@@ -69,6 +73,16 @@ namespace Trk {
bool m_hitshashdone;
};
inline
AlignmentDeviation::AlignmentDeviation (const std::vector<const Trk::RIO_OnTrack*>& hits, // not owned
std::size_t hitshash,
bool hitshashdone)
: m_hits (hits),
m_hitshash (hitshash),
m_hitshashdone (hitshashdone)
{
}
inline void AlignmentDeviation::getListOfHits(std::vector<const Trk::RIO_OnTrack*>& hits) const { hits = m_hits; }
inline std::size_t AlignmentDeviation::getHashOfHits() const { return m_hitshash; }
......
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
*/
#include "MuonAlignErrorBase/AlignmentRotationDeviation.h"
......@@ -11,10 +11,9 @@ using namespace MuonAlign;
AlignmentRotationDeviation::AlignmentRotationDeviation(Amg::Vector3D center, Amg::Vector3D axis, double sigma,
const std::vector<const Trk::RIO_OnTrack*>& hits) :
m_center(std::move(center)), m_axis(std::move(axis)), m_sigma(sigma) {
m_hits = hits;
m_hitshash = 0;
m_hitshashdone = false;
AlignmentDeviation (hits, 0, false),
m_center(std::move(center)), m_axis(std::move(axis)), m_sigma(sigma)
{
}
int AlignmentRotationDeviation::nPar() const { return 1; }
......
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
*/
#include "MuonAlignErrorBase/AlignmentTranslationDeviation.h"
......@@ -10,10 +10,9 @@ using namespace MuonAlign;
AlignmentTranslationDeviation::AlignmentTranslationDeviation(const Amg::Vector3D& u, double sigma,
const std::vector<const Trk::RIO_OnTrack*>& hits) :
m_u(u.unit()), m_sigma(sigma) {
m_hits = hits;
m_hitshash = 0;
m_hitshashdone = false;
AlignmentDeviation (hits, 0, false),
m_u(u.unit()), m_sigma(sigma)
{
}
int AlignmentTranslationDeviation::nPar() const { return 1; }
......
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