diff --git a/Tracking/TrkExtrapolation/TrkExTools/CMakeLists.txt b/Tracking/TrkExtrapolation/TrkExTools/CMakeLists.txt index fbefa79a47da9d078016531f0ff153529fdacd97..353e3da845d23f8313c849708be7eaac0dcbfe2f 100644 --- a/Tracking/TrkExtrapolation/TrkExTools/CMakeLists.txt +++ b/Tracking/TrkExtrapolation/TrkExTools/CMakeLists.txt @@ -41,7 +41,10 @@ atlas_add_component( TrkExTools src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel GeoPrimitives EventPrimitives xAODTracking GaudiKernel TrkDetDescrUtils TrkGeometry TrkSurfaces TrkVolumes TrkEventPrimitives TrkNeutralParameters TrkParameters TrkExInterfaces TrkExUtils AthContainers CxxUtils TrkDetDescrInterfaces TrkEventUtils TrkMaterialOnTrack TrkParticleBase TrkTrack ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel GeoPrimitives + EventPrimitives xAODTracking GaudiKernel TrkDetDescrUtils TrkGeometry TrkSurfaces TrkVolumes TrkEventPrimitives + TrkNeutralParameters TrkParameters TrkExInterfaces TrkExUtils AthContainers CxxUtils TrkDetDescrInterfaces TrkEventUtils + TrkMaterialOnTrack TrkParticleBase TrkTrack ) # Install files from the package: atlas_install_headers( TrkExTools ) diff --git a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/EnergyLossUpdator.h b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/EnergyLossUpdator.h index ef6c83823c520da9a7ff09c9b90fd5e7dc729ddc..3a6725b91f025971a62d2acd6dfd37992853192d 100755 --- a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/EnergyLossUpdator.h +++ b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/EnergyLossUpdator.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -109,18 +109,18 @@ namespace Trk { virtual ~EnergyLossUpdator(); /** AlgTool initailize method.*/ - StatusCode initialize(); + virtual StatusCode initialize() override; /** AlgTool finalize method */ - StatusCode finalize(); + virtual StatusCode finalize() override; /** dEdX calculation when providing MaterialProperties, a momentum, a pathlength, and a ParicleHypothesis: Units: [MeV/mm] */ - double dEdX(const MaterialProperties& mat, - double p, - ParticleHypothesis particle=pion) const; + virtual double dEdX(const MaterialProperties& mat, + double p, + ParticleHypothesis particle=pion) const override; /** deltaE calculation using dEdX and integrating along pathlength, @@ -131,35 +131,34 @@ namespace Trk { mpv steers the most probable energy loss */ - EnergyLoss* energyLoss( + virtual EnergyLoss* energyLoss( const MaterialProperties& mat, double p, double pathcorrection, PropDirection dir=alongMomentum, ParticleHypothesis particle=pion, bool mpv = false, - bool usePDGformula = false) const; + bool usePDGformula = false) const override; /** Method to recalculate Eloss values for the fit setting an elossFlag using as an input the detailed Eloss information Calorimeter energy, error momentum and momentum error */ - EnergyLoss* updateEnergyLoss(EnergyLoss* eLoss, double caloEnergy, double caloEnergyError, - double pCaloEntry, double momentumError, int & elossFlag) const; + virtual EnergyLoss* updateEnergyLoss(EnergyLoss* eLoss, double caloEnergy, double caloEnergyError, + double pCaloEntry, double momentumError, int & elossFlag) const override; /** Routine to calculate X0 and Eloss scale factors for the Calorimeter and Muon System */ - void getX0ElossScales(int icalo, double eta, double phi, double & X0Scale, double & ElossScale ) const; + virtual void getX0ElossScales(int icalo, double eta, double phi, double & X0Scale, double & ElossScale ) const override; + + private: /** Method to return the variance of the change in q/p for the Bethe-Heitler parameterisation */ double varianceDeltaQoverP(const MaterialProperties&, double p, double pathcorrection, PropDirection direction = alongMomentum, - ParticleHypothesis particleHypothesis = electron ) const; + ParticleHypothesis particleHypothesis = electron ) const ; - private: - - Trk::MaterialInteraction m_matInt; /** dEdX BetheBloch calculation: Units: [MeV] */ @@ -182,12 +181,13 @@ namespace Trk { double dEdXBetheHeitler(const MaterialProperties& mat, double initialE, ParticleHypothesis particle=pion) const; - + + Trk::MaterialInteraction m_matInt; + double m_stragglingErrorScale; //!< stragglingErrorScale + double m_mpvScale; //!< a scalor that can be introduced for the MPV bool m_useTrkUtils; //!< use eloss parametrisation from TrkUtils MaterialInterAction.h bool m_gaussianVavilovTheory; //!< include energy loss straggling or not bool m_useBetheBlochForElectrons; //!< use adopted bethe bloch for electrons - double m_stragglingErrorScale; //!< stragglingErrorScale - double m_mpvScale; //!< a scalor that can be introduced for the MPV bool m_mpvSigmaParametric; //!< take the (crude) parametric mpv sigma bool m_detailedEloss; //!< provide extended EnergyLoss info bool m_optimalRadiation; //!< use calorimeter more optimal for radiation detection diff --git a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/MaterialEffectsUpdator.h b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/MaterialEffectsUpdator.h index de940472d472ae261690d9ec63088e26a6116821..90bc0eaff49363a36bbd3dfe76289859ad3be563 100755 --- a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/MaterialEffectsUpdator.h +++ b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/MaterialEffectsUpdator.h @@ -18,10 +18,13 @@ #include "TrkEventPrimitives/ParticleHypothesis.h" #include "TrkParameters/TrackParameters.h" #include "TrkExUtils/MaterialUpdateMode.h" + #include <vector> #include <string> -#define TRKEXTOOLS_MAXUPDATES 100 +#include <boost/thread/tss.hpp> + +#define TRKEXTOOLS_MAXUPDATES 100 #ifndef COVARIANCEUPDATEWITHCHECK #define COVARIANCEUPDATEWITHCHECK(cov, sign, value) cov += ( sign > 0 ? value : ( value > cov ? 0 : sign*value ) ) #endif @@ -65,9 +68,9 @@ class MaterialEffectsUpdator : public AthAlgTool, virtual ~MaterialEffectsUpdator(); /** AlgTool initailize method.*/ - StatusCode initialize() override; + virtual StatusCode initialize() override ; /** AlgTool finalize method */ - StatusCode finalize() override; + StatusCode finalize() override ; /* * The concrete cache class for this specialization of the IMaterialEffectsUpdator @@ -90,7 +93,7 @@ class MaterialEffectsUpdator : public AthAlgTool, virtual std::unique_ptr<ICache> getCache() const override { return std::make_unique<Cache>(); - } + } /** Updator interface (full update for a layer) ---> ALWAYS the same pointer is returned @@ -101,7 +104,7 @@ class MaterialEffectsUpdator : public AthAlgTool, const Layer& sf, PropDirection dir=alongMomentum, ParticleHypothesis particle=pion, - MaterialUpdateMode matupmode=addNoise) const override{ + MaterialUpdateMode matupmode=addNoise) const override { Cache& cache= dynamic_cast<Cache&> (icache); const TrackParameters* outparam = updateImpl(cache,parm,sf,dir,particle,matupmode); @@ -116,7 +119,7 @@ class MaterialEffectsUpdator : public AthAlgTool, virtual const TrackParameters* update(ICache& icache, const TrackParameters* parm, const MaterialEffectsOnTrack& meff, Trk::ParticleHypothesis particle=pion, - MaterialUpdateMode matupmode=addNoise) const override{ + MaterialUpdateMode matupmode=addNoise) const override { Cache& cache= dynamic_cast<Cache&> (icache); const TrackParameters* outparam = updateImpl(cache,parm,meff,particle,matupmode); @@ -132,7 +135,7 @@ class MaterialEffectsUpdator : public AthAlgTool, const Layer& sf, PropDirection dir=alongMomentum, ParticleHypothesis particle=pion, - MaterialUpdateMode matupmode=addNoise) const override{ + MaterialUpdateMode matupmode=addNoise) const override { Cache& cache= dynamic_cast<Cache&> (icache); const TrackParameters* outparam = preUpdateImpl(cache,parm,sf,dir,particle,matupmode); @@ -159,7 +162,7 @@ class MaterialEffectsUpdator : public AthAlgTool, double pathcorrection, PropDirection dir=alongMomentum, ParticleHypothesis particle=pion, - MaterialUpdateMode matupmode=addNoise) const override{ + MaterialUpdateMode matupmode=addNoise) const override { Cache& cache= dynamic_cast<Cache&> (icache); const TrackParameters* outparam = updateImpl(cache,parm,mprop,pathcorrection,dir,particle,matupmode); @@ -167,7 +170,7 @@ class MaterialEffectsUpdator : public AthAlgTool, } /** Validation Action - calls the writing and resetting of the TTree variables */ - virtual void validationAction(ICache& icache) const override{ + virtual void validationAction(ICache& icache) const override { Cache& cache= dynamic_cast<Cache&> (icache); validationActionImpl(cache); @@ -177,7 +180,7 @@ class MaterialEffectsUpdator : public AthAlgTool, /** Only has an effect if m_landauMode == true. Resets mutable variables used for non-local calculation of energy loss if parm == 0. Otherwise, modifies parm with the final update of the covariance matrix*/ - virtual void modelAction(ICache& icache, const TrackParameters* parm = 0) const override{ + virtual void modelAction(ICache& icache, const TrackParameters* parm = 0) const override { Cache& cache= dynamic_cast<Cache&> (icache); modelActionImpl(cache,parm); @@ -192,7 +195,7 @@ class MaterialEffectsUpdator : public AthAlgTool, const Layer& sf, PropDirection dir=alongMomentum, ParticleHypothesis particle=pion, - MaterialUpdateMode matupmode=addNoise) const override{ + MaterialUpdateMode matupmode=addNoise) const override { Cache& cache = getTLSCache(); const TrackParameters* outparam = updateImpl(cache,parm,sf,dir,particle,matupmode); @@ -202,7 +205,7 @@ class MaterialEffectsUpdator : public AthAlgTool, virtual const TrackParameters* update(const TrackParameters* parm, const MaterialEffectsOnTrack& meff, Trk::ParticleHypothesis particle=pion, - MaterialUpdateMode matupmode=addNoise) const override{ + MaterialUpdateMode matupmode=addNoise) const override { Cache& cache = getTLSCache(); const TrackParameters* outparam = updateImpl(cache,parm,meff,particle,matupmode); return outparam; @@ -212,7 +215,7 @@ class MaterialEffectsUpdator : public AthAlgTool, const Layer& sf, PropDirection dir=alongMomentum, ParticleHypothesis particle=pion, - MaterialUpdateMode matupmode=addNoise) const override{ + MaterialUpdateMode matupmode=addNoise) const override { Cache& cache = getTLSCache(); const TrackParameters* outparam = preUpdateImpl(cache,parm,sf,dir,particle,matupmode); return outparam; @@ -233,7 +236,7 @@ class MaterialEffectsUpdator : public AthAlgTool, double pathcorrection, PropDirection dir=alongMomentum, ParticleHypothesis particle=pion, - MaterialUpdateMode matupmode=addNoise) const override{ + MaterialUpdateMode matupmode=addNoise) const override { Cache& cache = getTLSCache(); const TrackParameters* outparam = updateImpl(cache,parm,mprop,pathcorrection,dir,particle,matupmode); return outparam; @@ -245,7 +248,7 @@ class MaterialEffectsUpdator : public AthAlgTool, return; } - virtual void modelAction(const TrackParameters* parm = 0) const override{ + virtual void modelAction(const TrackParameters* parm = 0) const override { Cache& cache = getTLSCache(); modelActionImpl(cache,parm); return; @@ -328,13 +331,13 @@ class MaterialEffectsUpdator : public AthAlgTool, ToolHandle< IMaterialMapper > m_materialMapper; //!< the material mapper for recording the layer material /* - * TLS part - * The solution adopted here is an effort to implement + * TLS part + * The solution adopted here is an effort to implement * "Schmidt, Douglas & Pryce, Nat & H. Harrison, Timothy. (1998). * Thread-Specific Storage for C/C++ - An Object * Behavioral Pattern for Accessing per-Thread State Efficiently." * Published in "More C++ Gems (SIGS Reference Library)". - * Adopted here via boost::thread_specific_ptr + * Done here via boost::thread_specific_ptr */ mutable boost::thread_specific_ptr<Cache> m_cache_tls; @@ -346,8 +349,6 @@ class MaterialEffectsUpdator : public AthAlgTool, } return *cache; } - - }; } // end of namespace diff --git a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/MultipleScatteringUpdator.h b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/MultipleScatteringUpdator.h index 7a11175e96bb9aae4ff0c0d59699407ad86ef397..601ee9fae845311f38eba344c4736cbab3b29807 100755 --- a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/MultipleScatteringUpdator.h +++ b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/MultipleScatteringUpdator.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -50,19 +50,19 @@ namespace Trk { virtual ~MultipleScatteringUpdator(); /** AlgTool initailize method.*/ - StatusCode initialize(); + virtual StatusCode initialize() override; /** AlgTool finalize method */ - StatusCode finalize(); + virtual StatusCode finalize() override; /** Calculate the sigma on theta introduced by multiple scattering, according to the RutherFord-Scott Formula */ - double sigmaSquare(const MaterialProperties& mat, + virtual double sigmaSquare(const MaterialProperties& mat, double p, double pathcorrection, ParticleHypothesis particle=pion, - double deltaE=0.) const; + double deltaE=0.) const override; private: @@ -76,7 +76,7 @@ namespace Trk { /** Random Generator service */ ServiceHandle<IAtRndmGenSvc> m_rndGenSvc; /** Random engine */ - CLHEP::HepRandomEngine* m_randomEngine; + CLHEP::HepRandomEngine* m_randomEngine; std::string m_randomEngineName; //!< Name of the random number stream }; diff --git a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Navigator.h b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Navigator.h index 567f05c3968b327283612c4fc98c4bf48f5fa876..817ec5b19520d6cc71ae74e8be1858a55b036fe3 100755 --- a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Navigator.h +++ b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Navigator.h @@ -22,7 +22,8 @@ // STD #include <cstring> #include <exception> -#include <atomic> + +#include "GaudiKernel/Counters.h" namespace Trk { @@ -32,7 +33,7 @@ namespace Trk { /** Exception to be thrown when TrackingGeometry not found */ class NavigatorException : public std::exception { - virtual const char* what() const throw() + const char* what() const throw() { return "Problem with TrackingGeometry loading"; } }; @@ -67,35 +68,35 @@ namespace Trk { virtual ~Navigator(); /** AlgTool initailize method.*/ - StatusCode initialize(); + StatusCode initialize() override; /** AlgTool finalize method */ - StatusCode finalize(); + StatusCode finalize() override; /** INavigator interface method - returns the TrackingGeometry used for navigation */ - virtual const TrackingGeometry* trackingGeometry() const override; + virtual const TrackingGeometry* trackingGeometry() const override final; /** INavigator interface methods - global search for the Volume one is in */ - virtual const TrackingVolume* volume(const Amg::Vector3D& gp) const override; + virtual const TrackingVolume* volume(const Amg::Vector3D& gp) const override final; /** INavigator interface method - forward hightes TrackingVolume */ - virtual const TrackingVolume* highestVolume() const override; + virtual const TrackingVolume* highestVolume() const override final; /** INavigator interface methods - getting the next BoundarySurface not knowing the Volume*/ virtual const BoundarySurface<TrackingVolume>* nextBoundarySurface( const IPropagator& prop, const TrackParameters& parms, - PropDirection dir) const override; + PropDirection dir) const override final; /** INavigator interface methods - getting the next BoundarySurface when knowing the Volume*/ virtual const BoundarySurface<TrackingVolume>* nextBoundarySurface( const IPropagator& prop, const TrackParameters& parms, PropDirection dir, - const TrackingVolume& vol ) const override; + const TrackingVolume& vol ) const override final; /** INavigator interface method - getting the next Volume and the parameter for the next Navigation*/ virtual const NavigationCell nextTrackingVolume( const IPropagator& prop, const TrackParameters& parms, PropDirection dir, - const TrackingVolume& vol) const override; + const TrackingVolume& vol) const override final; /** INavigator interface method - getting the next Volume and the parameter for the next Navigation - contains full loop over volume boundaries @@ -106,19 +107,19 @@ namespace Trk { PropDirection dir, ParticleHypothesis particle, const TrackingVolume& vol, - double& path) const override; + double& path) const override final; /** INavigator interface method - getting the closest TrackParameters from a Track to a Surface*/ virtual const TrackParameters* closestParameters( const Track& trk, const Surface& sf, - const IPropagator* prop = 0) const override; + const IPropagator* prop = 0) const override final; /** INavigator method to resolve navigation at boundary */ virtual bool atVolumeBoundary( const Trk::TrackParameters* parms, const Trk::TrackingVolume* vol, Trk::PropDirection dir, const Trk::TrackingVolume*& nextVol, - double tol) const override; + double tol) const override final; /** Validation Action: Can be implemented optionally, outside access to internal validation steps */ @@ -163,18 +164,18 @@ namespace Trk { // ------ PERFORMANCE STATISTICS -------------------------------- // /* All performance stat counters are atomic (the simplest solution perhaps not the most performant one)*/ - mutable std::atomic<int> m_forwardCalls; //!< counter for forward nextBounday calls - mutable std::atomic<int> m_forwardFirstBoundSwitch; //!< counter for failed first forward nextBounday calls - mutable std::atomic<int> m_forwardSecondBoundSwitch; //!< counter for failed second forward nextBounday calls - mutable std::atomic<int> m_forwardThirdBoundSwitch; //!< counter for failed third forward nextBounday calls + mutable Gaudi::Accumulators::Counter<int> m_forwardCalls; //!< counter for forward nextBounday calls + mutable Gaudi::Accumulators::Counter<int> m_forwardFirstBoundSwitch; //!< counter for failed first forward nextBounday calls + mutable Gaudi::Accumulators::Counter<int> m_forwardSecondBoundSwitch; //!< counter for failed second forward nextBounday calls + mutable Gaudi::Accumulators::Counter<int> m_forwardThirdBoundSwitch; //!< counter for failed third forward nextBounday calls - mutable std::atomic<int> m_backwardCalls; //!< counter for backward nextBounday calls - mutable std::atomic<int> m_backwardFirstBoundSwitch; //!< counter for failed first backward nextBounday calls - mutable std::atomic<int> m_backwardSecondBoundSwitch; //!< counter for failed second backward nextBounday calls - mutable std::atomic<int> m_backwardThirdBoundSwitch; //!< counter for failed third backward nextBounday calls + mutable Gaudi::Accumulators::Counter<int> m_backwardCalls; //!< counter for backward nextBounday calls + mutable Gaudi::Accumulators::Counter<int> m_backwardFirstBoundSwitch; //!< counter for failed first backward nextBounday calls + mutable Gaudi::Accumulators::Counter<int> m_backwardSecondBoundSwitch; //!< counter for failed second backward nextBounday calls + mutable Gaudi::Accumulators::Counter<int> m_backwardThirdBoundSwitch; //!< counter for failed third backward nextBounday calls - mutable std::atomic<int> m_outsideVolumeCase; //!< counter for navigation-break in outside volume cases (ovc) - mutable std::atomic<int> m_sucessfulBackPropagation; //!< counter for sucessful recovery of navigation-break in ovc + mutable Gaudi::Accumulators::Counter<int> m_outsideVolumeCase; //!< counter for navigation-break in outside volume cases (ovc) + mutable Gaudi::Accumulators::Counter<int> m_sucessfulBackPropagation; //!< counter for sucessful recovery of navigation-break in ovc }; diff --git a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/NavigatorValidation.h b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/NavigatorValidation.h index 988598d33e365aa9dcb303a2743911236b990125..49ccce0cb0d6a420bf1136900d45474ae57e5c52 100755 --- a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/NavigatorValidation.h +++ b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/NavigatorValidation.h @@ -38,13 +38,13 @@ namespace Trk{ virtual ~NavigatorValidation(); /** Validation Action: Can be implemented optionally, outside access to internal validation steps */ - virtual void validationAction() const override; + virtual void validationAction() const override final; private: - virtual void validationInitialize() override ; + virtual void validationInitialize() override final; /* no-op here */ - virtual void validationFill(const Trk::TrackParameters* trackPar) const override; + virtual void validationFill(const Trk::TrackParameters* trackPar) const override final; //------VALIDATION MODE SECTION ----------------------------------// std::string m_validationTreeName; //!< validation tree name - to be acessed by this from root diff --git a/Tracking/TrkExtrapolation/TrkExTools/src/EnergyLossUpdator.cxx b/Tracking/TrkExtrapolation/TrkExTools/src/EnergyLossUpdator.cxx index d5ef45078cb58254302a4d185d1b56f1335c2642..061cb7c12f86e37a4f1b9d8fb91e42fcb8a013ef 100755 --- a/Tracking/TrkExtrapolation/TrkExTools/src/EnergyLossUpdator.cxx +++ b/Tracking/TrkExtrapolation/TrkExTools/src/EnergyLossUpdator.cxx @@ -35,11 +35,11 @@ constexpr double s_mpv_p2 = -4.85133e-01; // constructor Trk::EnergyLossUpdator::EnergyLossUpdator(const std::string &t, const std::string &n, const IInterface *p) : AthAlgTool(t, n, p), + m_stragglingErrorScale(1.), + m_mpvScale(0.98), m_useTrkUtils(true), m_gaussianVavilovTheory(false), m_useBetheBlochForElectrons(true), - m_stragglingErrorScale(1.), - m_mpvScale(0.98), m_mpvSigmaParametric(false), m_detailedEloss(true), m_optimalRadiation(true) { diff --git a/Tracking/TrkExtrapolation/TrkExTools/src/Navigator.cxx b/Tracking/TrkExtrapolation/TrkExTools/src/Navigator.cxx index 04a67fa28d92b909900f4a0a8f5ebc9d8e8cb55c..ba05ea279a6f4f15b22ab34d8b8579af68888fb3 100755 --- a/Tracking/TrkExtrapolation/TrkExTools/src/Navigator.cxx +++ b/Tracking/TrkExtrapolation/TrkExTools/src/Navigator.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -51,16 +51,16 @@ Trk::Navigator::Navigator(const std::string &t, const std::string &n, const IInt m_useStraightLineApproximation(false), m_searchWithDistance(true), m_fastField(false), - m_forwardCalls{0}, - m_forwardFirstBoundSwitch{0}, - m_forwardSecondBoundSwitch{0}, - m_forwardThirdBoundSwitch{0}, - m_backwardCalls{0}, - m_backwardFirstBoundSwitch{0}, - m_backwardSecondBoundSwitch{0}, - m_backwardThirdBoundSwitch{0}, - m_outsideVolumeCase{0}, - m_sucessfulBackPropagation{0} + m_forwardCalls{}, + m_forwardFirstBoundSwitch{}, + m_forwardSecondBoundSwitch{}, + m_forwardThirdBoundSwitch{}, + m_backwardCalls{}, + m_backwardFirstBoundSwitch{}, + m_backwardSecondBoundSwitch{}, + m_backwardThirdBoundSwitch{}, + m_outsideVolumeCase{}, + m_sucessfulBackPropagation{} { declareInterface<INavigator>(this); // steering of algorithms @@ -244,12 +244,12 @@ Trk::Navigator::nextTrackingVolume(const Trk::IPropagator &prop, int tryBoundary = 0; /* local counted to increment in the loop*/ - int forwardFirstBoundSwitch{0}; - int forwardSecondBoundSwitch{0}; - int forwardThirdBoundSwitch{0}; - int backwardFirstBoundSwitch{0}; - int backwardSecondBoundSwitch{0}; - int backwardThirdBoundSwitch{0}; + auto forwardFirstBoundSwitch=m_forwardFirstBoundSwitch.buffer(); + auto forwardSecondBoundSwitch=m_forwardSecondBoundSwitch.buffer(); + auto forwardThirdBoundSwitch=m_forwardThirdBoundSwitch.buffer(); + auto backwardFirstBoundSwitch=m_backwardFirstBoundSwitch.buffer(); + auto backwardSecondBoundSwitch=m_backwardSecondBoundSwitch.buffer(); + auto backwardThirdBoundSwitch=m_backwardThirdBoundSwitch.buffer(); for (surfAcc.begin(); surfAcc.end(); surfAcc.operator ++ ()) { ++tryBoundary; @@ -323,14 +323,6 @@ Trk::Navigator::nextTrackingVolume(const Trk::IPropagator &prop, } // --------------------------------------------------- } - /* update the object level atomic ones*/ - m_forwardFirstBoundSwitch+=forwardFirstBoundSwitch; - m_forwardSecondBoundSwitch+=forwardSecondBoundSwitch; - m_forwardThirdBoundSwitch+=forwardThirdBoundSwitch; - m_backwardFirstBoundSwitch+=backwardFirstBoundSwitch; - m_backwardSecondBoundSwitch+=backwardSecondBoundSwitch; - m_backwardThirdBoundSwitch+=backwardThirdBoundSwitch; - // return what you have : no idea return Trk::NavigationCell(0, 0); }