Skip to content
Snippets Groups Projects
Commit 7d44cd10 authored by Christos Anastopoulos's avatar Christos Anastopoulos
Browse files

m_matstates was manipulated only by ExtrapolateM i.e new called only from this...

m_matstates was manipulated only by ExtrapolateM i.e new called only from this method, keep same behaviour
parent 4a3dc162
No related merge requests found
...@@ -154,7 +154,7 @@ private: ...@@ -154,7 +154,7 @@ private:
m_recallLayer(nullptr), m_recallLayer(nullptr),
m_recallTrackingVolume(nullptr), m_recallTrackingVolume(nullptr),
m_stateAtBoundarySurface(), m_stateAtBoundarySurface(),
m_matstates(std::make_unique< std::vector<const Trk::TrackStateOnSurface*> >()), m_matstates(nullptr),
m_mcsGarbageBin(), m_mcsGarbageBin(),
m_tpGarbageBin(){ m_tpGarbageBin(){
} }
...@@ -381,6 +381,7 @@ inline void Trk::GsfExtrapolator::emptyGarbageBins(Cache& cache) const ...@@ -381,6 +381,7 @@ inline void Trk::GsfExtrapolator::emptyGarbageBins(Cache& cache) const
cache.m_stateAtBoundarySurface=freshState; cache.m_stateAtBoundarySurface=freshState;
cache.m_mcsGarbageBin.clear(); cache.m_mcsGarbageBin.clear();
cache.m_tpGarbageBin.clear(); cache.m_tpGarbageBin.clear();
cache.m_matstates.reset(nullptr);
} }
......
...@@ -620,6 +620,7 @@ const std::vector<const Trk::TrackStateOnSurface*>* Trk::GsfExtrapolator::extrap ...@@ -620,6 +620,7 @@ const std::vector<const Trk::TrackStateOnSurface*>* Trk::GsfExtrapolator::extrap
============================================= */ ============================================= */
Cache cache{}; Cache cache{};
cache.m_matstates.reset(new std::vector<const Trk::TrackStateOnSurface*>);
// collect the material // collect the material
const MultiComponentState* parameterAtDestination = extrapolateImpl(cache,mcsparameters,sf,dir,bcheck,particle); const MultiComponentState* parameterAtDestination = extrapolateImpl(cache,mcsparameters,sf,dir,bcheck,particle);
// there are no parameters // there are no parameters
...@@ -1338,7 +1339,6 @@ const Trk::MultiComponentState* Trk::GsfExtrapolator::extrapolateToDestinationLa ...@@ -1338,7 +1339,6 @@ const Trk::MultiComponentState* Trk::GsfExtrapolator::extrapolateToDestinationLa
Material effects Material effects
---------------------------------------- */ ---------------------------------------- */
//std::cout << "CALLING PREUPDATE " <<std::endl;
const Trk::MultiComponentState* updatedState = ( startLayer != &layer ) ? m_materialUpdator->preUpdate( *destinationState, const Trk::MultiComponentState* updatedState = ( startLayer != &layer ) ? m_materialUpdator->preUpdate( *destinationState,
layer, layer,
......
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