Skip to content

Commit e6404d2

Browse files
authored
Mantain the nextROF bit information (#12348)
* Mantain the information on the nextROF bit * Do not use the user field * Fix setting the ROF bit
1 parent 2616c57 commit e6404d2

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ namespace its
3535
class TrackITS : public o2::track::TrackParCov
3636
{
3737
enum UserBits {
38-
kNextROF = 1
38+
kNextROF = 1 << 28,
39+
kSharedClusters = 1 << 29
3940
};
4041

4142
using Cluster = o2::itsmft::Cluster;
@@ -120,8 +121,10 @@ class TrackITS : public o2::track::TrackParCov
120121
}
121122
int getNFakeClusters();
122123

123-
void setNextROFbit(bool toggle = true) { setUserField((getUserField() & ~kNextROF) | (-toggle & kNextROF)); }
124-
bool hasHitInNextROF() const { return getUserField() & kNextROF; }
124+
void setNextROFbit(bool toggle = true) { mClusterSizes = toggle ? (mClusterSizes | kNextROF) : (mClusterSizes & ~kNextROF); }
125+
bool hasHitInNextROF() const { return mClusterSizes & kNextROF; }
126+
void setSharedClusters(bool toggle = true) { mClusterSizes = toggle ? (mClusterSizes | kSharedClusters) : (mClusterSizes & ~kSharedClusters); }
127+
bool hasSharedClusters() const { return mClusterSizes & kSharedClusters; }
125128

126129
void setClusterSize(int l, int size)
127130
{
@@ -137,7 +140,7 @@ class TrackITS : public o2::track::TrackParCov
137140

138141
int getClusterSize(int l)
139142
{
140-
if (l >= 8) {
143+
if (l >= 7) {
141144
return 0;
142145
}
143146
return (mClusterSizes >> (l * 4)) & 0xf;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,8 @@ void TrackerTraits::findRoads(const int iteration)
641641
if (rofs[2] != INT_MAX) {
642642
continue;
643643
}
644+
track.setUserField(0);
645+
track.getParamOut().setUserField(0);
644646
if (rofs[1] != INT_MAX) {
645647
track.setNextROFbit();
646648
}

Detectors/ITSMFT/ITS/workflow/src/TrackerSpec.cxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,6 @@ void TrackerDPL::run(ProcessingContext& pc)
299299
// Some conversions that needs to be moved in the tracker internals
300300
for (unsigned int iTrk{0}; iTrk < tracks.size(); ++iTrk) {
301301
auto& trc{tracks[iTrk]};
302-
trc.setUserField(0);
303-
trc.getParamOut().setUserField(0);
304302
trc.setFirstClusterEntry(allClusIdx.size()); // before adding tracks, create final cluster indices
305303
int ncl = trc.getNumberOfClusters(), nclf = 0;
306304
for (int ic = TrackITSExt::MaxClusters; ic--;) { // track internally keeps in->out cluster indices, but we want to store the references as out->in!!!

0 commit comments

Comments
 (0)