Skip to content

Commit

Permalink
PVertexer cuts on ITS-only fraction only if global tracks present
Browse files Browse the repository at this point in the history
  • Loading branch information
shahor02 committed Nov 19, 2023
1 parent 2766d5d commit 8f7c2d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions Detectors/Vertexing/include/DetectorsVertexing/PVertexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ class PVertexer
long mLongestClusterTimeMS = 0;
int mLongestClusterMult = 0;
bool mPoolDumpProduced = false;
bool mITSOnly = false;
TStopwatch mTimeDBScan;
TStopwatch mTimeVertexing;
TStopwatch mTimeDebris;
Expand Down
10 changes: 8 additions & 2 deletions Detectors/Vertexing/src/PVertexer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <TH2F.h>

using namespace o2::vertexing;

using DetID = o2::detectors::DetID;
constexpr float PVertexer::kAlmost0F;
constexpr double PVertexer::kAlmost0D;
constexpr float PVertexer::kHugeF;
Expand Down Expand Up @@ -87,7 +87,7 @@ int PVertexer::runVertexing(const gsl::span<o2d::GlobalTrackID> gids, const gsl:
applInteractionValidation(verticesLoc, vtTimeSortID, intCand, mPVParams->minNContributorsForIRcutIni);
}

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

Expand Down Expand Up @@ -1367,9 +1367,15 @@ void PVertexer::setTrackSources(GTrackID::mask_t s)
{
mTrackSrc = s;
// fill vector of sources to consider
DetID::mask_t ITSTPC = DetID::getMask(DetID::ITS) | DetID::getMask(DetID::TPC);
int nGloSrc = 0;
for (int is = 0; is < GTrackID::NSources; is++) {
if (mTrackSrc[is]) {
mSrcVec.push_back(is);
if ((GTrackID::getSourceDetectorsMask(is) & ITSTPC) == ITSTPC) {
nGloSrc++;
}
}
}
mITSOnly = nGloSrc == 0;
}

0 comments on commit 8f7c2d6

Please sign in to comment.