Skip to content

Commit 96bce11

Browse files
committed
ITS: make MaxIter a constant
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent 74232db commit 96bce11

4 files changed

Lines changed: 20 additions & 20 deletions

File tree

Detectors/ITSMFT/ITS/tracking/GPU/cuda/TimeFrameGPU.cu

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,8 +627,7 @@ constexpr auto makeIterTags(std::index_sequence<I...>)
627627
{
628628
return std::array<uint64_t, sizeof...(I)>{makeIterTag<I>()...};
629629
}
630-
// FIXME: we have to be careful that the MaxIter does not diverge from the 4 here!
631-
constexpr auto kIterTags = makeIterTags(std::make_index_sequence<4>{});
630+
constexpr auto kIterTags = makeIterTags(std::make_index_sequence<constants::MaxIter>{});
632631
} // namespace detail
633632

634633
template <int NLayers>

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,13 @@ constexpr float GB = MB * KB;
3131
constexpr bool DoTimeBenchmarks = true;
3232
constexpr bool SaveTimeBenchmarks = false;
3333

34-
GPUconstexpr() float Tolerance{1e-12}; // numerical tolerance
35-
GPUconstexpr() int ClustersPerCell{3};
36-
GPUconstexpr() int UnusedIndex{-1};
37-
GPUconstexpr() float Resolution{0.0005f};
34+
GPUconstexpr() float Tolerance = 1e-12; // numerical tolerance
35+
GPUconstexpr() int ClustersPerCell = 3;
36+
GPUconstexpr() int UnusedIndex = -1;
37+
GPUconstexpr() float Resolution = 0.0005f;
3838
GPUconstexpr() float Radl = 9.36f; // Radiation length of Si [cm]
3939
GPUconstexpr() float Rho = 2.33f; // Density of Si [g/cm^3]
40+
GPUconstexpr() int MaxIter = 4; // Max. supported iterations
4041

4142
namespace helpers
4243
{

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <limits>
1616
#include "CommonUtils/ConfigurableParam.h"
1717
#include "CommonUtils/ConfigurableParamHelper.h"
18+
#include "ITStracking/Constants.h"
1819

1920
namespace o2::its
2021
{
@@ -36,9 +37,9 @@ struct VertexerParamConfig : public o2::conf::ConfigurableParamHelper<VertexerPa
3637
float duplicateZCut = 0.7985643f;
3738
float finalSelectionZCut = 0.2932624f;
3839
float duplicateDistance2Cut = 0.0223001f;
39-
float tanLambdaCut = 0.002f; // tanLambda = deltaZ/deltaR
40+
float tanLambdaCut = 0.002f; // tanLambda = deltaZ/deltaR
4041
float nSigmaCut = 0.0479011f;
41-
float maxZPositionAllowed = 25.f; // 4x sZ of the beam
42+
float maxZPositionAllowed = 25.f; // 4x sZ of the beam
4243

4344
// Artefacts selections
4445
int clusterContributorsCut = 3; // minimum number of contributors for an accepted final vertex
@@ -62,18 +63,17 @@ struct VertexerParamConfig : public o2::conf::ConfigurableParamHelper<VertexerPa
6263
};
6364

6465
struct TrackerParamConfig : public o2::conf::ConfigurableParamHelper<TrackerParamConfig> {
65-
// Use TGeo for mat. budget
66-
static const int MaxIter = 4;
6766
static const int MinTrackLength = 4;
6867
static const int MaxTrackLength = 7;
69-
bool useMatCorrTGeo = false; // use full geometry to corect for material budget accounting in the fits. Default is to use the material budget LUT.
70-
bool useFastMaterial = false; // use faster material approximation for material budget accounting in the fits.
71-
int addTimeError[7] = {0}; // configure the width of the window in BC to be considered for the tracking.
72-
int minTrackLgtIter[MaxIter] = {}; // minimum track length at each iteration, used only if >0, otherwise use code defaults
73-
uint8_t startLayerMask[MaxIter] = {}; // mask of start layer for this iteration (if >0)
74-
float minPtIterLgt[MaxIter * (MaxTrackLength - MinTrackLength + 1)] = {}; // min.pT for given track length at this iteration, used only if >0, otherwise use code defaults
75-
float sysErrY2[7] = {0}; // systematic error^2 in Y per layer
76-
float sysErrZ2[7] = {0}; // systematic error^2 in Z per layer
68+
69+
bool useMatCorrTGeo = false; // use full geometry to corect for material budget accounting in the fits. Default is to use the material budget LUT.
70+
bool useFastMaterial = false; // use faster material approximation for material budget accounting in the fits.
71+
int addTimeError[7] = {0}; // configure the width of the window in BC to be considered for the tracking.
72+
int minTrackLgtIter[constants::MaxIter] = {}; // minimum track length at each iteration, used only if >0, otherwise use code defaults
73+
uint8_t startLayerMask[constants::MaxIter] = {}; // mask of start layer for this iteration (if >0)
74+
float minPtIterLgt[constants::MaxIter * (MaxTrackLength - MinTrackLength + 1)] = {}; // min.pT for given track length at this iteration, used only if >0, otherwise use code defaults
75+
float sysErrY2[7] = {0}; // systematic error^2 in Y per layer
76+
float sysErrZ2[7] = {0}; // systematic error^2 in Z per layer
7777
float maxChi2ClusterAttachment = -1.f;
7878
float maxChi2NDF = -1.f;
7979
float nSigmaCut = -1.f;
@@ -89,7 +89,7 @@ struct TrackerParamConfig : public o2::conf::ConfigurableParamHelper<TrackerPara
8989
bool overrideBeamEstimation = false; // use beam position from meanVertex CCDB object
9090
int trackingMode = -1; // -1: unset, 0=sync, 1=async, 2=cosmics used by gpuwf only
9191
bool doUPCIteration = false; // Perform an additional iteration for UPC events on tagged vertices. You want to combine this config with VertexerParamConfig.nIterations=2
92-
int nIterations = MaxIter; // overwrite the number of iterations
92+
int nIterations = constants::MaxIter; // overwrite the number of iterations
9393
int reseedIfShorter = 6; // for the final refit reseed the track with circle if they are shorter than this value
9494
bool shiftRefToCluster{true}; // TrackFit: after update shift the linearization reference to cluster
9595
bool repeatRefitOut{false}; // repeat outward refit using inward refit as a seed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ std::vector<TrackingParameters> TrackingMode::getTrackingParameters(TrackingMode
141141
param.ZBins = 64;
142142
param.PhiBins = 32;
143143
// check if something was overridden via configurable params
144-
if (ip < tc.MaxIter) {
144+
if (ip < constants::MaxIter) {
145145
if (tc.startLayerMask[ip] > 0) {
146146
trackParams[2].StartLayerMask = tc.startLayerMask[ip];
147147
}

0 commit comments

Comments
 (0)