Skip to content

Commit d83e33c

Browse files
authored
[ALICE3] Fix retrieving of DetLayer for otf strangeness tracking (#13654)
1 parent 46cce1a commit d83e33c

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

ALICE3/Core/FastTracker.cxx

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <TObject.h>
2323

2424
#include <fstream>
25+
#include <map>
2526
#include <string>
2627
#include <vector>
2728

@@ -66,20 +67,6 @@ void FastTracker::addDeadPhiRegionInLayer(const std::string& layerName, float ph
6667
layers[layerIdx].addDeadPhiRegion(phiStart, phiEnd);
6768
}
6869

69-
DetLayer FastTracker::GetLayer(int layer, bool ignoreBarrelLayers) const
70-
{
71-
int layerIdx = layer;
72-
if (ignoreBarrelLayers) {
73-
for (int il = 0, trackingLayerIdx = 0; trackingLayerIdx <= layer; il++) {
74-
if (layers[il].isInert())
75-
continue;
76-
trackingLayerIdx++;
77-
layerIdx = il;
78-
}
79-
}
80-
return layers[layerIdx];
81-
}
82-
8370
int FastTracker::GetLayerIndex(const std::string& name) const
8471
{
8572
int i = 0;
@@ -339,7 +326,7 @@ void FastTracker::AddGenericDetector(std::string filename, o2::ccdb::BasicCCDBMa
339326
LOG(fatal) << "Cannot open dead phi regions file " << deadPhiRegions;
340327
return;
341328
}
342-
TGraph* g = (TGraph*)infile.Get(infile.GetListOfKeys()->At(0)->GetName());
329+
TGraph* g = reinterpret_cast<TGraph*>(infile.Get(infile.GetListOfKeys()->At(0)->GetName()));
343330
infile.Close();
344331
addedLayer->setDeadPhiRegions(g);
345332
}

ALICE3/Core/FastTracker.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class FastTracker
4848
/// \param phiStart Start angle of the dead region (in radians)
4949
/// \param phiEnd End angle of the dead region (in radians)
5050
void addDeadPhiRegionInLayer(const std::string& layerName, float phiStart, float phiEnd);
51-
DetLayer GetLayer(const int layer, bool ignoreBarrelLayers = true) const;
51+
DetLayer GetLayer(const int layer) const { return layers[layer]; }
5252
std::vector<DetLayer> GetLayers() const { return layers; }
5353
int GetLayerIndex(const std::string& name) const;
5454
size_t GetNLayers() const { return layers.size(); }

0 commit comments

Comments
 (0)