99// granted to it by virtue of its status as an Intergovernmental Organization
1010// or submit itself to any jurisdiction.
1111
12+ // / \file FastTracker.h
13+ // / \brief On the fly implementation of DelphesO2 solveTrack
14+ // / \author David Dobrigkeit Chinellato
15+ // / \author Nicolò Jacazio
16+ // / \author Jesper Karlsson Gumprecht
17+
1218#ifndef ALICE3_CORE_FASTTRACKER_H_
1319#define ALICE3_CORE_FASTTRACKER_H_
1420
2733#include < string>
2834#include < vector>
2935
30- namespace o2
31- {
32- namespace fastsim
36+ namespace o2 ::fastsim
3337{
3438
3539// +-~-<*>-~-+-~-<*>-~-+-~-<*>-~-+-~-<*>-~-+-~-<*>-~-+-~-<*>-~-+-~-<*>-~-+-~-<*>-~-+
@@ -46,30 +50,30 @@ class FastTracker
4650 virtual ~FastTracker () {}
4751
4852 // Layer and layer configuration
49- DetLayer* AddLayer (const 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 );
53+ DetLayer* addLayer (const 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 );
5054
5155 // / Add a dead region in phi for a specific layer
5256 // / \param layerName Name of the layer to modify
5357 // / \param phiStart Start angle of the dead region (in radians)
5458 // / \param phiEnd End angle of the dead region (in radians)
5559 void addDeadPhiRegionInLayer (const std::string& layerName, float phiStart, float phiEnd);
56- DetLayer GetLayer (const int layer) const { return layers[layer]; }
57- std::vector<DetLayer> GetLayers () const { return layers; }
58- int GetLayerIndex (const std::string& name) const ;
59- size_t GetNLayers () const { return layers.size (); }
60- bool IsLayerInert (const int layer) const { return layers[layer].isInert (); }
61- void ClearLayers () { layers.clear (); }
62- void SetRadiationLength (const std::string& layerName, float x0) { layers[GetLayerIndex (layerName)].setRadiationLength (x0); }
63- void SetRadius (const std::string& layerName, float r) { layers[GetLayerIndex (layerName)].setRadius (r); }
64- void SetResolutionRPhi (const std::string& layerName, float resRPhi) { layers[GetLayerIndex (layerName)].setResolutionRPhi (resRPhi); }
65- void SetResolutionZ (const std::string& layerName, float resZ) { layers[GetLayerIndex (layerName)].setResolutionZ (resZ); }
66- void SetResolution (const std::string& layerName, float resRPhi, float resZ)
60+ [[nodiscard]] DetLayer getLayer (const int layer) const { return layers[layer]; }
61+ [[nodiscard]] std::vector<DetLayer> getLayers () const { return layers; }
62+ [[nodiscard]] int getLayerIndex (const std::string& name) const ;
63+ [[nodiscard]] size_t getNLayers () const { return layers.size (); }
64+ [[nodiscard]] bool isLayerInert (const int layer) const { return layers[layer].isInert (); }
65+ void clearLayers () { layers.clear (); }
66+ void setRadiationLength (const std::string& layerName, float x0) { layers[getLayerIndex (layerName)].setRadiationLength (x0); }
67+ void setRadius (const std::string& layerName, float r) { layers[getLayerIndex (layerName)].setRadius (r); }
68+ void setResolutionRPhi (const std::string& layerName, float resRPhi) { layers[getLayerIndex (layerName)].setResolutionRPhi (resRPhi); }
69+ void setResolutionZ (const std::string& layerName, float resZ) { layers[getLayerIndex (layerName)].setResolutionZ (resZ); }
70+ void setResolution (const std::string& layerName, float resRPhi, float resZ)
6771 {
68- SetResolutionRPhi (layerName, resRPhi);
69- SetResolutionZ (layerName, resZ);
72+ setResolutionRPhi (layerName, resRPhi);
73+ setResolutionZ (layerName, resZ);
7074 }
7175
72- void AddTPC (float phiResMean, float zResMean);
76+ void addTPC (float phiResMean, float zResMean);
7377
7478 /* *
7579 * @brief Adds a generic detector configuration from the specified file.
@@ -80,9 +84,9 @@ class FastTracker
8084 *
8185 * @param configMap Configuration map describing the detector.
8286 */
83- void AddGenericDetector (const o2::fastsim::GeometryEntry& configMap, o2::ccdb::BasicCCDBManager* ccdbManager = nullptr );
87+ void addGenericDetector (const o2::fastsim::GeometryEntry& configMap, o2::ccdb::BasicCCDBManager* ccdbManager = nullptr );
8488
85- void Print ();
89+ void print ();
8690
8791 /* *
8892 * @brief Performs fast tracking on the input track parameters.
@@ -95,44 +99,44 @@ class FastTracker
9599 * @param nch Charged particle multiplicity (used for hit density calculations).
96100 * @return int i.e. number of intercepts (implementation-defined).
97101 */
98- int FastTrack (o2::track::TrackParCov inputTrack, o2::track::TrackParCov& outputTrack, const float nch, const float maxRadius = 100 .f);
102+ int fastTrack (o2::track::TrackParCov inputTrack, o2::track::TrackParCov& outputTrack, const float nch, const float maxRadius = 100 .f);
99103
100104 // For efficiency calculation
101- float Dist (float z, float radius);
102- float OneEventHitDensity (float multiplicity, float radius);
103- float IntegratedHitDensity (float multiplicity, float radius);
104- float UpcHitDensity (float radius);
105- float HitDensity (float radius);
106- float ProbGoodChiSqHit (float radius, float searchRadiusRPhi, float searchRadiusZ);
105+ float dist (float z, float radius);
106+ float oneEventHitDensity (float multiplicity, float radius);
107+ float integratedHitDensity (float multiplicity, float radius);
108+ float upcHitDensity (float radius);
109+ float hitDensity (float radius);
110+ float probGoodChiSqHit (float radius, float searchRadiusRPhi, float searchRadiusZ);
107111
108112 // Setters and getters for configuration
109- void SetIntegrationTime (float t) { integrationTime = t; }
110- void SetMaxRadiusOfSlowDetectors (float r) { maxRadiusSlowDet = r; }
111- void SetAvgRapidity (float y) { avgRapidity = y; }
112- void SetdNdEtaCent (int d) { dNdEtaCent = d; }
113- void SetLhcUPCscale (float s) { lhcUPCScale = s; }
114- void SetBField (float b) { magneticField = b; }
115- void SetMinRadTrack (float r) { fMinRadTrack = r; }
116- void SetMagneticField (float b) { magneticField = b; }
117- void SetApplyZacceptance (bool b) { mApplyZacceptance = b; }
118- void SetApplyMSCorrection (bool b) { mApplyMSCorrection = b; }
119- void SetApplyElossCorrection (bool b) { mApplyElossCorrection = b; }
120- void SetApplyEffCorrection (bool b) { mApplyEffCorrection = b; }
113+ void setIntegrationTime (float t) { integrationTime = t; }
114+ void setMaxRadiusOfSlowDetectors (float r) { maxRadiusSlowDet = r; }
115+ void setAvgRapidity (float y) { avgRapidity = y; }
116+ void setdNdEtaCent (int d) { dNdEtaCent = d; }
117+ void setLhcUPCscale (float s) { lhcUPCScale = s; }
118+ void setBField (float b) { magneticField = b; }
119+ void setMinRadTrack (float r) { fMinRadTrack = r; }
120+ void setMagneticField (float b) { magneticField = b; }
121+ void setApplyZacceptance (bool b) { mApplyZacceptance = b; }
122+ void setApplyMSCorrection (bool b) { mApplyMSCorrection = b; }
123+ void setApplyElossCorrection (bool b) { mApplyElossCorrection = b; }
124+ void setApplyEffCorrection (bool b) { mApplyEffCorrection = b; }
121125
122126 // Getters for the last track
123- int GetNIntercepts () const { return nIntercepts; }
124- int GetNSiliconPoints () const { return nSiliconPoints; }
125- int GetNGasPoints () const { return nGasPoints; }
126- float GetGoodHitProb (int layer) const
127+ [[nodiscard]] int getNIntercepts () const { return nIntercepts; }
128+ [[nodiscard]] int getNSiliconPoints () const { return nSiliconPoints; }
129+ [[nodiscard]] int getNGasPoints () const { return nGasPoints; }
130+ [[nodiscard]] float getGoodHitProb (int layer) const
127131 {
128132 return (layer >= 0 && static_cast <size_t >(layer) < goodHitProbability.size ()) ? goodHitProbability[layer] : 0 .0f ;
129133 }
130- std::size_t GetNHits () const { return hits.size (); }
131- float GetHitX (const int i) const { return hits[i][0 ]; }
132- float GetHitY (const int i) const { return hits[i][1 ]; }
133- float GetHitZ (const int i) const { return hits[i][2 ]; }
134- uint64_t GetCovMatOK () const { return covMatOK; }
135- uint64_t GetCovMatNotOK () const { return covMatNotOK; }
134+ [[nodiscard]] std::size_t getNHits () const { return hits.size (); }
135+ [[nodiscard]] float getHitX (const int i) const { return hits[i][0 ]; }
136+ [[nodiscard]] float getHitY (const int i) const { return hits[i][1 ]; }
137+ [[nodiscard]] float getHitZ (const int i) const { return hits[i][2 ]; }
138+ uint64_t getCovMatOK () const { return covMatOK; }
139+ uint64_t getCovMatNotOK () const { return covMatNotOK; }
136140
137141 private:
138142 // Definition of detector layers
@@ -146,8 +150,8 @@ class FastTracker
146150 bool mApplyEffCorrection = true ; // / Apply correction for hit efficiency
147151 int mVerboseLevel = 0 ; // / 0: not verbose, >0 more verbose
148152 const float mCrossSectionMinB = 8 ; // / Minimum bias Cross section for event under study (PbPb MinBias ~ 8 Barns)
149- int dNdEtaCent = 2200 ; // / dN/deta e.g. at centrality 0-5% (for 5 TeV PbPb)
150- int dNdEtaMinB = 1 ; // / dN/deta for minimum bias events
153+ float dNdEtaCent = 2200 .f; // / dN/deta e.g. at centrality 0-5% (for 5 TeV PbPb)
154+ float dNdEtaMinB = 1 .f; // / dN/deta for minimum bias events
151155 float integrationTime = 0 .02f ; // / Integration time in ms
152156 float magneticField = 20 .f; // / Magnetic field in kiloGauss (5 = 0.5T, 20 = 2T, etc)
153157 float covMatFactor = 0 .99f ; // / covmat off-diagonal factor to use for covmat fix (negative: no factor)
@@ -175,7 +179,6 @@ class FastTracker
175179
176180// +-~-<*>-~-+-~-<*>-~-+-~-<*>-~-+-~-<*>-~-+-~-<*>-~-+-~-<*>-~-+-~-<*>-~-+-~-<*>-~-+
177181
178- } // namespace fastsim
179- } // namespace o2
182+ } // namespace o2::fastsim
180183
181184#endif // ALICE3_CORE_FASTTRACKER_H_
0 commit comments