Skip to content

Commit 5d919dd

Browse files
committed
Fix N ITS clusters extraction in SVertexer
1 parent e6ca521 commit 5d919dd

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

Detectors/Vertexing/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# granted to it by virtue of its status as an Intergovernmental Organization
1010
# or submit itself to any jurisdiction.
1111

12-
# add_compile_options(-O0 -g -fPIC)
12+
add_compile_options(-O0 -g -fPIC)
1313

1414
add_subdirectory(StrangenessTracking)
1515

Detectors/Vertexing/src/SVertexer.cxx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "Framework/DataProcessorSpec.h"
2424
#include "ReconstructionDataFormats/StrangeTrack.h"
2525
#include "CommonConstants/GeomConstants.h"
26+
#include "DataFormatsITSMFT/TrkClusRef.h"
2627

2728
#ifdef WITH_OPENMP
2829
#include <omp.h>
@@ -432,6 +433,7 @@ void SVertexer::buildT2V(const o2::globaltracking::RecoContainer& recoData) // a
432433
auto vtxRefs = recoData.getPrimaryVertexMatchedTrackRefs(); // references from vertex to these track IDs
433434
bool isTPCloaded = recoData.isTrackSourceLoaded(GIndex::TPC);
434435
bool isITSloaded = recoData.isTrackSourceLoaded(GIndex::ITS);
436+
bool isITSTPCloaded = recoData.isTrackSourceLoaded(GIndex::ITSTPC);
435437
if (isTPCloaded && !mSVParams->mExcludeTPCtracks) {
436438
mTPCTracksArray = recoData.getTPCTracks();
437439
mTPCTrackClusIdx = recoData.getTPCTracksClusterRefs();
@@ -503,11 +505,17 @@ void SVertexer::buildT2V(const o2::globaltracking::RecoContainer& recoData) // a
503505
// get Nclusters in the ITS if available
504506
uint8_t nITSclu = -1;
505507
auto itsGID = recoData.getITSContributorGID(tvid);
506-
if (itsGID.getSource() == GIndex::ITS && isITSloaded) {
507-
auto& itsTrack = recoData.getITSTrack(itsGID);
508-
nITSclu = itsTrack.getNumberOfClusters();
508+
if (itsGID.getSource() == GIndex::ITS) {
509+
if (isITSloaded) {
510+
auto& itsTrack = recoData.getITSTrack(itsGID);
511+
nITSclu = itsTrack.getNumberOfClusters();
512+
}
513+
} else if (itsGID.getSource() == GIndex::ITSAB) {
514+
if (isITSTPCloaded) {
515+
auto& itsABTracklet = recoData.getITSABRef(itsGID);
516+
nITSclu = itsABTracklet.getNClusters();
517+
}
509518
}
510-
511519
if (!acceptTrack(tvid, trc) && !heavyIonisingParticle) {
512520
if (tvid.isAmbiguous()) {
513521
rejmap[tvid] = true;

0 commit comments

Comments
 (0)