@@ -766,41 +766,65 @@ struct Kstarqa {
766766 } */
767767
768768 template <typename T>
769- bool selectionPIDNew (const T& candidate, int PID)
769+ bool selectionPIDPtDep (const T& candidate, int PID)
770770 {
771771 if (PID == PIDParticle::kPion ) {
772772 if (candidate.pt () < selectionConfig.lowPtCutPID && std::abs (candidate.tpcNSigmaPi ()) < selectionConfig.nsigmaCutTPCPi ) {
773773 return true ;
774774 }
775- if (candidate.pt () >= selectionConfig.lowPtCutPID && std::abs (candidate.tpcNSigmaPi ()) < selectionConfig.nsigmaCutTPCPi && candidate.hasTOF () && std::abs (candidate.tofNSigmaPi ()) < selectionConfig.nsigmaCutTOFPi ) {
776- return true ;
775+ if (candidate.pt () >= selectionConfig.lowPtCutPID && !candidate.hasTOF ()) {
776+ if (candidate.pt () < 1.0 && std::abs (candidate.tpcNSigmaPi ()) < selectionConfig.nsigmaCutTPCPi ) {
777+ return true ;
778+ }
779+ if (candidate.pt () >= 1.0 && candidate.pt () < 2.0 && candidate.tpcNSigmaPi () > -1.5 && candidate.tpcNSigmaPi () < selectionConfig.nsigmaCutTPCPi ) {
780+ return true ;
781+ }
782+ if (candidate.pt () >= 2.0 && candidate.pt () < 5.0 && candidate.tpcNSigmaPi () > -1.0 && candidate.tpcNSigmaPi () < selectionConfig.nsigmaCutTPCPi ) {
783+ return true ;
784+ }
785+ if (candidate.pt () >= 5.0 && candidate.tpcNSigmaPi () > -0.5 && candidate.tpcNSigmaPi () < selectionConfig.nsigmaCutTPCPi ) {
786+ return true ;
787+ }
777788 }
778- if (candidate.pt () >= selectionConfig.lowPtCutPID && std::abs (candidate.tpcNSigmaPi ()) < selectionConfig.nsigmaCutTPCPi && ! candidate.hasTOF ()) {
789+ if (candidate.pt () >= selectionConfig.lowPtCutPID && std::abs (candidate.tpcNSigmaPi ()) < selectionConfig.nsigmaCutTPCPi && candidate.hasTOF () && (candidate. tofNSigmaPi () * candidate. tofNSigmaPi () + candidate. tpcNSigmaPi () * candidate. tpcNSigmaPi ()) < (selectionConfig. nsigmaCutCombinedPi * selectionConfig. nsigmaCutCombinedPi )) {
779790 return true ;
780791 }
781792 } else if (PID == PIDParticle::kKaon ) {
782- if (candidate.pt () < selectionConfig.lowPtCutPID && std::abs ( candidate.tpcNSigmaKa ()) < selectionConfig.nsigmaCutTPCKa ) {
793+ if (candidate.pt () < selectionConfig.lowPtCutPID && candidate.tpcNSigmaKa () > - 2.0 && candidate. tpcNSigmaKa ( ) < selectionConfig.nsigmaCutTPCKa ) {
783794 return true ;
784795 }
785- if (candidate.pt () >= selectionConfig.lowPtCutPID && std::abs (candidate.tpcNSigmaKa ()) < selectionConfig.nsigmaCutTPCKa && candidate.hasTOF () && std::abs (candidate.tofNSigmaKa ()) < selectionConfig.nsigmaCutTOFKa ) {
786- return true ;
796+ if (candidate.pt () >= selectionConfig.lowPtCutPID && !candidate.hasTOF ()) {
797+ if (candidate.pt () >= 0.5 && candidate.pt () < 0.6 && candidate.tpcNSigmaKa () > -1.5 && candidate.tpcNSigmaKa () < selectionConfig.nsigmaCutTPCKa ) {
798+ return true ;
799+ }
800+ if (candidate.pt () >= 0.6 && candidate.pt () < 0.7 && candidate.tpcNSigmaKa () > -1.0 && candidate.tpcNSigmaKa () < selectionConfig.nsigmaCutTPCKa ) {
801+ return true ;
802+ }
803+ if (candidate.pt () >= 0.7 && candidate.pt () < 0.8 && candidate.tpcNSigmaKa () > -0.5 && candidate.tpcNSigmaKa () < selectionConfig.nsigmaCutTPCKa ) {
804+ return true ;
805+ }
806+ if (candidate.pt () >= 0.8 && candidate.pt () < 1.0 && candidate.tpcNSigmaKa () > 0.0 && candidate.tpcNSigmaKa () < selectionConfig.nsigmaCutTPCKa ) {
807+ return true ;
808+ }
809+ if (candidate.pt () >= 1.0 && candidate.pt () < 2.0 && candidate.tpcNSigmaKa () > -selectionConfig.nsigmaCutTPCKa && candidate.tpcNSigmaKa () < 0.0 ) {
810+ return true ;
811+ }
812+ if (candidate.pt () >= 2.0 && candidate.pt () < 4.0 && candidate.tpcNSigmaKa () > -selectionConfig.nsigmaCutTPCKa && candidate.tpcNSigmaKa () < 1.0 ) {
813+ return true ;
814+ }
815+ if (candidate.pt () >= 4.0 && candidate.tpcNSigmaKa () > -selectionConfig.nsigmaCutTPCKa && candidate.tpcNSigmaKa () < 1.5 ) {
816+ return true ;
817+ }
787818 }
788- if (candidate.pt () >= selectionConfig.lowPtCutPID && std::abs (candidate.tpcNSigmaKa ()) < selectionConfig.nsigmaCutTPCKa && !candidate.hasTOF ()) {
789- return true ;
819+ if (candidate.pt () >= selectionConfig.lowPtCutPID && candidate.hasTOF ()) {
820+ if (candidate.pt () < 2.0 && std::abs (candidate.tpcNSigmaKa ()) < selectionConfig.nsigmaCutTPCKa && (candidate.tofNSigmaKa () * candidate.tofNSigmaKa () + candidate.tpcNSigmaKa () * candidate.tpcNSigmaKa ()) < (2.5 * 2.5 )) {
821+ return true ;
822+ }
823+ if (candidate.pt () >= 2.0 && std::abs (candidate.tpcNSigmaKa ()) < selectionConfig.nsigmaCutTPCKa && (candidate.tofNSigmaKa () * candidate.tofNSigmaKa () + candidate.tpcNSigmaKa () * candidate.tpcNSigmaKa ()) < (selectionConfig.nsigmaCutCombinedKa * selectionConfig.nsigmaCutCombinedKa )) {
824+ return true ;
825+ }
790826 }
791827 }
792- /* else if (PID == PIDParticle::kProton) { // for proton
793- if (candidate.pt() < selectionConfig.lowPtCutPID && std::abs(candidate.tpcNSigmaPr()) < selectionConfig.nsigmaCutTPCPr) {
794- return true;
795- }
796- if (candidate.pt() >= selectionConfig.lowPtCutPID && std::abs(candidate.tpcNSigmaPr()) < selectionConfig.nsigmaCutTPCPr && candidate.hasTOF() && std::abs(candidate.tofNSigmaPr()) < selectionConfig.nsigmaCutTOFPr) {
797- return true;
798- }
799- if (candidate.pt() >= selectionConfig.lowPtCutPID && std::abs(candidate.tpcNSigmaPr()) < selectionConfig.nsigmaCutTPCPr && !candidate.hasTOF()) {
800- return true;
801- }
802- } */
803-
804828 return false ;
805829 }
806830
@@ -1062,9 +1086,9 @@ struct Kstarqa {
10621086 if (!applypTdepPID && !selectionPID (track2, 0 )) // Track 2 is checked with Pion
10631087 continue ;
10641088
1065- if (applypTdepPID && !selectionPIDNew (track1, 1 )) // Track 1 is checked with Kaon
1089+ if (applypTdepPID && !selectionPIDPtDep (track1, 1 )) // Track 1 is checked with Kaon
10661090 continue ;
1067- if (applypTdepPID && !selectionPIDNew (track2, 0 )) // Track 2 is checked with Pion
1091+ if (applypTdepPID && !selectionPIDPtDep (track2, 0 )) // Track 2 is checked with Pion
10681092 continue ;
10691093
10701094 rEventSelection.fill (HIST (" tracksCheckData" ), 2.5 );
@@ -1407,9 +1431,9 @@ struct Kstarqa {
14071431 continue ;
14081432 rEventSelection.fill (HIST (" tracksCheckData" ), 2.5 );
14091433
1410- if (applypTdepPID && !selectionPIDNew (track1, 1 )) // Track 1 is checked with Kaon
1434+ if (applypTdepPID && !selectionPIDPtDep (track1, 1 )) // Track 1 is checked with Kaon
14111435 continue ;
1412- if (applypTdepPID && !selectionPIDNew (track2, 0 )) // Track 2 is checked with Pion
1436+ if (applypTdepPID && !selectionPIDPtDep (track2, 0 )) // Track 2 is checked with Pion
14131437 continue ;
14141438 rEventSelection.fill (HIST (" tracksCheckData" ), 3.5 );
14151439
@@ -1969,7 +1993,7 @@ struct Kstarqa {
19691993 if (selectionConfig.isPDGCheckMC && (track1PDG == PDG_t::kPiPlus )) {
19701994 if (!applypTdepPID && !(selectionPID (track1, 0 ) && selectionPID (track2, 1 ))) { // pion and kaon
19711995 continue ;
1972- } else if (applypTdepPID && !(selectionPIDNew (track1, 0 ) && selectionPIDNew (track2, 1 ))) { // pion and kaon
1996+ } else if (applypTdepPID && !(selectionPIDPtDep (track1, 0 ) && selectionPIDPtDep (track2, 1 ))) { // pion and kaon
19731997 continue ;
19741998 }
19751999 rEventSelection.fill (HIST (" recMCparticles" ), 12.5 );
@@ -2002,7 +2026,7 @@ struct Kstarqa {
20022026 } else if (selectionConfig.isPDGCheckMC && (track1PDG == PDG_t::kKPlus )) {
20032027 if (!applypTdepPID && !(selectionPID (track1, 1 ) && selectionPID (track2, 0 ))) { // kaon and pion
20042028 continue ;
2005- } else if (applypTdepPID && !(selectionPIDNew (track1, 1 ) && selectionPIDNew (track2, 0 ))) { // kaon and pion
2029+ } else if (applypTdepPID && !(selectionPIDPtDep (track1, 1 ) && selectionPIDPtDep (track2, 0 ))) { // kaon and pion
20062030 continue ;
20072031 }
20082032 rEventSelection.fill (HIST (" recMCparticles" ), 12.5 );
@@ -2222,7 +2246,7 @@ struct Kstarqa {
22222246
22232247 if (!applypTdepPID && !(selectionPID (track1, 1 ) && selectionPID (track2, 0 ))) {
22242248 continue ;
2225- } else if (applypTdepPID && !(selectionPIDNew (track1, 1 ) && selectionPIDNew (track2, 0 ))) {
2249+ } else if (applypTdepPID && !(selectionPIDPtDep (track1, 1 ) && selectionPIDPtDep (track2, 0 ))) {
22262250 continue ;
22272251 }
22282252 rEventSelection.fill (HIST (" recMCparticles" ), 11.5 );
@@ -2375,9 +2399,9 @@ struct Kstarqa {
23752399 if (!applypTdepPID && !selectionPID (track2, 1 )) // Track 2 is checked with kaon
23762400 continue ;
23772401
2378- if (applypTdepPID && !selectionPIDNew (track1, 1 )) // Track 1 is checked with Kaon
2402+ if (applypTdepPID && !selectionPIDPtDep (track1, 1 )) // Track 1 is checked with Kaon
23792403 continue ;
2380- if (applypTdepPID && !selectionPIDNew (track2, 1 )) // Track 2 is checked with kaon
2404+ if (applypTdepPID && !selectionPIDPtDep (track2, 1 )) // Track 2 is checked with kaon
23812405 continue ;
23822406
23832407 rEventSelection.fill (HIST (" tracksCheckData" ), 2.5 );
@@ -2797,7 +2821,7 @@ struct Kstarqa {
27972821
27982822 if (!applypTdepPID && !(selectionPID (track1, 1 ) && selectionPID (track2, 1 ))) { // kaon and kaon
27992823 continue ;
2800- } else if (applypTdepPID && !(selectionPIDNew (track1, 1 ) && selectionPIDNew (track2, 1 ))) { // kaon and kaon
2824+ } else if (applypTdepPID && !(selectionPIDPtDep (track1, 1 ) && selectionPIDPtDep (track2, 1 ))) { // kaon and kaon
28012825 continue ;
28022826 }
28032827 rEventSelection.fill (HIST (" recMCparticles" ), 12.5 );
0 commit comments