diff --git a/TrackingTools/TrajectoryState/interface/BasicTrajectoryState.h b/TrackingTools/TrajectoryState/interface/BasicTrajectoryState.h index f24e2145c2a68..4884bf9076f99 100644 --- a/TrackingTools/TrajectoryState/interface/BasicTrajectoryState.h +++ b/TrackingTools/TrajectoryState/interface/BasicTrajectoryState.h @@ -105,7 +105,18 @@ class BasicTrajectoryState : public BTSCount { */ BasicTrajectoryState( const GlobalTrajectoryParameters& par, const SurfaceType& aSurface, - const SurfaceSide side = SurfaceSideDefinition::atCenterOfSurface); + const SurfaceSide side = SurfaceSideDefinition::atCenterOfSurface) : + theFreeState(par), + theLocalError(InvalidError()), + theLocalParameters(), + theLocalParametersValid(false), + theValid(true), + theSurfaceSide(side), + theSurfaceP( &aSurface), + theWeight(1.) + {} + + /** Constructor from global parameters, errors and surface. For surfaces * with material the side of the surface should be specified explicitely. */ @@ -296,7 +307,9 @@ class BasicTrajectoryState : public BTSCount { const LocalTrajectoryError& err, const SurfaceSide side) GCC11_FINAL; - + CurvilinearTrajectoryError & setCurvilinearError() { + return theFreeState.setCurvilinearError(); + } public: virtual std::vector components() const; diff --git a/TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h b/TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h index 27d9e6a103daa..2712863719cf0 100644 --- a/TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h +++ b/TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h @@ -133,6 +133,10 @@ class FreeTrajectoryState { createCurvilinearError(CartesianTrajectoryError(err)); } + CurvilinearTrajectoryError & setCurvilinearError() { + return theCurvilinearError; + } + void setCurvilinearError(const CurvilinearTrajectoryError &err) { theCurvilinearError = err; } diff --git a/TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h b/TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h index efc27d6560e22..39e3923de03e9 100644 --- a/TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h +++ b/TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h @@ -241,6 +241,10 @@ class TrajectoryStateOnSurface : private BasicTrajectoryState::Proxy { const SurfaceSide side) {unsharedData().update(p, err, side);} + CurvilinearTrajectoryError & setCurvilinearError() { + return sharedData().setCurvilinearError(); + } + }; diff --git a/TrackingTools/TrajectoryState/src/BasicTrajectoryState.cc b/TrackingTools/TrajectoryState/src/BasicTrajectoryState.cc index 6ddb5ad3a945a..893c8dc10c6b4 100644 --- a/TrackingTools/TrajectoryState/src/BasicTrajectoryState.cc +++ b/TrackingTools/TrajectoryState/src/BasicTrajectoryState.cc @@ -76,19 +76,6 @@ BasicTrajectoryState( const FreeTrajectoryState& fts, theWeight(1.) {} -BasicTrajectoryState:: -BasicTrajectoryState( const GlobalTrajectoryParameters& par, - const SurfaceType& aSurface, - const SurfaceSide side) : - theFreeState(par), - theLocalError(InvalidError()), - theLocalParameters(), - theLocalParametersValid(false), - theValid(true), - theSurfaceSide(side), - theSurfaceP( &aSurface), - theWeight(1.) -{} BasicTrajectoryState:: BasicTrajectoryState( const GlobalTrajectoryParameters& par,