@@ -118,7 +118,8 @@ struct ExclusiveRhoTo4Pi {
118118 {
119119 // QA plots: Event and Track Counter
120120 histosDataCounter.add (" EventsCounts_vs_runNo" , " Event Counter Run by Run; Run Number; Number of Events" , kTH2F , {{113 , 0 , 113 }, {14 , 0 , 14 }});
121- histosDataCounter.add (" TracksCounts_vs_runNo" , " Track Counter Run by Run; Run Number; Number of Tracks" , kTH2F , {{113 , 0 , 113 }, {14 , 0 , 14 }});
121+ histosDataCounter.add (" TracksCounts_vs_runNo" , " Track Counter Run by Run; Run Number; Number of Track" , kTH2F , {{113 , 0 , 113 }, {14 , 0 , 14 }});
122+ histosDataCounter.add (" LostInTrackCut_vs_runNo" , " Track Counter Run by Run; Run Number; Number of Tracks" , kTH2F , {{113 , 0 , 113 }, {14 , 0 , 14 }});
122123 // QA plots: event selection-selected events
123124 histosQA.add (" Events/selected/UPCmode" , " UPC mode; Events" , kTH1F , {{5 , 0 , 5 }});
124125 histosQA.add (" Events/selected/GapSide" , " Gap Side;Gap Side; Events" , kTH1F , {{4 , 0 , 4 }});
@@ -241,7 +242,7 @@ struct ExclusiveRhoTo4Pi {
241242 histosKin.add (" all" , " ;pT [GeV/c]; #eta;#varphi" , kTH3F , {pTAxis, etaAxis, phiAxis});
242243 histosKin.add (" selected" , " ;pT [GeV/c]; #eta;#varphi" , kTH3F , {pTAxis, etaAxis, phiAxis});
243244 histosKin.add (" pions" , " ;pT [GeV/c]; #eta;#varphi" , kTH3F , {pTAxis, etaAxis, phiAxis});
244- histosKin.add (" pions-from-4pi " , " ;pT [GeV/c]; #eta;#varphi;y " , kTHnSparseF , {pTAxis, etaAxis, phiAxis, rapidityAxis});
245+ histosKin.add (" pions-from-4pion " , " ;pT [GeV/c]; #eta;#varphi;y " , kTHnSparseF , {pTAxis, etaAxis, phiAxis, rapidityAxis});
245246 // Rho Prime Kinematics
246247 histos4piKin.add (" two-pion" , " ;p_{T}^{4#pi} [GeV/c] ;m_{#pi^{+}#pi^{-}} [GeV/c^2];m_{#pi^{+}#pi^{-}} [GeV/c^2];m_{#pi^{+}#pi^{-}} [GeV/c^2];m_{#pi^{+}#pi^{-}} [GeV/c^2];m_{4#pi} [GeV/c^{2}]" , kTHnSparseF , {{100 , 0 , 2 }, {100 , 0 , 2 }, {100 , 0 , 2 }, {100 , 0 , 2 }, invMassAxis});
247248 histos4piKin.add (" zero-charge" , " ;pT [GeV/c]; #eta; #varphi [rad];y; m_{4#pi} [GeV/c^{2}]; Collin-Soper cos(#theta); Collin-Soper #varphi [rad];Run Number" , kTHnSparseF , {pTAxis, etaAxis, phiAxis, rapidityAxis, invMassAxis, cosThetaAxis, phiAxis, {113 , 0 , 113 }});
@@ -251,7 +252,7 @@ struct ExclusiveRhoTo4Pi {
251252 histos4piKin.add (" 4piPlus" , " ;pT [GeV/c]; #eta; #varphi [rad];y; m_{4#pi} [GeV/c^{2}]; Run Number" , kTHnSparseF , {pTAxis, etaAxis, phiAxis, rapidityAxis, invMassAxis, {113 , 0 , 113 }});
252253 histos4piKin.add (" 4piMinus" , " ;pT [GeV/c]; #eta; #varphi [rad];y; m_{4#pi} [GeV/c^{2}]; Run Number" , kTHnSparseF , {pTAxis, etaAxis, phiAxis, rapidityAxis, invMassAxis, {113 , 0 , 113 }});
253254 // MC truth
254- histosMCtruth.add (" pions-from-4pi " , " ;pT [GeV/c]; #eta;#varphi;y " , kTHnSparseF , {pTAxis, etaAxis, phiAxis, rapidityAxis, {113 , 0 , 113 }});
255+ histosMCtruth.add (" 4-pi-pions " , " ;pT [GeV/c]; #eta;#varphi;y " , kTHnSparseF , {pTAxis, etaAxis, phiAxis, rapidityAxis, {113 , 0 , 113 }});
255256 histosMCtruth.add (" Four-pion" , " ;pT [GeV/c]; #eta; #varphi [rad];y; m_{4#pi} [GeV/c^{2}];Run Number" , kTHnSparseF , {pTAxis, etaAxis, phiAxis, rapidityAxis, invMassAxis, {113 , 0 , 113 }});
256257 // _______________________________________________________________________________________________________________________________________________
257258 setHistBinLabels ();
@@ -466,20 +467,16 @@ struct ExclusiveRhoTo4Pi {
466467 PxPyPzMVector p4 (selectedPionMinusTracks[1 ].px (), selectedPionMinusTracks[1 ].py (), selectedPionMinusTracks[1 ].pz (), o2::constants::physics::MassPionCharged);
467468
468469 // Kinematics for pions from 4 pion events
469- histosKin.fill (HIST (" pions-from-4pi " ), p1.Pt (), p1.Eta (), p1.Phi (), p1.Rapidity ());
470- histosKin.fill (HIST (" pions-from-4pi " ), p2.Pt (), p2.Eta (), p2.Phi (), p2.Rapidity ());
471- histosKin.fill (HIST (" pions-from-4pi " ), p3.Pt (), p3.Eta (), p3.Phi (), p3.Rapidity ());
472- histosKin.fill (HIST (" pions-from-4pi " ), p4.Pt (), p4.Eta (), p4.Phi (), p4.Rapidity ());
470+ histosKin.fill (HIST (" pions-from-4pion " ), p1.Pt (), p1.Eta (), p1.Phi (), p1.Rapidity ());
471+ histosKin.fill (HIST (" pions-from-4pion " ), p2.Pt (), p2.Eta (), p2.Phi (), p2.Rapidity ());
472+ histosKin.fill (HIST (" pions-from-4pion " ), p3.Pt (), p3.Eta (), p3.Phi (), p3.Rapidity ());
473+ histosKin.fill (HIST (" pions-from-4pion " ), p4.Pt (), p4.Eta (), p4.Phi (), p4.Rapidity ());
473474
474475 PxPyPzMVector p1234 = p1 + p2 + p3 + p4;
475476 PxPyPzMVector p13 = p1 + p3;
476477 PxPyPzMVector p14 = p1 + p4;
477478 PxPyPzMVector p23 = p2 + p3;
478479 PxPyPzMVector p24 = p2 + p4;
479- PxPyPzMVector p123 = p1 + p2 + p3;
480- PxPyPzMVector p124 = p1 + p2 + p4;
481- PxPyPzMVector p134 = p1 + p3 + p4;
482- PxPyPzMVector p234 = p2 + p3 + p4;
483480
484481 // Two Pion Mass combinations
485482 histos4piKin.fill (HIST (" two-pion" ), p1234.Pt (), p13.M (), p14.M (), p23.M (), p24.M (), p1234.M ());
@@ -599,74 +596,121 @@ struct ExclusiveRhoTo4Pi {
599596 {
600597 int runIndex = getRunNumberIndex (collision.runNumber ());
601598 // Check if the Event is reconstructed in UPC mode
602- if (collision.flags () != ifUPC) {
599+ if (( collision.flags () != ifUPC) || (!sgSelector. isCBTHadronZdcOk (collision)) ) {
603600 return ;
604601 }
602+
603+ bool ifRejectedEvent = false ;
604+
605605 for (const auto & track : tracks) {
606+
607+ if (ifRejectedEvent) {
608+ break ;
609+ }
610+
606611 histosDataCounter.fill (HIST (" TracksCounts_vs_runNo" ), runIndex, 0 );
607612 PxPyPzMVector trackVector (track.px (), track.py (), track.pz (), o2::constants::physics::MassPionCharged);
608613 // is PV contributor
609614 if (track.isPVContributor () != useOnlyPVtracks) {
615+ histosDataCounter.fill (HIST (" LostInTrackCut_vs_runNo" ), runIndex, 1 );
616+ ifRejectedEvent = true ;
610617 continue ;
611618 }
612619 histosDataCounter.fill (HIST (" TracksCounts_vs_runNo" ), runIndex, 1 );
620+
613621 // pt cut
614622 if (trackVector.Pt () < pTcut) {
623+ histosDataCounter.fill (HIST (" LostInTrackCut_vs_runNo" ), runIndex, 2 );
624+ ifRejectedEvent = true ;
615625 continue ;
616626 }
617627 histosDataCounter.fill (HIST (" TracksCounts_vs_runNo" ), runIndex, 2 );
628+
618629 // eta cut
619630 if (std::abs (trackVector.Eta ()) > etaCut) {
631+ histosDataCounter.fill (HIST (" LostInTrackCut_vs_runNo" ), runIndex, 3 );
632+ ifRejectedEvent = true ;
620633 continue ;
621634 }
622635 histosDataCounter.fill (HIST (" TracksCounts_vs_runNo" ), runIndex, 3 );
636+
623637 // DCA Z cut
624638 if (std::abs (track.dcaZ ()) > dcaZcut) {
639+ histosDataCounter.fill (HIST (" LostInTrackCut_vs_runNo" ), runIndex, 4 );
640+ ifRejectedEvent = true ;
625641 continue ;
626642 }
627643 histosDataCounter.fill (HIST (" TracksCounts_vs_runNo" ), runIndex, 4 );
644+
628645 // DCA XY cut
629646 float maxDCAxy = 0.0105 + 0.035 / std::pow (trackVector.Pt (), 1.1 );
630647 if (dcaXYcut == 0 && (std::fabs (track.dcaXY ()) > maxDCAxy)) {
648+ histosDataCounter.fill (HIST (" LostInTrackCut_vs_runNo" ), runIndex, 5 );
649+ ifRejectedEvent = true ;
631650 continue ;
632651 } else if (dcaXYcut != 0 && (std::fabs (track.dcaXY ()) > dcaXYcut)) {
652+ histosDataCounter.fill (HIST (" LostInTrackCut_vs_runNo" ), runIndex, 5 );
653+ ifRejectedEvent = true ;
633654 continue ;
634655 }
635656 histosDataCounter.fill (HIST (" TracksCounts_vs_runNo" ), runIndex, 5 );
657+
636658 // ITS Track only
637659 if (useITStracksOnly && !track.hasITS ()) {
660+ histosDataCounter.fill (HIST (" LostInTrackCut_vs_runNo" ), runIndex, 6 );
661+ ifRejectedEvent = true ;
638662 continue ;
639663 }
640664 histosDataCounter.fill (HIST (" TracksCounts_vs_runNo" ), runIndex, 6 );
665+
641666 // TPC Track only
642667 if (useTPCtracksOnly && !track.hasTPC ()) {
668+ histosDataCounter.fill (HIST (" LostInTrackCut_vs_runNo" ), runIndex, 7 );
669+ ifRejectedEvent = true ;
643670 continue ;
644671 }
645672 histosDataCounter.fill (HIST (" TracksCounts_vs_runNo" ), runIndex, 7 );
673+
646674 // ITS Chi2 N Clusters cut
647675 if (track.hasITS () && track.itsChi2NCl () > itsChi2NClsCut) {
676+ histosDataCounter.fill (HIST (" LostInTrackCut_vs_runNo" ), runIndex, 8 );
677+ ifRejectedEvent = true ;
648678 continue ;
649679 }
650680 histosDataCounter.fill (HIST (" TracksCounts_vs_runNo" ), runIndex, 8 );
681+
651682 // TPC Chi2 N Clusters cut
652683 if (track.hasTPC () && track.tpcChi2NCl () > tpcChi2NClsCut) {
684+ histosDataCounter.fill (HIST (" LostInTrackCut_vs_runNo" ), runIndex, 9 );
685+ ifRejectedEvent = true ;
653686 continue ;
654687 }
655688 histosDataCounter.fill (HIST (" TracksCounts_vs_runNo" ), runIndex, 9 );
689+
656690 // TPC N Clusters Findable cut
657691 if (track.hasTPC () && track.tpcNClsFindable () < tpcNClsFindableCut) {
692+ histosDataCounter.fill (HIST (" LostInTrackCut_vs_runNo" ), runIndex, 10 );
693+ ifRejectedEvent = true ;
658694 continue ;
659695 }
660696 histosDataCounter.fill (HIST (" TracksCounts_vs_runNo" ), runIndex, 10 );
697+
661698 // Selection PID Pion
662699 if (ifPion (track, useTOF, nSigmaTPCcut, nSigmaTOFcut)) {
663700 histosDataCounter.fill (HIST (" TracksCounts_vs_runNo" ), runIndex, 11 );
664701 if (track.sign () == 1 ) {
665702 histosDataCounter.fill (HIST (" TracksCounts_vs_runNo" ), runIndex, 12 );
703+ } else {
704+ histosDataCounter.fill (HIST (" LostInTrackCut_vs_runNo" ), runIndex, 12 );
666705 }
667706 if (track.sign () == -1 ) {
668707 histosDataCounter.fill (HIST (" TracksCounts_vs_runNo" ), runIndex, 13 );
708+ } else {
709+ histosDataCounter.fill (HIST (" LostInTrackCut_vs_runNo" ), runIndex, 13 );
669710 }
711+ } else {
712+ histosDataCounter.fill (HIST (" LostInTrackCut_vs_runNo" ), runIndex, 11 );
713+ ifRejectedEvent = true ;
670714 } // End of Selection PID Pion
671715 } // End of loop over tracks
672716 } // End of processCounter function
@@ -869,10 +913,10 @@ struct ExclusiveRhoTo4Pi {
869913 PxPyPzMVector p4 (selectedPionMinusTracks[1 ].px (), selectedPionMinusTracks[1 ].py (), selectedPionMinusTracks[1 ].pz (), o2::constants::physics::MassPionCharged);
870914
871915 // Kinematics for pions from 4 pion events
872- histosKin.fill (HIST (" pions-from-4pi " ), p1.Pt (), p1.Eta (), p1.Phi (), p1.Rapidity ());
873- histosKin.fill (HIST (" pions-from-4pi " ), p2.Pt (), p2.Eta (), p2.Phi (), p2.Rapidity ());
874- histosKin.fill (HIST (" pions-from-4pi " ), p3.Pt (), p3.Eta (), p3.Phi (), p3.Rapidity ());
875- histosKin.fill (HIST (" pions-from-4pi " ), p4.Pt (), p4.Eta (), p4.Phi (), p4.Rapidity ());
916+ histosKin.fill (HIST (" pions-from-4pion " ), p1.Pt (), p1.Eta (), p1.Phi (), p1.Rapidity ());
917+ histosKin.fill (HIST (" pions-from-4pion " ), p2.Pt (), p2.Eta (), p2.Phi (), p2.Rapidity ());
918+ histosKin.fill (HIST (" pions-from-4pion " ), p3.Pt (), p3.Eta (), p3.Phi (), p3.Rapidity ());
919+ histosKin.fill (HIST (" pions-from-4pion " ), p4.Pt (), p4.Eta (), p4.Phi (), p4.Rapidity ());
876920
877921 PxPyPzMVector p1234 = p1 + p2 + p3 + p4;
878922 PxPyPzMVector p13 = p1 + p3;
@@ -881,7 +925,7 @@ struct ExclusiveRhoTo4Pi {
881925 PxPyPzMVector p24 = p2 + p4;
882926
883927 // Two Pion Mass combinations
884- histos4piKin.fill (HIST (" two-pion-mass " ), p13.M (), p14.M (), p23.M (), p24.M (), p1234.M ());
928+ histos4piKin.fill (HIST (" two-pion" ), p13.M (), p14.M (), p23.M (), p24.M (), p1234.M ());
885929
886930 double fourPiPhiPair1 = collinSoperPhi (p13, p1234);
887931 double fourPiPhiPair2 = collinSoperPhi (p14, p1234);
@@ -897,6 +941,7 @@ struct ExclusiveRhoTo4Pi {
897941 double mDiff14 = std::abs ((p14.M () - mRho0 ));
898942 double mDiff23 = std::abs ((p23.M () - mRho0 ));
899943 double mDiff24 = std::abs ((p24.M () - mRho0 ));
944+
900945 if ((mDiff13 < mDiff14 ) && (mDiff13 < mDiff23 ) && (mDiff13 < mDiff24 )) {
901946 histos4piKin.fill (HIST (" zero-charge" ), p1234.Pt (), p1234.Eta (), p1234.Phi (), p1234.Rapidity (), p1234.M (), fourPiCosThetaPair1, fourPiPhiPair1, runIndex);
902947 } else if ((mDiff14 < mDiff13 ) && (mDiff14 < mDiff23 ) && (mDiff14 < mDiff24 )) {
@@ -946,11 +991,11 @@ struct ExclusiveRhoTo4Pi {
946991 for (const auto & daughter : particle.daughters_as <aod::UDMcParticles>()) {
947992 PxPyPzMVector dVector (daughter.px (), daughter.py (), daughter.pz (), o2::constants::physics::MassPionCharged);
948993 if (daughter.pdgCode () == PDG_t::kPiPlus ) {
949- histosMCtruth.fill (HIST (" pions-from-4pi " ), dVector.Pt (), dVector.Eta (), dVector.Phi (), dVector.Rapidity (), runIndex);
994+ histosMCtruth.fill (HIST (" 4-pi-pions " ), dVector.Pt (), dVector.Eta (), dVector.Phi (), dVector.Rapidity (), runIndex);
950995 p1234 = p1234 + dVector;
951996 }
952997 if (daughter.pdgCode () == PDG_t::kPiMinus ) {
953- histosMCtruth.fill (HIST (" pions-from-4pi " ), dVector.Pt (), dVector.Eta (), dVector.Phi (), dVector.Rapidity (), runIndex);
998+ histosMCtruth.fill (HIST (" 4-pi-pions " ), dVector.Pt (), dVector.Eta (), dVector.Phi (), dVector.Rapidity (), runIndex);
954999 p1234 = p1234 + dVector;
9551000 }
9561001 } // End of loop over daughters
@@ -1127,6 +1172,7 @@ struct ExclusiveRhoTo4Pi {
11271172
11281173 auto h1 = histosDataCounter.get <TH2>(HIST (" EventsCounts_vs_runNo" ));
11291174 auto h2 = histosDataCounter.get <TH2>(HIST (" TracksCounts_vs_runNo" ));
1175+ auto h21 = histosDataCounter.get <TH2>(HIST (" LostInTrackCut_vs_runNo" ));
11301176
11311177 auto h3 = histos4piKin.get <THnSparse>(HIST (" zero-charge" ));
11321178 auto h4 = histos4piKin.get <THnSparse>(HIST (" non-zero-charge" ));
@@ -1137,11 +1183,13 @@ struct ExclusiveRhoTo4Pi {
11371183 }
11381184 for (int i = 0 ; i < numTrackCuts; ++i) {
11391185 h2->GetYaxis ()->SetBinLabel (i + 1 , trackLabels[i].c_str ());
1186+ h21->GetYaxis ()->SetBinLabel (i + 1 , trackLabels[i].c_str ());
11401187 }
11411188 for (int i = 0 ; i < numRunNums; ++i) {
11421189 std::string runLabel = std::to_string (runNos[i]);
11431190 h1->GetXaxis ()->SetBinLabel (i + 1 , runLabel.c_str ());
11441191 h2->GetXaxis ()->SetBinLabel (i + 1 , runLabel.c_str ());
1192+ h21->GetXaxis ()->SetBinLabel (i + 1 , runLabel.c_str ());
11451193 h3->GetAxis (7 )->SetBinLabel (i + 1 , runLabel.c_str ());
11461194 h4->GetAxis (5 )->SetBinLabel (i + 1 , runLabel.c_str ());
11471195 h5->GetAxis (5 )->SetBinLabel (i + 1 , runLabel.c_str ());
0 commit comments