Skip to content

Commit da25cb5

Browse files
committed
ITS: print vtx param
1 parent 772ac45 commit da25cb5

File tree

4 files changed

+29
-6
lines changed

4 files changed

+29
-6
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ struct TrackingParameters {
113113
};
114114

115115
struct VertexingParameters {
116+
std::string asString() const;
117+
116118
int nIterations = 1; // Number of vertexing passes to perform
117119
int vertPerRofThreshold = 0; // Maximum number of vertices per ROF to trigger second a round
118120
bool allowSingleContribClusters = false;
@@ -145,6 +147,8 @@ struct VertexingParameters {
145147
};
146148

147149
struct TimeFrameGPUParameters {
150+
std::string asString() const;
151+
148152
size_t tmpCUBBufferSize = 1e5; // In average in pp events there are required 4096 bytes
149153
size_t maxTrackletsPerCluster = 1e2;
150154
size_t clustersPerLayerCapacity = 2.5e5;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class Vertexer
5656
void adoptTimeFrame(TimeFrame7& tf);
5757
auto& getVertParameters() const { return mTraits->getVertexingParameters(); }
5858
void setParameters(const std::vector<VertexingParameters>& vertParams) { mVertParams = vertParams; }
59+
const auto& getParameters() const noexcept { return mVertParams; }
5960
void getGlobalConfiguration();
6061
void setMemoryPool(std::shared_ptr<BoundedMemoryResource>& pool) { mMemoryPool = pool; }
6162

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
@@ -391,6 +391,11 @@ void ITSTrackingInterface::updateTimeDependentParams(framework::ProcessingContex
391391
if (pc.services().get<const o2::framework::DeviceSpec>().inputTimesliceId == 0) { // print settings only for the 1st pipeling
392392
o2::its::VertexerParamConfig::Instance().printKeyValues();
393393
o2::its::TrackerParamConfig::Instance().printKeyValues();
394+
const auto& vtxParams = mVertexer->getParameters();
395+
for (size_t it = 0; it < vtxParams.size(); it++) {
396+
const auto& par = vtxParams[it];
397+
LOGP(info, "vtxIter#{} : {}", it, par.asString());
398+
}
394399
const auto& trParams = mTracker->getParameters();
395400
for (size_t it = 0; it < trParams.size(); it++) {
396401
const auto& par = trParams[it];

0 commit comments

Comments
 (0)