Skip to content

Commit 8f7c2d6

Browse files
committed
PVertexer cuts on ITS-only fraction only if global tracks present
1 parent 2766d5d commit 8f7c2d6

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

Detectors/Vertexing/include/DetectorsVertexing/PVertexer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ class PVertexer
212212
long mLongestClusterTimeMS = 0;
213213
int mLongestClusterMult = 0;
214214
bool mPoolDumpProduced = false;
215+
bool mITSOnly = false;
215216
TStopwatch mTimeDBScan;
216217
TStopwatch mTimeVertexing;
217218
TStopwatch mTimeDebris;

Detectors/Vertexing/src/PVertexer.cxx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <TH2F.h>
2424

2525
using namespace o2::vertexing;
26-
26+
using DetID = o2::detectors::DetID;
2727
constexpr float PVertexer::kAlmost0F;
2828
constexpr double PVertexer::kAlmost0D;
2929
constexpr float PVertexer::kHugeF;
@@ -87,7 +87,7 @@ int PVertexer::runVertexing(const gsl::span<o2d::GlobalTrackID> gids, const gsl:
8787
applInteractionValidation(verticesLoc, vtTimeSortID, intCand, mPVParams->minNContributorsForIRcutIni);
8888
}
8989

90-
if (mPVParams->minITSOnlyFraction > 0.f || mPVParams->maxITSOnlyFraction < 1.0f) {
90+
if ((mPVParams->minITSOnlyFraction > 0.f || mPVParams->maxITSOnlyFraction < 1.0f) && !mITSOnly) {
9191
applITSOnlyFractionCut(verticesLoc, vtTimeSortID, v2tRefsLoc, trackIDs);
9292
}
9393

@@ -1367,9 +1367,15 @@ void PVertexer::setTrackSources(GTrackID::mask_t s)
13671367
{
13681368
mTrackSrc = s;
13691369
// fill vector of sources to consider
1370+
DetID::mask_t ITSTPC = DetID::getMask(DetID::ITS) | DetID::getMask(DetID::TPC);
1371+
int nGloSrc = 0;
13701372
for (int is = 0; is < GTrackID::NSources; is++) {
13711373
if (mTrackSrc[is]) {
13721374
mSrcVec.push_back(is);
1375+
if ((GTrackID::getSourceDetectorsMask(is) & ITSTPC) == ITSTPC) {
1376+
nGloSrc++;
1377+
}
13731378
}
13741379
}
1380+
mITSOnly = nGloSrc == 0;
13751381
}

0 commit comments

Comments
 (0)