Skip to content

Commit a5323d4

Browse files
committed
Separate flag for prong min pt cut
1 parent 262986f commit a5323d4

2 files changed

Lines changed: 12 additions & 24 deletions

File tree

PWGHF/Core/SelectorCuts.h

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ static const std::vector<std::string> labelsCutVar = {"massMin", "massMax", "cos
232232
namespace hf_cuts_presel_3prong
233233
{
234234
static constexpr int NBinsPt = 2;
235-
static constexpr int NCutVars = 4;
235+
static constexpr int NCutVars = 5;
236236
// default values for the pT bin edges (can be used to configure histogram axis)
237237
// common for any 3-prong candidate
238238
// offset by 1 from the bin numbers in cuts array
@@ -243,31 +243,21 @@ constexpr double BinsPt[NBinsPt + 1] = {
243243
const auto vecBinsPt = std::vector<double>{BinsPt, BinsPt + NBinsPt + 1};
244244

245245
// default values for the cuts
246-
constexpr double Cuts[NBinsPt][NCutVars] = {{1.75, 2.05, 0.7, 0.02}, /* 1 < pt < 5 */
247-
{1.75, 2.05, 0.5, 0.02}}; /* 5 < pt < 1000 */
246+
constexpr double Cuts[NBinsPt][NCutVars] = {{1.75, 2.05, 0.7, 0.02, 0.3}, /* 1 < pt < 5 */
247+
{1.75, 2.05, 0.5, 0.02, 0.3}}; /* 5 < pt < 1000 */
248248

249249
// row labels
250250
static const std::vector<std::string> labelsPt{};
251251

252252
// column labels
253-
static const std::vector<std::string> labelsCutVar = {"massMin", "massMax", "cosp", "decL"};
254-
255-
// Single prong min pt selection
256-
static constexpr int NSpecies = 8; // number of species for 3-prong candidates
257-
constexpr float PtProngMin[NSpecies][1] = {{0.4f}, {0.4f}, {0.4f}, {0.4f}, {0.4f}, {0.4f}, {0.4f}, {0.4f}};
258-
259-
// 3-prong species labels
260-
static const std::vector<std::string> labelsSpecies = {"Dplus", "Lc", "Ds", "Xic", "Cd", "Ct", "Ch", "Ca"};
261-
262-
// column label
263-
static const std::vector<std::string> labelsPtProngMin = {"Minimum pT (GeV/c)"};
253+
static const std::vector<std::string> labelsCutVar = {"massMin", "massMax", "cosp", "decL", "ptProngMin"};
264254

265255
} // namespace hf_cuts_presel_3prong
266256

267257
namespace hf_cuts_presel_ds
268258
{
269259
static constexpr int NBinsPt = 2;
270-
static constexpr int NCutVars = 5;
260+
static constexpr int NCutVars = 6;
271261
// default values for the pT bin edges (can be used to configure histogram axis)
272262
// offset by 1 from the bin numbers in cuts array
273263
constexpr double BinsPt[NBinsPt + 1] = {
@@ -277,14 +267,14 @@ constexpr double BinsPt[NBinsPt + 1] = {
277267
const auto vecBinsPt = std::vector<double>{BinsPt, BinsPt + NBinsPt + 1};
278268

279269
// default values for the cuts
280-
constexpr double Cuts[NBinsPt][NCutVars] = {{1.70, 2.15, 0.7, 0.02, 0.02}, /* 1 < pt < 5 */
281-
{1.70, 2.15, 0.5, 0.02, 0.02}}; /* 5 < pt < 1000 */
270+
constexpr double Cuts[NBinsPt][NCutVars] = {{1.70, 2.15, 0.7, 0.02, 0.3, 0.02}, /* 1 < pt < 5 */
271+
{1.70, 2.15, 0.5, 0.02, 0.3, 0.02}}; /* 5 < pt < 1000 */
282272

283273
// row labels
284274
static const std::vector<std::string> labelsPt{};
285275

286276
// column labels
287-
static const std::vector<std::string> labelsCutVar = {"massMin", "massMax", "cosp", "decL", "deltaMassKK"};
277+
static const std::vector<std::string> labelsCutVar = {"massMin", "massMax", "cosp", "decL", "ptProngMin", "deltaMassKK"};
288278
} // namespace hf_cuts_presel_ds
289279

290280
namespace hf_cuts_presel_dstar

PWGHF/TableProducer/trackIndexSkimCreator.cxx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,9 +1456,6 @@ struct HfTrackIndexSkimCreator {
14561456
Configurable<std::vector<double>> binsPtDstarToD0Pi{"binsPtDstarToD0Pi", std::vector<double>{hf_cuts_presel_dstar::vecBinsPt}, "pT bin limits for D*+->D0pi pT-dependent cuts"};
14571457
Configurable<LabeledArray<double>> cutsDstarToD0Pi{"cutsDstarToD0Pi", {hf_cuts_presel_dstar::Cuts[0], hf_cuts_presel_dstar::NBinsPt, hf_cuts_presel_dstar::NCutVars, hf_cuts_presel_dstar::labelsPt, hf_cuts_presel_dstar::labelsCutVar}, "D*+->D0pi selections per pT bin"};
14581458

1459-
// Species-differential track min pT selection for 3-prong candidates
1460-
Configurable<LabeledArray<float>> ptProngMin3Prong{"ptProngMin3Prong", {hf_cuts_presel_3prong::PtProngMin[0], hf_cuts_presel_3prong::NSpecies, 1, hf_cuts_presel_3prong::labelsSpecies, hf_cuts_presel_3prong::labelsPtProngMin}, "Min pT selection for prongs of 3-prong candidates in GeV/c"};
1461-
14621459
// proton PID selections for Lc and Xic
14631460
Configurable<bool> applyProtonPidForLcToPKPi{"applyProtonPidForLcToPKPi", false, "Apply proton PID for Lc->pKpi"};
14641461
Configurable<bool> applyProtonPidForXicToPKPi{"applyProtonPidForXicToPKPi", false, "Apply proton PID for Xic->pKpi"};
@@ -1823,7 +1820,7 @@ struct HfTrackIndexSkimCreator {
18231820
template <typename T1, typename T2, typename T3>
18241821
void applyPreselectionPhiDecay(const int binPt, T1 const& pVecTrack0, T1 const& pVecTrack1, T1 const& pVecTrack2, T2& cutStatus, T3& whichHypo, auto& isSelected)
18251822
{
1826-
const double deltaMassMax = cut3Prong[hf_cand_3prong::DecayType::DsToKKPi].get(binPt, 4u);
1823+
const double deltaMassMax = cut3Prong[hf_cand_3prong::DecayType::DsToKKPi].get(binPt, 5u);
18271824
if (TESTBIT(whichHypo[hf_cand_3prong::DecayType::DsToKKPi], 0)) {
18281825
const double mass2PhiKKPi = RecoDecay::m2(std::array{pVecTrack0, pVecTrack1}, std::array{arrMass3Prong[hf_cand_3prong::DecayType::DsToKKPi][0][0], arrMass3Prong[hf_cand_3prong::DecayType::DsToKKPi][0][1]});
18291826
if (mass2PhiKKPi > (MassPhi + deltaMassMax) * (MassPhi + deltaMassMax) || mass2PhiKKPi < (MassPhi - deltaMassMax) * (MassPhi - deltaMassMax)) {
@@ -1839,7 +1836,7 @@ struct HfTrackIndexSkimCreator {
18391836
if (whichHypo[hf_cand_3prong::DecayType::DsToKKPi] == 0) {
18401837
CLRBIT(isSelected, hf_cand_3prong::DecayType::DsToKKPi);
18411838
if (config.debug) {
1842-
cutStatus[hf_cand_3prong::DecayType::DsToKKPi][4] = false;
1839+
cutStatus[hf_cand_3prong::DecayType::DsToKKPi][5] = false;
18431840
}
18441841
}
18451842
}
@@ -1874,6 +1871,7 @@ struct HfTrackIndexSkimCreator {
18741871
if (whichHypo[iDecay3P] == 0) {
18751872
CLRBIT(isSelected, iDecay3P);
18761873
if (config.debug) {
1874+
LOG(info) << "Candidate rejected by PID for decay " << iDecay3P << ", setting " << hf_cuts_presel_3prong::NCutVars << "th bit of cutStatus to false";
18771875
cutStatus[iDecay3P][hf_cuts_presel_3prong::NCutVars] = false; // PID
18781876
}
18791877
continue; // no need to check further for this particle hypothesis
@@ -2044,7 +2042,7 @@ struct HfTrackIndexSkimCreator {
20442042

20452043
// prong daughter pT
20462044
if (config.debug || TESTBIT(isSelected, iDecay3P)) {
2047-
const auto ptProngMin = config.ptProngMin3Prong->get(iDecay3P);
2045+
const auto ptProngMin = cut3Prong[iDecay3P].get(binPt, 4u); // 4u == ptProngMinIndex[iDecay3P]
20482046
if (ptProngs[0] < ptProngMin || ptProngs[1] < ptProngMin || ptProngs[2] < ptProngMin) {
20492047
CLRBIT(isSelected, iDecay3P);
20502048
if (config.debug) {

0 commit comments

Comments
 (0)