From d0016ef07b5d8856e1ac1b616c22a588c8a48503 Mon Sep 17 00:00:00 2001 From: shahoian Date: Fri, 25 Sep 2020 21:40:24 +0200 Subject: [PATCH 1/2] Guard invasive operations on gGeoManager by mutex --- Detectors/Base/include/DetectorsBase/GeometryManager.h | 4 ++-- Detectors/Base/src/GeometryManager.cxx | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Detectors/Base/include/DetectorsBase/GeometryManager.h b/Detectors/Base/include/DetectorsBase/GeometryManager.h index f29e795664d3d..bc7fcdd353b1d 100644 --- a/Detectors/Base/include/DetectorsBase/GeometryManager.h +++ b/Detectors/Base/include/DetectorsBase/GeometryManager.h @@ -25,7 +25,7 @@ #include "FairLogger.h" // for LOG #include "MathUtils/Cartesian3D.h" #include "DetectorsBase/MatCell.h" - +#include class TGeoHMatrix; // lines 11-11 class TGeoManager; // lines 9-9 @@ -126,7 +126,6 @@ class GeometryManager : public TObject /// detector geometry. The output global matrix is stored in 'm'. /// Returns kFALSE in case TGeo has not been initialized or the volume path is not valid. static Bool_t getOriginalMatrixFromPath(const char* path, TGeoHMatrix& m); - private: /// sensitive volume identifier composed from (det_mask<IsClosed()) { LOG(ERROR) << "No active geometry or geometry not yet closed!"; ; return kFALSE; } - + std::lock_guard guard(sTGMutex); if (!gGeoManager->GetListOfPhysicalNodes()) { LOG(WARNING) << "gGeoManager doesn't contain any aligned nodes!"; @@ -91,7 +91,7 @@ Bool_t GeometryManager::getOriginalMatrixFromPath(const char* path, TGeoHMatrix& LOG(ERROR) << "Can't get the original global matrix! gGeoManager doesn't exist or it is still opened!"; return kFALSE; } - + std::lock_guard guard(sTGMutex); if (!gGeoManager->CheckPath(path)) { LOG(ERROR) << "Volume path " << path << " not valid!"; return kFALSE; @@ -288,7 +288,7 @@ GeometryManager::MatBudgetExt GeometryManager::meanMaterialBudgetExt(float x0, f for (int i = 3; i--;) { dir[i] *= invlen; } - + std::lock_guard guard(sTGMutex); // Initialize start point and direction TGeoNode* currentnode = gGeoManager->InitTrack(startD, dir); if (!currentnode) { @@ -380,7 +380,7 @@ o2::base::MatBudget GeometryManager::meanMaterialBudget(float x0, float y0, floa for (int i = 3; i--;) { dir[i] *= invlen; } - + std::lock_guard guard(sTGMutex); // Initialize start point and direction TGeoNode* currentnode = gGeoManager->InitTrack(startD, dir); if (!currentnode) { From 264293572276de9e6d5c9360cb56f291b1d24a68 Mon Sep 17 00:00:00 2001 From: shahoian Date: Fri, 25 Sep 2020 21:41:41 +0200 Subject: [PATCH 2/2] Enable material corrections in TRD tracking --- GPU/GPUTracking/TRDTracking/GPUTRDInterfaces.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPU/GPUTracking/TRDTracking/GPUTRDInterfaces.h b/GPU/GPUTracking/TRDTracking/GPUTRDInterfaces.h index 990b9aa318c51..42d762b8480bd 100644 --- a/GPU/GPUTracking/TRDTracking/GPUTRDInterfaces.h +++ b/GPU/GPUTracking/TRDTracking/GPUTRDInterfaces.h @@ -200,7 +200,7 @@ class propagatorInterface propagatorInterface(const propagatorInterface&) = delete; propagatorInterface& operator=(const propagatorInterface&) = delete; - bool propagateToX(float x, float maxSnp, float maxStep) { return mProp->PropagateToXBxByBz(*mParam, x, 0.13957, maxSnp, maxStep, o2::base::Propagator::MatCorrType::USEMatCorrNONE); } + bool propagateToX(float x, float maxSnp, float maxStep) { return mProp->PropagateToXBxByBz(*mParam, x, 0.13957, maxSnp, maxStep); } int getPropagatedYZ(My_Float x, My_Float& projY, My_Float& projZ) { return static_cast(mParam->getYZAt(x, mProp->getNominalBz(), projY, projZ)); } void setTrack(trackInterface* trk) { mParam = trk; }