@@ -49,6 +49,12 @@ int PVertexer::runVertexing(const gsl::span<o2d::GlobalTrackID> gids, const gsl:
4949 mMaxTrialPerCluster = 0 ;
5050 mLongestClusterTimeMS = 0 ;
5151 mLongestClusterMult = 0 ;
52+ mNIniFound = 0 ;
53+ mNKilledBCValid = 0 ;
54+ mNKilledIntCand = 0 ;
55+ mNKilledDebris = 0 ;
56+ mNKilledQuality = 0 ;
57+ mNKilledITSOnly = 0 ;
5258 mPoolDumpProduced = false ;
5359
5460 std::vector<PVertex> verticesLoc;
@@ -82,6 +88,7 @@ int PVertexer::runVertexing(const gsl::span<o2d::GlobalTrackID> gids, const gsl:
8288 createMCLabels (lblTracks, trackIDs, v2tRefsLoc, lblVtxLoc);
8389 }
8490#endif
91+ mNIniFound = verticesLoc.size ();
8592
8693 if (mValidateWithIR && mPVParams ->minNContributorsForIRcutIni >= 0 ) {
8794 applInteractionValidation (verticesLoc, vtTimeSortID, intCand, mPVParams ->minNContributorsForIRcutIni );
@@ -126,6 +133,7 @@ int PVertexer::runVertexing(const gsl::span<o2d::GlobalTrackID> gids, const gsl:
126133 auto & vtx = verticesLoc[i];
127134 if (!setCompatibleIR (vtx)) {
128135 i = -1 ;
136+ mNKilledBCValid ++;
129137 }
130138 }
131139 // do we need to validate by Int. records ?
@@ -576,6 +584,7 @@ void PVertexer::applyMADSelection(std::vector<PVertex>& vertices, std::vector<in
576584 dvec.clear ();
577585 if (tmad > mPVParams ->maxTMAD || tmad < mPVParams ->minTMAD ) {
578586 timeSort[ivt] = -1 ; // disable vertex
587+ mNKilledQuality ++;
579588 LOGP (debug, " Killing vertex {} with TMAD {}, {} of {} killed" , iv, tmad, ++nkill, nv);
580589 continue ;
581590 }
@@ -590,6 +599,7 @@ void PVertexer::applyMADSelection(std::vector<PVertex>& vertices, std::vector<in
590599 float zmad = o2::math_utils::MAD2Sigma (dvec.size (), dvec.data ());
591600 if (zmad > mPVParams ->maxZMAD || zmad < mPVParams ->minZMAD ) {
592601 timeSort[ivt] = -1 ; // disable vertex
602+ mNKilledQuality ++;
593603 LOGP (debug, " Killing vertex {} with ZMAD {}, {} of {} killed" , iv, zmad, ++nkill, nv);
594604 continue ;
595605 }
@@ -621,6 +631,7 @@ void PVertexer::applITSOnlyFractionCut(std::vector<PVertex>& vertices, std::vect
621631 float frac = nITS / float (trefs.getEntries ());
622632 if (frac > mPVParams ->maxITSOnlyFraction || frac < mPVParams ->minITSOnlyFraction ) {
623633 timeSort[ivt] = -1 ; // disable vertex
634+ mNKilledITSOnly ++;
624635 }
625636 }
626637}
@@ -669,6 +680,7 @@ void PVertexer::applInteractionValidation(std::vector<PVertex>& vertices, std::v
669680 }
670681 } else if (pv.getNContributors () >= minContrib) {
671682 timeSort[ivt] = -1 ; // discard
683+ mNKilledIntCand ++;
672684 }
673685 }
674686}
@@ -724,6 +736,7 @@ void PVertexer::reduceDebris(std::vector<PVertex>& vertices, std::vector<int>& t
724736 }
725737 if (rej) {
726738 timeSort[j] = -1 ;
739+ mNKilledDebris ++;
727740 vtJ.setNContributors (0 );
728741 }
729742 return false ;
@@ -964,7 +977,7 @@ void PVertexer::setBunchFilling(const o2::BunchFilling& bf)
964977bool PVertexer::setCompatibleIR (PVertex& vtx)
965978{
966979 // assign compatible IRs accounting for the bunch filling scheme
967- if (mClosestBunchAbove [0 ] < 0 ) { // empty or no BF was provided
980+ if (mClosestBunchAbove [0 ] < 0 && mPVParams -> doBCValidation ) { // empty or no BF was provided
968981 return false ;
969982 }
970983 const auto & vtxT = vtx.getTimeStamp ();
@@ -979,22 +992,24 @@ bool PVertexer::setCompatibleIR(PVertex& vtx)
979992 }
980993 irMax += o2::InteractionRecord (1 .e3 * (t + rangeT)); // RS TODO: make sure that irMax does not exceed TF edge
981994 irMax++; // to account for rounding
982- // restrict using bunch filling
983- int bc = mClosestBunchAbove [irMin.bc ];
984- LOG (debug) << " irMin.bc = " << irMin.bc << " bcAbove = " << bc;
985- if (bc < irMin.bc ) {
986- irMin.orbit ++;
987- }
988- irMin.bc = bc;
989- bc = mClosestBunchBelow [irMax.bc ];
990- LOG (debug) << " irMax.bc = " << irMax.bc << " bcBelow = " << bc;
991- if (bc > irMax.bc ) {
992- if (irMax.orbit == 0 ) {
993- return false ;
994- }
995- irMax.orbit --;
996- }
997- irMax.bc = bc;
995+ if (mPVParams ->doBCValidation ) {
996+ // restrict using bunch filling
997+ int bc = mClosestBunchAbove [irMin.bc ];
998+ LOG (debug) << " irMin.bc = " << irMin.bc << " bcAbove = " << bc;
999+ if (bc < irMin.bc ) {
1000+ irMin.orbit ++;
1001+ }
1002+ irMin.bc = bc;
1003+ bc = mClosestBunchBelow [irMax.bc ];
1004+ LOG (debug) << " irMax.bc = " << irMax.bc << " bcBelow = " << bc;
1005+ if (bc > irMax.bc ) {
1006+ if (irMax.orbit == 0 ) {
1007+ return false ;
1008+ }
1009+ irMax.orbit --;
1010+ }
1011+ irMax.bc = bc;
1012+ }
9981013 vtx.setIRMin (irMin);
9991014 vtx.setIRMax (irMax);
10001015 if (irMin > irMax) {
0 commit comments