Skip to content

Commit c9dc7a3

Browse files
committed
added deltaR cut and pT dep PID in ME
1 parent 9eccb04 commit c9dc7a3

File tree

1 file changed

+37
-14
lines changed

1 file changed

+37
-14
lines changed

PWGLF/Tasks/Resonances/kstarqa.cxx

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ struct Kstarqa {
9090
Configurable<bool> checkVzEvSigLoss{"checkVzEvSigLoss", false, "Check Vz event signal loss"};
9191
Configurable<bool> isApplyDeepAngle{"isApplyDeepAngle", false, "Deep Angle cut"};
9292
Configurable<bool> isApplyMCchecksClosure{"isApplyMCchecksClosure", true, "Apply MC checks for closure test"};
93+
Configurable<float> deltaRCut{"deltaRCut", 0.0f, "Apply deltaR cut between two daughters"};
9394

9495
// Configurable<float> cutzvertex{"cutzvertex", 10.0f, "Accepted z-vertex range (cm)"};
9596
Configurable<float> configOccCut{"configOccCut", 1000., "Occupancy cut"};
@@ -617,6 +618,10 @@ struct Kstarqa {
617618
if (selectionConfig.isApplyDeepAngle && angle < selectionConfig.cfgDeepAngle) {
618619
return false;
619620
}
621+
double deltaRvalue = std::sqrt(TVector2::Phi_mpi_pi(candidate1.phi() - candidate2.phi()) * TVector2::Phi_mpi_pi(candidate1.phi() - candidate2.phi()) + (candidate1.eta() - candidate2.eta()) * (candidate1.eta() - candidate2.eta()));
622+
if (deltaRvalue < selectionConfig.deltaRCut) {
623+
return false;
624+
}
620625
return true;
621626
}
622627

@@ -1135,9 +1140,9 @@ struct Kstarqa {
11351140
hPID.fill(HIST("After/hNsigma_TPC_TOF_Pi_after"), track2.tpcNSigmaPi(), track2.tofNSigmaPi(), track2.pt());
11361141
}
11371142

1138-
// if (!selectionPair(track1, track2)) {
1139-
// continue;
1140-
// }
1143+
if (!selectionPair(track1, track2)) {
1144+
continue;
1145+
}
11411146
rEventSelection.fill(HIST("tracksCheckData"), 6.5);
11421147

11431148
daughter1 = ROOT::Math::PxPyPzMVector(track1.px(), track1.py(), track1.pz(), massKa);
@@ -1214,7 +1219,16 @@ struct Kstarqa {
12141219
o2::soa::CombinationsFullIndexPolicy(tracks1, tracks2))) {
12151220
if (!selectionTrack(t1) || !selectionTrack(t2))
12161221
continue;
1217-
if (!selectionPID(t1, 1) || !selectionPID(t2, 0))
1222+
// if (!selectionPID(t1, 1) || !selectionPID(t2, 0))
1223+
// continue;
1224+
if (!applypTdepPID && !selectionPID(t1, 1)) // Track 1 is checked with Kaon
1225+
continue;
1226+
if (!applypTdepPID && !selectionPID(t2, 0)) // Track 2 is checked with Pion
1227+
continue;
1228+
1229+
if (applypTdepPID && !selectionPIDPtDep(t1, 1)) // Track 1 is checked with Kaon
1230+
continue;
1231+
if (applypTdepPID && !selectionPIDPtDep(t2, 0)) // Track 2 is checked with Pion
12181232
continue;
12191233

12201234
if (std::abs(t1.rapidity(o2::track::PID::getMass(o2::track::PID::Kaon))) > selectionConfig.ctrackRapidity)
@@ -1239,9 +1253,9 @@ struct Kstarqa {
12391253
continue;
12401254
} */
12411255

1242-
// if (!selectionPair(t1, t2)) {
1243-
// continue;
1244-
// }
1256+
if (!selectionPair(t1, t2)) {
1257+
continue;
1258+
}
12451259

12461260
daughter1 = ROOT::Math::PxPyPzMVector(t1.px(), t1.py(), t1.pz(), massKa);
12471261
daughter2 = ROOT::Math::PxPyPzMVector(t2.px(), t2.py(), t2.pz(), massPi);
@@ -1288,7 +1302,16 @@ struct Kstarqa {
12881302
for (const auto& [t1, t2] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(tracks1, tracks2))) {
12891303
if (!selectionTrack(t1) || !selectionTrack(t2))
12901304
continue;
1291-
if (!selectionPID(t1, 1) || !selectionPID(t2, 0))
1305+
// if (!selectionPID(t1, 1) || !selectionPID(t2, 0))
1306+
// continue;
1307+
if (!applypTdepPID && !selectionPID(t1, 1)) // Track 1 is checked with Kaon
1308+
continue;
1309+
if (!applypTdepPID && !selectionPID(t2, 0)) // Track 2 is checked with Pion
1310+
continue;
1311+
1312+
if (applypTdepPID && !selectionPIDPtDep(t1, 1)) // Track 1 is checked with Kaon
1313+
continue;
1314+
if (applypTdepPID && !selectionPIDPtDep(t2, 0)) // Track 2 is checked with Pion
12921315
continue;
12931316

12941317
/* if (selectionConfig.isApplyParticleMID) {
@@ -2071,9 +2094,9 @@ struct Kstarqa {
20712094
}
20722095
rEventSelection.fill(HIST("recMCparticles"), 15.5);
20732096

2074-
// if (!selectionPair(track1, track2)) {
2075-
// continue;
2076-
// }
2097+
if (!selectionPair(track1, track2)) {
2098+
continue;
2099+
}
20772100
rEventSelection.fill(HIST("recMCparticles"), 16.5);
20782101

20792102
oldindex = mothertrack1.globalIndex();
@@ -2284,9 +2307,9 @@ struct Kstarqa {
22842307
}
22852308
rEventSelection.fill(HIST("recMCparticles"), 14.5);
22862309

2287-
// if (!selectionPair(track1, track2)) {
2288-
// continue;
2289-
// }
2310+
if (!selectionPair(track1, track2)) {
2311+
continue;
2312+
}
22902313
rEventSelection.fill(HIST("recMCparticles"), 15.5);
22912314

22922315
oldindex = mothertrack1.globalIndex();

0 commit comments

Comments
 (0)