Skip to content

Commit b03c744

Browse files
committed
Update
1 parent 3afa6e9 commit b03c744

2 files changed

Lines changed: 165 additions & 52 deletions

File tree

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

Lines changed: 53 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -44,97 +44,124 @@ class BoundTrackParameters;
4444
namespace o2::trk
4545
{
4646

47-
/// Configuration for the ACTS-based tracker
47+
/// Configuration for ACTS seeding, track finding, and optional diagnostic output.
48+
///
49+
/// Length and momentum-valued cuts use ACTS units (mm and GeV, respectively).
4850
struct TrackerACTSConfig {
49-
// Seeding parameters
51+
/// Minimum transverse momentum accepted by the seeding algorithms.
5052
float minPt = 0.4f * Acts::UnitConstants::GeV; ///< Minimum pT for seeds
51-
float maxImpactParameter = 10.f * Acts::UnitConstants::mm; ///< Maximum impact parameter
52-
float cotThetaMax = std::sinh(4.0f); ///< Maximum cot(theta), corresponds to eta ~4
53+
/// Maximum transverse distance of closest approach used in seeding.
54+
float maxImpactParameter = 10.f * Acts::UnitConstants::mm;
55+
/// Maximum absolute cot(theta); the default corresponds approximately to |eta| = 4.
56+
float cotThetaMax = std::sinh(4.0f);
5357

54-
// Delta R cuts for doublet/triplet formation
58+
/// Minimum and maximum radial separation for bottom-to-middle space-point pairs.
5559
float deltaRMinBottom = 5.f * Acts::UnitConstants::mm; ///< Min deltaR for bottom-middle
5660
float deltaRMaxBottom = 200.f * Acts::UnitConstants::mm; ///< Max deltaR for bottom-middle
61+
/// Minimum and maximum radial separation for middle-to-top space-point pairs.
5762
float deltaRMinTop = 5.f * Acts::UnitConstants::mm; ///< Min deltaR for middle-top
5863
float deltaRMaxTop = 200.f * Acts::UnitConstants::mm; ///< Max deltaR for middle-top
5964

60-
// Z cuts
65+
/// Longitudinal range used to select space points for seeding.
6166
float zMin = -3000.f * Acts::UnitConstants::mm;
6267
float zMax = 3000.f * Acts::UnitConstants::mm;
6368

64-
// Collision region
69+
/// Longitudinal range of the collision region used when constructing seeds.
6570
float collisionRegionMin = -150.f * Acts::UnitConstants::mm;
6671
float collisionRegionMax = 150.f * Acts::UnitConstants::mm;
6772

68-
// Quality cuts
73+
/// Maximum number of seeds retained for each middle space point.
6974
float maxSeedsPerMiddleSP = 2;
70-
float deltaPhiMax = 0.1f; ///< Maximum phi difference for doublets
71-
// Optional debug output. No ROOT file or histogram is created by default.
72-
bool writeDebugTrees = false; ///< Cluster, seed and ROF summary trees
73-
bool dumpTrackingGeometry = false; ///< Write a JSON volume/surface snapshot on first use
74-
int debugMaxTimeFrames = 1; ///< 1 by default, -1 for all TFs
75+
/// Reserved maximum azimuthal angle difference for doublets (radians); currently unused.
76+
float deltaPhiMax = 0.1f;
77+
78+
/// Enable diagnostic ROOT trees and histograms; disabled by default.
79+
bool writeDebugTrees = false;
80+
/// Write a JSON snapshot of the tracking geometry on the first use.
81+
bool dumpTrackingGeometry = false;
82+
/// Number of time frames with debug output; 0 disables it and -1 means all.
83+
int debugMaxTimeFrames = 1;
84+
/// Destination ROOT file for diagnostic output.
7585
std::string debugFileName = "TrackerACTS_debug.root";
86+
/// Destination JSON file for the tracking-geometry snapshot.
7687
std::string geometryDumpFileName = "TrackerACTS_geometry.json";
7788
};
7889

79-
/// Space point representation for tracking
90+
/// Cluster-derived space point passed to the ACTS seeding algorithms.
8091
struct SpacePoint {
92+
/// Cartesian position in the global tracking frame, in mm.
8193
float x{0.f};
8294
float y{0.f};
8395
float z{0.f};
96+
/// Detector layer and cluster indices identifying the source measurement.
8497
int layer{-1};
8598
int clusterId{-1};
99+
/// Readout-frame and sensor indices identifying the source measurement.
86100
int rof{-1};
87101
int sensorId{-1};
102+
/// Geometry surface associated with this measurement; not owned by the space point.
88103
const Acts::Surface* surface{nullptr};
89104

90-
// Derived quantities
105+
/// Transverse radius in mm.
91106
float r() const { return std::hypot(x, y); }
92-
float radius() const { return r(); } // required by Acts::CylindricalGridElement concept
107+
/// Radius accessor required by the ACTS cylindrical-grid element concept.
108+
float radius() const { return r(); }
109+
/// Azimuthal angle in radians.
93110
float phi() const { return std::atan2(y, x); }
94111

95-
// Variance estimates (can be refined based on cluster properties)
96-
float varianceR{0.01f}; // ~100 um resolution squared
112+
/// Estimated radial and longitudinal position variances, in mm^2.
113+
float varianceR{0.01f};
97114
float varianceZ{0.01f};
98115
};
99116

100-
/// Seed (triplet of space points)
117+
/// Three-space-point seed ordered from the innermost to outermost measurement.
101118
struct SeedACTS {
102119
const SpacePoint* bottom{nullptr};
103120
const SpacePoint* middle{nullptr};
104121
const SpacePoint* top{nullptr};
122+
/// ACTS seed quality value.
105123
float quality{0.f};
106124
};
107125

108-
/// TRK Tracker using ACTS algorithms for seeding and track finding
126+
/// TRK tracker using ACTS algorithms for seeding and track finding.
127+
///
128+
/// The caller supplies a TimeFrame and, optionally, sensor-ID mappings before
129+
/// calling clustersToTracks(). The adopted data is referenced rather than
130+
/// copied, so it must remain alive while the tracker processes it.
109131
template <int nLayers>
110132
class TrackerACTS
111133
{
112134
public:
113135
TrackerACTS();
114136
~TrackerACTS();
115137

116-
/// Adopt a TimeFrame for processing
138+
/// Set the TimeFrame whose clusters will be reconstructed.
139+
/// The TimeFrame is borrowed and must outlive its use by this tracker.
117140
void adoptTimeFrame(o2::its::TimeFrame<nLayers>& tf);
141+
/// Set per-layer sensor-ID mappings used to associate clusters with geometry.
142+
/// The mapping array is borrowed and must remain alive while it is used.
118143
void adoptSensorIDs(const std::array<std::vector<int>, nLayers>& sensorIDs)
119144
{
120145
mSensorIDs = &sensorIDs;
121146
}
122147

123-
/// Main tracking entry point: convert clusters to tracks
148+
/// Build space points, find tracks, and publish accepted tracks in the TimeFrame.
124149
void clustersToTracks();
125150

126-
/// Configuration
151+
/// Replace the current tracker configuration.
127152
void setConfig(const TrackerACTSConfig& cfg) { mConfig = cfg; }
153+
/// Access the tracker configuration for modification.
128154
TrackerACTSConfig& getConfig() { return mConfig; }
155+
/// Read-only access to the tracker configuration.
129156
const TrackerACTSConfig& getConfig() const { return mConfig; }
130157

131-
/// Set the magnetic field strength
158+
/// Set the magnetic field along z, in Tesla.
132159
void setBz(float bz) { mBz = bz; }
133160

134-
/// Get the magnetic field strength
161+
/// Get the magnetic field along z, in Tesla.
135162
float getBz() const { return mBz; }
136163

137-
/// Print tracking summary
164+
/// Print the accumulated tracking timing and processing summary.
138165
void printSummary() const;
139166

140167
private:

0 commit comments

Comments
 (0)