Skip to content

Commit 48424b0

Browse files
committed
rename variables to common style, use RecoDecay::distance()
1 parent 030fdbd commit 48424b0

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

PWGHF/Core/SelectorCuts.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ namespace hf_cuts_lc_to_p_k_pi
465465
{
466466
static constexpr int NBinsPt = 10;
467467
static constexpr int NCutVars = 11;
468-
static constexpr int NKfCutVars = 12;
468+
static constexpr int NCutKfVars = 12;
469469
// default values for the pT bin edges (can be used to configure histogram axis)
470470
// offset by 1 from the bin numbers in cuts array
471471
constexpr double BinsPt[NBinsPt + 1] = {
@@ -496,7 +496,7 @@ constexpr double Cuts[NBinsPt][NCutVars] = {{0.4, 0.4, 0.4, 0.4, 0., 0.005, 0.,
496496

497497
// default value for the cuts Chi2Prim Chi2Geo DCA, cm Chi2Geo Chi2Topo
498498
// P K Pi KPi PPi PK KPi PPi PK ↓ LdL ↓
499-
constexpr double kfCuts[NBinsPt][NKfCutVars] = {{3., 3., 3., 3., 3., 3., 0.01, 0.01, 0.01, 3., 5., 5.}, /* 0 < pT < 1 */
499+
constexpr double CutsKf[NBinsPt][NCutKfVars] = {{3., 3., 3., 3., 3., 3., 0.01, 0.01, 0.01, 3., 5., 5.}, /* 0 < pT < 1 */
500500
{3., 3., 3., 3., 3., 3., 0.01, 0.01, 0.01, 3., 5., 5.}, /* 1 < pT < 2 */
501501
{3., 3., 3., 3., 3., 3., 0.01, 0.01, 0.01, 3., 5., 5.}, /* 2 < pT < 3 */
502502
{3., 3., 3., 3., 3., 3., 0.01, 0.01, 0.01, 3., 5., 5.}, /* 3 < pT < 4 */
@@ -522,7 +522,7 @@ static const std::vector<std::string> labelsPt = {
522522

523523
// column labels
524524
static const std::vector<std::string> labelsCutVar = {"m", "pT p", "pT K", "pT Pi", "Chi2PCA", "decay length", "cos pointing angle", "decLengthXY", "normDecLXY", "impParXY", "mass (Kpi)"};
525-
static const std::vector<std::string> labelsKfCutVar = {"kfChi2PrimPr", "kfChi2PrimKa", "kfChi2PrimPi", "kfChi2GeoKaPi", "kfChi2GeoPrPi", "kfChi2GeoPrKa", "kfDcaKaPi", "kfDcaPrPi", "kfDcaPrKa", "kfChi2Geo", "kfLdL", "kfChi2Topo"};
525+
static const std::vector<std::string> labelsCutKfVar = {"kfChi2PrimPr", "kfChi2PrimKa", "kfChi2PrimPi", "kfChi2GeoKaPi", "kfChi2GeoPrPi", "kfChi2GeoPrKa", "kfDcaKaPi", "kfDcaPrPi", "kfDcaPrKa", "kfChi2Geo", "kfLdL", "kfChi2Topo"};
526526
} // namespace hf_cuts_lc_to_p_k_pi
527527

528528
namespace hf_cuts_lc_to_k0s_p

PWGHF/TableProducer/candidateSelectorLc.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ struct HfCandidateSelectorLc {
7373
// topological cuts
7474
Configurable<std::vector<double>> binsPt{"binsPt", std::vector<double>{hf_cuts_lc_to_p_k_pi::vecBinsPt}, "pT bin limits"};
7575
Configurable<LabeledArray<double>> cuts{"cuts", {hf_cuts_lc_to_p_k_pi::Cuts[0], hf_cuts_lc_to_p_k_pi::NBinsPt, hf_cuts_lc_to_p_k_pi::NCutVars, hf_cuts_lc_to_p_k_pi::labelsPt, hf_cuts_lc_to_p_k_pi::labelsCutVar}, "Lc candidate selection per pT bin"};
76-
Configurable<LabeledArray<double>> kfCuts{"kfCuts", {hf_cuts_lc_to_p_k_pi::kfCuts[0], hf_cuts_lc_to_p_k_pi::NBinsPt, hf_cuts_lc_to_p_k_pi::NKfCutVars, hf_cuts_lc_to_p_k_pi::labelsPt, hf_cuts_lc_to_p_k_pi::labelsKfCutVar}, "Lc candidate selection per pT bin with KF-associated variables"};
76+
Configurable<LabeledArray<double>> kfCuts{"kfCuts", {hf_cuts_lc_to_p_k_pi::CutsKf[0], hf_cuts_lc_to_p_k_pi::NBinsPt, hf_cuts_lc_to_p_k_pi::NCutKfVars, hf_cuts_lc_to_p_k_pi::labelsPt, hf_cuts_lc_to_p_k_pi::labelsCutKfVar}, "Lc candidate selection per pT bin with KF-associated variables"};
7777
Configurable<bool> applyNonKfCuts{"applyNonKfCuts", true, "Whether to apply non-KF cuts when running in KF mode. In DCAFitter mode this field is not effective"};
7878
Configurable<bool> applyKfCuts{"applyKfCuts", true, "Whether to apply KF cuts when running in KF mode. In DCAFitter mode this field is not effective"};
7979
// QA switch

PWGHF/TableProducer/treeCreatorLcToPKPi.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ struct HfTreeCreatorLcToPKPi {
699699
svX = mcParticleProng0.vx();
700700
svY = mcParticleProng0.vy();
701701
svZ = mcParticleProng0.vz();
702-
l = std::sqrt((svX - pvX) * (svX - pvX) + (svY - pvY) * (svY - pvY) + (svZ - pvZ) * (svZ - pvZ));
702+
l = RecoDecay::distance(std::vector<float>{svX, svY, svZ}, std::vector<float>{pvX, pvY, pvZ});
703703
t = mcParticleProng0.vt() * NanoToPico / gamma; // from ns to ps * from lab time to proper time
704704
}
705705
rowCandidateMC(
@@ -729,7 +729,7 @@ struct HfTreeCreatorLcToPKPi {
729729
const float svX = mcDaughter0.vx();
730730
const float svY = mcDaughter0.vy();
731731
const float svZ = mcDaughter0.vz();
732-
const float l = std::sqrt((svX - pvX) * (svX - pvX) + (svY - pvY) * (svY - pvY) + (svZ - pvZ) * (svZ - pvZ));
732+
const float l = RecoDecay::distance(std::vector<float>{svX, svY, svZ}, std::vector<float>{pvX, pvY, pvZ});
733733
const float t = mcDaughter0.vt() * NanoToPico / gamma; // from ns to ps * from lab time to proper time
734734
rowCandidateFullParticles(
735735
particle.pt(),

0 commit comments

Comments
 (0)