Skip to content

Commit b8138ed

Browse files
committed
ITS: staggered tracking
Signed-off-by: Felix Schlepper <[email protected]>
1 parent 270dd33 commit b8138ed

33 files changed

+2591
-1634
lines changed

DataFormats/Detectors/ITSMFT/ITS/include/DataFormatsITS/TrackITS.h

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@
1616
#ifndef ALICEO2_ITS_TRACKITS_H
1717
#define ALICEO2_ITS_TRACKITS_H
1818

19+
#include <cstdint>
1920
#include <vector>
2021

2122
#include "GPUCommonDef.h"
2223
#include "ReconstructionDataFormats/Track.h"
2324
#include "CommonDataFormat/RangeReference.h"
25+
#include "CommonDataFormat/TimeStamp.h"
2426

2527
namespace o2
2628
{
@@ -35,12 +37,12 @@ namespace its
3537
class TrackITS : public o2::track::TrackParCov
3638
{
3739
enum UserBits {
38-
kNextROF = 1 << 28,
3940
kSharedClusters = 1 << 29
4041
};
4142

4243
using Cluster = o2::itsmft::Cluster;
4344
using ClusRefs = o2::dataformats::RangeRefComp<4>;
45+
using Timestamp = o2::dataformats::TimeStampWithError<uint32_t, uint16_t>;
4446

4547
public:
4648
using o2::track::TrackParCov::TrackParCov; // inherit base constructors
@@ -93,6 +95,9 @@ class TrackITS : public o2::track::TrackParCov
9395

9496
bool isBetter(const TrackITS& best, float maxChi2) const;
9597

98+
auto& getTimeStamp() { return mTime; }
99+
const auto& getTimeStamp() const { return mTime; }
100+
96101
GPUhdi() o2::track::TrackParCov& getParamIn() { return *this; }
97102
GPUhdi() const o2::track::TrackParCov& getParamIn() const { return *this; }
98103

@@ -122,8 +127,6 @@ class TrackITS : public o2::track::TrackParCov
122127
}
123128
int getNFakeClusters() const;
124129

125-
void setNextROFbit(bool toggle = true) { mClusterSizes = toggle ? (mClusterSizes | kNextROF) : (mClusterSizes & ~kNextROF); }
126-
bool hasHitInNextROF() const { return mClusterSizes & kNextROF; }
127130
void setSharedClusters(bool toggle = true) { mClusterSizes = toggle ? (mClusterSizes | kSharedClusters) : (mClusterSizes & ~kSharedClusters); }
128131
bool hasSharedClusters() const { return mClusterSizes & kSharedClusters; }
129132

@@ -157,9 +160,10 @@ class TrackITS : public o2::track::TrackParCov
157160
ClusRefs mClusRef; ///< references on clusters
158161
float mChi2 = 0.; ///< Chi2 for this track
159162
uint32_t mPattern = 0; ///< layers pattern
160-
unsigned int mClusterSizes = 0u;
163+
uint32_t mClusterSizes = 0u; ///< packed clamped cluster size
164+
Timestamp mTime; ///< track time stamp with error in BC, defined asymmetrical start + range in BCs
161165

162-
ClassDefNV(TrackITS, 6);
166+
ClassDefNV(TrackITS, 7);
163167
};
164168

165169
class TrackITSExt : public TrackITS
@@ -169,15 +173,13 @@ class TrackITSExt : public TrackITS
169173
static constexpr int MaxClusters = 16; /// Prepare for overlaps and new detector configurations
170174
using TrackITS::TrackITS; // inherit base constructors
171175

172-
GPUh() TrackITSExt(o2::track::TrackParCov&& parCov, short ncl, float chi2,
173-
o2::track::TrackParCov&& outer, std::array<int, MaxClusters> cls)
176+
GPUh() TrackITSExt(o2::track::TrackParCov&& parCov, short ncl, float chi2, o2::track::TrackParCov&& outer, std::array<int, MaxClusters> cls)
174177
: TrackITS(parCov, chi2, outer), mIndex{cls}
175178
{
176179
setNumberOfClusters(ncl);
177180
}
178181

179-
GPUh() TrackITSExt(o2::track::TrackParCov& parCov, short ncl, float chi2, std::uint32_t rof,
180-
o2::track::TrackParCov& outer, std::array<int, MaxClusters> cls)
182+
GPUh() TrackITSExt(o2::track::TrackParCov& parCov, short ncl, float chi2, o2::track::TrackParCov& outer, std::array<int, MaxClusters> cls)
181183
: TrackITS(parCov, chi2, outer), mIndex{cls}
182184
{
183185
setNumberOfClusters(ncl);
@@ -212,7 +214,7 @@ class TrackITSExt : public TrackITS
212214

213215
private:
214216
std::array<int, MaxClusters> mIndex = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; ///< Indices of associated clusters
215-
ClassDefNV(TrackITSExt, 2);
217+
ClassDefNV(TrackITSExt, 3);
216218
};
217219
} // namespace its
218220
} // namespace o2

Detectors/ITSMFT/ITS/tracking/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ o2_add_library(ITStracking
3636
PRIVATE_LINK_LIBRARIES
3737
O2::Steer
3838
TBB::tbb)
39-
# target_compile_options(${targetName} PRIVATE -O0 -g -fPIC -fno-omit-frame-pointer)
39+
target_compile_options(${targetName} PRIVATE -O0 -g -fPIC -fno-omit-frame-pointer)
4040

4141
o2_add_library(ITSTrackingInterface
4242
TARGETVARNAME targetName
@@ -45,6 +45,7 @@ o2_add_library(ITSTrackingInterface
4545
O2::ITStracking
4646
O2::Framework
4747
O2::GPUTracking)
48+
target_compile_options(${targetName} PRIVATE -O0 -g -fPIC -fno-omit-frame-pointer)
4849

4950
o2_target_root_dictionary(ITStracking
5051
HEADERS include/ITStracking/ClusterLines.h

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ class BoundedMemoryResource final : public std::pmr::memory_resource
9797
size_t getMaxMemory() const noexcept { return mMaxMemory; }
9898
void setMaxMemory(size_t max)
9999
{
100+
if (max == mMaxMemory) {
101+
return;
102+
}
100103
size_t used = mUsedMemory.load(std::memory_order_acquire);
101104
if (used > max) {
102105
++mCountThrow;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#ifndef TRACKINGITSU_INCLUDE_CACELL_H_
1717
#define TRACKINGITSU_INCLUDE_CACELL_H_
1818

19+
#include "ReconstructionDataFormats/Track.h"
1920
#include "ITStracking/Constants.h"
2021
#include "GPUCommonDef.h"
2122

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct TrackingParameters {
3737
std::string asString() const;
3838

3939
int NLayers = 7;
40-
int DeltaROF = 0;
40+
std::vector<int> DeltaROF = {0, 0, 0, 0, 0, 0, 0}; // Delta in BC to define search window
4141
std::vector<float> LayerZ = {16.333f + 1, 16.333f + 1, 16.333f + 1, 42.140f + 1, 42.140f + 1, 73.745f + 1, 73.745f + 1};
4242
std::vector<float> LayerRadii = {2.33959f, 3.14076f, 3.91924f, 19.6213f, 24.5597f, 34.388f, 39.3329f};
4343
std::vector<float> LayerxX0 = {5.e-3f, 5.e-3f, 5.e-3f, 1.e-2f, 1.e-2f, 1.e-2f, 1.e-2f};
@@ -46,7 +46,6 @@ struct TrackingParameters {
4646
std::vector<float> SystErrorZ2 = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f};
4747
int ZBins{256};
4848
int PhiBins{128};
49-
int nROFsPerIterations = -1;
5049
bool UseDiamond = false;
5150
float Diamond[3] = {0.f, 0.f, 0.f};
5251

@@ -56,12 +55,11 @@ struct TrackingParameters {
5655
int MinTrackLength = 7;
5756
float NSigmaCut = 5;
5857
float PVres = 1.e-2f;
58+
int NTimeSlices{1};
5959
/// Trackleting cuts
6060
float TrackletMinPt = 0.3f;
61-
float TrackletsPerClusterLimit = 2.f;
6261
/// Cell finding cuts
6362
float CellDeltaTanLambdaSigma = 0.007f;
64-
float CellsPerClusterLimit = 2.f;
6563
/// Fitter parameters
6664
o2::base::PropagatorImpl<float>::MatCorrType CorrType = o2::base::PropagatorImpl<float>::MatCorrType::USEMatCorrNONE;
6765
float MaxChi2ClusterAttachment = 60.f;
@@ -91,14 +89,12 @@ struct TrackingParameters {
9189
struct VertexingParameters {
9290
std::string asString() const;
9391

94-
int nIterations = 1; // Number of vertexing passes to perform
95-
int vertPerRofThreshold = 0; // Maximum number of vertices per ROF to trigger second a round
92+
int nIterations = 1; // Number of vertexing passes to perform
9693
bool allowSingleContribClusters = false;
9794
std::vector<float> LayerZ = {16.333f + 1, 16.333f + 1, 16.333f + 1, 42.140f + 1, 42.140f + 1, 73.745f + 1, 73.745f + 1};
9895
std::vector<float> LayerRadii = {2.33959f, 3.14076f, 3.91924f, 19.6213f, 24.5597f, 34.388f, 39.3329f};
9996
int ZBins{1};
10097
int PhiBins{128};
101-
int deltaRof = 0;
10298
float zCut = 0.002f;
10399
float phiCut = 0.005f;
104100
float pairCut = 0.04f;
@@ -117,7 +113,6 @@ struct VertexingParameters {
117113
bool SaveTimeBenchmarks = false;
118114

119115
bool useTruthSeeding = false; // overwrite found vertices with MC events
120-
bool outputContLabels = false;
121116

122117
int nThreads = 1;
123118
bool PrintMemory = false; // print allocator usage in epilog report

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,6 @@
1919

2020
#include "ReconstructionDataFormats/Vertex.h"
2121

22-
#ifdef CA_DEBUG
23-
#define CA_DEBUGGER(x) x
24-
#else
25-
#define CA_DEBUGGER(x) \
26-
do { \
27-
} while (0)
28-
#endif
29-
3022
namespace o2::its
3123
{
3224

@@ -35,7 +27,7 @@ enum class TrackletMode {
3527
Layer1Layer2 = 2
3628
};
3729

38-
using Vertex = o2::dataformats::Vertex<o2::dataformats::TimeStamp<int>>;
30+
using Vertex = o2::dataformats::Vertex<o2::dataformats::TimeStampWithError<uint32_t, uint16_t>>;
3931

4032
template <bool IsConst, typename T>
4133
using maybe_const = typename std::conditional<IsConst, const T, T>::type;

0 commit comments

Comments
 (0)