1010// or submit itself to any jurisdiction.
1111
1212// / \file taskCd.cxx
13- // / \brief Cd ± → d± K∓ π± analysis task
13+ // / \brief cd ± → d± K∓ π± analysis task
1414// / \author Biao Zhang <biao.zhang@cern.ch>, Heidelberg Universiity
1515
1616#include " PWGHF/Core/CentralityEstimation.h"
@@ -175,6 +175,10 @@ struct HfTaskCd {
175175 Configurable<bool > fillTHn{" fillTHn" , false , " fill THn" };
176176 Configurable<bool > fillCandLiteTree{" fillCandLiteTree" , false , " Flag to fill candiates lite tree" };
177177 Configurable<bool > fillCandFullTree{" fillCandFullTree" , false , " Flag to fill candiates full tree" };
178+ Configurable<bool > cfgUseTofPidForDeuteron{" cfgUseTofPidForDeuteron" , false , " Use TOF PID for deuteron candidates" };
179+ Configurable<bool > cfgCutOnDeuteronDcaOrdering{" cfgCutOnDeuteronDcaOrdering" , false , " Require deuteron DCA to be smaller than kaon and pion DCAs" };
180+ Configurable<float > cfgMinDeuteronDcaPreselection{" cfgMinDeuteronDcaPreselection" , 0.004 , " Minimum deuteron DCA for preselection (cm)" };
181+ Configurable<float > cfgMaxDeuteronTofPidPreselection{" cfgMaxDeuteronTofPidPreselection" , 5 , " Maximum |nSigma TOF| for deuteron preselection" };
178182
179183 SliceCache cache;
180184
@@ -406,6 +410,7 @@ struct HfTaskCd {
406410 float nSigmaItsDe = 0 .f ;
407411 float nSigmaTofDe = 0 .f , nSigmaTofKa = 0 .f , nSigmaTofPi = 0 .f ;
408412
413+ float dcaDeuteron = 0 .f , dcaKaon = 0 .f , dcaPion = 0 .f ;
409414 // int itsNClusterSizeDe = 0;
410415
411416 float tpcSignalsDe = 0 .f ;
@@ -420,8 +425,8 @@ struct HfTaskCd {
420425 nSigmaTpcKa = candidate.nSigTpcKa1 ();
421426 nSigmaTofKa = candidate.nSigTofKa1 ();
422427
423- const bool selDeKPi = (candidate.isSelCdToDeKPi () >= 1 );
424- const bool selPiKDe = (candidate.isSelCdToPiKDe () >= 1 );
428+ const bool selDeKPi = (candidate.isSelCdToDeKPi () >= selectionFlagCd );
429+ const bool selPiKDe = (candidate.isSelCdToPiKDe () >= selectionFlagCd );
425430
426431 auto prong0 = candidate.template prong0_as <TrackType>();
427432 auto prong1 = candidate.template prong1_as <TrackType>();
@@ -446,6 +451,10 @@ struct HfTaskCd {
446451 tpcSignalsDe = prong0.tpcSignal ();
447452 tpcSignalsPi = prong2.tpcSignal ();
448453 itsSignalsDe = itsSignal (prong0);
454+
455+ dcaDeuteron = candidate.impactParameter0 ();
456+ dcaKaon = candidate.impactParameter1 ();
457+ dcaPion = candidate.impactParameter2 ();
449458 } else if (selPiKDe) {
450459 candFlag = -1 ;
451460 pSignedDe = prong2.tpcInnerParam () * prong2.sign ();
@@ -460,6 +469,10 @@ struct HfTaskCd {
460469 tpcSignalsDe = prong2.tpcSignal ();
461470 tpcSignalsPi = prong0.tpcSignal ();
462471 itsSignalsDe = itsSignal (prong2);
472+
473+ dcaDeuteron = candidate.impactParameter2 ();
474+ dcaKaon = candidate.impactParameter1 ();
475+ dcaPion = candidate.impactParameter0 ();
463476 }
464477
465478 // PID QA
@@ -476,6 +489,15 @@ struct HfTaskCd {
476489 registry.fill (HIST (" Data/hNsigmaTPCKaVsP" ), prong1.tpcInnerParam () * prong1.sign (), nSigmaTpcKa);
477490 registry.fill (HIST (" Data/hNsigmaTOFKaVsP" ), prong1.tpcInnerParam () * prong1.sign (), nSigmaTofKa);
478491
492+ if (cfgUseTofPidForDeuteron && std::abs (nSigmaTofDe) > cfgMaxDeuteronTofPidPreselection) {
493+ continue ;
494+ }
495+ if (std::abs (dcaDeuteron) < cfgMinDeuteronDcaPreselection) {
496+ continue ;
497+ }
498+ if (cfgCutOnDeuteronDcaOrdering && (std::abs (dcaDeuteron) > std::abs (dcaKaon) || std::abs (dcaDeuteron) > std::abs (dcaPion))) {
499+ continue ;
500+ }
479501 if (fillCandLiteTree) {
480502
481503 rowCandCdLite (
0 commit comments