@@ -205,7 +205,7 @@ struct UpcRhoAnalysis {
205205 rQC.addClone (" QC/collisions/all/" , " QC/collisions/trackSelections/" );
206206 rQC.addClone (" QC/collisions/all/" , " QC/collisions/systemSelections/" );
207207
208- std::vector<std::string> collisionSelectionCounterLabels = {" all collisions" , " vertex selections " , " #it{z} position" , " number of contributors" , " RCT selections" , " reco flag selection" };
208+ std::vector<std::string> collisionSelectionCounterLabels = {" all collisions" , " ITS-TPC vertex" , " same bunch pile-up " , " ITS ROF border " , " TF border " , " #it{z} position" , " number of contributors" , " RCT selections" , " reco flag selection" };
209209 rQC.add (" QC/collisions/hSelectionCounter" , " ;;collisions passing selections" , kTH1D , {{static_cast <int >(collisionSelectionCounterLabels.size ()), -0.5 , static_cast <float >(collisionSelectionCounterLabels.size ()) - 0.5 }});
210210 rQC.add (" QC/collisions/hSelectionCounterPerRun" , " ;;run number;collisions passing selections" , kTH2D , {{static_cast <int >(collisionSelectionCounterLabels.size ()), -0.5 , static_cast <float >(collisionSelectionCounterLabels.size ()) - 0.5 }, runNumberAxis});
211211 for (int i = 0 ; i < static_cast <int >(collisionSelectionCounterLabels.size ()); ++i) {
@@ -447,35 +447,59 @@ struct UpcRhoAnalysis {
447447 template <typename C>
448448 bool collisionPassesCuts (const C& collision, int runIndex) // collision cuts
449449 {
450+ rQC.fill (HIST (" QC/collisions/hSelectionCounter" ), 0 );
451+ rQC.fill (HIST (" QC/collisions/hSelectionCounterPerRun" ), 0 , runIndex);
452+
453+ if (!collision.vtxITSTPC ())
454+ return false ;
450455 rQC.fill (HIST (" QC/collisions/hSelectionCounter" ), 1 );
451456 rQC.fill (HIST (" QC/collisions/hSelectionCounterPerRun" ), 1 , runIndex);
452- if (!collision.vtxITSTPC () || !collision.sbp () || !collision.itsROFb () || !collision.tfb ()) // not applied automatically in 2023 Pb-Pb pass5
457+
458+ if (!collision.sbp ())
453459 return false ;
454460 rQC.fill (HIST (" QC/collisions/hSelectionCounter" ), 2 );
455461 rQC.fill (HIST (" QC/collisions/hSelectionCounterPerRun" ), 2 , runIndex);
456- if (std::abs (collision.posZ ()) > collisionsPosZMaxCut)
462+
463+ if (!collision.itsROFb ())
457464 return false ;
458465 rQC.fill (HIST (" QC/collisions/hSelectionCounter" ), 3 );
459466 rQC.fill (HIST (" QC/collisions/hSelectionCounterPerRun" ), 3 , runIndex);
460- if (cutNumContribs && (collision.numContrib () > collisionsNumContribsMaxCut))
467+
468+ if (!collision.tfb ())
461469 return false ;
462470 rQC.fill (HIST (" QC/collisions/hSelectionCounter" ), 4 );
463471 rQC.fill (HIST (" QC/collisions/hSelectionCounterPerRun" ), 4 , runIndex);
464- if (useRctFlag && !isGoodRctFlag (collision)) // check RCT flags
472+
473+ if (std::abs (collision.posZ ()) > collisionsPosZMaxCut)
465474 return false ;
466475 rQC.fill (HIST (" QC/collisions/hSelectionCounter" ), 5 );
467476 rQC.fill (HIST (" QC/collisions/hSelectionCounterPerRun" ), 5 , runIndex);
468- if (useRecoFlag && (collision.flags () != cutRecoFlag)) // check reconstruction mode
477+
478+ if (cutNumContribs && (collision.numContrib () > collisionsNumContribsMaxCut))
469479 return false ;
470480 rQC.fill (HIST (" QC/collisions/hSelectionCounter" ), 6 );
471481 rQC.fill (HIST (" QC/collisions/hSelectionCounterPerRun" ), 6 , runIndex);
482+
483+ if (useRctFlag && !isGoodRctFlag (collision)) // check RCT flags
484+ return false ;
485+ rQC.fill (HIST (" QC/collisions/hSelectionCounter" ), 7 );
486+ rQC.fill (HIST (" QC/collisions/hSelectionCounterPerRun" ), 7 , runIndex);
487+
488+ if (useRecoFlag && (collision.flags () != cutRecoFlag)) // check reconstruction mode
489+ return false ;
490+ rQC.fill (HIST (" QC/collisions/hSelectionCounter" ), 8 );
491+ rQC.fill (HIST (" QC/collisions/hSelectionCounterPerRun" ), 8 , runIndex);
492+
472493 // if all selections passed
473494 return true ;
474495 }
475496
476497 template <typename T>
477498 bool trackPassesCuts (const T& track, int runIndex) // track cuts (PID done separately)
478499 {
500+ rQC.fill (HIST (" QC/tracks/hSelectionCounter" ), 0 );
501+ rQC.fill (HIST (" QC/tracks/hSelectionCounterPerRun" ), 0 , runIndex);
502+
479503 if (!track.isPVContributor ())
480504 return false ;
481505 rQC.fill (HIST (" QC/tracks/hSelectionCounter" ), 1 );
@@ -545,6 +569,7 @@ struct UpcRhoAnalysis {
545569 return false ;
546570 rQC.fill (HIST (" QC/tracks/hSelectionCounter" ), 14 );
547571 rQC.fill (HIST (" QC/tracks/hSelectionCounterPerRun" ), 14 , runIndex);
572+
548573 // if all selections passed
549574 return true ;
550575 }
@@ -699,8 +724,6 @@ struct UpcRhoAnalysis {
699724
700725 std::vector<decltype (tracks.begin ())> cutTracks; // store selected tracks
701726 for (const auto & track : tracks) {
702- rQC.fill (HIST (" QC/tracks/hSelectionCounter" ), 0 );
703- rQC.fill (HIST (" QC/tracks/hSelectionCounterPerRun" ), 0 , runIndex);
704727 fillTrackQcHistos<0 >(track); // fill QC histograms before cuts
705728
706729 if (!trackPassesCuts (track, runIndex)) // apply track cuts
0 commit comments