@@ -95,6 +95,7 @@ struct HadronNucleiCorrelation {
9595 Configurable<bool > isPrim{" isPrim" , true , " is isPrim" };
9696 Configurable<bool > doCorrection{" doCorrection" , false , " do efficiency correction" };
9797 Configurable<bool > doQuadraticPID{" doQuadraticPID" , false , " do PID with sum in quadrature of TOF and TPC" };
98+ Configurable<bool > doPIDRej{" doPIDRej" , false , " do PID rejection of competing species" };
9899
99100 struct : ConfigurableGroup {
100101 std::string prefix = " Coalescence" ; // JSON group name
@@ -130,12 +131,13 @@ struct HadronNucleiCorrelation {
130131 Configurable<float > nsigmaElPr{" nsigmaElPr" , 1 .0f , " cut nsigma TPC El for protons" };
131132 Configurable<float > nsigmaElDe{" nsigmaElDe" , 3 .0f , " cut nsigma TPC El for protons" };
132133 Configurable<float > nsigmaTOF{" nsigmaTOF" , 3 .5f , " cut nsigma TOF" };
134+ Configurable<float > nsigmaTOFPrRej{" nsigmaTOFPrRej" , 3 .f , " cut nsigma TOF for proton rejection" };
135+ Configurable<bool > doPrRej{" doPrRej" , true , " do TOF proton rejection" };
133136 Configurable<float > nsigmaQuadratic{" nsigmaQuadratic" , 3 .0f , " cut on sqrt(nsigmaTPC^2 + nsigmaTOF^2), used above the TOF pT threshold when doQuadraticPID is on" };
134137 Configurable<float > nsigmaITSPr{" nsigmaITSPr" , -2 .0f , " cut nsigma ITS Pr" };
135138 Configurable<float > nsigmaITSDe{" nsigmaITSDe" , -2 .0f , " cut nsigma ITS De" };
136139 Configurable<bool > doITSPID{" doITSPID" , true , " do ITS PID" };
137140 Configurable<float > pTthrprTOF{" pTthrprTOF" , 0 .8f , " threshold pT proton to use TOF" };
138- Configurable<float > pTthrprTPCEl{" pTthrprTPCEl" , 1 .0f , " threshold pT proton to use TPC El rejection" };
139141 Configurable<float > pTthrdeTOF{" pTthrdeTOF" , 1 .0f , " threshold pT deuteron to use TOF" };
140142 Configurable<float > pTthrdeTPCEl{" pTthrdeTPCEl" , 1 .0f , " threshold pT deuteron to use TPC El rejection" };
141143 Configurable<bool > rejectionEl{" rejectionEl" , true , " use TPC El rejection" };
@@ -407,6 +409,8 @@ struct HadronNucleiCorrelation {
407409 registryQa.add (" QA/h3dTPCTOF_AntiPr" , " n#sigma TPC vs n#sigma TOF" , {HistType::kTH3D , {tpcNSigmaAxis, tofNSigmaAxis, ptAxis}});
408410 registryQa.add (" QA/h3dTPCTOF_De" , " n#sigma TPC vs n#sigma TOF" , {HistType::kTH3D , {tpcNSigmaAxis, tofNSigmaAxis, ptAxis}});
409411 registryQa.add (" QA/h3dTPCTOF_AntiDe" , " n#sigma TPC vs n#sigma TOF" , {HistType::kTH3D , {tpcNSigmaAxis, tofNSigmaAxis, ptAxis}});
412+ registryQa.add (" QA/h3dTPCTOF_De_Rej" , " n#sigma TPC vs n#sigma TOF" , {HistType::kTH3D , {tpcNSigmaAxis, tofNSigmaAxis, ptAxis}});
413+ registryQa.add (" QA/h3dTPCTOF_AntiDe_Rej" , " n#sigma TPC vs n#sigma TOF" , {HistType::kTH3D , {tpcNSigmaAxis, tofNSigmaAxis, ptAxis}});
410414 registryQa.add (" QA/hnSigmaTPCVsPt_El" , " n#sigma TPC vs p_{T} for e hypothesis (all tracks)" , {HistType::kTH2D , {ptAxis, tpcNSigmaAxis}});
411415 registryQa.add (" QA/hnSigmaTPCVsPt_Pr" , " n#sigma TPC vs p_{T} for p hypothesis (all tracks)" , {HistType::kTH2D , {ptAxis, tpcNSigmaAxis}});
412416 registryQa.add (" QA/hnSigmaTPCVsPt_De" , " n#sigma TPC vs p_{T} for d hypothesis (all tracks)" , {HistType::kTH2D , {ptAxis, tpcNSigmaAxis}});
@@ -581,7 +585,6 @@ struct HadronNucleiCorrelation {
581585 {
582586 const bool isTPCPID = std::abs (track.tpcNSigmaPr ()) < nsigmaTPC.value ;
583587 const bool isTOFPID = std::abs (track.tofNSigmaPr ()) < nsigmaTOF.value ;
584- const bool isTPCElRejection = rejectionEl.value && track.beta () < BetahasTOFthr && track.pt () < pTthrprTPCEl.value && track.tpcNSigmaEl () >= nsigmaElPr.value ;
585588 const bool isITSPID = track.itsNSigmaPr () > nsigmaITSPr.value ;
586589
587590 const bool isQuadraticPID = std::hypot (track.tpcNSigmaPr (), track.tofNSigmaPr ()) < nsigmaQuadratic.value ;
@@ -594,7 +597,7 @@ struct HadronNucleiCorrelation {
594597 if (!doITSPID.value || isITSPID) {
595598 return signCheck;
596599 }
597- } else if (isTPCElRejection || isTOFPID) {
600+ } else if (isTOFPID) {
598601 return signCheck;
599602 }
600603 }
@@ -619,11 +622,15 @@ struct HadronNucleiCorrelation {
619622 const bool isTOFPID = std::abs (track.tofNSigmaDe ()) < nsigmaTOF.value ;
620623 const bool isTPCElRejection = rejectionEl.value && track.beta () < BetahasTOFthr && track.pt () < pTthrdeTPCEl.value && track.tpcNSigmaEl () >= nsigmaElDe.value ;
621624 const bool isITSPID = track.itsNSigmaDe () > nsigmaITSDe.value ;
625+ const bool isNotPr = std::abs (track.tofNSigmaPr ()) >= nsigmaTOFPrRej.value || !doPrRej.value ;
622626
623627 const bool isQuadraticPID = std::hypot (track.tpcNSigmaDe (), track.tofNSigmaDe ()) < nsigmaQuadratic.value ;
624628
625629 // Check if the sign of the track matches the expected sign for deuterons or antideuterons
626630 const bool signCheck = (sign > 0 && track.sign () > 0 ) || (sign < 0 && track.sign () < 0 );
631+ if (!isNotPr) {
632+ return false ;
633+ }
627634 if (!doQuadraticPID.value ) {
628635 if (isTPCPID) {
629636 if (track.pt () < pTthrdeTOF.value ) {
@@ -1021,20 +1028,36 @@ struct HadronNucleiCorrelation {
10211028 registryQa.fill (HIST (" QA/hnSigmaTOFVsPt_De" ), track.pt () * track.sign (), track.tofNSigmaDe ());
10221029 registryQa.fill (HIST (" QA/hnSigmaITSVsPt_Pr" ), track.pt () * track.sign (), track.itsNSigmaPr ());
10231030 registryQa.fill (HIST (" QA/hnSigmaITSVsPt_De" ), track.pt () * track.sign (), track.itsNSigmaDe ());
1031+
1032+ const bool isTPCElRejection = rejectionEl.value && track.beta () < BetahasTOFthr && track.pt () < pTthrdeTPCEl.value && track.tpcNSigmaEl () >= nsigmaElDe.value ;
1033+ const bool isTOFPID = std::abs (track.tofNSigmaDe ()) < nsigmaTOF.value ;
1034+ const bool isNotPr = std::abs (track.tofNSigmaPr ()) >= nsigmaTOFPrRej.value || !doPrRej.value ;
1035+
10241036 if (track.sign () > 0 ) {
1037+
10251038 if (track.pt () >= pTthrprTOF.value || !doITSPID.value || track.itsNSigmaPr () > nsigmaITSPr.value ) {
10261039 registryQa.fill (HIST (" QA/h3dTPCTOF_Pr" ), track.tpcNSigmaPr (), track.tofNSigmaPr (), track.pt ());
10271040 }
10281041 if (track.pt () >= pTthrdeTOF.value || !doITSPID.value || track.itsNSigmaDe () > nsigmaITSDe.value ) {
1029- registryQa.fill (HIST (" QA/h3dTPCTOF_De" ), track.tpcNSigmaDe (), track.tofNSigmaDe (), track.pt ());
1042+ if (isNotPr) {
1043+ registryQa.fill (HIST (" QA/h3dTPCTOF_De" ), track.tpcNSigmaDe (), track.tofNSigmaDe (), track.pt ());
1044+ if (isTPCElRejection || isTOFPID) {
1045+ registryQa.fill (HIST (" QA/h3dTPCTOF_De_Rej" ), track.tpcNSigmaDe (), track.tofNSigmaDe (), track.pt ());
1046+ }
1047+ }
10301048 }
10311049 }
10321050 if (track.sign () < 0 ) {
10331051 if (track.pt () >= pTthrprTOF.value || !doITSPID.value || track.itsNSigmaPr () > nsigmaITSPr.value ) {
10341052 registryQa.fill (HIST (" QA/h3dTPCTOF_AntiPr" ), track.tpcNSigmaPr (), track.tofNSigmaPr (), track.pt ());
10351053 }
10361054 if (track.pt () >= pTthrdeTOF.value || !doITSPID.value || track.itsNSigmaDe () > nsigmaITSDe.value ) {
1037- registryQa.fill (HIST (" QA/h3dTPCTOF_AntiDe" ), track.tpcNSigmaDe (), track.tofNSigmaDe (), track.pt ());
1055+ if (isNotPr) {
1056+ registryQa.fill (HIST (" QA/h3dTPCTOF_AntiDe" ), track.tpcNSigmaDe (), track.tofNSigmaDe (), track.pt ());
1057+ if (isTPCElRejection || isTOFPID) {
1058+ registryQa.fill (HIST (" QA/h3dTPCTOF_AntiDe_Rej" ), track.tpcNSigmaDe (), track.tofNSigmaDe (), track.pt ());
1059+ }
1060+ }
10381061 }
10391062 }
10401063
0 commit comments