@@ -161,7 +161,7 @@ struct PiDeuteronFemto {
161161 Configurable<float > settingCutNsigmaTPCDe{" settingCutNsigmaTPCDe" , 2 .5f , " Value of the TPC Nsigma cut on De" };
162162 Configurable<float > settingCutNsigmaITSDe{" settingCutNsigmaITSDe" , 2 .5f , " Value of the ITD Nsigma cut on De" };
163163 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" };
164+ Configurable<float > settingCutPinMinTOFITSDe{" settingCutPinMinTOFITSDe" , 1 .2f , " Minimum p to apply the TOF ITS cut on De" };
165165 Configurable<float > settingCutNsigmaTOFTPCDe{" settingCutNsigmaTOFTPCDe" , 2 .5f , " Value of the De TOF TPC Nsigma cut" };
166166 Configurable<float > settingCutNsigmaTOFTPCPi{" settingCutNsigmaTOFTPCPi" , 3 .0f , " Value of the Pion TOF TPC Nsigma cut" };
167167 Configurable<int > settingNoMixedEvents{" settingNoMixedEvents" , 5 , " Number of mixed events per event" };
@@ -180,6 +180,7 @@ struct PiDeuteronFemto {
180180
181181 Configurable<bool > settingSaveUSandLS{" settingSaveUSandLS" , true , " Save All Pairs" };
182182 Configurable<bool > settingFillMultiplicity{" settingFillMultiplicity" , false , " Fill multiplicity table" };
183+ Configurable<bool > settingUseBBcomputeDeNsigma{" settingUseBBcomputeDeNsigma" , false , " Use BB params to compute De TPC Nsigma" };
183184
184185 // Zorro
185186 Configurable<bool > settingSkimmedProcessing{" settingSkimmedProcessing" , false , " Skimmed dataset processing" };
@@ -239,14 +240,18 @@ struct PiDeuteronFemto {
239240 {" hDePhi" , " phi distribution; phi(De)" , {HistType::kTH1F , {{600 , -4 .0f , 4 .0f }}}},
240241 {" hPiPhi" , " phi distribution; phi(#pi)" , {HistType::kTH1F , {{600 , -4 .0f , 4 .0f }}}},
241242 {" 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 }}}},
243+ {" h2dEdx" , " dEdx distribution; #it{p} (GeV/#it{c}); dE/dx (a.u.)" , {HistType::kTH2F , {{200 , -5 .0f , 5 .0f }, {100 , 0 .0f , 2000 .0f }}}},
244+ {" 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 }}}},
245+ {" 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 }}}},
246+ {" 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 }}}},
243247 {" 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 }}}},
244248 {" 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 }}}},
245249 {" 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 }}}},
250+ {" 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 }}}},
251+ {" 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 }}}},
248252 {" 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 }}}},
253+ {" 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 }}}},
254+ {" 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 }}}},
250255 {" 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 }}}},
251256 {" hkStar_LS_M" , " ;kStar (GeV/c)" , {HistType::kTH1F , {{300 , 0 .0f , 3 .0f }}}},
252257 {" hkStar_LS_A" , " ;kStar (GeV/c)" , {HistType::kTH1F , {{300 , 0 .0f , 3 .0f }}}},
@@ -282,7 +287,7 @@ struct PiDeuteronFemto {
282287 for (int i = 0 ; i < numParticles; i++) {
283288 mBBparamsDe [i] = settingBetheBlochParams->get (" De" , Form (" p%i" , i));
284289 }
285- mBBparamsDe [5 ] = settingBetheBlochParams->get (" De" , " resolution" ); // wdf?
290+ mBBparamsDe [5 ] = settingBetheBlochParams->get (" De" , " resolution" );
286291
287292 std::vector<std::string> selectionLabels = {" All" , " Track selection" , " PID" };
288293 for (int i = 0 ; i < Selections::kAll ; i++) {
@@ -396,21 +401,25 @@ struct PiDeuteronFemto {
396401 {
397402 auto tpcNSigmaPi = candidate.tpcNSigmaPi ();
398403 mQaRegistry .fill (HIST (" h2NsigmaPiTPC_preselection" ), candidate.tpcInnerParam (), tpcNSigmaPi);
404+ if (std::abs (candidate.pt ()) < settingCutPiptMin || std::abs (candidate.pt ()) > settingCutPiptMax)
405+ return false ;
399406 if (candidate.hasTOF () && candidate.tpcInnerParam () > settingCutPinMinTOFPi) {
400407 auto tofNSigmaPi = candidate.tofNSigmaPi ();
408+ auto combNsigma = std::sqrt (tofNSigmaPi * tofNSigmaPi + tpcNSigmaPi * tpcNSigmaPi);
401409
402410 if (std::abs (tpcNSigmaPi) > settingCutNsigmaTPCPi) {
403411 return false ;
404412 }
405413 mQaRegistry .fill (HIST (" h2NsigmaPiTOF_preselection" ), candidate.pt (), tofNSigmaPi);
406- if (std::sqrt (tofNSigmaPi * tofNSigmaPi + tpcNSigmaPi * tpcNSigmaPi) > settingCutNsigmaTOFTPCPi) {
414+ if (combNsigma > settingCutNsigmaTOFTPCPi) {
407415 return false ;
408416 }
409- mQaRegistry .fill (HIST (" h2NsigmaPiTPC" ), candidate.pt (), tpcNSigmaPi);
410- mQaRegistry .fill (HIST (" h2NsigmaPiTOF" ), candidate.pt (), tofNSigmaPi);
417+ mQaRegistry .fill (HIST (" h2NsigmaPiTPC" ), candidate.sign () * candidate.pt (), tpcNSigmaPi);
418+ mQaRegistry .fill (HIST (" h2NsigmaPiTOF" ), candidate.sign () * candidate.pt (), tofNSigmaPi);
419+ mQaRegistry .fill (HIST (" h2NsigmaPiComb" ), candidate.sign () * candidate.pt (), combNsigma);
411420 return true ;
412421 } else if (std::abs (tpcNSigmaPi) < settingCutNsigmaTPCPi) {
413- mQaRegistry .fill (HIST (" h2NsigmaPiTPC" ), candidate.pt (), tpcNSigmaPi);
422+ mQaRegistry .fill (HIST (" h2NsigmaPiTPC" ), candidate.sign () * candidate. pt (), tpcNSigmaPi);
414423 return true ;
415424 }
416425 return false ;
@@ -428,35 +437,45 @@ struct PiDeuteronFemto {
428437 bool selectionPIDDe (const Ttrack& candidate)
429438 {
430439 float tpcInnerParam = candidate.tpcInnerParam ();
440+ mQaRegistry .fill (HIST (" h2dEdx" ), candidate.sign () * tpcInnerParam, candidate.tpcSignal ());
431441
432- if (tpcInnerParam < settingCutPinMinDe) {
442+ if (std::abs ( tpcInnerParam) < settingCutPinMinDe) {
433443 return false ;
434444 }
445+ float tpcNSigmaDe;
446+ if (settingUseBBcomputeDeNsigma) {
447+ tpcNSigmaDe = computeNSigmaDe (candidate);
448+ } else {
449+ tpcNSigmaDe = candidate.tpcNSigmaDe ();
450+ }
435451
436- auto tpcNSigmaDe = computeNSigmaDe (candidate);
437452 mQaRegistry .fill (HIST (" h2NsigmaDeTPC_preselection" ), candidate.sign () * candidate.pt (), tpcNSigmaDe);
438453 mQaRegistry .fill (HIST (" h2NsigmaDeTPC_preselecComp" ), candidate.sign () * candidate.pt (), candidate.tpcNSigmaDe ());
454+ if (std::abs (candidate.pt ()) < settingCutDeptMin || std::abs (candidate.pt ()) > settingCutDeptMax)
455+ return false ;
439456 if (candidate.hasTOF () && candidate.tpcInnerParam () > settingCutPinMinTOFITSDe) {
440457 auto tofNSigmaDe = candidate.tofNSigmaDe ();
441- if (std::abs (tpcNSigmaDe) > settingCutNsigmaTPCDe) {
442- return false ;
443- }
444- if (std::sqrt (tofNSigmaDe * tofNSigmaDe + tpcNSigmaDe * tpcNSigmaDe) > settingCutNsigmaTOFTPCDe) {
458+ auto combNsigma = std::sqrt (tofNSigmaDe * tofNSigmaDe + tpcNSigmaDe * tpcNSigmaDe);
459+ if (combNsigma > settingCutNsigmaTOFTPCDe) {
445460 return false ;
446461 }
462+ mQaRegistry .fill (HIST (" h2dEdxDecandidates" ), candidate.sign () * tpcInnerParam, candidate.tpcSignal ());
463+ mQaRegistry .fill (HIST (" h2NsigmaDeComb" ), candidate.sign () * candidate.pt (), combNsigma);
464+ mQaRegistry .fill (HIST (" h2NsigmaDeTPC" ), candidate.sign () * candidate.pt (), tpcNSigmaDe);
465+ mQaRegistry .fill (HIST (" h2NsigmaDeTOF" ), candidate.sign () * candidate.pt (), tofNSigmaDe);
466+ return true ;
467+ } else if (std::abs (tpcNSigmaDe) < settingCutNsigmaTPCDe) {
468+
447469 o2::aod::ITSResponse mResponseITS ;
448470 auto itsnSigmaDe = mResponseITS .nSigmaITS <o2::track::PID::Deuteron>(candidate.itsClusterSizes (), candidate.p (), candidate.eta ());
449-
450471 mQaRegistry .fill (HIST (" h2NSigmaDeITS_preselection" ), candidate.sign () * candidate.pt (), itsnSigmaDe);
451- if (itsnSigmaDe < settingCutNsigmaITSDe) {
472+ if (std::abs ( itsnSigmaDe) > settingCutNsigmaITSDe) {
452473 return false ;
453474 }
454- mQaRegistry .fill (HIST (" h2dEdxDecandidates" ), candidate.sign () * tpcInnerParam, candidate.tpcSignal ());
455475 mQaRegistry .fill (HIST (" h2NsigmaDeTPC" ), candidate.sign () * candidate.pt (), tpcNSigmaDe);
456476 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);
477+ // mQaRegistry.fill(HIST("h2NsigmaDeComb"), candidate.sign() * candidate.pt(), combNsigma);
478+ mQaRegistry .fill (HIST (" h2dEdxDecandidates" ), candidate.sign () * tpcInnerParam, candidate.tpcSignal ());
460479 return true ;
461480 }
462481 return false ;
@@ -509,8 +528,7 @@ struct PiDeuteronFemto {
509528 }
510529
511530 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 ()};
531+ piDecand.momPi = std::array{trackPi.px (), trackPi.py (), trackPi.pz ()};
514532 float invMass = 0 ;
515533 invMass = RecoDecay::m (std::array{piDecand.momDe , piDecand.momPi }, std::array{o2::constants::physics::MassDeuteron, o2::constants::physics::MassPiPlus});
516534 if (settingCutInvMass > 0 && invMass > settingCutInvMass) {
@@ -763,10 +781,6 @@ struct PiDeuteronFemto {
763781 float DeDCAxyMin = 0.015 + 0.0305 / TMath::Power (piDecand.recoPtDe (), 1.1 );
764782 if (abs (piDecand.dcaxyDe ) > DeDCAxyMin || abs (piDecand.dcazDe ) > settingCutDeDCAzMin || abs (piDecand.dcaxyPi ) > settingCutPiDCAxyMin || abs (piDecand.dcazPi ) > settingCutPiDCAzMin)
765783 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 ;
770784
771785 fillHistograms (piDecand);
772786
0 commit comments