Skip to content

Commit

Permalink
prepare to avoid copy of matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
VinInn committed Apr 28, 2014
1 parent 3ae8b19 commit cab33e7
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 15 deletions.
17 changes: 15 additions & 2 deletions TrackingTools/TrajectoryState/interface/BasicTrajectoryState.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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<TrajectoryStateOnSurface> components() const;
Expand Down
4 changes: 4 additions & 0 deletions TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ class FreeTrajectoryState {
createCurvilinearError(CartesianTrajectoryError(err));
}

CurvilinearTrajectoryError & setCurvilinearError() {
return theCurvilinearError;
}

void setCurvilinearError(const CurvilinearTrajectoryError &err) {
theCurvilinearError = err;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ class TrajectoryStateOnSurface : private BasicTrajectoryState::Proxy {
const SurfaceSide side) {unsharedData().update(p, err, side);}


CurvilinearTrajectoryError & setCurvilinearError() {
return sharedData().setCurvilinearError();
}



};
Expand Down
13 changes: 0 additions & 13 deletions TrackingTools/TrajectoryState/src/BasicTrajectoryState.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit cab33e7

Please sign in to comment.