2626#include " Common/Core/ZorroSummary.h"
2727#include " Common/Core/trackUtilities.h"
2828#include " Common/DataModel/CollisionAssociationTables.h"
29+ #include " Common/DataModel/Centrality.h"
2930#include " Common/DataModel/EventSelection.h"
3031#include " Common/DataModel/PIDResponseTOF.h"
3132#include " Common/DataModel/PIDResponseTPC.h"
@@ -273,34 +274,34 @@ struct HfTreeCreatorOmegacSt {
273274 Configurable<bool > bzOnly{" bzOnly" , true , " Use B_z instead of full field map" };
274275 Configurable<std::string> cfgTriggersOfInterest{" cfgTriggersOfInterest" , " fTrackedOmega,fHfCharmBarToXiBach" , " Triggers of interest, comma separated for Zorro" };
275276
276- // TOF & TPC nsigma configurable cuts (defaults: very loose = 9999)
277+ // TOF nsigma configurable cuts (defaults: very loose = 9999)
277278 Configurable<float > maxAbsTofNsigmaTrackPi{" maxAbsTofNsigmaTrackPi" , 9999 .f , " Max abs TOF nsigma for charm bachelor track as pion" };
278279 Configurable<float > maxAbsTofNsigmaTrackKa{" maxAbsTofNsigmaTrackKa" , 9999 .f , " Max abs TOF nsigma for charm bachelor track as kaon" };
279280 Configurable<float > maxAbsTofNsigmaV0Pr{" maxAbsTofNsigmaV0Pr" , 9999 .f , " Max abs TOF nsigma for V0 proton" };
280281 Configurable<float > maxAbsTofNsigmaV0Pi{" maxAbsTofNsigmaV0Pi" , 9999 .f , " Max abs TOF nsigma for V0 pion" };
281- Configurable<float > maxAbsTofNsigmaBachelorPi{" maxAbsTofNsigmaBachelorPi" , 9999 .f , " Max abs TOF nsigma for bachelor as pion" };
282- Configurable<float > maxAbsTofNsigmaBachelorKa{" maxAbsTofNsigmaBachelorKa" , 9999 .f , " Max abs TOF nsigma for bachelor as kaon" };
282+ Configurable<float > maxAbsTofNsigmaBachelorPi{" maxAbsTofNsigmaBachelorPi" , 9999 .f , " Max abs TOF nsigma for cascade bachelor as pion" };
283+ Configurable<float > maxAbsTofNsigmaBachelorKa{" maxAbsTofNsigmaBachelorKa" , 9999 .f , " Max abs TOF nsigma for cascade bachelor as kaon" };
283284 // whether to require TOF in addition to TPC
284285 Configurable<bool > useTofPid{" useTofPid" , false , " Require TOF PID together with TPC PID when true; otherwise use TPC only" };
285286
286287
287- // CPA cuts (defaults: require good alignment > 0.9)
288- Configurable<float > minCpaCharmedBaryon{" minCpaCharmedBaryon" , 0 .9f , " Minimum CPA for charmed baryon (parent) " };
289- Configurable<float > minCpaXYCharmedBaryon{" minCpaXYCharmedBaryon" , 0 .9f , " Minimum CPA XY for charmed baryon (parent) " };
288+ // CPA cuts (defaults: >= 0.9)
289+ Configurable<float > minCpaCharmedBaryon{" minCpaCharmedBaryon" , 0 .9f , " Minimum CPA for charmed baryon" };
290+ Configurable<float > minCpaXYCharmedBaryon{" minCpaXYCharmedBaryon" , 0 .9f , " Minimum CPA XY for charmed baryon" };
290291 Configurable<float > minCpaCasc{" minCpaCasc" , 0 .9f , " Minimum CPA for cascade" };
291292 Configurable<float > minCpaXYCasc{" minCpaXYCasc" , 0 .9f , " Minimum CPA XY for cascade" };
292293
293294 // Chi2 cuts (defaults: <= 10)
294295 Configurable<float > maxChi2TopCharmedBaryon{" maxChi2TopCharmedBaryon" , 10 .f , " Maximum chi2 for top charmed baryon fit" };
295- Configurable<float > maxTopologyChi2{ " maxTopologyChi2 " , 10 .f , " Maximum topologyChi2 of the tracked cascade" };
296+ Configurable<float > maxChi2TopCasc{ " maxChi2TopCasc " , 10 .f , " Maximum topologyChi2 of the tracked cascade" };
296297
297298 // Impact parameter cuts (defaults: absolute value < 10)
298- Configurable<float > maxImpactCascY{" maxImpactCascY" , 10 .f , " Max abs impactParameterCasc.getY( )" };
299- Configurable<float > maxImpactCascZ{" maxImpactCascZ" , 10 .f , " Max abs impactParameterCasc.getZ() " };
300- Configurable<float > maxImpactPionY{ " maxImpactPionY " , 10 .f , " Max abs impactParameterPion.getY( )" };
301- Configurable<float > maxImpactPionZ{ " maxImpactPionZ " , 10 .f , " Max abs impactParameterPion.getZ() " };
299+ Configurable<float > maxImpactCascY{" maxImpactCascY" , 10 .f , " Max abs Max abs impactParameter of cascade(Y )" };
300+ Configurable<float > maxImpactCascZ{" maxImpactCascZ" , 10 .f , " Max abs DCA Z of cascade " };
301+ Configurable<float > maxImpactCharmBachelorY{ " maxImpactCharmBachelorY " , 10 .f , " Max abs impactParameter of charm bachelor(Y )" };
302+ Configurable<float > maxImpactCharmBachelorZ{ " maxImpactCharmBachelorZ " , 10 .f , " Max abs DCA Z of charm bachelor " };
302303 Configurable<float > minPtCascade{" minPtCascade" , 0 .f , " Minimum pT requirement for the cascade track" };
303- Configurable<float > minPtPionOrKaon{" minPtPionOrKaon" , 0 .f , " Minimum pT requirement for the associated pion/kaon track" };
304+ Configurable<float > minPtPionOrKaon{" minPtPionOrKaon" , 0 .f , " Minimum pT requirement for the charm baryon daughter pion/kaon track" };
304305 Configurable<float > minImpProduct{" minImpProduct" , -1 .e9f , " Lower bound for DCA impact product" };
305306 Configurable<float > maxImpProduct{" maxImpProduct" , 0 .f , " Upper bound for DCA impact product" };
306307
@@ -318,7 +319,7 @@ struct HfTreeCreatorOmegacSt {
318319 int runNumber{0 };
319320 std::map<int , int > mapMcPartToGenTable;
320321
321- using Collisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels>>;
322+ using Collisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs, aod::CentFT0Ms >>;
322323 using TracksExt = soa::Join<aod::TracksIU, aod::TracksCovIU, aod::TracksExtra, aod::TracksDCA, aod::pidTPCPi, aod::pidTPCKa, aod::pidTPCPr, aod::pidTOFPi, aod::pidTOFKa, aod::pidTOFPr>;
323324 using TracksExtMc = soa::Join<TracksExt, aod::McTrackLabels>;
324325
@@ -388,7 +389,7 @@ struct HfTreeCreatorOmegacSt {
388389 setLabelHistoCands (hCandidatesCascPiOrK);
389390
390391 // init HF event selection helper (centrality, event cuts, monitoring)
391- hfEvSel.init (registry);
392+ hfEvSel.init (registry, zorroSummary );
392393 }
393394
394395 // processMC: loop over MC objects
@@ -489,14 +490,15 @@ struct HfTreeCreatorOmegacSt {
489490 std::optional<std::reference_wrapper<aod::McParticles const >> mcParticles = std::nullopt )
490491 {
491492 const auto matCorr = static_cast <o2::base::Propagator::MatCorrType>(materialCorrectionType.value );
492-
493493 for (const auto & collision : collisions) {
494494 // Event selection & centrality using HF helper
495495 float centrality{-1 .f };
496496 const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask <true , CentEstimator, aod::BCsWithTimestamps>(collision, centrality, ccdb, registry);
497497 if (rejectionMask != 0 ) {
498498 continue ; // reject collisions failing HF event selection
499499 }
500+ // record event-level monitoring (centrality, vertex, etc.)
501+ hfEvSel.fillHistograms (collision, rejectionMask, centrality);
500502 const auto bc = collision.bc_as <aod::BCsWithTimestamps>();
501503 if (runNumber != bc.runNumber ()) {
502504 if (skimmedProcessing) {
@@ -508,7 +510,6 @@ struct HfTreeCreatorOmegacSt {
508510 }
509511 runNumber = bc.runNumber ();
510512 auto timestamp = bc.timestamp ();
511-
512513 if (auto * grpo = ccdb->getForTimeStamp <o2::parameters::GRPObject>(grpPath, timestamp)) {
513514 o2::base::Propagator::initFieldFromGRP (grpo);
514515 bz = grpo->getNominalL3Field ();
@@ -537,7 +538,6 @@ struct HfTreeCreatorOmegacSt {
537538 const auto collId = collision.globalIndex ();
538539 auto groupedTrackIds = trackIndices.sliceBy (trackIndicesPerCollision, collId);
539540 auto groupedTrackedCascades = trackedCascades.sliceBy (assignedTrackedCascadesPerCollision, collId);
540-
541541 o2::dataformats::DCA impactParameterCasc;
542542 for (const auto & trackedCascade : groupedTrackedCascades) {
543543 const auto trackCasc = trackedCascade.track_as <TracksType>();
@@ -555,7 +555,6 @@ struct HfTreeCreatorOmegacSt {
555555 } else {
556556 o2::base::Propagator::Instance ()->propagateToDCABxByBz (primaryVertex, trackParCovCasc, 2 .f , matCorr, &impactParameterCasc);
557557 }
558-
559558 const auto & casc = trackedCascade.cascade ();
560559 const auto & bachelor = casc.bachelor_as <TracksType>();
561560 const auto & v0 = casc.v0 ();
@@ -568,7 +567,6 @@ struct HfTreeCreatorOmegacSt {
568567 bachelor.tpcNClsFindable () < minNoClsTrackedCascade) {
569568 continue ;
570569 }
571-
572570 const auto & v0TrackPr = trackCasc.sign () < 0 ? v0TrackPos : v0TrackNeg;
573571 const auto & v0TrackPi = trackCasc.sign () < 0 ? v0TrackNeg : v0TrackPos;
574572
@@ -678,7 +676,6 @@ struct HfTreeCreatorOmegacSt {
678676 o2::base::Propagator::Instance ()->propagateToDCABxByBz (primaryVertex, trackParCovKa, 2 .f , matCorr, &impactParameterKa);
679677 o2::base::Propagator::Instance ()->propagateToDCABxByBz (primaryVertex, trackParCovPi, 2 .f , matCorr, &impactParameterPi);
680678 }
681-
682679 for (const auto & trackId : groupedTrackIds) {
683680 const auto track = trackId.template track_as <TracksType>();
684681 if (track.globalIndex () == v0TrackPr.globalIndex () ||
@@ -725,7 +722,6 @@ struct HfTreeCreatorOmegacSt {
725722 o2::base::Propagator::Instance ()->propagateToDCABxByBz (primaryVertex, trackParCovPionOrKaon, 2 .f , matCorr, &impactParameterPion);
726723 }
727724 const float impactProduct = impactParameterCasc.getY () * impactParameterPion.getY ();
728-
729725 hCandidatesCascPiOrK->Fill (SVFitting::BeforeFit);
730726 try {
731727 auto decayLengthUntracked = -1 .;
@@ -744,7 +740,6 @@ struct HfTreeCreatorOmegacSt {
744740 df2.createParentTrackParCov ().getPxPyPzGlo (pCharmedBaryon);
745741 const auto cpaCharmedBaryon = RecoDecay::cpa (primaryVertexPos, df2.getPCACandidate (), pCharmedBaryon);
746742 const auto cpaXYCharmedBaryon = RecoDecay::cpaXY (primaryVertexPos, df2.getPCACandidate (), pCharmedBaryon);
747-
748743 df2.getTrackParamAtPCA (0 ).getPxPyPzGlo (momenta[0 ]);
749744 df2.getTrackParamAtPCA (1 ).getPxPyPzGlo (momenta[1 ]);
750745 const auto ptCascade = std::hypot (momenta[0 ][0 ], momenta[0 ][1 ]);
@@ -791,7 +786,6 @@ struct HfTreeCreatorOmegacSt {
791786 if (!passSelectedChannel) {
792787 continue ;
793788 }
794-
795789 // --- do the MC Rec match
796790 if (mcParticles) {
797791 auto arrayDaughters = std::array{
@@ -846,7 +840,6 @@ struct HfTreeCreatorOmegacSt {
846840 origin = RecoDecay::getCharmHadronOrigin (mcParticles->get (), particle, false , &idxBhadMothers);
847841 }
848842 }
849-
850843 // apply configurable quality cuts (CPA, chi2, impact parameters)
851844 if (cpaCharmedBaryon < minCpaCharmedBaryon)
852845 continue ;
@@ -858,11 +851,11 @@ struct HfTreeCreatorOmegacSt {
858851 continue ;
859852 if (chi2TopCharmedBaryon > maxChi2TopCharmedBaryon)
860853 continue ;
861- if (trackedCascade.topologyChi2 () > maxTopologyChi2 )
854+ if (trackedCascade.topologyChi2 () > maxChi2TopCasc )
862855 continue ;
863856 if (std::abs (impactParameterCasc.getY ()) > maxImpactCascY || std::abs (impactParameterCasc.getZ ()) > maxImpactCascZ)
864857 continue ;
865- if (std::abs (impactParameterPion.getY ()) > maxImpactPionY || std::abs (impactParameterPion.getZ ()) > maxImpactPionZ )
858+ if (std::abs (impactParameterPion.getY ()) > maxImpactCharmBachelorY || std::abs (impactParameterPion.getZ ()) > maxImpactCharmBachelorZ )
866859 continue ;
867860 if (ptCascade < minPtCascade)
868861 continue ;
@@ -872,6 +865,7 @@ struct HfTreeCreatorOmegacSt {
872865 continue ;
873866 registry.fill (HIST (" hDecayLength" ), decayLength * 1e4 );
874867 registry.fill (HIST (" hDecayLengthScaled" ), decayLength * o2::constants::physics::MassOmegaC0 / RecoDecay::p (momenta[0 ], momenta[1 ]) * 1e4 );
868+ std::cout << " jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj" << std::endl;
875869 outputTable (massOmega,
876870 massXi,
877871 massV0,
@@ -938,6 +932,9 @@ struct HfTreeCreatorOmegacSt {
938932 hCandidatesCascPiOrK->Fill (SVFitting::Fail);
939933 continue ;
940934 }
935+
936+ std::cout << " kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk" << std::endl;
937+
941938 hCandidatesCascPiOrK->Fill (SVFitting::FitOk);
942939 }
943940 }
@@ -949,42 +946,42 @@ struct HfTreeCreatorOmegacSt {
949946
950947 // No centrality selection
951948 void processDataNocent (Collisions const & collisions,
952- soa::SmallGroups<aod::AssignedTrackedCascades> const & trackedCascades,
953- aod::TrackAssoc const & trackIndices,
954- aod::Cascades const & cascades ,
955- aod::V0s const & v0s ,
956- TracksExt const & tracks ,
957- aod::BCsWithTimestamps const & bcs )
949+ soa::SmallGroups<aod::AssignedTrackedCascades> const & trackedCascades,
950+ aod::TrackAssoc const & trackIndices,
951+ aod::Cascades const &,
952+ aod::V0s const &,
953+ TracksExt const &,
954+ aod::BCsWithTimestamps const &)
958955 {
959956 fillTable<CentralityEstimator::None, TracksExt>(collisions, trackedCascades, trackIndices);
960957 }
961958 PROCESS_SWITCH (HfTreeCreatorOmegacSt, processDataNocent, " Process data (No centrality)" , true );
962959
963960 // FT0C centrality selection
964961 void processDataFT0C (Collisions const & collisions,
965- soa::SmallGroups<aod::AssignedTrackedCascades> const & trackedCascades,
966- aod::TrackAssoc const & trackIndices,
967- aod::Cascades const & cascades ,
968- aod::V0s const & v0s ,
969- TracksExt const & tracks ,
970- aod::BCsWithTimestamps const & bcs )
962+ soa::SmallGroups<aod::AssignedTrackedCascades> const & trackedCascades,
963+ aod::TrackAssoc const & trackIndices,
964+ aod::Cascades const &,
965+ aod::V0s const &,
966+ TracksExt const &,
967+ aod::BCsWithTimestamps const &)
971968 {
972969 fillTable<CentralityEstimator::FT0C, TracksExt>(collisions, trackedCascades, trackIndices);
973970 }
974- PROCESS_SWITCH (HfTreeCreatorOmegacSt, processDataFT0C, " Process data (FT0C centrality)" , true );
971+ PROCESS_SWITCH (HfTreeCreatorOmegacSt, processDataFT0C, " Process data (FT0C centrality)" , false );
975972
976973 // FT0M centrality selection
977974 void processDataFT0M (Collisions const & collisions,
978- soa::SmallGroups<aod::AssignedTrackedCascades> const & trackedCascades,
979- aod::TrackAssoc const & trackIndices,
980- aod::Cascades const & cascades ,
981- aod::V0s const & v0s ,
982- TracksExt const & tracks ,
983- aod::BCsWithTimestamps const & bcs )
975+ soa::SmallGroups<aod::AssignedTrackedCascades> const & trackedCascades,
976+ aod::TrackAssoc const & trackIndices,
977+ aod::Cascades const &,
978+ aod::V0s const &,
979+ TracksExt const &,
980+ aod::BCsWithTimestamps const &)
984981 {
985982 fillTable<CentralityEstimator::FT0M, TracksExt>(collisions, trackedCascades, trackIndices);
986983 }
987- PROCESS_SWITCH (HfTreeCreatorOmegacSt, processDataFT0M, " Process data (FT0M centrality)" , true );
984+ PROCESS_SWITCH (HfTreeCreatorOmegacSt, processDataFT0M, " Process data (FT0M centrality)" , false );
988985
989986
990987 // MC reco: No centrality selection
@@ -1000,7 +997,7 @@ struct HfTreeCreatorOmegacSt {
1000997 {
1001998 fillTable<CentralityEstimator::None, TracksExtMc>(collisions, trackedCascades, trackIndices, mcParticles);
1002999 }
1003- PROCESS_SWITCH (HfTreeCreatorOmegacSt, processMcRecNocent, " Process MC reco (No centrality)" , true );
1000+ PROCESS_SWITCH (HfTreeCreatorOmegacSt, processMcRecNocent, " Process MC reco (No centrality)" , false );
10041001
10051002 // MC reco: FT0C centrality selection
10061003 void processMcRecFT0C (Collisions const & collisions,
@@ -1015,7 +1012,7 @@ struct HfTreeCreatorOmegacSt {
10151012 {
10161013 fillTable<CentralityEstimator::FT0C, TracksExtMc>(collisions, trackedCascades, trackIndices, mcParticles);
10171014 }
1018- PROCESS_SWITCH (HfTreeCreatorOmegacSt, processMcRecFT0C, " Process MC reco (FT0C centrality)" , true );
1015+ PROCESS_SWITCH (HfTreeCreatorOmegacSt, processMcRecFT0C, " Process MC reco (FT0C centrality)" , false );
10191016
10201017 // MC reco: FT0M centrality selection
10211018 void processMcRecFT0M (Collisions const & collisions,
@@ -1030,7 +1027,7 @@ struct HfTreeCreatorOmegacSt {
10301027 {
10311028 fillTable<CentralityEstimator::FT0M, TracksExtMc>(collisions, trackedCascades, trackIndices, mcParticles);
10321029 }
1033- PROCESS_SWITCH (HfTreeCreatorOmegacSt, processMcRecFT0M, " Process MC reco (FT0M centrality)" , true );
1030+ PROCESS_SWITCH (HfTreeCreatorOmegacSt, processMcRecFT0M, " Process MC reco (FT0M centrality)" , false );
10341031
10351032 void processMcGen (aod::Collision const & collision,
10361033 aod::McCollisions const &,
0 commit comments