Skip to content

Commit 40f656f

Browse files
authored
[PWGLF] Add additional systematic uncertainty configuration about k0s competing mass (#18245)
1 parent 095a27c commit 40f656f

3 files changed

Lines changed: 48 additions & 79 deletions

File tree

‎PWGLF/DataModel/LFSpincorrelationTables.h‎

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,6 @@ DECLARE_SOA_COLUMN(ProtonPhi, protonPhi, float); //! Proton Ph
5353
DECLARE_SOA_COLUMN(ProtonIndex, protonIndex, int); //! Proton index
5454
DECLARE_SOA_COLUMN(PionIndex, pionIndex, int); //! Pion index
5555
DECLARE_SOA_COLUMN(DcaV0ToPV, dcaV0ToPV, float); //! DCA of V0 to primary vertex
56-
DECLARE_SOA_COLUMN(TpcPosNClsCrossedRows, tpcPosNClsCrossedRows, float);
57-
DECLARE_SOA_COLUMN(TpcNegNClsCrossedRows, tpcNegNClsCrossedRows, float);
58-
DECLARE_SOA_COLUMN(Ctau, ctau, float);
59-
DECLARE_SOA_COLUMN(TpcNsigmaPos, tpcNsigmaPos, float);
60-
DECLARE_SOA_COLUMN(TpcNsigmaNeg, tpcNsigmaNeg, float);
61-
DECLARE_SOA_COLUMN(MK0Short, mK0Short, float);
6256

6357
} // namespace lambdapair
6458
DECLARE_SOA_TABLE(LambdaPairs, "AOD", "LAMBDAPAIR",
@@ -80,13 +74,7 @@ DECLARE_SOA_TABLE(LambdaPairs, "AOD", "LAMBDAPAIR",
8074
lambdapair::ProtonPhi,
8175
lambdapair::ProtonIndex,
8276
lambdapair::PionIndex,
83-
lambdapair::DcaV0ToPV,
84-
lambdapair::TpcPosNClsCrossedRows,
85-
lambdapair::TpcNegNClsCrossedRows,
86-
lambdapair::Ctau,
87-
lambdapair::TpcNsigmaPos,
88-
lambdapair::TpcNsigmaNeg,
89-
lambdapair::MK0Short);
77+
lambdapair::DcaV0ToPV);
9078

9179
using LambdaPair = LambdaPairs::iterator;
9280

@@ -121,8 +109,6 @@ DECLARE_SOA_COLUMN(ProtonPhimc, protonPhimc, float); //! Proto
121109
DECLARE_SOA_COLUMN(ProtonIndexmc, protonIndexmc, int); //! Proton index in montecarlo
122110
DECLARE_SOA_COLUMN(PionIndexmc, pionIndexmc, int); //! Pion index in montecarlo
123111
DECLARE_SOA_COLUMN(DcaV0ToPVmc, dcaV0ToPVmc, float); //! DCA of V0 to primary vertex
124-
125-
//! TPC n sigma
126112
} // namespace lambdapairmc
127113
DECLARE_SOA_TABLE(LambdaPairmcs, "AOD", "LAMBDAPAIRMC",
128114
o2::soa::Index<>,

‎PWGLF/TableProducer/Strangeness/lambdaspincorrelation.cxx‎

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,21 @@ struct lambdaspincorrelation {
9595
Configurable<double> cMaxV0DCA{"cMaxV0DCA", 1.2, "Maximum V0 DCA to PV"};
9696
Configurable<float> cMinV0DCAPr{"cMinV0DCAPr", 0.05, "Minimum V0 daughters DCA to PV for Pr"};
9797
Configurable<float> cMinV0DCAPi{"cMinV0DCAPi", 0.05, "Minimum V0 daughters DCA to PV for Pi"};
98-
Configurable<float> cMaxV0LifeTime{"cMaxV0LifeTime", 50, "Maximum V0 life time"};
9998

10099
// config for V0 daughters
101100
Configurable<float> confDaughEta{"confDaughEta", 0.8f, "V0 Daugh sel: max eta"};
102101
Configurable<float> cfgDaughPrPt{"cfgDaughPrPt", 0.2, "minimum daughter proton pt"};
103102
Configurable<float> cfgDaughPiPt{"cfgDaughPiPt", 0.2, "minimum daughter pion pt"};
104103
Configurable<float> confDaughTPCnclsMin{"confDaughTPCnclsMin", 50.f, "V0 Daugh sel: Min. nCls TPC"};
105-
Configurable<float> confDaughPIDCuts{"confDaughPIDCuts", 3, "PID selections for Lambda daughters"};
104+
105+
struct : ConfigurableGroup {
106+
std::string prefix = "v0Configuration";
107+
Configurable<int> cfgDaughTPCCrossedRows{"cfgDaughTPCCrossedRows", 70, "Min. TPC crossed rows for V0 daughters"};
108+
109+
Configurable<float> cMaxV0LifeTime{"cMaxV0LifeTime", 30, "Maximum V0 life time"};
110+
Configurable<float> confDaughPIDCuts{"confDaughPIDCuts", 4, "PID selections for Lambda daughters"};
111+
112+
} v0Configurations;
106113

107114
Configurable<int> iMNbins{"iMNbins", 50, "Number of bins in invariant mass"};
108115
Configurable<float> lbinIM{"lbinIM", 1.09, "lower bin value in IM histograms"};
@@ -149,9 +156,10 @@ struct lambdaspincorrelation {
149156
if (tranRad > confV0TranRadV0Max) {
150157
return false;
151158
}
152-
if (std::abs(ctauLambda) > cMaxV0LifeTime) {
159+
if (std::abs(ctauLambda) > v0Configurations.cMaxV0LifeTime) {
153160
return false;
154161
}
162+
155163
// if (std::abs(candidate.yLambda()) > confV0Rap) {
156164
// return false;
157165
// }
@@ -162,10 +170,9 @@ struct lambdaspincorrelation {
162170
bool isSelectedV0Daughter(V0 const& candidate, T const& track, int pid)
163171
{
164172
const auto tpcNClsF = track.tpcNClsFound();
165-
const auto ncr = 70;
166173
const auto ncrfc = 0.8;
167174

168-
if (track.tpcNClsCrossedRows() < ncr) {
175+
if (track.tpcNClsCrossedRows() < v0Configurations.cfgDaughTPCCrossedRows) {
169176
return false;
170177
}
171178
if (tpcNClsF < confDaughTPCnclsMin) {
@@ -175,10 +182,10 @@ struct lambdaspincorrelation {
175182
return false;
176183
}
177184

178-
if (pid == 0 && std::abs(track.tpcNSigmaPr()) > confDaughPIDCuts) {
185+
if (pid == 0 && std::abs(track.tpcNSigmaPr()) > v0Configurations.confDaughPIDCuts) {
179186
return false;
180187
}
181-
if (pid == 1 && std::abs(track.tpcNSigmaPi()) > confDaughPIDCuts) {
188+
if (pid == 1 && std::abs(track.tpcNSigmaPi()) > v0Configurations.confDaughPIDCuts) {
182189
return false;
183190
}
184191
if (pid == 0 && (candidate.positivept() < cfgDaughPrPt || candidate.negativept() < cfgDaughPiPt)) {
@@ -299,13 +306,6 @@ struct lambdaspincorrelation {
299306
std::vector<int> negativeIndex = {};
300307
std::vector<float> dcaBetweenDaughter = {};
301308
std::vector<float> dcaV0ToPV = {};
302-
std::vector<float> tpcPosNClsCrossedRows = {};
303-
std::vector<float> tpcNegNClsCrossedRows = {};
304-
std::vector<float> ctau = {};
305-
std::vector<float> tpcNsigmaPos = {};
306-
std::vector<float> tpcNsigmaNeg = {};
307-
std::vector<float> mK0Short = {};
308-
309309
int numbV0 = 0;
310310
// LOGF(info, "event collisions: (%d)", collision.index());
311311
auto centrality = collision.centFT0C();
@@ -357,26 +357,13 @@ struct lambdaspincorrelation {
357357
if (aLambdaTag) {
358358
histos.fill(HIST("hV0Info"), 3.5);
359359
}
360-
361-
float ctauLambda = v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * (o2::constants::physics::MassLambda);
362-
363360
// LOGF(info, "v0 index2: (%d)", v0.index());
364361
auto postrack1 = v0.template posTrack_as<AllTrackCandidates>();
365362
auto negtrack1 = v0.template negTrack_as<AllTrackCandidates>();
366363
positiveIndex.push_back(postrack1.globalIndex());
367364
negativeIndex.push_back(negtrack1.globalIndex());
368365
v0Cospa.push_back(v0.v0cosPA());
369366
dcaV0ToPV.push_back(std::abs(v0.dcav0topv()));
370-
371-
tpcPosNClsCrossedRows.push_back(postrack1.tpcNClsCrossedRows());
372-
tpcNegNClsCrossedRows.push_back(negtrack1.tpcNClsCrossedRows());
373-
ctau.push_back(ctauLambda);
374-
375-
tpcNsigmaPos.push_back(std::abs(postrack1.tpcNSigmaPr()));
376-
tpcNsigmaNeg.push_back(std::abs(negtrack1.tpcNSigmaPi()));
377-
378-
mK0Short.push_back(v0.mK0Short());
379-
380367
v0Radius.push_back(v0.v0radius());
381368
dcaPositive.push_back(std::abs(v0.dcapostopv()));
382369
dcaNegative.push_back(std::abs(v0.dcanegtopv()));
@@ -413,7 +400,7 @@ struct lambdaspincorrelation {
413400
lambdaDummy = lambdaMother.at(i5);
414401
protonDummy = protonDaughter.at(i5);
415402
pionDummy = pionDaughter.at(i5);
416-
lambdaPair(indexEvent, v0Status.at(i5), doubleStatus.at(i5), v0Cospa.at(i5), v0Radius.at(i5), dcaPositive.at(i5), dcaNegative.at(i5), dcaBetweenDaughter.at(i5), lambdaDummy.Pt(), lambdaDummy.Eta(), lambdaDummy.Phi(), lambdaDummy.M(), protonDummy.Pt(), protonDummy.Eta(), protonDummy.Phi(), positiveIndex.at(i5), negativeIndex.at(i5), dcaV0ToPV.at(i5), tpcPosNClsCrossedRows.at(i5), tpcNegNClsCrossedRows.at(i5), ctau.at(i5), tpcNsigmaPos.at(i5), tpcNsigmaNeg.at(i5), mK0Short.at(i5));
403+
lambdaPair(indexEvent, v0Status.at(i5), doubleStatus.at(i5), v0Cospa.at(i5), v0Radius.at(i5), dcaPositive.at(i5), dcaNegative.at(i5), dcaBetweenDaughter.at(i5), lambdaDummy.Pt(), lambdaDummy.Eta(), lambdaDummy.Phi(), lambdaDummy.M(), protonDummy.Pt(), protonDummy.Eta(), protonDummy.Phi(), positiveIndex.at(i5), negativeIndex.at(i5), dcaV0ToPV.at(i5));
417404
}
418405
}
419406
}

‎PWGLF/Tasks/Strangeness/lambdaspincorrderived.cxx‎

Lines changed: 32 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,31 @@ using namespace o2::framework;
5959
using namespace o2::framework::expressions;
6060
using namespace o2::soa;
6161

62+
// Compute the competing mass under the K0s (pi+, pi-) hypothesis.
63+
template <typename T>
64+
static double getK0sCompetingMass(T const& v0)
65+
{
66+
const ROOT::Math::PtEtaPhiMVector lambda(
67+
v0.lambdaPt(), v0.lambdaEta(), v0.lambdaPhi(), v0.lambdaMass());
68+
69+
const ROOT::Math::PtEtaPhiMVector posDaugh(
70+
v0.protonPt(), v0.protonEta(), v0.protonPhi(),
71+
o2::constants::physics::MassProton);
72+
73+
const auto negDaugh = lambda - posDaugh; // 反推 neg
74+
75+
//
76+
const ROOT::Math::PtEtaPhiMVector pi1(
77+
posDaugh.Pt(), posDaugh.Eta(), posDaugh.Phi(),
78+
o2::constants::physics::MassPionCharged);
79+
80+
const ROOT::Math::PtEtaPhiMVector pi2(
81+
negDaugh.Pt(), negDaugh.Eta(), negDaugh.Phi(),
82+
o2::constants::physics::MassPionCharged);
83+
84+
return (pi1 + pi2).M();
85+
}
86+
6287
template <typename Container, typename SelectionFunc>
6388
static std::vector<int64_t> getCleanCandidateIndices(
6489
const Container& candidates,
@@ -388,16 +413,8 @@ struct lambdaspincorrderived {
388413
Configurable<float> dcaV0ToPV{"dcaV0ToPV", 1.2, "DCA V0 to PV cut on lambda"};
389414
Configurable<float> v0etaMixBuffer{"v0etaMixBuffer", 0.5, "Eta cut on mix event buffer"};
390415

391-
// TPC crossed rows
392-
Configurable<float> minTpcNClsCrossedRows{"minTpcNClsCrossedRows", 70.f, "Minimum TPC crossed rows for daughter"};
393-
394-
// ctau (lifetime)
395-
Configurable<float> maxCtau{"maxCtau", 30.f, "Maximum ctau of Lambda candidate (cm)"};
396-
397-
// TPC nsigma
398-
Configurable<float> maxTpcNsigma{"maxTpcNsigma", 4.f, "Maximum |TPC nsigma| for Lambda daughters"};
399-
400-
Configurable<float> confK0sMassWindow{"confK0sMassWindow", 0.01, "K0s competing mass rejection window (GeV/c2)"};
416+
Configurable<bool> useK0sRejection{"useK0sRejection", true, "Apply K0s competing mass rejection"};
417+
Configurable<float> confK0sMassWindow{"confK0sMassWindow", 0.01f, "K0s competing mass rejection window (GeV/c^2)"};
401418

402419
} v0Configurations;
403420

@@ -907,33 +924,12 @@ struct lambdaspincorrderived {
907924
if (candidate.lambdaPt() > ptMax) {
908925
return false;
909926
}
910-
911-
// additional cuts
912-
if (candidate.v0Status() == 0 && (std::abs(candidate.tpcNsigmaPos()) > v0Configurations.maxTpcNsigma || std::abs(candidate.tpcNsigmaNeg()) > v0Configurations.maxTpcNsigma)) {
913-
return false;
914-
}
915-
if (candidate.v0Status() == 1 && (std::abs(candidate.tpcNsigmaNeg()) > v0Configurations.maxTpcNsigma || std::abs(candidate.tpcNsigmaPos()) > v0Configurations.maxTpcNsigma)) {
916-
return false;
917-
}
918-
919-
// ---- K0s competing mass rejection ----
920-
if (std::abs(candidate.mK0Short() - o2::constants::physics::MassK0Short) < v0Configurations.confK0sMassWindow) {
921-
return false;
922-
}
923-
924-
/*
925-
if (candidate.tpcPosNClsCrossedRows() < v0Configurations.minTpcNClsCrossedRows ) {
926-
return false;
927-
}
928-
929-
if (candidate.tpcNegNClsCrossedRows() < v0Configurations.minTpcNClsCrossedRows ) {
930-
return false;
931-
}
932-
933-
if (candidate.ctau() > v0Configurations.maxCtau ) {
934-
return false;
927+
if (v0Configurations.useK0sRejection) {
928+
const double mK0s = getK0sCompetingMass(candidate);
929+
if (std::abs(mK0s - o2::constants::physics::MassK0Short) < v0Configurations.confK0sMassWindow) {
930+
return false;
931+
}
935932
}
936-
*/
937933

938934
return true;
939935
}

0 commit comments

Comments
 (0)