@@ -102,6 +102,7 @@ struct PiDecandidate {
102102 std::array<float , 3 > momDe = {99 .f , 99 .f , 99 .f };
103103 std::array<float , 3 > momPi = {99 .f , 99 .f , 99 .f };
104104
105+
105106 float signDe = 1 .f;
106107 float signPi = 1 .f;
107108 float invMass = -10 .f;
@@ -161,7 +162,7 @@ struct PiDeuteronFemto {
161162 Configurable<float > settingCutNsigmaTPCDe{" settingCutNsigmaTPCDe" , 2 .5f , " Value of the TPC Nsigma cut on De" };
162163 Configurable<float > settingCutNsigmaITSDe{" settingCutNsigmaITSDe" , 2 .5f , " Value of the ITD Nsigma cut on De" };
163164 Configurable<float > settingCutPinMinTOFPi{" settingCutPinMinTOFPi" , 0 .5f , " Minimum Pin to apply the TOF cut on Pions" };
164- Configurable<float > settingCutPinMinTOFITSDe{" settingCutPinMinTOFITSDe" , 1 .2f , " Minimum pT to apply the TOF ITS cut on De" };
165+ Configurable<float > settingCutPinMinTOFITSDe{" settingCutPinMinTOFITSDe" , 1 .2f , " Minimum p to apply the TOF ITS cut on De" };
165166 Configurable<float > settingCutNsigmaTOFTPCDe{" settingCutNsigmaTOFTPCDe" , 2 .5f , " Value of the De TOF TPC Nsigma cut" };
166167 Configurable<float > settingCutNsigmaTOFTPCPi{" settingCutNsigmaTOFTPCPi" , 3 .0f , " Value of the Pion TOF TPC Nsigma cut" };
167168 Configurable<int > settingNoMixedEvents{" settingNoMixedEvents" , 5 , " Number of mixed events per event" };
@@ -180,6 +181,7 @@ struct PiDeuteronFemto {
180181
181182 Configurable<bool > settingSaveUSandLS{" settingSaveUSandLS" , true , " Save All Pairs" };
182183 Configurable<bool > settingFillMultiplicity{" settingFillMultiplicity" , false , " Fill multiplicity table" };
184+ Configurable<bool > settingUseBBcomputeDeNsigma{" settingUseBBcomputeDeNsigma" , false , " Use BB params to compute De TPC Nsigma" };
183185
184186 // Zorro
185187 Configurable<bool > settingSkimmedProcessing{" settingSkimmedProcessing" , false , " Skimmed dataset processing" };
@@ -239,14 +241,18 @@ struct PiDeuteronFemto {
239241 {" hDePhi" , " phi distribution; phi(De)" , {HistType::kTH1F , {{600 , -4 .0f , 4 .0f }}}},
240242 {" hPiPhi" , " phi distribution; phi(#pi)" , {HistType::kTH1F , {{600 , -4 .0f , 4 .0f }}}},
241243 {" h2dEdxDecandidates" , " dEdx distribution; #it{p} (GeV/#it{c}); dE/dx (a.u.)" , {HistType::kTH2F , {{200 , -5 .0f , 5 .0f }, {100 , 0 .0f , 2000 .0f }}}},
242- {" h2NsigmaDeTPC" , " NsigmaDe TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(De)" , {HistType::kTH2F , {{20 , -5 .0f , 5 .0f }, {200 , -5 .0f , 5 .0f }}}},
244+ {" h2dEdx" , " dEdx distribution; #it{p} (GeV/#it{c}); dE/dx (a.u.)" , {HistType::kTH2F , {{200 , -5 .0f , 5 .0f }, {100 , 0 .0f , 2000 .0f }}}},
245+ {" h2NsigmaDeTPC" , " NsigmaDe TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(De)" , {HistType::kTH2F , {{100 , -2 .0f , 2 .0f }, {200 , -5 .0f , 5 .0f }}}},
246+ {" h2NsigmaDeComb" , " NsigmaDe TPCTOF comb distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{comb}(De)" , {HistType::kTH2F , {{100 , -2 .0f , 2 .0f }, {100 , 0 .0f , 5 .0f }}}},
247+ {" h2NsigmaPiComb" , " NsigmaPi TPCTOF comb distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{comb}(#pi)" , {HistType::kTH2F , {{100 , -2 .0f , 2 .0f }, {100 , 0 .0f , 5 .0f }}}},
243248 {" h2NsigmaDeTPC_preselection" , " NsigmaDe TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(De)" , {HistType::kTH2F , {{100 , -5 .0f , 5 .0f }, {400 , -10 .0f , 10 .0f }}}},
244249 {" h2NsigmaDeTPC_preselecComp" , " NsigmaDe TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(De)" , {HistType::kTH2F , {{100 , -5 .0f , 5 .0f }, {400 , -10 .0f , 10 .0f }}}},
245250 {" h2NSigmaDeITS_preselection" , " NsigmaDe ITS distribution; signed #it{p}_{T} (GeV/#it{c}); n#sigma_{ITS} De" , {HistType::kTH2F , {{50 , -5 .0f , 5 .0f }, {120 , -3 .0f , 3 .0f }}}},
246- {" h2NSigmaDeITS" , " NsigmaDe ITS distribution; signed #it{p}_{T} (GeV/#it{c}); n#sigma_{ITS} De" , {HistType::kTH2F , {{50 , -5 .0f , 5 .0f }, {120 , -3 .0f , 3 .0f }}}},
247- {" h2NsigmaPiTPC" , " NsigmaPi TPC distribution; #it{p}_{T}(GeV/#it{c}); n#sigma_{TPC}(p)" , {HistType::kTH2F , {{20 , -5 .0f , 5 .0f }, {200 , -5 .0f , 5 .0f }}}},
251+ {" h2NSigmaDeITS" , " NsigmaDe ITS distribution; signed #it{p}_{T} (GeV/#it{c}); n#sigma_{ITS} De" , {HistType::kTH2F , {{100 , -2 .0f , 2 .0f }, {120 , -3 .0f , 3 .0f }}}},
252+ {" h2NsigmaPiTPC" , " NsigmaPi TPC distribution; #it{p}_{T}(GeV/#it{c}); n#sigma_{TPC}(p)" , {HistType::kTH2F , {{200 , -5 .0f , 5 .0f }, {200 , -5 .0f , 5 .0f }}}},
248253 {" h2NsigmaPiTPC_preselection" , " NsigmaDe TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(De)" , {HistType::kTH2F , {{100 , -5 .0f , 5 .0f }, {400 , -10 .0f , 10 .0f }}}},
249- {" h2NsigmaPiTOF" , " NsigmaPi TOF distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TOF}(p)" , {HistType::kTH2F , {{20 , -5 .0f , 5 .0f }, {200 , -5 .0f , 5 .0f }}}},
254+ {" h2NsigmaPiTOF" , " NsigmaPi TOF distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TOF}(p)" , {HistType::kTH2F , {{200 , -5 .0f , 5 .0f }, {200 , -5 .0f , 5 .0f }}}},
255+ {" h2NsigmaDeTOF" , " NsigmaDe TOF distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TOF}(De)" , {HistType::kTH2F , {{200 , -5 .0f , 5 .0f }, {200 , -5 .0f , 5 .0f }}}},
250256 {" h2NsigmaPiTOF_preselection" , " NsigmaPi TOF distribution; #iit{p}_{T} (GeV/#it{c}); n#sigma_{TOF}(p)" , {HistType::kTH2F , {{100 , -5 .0f , 5 .0f }, {400 , -10 .0f , 10 .0f }}}},
251257 {" hkStar_LS_M" , " ;kStar (GeV/c)" , {HistType::kTH1F , {{300 , 0 .0f , 3 .0f }}}},
252258 {" hkStar_LS_A" , " ;kStar (GeV/c)" , {HistType::kTH1F , {{300 , 0 .0f , 3 .0f }}}},
@@ -282,7 +288,7 @@ struct PiDeuteronFemto {
282288 for (int i = 0 ; i < numParticles; i++) {
283289 mBBparamsDe [i] = settingBetheBlochParams->get (" De" , Form (" p%i" , i));
284290 }
285- mBBparamsDe [5 ] = settingBetheBlochParams->get (" De" , " resolution" ); // wdf?
291+ mBBparamsDe [5 ] = settingBetheBlochParams->get (" De" , " resolution" );
286292
287293 std::vector<std::string> selectionLabels = {" All" , " Track selection" , " PID" };
288294 for (int i = 0 ; i < Selections::kAll ; i++) {
@@ -396,21 +402,25 @@ struct PiDeuteronFemto {
396402 {
397403 auto tpcNSigmaPi = candidate.tpcNSigmaPi ();
398404 mQaRegistry .fill (HIST (" h2NsigmaPiTPC_preselection" ), candidate.tpcInnerParam (), tpcNSigmaPi);
405+ if (std::abs (candidate.pt ()) < settingCutPiptMin || std::abs (candidate.pt ()) > settingCutPiptMax)
406+ return false ;
399407 if (candidate.hasTOF () && candidate.tpcInnerParam () > settingCutPinMinTOFPi) {
400408 auto tofNSigmaPi = candidate.tofNSigmaPi ();
409+ auto combNsigma = std::sqrt (tofNSigmaPi * tofNSigmaPi + tpcNSigmaPi * tpcNSigmaPi);
401410
402411 if (std::abs (tpcNSigmaPi) > settingCutNsigmaTPCPi) {
403412 return false ;
404413 }
405414 mQaRegistry .fill (HIST (" h2NsigmaPiTOF_preselection" ), candidate.pt (), tofNSigmaPi);
406- if (std::sqrt (tofNSigmaPi * tofNSigmaPi + tpcNSigmaPi * tpcNSigmaPi) > settingCutNsigmaTOFTPCPi) {
415+ if (combNsigma > settingCutNsigmaTOFTPCPi) {
407416 return false ;
408417 }
409- mQaRegistry .fill (HIST (" h2NsigmaPiTPC" ), candidate.pt (), tpcNSigmaPi);
410- mQaRegistry .fill (HIST (" h2NsigmaPiTOF" ), candidate.pt (), tofNSigmaPi);
418+ mQaRegistry .fill (HIST (" h2NsigmaPiTPC" ), candidate.sign () *candidate.pt (), tpcNSigmaPi);
419+ mQaRegistry .fill (HIST (" h2NsigmaPiTOF" ), candidate.sign () *candidate.pt (), tofNSigmaPi);
420+ mQaRegistry .fill (HIST (" h2NsigmaPiComb" ), candidate.sign () *candidate.pt (), combNsigma);
411421 return true ;
412422 } else if (std::abs (tpcNSigmaPi) < settingCutNsigmaTPCPi) {
413- mQaRegistry .fill (HIST (" h2NsigmaPiTPC" ), candidate.pt (), tpcNSigmaPi);
423+ mQaRegistry .fill (HIST (" h2NsigmaPiTPC" ), candidate.sign () *candidate. pt (), tpcNSigmaPi);
414424 return true ;
415425 }
416426 return false ;
@@ -428,35 +438,45 @@ struct PiDeuteronFemto {
428438 bool selectionPIDDe (const Ttrack& candidate)
429439 {
430440 float tpcInnerParam = candidate.tpcInnerParam ();
441+ mQaRegistry .fill (HIST (" h2dEdx" ), candidate.sign () * tpcInnerParam, candidate.tpcSignal ());
431442
432- if (tpcInnerParam < settingCutPinMinDe) {
443+ if (std::abs ( tpcInnerParam) < settingCutPinMinDe) {
433444 return false ;
434445 }
435-
436- auto tpcNSigmaDe = computeNSigmaDe (candidate);
446+ float tpcNSigmaDe;
447+ if (settingUseBBcomputeDeNsigma) {
448+ tpcNSigmaDe = computeNSigmaDe (candidate);
449+ }else {
450+ tpcNSigmaDe = candidate.tpcNSigmaDe ();
451+ }
452+
437453 mQaRegistry .fill (HIST (" h2NsigmaDeTPC_preselection" ), candidate.sign () * candidate.pt (), tpcNSigmaDe);
438454 mQaRegistry .fill (HIST (" h2NsigmaDeTPC_preselecComp" ), candidate.sign () * candidate.pt (), candidate.tpcNSigmaDe ());
455+ if (std::abs (candidate.pt ()) < settingCutDeptMin || std::abs (candidate.pt ()) > settingCutDeptMax)
456+ return false ;
439457 if (candidate.hasTOF () && candidate.tpcInnerParam () > settingCutPinMinTOFITSDe) {
440458 auto tofNSigmaDe = candidate.tofNSigmaDe ();
441- if (std::abs (tpcNSigmaDe) > settingCutNsigmaTPCDe) {
442- return false ;
443- }
444- if (std::sqrt (tofNSigmaDe * tofNSigmaDe + tpcNSigmaDe * tpcNSigmaDe) > settingCutNsigmaTOFTPCDe) {
459+ auto combNsigma = std::sqrt (tofNSigmaDe * tofNSigmaDe + tpcNSigmaDe * tpcNSigmaDe);
460+ if (combNsigma > settingCutNsigmaTOFTPCDe) {
445461 return false ;
446462 }
463+ mQaRegistry .fill (HIST (" h2dEdxDecandidates" ), candidate.sign () * tpcInnerParam, candidate.tpcSignal ());
464+ mQaRegistry .fill (HIST (" h2NsigmaDeComb" ), candidate.sign () * candidate.pt (), combNsigma);
465+ mQaRegistry .fill (HIST (" h2NsigmaDeTPC" ), candidate.sign () * candidate.pt (), tpcNSigmaDe);
466+ mQaRegistry .fill (HIST (" h2NsigmaDeTOF" ), candidate.sign () * candidate.pt (), tofNSigmaDe);
467+ return true ;
468+ } else if (std::abs (tpcNSigmaDe) < settingCutNsigmaTPCDe) {
469+
447470 o2::aod::ITSResponse mResponseITS ;
448471 auto itsnSigmaDe = mResponseITS .nSigmaITS <o2::track::PID::Deuteron>(candidate.itsClusterSizes (), candidate.p (), candidate.eta ());
449-
450472 mQaRegistry .fill (HIST (" h2NSigmaDeITS_preselection" ), candidate.sign () * candidate.pt (), itsnSigmaDe);
451- if (itsnSigmaDe < settingCutNsigmaITSDe) {
473+ if (std::abs ( itsnSigmaDe) > settingCutNsigmaITSDe) {
452474 return false ;
453475 }
454- mQaRegistry .fill (HIST (" h2dEdxDecandidates" ), candidate.sign () * tpcInnerParam, candidate.tpcSignal ());
455476 mQaRegistry .fill (HIST (" h2NsigmaDeTPC" ), candidate.sign () * candidate.pt (), tpcNSigmaDe);
456477 mQaRegistry .fill (HIST (" h2NSigmaDeITS" ), candidate.sign () * candidate.pt (), itsnSigmaDe);
457- return true ;
458- } else if (std::abs (tpcNSigmaDe) < settingCutNsigmaTPCDe) {
459- mQaRegistry .fill (HIST (" h2NsigmaDeTPC" ), candidate.sign () * candidate.pt (), tpcNSigmaDe);
478+ // mQaRegistry.fill(HIST("h2NsigmaDeComb"), candidate.sign() * candidate.pt(), combNsigma);
479+ mQaRegistry .fill (HIST (" h2dEdxDecandidates" ), candidate.sign () * tpcInnerParam, candidate.tpcSignal ());
460480 return true ;
461481 }
462482 return false ;
@@ -509,8 +529,7 @@ struct PiDeuteronFemto {
509529 }
510530
511531 piDecand.momDe = std::array{trackDe.px (), trackDe.py (), trackDe.pz ()};
512- for (int i = 0 ; i < numCoordinates; i++)
513- piDecand.momPi = std::array{trackPi.px (), trackPi.py (), trackPi.pz ()};
532+ piDecand.momPi = std::array{trackPi.px (), trackPi.py (), trackPi.pz ()};
514533 float invMass = 0 ;
515534 invMass = RecoDecay::m (std::array{piDecand.momDe , piDecand.momPi }, std::array{o2::constants::physics::MassDeuteron, o2::constants::physics::MassPiPlus});
516535 if (settingCutInvMass > 0 && invMass > settingCutInvMass) {
@@ -763,10 +782,6 @@ struct PiDeuteronFemto {
763782 float DeDCAxyMin = 0.015 + 0.0305 / TMath::Power (piDecand.recoPtDe (), 1.1 );
764783 if (abs (piDecand.dcaxyDe ) > DeDCAxyMin || abs (piDecand.dcazDe ) > settingCutDeDCAzMin || abs (piDecand.dcaxyPi ) > settingCutPiDCAxyMin || abs (piDecand.dcazPi ) > settingCutPiDCAzMin)
765784 return ;
766- if (std::abs (piDecand.recoPtPi ()) < settingCutPiptMin || std::abs (piDecand.recoPtPi ()) > settingCutPiptMax)
767- return ;
768- if (std::abs (piDecand.recoPtDe ()) < settingCutDeptMin || std::abs (piDecand.recoPtDe ()) > settingCutDeptMax)
769- return ;
770785
771786 fillHistograms (piDecand);
772787
0 commit comments