Skip to content

Commit ff4dbc2

Browse files
committed
ITS: print vtx params
1 parent 2646cb3 commit ff4dbc2

4 files changed

Lines changed: 31 additions & 16 deletions

File tree

Detectors/ITSMFT/ITS/tracking/include/ITStracking/Configuration.h

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ class Configuration : public Param
5858
};
5959

6060
struct TrackingParameters {
61-
TrackingParameters& operator=(const TrackingParameters& t) = default;
62-
63-
int CellMinimumLevel();
61+
int CellMinimumLevel() const noexcept { return MinTrackLength - constants::its::ClustersPerCell + 1; }
6462
int CellsPerRoad() const { return NLayers - 2; }
6563
int TrackletsPerRoad() const { return NLayers - 1; }
6664
std::string asString() const;
@@ -92,7 +90,7 @@ struct TrackingParameters {
9290
float CellsPerClusterLimit = 2.f;
9391
/// Fitter parameters
9492
o2::base::PropagatorImpl<float>::MatCorrType CorrType = o2::base::PropagatorImpl<float>::MatCorrType::USEMatCorrNONE;
95-
unsigned long MaxMemory = 12000000000UL;
93+
size_t MaxMemory = 12000000000UL;
9694
float MaxChi2ClusterAttachment = 60.f;
9795
float MaxChi2NDF = 30.f;
9896
std::vector<float> MinPt = {0.f, 0.f, 0.f, 0.f};
@@ -112,12 +110,9 @@ struct TrackingParameters {
112110
float TrackFollowerNSigmaCutPhi = 1.f;
113111
};
114112

115-
inline int TrackingParameters::CellMinimumLevel()
116-
{
117-
return MinTrackLength - constants::its::ClustersPerCell + 1;
118-
}
119-
120113
struct VertexingParameters {
114+
std::string asString() const;
115+
121116
int nIterations = 1; // Number of vertexing passes to perform
122117
int vertPerRofThreshold = 0; // Maximum number of vertices per ROF to trigger second a round
123118
bool allowSingleContribClusters = false;
@@ -143,10 +138,11 @@ struct VertexingParameters {
143138
int zSpan = -1;
144139

145140
int nThreads = 1;
141+
size_t MaxMemory = 12000000000UL;
146142
};
147143

148144
struct TimeFrameGPUParameters {
149-
TimeFrameGPUParameters() = default;
145+
std::string asString() const;
150146

151147
size_t tmpCUBBufferSize = 1e5; // In average in pp events there are required 4096 bytes
152148
size_t maxTrackletsPerCluster = 1e2;

Detectors/ITSMFT/ITS/tracking/include/ITStracking/Vertexer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class Vertexer
5555
void adoptTimeFrame(TimeFrame7& tf);
5656
auto& getVertParameters() const { return mTraits->getVertexingParameters(); }
5757
void setParameters(const std::vector<VertexingParameters>& vertParams) { mVertParams = vertParams; }
58+
const auto& getParameters() const noexcept { return mVertParams; }
5859
void getGlobalConfiguration();
5960

6061
std::vector<Vertex> exportVertices();

Detectors/ITSMFT/ITS/tracking/src/Configuration.cxx

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12+
#include <format>
13+
#include "ITStracking/Constants.h"
14+
1215
#include "ITStracking/Configuration.h"
1316

1417
namespace o2::its
1518
{
19+
1620
std::string asString(TrackingMode mode)
1721
{
1822
switch (mode) {
@@ -28,9 +32,15 @@ std::string asString(TrackingMode mode)
2832
return "unknown";
2933
}
3034

35+
std::ostream& operator<<(std::ostream& os, TrackingMode v)
36+
{
37+
os << asString(v);
38+
return os;
39+
}
40+
3141
std::string TrackingParameters::asString() const
3242
{
33-
std::string str = fmt::format("NZb:{} NPhB:{} NROFIt:{} PerVtx:{} DropFail:{} ClSh:{} TtklMinPt:{:.2f} MinCl:{}",
43+
std::string str = std::format("NZb:{} NPhB:{} NROFIt:{} PerVtx:{} DropFail:{} ClSh:{} TtklMinPt:{:.2f} MinCl:{}",
3444
ZBins, PhiBins, nROFsPerIterations, PerPrimaryVertexProcessing, DropTFUponFailure, ClusterSharing, TrackletMinPt, MinTrackLength);
3545
bool first = true;
3646
for (int il = NLayers; il >= MinTrackLength; il--) {
@@ -40,19 +50,22 @@ std::string TrackingParameters::asString() const
4050
first = false;
4151
str += " MinPt: ";
4252
}
43-
str += fmt::format("L{}:{:.2f} ", il, MinPt[slot]);
53+
str += std::format("L{}:{:.2f} ", il, MinPt[slot]);
4454
}
4555
}
4656
str += " SystErrY/Z:";
4757
for (size_t i = 0; i < SystErrorY2.size(); i++) {
48-
str += fmt::format("{:.2e}/{:.2e} ", SystErrorY2[i], SystErrorZ2[i]);
58+
str += std::format("{:.2e}/{:.2e} ", SystErrorY2[i], SystErrorZ2[i]);
4959
}
60+
str += std::format(" MemLimit {:.2f} GB", double(MaxMemory) / constants::GB);
5061
return str;
5162
}
5263

53-
std::ostream& operator<<(std::ostream& os, TrackingMode v)
64+
std::string VertexingParameters::asString() const
5465
{
55-
os << asString(v);
56-
return os;
66+
std::string str = std::format("NZb:{} NPhB:{} DRof:{} ClsCont:{} MaxTrkltCls:{} ZCut:{} PhCut:{}", ZBins, PhiBins, deltaRof, clusterContributorsCut, maxTrackletsPerCluster, zCut, phiCut);
67+
str += std::format(" MemLimit {:.2f} GB", double(MaxMemory) / constants::GB);
68+
return str;
5769
}
70+
5871
} // namespace o2::its

Detectors/ITSMFT/ITS/tracking/src/TrackingInterface.cxx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,11 @@ void ITSTrackingInterface::updateTimeDependentParams(framework::ProcessingContex
378378
if (pc.services().get<const o2::framework::DeviceSpec>().inputTimesliceId == 0) { // print settings only for the 1st pipeling
379379
o2::its::VertexerParamConfig::Instance().printKeyValues();
380380
o2::its::TrackerParamConfig::Instance().printKeyValues();
381+
const auto& vtxParams = mVertexer->getParameters();
382+
for (size_t it = 0; it < vtxParams.size(); it++) {
383+
const auto& par = vtxParams[it];
384+
LOGP(info, "vtxIter#{} : {}", it, par.asString());
385+
}
381386
const auto& trParams = mTracker->getParameters();
382387
for (size_t it = 0; it < trParams.size(); it++) {
383388
const auto& par = trParams[it];

0 commit comments

Comments
 (0)