Skip to content
Snippets Groups Projects

Revert "copy covariance matrix rather than keep pointer in CubicStateInterpolationTraj"

Merged Carlos Vazquez Sierra requested to merge revert-29e7b482 into CVS_test
2 files
+ 13
13
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -18,7 +18,7 @@
@@ -18,7 +18,7 @@
namespace LHCb
namespace LHCb
{
{
class CubicStateInterpolationTraj : public CubicStateVectorInterpolationTraj
class CubicStateInterpolationTraj : public CubicStateVectorInterpolationTraj
{
{
public:
public:
/// Constructor from two states
/// Constructor from two states
@@ -40,14 +40,14 @@ namespace LHCb
@@ -40,14 +40,14 @@ namespace LHCb
Gaudi::TrackSymMatrix covariance( double z ) const ;
Gaudi::TrackSymMatrix covariance( double z ) const ;
/// Calculate state at location z
/// Calculate state at location z
State state(double z) const override final ;
State state(double z) const override;
/// Clone this trajectory
/// Clone this trajectory
std::unique_ptr<Trajectory> clone() const override { return std::unique_ptr<Trajectory>(new CubicStateInterpolationTraj(*this)) ; }
std::unique_ptr<Trajectory> clone() const override { return std::unique_ptr<Trajectory>(new CubicStateInterpolationTraj(*this)) ; }
private:
private:
Gaudi::TrackSymMatrix m_covbegin ; ///< Covariance at first state
const Gaudi::TrackSymMatrix* m_covbegin = nullptr ; ///< Covariance at first state
Gaudi::TrackSymMatrix m_covend ; ///< Covariance at second state
const Gaudi::TrackSymMatrix* m_covend = nullptr; ///< Covariance at second state
};
};
/*************************************************************************************************/
/*************************************************************************************************/
@@ -58,7 +58,7 @@ namespace LHCb
@@ -58,7 +58,7 @@ namespace LHCb
CubicStateInterpolationTraj::CubicStateInterpolationTraj(const LHCb::State& begin,const LHCb::State& end)
CubicStateInterpolationTraj::CubicStateInterpolationTraj(const LHCb::State& begin,const LHCb::State& end)
:
:
CubicStateVectorInterpolationTraj(begin,end),
CubicStateVectorInterpolationTraj(begin,end),
m_covbegin(begin.covariance()), m_covend(end.covariance())
m_covbegin(&(begin.covariance())), m_covend(&(end.covariance()))
{
{
}
}
@@ -66,7 +66,7 @@ namespace LHCb
@@ -66,7 +66,7 @@ namespace LHCb
CubicStateInterpolationTraj::CubicStateInterpolationTraj(const LHCb::State& state,const Gaudi::XYZVector& bfield)
CubicStateInterpolationTraj::CubicStateInterpolationTraj(const LHCb::State& state,const Gaudi::XYZVector& bfield)
:
:
CubicStateVectorInterpolationTraj(state,bfield),
CubicStateVectorInterpolationTraj(state,bfield),
m_covbegin(state.covariance()), m_covend(m_covbegin)
m_covbegin(&(state.covariance())), m_covend(m_covbegin)
{
{
}
}
@@ -74,15 +74,15 @@ namespace LHCb
@@ -74,15 +74,15 @@ namespace LHCb
void CubicStateInterpolationTraj::init(const LHCb::State& begin,const LHCb::State& end)
void CubicStateInterpolationTraj::init(const LHCb::State& begin,const LHCb::State& end)
{
{
CubicStateVectorInterpolationTraj::init(begin,end) ;
CubicStateVectorInterpolationTraj::init(begin,end) ;
m_covbegin = begin.covariance() ;
m_covbegin = &(begin.covariance()) ;
m_covend = end.covariance() ;
m_covend = &(end.covariance()) ;
}
}
inline
inline
void CubicStateInterpolationTraj::init(const LHCb::State& state,const Gaudi::XYZVector& bfield)
void CubicStateInterpolationTraj::init(const LHCb::State& state,const Gaudi::XYZVector& bfield)
{
{
CubicStateVectorInterpolationTraj::init(state,bfield) ;
CubicStateVectorInterpolationTraj::init(state,bfield) ;
m_covbegin = m_covend = state.covariance() ;
m_covbegin = m_covend = &(state.covariance()) ;
}
}
}
}
Loading