Skip to content

Commit 898315f

Browse files
committed
ITS: new upc settings
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent babe031 commit 898315f

6 files changed

Lines changed: 82 additions & 62 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ enum class IterationStep : uint8_t {
3737
RebuildClusterLUT,
3838
UseUPCMask,
3939
SelectUPCVertices,
40+
UseDiamond,
4041
ResetVertices,
4142
SkipROFsAboveThreshold,
4243
MarkVerticesAsUPC,
@@ -66,7 +67,6 @@ struct TrackingParameters {
6667
std::vector<float> SystErrorZ2 = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f};
6768
int ZBins{256};
6869
int PhiBins{128};
69-
bool UseDiamond = false;
7070
float Diamond[3] = {0.f, 0.f, 0.f};
7171
float DiamondCov[6] = {25.e-6f, 0.f, 0.f, 25.e-6f, 0.f, 36.f};
7272

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

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,32 @@ namespace o2::its
2121
{
2222

2323
struct VertexerParamConfig : public o2::conf::ConfigurableParamHelper<VertexerParamConfig> {
24+
static constexpr int MaxIter = 2;
2425
bool saveTimeBenchmarks = false; // dump metrics on file
2526

2627
int nIterations = 1; // Number of vertexing passes to perform.
2728
int vertPerRofThreshold = 0; // Maximum number of vertices per ROF to trigger second a iteration.
2829

2930
// geometrical cuts for tracklet selection for Pb-Pb
30-
float zCut = 0.002f;
31-
float phiCut = 0.005f;
32-
float pairCut = 0.017321f;
33-
float clusterCut = 0.170048f;
34-
float coarseZWindow = 0.055458f;
35-
float seedDedupZCut = 0.116685f;
36-
float refitDedupZCut = 0.039855f;
37-
float duplicateZCut = 0.200097f;
38-
float finalSelectionZCut = 0.034535f;
39-
float duplicateDistance2Cut = 0.005117f;
40-
float tanLambdaCut = 0.002f; // tanLambda = deltaZ/deltaR
41-
float nSigmaCut = 0.0164651f;
42-
float maxZPositionAllowed = 25.f; // 4x sZ of the beam
31+
float zCut[MaxIter] = {0.002f};
32+
float phiCut[MaxIter] = {0.005f};
33+
float pairCut[MaxIter] = {0.017321f};
34+
float clusterCut[MaxIter] = {0.170048f};
35+
float coarseZWindow[MaxIter] = {0.055458f};
36+
float seedDedupZCut[MaxIter] = {0.116685f};
37+
float refitDedupZCut[MaxIter] = {0.039855f};
38+
float duplicateZCut[MaxIter] = {0.200097f};
39+
float finalSelectionZCut[MaxIter] = {0.034535f};
40+
float duplicateDistance2Cut[MaxIter] = {0.005117f};
41+
float tanLambdaCut[MaxIter] = {0.002f}; // tanLambda = deltaZ/deltaR
42+
float nSigmaCut[MaxIter] = {0.0164651f};
43+
int clusterContributorsCut[MaxIter] = {3}; // minimum number of contributors for an accepted final vertex
44+
int suppressLowMultDebris[MaxIter] = {8}; // suppress all vertices below this threshold if a vertex was already found in a rof
45+
int seedMemberRadiusTime[MaxIter] = {0};
46+
int seedMemberRadiusZ[MaxIter] = {2};
47+
int maxTrackletsPerCluster[MaxIter] = {100};
4348

44-
// Artefacts selections
45-
int clusterContributorsCut = 3; // minimum number of contributors for an accepted final vertex
46-
int suppressLowMultDebris = 16; // suppress all vertices below this threshold if a vertex was already found in a rof
47-
int seedMemberRadiusTime = 0;
48-
int seedMemberRadiusZ = 2;
49-
int maxTrackletsPerCluster = 100;
49+
float maxZPositionAllowed = 25.f; // 4x sZ of the beam
5050
int phiSpan = -1;
5151
int zSpan = -1;
5252
int ZBins = 1; // z-phi index table configutation: number of z bins
@@ -84,27 +84,27 @@ struct TrackerParamConfig : public o2::conf::ConfigurableParamHelper<TrackerPara
8484
float pvRes = -1.f;
8585
int LUTbinsPhi = -1;
8686
int LUTbinsZ = -1;
87-
float diamondPos[3] = {0.f, 0.f, 0.f}; // override the position of the vertex
88-
bool useDiamond = false; // enable overriding the vertex position
89-
bool perPrimaryVertexProcessing = false; // perform the full tracking considering the vertex hypotheses one at the time.
90-
bool saveTimeBenchmarks = false; // dump metrics on file
91-
bool overrideBeamEstimation = false; // use beam position from meanVertex CCDB object
92-
int trackingMode = -1; // -1: unset, 0=sync, 1=async, 2=cosmics used by gpuwf only
93-
bool doUPCIteration = false; // Perform an additional iteration for UPC events on tagged vertices. You want to combine this config with VertexerParamConfig.nIterations=2
94-
int nIterations = constants::MaxIter; // overwrite the number of iterations
95-
int reseedIfShorter = 6; // for the final refit reseed the track with circle if they are shorter than this value
96-
bool shiftRefToCluster{true}; // TrackFit: after update shift the linearization reference to cluster
97-
bool repeatRefitOut{false}; // repeat outward refit using inward refit as a seed
98-
bool createArtefactLabels{false}; // create on-the-fly labels for the artefacts
87+
float diamondPos[3] = {0.f, 0.f, 0.f}; // override the position of the vertex
88+
bool useDiamond[constants::MaxIter] = {false}; // enable overriding the vertex position in each iteration
89+
bool perPrimaryVertexProcessing = false; // perform the full tracking considering the vertex hypotheses one at the time.
90+
bool saveTimeBenchmarks = false; // dump metrics on file
91+
bool overrideBeamEstimation = false; // use beam position from meanVertex CCDB object
92+
int trackingMode = -1; // -1: unset, 0=sync, 1=async, 2=cosmics used by gpuwf only
93+
bool doUPCIteration = false; // Perform an additional iteration for UPC events on tagged vertices. You want to combine this config with VertexerParamConfig.nIterations=2
94+
int nIterations = constants::MaxIter; // overwrite the number of iterations
95+
int reseedIfShorter = 6; // for the final refit reseed the track with circle if they are shorter than this value
96+
bool shiftRefToCluster{true}; // TrackFit: after update shift the linearization reference to cluster
97+
bool repeatRefitOut{false}; // repeat outward refit using inward refit as a seed
98+
bool createArtefactLabels{false}; // create on-the-fly labels for the artefacts
9999

100100
int nThreads = 1;
101101
bool printMemory = false;
102102
size_t maxMemory = std::numeric_limits<size_t>::max();
103103
bool dropTFUponFailure = false;
104-
bool fataliseUponFailure = true; // granular management of the fatalisation in async mode
104+
bool fataliseUponFailure = true; // granular management of the fatalisation in async mode
105105

106106
// Selections on tracks sharing clusters
107-
bool allowSharingFirstCluster = false; // allow first cluster sharing among tracks
107+
bool allowSharingFirstCluster = false; // allow first cluster sharing among tracks
108108
float sharedClusterMaxDeltaPhi = 0.05f; // Maximum allowed delta phi at the cluster position
109109
float sharedClusterMaxDeltaEta = 0.03f; // Maximum allowed delta eta at the cluster position
110110
bool sharedClusterOppositeSign = false; // Require opposite sign of the tracklets

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

Lines changed: 41 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ using namespace o2::its;
2424

2525
std::string TrackingParameters::asString() const
2626
{
27-
std::string str = std::format("NZb:{} NPhB:{} PerVtx:{} DropFail:{} TtklMinPt:{:.2f} MinCl:{}", ZBins, PhiBins, PerPrimaryVertexProcessing, DropTFUponFailure, TrackletMinPt, MinTrackLength);
27+
std::string str = std::format("NZb:{} NPhB:{} PerVtx:{} DropFail:{} TtklMinPt:{:.2f} MinCl:{} Steps:{}", ZBins, PhiBins, PerPrimaryVertexProcessing, DropTFUponFailure, TrackletMinPt, MinTrackLength, PassFlags.string());
2828
auto isSet = [](auto e) { return e >= 0; };
2929
auto isAnySet = [&isSet](auto v) { return !v.empty() && std::any_of(v.begin(), v.end(), isSet); };
3030
bool first = true;
@@ -59,6 +59,9 @@ std::string TrackingParameters::asString() const
5959
if (MaxHoles) {
6060
str += std::format(" MaxHoles:{} HoleMask:{}", MaxHoles, HoleLayerMask.asString());
6161
}
62+
if (PassFlags[IterationStep::UseDiamond]) {
63+
str += " using diamond constraint ";
64+
}
6265
if (std::numeric_limits<size_t>::max() != MaxMemory) {
6366
str += std::format(" MemLimit {:.2f} GB", double(MaxMemory) / constants::GB);
6467
}
@@ -125,7 +128,7 @@ std::vector<TrackingParameters> TrackingMode::getTrackingParameters(TrackingMode
125128
std::vector<TrackingParameters> trackParams;
126129

127130
if (mode == TrackingMode::Async) {
128-
trackParams.resize(tc.doUPCIteration ? 4 : 3);
131+
trackParams.resize(tc.doUPCIteration ? constants::MaxIter : constants::MaxIter - 1);
129132
trackParams[1].TrackletMinPt = 0.2f;
130133
trackParams[1].CellDeltaTanLambdaSigma *= 2.;
131134
trackParams[2].TrackletMinPt = 0.1f;
@@ -164,6 +167,9 @@ std::vector<TrackingParameters> TrackingMode::getTrackingParameters(TrackingMode
164167
param.MinPt[lslot0] = tc.minPtIterLgt[lslot];
165168
}
166169
}
170+
if (tc.useDiamond[ip]) {
171+
param.PassFlags.set(IterationStep::UseDiamond);
172+
}
167173
}
168174
}
169175
} else if (mode == TrackingMode::Sync) {
@@ -253,7 +259,6 @@ std::vector<TrackingParameters> TrackingMode::getTrackingParameters(TrackingMode
253259
for (int iD{0}; iD < 3; ++iD) {
254260
p.Diamond[iD] = tc.diamondPos[iD];
255261
}
256-
p.UseDiamond = tc.useDiamond;
257262
}
258263

259264
if (trackParams.size() > tc.nIterations) {
@@ -274,42 +279,57 @@ std::vector<VertexingParameters> TrackingMode::getVertexingParameters(TrackingMo
274279
vertParams[1].PassFlags.set(IterationStep::SkipROFsAboveThreshold, IterationStep::MarkVerticesAsUPC);
275280

276281
// global parameters set for every iteration
277-
for (auto& p : vertParams) {
282+
for (size_t it{0}; it < vertParams.size(); ++it) {
283+
auto& p = vertParams[it];
278284
p.vertPerRofThreshold = vc.vertPerRofThreshold;
279285
p.SaveTimeBenchmarks = vc.saveTimeBenchmarks;
280286
p.PrintMemory = vc.printMemory;
281287
p.MaxMemory = vc.maxMemory;
282288
p.DropTFUponFailure = vc.dropTFUponFailure;
283-
p.NSigmaCut = vc.nSigmaCut;
284289
p.maxZPositionAllowed = vc.maxZPositionAllowed;
285-
p.clusterContributorsCut = vc.clusterContributorsCut;
286-
p.suppressLowMultDebris = vc.suppressLowMultDebris;
287-
p.seedMemberRadiusTime = vc.seedMemberRadiusTime;
288-
p.seedMemberRadiusZ = vc.seedMemberRadiusZ;
289290
p.phiSpan = vc.phiSpan;
290291
p.nThreads = vc.nThreads;
291292
p.ZBins = vc.ZBins;
292293
p.PhiBins = vc.PhiBins;
293294
p.useTruthSeeding = vc.useTruthSeeding;
294-
p.maxTrackletsPerCluster = vc.maxTrackletsPerCluster;
295-
p.zCut = vc.zCut;
296-
p.phiCut = vc.phiCut;
297-
p.pairCut = vc.pairCut;
298-
p.clusterCut = vc.clusterCut;
299-
p.coarseZWindow = vc.coarseZWindow;
300-
p.seedDedupZCut = vc.seedDedupZCut;
301-
p.refitDedupZCut = vc.refitDedupZCut;
302-
p.duplicateZCut = vc.duplicateZCut;
303-
p.finalSelectionZCut = vc.finalSelectionZCut;
304-
p.duplicateDistance2Cut = vc.duplicateDistance2Cut;
305-
p.tanLambdaCut = vc.tanLambdaCut;
295+
296+
// per iter settings
297+
p.NSigmaCut = vc.nSigmaCut[it];
298+
p.clusterContributorsCut = vc.clusterContributorsCut[it];
299+
p.suppressLowMultDebris = vc.suppressLowMultDebris[it];
300+
p.seedMemberRadiusTime = vc.seedMemberRadiusTime[it];
301+
p.seedMemberRadiusZ = vc.seedMemberRadiusZ[it];
302+
p.maxTrackletsPerCluster = vc.maxTrackletsPerCluster[it];
303+
p.zCut = vc.zCut[it];
304+
p.phiCut = vc.phiCut[it];
305+
p.pairCut = vc.pairCut[it];
306+
p.clusterCut = vc.clusterCut[it];
307+
p.coarseZWindow = vc.coarseZWindow[it];
308+
p.seedDedupZCut = vc.seedDedupZCut[it];
309+
p.refitDedupZCut = vc.refitDedupZCut[it];
310+
p.duplicateZCut = vc.duplicateZCut[it];
311+
p.finalSelectionZCut = vc.finalSelectionZCut[it];
312+
p.duplicateDistance2Cut = vc.duplicateDistance2Cut[it];
313+
p.tanLambdaCut = vc.tanLambdaCut[it];
306314
}
307315

308316
if (mode == TrackingMode::Async) {
309317
// relax for UPC iteration
310318
vertParams[1].phiCut = 0.015f;
311319
vertParams[1].tanLambdaCut = 0.015f;
312320
vertParams[1].maxTrackletsPerCluster = 2000;
321+
vertParams[1].pairCut = 0.0317563;
322+
vertParams[1].clusterCut = 0.6640964;
323+
vertParams[1].coarseZWindow = 0.2049018;
324+
vertParams[1].seedDedupZCut = 0.0711793;
325+
vertParams[1].refitDedupZCut = 0.0680009;
326+
vertParams[1].duplicateZCut = 0.1582193;
327+
vertParams[1].finalSelectionZCut = 0.1081465;
328+
vertParams[1].duplicateDistance2Cut = 0.0117033;
329+
vertParams[1].clusterContributorsCut = 2;
330+
vertParams[1].seedMemberRadiusZ = 0;
331+
vertParams[1].NSigmaCut = 0.032841;
332+
vertParams[1].suppressLowMultDebris = 0;
313333
} else if (mode == TrackingMode::Sync || TrackingMode::Cosmics) {
314334
vertParams.resize(1);
315335
} else {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ void TrackerTraits<NLayers>::computeLayerTracklets(const int iteration, int iVer
6161
if (!mTimeFrame->getROFMaskView().isROFEnabled(transition.fromLayer, pivotROF)) {
6262
return 0;
6363
}
64-
gsl::span<const Vertex> primaryVertices = mTrkParams[iteration].UseDiamond ? diamondSpan : mTimeFrame->getPrimaryVertices(transition.fromLayer, pivotROF);
64+
gsl::span<const Vertex> primaryVertices = mTrkParams[iteration].PassFlags[IterationStep::UseDiamond] ? diamondSpan : mTimeFrame->getPrimaryVertices(transition.fromLayer, pivotROF);
6565
if (primaryVertices.empty()) {
6666
return 0;
6767
}
@@ -97,7 +97,7 @@ void TrackerTraits<NLayers>::computeLayerTracklets(const int iteration, int iVer
9797

9898
for (int iV = startVtx; iV < endVtx; ++iV) {
9999
const auto& pv = primaryVertices[iV];
100-
if (!mTimeFrame->getROFVertexLookupTableView().isVertexCompatible(transition.fromLayer, pivotROF, pv)) {
100+
if (!mTrkParams[iteration].PassFlags[IterationStep::UseDiamond] && !mTimeFrame->getROFVertexLookupTableView().isVertexCompatible(transition.fromLayer, pivotROF, pv)) {
101101
continue;
102102
}
103103
if (pv.isFlagSet(Vertex::Flags::UPCMode) != mTrkParams[iteration].PassFlags[IterationStep::SelectUPCVertices]) {
@@ -129,7 +129,7 @@ void TrackerTraits<NLayers>::computeLayerTracklets(const int iteration, int iVer
129129
continue;
130130
}
131131
const auto ts = mTimeFrame->getROFOverlapTableView().getTimeStamp(transition.fromLayer, pivotROF, transition.toLayer, targetROF);
132-
if (!ts.isCompatible(pv.getTimeStamp())) {
132+
if (!mTrkParams[iteration].PassFlags[IterationStep::UseDiamond] && !ts.isCompatible(pv.getTimeStamp())) {
133133
continue;
134134
}
135135
const auto& targetIndexTable = mTimeFrame->getIndexTable(targetROF, transition.toLayer);

Detectors/Upgrades/ALICE3/GlobalReconstruction/workflow/src/TrackerSpec.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ std::vector<o2::its::TrackingParameters> TrackerDPL::createTrackingParamsFromCon
145145
params.MaxChi2NDF = paramConfig["MaxChi2NDF"].get<float>();
146146
}
147147

148-
if (paramConfig.contains("UseDiamond")) {
149-
params.UseDiamond = paramConfig["UseDiamond"].get<bool>();
150-
}
148+
// if (paramConfig.contains("UseDiamond")) {
149+
// params.UseDiamond = paramConfig["UseDiamond"].get<bool>();
150+
// }
151151
if (paramConfig.contains("AllowSharingFirstCluster")) {
152152
params.AllowSharingFirstCluster = paramConfig["AllowSharingFirstCluster"].get<bool>();
153153
}

prodtests/full-system-test/dpl-workflow.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ EVE_OPT=" --jsons-folder $EDJSONS_DIR"
164164

165165
# ITS vertexing settings
166166
if [[ $BEAMTYPE == "pp" || $LIGHTNUCLEI == "1" ]]; then
167-
ITS_CONFIG_KEY+="ITSVertexerParam.phiCut=0.4;ITSVertexerParam.tanLambdaCut=0.17;ITSVertexerParam.pairCut=0.0317563;ITSVertexerParam.clusterCut=0.6640964;ITSVertexerParam.coarseZWindow=0.2049018;ITSVertexerParam.seedDedupZCut=0.0711793;ITSVertexerParam.refitDedupZCut=0.0680009;ITSVertexerParam.duplicateZCut=0.1582193;ITSVertexerParam.finalSelectionZCut=0.1081465;ITSVertexerParam.duplicateDistance2Cut=0.0117033;ITSVertexerParam.clusterContributorsCut=2;ITSVertexerParam.seedMemberRadiusZ=0;ITSVertexerParam.nSigmaCut=0.032841;ITSVertexerParam.suppressLowMultDebris=0;"
167+
ITS_CONFIG_KEY+="ITSVertexerParam.phiCut[0]=0.4;ITSVertexerParam.tanLambdaCut[0]=0.17;ITSVertexerParam.pairCut[0]=0.0317563;ITSVertexerParam.clusterCut[0]=0.6640964;ITSVertexerParam.coarseZWindow[0]=0.2049018;ITSVertexerParam.seedDedupZCut[0]=0.0711793;ITSVertexerParam.refitDedupZCut[0]=0.0680009;ITSVertexerParam.duplicateZCut[0]=0.1582193;ITSVertexerParam.finalSelectionZCut[0]=0.1081465;ITSVertexerParam.duplicateDistance2Cut[0]=0.0117033;ITSVertexerParam.clusterContributorsCut[0]=2;ITSVertexerParam.seedMemberRadiusZ[0]=0;ITSVertexerParam.nSigmaCut[0]=0.032841;ITSVertexerParam.suppressLowMultDebris[0]=0;"
168168
fi
169169

170170
if [[ $CTFINPUT != 1 ]]; then

0 commit comments

Comments
 (0)