@@ -203,6 +203,9 @@ struct HfCandidateCreatorSigmac0plusplus {
203203 // / keep only the candidates flagged as possible Λc+ (and charge conj.) decaying into a charged pion, kaon and proton
204204 // / if not selected, skip it and go to the next one
205205 if (!(candLc.hfflag () & BIT (aod::hf_cand_3prong::DecayType::LcToPKPi))) {
206+
207+ // LOG(info) << ">>> hfflag() non va bene, com'è possibile?!";
208+
206209 continue ;
207210 }
208211 // / keep only the candidates Λc+ (and charge conj.) within the desired rapidity
@@ -338,6 +341,14 @@ struct HfCandidateCreatorSigmac0plusplus {
338341 if constexpr (WithTimeAssoc) {
339342 // / need to group candidates manually
340343 auto candidatesThisColl = candidates.sliceBy (hf3ProngPerCollision, thisCollId);
344+ // LOG(info) << " --> thisCollId (soft pi): " << thisCollId;
345+ for (auto & candLc : candidatesThisColl){
346+ auto collIdLc = candLc.collisionId ();
347+ // LOG(info) << " ==> candLc.collisionId(): " << collIdLc;
348+ if (collIdLc != thisCollId) {
349+ LOG (fatal) << " !!! candLc.collisionId() is different fromthisCollId !!! " << collIdLc << " vs. " << thisCollId;
350+ }
351+ }
341352 makeSoftPiLcPair (softPiDca, trackSoftPi, candidatesThisColl, tracks);
342353 } else {
343354 // / tracks and candidates already grouped by collision at the level of process function
@@ -370,6 +381,7 @@ struct HfCandidateCreatorSigmac0plusplus {
370381 for (const auto & trackId : trackIdsThisCollision) {
371382 // / slice soft pion tracks associated to the current collision
372383 auto trackSoftPi = trackId.track_as <aod::TracksWDcaExtra>();
384+ // LOG(info) << "**** trackId.collisionId(): " << trackId.collisionId();
373385
374386 // / create SigmaC candidate with the current soft pion and Lc candidates
375387 createSigmaC<true >(collision, trackSoftPi, tracks, candidates, bcWithTimeStamps);
@@ -410,7 +422,9 @@ struct HfCandidateCreatorSigmac0plusplus {
410422// / Extends the base table with expression columns.
411423
412424struct HfCandidateSigmac0plusplusMc {
413- Spawns<aod::HfCandScExt> candidatesSigmac;
425+ // Spawns<aod::HfCandScExt> candidatesSigmac;
426+ Spawns<aod::HfCandScExt> candidatesSigmacSpawned;
427+
414428 Produces<aod::HfCandScMcRec> rowMCMatchScRec;
415429 Produces<aod::HfCandScMcGen> rowMCMatchScGen;
416430
@@ -469,16 +483,17 @@ struct HfCandidateSigmac0plusplusMc {
469483 // / @param candidatesSigmac reconstructed Σc0,++ candidates
470484 // / @param mcParticles table of generated particles
471485 void processMc (McParticlesLcGenMatch const & mcParticles,
472- aod::TracksWMc const & tracks,
473- LambdacMc const & candsLc,
474486 McCollisionsNoCents const & collInfos,
487+ aod::TracksWMc const &, // tracks,
488+ LambdacMc const &, // candsLc,
489+ aod::HfCandScBase const & candidatesSigmac,
475490 aod::McCollisions const &,
476491 BCsInfo const &)
477492 {
478493
479494 // Match reconstructed candidates.
480- candidatesSigmac->bindExternalIndices (&tracks);
481- candidatesSigmac->bindExternalIndices (&candsLc);
495+ // candidatesSigmac->bindExternalIndices(&tracks);
496+ // candidatesSigmac->bindExternalIndices(&candsLc);
482497
483498 int indexRec = -1 ;
484499 int8_t sign = 0 ;
@@ -487,7 +502,8 @@ struct HfCandidateSigmac0plusplusMc {
487502 int8_t chargeSigmac = 10 ;
488503
489504 // / Match reconstructed Σc0,++ candidates
490- for (const auto & candSigmac : *candidatesSigmac) {
505+ // for (const auto& candSigmac : *candidatesSigmac) { // needed with Spawn
506+ for (const auto & candSigmac : candidatesSigmac) {
491507 indexRec = -1 ;
492508 sign = 0 ;
493509 flag = 0 ;
@@ -523,6 +539,8 @@ struct HfCandidateSigmac0plusplusMc {
523539 auto particle = mcParticles.rawIteratorAt (indexRec);
524540 particleAntiparticle = isParticleAntiparticle (particle, Pdg::kSigmaC0 );
525541
542+ // / TODO: check that the reco collision points to the generated collision where the matched MC signal is found !!! (+++)
543+
526544 // / look for Σc0(2520)
527545 if (flag == 0 ) {
528546 indexRec = RecoDecay::getMatchedMCRec (mcParticles, arrayDaughters, Pdg::kSigmaCStar0 , std::array{+kProton , -kKPlus , +kPiPlus , -kPiPlus }, true , &sign, 3 );
@@ -567,6 +585,8 @@ struct HfCandidateSigmac0plusplusMc {
567585 if (flag != 0 ) {
568586 auto particle = mcParticles.rawIteratorAt (indexRec);
569587 origin = RecoDecay::getCharmHadronOrigin (mcParticles, particle, false , &idxBhadMothers);
588+
589+ // / TODO: check that the origin of the SigmaC is the same of the daughter Lc !!! (+++)
570590 }
571591 // / fill the table with results of reconstruction level MC matching
572592 if (origin == RecoDecay::OriginType::NonPrompt) {
@@ -597,6 +617,9 @@ struct HfCandidateSigmac0plusplusMc {
597617 continue ;
598618 }
599619
620+ // / TODO: CHECK IF THESE EVENT SELECTIONS MAKE SENSE
621+
622+
600623 // / 3 levels:
601624 // / 1. Σc0 → Λc+ π-,+
602625 // / 2. Λc+ → pK-π+ direct (i) or Λc+ → resonant channel Λc± → p± K*, Λc± → Δ(1232)±± K∓ or Λc± → Λ(1520) π± (ii)
0 commit comments