Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Detectors/Base/include/DetectorsBase/GeometryManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "FairLogger.h" // for LOG
#include "MathUtils/Cartesian3D.h"
#include "DetectorsBase/MatCell.h"

#include <mutex>
class TGeoHMatrix; // lines 11-11
class TGeoManager; // lines 9-9

Expand Down Expand Up @@ -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<<sDetOffset)|(sensid&sSensorMask)
#ifdef ENABLE_UPGRADES
Expand All @@ -136,6 +135,7 @@ class GeometryManager : public TObject
#endif
static constexpr UInt_t sSensorMask =
(0x1 << sDetOffset) - 1; /// mask=max sensitive volumes allowed per detector (0xffff)
static std::mutex sTGMutex;

ClassDefOverride(GeometryManager, 0); // Manager of geometry information for alignment
};
Expand Down
10 changes: 5 additions & 5 deletions Detectors/Base/src/GeometryManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ using namespace o2::base;
/// Implementation of GeometryManager, the geometry manager class which interfaces to TGeo and
/// the look-up table mapping unique volume indices to symbolic volume names. For that, it
/// collects several static methods
std::mutex GeometryManager::sTGMutex;

//______________________________________________________________________
GeometryManager::GeometryManager()
Expand All @@ -48,13 +49,12 @@ GeometryManager::GeometryManager()
Bool_t GeometryManager::getOriginalMatrix(const char* symname, TGeoHMatrix& m)
{
m.Clear();

if (!gGeoManager || !gGeoManager->IsClosed()) {
LOG(ERROR) << "No active geometry or geometry not yet closed!";
;
return kFALSE;
}

std::lock_guard<std::mutex> guard(sTGMutex);
if (!gGeoManager->GetListOfPhysicalNodes()) {
LOG(WARNING) << "gGeoManager doesn't contain any aligned nodes!";

Expand Down Expand Up @@ -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<std::mutex> guard(sTGMutex);
if (!gGeoManager->CheckPath(path)) {
LOG(ERROR) << "Volume path " << path << " not valid!";
return kFALSE;
Expand Down Expand Up @@ -288,7 +288,7 @@ GeometryManager::MatBudgetExt GeometryManager::meanMaterialBudgetExt(float x0, f
for (int i = 3; i--;) {
dir[i] *= invlen;
}

std::lock_guard<std::mutex> guard(sTGMutex);
// Initialize start point and direction
TGeoNode* currentnode = gGeoManager->InitTrack(startD, dir);
if (!currentnode) {
Expand Down Expand Up @@ -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<std::mutex> guard(sTGMutex);
// Initialize start point and direction
TGeoNode* currentnode = gGeoManager->InitTrack(startD, dir);
if (!currentnode) {
Expand Down
2 changes: 1 addition & 1 deletion GPU/GPUTracking/TRDTracking/GPUTRDInterfaces.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class propagatorInterface<o2::base::Propagator>
propagatorInterface<o2::base::Propagator>(const propagatorInterface<o2::base::Propagator>&) = delete;
propagatorInterface<o2::base::Propagator>& operator=(const propagatorInterface<o2::base::Propagator>&) = 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<int>(mParam->getYZAt(x, mProp->getNominalBz(), projY, projZ)); }

void setTrack(trackInterface<o2::dataformats::TrackTPCITS>* trk) { mParam = trk; }
Expand Down