Skip to content

Commit

Permalink
ITS: Track Follower changes + study (AliceO2Group#13536)
Browse files Browse the repository at this point in the history
* ITS: Track Follower changes

Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>

* ITS: Add Extension Study

Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>

---------

Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
  • Loading branch information
f3sch authored Sep 24, 2024
1 parent 4fb71e5 commit c5fbdd2
Show file tree
Hide file tree
Showing 10 changed files with 553 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ class TrackITS : public o2::track::TrackParCov

GPUhdi() void setPattern(uint32_t p) { mPattern = p; }
GPUhdi() uint32_t getPattern() const { return mPattern; }
bool hasHitOnLayer(int i) const { return mPattern & (0x1 << i); }
bool isFakeOnLayer(int i) const { return !(mPattern & (0x1 << (16 + i))); }
bool hasHitOnLayer(uint32_t i) const { return mPattern & (0x1 << i); }
bool isFakeOnLayer(uint32_t i) const { return !(mPattern & (0x1 << (16 + i))); }
bool isExtendedOnLayer(uint32_t i) const { return (mPattern & (0x1 << (24 + i))); } // only correct if getNClusters <= 8 on layers <= 8
uint32_t getLastClusterLayer() const
{
uint32_t r{0}, v{mPattern & ((1 << 16) - 1)};
Expand All @@ -119,7 +120,7 @@ class TrackITS : public o2::track::TrackParCov
}
return s;
}
int getNFakeClusters();
int getNFakeClusters() const;

void setNextROFbit(bool toggle = true) { mClusterSizes = toggle ? (mClusterSizes | kNextROF) : (mClusterSizes & ~kNextROF); }
bool hasHitInNextROF() const { return mClusterSizes & kNextROF; }
Expand Down
10 changes: 5 additions & 5 deletions DataFormats/Detectors/ITSMFT/ITS/src/TrackITS.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@ bool TrackITS::isBetter(const TrackITS& best, float maxChi2) const
return false;
}

int TrackITS::getNFakeClusters()
int TrackITS::getNFakeClusters() const
{
int nFake{0};
int firstClus = getFirstClusterLayer();
int lastClus = firstClus + getNClusters();
for (int iCl{firstClus}; iCl < lastClus; ++iCl) {
auto firstClus = getFirstClusterLayer();
auto lastClus = firstClus + getNClusters();
for (auto iCl{firstClus}; iCl < lastClus; ++iCl) {
if (hasHitOnLayer(iCl) && isFakeOnLayer(iCl)) {
++nFake;
}
}
return nFake;
}
}
3 changes: 2 additions & 1 deletion Detectors/ITSMFT/ITS/postprocessing/studies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ o2_add_library(ITSPostprocessing
src/ITSStudiesConfigParam.cxx
src/AnomalyStudy.cxx
src/TrackCheck.cxx
src/TrackExtension.cxx
src/Helpers.cxx
PUBLIC_LINK_LIBRARIES O2::GlobalTracking
O2::GlobalTrackingWorkflowReaders
Expand All @@ -28,4 +29,4 @@ o2_target_root_dictionary(ITSPostprocessing
HEADERS include/ITSStudies/ITSStudiesConfigParam.h
include/ITSStudies/TrackCuts.h
include/ITSStudies/TrackMethods.h
LINKDEF src/ITSStudiesLinkDef.h)
LINKDEF src/ITSStudiesLinkDef.h)
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#ifndef O2_TRACK_EXTENSION_STUDY_H
#define O2_TRACK_EXTENSION_STUDY_H

#include "Framework/DataProcessorSpec.h"
#include "ReconstructionDataFormats/GlobalTrackID.h"

namespace o2
{
namespace steer
{
class MCKinematicsReader;
}
namespace its::study
{
using mask_t = o2::dataformats::GlobalTrackID::mask_t;
o2::framework::DataProcessorSpec getTrackExtensionStudy(mask_t srcTracksMask, mask_t srcClustersMask, bool useMC, std::shared_ptr<o2::steer::MCKinematicsReader> kineReader);
} // namespace its::study

} // namespace o2
#endif
Loading

0 comments on commit c5fbdd2

Please sign in to comment.