Skip to content

Commit 17131ce

Browse files
authored
[PWGLF] Added V0 daughter selection in derived data (#12831)
1 parent 24310e6 commit 17131ce

File tree

1 file changed

+54
-72
lines changed

1 file changed

+54
-72
lines changed

PWGLF/Tasks/Resonances/higherMassResonances.cxx

Lines changed: 54 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ struct HigherMassResonances {
120120
Configurable<float> confV0DCADaughMax{"confV0DCADaughMax", 1.0f, "DCA b/w V0 daughters"};
121121
Configurable<float> v0settingDcapostopv{"v0settingDcapostopv", 0.06, "DCA Pos To PV"};
122122
Configurable<float> v0settingDcanegtopv{"v0settingDcanegtopv", 0.06, "DCA Neg To PV"};
123-
Configurable<double> cMaxV0DCA{"cMaxV0DCA", 0.3, "DCA V0 to PV"};
123+
Configurable<double> cMaxV0DCA{"cMaxV0DCA", 0.5, "DCA V0 to PV"};
124124
Configurable<float> confV0PtMin{"confV0PtMin", 0.f, "Minimum transverse momentum of V0"};
125125
Configurable<float> confV0CPAMin{"confV0CPAMin", 0.97f, "Minimum CPA of V0"};
126126
Configurable<float> confV0TranRadV0Min{"confV0TranRadV0Min", 0.5f, "Minimum transverse radius"};
@@ -581,6 +581,52 @@ struct HigherMassResonances {
581581
return true;
582582
}
583583

584+
using EventCandidatesDerivedData = soa::Join<aod::StraCollisions, aod::StraCents, aod::StraEvSels, aod::StraStamps>;
585+
using V0CandidatesDerivedData = soa::Join<aod::V0CollRefs, aod::V0Cores, aod::V0Extras>;
586+
using DauTracks = soa::Join<aod::DauTrackExtras, aod::DauTrackTPCPIDs>;
587+
588+
template <typename TV0>
589+
bool isSelectedK0sDaughtersDerived(TV0 const& v0)
590+
{
591+
// Fpr derived dataset
592+
593+
// de-ref track extras
594+
auto posTrackExtra = v0.template posTrackExtra_as<DauTracks>();
595+
auto negTrackExtra = v0.template negTrackExtra_as<DauTracks>();
596+
597+
if (std::abs(v0.positiveeta()) > config.confDaughEta || std::abs(v0.negativeeta()) > config.confDaughEta) {
598+
return false;
599+
}
600+
601+
if (posTrackExtra.tpcNClsCrossedRows() < config.tpcCrossedrows || negTrackExtra.tpcNClsCrossedRows() < config.tpcCrossedrows) {
602+
return false;
603+
}
604+
605+
if (posTrackExtra.tpcNClsFound() < config.confDaughTPCnclsMin || negTrackExtra.tpcNClsFound() < config.confDaughTPCnclsMin) {
606+
return false;
607+
}
608+
if (posTrackExtra.tpcCrossedRowsOverFindableCls() < config.tpcCrossedrowsOverfcls || negTrackExtra.tpcCrossedRowsOverFindableCls() < config.tpcCrossedrowsOverfcls) {
609+
return false;
610+
}
611+
612+
// check TPC PID
613+
if (((std::abs(posTrackExtra.tpcNSigmaPi()) > config.confDaughPIDCutTPC) || (std::abs(negTrackExtra.tpcNSigmaPi()) > config.confDaughPIDCutTPC))) {
614+
return false;
615+
}
616+
617+
if (config.isApplyDCAv0topv && (std::abs(v0.dcapostopv()) < config.cMaxV0DCA || std::abs(v0.dcanegtopv()) < config.cMaxV0DCA)) {
618+
return false;
619+
}
620+
621+
// rKzeroShort.fill(HIST("negative_pt"), negTrackExtra.pt());
622+
// rKzeroShort.fill(HIST("positive_pt"), posTrackExtra.pt());
623+
// rKzeroShort.fill(HIST("negative_eta"), negTrackExtra.eta());
624+
// rKzeroShort.fill(HIST("positive_eta"), posTrackExtra.eta());
625+
// rKzeroShort.fill(HIST("negative_phi"), negTrackExtra.phi());
626+
// rKzeroShort.fill(HIST("positive_phi"), posTrackExtra.phi());
627+
return true;
628+
}
629+
584630
// Angular separation cut on KsKs pairs
585631
template <typename T1, typename T2>
586632
bool applyAngSep(const T1& candidate1, const T2& candidate2)
@@ -887,14 +933,6 @@ struct HigherMassResonances {
887933
}
888934
PROCESS_SWITCH(HigherMassResonances, processSE, "same event process", true);
889935

890-
// using EventCandidates = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::FT0Mults, aod::FV0Mults, aod::MultZeqs, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::CentFV0As, aod::Mults, aod::PVMults>>;
891-
// using TrackCandidates = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA, aod::pidTPCFullPi, aod::pidTOFFullPi>>;
892-
// using V0TrackCandidate = aod::V0Datas;
893-
894-
using EventCandidatesDerivedData = soa::Join<aod::StraCollisions, aod::StraCents, aod::StraEvSels, aod::StraStamps>;
895-
using V0CandidatesDerivedData = soa::Join<aod::V0CollRefs, aod::V0Cores, aod::V0Extras>;
896-
using DauTracks = soa::Join<aod::DauTrackExtras, aod::DauTrackTPCPIDs>;
897-
898936
ConfigurableAxis axisVertex{"axisVertex", {20, -10, 10}, "vertex axis for ME mixing"};
899937
// ConfigurableAxis axisMultiplicityClass{"axisMultiplicityClass", {10, 0, 100}, "multiplicity percentile for ME mixing"};
900938
ConfigurableAxis axisMultiplicity{"axisMultiplicity", {2000, 0, 10000}, "TPC multiplicity axis for ME mixing"};
@@ -1284,8 +1322,9 @@ struct HigherMassResonances {
12841322
}
12851323
PROCESS_SWITCH(HigherMassResonances, processRec, "Process Reconstructed", false);
12861324

1287-
void processSEderived(EventCandidatesDerivedData::iterator const& collision, V0CandidatesDerivedData const& V0s)
1325+
void processSEderived(EventCandidatesDerivedData::iterator const& collision, V0CandidatesDerivedData const& V0s, DauTracks const&)
12881326
{
1327+
multiplicity = 0.0;
12891328
if (config.cSelectMultEstimator == kFT0M) {
12901329
multiplicity = collision.centFT0M();
12911330
} else if (config.cSelectMultEstimator == kFT0A) {
@@ -1323,50 +1362,18 @@ struct HigherMassResonances {
13231362
continue;
13241363
}
13251364

1326-
// auto postrack1 = v1.template posTrack_as<DauTracks>();
1327-
// auto negtrack1 = v1.template negTrack_as<DauTracks>();
1328-
// auto postrack2 = v2.template posTrack_as<DauTracks>();
1329-
// auto negtrack2 = v2.template negTrack_as<DauTracks>();
1330-
1331-
// double nTPCSigmaPos1{postrack1.tpcNSigmaPi()};
1332-
// double nTPCSigmaNeg1{negtrack1.tpcNSigmaPi()};
1333-
// double nTPCSigmaPos2{postrack2.tpcNSigmaPi()};
1334-
// double nTPCSigmaNeg2{negtrack2.tpcNSigmaPi()};
1335-
1336-
// if (!(isSelectedV0Daughter(negtrack1, -1, nTPCSigmaNeg1, v1) && isSelectedV0Daughter(postrack1, 1, nTPCSigmaPos1, v1))) {
1337-
// continue;
1338-
// }
1339-
// if (!(isSelectedV0Daughter(postrack2, 1, nTPCSigmaPos2, v2) && isSelectedV0Daughter(negtrack2, -1, nTPCSigmaNeg2, v2))) {
1340-
// continue;
1341-
// }
1365+
if (!isSelectedK0sDaughtersDerived(v1) || !isSelectedK0sDaughtersDerived(v2)) {
1366+
continue;
1367+
}
13421368

13431369
if (std::find(v0indexes.begin(), v0indexes.end(), v1.globalIndex()) == v0indexes.end()) {
13441370
v0indexes.push_back(v1.globalIndex());
13451371
}
1346-
// if (!(std::find(v0indexes.begin(), v0indexes.end(), v2.globalIndex()) != v0indexes.end())) {
1347-
// v0indexes.push_back(v2.globalIndex());
1348-
// }
13491372

13501373
if (v2.globalIndex() <= v1.globalIndex()) {
13511374
continue;
13521375
}
13531376

1354-
// if (config.qAv0Daughters) {
1355-
// rKzeroShort.fill(HIST("negative_pt"), negtrack1.pt());
1356-
// rKzeroShort.fill(HIST("positive_pt"), postrack1.pt());
1357-
// rKzeroShort.fill(HIST("negative_eta"), negtrack1.eta());
1358-
// rKzeroShort.fill(HIST("positive_eta"), postrack1.eta());
1359-
// rKzeroShort.fill(HIST("negative_phi"), negtrack1.phi());
1360-
// rKzeroShort.fill(HIST("positive_phi"), postrack1.phi());
1361-
// }
1362-
1363-
// if (postrack1.globalIndex() == postrack2.globalIndex()) {
1364-
// continue;
1365-
// }
1366-
// if (negtrack1.globalIndex() == negtrack2.globalIndex()) {
1367-
// continue;
1368-
// }
1369-
13701377
if (!applyAngSep(v1, v2)) {
13711378
continue;
13721379
}
@@ -1393,7 +1400,7 @@ struct HigherMassResonances {
13931400
}
13941401
PROCESS_SWITCH(HigherMassResonances, processSEderived, "same event process in strangeness derived data", false);
13951402

1396-
void processMEderived(EventCandidatesDerivedData const& collisions, TrackCandidates const& /*tracks*/, V0CandidatesDerivedData const& v0s)
1403+
void processMEderived(EventCandidatesDerivedData const& collisions, TrackCandidates const& /*tracks*/, V0CandidatesDerivedData const& v0s, DauTracks const&)
13971404
{
13981405

13991406
for (const auto& [c1, c2] : selfCombinations(colBinning, config.cfgNmixedEvents, -1, collisions, collisions)) // two different centrality c1 and c2 and tracks corresponding to them
@@ -1419,32 +1426,7 @@ struct HigherMassResonances {
14191426
if (!selectionV0(c2, t2, multiplicity))
14201427
continue;
14211428

1422-
auto postrack1 = t1.template posTrackExtra_as<TrackCandidates>();
1423-
auto negtrack1 = t1.template negTrackExtra_as<TrackCandidates>();
1424-
auto postrack2 = t2.template posTrackExtra_as<TrackCandidates>();
1425-
auto negtrack2 = t2.template negTrackExtra_as<TrackCandidates>();
1426-
1427-
if (postrack1.globalIndex() == postrack2.globalIndex()) {
1428-
continue;
1429-
}
1430-
if (negtrack1.globalIndex() == negtrack2.globalIndex()) {
1431-
continue;
1432-
}
1433-
double nTPCSigmaPos1{postrack1.tpcNSigmaPi()};
1434-
double nTPCSigmaNeg1{negtrack1.tpcNSigmaPi()};
1435-
double nTPCSigmaPos2{postrack2.tpcNSigmaPi()};
1436-
double nTPCSigmaNeg2{negtrack2.tpcNSigmaPi()};
1437-
1438-
if (!isSelectedV0Daughter(postrack1, 1, nTPCSigmaPos1, t1)) {
1439-
continue;
1440-
}
1441-
if (!isSelectedV0Daughter(postrack2, 1, nTPCSigmaPos2, t2)) {
1442-
continue;
1443-
}
1444-
if (!isSelectedV0Daughter(negtrack1, -1, nTPCSigmaNeg1, t1)) {
1445-
continue;
1446-
}
1447-
if (!isSelectedV0Daughter(negtrack2, -1, nTPCSigmaNeg2, t2)) {
1429+
if (!isSelectedK0sDaughtersDerived(t1) || !isSelectedK0sDaughtersDerived(t2)) {
14481430
continue;
14491431
}
14501432

0 commit comments

Comments
 (0)