1414
1515#include < fairlogger/Logger.h> // not a system header but megalinter thinks so
1616#include < vector>
17+ #include < string>
1718#include " DetLayer.h"
1819#include " ReconstructionDataFormats/Track.h"
1920
@@ -34,16 +35,38 @@ class FastTracker
3435 FastTracker ();
3536 virtual ~FastTracker () {}
3637
38+ // Layer and layer configuration
3739 void AddLayer (TString name, float r, float z, float x0, float xrho, float resRPhi = 0 .0f , float resZ = 0 .0f , float eff = 0 .0f , int type = 0 );
3840 DetLayer GetLayer (const int layer, bool ignoreBarrelLayers = true ) const ;
3941 int GetLayerIndex (const std::string name) const ;
42+ void SetRadiationLength (const std::string layerName, float x0) { layers[GetLayerIndex (layerName)].x0 = x0; }
43+ void SetRadius (const std::string layerName, float r) { layers[GetLayerIndex (layerName)].r = r; }
44+ void SetResolutionRPhi (const std::string layerName, float resRPhi) { layers[GetLayerIndex (layerName)].resRPhi = resRPhi; }
45+ void SetResolutionZ (const std::string layerName, float resZ) { layers[GetLayerIndex (layerName)].resZ = resZ; }
46+ void SetResolution (const std::string layerName, float resRPhi, float resZ)
47+ {
48+ SetResolutionRPhi (layerName, resRPhi);
49+ SetResolutionZ (layerName, resZ);
50+ }
4051
4152 void AddSiliconALICE3v4 (std::vector<float > pixelResolution);
4253 void AddSiliconALICE3v2 (std::vector<float > pixelResolution);
4354 void AddTPC (float phiResMean, float zResMean);
4455
4556 void Print ();
46- int FastTrack (o2::track::TrackParCov inputTrack, o2::track::TrackParCov& outputTrack, float nch);
57+
58+ /* *
59+ * @brief Performs fast tracking on the input track parameters.
60+ *
61+ * Propagates the given input track through the detector layers, applying
62+ * relevant corrections and updates, and stores the result in outputTrack.
63+ *
64+ * @param inputTrack The input track parameters and covariance (const, by value).
65+ * @param outputTrack Reference to the output track parameters and covariance, to be filled.
66+ * @param nch Charged particle multiplicity (used for hit density calculations).
67+ * @return int i.e. number of intercepts (implementation-defined).
68+ */
69+ int FastTrack (o2::track::TrackParCov inputTrack, o2::track::TrackParCov& outputTrack, const float nch);
4770
4871 // For efficiency calculation
4972 float Dist (float z, float radius);
@@ -53,18 +76,35 @@ class FastTracker
5376 float HitDensity (float radius);
5477 float ProbGoodChiSqHit (float radius, float searchRadiusRPhi, float searchRadiusZ);
5578
79+ // Setters and getters for configuration
80+ void SetIntegrationTime (float t) { integrationTime = t; }
81+ void SetMaxRadiusOfSlowDetectors (float r) { maxRadiusSlowDet = r; }
82+ void SetAvgRapidity (float y) { avgRapidity = y; }
83+ void SetdNdEtaCent (float d) { dNdEtaCent = d; }
84+ void SetLhcUPCscale (float s) { lhcUPCScale = s; }
85+ void SetBField (float b) { magneticField = b; }
86+ void SetMinRadTrack (float r) { fMinRadTrack = r; }
87+ void SetMagneticField (float b) { magneticField = b; }
88+ void SetApplyZacceptance (bool b) { applyZacceptance = b; }
89+ void SetApplyMSCorrection (bool b) { applyMSCorrection = b; }
90+ void SetApplyElossCorrection (bool b) { applyElossCorrection = b; }
91+
92+ // Getters for the last track
93+ int GetNIntercepts () const { return nIntercepts; }
94+ int GetNSiliconPoints () const { return nSiliconPoints; }
95+ int GetNGasPoints () const { return nGasPoints; }
96+ float GetGoodHitProb (int layer) const { return goodHitProbability[layer]; }
97+ std::size_t GetNHits () const { return hits.size (); }
98+ float GetHitX (const int i) const { return hits[i][0 ]; }
99+ float GetHitY (const int i) const { return hits[i][1 ]; }
100+ float GetHitZ (const int i) const { return hits[i][2 ]; }
101+ uint64_t GetCovMatOK () const { return covMatOK; }
102+ uint64_t GetCovMatNotOK () const { return covMatNotOK; }
103+
104+ private:
56105 // Definition of detector layers
57106 std::vector<DetLayer> layers;
58107 std::vector<std::vector<float >> hits; // bookkeep last added hits
59- void SetRadiationLength (const std::string layerName, float x0) { layers[GetLayerIndex (layerName)].x0 = x0; }
60- void SetRadius (const std::string layerName, float r) { layers[GetLayerIndex (layerName)].r = r; }
61- void SetResolutionRPhi (const std::string layerName, float resRPhi) { layers[GetLayerIndex (layerName)].resRPhi = resRPhi; }
62- void SetResolutionZ (const std::string layerName, float resZ) { layers[GetLayerIndex (layerName)].resZ = resZ; }
63- void SetResolution (const std::string layerName, float resRPhi, float resZ)
64- {
65- SetResolutionRPhi (layerName, resRPhi);
66- SetResolutionZ (layerName, resZ);
67- }
68108
69109 // operational
70110 bool applyZacceptance; // check z acceptance or not
@@ -87,16 +127,6 @@ class FastTracker
87127 float upcBackgroundMultiplier;
88128 float fMinRadTrack = 132 .;
89129
90- // Setters and getters
91- void SetIntegrationTime (float t) { integrationTime = t; }
92- void SetMaxRadiusOfSlowDetectors (float r) { maxRadiusSlowDet = r; }
93- void SetAvgRapidity (float y) { avgRapidity = y; }
94- void SetdNdEtaCent (float d) { dNdEtaCent = d; }
95- void SetLhcUPCscale (float s) { lhcUPCScale = s; }
96- void SetBField (float b) { magneticField = b; }
97- void SetMinRadTrack (float r) { fMinRadTrack = r; }
98- // void SetAtLeastHits(int n) { fMinRadTrack = n; }
99-
100130 uint64_t covMatOK; // cov mat has negative eigenvals
101131 uint64_t covMatNotOK; // cov mat has negative eigenvals
102132
@@ -105,7 +135,6 @@ class FastTracker
105135 int nSiliconPoints; // silicon-based space points added to track
106136 int nGasPoints; // tpc-based space points added to track
107137 std::vector<float > goodHitProbability;
108- float GetGoodHitProb (int layer) const { return goodHitProbability[layer]; }
109138
110139 ClassDef (FastTracker, 1 );
111140};
0 commit comments