Skip to content

Commit 745fc78

Browse files
committed
U
1 parent be1f9ed commit 745fc78

5 files changed

Lines changed: 281 additions & 288 deletions

File tree

‎Detectors/Upgrades/ALICE3/GlobalReconstruction/reconstruction/include/ALICE3GlobalReconstruction/TimeFrameMixin.h‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,12 @@ class TimeFrameMixin : public Base
7171
void deriveAndInitTiming(const std::array<gsl::span<const o2::trkft3::ROFRecord>, nLayers>& layerROFs);
7272

7373
const o2::InteractionRecord& getTFAnchorIR() const noexcept { return mTFAnchorIR; }
74+
const auto& getClusterSensorIDs() const noexcept { return mClusterSensorIDs; }
7475

7576
protected:
7677
void initTimingTables(const std::array<o2::its::LayerTiming, nLayers>& timings);
7778
void updateHostROFVertexLookupTable();
78-
79+
std::array<std::vector<int>, nLayers> mClusterSensorIDs;
7980
bool mTimingTablesInitialised{false};
8081
o2::InteractionRecord mTFAnchorIR{0, 0};
8182
};
@@ -205,6 +206,7 @@ int TimeFrameMixin<nLayers, Base>::loadROFsFromHitTree(TTree* hitsTree, Geometry
205206
this->mUnsortedClusters[iLayer].clear();
206207
this->mTrackingFrameInfo[iLayer].clear();
207208
this->mClusterExternalIndices[iLayer].clear();
209+
mClusterSensorIDs[iLayer].clear();
208210
this->mClusterSize[iLayer].clear();
209211
}
210212

@@ -228,6 +230,7 @@ int TimeFrameMixin<nLayers, Base>::loadROFsFromHitTree(TTree* hitsTree, Geometry
228230
this->mUnsortedClusters[iLayer].reserve(clusterCountPerLayer[iLayer]);
229231
this->mTrackingFrameInfo[iLayer].reserve(clusterCountPerLayer[iLayer]);
230232
this->mClusterExternalIndices[iLayer].reserve(clusterCountPerLayer[iLayer]);
233+
mClusterSensorIDs[iLayer].reserve(clusterCountPerLayer[iLayer]);
231234
this->mClusterSize[iLayer].reserve(clusterCountPerLayer[iLayer]);
232235
}
233236

@@ -294,6 +297,7 @@ int TimeFrameMixin<nLayers, Base>::loadROFsFromHitTree(TTree* hitsTree, Geometry
294297
std::array<float, 2>{trkXYZ.y(), trkXYZ.z()},
295298
std::array<float, 3>{resolution[layer] * resolution[layer], 0., resolution[layer] * resolution[layer]});
296299
this->addClusterToLayer(layer, gloXYZ.x(), gloXYZ.y(), gloXYZ.z(), this->mUnsortedClusters[layer].size());
300+
mClusterSensorIDs[layer].push_back(hit.GetDetectorID());
297301
const int layerHitCounter = hitCounterPerLayer[layer]++;
298302
this->addClusterExternalIndexToLayer(layer, layerHitCounter);
299303
this->mClusterSize[layer].push_back(1);
@@ -344,10 +348,12 @@ int TimeFrameMixin<nLayers, Base>::loadROFrameData(const std::array<gsl::span<co
344348
this->mUnsortedClusters[iLayer].clear();
345349
this->mTrackingFrameInfo[iLayer].clear();
346350
this->mClusterExternalIndices[iLayer].clear();
351+
mClusterSensorIDs[iLayer].clear();
347352
this->mClusterSize[iLayer].clear();
348353
this->mUnsortedClusters[iLayer].reserve(layerClusters[iLayer].size());
349354
this->mTrackingFrameInfo[iLayer].reserve(layerClusters[iLayer].size());
350355
this->mClusterExternalIndices[iLayer].reserve(layerClusters[iLayer].size());
356+
mClusterSensorIDs[iLayer].reserve(layerClusters[iLayer].size());
351357
this->mClusterSize[iLayer].reserve(layerClusters[iLayer].size());
352358
}
353359

@@ -436,6 +442,7 @@ int TimeFrameMixin<nLayers, Base>::loadROFrameData(const std::array<gsl::span<co
436442
std::array<float, 2>{trkXYZ.y(), trkXYZ.z()},
437443
std::array<float, 3>{sigmaY2, 0.f, sigmaZ2});
438444
this->addClusterToLayer(iLayer, gloXYZ.x(), gloXYZ.y(), gloXYZ.z(), this->mUnsortedClusters[iLayer].size());
445+
mClusterSensorIDs[iLayer].push_back(c.chipID);
439446
this->addClusterExternalIndexToLayer(iLayer, clusterId);
440447
this->mClusterSize[iLayer].push_back(std::clamp(static_cast<unsigned int>(c.size), 0u, 255u));
441448
}

‎Detectors/Upgrades/ALICE3/GlobalReconstruction/reconstruction/include/ALICE3GlobalReconstruction/TrackerACTS.h‎

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
#define ALICE3_GLOBALRECONSTRUCTION_INCLUDE_TRACKERACTS_H_
2121

2222
#include <Acts/Definitions/Units.hpp>
23+
#include <chrono>
24+
#include <cmath>
25+
#include <iomanip>
26+
#include <string_view>
2327
#include <Framework/Logger.h>
2428
#include <array>
2529
#include <vector>
@@ -32,20 +36,17 @@ class Surface;
3236
}
3337
namespace o2::trk
3438
{
35-
3639
/// Configuration for the ACTS-based tracker
3740
struct TrackerACTSConfig {
3841
// Seeding parameters
3942
float minPt = 0.4f * Acts::UnitConstants::GeV; ///< Minimum pT for seeds
4043
float maxImpactParameter = 10.f * Acts::UnitConstants::mm; ///< Maximum impact parameter
4144
float cotThetaMax = std::sinh(4.0f); ///< Maximum cot(theta), corresponds to eta ~4
42-
4345
// Delta R cuts for doublet/triplet formation
4446
float deltaRMinBottom = 5.f * Acts::UnitConstants::mm; ///< Min deltaR for bottom-middle
4547
float deltaRMaxBottom = 200.f * Acts::UnitConstants::mm; ///< Max deltaR for bottom-middle
4648
float deltaRMinTop = 5.f * Acts::UnitConstants::mm; ///< Min deltaR for middle-top
4749
float deltaRMaxTop = 200.f * Acts::UnitConstants::mm; ///< Max deltaR for middle-top
48-
4950
// Z cuts
5051
float zMin = -3000.f * Acts::UnitConstants::mm;
5152
float zMax = 3000.f * Acts::UnitConstants::mm;
@@ -58,7 +59,6 @@ struct TrackerACTSConfig {
5859
float maxSeedsPerMiddleSP = 2;
5960
float deltaPhiMax = 0.1f; ///< Maximum phi difference for doublets
6061
};
61-
6262
/// Space point representation for tracking
6363
struct SpacePoint {
6464
float x{0.f};
@@ -74,7 +74,6 @@ struct SpacePoint {
7474
float r() const { return std::hypot(x, y); }
7575
float radius() const { return r(); } // required by Acts::CylindricalGridElement concept
7676
float phi() const { return std::atan2(y, x); }
77-
7877
// Variance estimates (can be refined based on cluster properties)
7978
float varianceR{0.01f}; // ~100 um resolution squared
8079
float varianceZ{0.01f};
@@ -87,7 +86,6 @@ struct SeedACTS {
8786
const SpacePoint* top{nullptr};
8887
float quality{0.f};
8988
};
90-
9189
/// TRK Tracker using ACTS algorithms for seeding and track finding
9290
template <int nLayers>
9391
class TrackerACTS
@@ -120,7 +118,6 @@ class TrackerACTS
120118

121119
/// Set the magnetic field strength
122120
void setBz(float bz) { mBz = bz; }
123-
124121
/// Get the magnetic field strength
125122
float getBz() const { return mBz; }
126123

@@ -155,7 +152,6 @@ class TrackerACTS
155152
// Space points built from clusters
156153
std::vector<SpacePoint> mSpacePoints;
157154
std::vector<std::vector<const SpacePoint*>> mSpacePointsPerLayer;
158-
159155
// Seeds
160156
std::vector<SeedACTS> mSeeds;
161157

@@ -164,7 +160,6 @@ class TrackerACTS
164160
unsigned int mTimeFrameCounter{0};
165161
double mTotalTime{0.};
166162
const std::array<std::vector<int>, nLayers>* mSensorIDs = nullptr;
167-
168163
// Tracking states for logging
169164
enum State {
170165
SpacePointBuilding = 0,
@@ -178,7 +173,6 @@ class TrackerACTS
178173
"ACTS seeding",
179174
"Track finding"};
180175
};
181-
182176
template <int nLayers>
183177
template <typename Func>
184178
float TrackerACTS<nLayers>::evaluateTask(Func&& task, std::string_view taskName)
@@ -188,11 +182,9 @@ float TrackerACTS<nLayers>::evaluateTask(Func&& task, std::string_view taskName)
188182
task();
189183
const auto end = std::chrono::high_resolution_clock::now();
190184
std::chrono::duration<double, std::milli> diff{end - start};
191-
192185
LOG(debug) << " - " << taskName << " completed in: " << std::fixed << std::setprecision(2) << diff.count() << " ms";
193186
return static_cast<float>(diff.count());
194187
}
195188

196189
} // namespace o2::trk
197-
198190
#endif /* ALICE3_GLOBALRECONSTRUCTION_INCLUDE_TRACKERACTS_H_ */

0 commit comments

Comments
 (0)