@@ -161,16 +161,16 @@ struct f1protonreducedtable {
161161 {" hInvMassf1Like" , " hInvMassf1Like" , {HistType::kTH2F , {{400 , 1 .1f , 1 .9f }, {100 , 0 .0f , 10 .0f }}}},
162162 {" hInvMassf1kstar" , " hInvMassf1kstar" , {HistType::kTH3F , {{400 , 1 .1f , 1 .9f }, {100 , 0 .0f , 10 .0f }, {8 , 0 .0f , 0 .8f }}}},
163163 {" hkstarDist" , " hkstarDist" , {HistType::kTH1F , {{300 , 0 .0f , 3 .0f }}}},
164- {" hDCAxy" , " hDCAxy" , {HistType::kTH1F , {{100 , -5 . 0f , 5 . 0f }}}},
165- {" hDCAz" , " hDCAz" , {HistType::kTH1F , {{100 , -5 . 0f , 5 . 0f }}}},
164+ {" hDCAxy" , " hDCAxy" , {HistType::kTH3F , {{100 , -0 . 05f , 0 . 05f }, { 5 , - 2.5 , 2.5 }, { 40 , 0.0 , 4.0 }}}},
165+ {" hDCAz" , " hDCAz" , {HistType::kTH3F , {{100 , -0 . 05f , 0 . 05f }, { 2 , 0 , 2 }, { 40 , 0.0 , 4.0 }}}},
166166 {" hPhi" , " hPhi" , {HistType::kTH1F , {{1400 , -7 .0f , 7 .0f }}}},
167167 {" hPhiSphero" , " hPhiSphero" , {HistType::kTH1F , {{1400 , -7 .0f , 7 .0f }}}},
168168 {" hEta" , " hEta" , {HistType::kTH1F , {{20 , -1 .0f , 1 .0f }}}},
169169 {" hNsigmaPtpionTPC" , " hNsigmaPtpionTPC" , {HistType::kTH2F , {{200 , -10 .0f , 10 .0f }, {100 , 0 .0f , 10 .0f }}}},
170170 {" hNsigmaPtpionTOF" , " hNsigmaPtpionTOF" , {HistType::kTH2F , {{200 , -10 .0f , 10 .0f }, {100 , 0 .0f , 10 .0f }}}},
171171 {" hNsigmaPtkaonTPC" , " hNsigmaPtkaonTPC" , {HistType::kTH3F , {{200 , -10 .0f , 10 .0f }, {200 , -20 .0f , 20 .0f }, {100 , 0 .0f , 10 .0f }}}},
172172 {" hNsigmaPtkaonTOF" , " hNsigmaPtkaonTOF" , {HistType::kTH2F , {{200 , -10 .0f , 10 .0f }, {100 , 0 .0f , 10 .0f }}}},
173- {" hNsigmaPtprotonTPC" , " hNsigmaPtprotonTPC" , {HistType::kTH2F , {{200 , -10 .0f , 10 .0f }, {100 , 0 .0f , 10 .0f }}}},
173+ {" hNsigmaPtprotonTPC" , " hNsigmaPtprotonTPC" , {HistType::kTH3F , {{100 , -5 .0f , 5 . 0f }, { 100 , - 5 . 0f , 5 .0f }, {100 , 0 .0f , 10 .0f }}}},
174174 {" hNsigmaPtprotonTOF" , " hNsigmaPtprotonTOF" , {HistType::kTH2F , {{200 , -10 .0f , 10 .0f }, {100 , 0 .0f , 10 .0f }}}},
175175 {" hInvMassk0" , " hInvMassk0" , {HistType::kTH2F , {{200 , 0 .4f , 0 .6f }, {100 , 0 .0f , 10 .0f }}}},
176176 },
@@ -266,7 +266,7 @@ struct f1protonreducedtable {
266266 bool selectionGlobalTrack (const T& candidate)
267267 {
268268 if (!(candidate.isGlobalTrack () && candidate.isPVContributor ())) {
269- return false ;
269+ // return false;
270270 }
271271 return true ;
272272 }
@@ -348,6 +348,33 @@ struct f1protonreducedtable {
348348 return false ;
349349 }
350350
351+ inline bool passProtonPID (float nsigmaTPC, float nsigmaTOF, float TOFHit, ROOT::Math::PtEtaPhiMVector proton)
352+ {
353+ // pidMode:
354+ // 0 = default: p < thr -> |TPC| < 2.5 ; p >= thr -> TOF mandatory AND circular(TPC,TOF) < 2.0
355+ // 1 = syst-1: p < thr -> |TPC| < 2.0 ; p >= thr -> TOF mandatory AND circular(TPC,TOF) < 2.0
356+ // 2 = syst-2: p < thr -> |TPC| < 2.5 ; p >= thr -> TOF mandatory AND circular(TPC,TOF) < 2.5
357+
358+ if (proton.Pt () > 4.0 || proton.Pt () < 0.15 ) {
359+ return false ;
360+ }
361+
362+ if (proton.P () < 0.7 ) {
363+ return (std::abs (nsigmaTPC) < 2.5 );
364+ }
365+
366+ // above threshold: TOF must exist
367+ if (TOFHit != 1 ) {
368+ return false ;
369+ }
370+
371+
372+ const float nsTPC = nsigmaTPC;
373+ const float nsTOF = nsigmaTOF;
374+ const float comb = std::sqrt (nsTPC * nsTPC + nsTOF * nsTOF);
375+ return (comb < 2.5 );
376+ }
377+
351378 template <typename Collision, typename V0>
352379 bool SelectionV0 (Collision const & collision, V0 const & candidate)
353380 {
@@ -682,8 +709,6 @@ struct f1protonreducedtable {
682709 if (!selectionGlobalTrack (track)) {
683710 continue ;
684711 }
685- qaRegistry.fill (HIST (" hDCAxy" ), track.dcaXY ());
686- qaRegistry.fill (HIST (" hDCAz" ), track.dcaZ ());
687712 qaRegistry.fill (HIST (" hEta" ), track.eta ());
688713 qaRegistry.fill (HIST (" hPhi" ), track.phi ());
689714 double nTPCSigmaP[3 ]{track.tpcNSigmaPi (), track.tpcNSigmaKa (), track.tpcNSigmaPr ()};
@@ -778,17 +803,15 @@ struct f1protonreducedtable {
778803 ProtonIndex.push_back (track.globalIndex ());
779804 ProtonCharge.push_back (track.sign ());
780805
781- ProtonDcaxy.push_back (std::abs ( track.dcaXY () ));
782- ProtonDcaz.push_back (std::abs ( track.dcaZ () ));
806+ ProtonDcaxy.push_back (track.dcaXY ());
807+ ProtonDcaz.push_back (track.dcaZ ());
783808 ProtonTPCNcls.push_back (std::abs (track.tpcNClsFound ()));
784809 ProtonTPCNcrs.push_back (std::abs (track.tpcNClsCrossedRows ()));
785810
786811 if (track.sign () > 0 ) {
787- qaRegistry.fill (HIST (" hNsigmaPtprotonTPC" ), nTPCSigmaP[2 ], track.pt ());
788812 ProtonTPCNsigma.push_back (nTPCSigmaP[2 ]);
789813 }
790814 if (track.sign () < 0 ) {
791- qaRegistry.fill (HIST (" hNsigmaPtprotonTPC" ), nTPCSigmaN[2 ], track.pt ());
792815 ProtonTPCNsigma.push_back (nTPCSigmaN[2 ]);
793816 }
794817 if (track.hasTOF ()) {
@@ -961,6 +984,24 @@ struct f1protonreducedtable {
961984 }
962985 }
963986 qaRegistry.fill (HIST (" hEventstat" ), 0.5 );
987+
988+ for (auto iproton = protons.begin (); iproton != protons.end (); ++iproton) {
989+ auto i6 = std::distance (protons.begin (), iproton);
990+ ProtonVectorDummy2 = protons.at (i6);
991+ if (std::abs (ProtonDcaxy.at (i6)) < 0.05 && std::abs (ProtonDcaz.at (i6)) < 0.05 ) {
992+ if (ProtonTOFHit.at (i6) && ProtonVectorDummy2.P () > 0.7 ) {
993+ qaRegistry.fill (HIST (" hNsigmaPtprotonTPC" ),ProtonTPCNsigma.at (i6), ProtonTOFNsigma.at (i6), ProtonVectorDummy2.Pt ());
994+ }
995+ if (ProtonVectorDummy2.P () < 0.7 ) {
996+ qaRegistry.fill (HIST (" hNsigmaPtprotonTPC" ),ProtonTPCNsigma.at (i6), 4.999 , ProtonVectorDummy2.Pt ());
997+ }
998+ }
999+ if (passProtonPID (ProtonTPCNsigma.at (i6), ProtonTOFNsigma.at (i6), ProtonTOFHit.at (i6), ProtonVectorDummy2)) {
1000+ qaRegistry.fill (HIST (" hDCAxy" ), ProtonDcaxy.at (i6), ProtonCharge.at (i6), ProtonVectorDummy2.Pt ());
1001+ qaRegistry.fill (HIST (" hDCAz" ), ProtonDcaz.at (i6), ProtonCharge.at (i6), ProtonVectorDummy2.Pt ());
1002+ }
1003+ }
1004+
9641005 if (numberF1 > 0 && (f1resonance.size () == f1signal.size ()) && (f1resonance.size () == f1kaonkshortmass.size ()) && (f1resonance.size () == f1resonanced1.size ()) && (f1resonance.size () == f1resonanced2.size ()) && (f1resonance.size () == f1resonanced3.size ())) {
9651006 qaRegistry.fill (HIST (" hEventstat" ), 1.5 );
9661007 if (keepEventF1Proton) {
0 commit comments