1010// or submit itself to any jurisdiction.
1111
1212// / \file candidateSelectorOmegac.cxx
13- // / \brief Omegac → Xi Pi selection task
13+ // / \brief Xic and Omegac → Xi Pi selection task
1414// / \author Federica Zanone <federica.zanone@cern.ch>, Heidelberg University & GSI
1515
1616#include " Framework/AnalysisTask.h"
@@ -29,6 +29,13 @@ using namespace o2::analysis::pdg;
2929using namespace o2 ::aod::hf_cand_toxipi;
3030using namespace o2 ::aod::hf_sel_toxipi;
3131
32+ enum pidInfoStored {
33+ kPiFromLam = 0 ,
34+ kPrFromLam ,
35+ kPiFromCasc ,
36+ kPiFromCharm
37+ };
38+
3239// / Struct for applying Omegac selection cuts
3340struct HfCandidateSelectorToXiPi {
3441 Produces<aod::HfSelToXiPi> hfSelToXiPi;
@@ -50,7 +57,8 @@ struct HfCandidateSelectorToXiPi {
5057 Configurable<double > invMassOmegacMax{" invMassOmegacMax" , 3.1 , " Upper limit invariant mass spectrum charm baryon" };
5158
5259 // kinematic selections
53- Configurable<double > etaTrackMax{" etaTrackMax" , 0.8 , " Max absolute value of eta" };
60+ Configurable<double > etaTrackCharmBachMax{" etaTrackCharmBachMax" , 0.8 , " Max absolute value of eta for charm baryon bachelor" };
61+ Configurable<double > etaTrackLFDauMax{" etaTrackLFDauMax" , 1.0 , " Max absolute value of eta for V0 and cascade daughters" };
5462 Configurable<double > ptPiFromCascMin{" ptPiFromCascMin" , 0.15 , " Min pT pi <- casc" };
5563 Configurable<double > ptPiFromOmeMin{" ptPiFromOmeMin" , 0.2 , " Min pT pi <- omegac" };
5664
@@ -206,25 +214,25 @@ struct HfCandidateSelectorToXiPi {
206214 double etaV0NegDau = candidate.etaV0NegDau ();
207215 double etaPiFromCasc = candidate.etaPiFromCasc ();
208216 double etaPiFromOme = candidate.etaPiFromOme ();
209- if (std::abs (etaV0PosDau) > etaTrackMax ) {
217+ if (std::abs (etaV0PosDau) > etaTrackLFDauMax ) {
210218 resultSelections = false ;
211219 registry.fill (HIST (" hSelEtaPosV0Dau" ), 0 );
212220 } else {
213221 registry.fill (HIST (" hSelEtaPosV0Dau" ), 1 );
214222 }
215- if (std::abs (etaV0NegDau) > etaTrackMax ) {
223+ if (std::abs (etaV0NegDau) > etaTrackLFDauMax ) {
216224 resultSelections = false ;
217225 registry.fill (HIST (" hSelEtaNegV0Dau" ), 0 );
218226 } else {
219227 registry.fill (HIST (" hSelEtaNegV0Dau" ), 1 );
220228 }
221- if (std::abs (etaPiFromCasc) > etaTrackMax ) {
229+ if (std::abs (etaPiFromCasc) > etaTrackLFDauMax ) {
222230 resultSelections = false ;
223231 registry.fill (HIST (" hSelEtaPiFromCasc" ), 0 );
224232 } else {
225233 registry.fill (HIST (" hSelEtaPiFromCasc" ), 1 );
226234 }
227- if (std::abs (etaPiFromOme) > etaTrackMax ) {
235+ if (std::abs (etaPiFromOme) > etaTrackCharmBachMax ) {
228236 resultSelections = false ;
229237 registry.fill (HIST (" hSelEtaPiFromOme" ), 0 );
230238 } else {
@@ -419,45 +427,77 @@ struct HfCandidateSelectorToXiPi {
419427 }
420428
421429 // track-level PID selection
422- int pidProton = -999 ;
423- int pidPiFromLam = -999 ;
424- int pidPiFromCasc = -999 ;
425- int pidPiFromOme = -999 ;
430+
431+ // for TrackSelectorPID
432+ int statusPidPrFromLam = -999 ;
433+ int statusPidPiFromLam = -999 ;
434+ int statusPidPiFromCasc = -999 ;
435+ int statusPidPiFromCharm = -999 ;
436+
437+ bool statusPidLambda = false ;
438+ bool statusPidCascade = false ;
439+ bool statusPidCharm = false ;
440+
441+ int infoTpcStored = 0 ;
442+ int infoTofStored = 0 ;
443+
426444 if (usePidTpcOnly == usePidTpcTofCombined) {
427445 LOGF (fatal, " Check the PID configurables, usePidTpcOnly and usePidTpcTofCombined can't have the same value" );
428446 }
447+
448+ if (trackPiFromLam.hasTPC ()) {
449+ SETBIT (infoTpcStored, kPiFromLam );
450+ }
451+ if (trackPrFromLam.hasTPC ()) {
452+ SETBIT (infoTpcStored, kPrFromLam );
453+ }
454+ if (trackPiFromCasc.hasTPC ()) {
455+ SETBIT (infoTpcStored, kPiFromCasc );
456+ }
457+ if (trackPiFromOmeg.hasTPC ()) {
458+ SETBIT (infoTpcStored, kPiFromCharm );
459+ }
460+ if (trackPiFromLam.hasTOF ()) {
461+ SETBIT (infoTofStored, kPiFromLam );
462+ }
463+ if (trackPrFromLam.hasTOF ()) {
464+ SETBIT (infoTofStored, kPrFromLam );
465+ }
466+ if (trackPiFromCasc.hasTOF ()) {
467+ SETBIT (infoTofStored, kPiFromCasc );
468+ }
469+ if (trackPiFromOmeg.hasTOF ()) {
470+ SETBIT (infoTofStored, kPiFromCharm );
471+ }
472+
429473 if (usePidTpcOnly) {
430- pidProton = selectorProton.getStatusTrackPIDTPC (trackPrFromLam);
431- pidPiFromLam = selectorPion.getStatusTrackPIDTPC (trackPiFromLam);
432- pidPiFromCasc = selectorPion.getStatusTrackPIDTPC (trackPiFromCasc);
433- pidPiFromOme = selectorPion.getStatusTrackPIDTPC (trackPiFromOmeg);
474+ statusPidPrFromLam = selectorProton.getStatusTrackPIDTPC (trackPrFromLam);
475+ statusPidPiFromLam = selectorPion.getStatusTrackPIDTPC (trackPiFromLam);
476+ statusPidPiFromCasc = selectorPion.getStatusTrackPIDTPC (trackPiFromCasc);
477+ statusPidPiFromCharm = selectorPion.getStatusTrackPIDTPC (trackPiFromOmeg);
434478 } else if (usePidTpcTofCombined) {
435- pidProton = selectorProton.getStatusTrackPIDTpcAndTof (trackPrFromLam);
436- pidPiFromLam = selectorPion.getStatusTrackPIDTpcAndTof (trackPiFromLam);
437- pidPiFromCasc = selectorPion.getStatusTrackPIDTpcAndTof (trackPiFromCasc);
438- pidPiFromOme = selectorPion.getStatusTrackPIDTpcAndTof (trackPiFromOmeg);
479+ statusPidPrFromLam = selectorProton.getStatusTrackPIDTpcAndTof (trackPrFromLam);
480+ statusPidPiFromLam = selectorPion.getStatusTrackPIDTpcAndTof (trackPiFromLam);
481+ statusPidPiFromCasc = selectorPion.getStatusTrackPIDTpcAndTof (trackPiFromCasc);
482+ statusPidPiFromCharm = selectorPion.getStatusTrackPIDTpcAndTof (trackPiFromOmeg);
439483 }
440484
441- bool statusPidLambda = false ;
442- bool statusPidCascade = false ;
443- bool statusPidOmegac = false ;
444-
445- if (pidProton == TrackSelectorPID::Status::PIDAccepted && pidPiFromLam == TrackSelectorPID::Status::PIDAccepted) {
485+ if (statusPidPrFromLam == TrackSelectorPID::Status::PIDAccepted && statusPidPiFromLam == TrackSelectorPID::Status::PIDAccepted) {
446486 statusPidLambda = true ;
447487 if (resultSelections) {
448488 registry.fill (HIST (" hTest" ), 0.5 );
449489 }
450490 }
451491
452- if (pidProton == TrackSelectorPID::Status::PIDAccepted && pidPiFromLam == TrackSelectorPID::Status::PIDAccepted && pidPiFromCasc == TrackSelectorPID::Status::PIDAccepted) {
492+ if (statusPidPrFromLam == TrackSelectorPID::Status::PIDAccepted && statusPidPiFromLam == TrackSelectorPID::Status::PIDAccepted && statusPidPiFromCasc == TrackSelectorPID::Status::PIDAccepted) {
453493 statusPidCascade = true ;
454494 if (resultSelections) {
455495 registry.fill (HIST (" hTest" ), 1.5 );
456496 }
457497 }
458498
459- if (pidProton == TrackSelectorPID::Status::PIDAccepted && pidPiFromLam == TrackSelectorPID::Status::PIDAccepted && pidPiFromCasc == TrackSelectorPID::Status::PIDAccepted && pidPiFromOme == TrackSelectorPID::Status::PIDAccepted) {
460- statusPidOmegac = true ;
499+ if (statusPidPrFromLam == TrackSelectorPID::Status::PIDAccepted && statusPidPiFromLam == TrackSelectorPID::Status::PIDAccepted && statusPidPiFromCasc == TrackSelectorPID::Status::PIDAccepted && statusPidPiFromCharm == TrackSelectorPID::Status::PIDAccepted) {
500+ statusPidCharm = true ;
461501 if (resultSelections) {
462502 registry.fill (HIST (" hTest" ), 2.5 );
463503 }
@@ -475,7 +515,7 @@ struct HfCandidateSelectorToXiPi {
475515 if (std::abs (invMassLambda - massLambdaFromPDG) < (nSigmaInvMassCut * sigmaInvMassLambda)) {
476516 statusInvMassLambda = true ;
477517 registry.fill (HIST (" hSelMassLam" ), 1 );
478- if (statusPidLambda && statusPidCascade && statusPidOmegac && resultSelections) {
518+ if (statusPidLambda && statusPidCascade && statusPidCharm && resultSelections) {
479519 registry.fill (HIST (" hTest" ), 3.5 );
480520 }
481521 } else {
@@ -485,7 +525,7 @@ struct HfCandidateSelectorToXiPi {
485525 if (std::abs (invMassCascade - massXiFromPDG) < (nSigmaInvMassCut * sigmaInvMassCascade)) {
486526 statusInvMassCascade = true ;
487527 registry.fill (HIST (" hSelMassCasc" ), 1 );
488- if (statusPidLambda && statusPidCascade && statusPidOmegac && statusInvMassLambda && resultSelections) {
528+ if (statusPidLambda && statusPidCascade && statusPidCharm && statusInvMassLambda && resultSelections) {
489529 registry.fill (HIST (" hTest" ), 4.5 );
490530 }
491531 } else {
@@ -495,14 +535,14 @@ struct HfCandidateSelectorToXiPi {
495535 if ((invMassOmegac >= invMassOmegacMin) && (invMassOmegac <= invMassOmegacMax)) {
496536 statusInvMassOmegac = true ;
497537 registry.fill (HIST (" hSelMassOme" ), 1 );
498- if (statusPidLambda && statusPidCascade && statusPidOmegac && statusInvMassLambda && statusInvMassCascade && resultSelections) {
538+ if (statusPidLambda && statusPidCascade && statusPidCharm && statusInvMassLambda && statusInvMassCascade && resultSelections) {
499539 registry.fill (HIST (" hTest" ), 5.5 );
500540 }
501541 } else {
502542 registry.fill (HIST (" hSelMassOme" ), 0 );
503543 }
504544
505- hfSelToXiPi (statusPidLambda, statusPidCascade, statusPidOmegac , statusInvMassLambda, statusInvMassCascade, statusInvMassOmegac, resultSelections,
545+ hfSelToXiPi (statusPidLambda, statusPidCascade, statusPidCharm , statusInvMassLambda, statusInvMassCascade, statusInvMassOmegac, resultSelections, infoTpcStored, infoTofStored ,
506546 trackPiFromOmeg.tpcNSigmaPi (), trackPiFromCasc.tpcNSigmaPi (), trackPiFromLam.tpcNSigmaPi (), trackPrFromLam.tpcNSigmaPr (),
507547 trackPiFromOmeg.tofNSigmaPi (), trackPiFromCasc.tofNSigmaPi (), trackPiFromLam.tofNSigmaPi (), trackPrFromLam.tofNSigmaPr ());
508548
@@ -519,10 +559,10 @@ struct HfCandidateSelectorToXiPi {
519559 if (statusPidCascade) {
520560 registry.fill (HIST (" hSelPID" ), 3.5 );
521561 }
522- if (!statusPidOmegac ) {
562+ if (!statusPidCharm ) {
523563 registry.fill (HIST (" hSelPID" ), 4.5 );
524564 }
525- if (statusPidOmegac ) {
565+ if (statusPidCharm ) {
526566 registry.fill (HIST (" hSelPID" ), 5.5 );
527567 }
528568 if (!statusInvMassLambda) {
@@ -545,7 +585,7 @@ struct HfCandidateSelectorToXiPi {
545585 }
546586 }
547587
548- if (statusPidLambda && statusPidCascade && statusPidOmegac && statusInvMassLambda && statusInvMassCascade && statusInvMassOmegac && resultSelections) {
588+ if (statusPidLambda && statusPidCascade && statusPidCharm && statusInvMassLambda && statusInvMassCascade && statusInvMassOmegac && resultSelections) {
549589 hInvMassOmegac->Fill (invMassOmegac);
550590
551591 if (candidate.collisionId () != collId) {
0 commit comments