@@ -112,7 +112,7 @@ struct PiKpRAA {
112112 static constexpr float kMaxPtNchSel {3 .0f };
113113 static constexpr float kMinCharge {3 .f };
114114 static constexpr float kMinPElMIP {0 .3f };
115- static constexpr float kMaxPElMIP {0 .4f };
115+ static constexpr float kMaxPElMIP {0 .45f };
116116 static constexpr float kMinPMIP {0 .4f };
117117 static constexpr float kMaxPMIP {0 .6f };
118118 static constexpr float kMindEdxMIP {40 .0f };
@@ -137,6 +137,8 @@ struct PiKpRAA {
137137 Configurable<float > maxEtaDaughter{" maxEtaDaughter" , +0.8 , " Daughter maximum-eta selection" };
138138 Configurable<float > minPt{" minPt" , 0.15 , " minimum pt of the tracks" };
139139 Configurable<float > maxPt{" maxPt" , 20.0 , " maximum pt of the tracks" };
140+ Configurable<float > minPtDaughter{" minPtDaughter" , 0.15 , " minimum pt of the tracks" };
141+ Configurable<float > maxPtDaughter{" maxPtDaughter" , 20.0 , " maximum pt of the tracks" };
140142 Configurable<bool > useNclsPID{" useNclsPID" , true , " Use Ncl for PID?" };
141143 Configurable<int16_t > minNcl{" minNcl" , 135 , " minimum found Ncl in TPC" };
142144 Configurable<int16_t > minNCrossedRows{" minNCrossedRows" , 70 , " minimum number of crossed rows" };
@@ -165,7 +167,7 @@ struct PiKpRAA {
165167 Configurable<float > dEdxPlateauSel{" dEdxPlateauSel" , 50 , " dEdx selection for electrons" };
166168 Configurable<float > tpcPidNsigmaCut{" tpcPidNsigmaCut" , 5 , " tpcPidNsigmaCut" };
167169 Configurable<float > maxExpTOFPi{" maxExpTOFPi" , 0.00005 , " Maximum beta TOF selection" };
168- Configurable<float > maxExpTOFEl{" maxExpTOFEl" , 0.001 , " Maximum beta TOF selection" };
170+ // Configurable<float> maxExpTOFEl{"maxExpTOFEl", 0.001, "Maximum beta TOF selection"};
169171 Configurable<bool > applyTPCTOFCombinedCut{" applyTPCTOFCombinedCut" , false , " Apply geometrical cut ? " };
170172
171173 // Phi cut
@@ -465,26 +467,8 @@ struct PiKpRAA {
465467 registry.add (" PtPrVsCentMC" , " " , kTH2F , {axisPt, axisCent});
466468
467469 for (int i = 0 ; i < kNEtaHists ; ++i) {
468- // dEdx[i] = registry.add<TH3>(Form("dEdx_%s", endingEta[i]), Form("%s;Momentum (GeV/#it{c});dE/dx;", latexEta[i]), kTH3F, {axisPt, axisdEdx, axisCent});
469- // pTVsP[i] = registry.add<TH2>(Form("pTVsP_%s", endingEta[i]), Form("%s;Momentum (GeV/#it{c});#it{p}_{T} (GeV/#it{c});", latexEta[i]), kTH2F, {axisPt, axisPt});
470- // dEdxPiV0[i] = registry.add<TH3>(Form("dEdxPiV0_%s", endingEta[i]), Form("#pi^{+} + #pi^{-}, %s;Momentum (GeV/#it{c});dE/dx;", latexEta[i]), kTH3F, {axisPtV0s, axisdEdx, axisCent});
471- // dEdxPrV0[i] = registry.add<TH3>(Form("dEdxPrV0_%s", endingEta[i]), Form("p + #bar{p}, %s;Momentum (GeV/#it{c});dE/dx;", latexEta[i]), kTH3F, {axisPtV0s, axisdEdx, axisCent});
472- // dEdxElV0[i] = registry.add<TH3>(Form("dEdxElV0_%s", endingEta[i]), Form("e^{+} + e^{-}, %s;Momentum (GeV/#it{c});dE/dx;", latexEta[i]), kTH3F, {axisPtV0s, axisdEdx, axisCent});
473- // dEdxPiTOF[i] = registry.add<TH3>(Form("dEdxPiTOF_%s", endingEta[i]), Form("#pi^{+} + #pi^{-}, %s;Momentum (GeV/#it{c});dE/dx;", latexEta[i]), kTH3F, {axisPtV0s, axisdEdx, axisCent});
474- // nClVsdEdxPiV0[i] = registry.add<TH2>(Form("NclVsdEdxPiV0_%s", endingEta[i]), Form("%s;#it{N}_{cl} used for PID;dE/dx;", latexEta[i]), kTH2F, {axisNcl, axisdEdx});
475- // nClVsdEdxElV0[i] = registry.add<TH2>(Form("NclVsdEdxElV0_%s", endingEta[i]), Form("%s;#it{N}_{cl} used for PID;dE/dx;", latexEta[i]), kTH2F, {axisNcl, axisdEdx});
476- // nClVsdEdxPrV0[i] = registry.add<TH2>(Form("NclVsdEdxPrV0_%s", endingEta[i]), Form("%s;#it{N}_{cl} used for PID;dE/dx;", latexEta[i]), kTH2F, {axisNcl, axisdEdx});
477470 nClVsP[i] = registry.add <TH2>(Form (" NclVsPPrimaries_%s" , endingEta[i]), Form (" %s;;Ncl TPC" , latexEta[i]), kTH2F , {axisPtNcl, axisNcl});
478- // nClVsPElV0[i] = registry.add<TH2>(Form("NclVsPElV0_%s", endingEta[i]), Form("%s;;Ncl TPC", latexEta[i]), kTH2F, {axisPtNcl, axisNcl});
479- // nClVsPPiV0[i] = registry.add<TH2>(Form("NclVsPPiV0_%s", endingEta[i]), Form("%s;;Ncl TPC", latexEta[i]), kTH2F, {axisPtNcl, axisNcl});
480- // nClVsPPrV0[i] = registry.add<TH2>(Form("NclVsPPrV0_%s", endingEta[i]), Form("%s;;Ncl TPC", latexEta[i]), kTH2F, {axisPtNcl, axisNcl});
481471 nClVsPp[i] = registry.add <TProfile>(Form (" NclVsPrimariesp_%s" , endingEta[i]), Form (" %s;;#LT#it{N}_{cl}#GT TPC" , latexEta[i]), kTProfile , {axisPtNcl});
482- // nClVsPpElV0[i] = registry.add<TProfile>(Form("NclVsPElV0p_%s", endingEta[i]), Form("%s;;#LT#it{N}_{cl}#GT TPC", latexEta[i]), kTProfile, {axisPtNcl});
483- // nClVsPpPiV0[i] = registry.add<TProfile>(Form("NclVsPPiV0p_%s", endingEta[i]), Form("%s;;#LT#it{N}_{cl}#GT TPC", latexEta[i]), kTProfile, {axisPtNcl});
484- // nClVsPpPrV0[i] = registry.add<TProfile>(Form("NclVsPPrV0p_%s", endingEta[i]), Form("%s;;#LT#it{N}_{cl}#GT TPC", latexEta[i]), kTProfile, {axisPtNcl});
485- // nClVsdEdxpElV0[i] = registry.add<TProfile>(Form("NclVsdEdxElV0p_%s", endingEta[i]), Form("%s;;#LTd#it{E}/d#it{x}#GT", latexEta[i]), kTProfile, {axisNcl});
486- // nClVsdEdxpPiV0[i] = registry.add<TProfile>(Form("NclVsdEdxPiV0p_%s", endingEta[i]), Form("%s;;#LTd#it{E}/d#it{x}#GT", latexEta[i]), kTProfile, {axisNcl});
487- // nClVsdEdxpPrV0[i] = registry.add<TProfile>(Form("NclVsdEdxPrV0p_%s", endingEta[i]), Form("%s;;#LTd#it{E}/d#it{x}#GT", latexEta[i]), kTProfile, {axisNcl});
488472 }
489473 }
490474
@@ -494,6 +478,8 @@ struct PiKpRAA {
494478 LOG (info) << " \t v0TypeSelection=" << static_cast <int >(v0Selections.v0TypeSelection );
495479 LOG (info) << " \t minPt=" << v0Selections.minPt ;
496480 LOG (info) << " \t maxPt=" << v0Selections.maxPt ;
481+ LOG (info) << " \t minPtDaughter=" << v0Selections.minPtDaughter ;
482+ LOG (info) << " \t maxPtDaughter=" << v0Selections.maxPtDaughter ;
497483 LOG (info) << " \t useNclsPID=" << v0Selections.useNclsPID ;
498484 LOG (info) << " \t qTSel=" << v0Selections.qTSel ;
499485 LOG (info) << " \t armAlphaSel=" << v0Selections.armAlphaSel ;
@@ -528,12 +514,14 @@ struct PiKpRAA {
528514 LOG (info) << " \t Loading Eta Cal!" ;
529515 LOG (info) << " \t pathEtaCal=" << pathEtaCal.value ;
530516 loadEtaCalibration ();
517+ LOG (info) << " \t isMIPCalLoaded=" << etaCal.isMIPCalLoaded ;
531518 }
532519
533520 if (v0Selections.applyPlateauSel ) {
534521 LOG (info) << " \t Loading Eta Plateau Cal!" ;
535522 LOG (info) << " \t pathEtaCalPlateau=" << pathEtaCalPlateau.value ;
536523 loadEtaPlateauCalibration ();
524+ LOG (info) << " \t isCalPlateauLoaded=" << etaCal.isCalPlateauLoaded ;
537525 }
538526
539527 if (v0Selections.applyNclSel )
@@ -579,28 +567,6 @@ struct PiKpRAA {
579567 nch++;
580568 }
581569
582- for (const auto & track : tracks) {
583- // Track Selection
584- if (!trkSelGlobalOpenDCAxy.IsSelected (track)) {
585- continue ;
586- }
587- if (track.pt () < kMinPtNchSel || track.pt () > kMaxPtNchSel ) {
588- continue ;
589- }
590-
591- const float piTPCNsigma{std::fabs (track.tpcNSigmaPi ())};
592- const float prTPCNsigma{std::fabs (track.tpcNSigmaPr ())};
593- const float piTOFNsigma{std::fabs (track.tofNSigmaPi ())};
594- const float prTOFNsigma{std::fabs (track.tofNSigmaPr ())};
595- const double piRadiusNsigma{std::sqrt (std::pow (piTPCNsigma, 2 .) + std::pow (piTOFNsigma, 2 .))};
596- const double prRadiusNsigma{std::sqrt (std::pow (prTPCNsigma, 2 .) + std::pow (prTOFNsigma, 2 .))};
597-
598- if (piRadiusNsigma < kThree )
599- registry.fill (HIST (" dcaVsPtPi" ), track.pt (), track.dcaXY ());
600- if (prRadiusNsigma < kThree )
601- registry.fill (HIST (" dcaVsPtPr" ), track.pt (), track.dcaXY ());
602- }
603-
604570 bool skipEvent{false };
605571 if (applyNchSel) {
606572 if (!cfgNch.calibrationsLoaded )
@@ -645,6 +611,51 @@ struct PiKpRAA {
645611 return ;
646612 }
647613
614+ // Fill DCAxy vs pT for secondary-particle contamination correction
615+ for (const auto & track : tracks) {
616+ // Track Selection
617+ if (!trkSelGlobalOpenDCAxy.IsSelected (track))
618+ continue ;
619+
620+ if (track.pt () < v0Selections.minPt || track.pt () > v0Selections.maxPt )
621+ continue ;
622+
623+ if (track.eta () < v0Selections.minEtaDaughter || track.eta () > v0Selections.maxEtaDaughter )
624+ continue ;
625+
626+ const float momentum{track.p ()};
627+ const float pt{track.pt ()};
628+ const float phi{track.phi ()};
629+ const float pOrPt{v0Selections.usePinPhiSelection ? momentum : pt};
630+ const int16_t nclFound{track.tpcNClsFound ()};
631+ const int16_t nclPID{track.tpcNClsPID ()};
632+ const int16_t ncl{v0Selections.useNclsPID ? nclPID : nclFound};
633+
634+ if (v0Selections.applyNclSel && ncl < v0Selections.minNcl )
635+ continue ;
636+
637+ float phiPrime{phi};
638+ const int charge{track.sign ()};
639+ phiPrimeFunc (phiPrime, magField, charge);
640+
641+ if (v0Selections.applyPhiCut ) {
642+ if (!passesPhiSelection (pOrPt, phiPrime))
643+ continue ;
644+ }
645+
646+ const float piTPCNsigma{std::fabs (track.tpcNSigmaPi ())};
647+ const float prTPCNsigma{std::fabs (track.tpcNSigmaPr ())};
648+ const float piTOFNsigma{std::fabs (track.tofNSigmaPi ())};
649+ const float prTOFNsigma{std::fabs (track.tofNSigmaPr ())};
650+ const double piRadiusNsigma{std::sqrt (std::pow (piTPCNsigma, 2 .) + std::pow (piTOFNsigma, 2 .))};
651+ const double prRadiusNsigma{std::sqrt (std::pow (prTPCNsigma, 2 .) + std::pow (prTOFNsigma, 2 .))};
652+
653+ if (piRadiusNsigma < kThree )
654+ registry.fill (HIST (" dcaVsPtPi" ), track.pt (), track.dcaXY ());
655+ if (prRadiusNsigma < kThree )
656+ registry.fill (HIST (" dcaVsPtPr" ), track.pt (), track.dcaXY ());
657+ }
658+
648659 for (const auto & track : tracks) {
649660
650661 if (!trkSelGlobal.IsSelected (track))
@@ -653,6 +664,9 @@ struct PiKpRAA {
653664 if (track.pt () < v0Selections.minPt || track.pt () > v0Selections.maxPt )
654665 continue ;
655666
667+ if (track.eta () < v0Selections.minEtaDaughter || track.eta () > v0Selections.maxEtaDaughter )
668+ continue ;
669+
656670 const float momentum{track.p ()};
657671 const float pt{track.pt ()};
658672 const float phi{track.phi ()};
@@ -662,8 +676,8 @@ struct PiKpRAA {
662676 const float pOrPt{v0Selections.usePinPhiSelection ? momentum : pt};
663677 const int16_t nclFound{track.tpcNClsFound ()};
664678 const int16_t nclPID{track.tpcNClsPID ()};
679+ const int16_t ncl{v0Selections.useNclsPID ? nclPID : nclFound};
665680
666- const int16_t ncl = v0Selections.useNclsPID ? nclPID : nclFound;
667681 if (v0Selections.applyNclSel && ncl < v0Selections.minNcl )
668682 continue ;
669683
@@ -704,18 +718,8 @@ struct PiKpRAA {
704718 }
705719
706720 if (momentum > kMinPElMIP && momentum < kMaxPElMIP && dedx > kMindEdxMIPPlateau && dedx < kMaxdEdxMIPPlateau ) {
707- if (track.hasTOF () && track.goodTOFMatch ()) {
708- const float tTOF{track.tofSignal ()};
709- const float trkLength{track.length ()};
710- const float tExpElTOF{track.tofExpSignalEl (tTOF)};
711-
712- if (trkLength > kZero && tTOF > kZero ) {
713- if (std::abs ((tExpElTOF / tTOF) - kOne ) < v0Selections.maxExpTOFEl ) {
714- registry.fill (HIST (" dEdxVsEtaElMIP" ), eta, dedx);
715- registry.fill (HIST (" dEdxVsEtaElMIPp" ), eta, dedx);
716- }
717- }
718- }
721+ registry.fill (HIST (" dEdxVsEtaElMIP" ), eta, dedx);
722+ registry.fill (HIST (" dEdxVsEtaElMIPp" ), eta, dedx);
719723 }
720724
721725 dEdx[indexEta]->Fill (momentum, dedx, centrality);
@@ -798,6 +802,22 @@ struct PiKpRAA {
798802 if (!(passesTrackSelectionDaughters (posTrack) && passesTrackSelectionDaughters (negTrack)))
799803 continue ;
800804
805+ // Eta selection on daughters
806+ if (posTrkEta < v0Selections.minEtaDaughter || posTrkEta > v0Selections.maxEtaDaughter )
807+ continue ;
808+
809+ // Eta selection on daughters
810+ if (negTrkEta < v0Selections.minEtaDaughter || negTrkEta > v0Selections.maxEtaDaughter )
811+ continue ;
812+
813+ // pT selection on daughters
814+ if (posTrkPt < v0Selections.minPtDaughter || posTrkPt > v0Selections.maxPtDaughter )
815+ continue ;
816+
817+ // pT selection on daughters
818+ if (negTrkPt < v0Selections.minPtDaughter || negTrkPt > v0Selections.maxPtDaughter )
819+ continue ;
820+
801821 if (v0Selections.applyNclSel && !(posNcl >= v0Selections.minNcl && negNcl >= v0Selections.minNcl ))
802822 continue ;
803823
0 commit comments