@@ -254,6 +254,8 @@ struct Xi1530Analysisqa {
254254
255255 Configurable<bool > cUseFixedMassXi{" cUseFixedMassXi" , false , " Use fixed mass for Xi-" };
256256 Configurable<bool > cUseTruthRapidity{" cUseTruthRapidity" , false , " Use truth rapidity for Xi*" };
257+
258+ Configurable<bool > cConsiderPairOnly{" cConsiderPairOnly" , true , " Consider only existing particle pairs in the event" };
257259
258260 } additionalConfig;
259261
@@ -284,8 +286,6 @@ struct Xi1530Analysisqa {
284286 AxisSpec pidQAAxis = {65 , -6.5 , 6.5 };
285287 AxisSpec flagAxis = {9 , 0 , 9 , " Flags" };
286288
287-
288-
289289 if (histoConfig.multQA ) {
290290 // multiplicity histograms
291291 histos.add (" multQA/h2MultCent" , " Multiplicity vs Centrality" , HistType::kTH2F , {centAxis, histoConfig.multNTracksAxis });
@@ -294,11 +294,14 @@ struct Xi1530Analysisqa {
294294
295295 // event histograms
296296 if (histoConfig.eventQA ) {
297- histos.add (" TestME/hCollisionIndexSameE" , " coll index sameE" , HistType::kTH1F , {{500 , 0 .0f , 500 .0f }});
298- histos.add (" TestME/hCollisionIndexMixedE" , " coll index mixedE" , HistType::kTH1F , {{500 , 0 .0f , 500 .0f }});
297+ histos.add (" QAevent/hCollisionIndexSameE" , " coll index sameE" , HistType::kTH1F , {{500 , 0 .0f , 500 .0f }});
298+ histos.add (" QAevent/hCollisionIndexMixedE" , " coll index mixedE" , HistType::kTH1F , {{500 , 0 .0f , 500 .0f }});
299+
300+ histos.add (" QAevent/hnTrksSameE" , " n tracks per event SameE" , HistType::kTH1F , {{1000 , 0 .0f , 1000 .0f }});
301+ histos.add (" QAevent/hnTrksMixedE" , " n tracks per event MixedE" , HistType::kTH1F , {{1000 , 0 .0f , 1000 .0f }});
299302
300- histos.add (" TestME/hnTrksSameE " , " n tracks per event SameE" , HistType::kTH1F , {{1000 , 0 .0f , 1000 .0f }});
301- histos.add (" TestME/hnTrksMixedE " , " n tracks per event MixedE" , HistType::kTH1F , {{1000 , 0 .0f , 1000 .0f }});
303+ histos.add (" QAevent/hnCascsSameE " , " n cascs per event SameE" , HistType::kTH1F , {{1000 , 0 .0f , 1000 .0f }});
304+ histos.add (" QAevent/hnCascsMixedE " , " n cascs per event MixedE" , HistType::kTH1F , {{1000 , 0 .0f , 1000 .0f }});
302305
303306 histos.add (" QAevent/hVertexZSameE" , " Collision Vertex Z position" , HistType::kTH1F , {{100 , -15 ., 15 .}});
304307 histos.add (" QAevent/hMultiplicityPercentSameE" , " Multiplicity percentile of collision" , HistType::kTH1F , {centAxis});
@@ -316,10 +319,6 @@ struct Xi1530Analysisqa {
316319 histos.add (" Xi1530invmassLSAnti" , " Invariant mass of Anti-Xi(1530)0 like sign" , kTH1F , {invMassAxis});
317320 }
318321
319- if (doprocessMEMicro) {
320- histos.add (" Xi1530invmassME_DS" , " Invariant mass of Xi(1530)0 mixed event DS" , kTH1F , {invMassAxis});
321- histos.add (" Xi1530invmassME_DSAnti" , " Invariant mass of Xi(1530)0 mixed event DSAnti" , kTH1F , {invMassAxis});
322- }
323322
324323 if (histoConfig.additionalQAplots ) {
325324 // DCA QA to candidates for first pion and Xi-
@@ -385,18 +384,15 @@ struct Xi1530Analysisqa {
385384
386385 histos.add (" h3Xi1530invmassLS" , " Invariant mass of Xi(1530)0 same sign" , kTHnSparseF , {centAxis, ptAxis, invMassAxis, flagAxis});
387386
388- histos.add (" h3Xi1530invmassME" , " Invariant mass of Xi(1530)0 mixed event" , kTHnSparseF , {centAxis, ptAxis, invMassAxis, flagAxis});
389-
390387
391- histos.add (" h3Xi1530invmassDSAnti" , " Invariant mass of Anti-Xi(1530)0 differnt sign" , kTHnSparseF , {centAxis, ptAxis, invMassAxis, flagAxis});
392- histos.add (" h3XiinvmassDSAnti" , " Invariant mass of Anti-Xi- differnt sign" , kTHnSparseF , {centAxis, ptAxis, invMassAxisCasc, flagAxis});
388+ histos.add (" h3Xi1530invmassDSAnti" , " Invariant mass of Anti-Xi(1530)0 differnt sign" , kTHnSparseF , {centAxis, ptAxis, invMassAxis, flagAxis});
389+ histos.add (" h3XiinvmassDSAnti" , " Invariant mass of Anti-Xi- differnt sign" , kTHnSparseF , {centAxis, ptAxis, invMassAxisCasc, flagAxis});
393390
394- histos.add (" h3Xi1530invmassLSAnti" , " Invariant mass of Anti-Xi(1530)0 same sign" , kTHnSparseF , {centAxis, ptAxis, invMassAxis, flagAxis});
395-
391+ histos.add (" h3Xi1530invmassLSAnti" , " Invariant mass of Anti-Xi(1530)0 same sign" , kTHnSparseF , {centAxis, ptAxis, invMassAxis, flagAxis});
392+
396393
397- if (doprocessMEMicro) {
394+ if (doprocessMEDF || doprocessMEMicro) {
398395 histos.add (" h3Xi1530invmassME_DS" , " Invariant mass of Xi(1530)0 mixed event DS" , kTHnSparseF , {centAxis, ptAxis, invMassAxis, flagAxis});
399-
400396 histos.add (" h3Xi1530invmassME_DSAnti" , " Invariant mass of Xi(1530)0 mixed event DSAnti" , kTHnSparseF , {centAxis, ptAxis, invMassAxis, flagAxis});
401397 }
402398
@@ -485,10 +481,10 @@ struct Xi1530Analysisqa {
485481 return false ;
486482 }
487483 } else {
488- if (std::abs (track.dcaXY ()) > (primarytrackConfig.cDCAxytoPVByPtPiFirstP0 + primarytrackConfig.cDCAxyToPVByPtPiFirstExp * std::pow (track.pt (), -1.1 )))
484+ if (std::abs (track.dcaXY ()) > (primarytrackConfig.cDCAxytoPVByPtPiFirstP0 + primarytrackConfig.cDCAxyToPVByPtPiFirstExp * std::pow (track.pt (), -1 .)))
489485 return false ;
490486 if (primarytrackConfig.cDCAzToPVAsPt ) {
491- if (std::abs (track.dcaZ ()) > (primarytrackConfig.cDCAxytoPVByPtPiFirstP0 + primarytrackConfig.cDCAxyToPVByPtPiFirstExp * std::pow (track.pt (), -1.1 )))
487+ if (std::abs (track.dcaZ ()) > (primarytrackConfig.cDCAxytoPVByPtPiFirstP0 + primarytrackConfig.cDCAxyToPVByPtPiFirstExp * std::pow (track.pt (), -1 .)))
492488 return false ;
493489 } else {
494490 if (std::abs (track.dcaZ ()) > primarytrackConfig.cMaxDCAzToPVCut )
@@ -526,7 +522,7 @@ struct Xi1530Analysisqa {
526522 return false ;
527523 }
528524 if (primarytrackConfig.cDCAzToPVAsPtForCasc ) {
529- if (std::abs (track.dcaZCascToPV ()) > (primarytrackConfig.cDCAxyToPVByPtCascP0 + primarytrackConfig.cDCAxyToPVByPtCascExp * std::pow (track.pt (), -1.1 )))
525+ if (std::abs (track.dcaZCascToPV ()) > (primarytrackConfig.cDCAxyToPVByPtCascP0 + primarytrackConfig.cDCAxyToPVByPtCascExp * std::pow (track.pt (), -1 .)))
530526 return false ;
531527 }
532528
@@ -713,16 +709,21 @@ struct Xi1530Analysisqa {
713709 if constexpr (!IsMix) {
714710 histos.fill (HIST (" QAevent/hVertexZSameE" ), collision.posZ ());
715711 histos.fill (HIST (" QAevent/hMultiplicityPercentSameE" ), Cent);
716- histos.fill (HIST (" TestME/hCollisionIndexSameE" ), collision.globalIndex ());
717- histos.fill (HIST (" TestME/hnTrksSameE" ), dTracks1.size ());
712+ histos.fill (HIST (" QAevent/hCollisionIndexSameE" ), collision.globalIndex ());
713+ histos.fill (HIST (" QAevent/hnTrksSameE" ), dTracks1.size ());
714+ histos.fill (HIST (" QAevent/hnCascsSameE" ), dTracks2.size ());
718715 } else {
719716 histos.fill (HIST (" QAevent/hVertexZMixedE" ), collision.posZ ());
720- histos.fill (HIST (" QAevent/hMultiplicityPercentMixedE" ), Cent);
721- histos.fill (HIST (" TestME/hCollisionIndexMixedE" ), collision.globalIndex ());
722- histos.fill (HIST (" TestME/hnTrksMixedE" ), dTracks1.size ());
717+ histos.fill (HIST (" QAevent/hMultiplicityPercentMixedE" ), Cent);
718+ histos.fill (HIST (" QAevent/hCollisionIndexMixedE" ), collision.globalIndex ());
719+ histos.fill (HIST (" QAevent/hnTrksMixedE" ), dTracks1.size ());
720+ histos.fill (HIST (" QAevent/hnCascsMixedE" ), dTracks2.size ());
723721 }
724722 }
725723
724+ if (additionalConfig.cConsiderPairOnly && (dTracks2.size () < 1 || dTracks1.size () < 1 ))
725+ return ;
726+
726727 LorentzVectorPtEtaPhiMass lDecayDaughter1, lDecayDaughter2, lResonance;
727728 std::vector<int64_t > pionCandateIndicies = {};
728729 std::vector<int64_t > xiCandateIndicies = {};
@@ -764,11 +765,10 @@ struct Xi1530Analysisqa {
764765 if (pidConfig.cUseOnlyTOFTrackPionBachelor && hasSubsystemInfo (trk1NSigmaPiTOF))
765766 continue ;
766767 if (!selectionPIDPionFirst<IsResoMicrotrack>(trk1)) // PID selection for the first pion
767- continue ;
768+ continue ;
768769 if (!primaryTrackCut<IsResoMicrotrack>(trk1)) // Primary track selections
769770 continue ;
770771
771-
772772 if constexpr (!IsMix) {
773773 if (histoConfig.pidPlots ) {
774774 histos.fill (HIST (" QAafter/TPC_Nsigma_pi_first_all" ), Cent, trk1ptPi, trk1NSigmaPiTPC);
@@ -873,7 +873,6 @@ struct Xi1530Analysisqa {
873873 if (!cascprimaryTrackCut (trk2) || !casctopCut (trk2)) // Primary track selections
874874 continue ;
875875
876-
877876 // QA after selections
878877 if constexpr (!IsMix) {
879878 // // QA plots after the selection
@@ -941,25 +940,14 @@ struct Xi1530Analysisqa {
941940 }
942941 }
943942
944-
945943 xiCandateIndicies.push_back (trk2.index ());
946944
947945 }
948946
949947 for (const auto & trk1cand : pionCandateIndicies) {
950-
951- auto pionCand = dTracks1.rawIteratorAt (trk1cand);
952- auto pionCandIndex = pionCand.index ();
953- if (pionCandIndex != trk1cand){
954- LOG (info) << " pion candidate index retrieval: expected " << trk1cand << " , got " << pionCandIndex;
955- }
948+ auto pionCand = dTracks1.iteratorAt (trk1cand);
956949 for (const auto & trk2cand : xiCandateIndicies) {
957- auto xiCand = dTracks2.rawIteratorAt (trk2cand);
958- auto xiCandIndex = xiCand.index ();
959- if (xiCandIndex != trk2cand){
960- LOG (info) << " xi candidate index retrieval: expected " << trk2cand << " , got " << xiCandIndex;
961- }
962-
950+ auto xiCand = dTracks2.iteratorAt (trk2cand);
963951 auto pionCandPt = pionCand.pt ();
964952 auto xiCandPt = xiCand.pt ();
965953 float massXiCand = xiCand.mXi ();
@@ -997,17 +985,9 @@ struct Xi1530Analysisqa {
997985 histos.fill (HIST (" h3Xi1530invmassDSAnti" ), Cent, lResonancePt, lResonanceMass, kData );
998986 }
999987 } else {
1000- if (histoConfig.invMass1D )
1001- histos.fill (HIST (" Xi1530invmassME" ), lResonanceMass);
1002988 if (pionCand.sign () > 0 ) {
1003- if (histoConfig.invMass1D )
1004- histos.fill (HIST (" Xi1530invmassME_DS" ), lResonanceMass);
1005-
1006989 histos.fill (HIST (" h3Xi1530invmassME_DS" ), Cent, lResonancePt, lResonanceMass, kData );
1007990 } else if (pionCand.sign () < 0 ) {
1008- if (histoConfig.invMass1D )
1009- histos.fill (HIST (" Xi1530invmassME_DSAnti" ), lResonanceMass);
1010-
1011991 histos.fill (HIST (" h3Xi1530invmassME_DSAnti" ), Cent, lResonancePt, lResonanceMass, kData );
1012992 }
1013993 }
@@ -1135,14 +1115,7 @@ struct Xi1530Analysisqa {
11351115 histos.fill (HIST (" h3Xi1530invmassLSAnti" ), Cent, lResonancePt, lResonanceMass, kLS );
11361116 }
11371117 }
1138- else if constexpr (IsMix) {
1139- if (pionCand.sign () < 0 ) {
1140- histos.fill (HIST (" Xi1530invmassME_DS" ), Cent, lResonancePt, lResonanceMass, kMixing );
1141- } else if (pionCand.sign () > 0 ) {
1142- histos.fill (HIST (" Xi1530invmassME_DSAnti" ), Cent, lResonancePt, lResonanceMass, kMixing );
1143- }
1144- }
1145- }
1118+ } // -> End if signal or bkg
11461119 } // -> End loop over xi candidates
11471120 } // -> End loop over pion and xi candidates
11481121 } // -> End fillHistograms
@@ -1265,7 +1238,7 @@ struct Xi1530Analysisqa {
12651238 float multiplicity = 0 .f ;
12661239 auto inCent = collision1.cent ();
12671240 if (additionalConfig.cRecoINELgt0 && !collision1.isRecINELgt0 ()) // Check reco INELgt0 (at least one PV track in |eta| < 1) about the collision
1268- return ;
1241+ continue ;
12691242 if (additionalConfig.cMultNTracksPVFull )
12701243 multiplicity = collision1.multNTracksPV ();
12711244 else if (additionalConfig.cMultNTracksPVeta1 )
0 commit comments