Skip to content

Commit c5fbdd2

Browse files
authored
ITS: Track Follower changes + study (AliceO2Group#13536)
* ITS: Track Follower changes Signed-off-by: Felix Schlepper <[email protected]> * ITS: Add Extension Study Signed-off-by: Felix Schlepper <[email protected]> --------- Signed-off-by: Felix Schlepper <[email protected]>
1 parent 4fb71e5 commit c5fbdd2

File tree

10 files changed

+553
-37
lines changed

10 files changed

+553
-37
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,9 @@ class TrackITS : public o2::track::TrackParCov
101101

102102
GPUhdi() void setPattern(uint32_t p) { mPattern = p; }
103103
GPUhdi() uint32_t getPattern() const { return mPattern; }
104-
bool hasHitOnLayer(int i) const { return mPattern & (0x1 << i); }
105-
bool isFakeOnLayer(int i) const { return !(mPattern & (0x1 << (16 + i))); }
104+
bool hasHitOnLayer(uint32_t i) const { return mPattern & (0x1 << i); }
105+
bool isFakeOnLayer(uint32_t i) const { return !(mPattern & (0x1 << (16 + i))); }
106+
bool isExtendedOnLayer(uint32_t i) const { return (mPattern & (0x1 << (24 + i))); } // only correct if getNClusters <= 8 on layers <= 8
106107
uint32_t getLastClusterLayer() const
107108
{
108109
uint32_t r{0}, v{mPattern & ((1 << 16) - 1)};
@@ -119,7 +120,7 @@ class TrackITS : public o2::track::TrackParCov
119120
}
120121
return s;
121122
}
122-
int getNFakeClusters();
123+
int getNFakeClusters() const;
123124

124125
void setNextROFbit(bool toggle = true) { mClusterSizes = toggle ? (mClusterSizes | kNextROF) : (mClusterSizes & ~kNextROF); }
125126
bool hasHitInNextROF() const { return mClusterSizes & kNextROF; }

DataFormats/Detectors/ITSMFT/ITS/src/TrackITS.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,15 @@ bool TrackITS::isBetter(const TrackITS& best, float maxChi2) const
107107
return false;
108108
}
109109

110-
int TrackITS::getNFakeClusters()
110+
int TrackITS::getNFakeClusters() const
111111
{
112112
int nFake{0};
113-
int firstClus = getFirstClusterLayer();
114-
int lastClus = firstClus + getNClusters();
115-
for (int iCl{firstClus}; iCl < lastClus; ++iCl) {
113+
auto firstClus = getFirstClusterLayer();
114+
auto lastClus = firstClus + getNClusters();
115+
for (auto iCl{firstClus}; iCl < lastClus; ++iCl) {
116116
if (hasHitOnLayer(iCl) && isFakeOnLayer(iCl)) {
117117
++nFake;
118118
}
119119
}
120120
return nFake;
121-
}
121+
}

Detectors/ITSMFT/ITS/postprocessing/studies/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ o2_add_library(ITSPostprocessing
1616
src/ITSStudiesConfigParam.cxx
1717
src/AnomalyStudy.cxx
1818
src/TrackCheck.cxx
19+
src/TrackExtension.cxx
1920
src/Helpers.cxx
2021
PUBLIC_LINK_LIBRARIES O2::GlobalTracking
2122
O2::GlobalTrackingWorkflowReaders
@@ -28,4 +29,4 @@ o2_target_root_dictionary(ITSPostprocessing
2829
HEADERS include/ITSStudies/ITSStudiesConfigParam.h
2930
include/ITSStudies/TrackCuts.h
3031
include/ITSStudies/TrackMethods.h
31-
LINKDEF src/ITSStudiesLinkDef.h)
32+
LINKDEF src/ITSStudiesLinkDef.h)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
#ifndef O2_TRACK_EXTENSION_STUDY_H
13+
#define O2_TRACK_EXTENSION_STUDY_H
14+
15+
#include "Framework/DataProcessorSpec.h"
16+
#include "ReconstructionDataFormats/GlobalTrackID.h"
17+
18+
namespace o2
19+
{
20+
namespace steer
21+
{
22+
class MCKinematicsReader;
23+
}
24+
namespace its::study
25+
{
26+
using mask_t = o2::dataformats::GlobalTrackID::mask_t;
27+
o2::framework::DataProcessorSpec getTrackExtensionStudy(mask_t srcTracksMask, mask_t srcClustersMask, bool useMC, std::shared_ptr<o2::steer::MCKinematicsReader> kineReader);
28+
} // namespace its::study
29+
30+
} // namespace o2
31+
#endif

0 commit comments

Comments
 (0)