Skip to content

Commit d95df40

Browse files
authored
[PWGLF] Updated the Table producer and Task for uncertainty analysis (#17213)
1 parent f8565ec commit d95df40

3 files changed

Lines changed: 60 additions & 25 deletions

File tree

PWGLF/DataModel/LFSpincorrelationTables.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ DECLARE_SOA_COLUMN(ProtonEta, protonEta, float); //! Proton Et
5252
DECLARE_SOA_COLUMN(ProtonPhi, protonPhi, float); //! Proton Phi
5353
DECLARE_SOA_COLUMN(ProtonIndex, protonIndex, int); //! Proton index
5454
DECLARE_SOA_COLUMN(PionIndex, pionIndex, int); //! Pion index
55+
DECLARE_SOA_COLUMN(DcaV0ToPV, dcaV0ToPV, float); //! DCA of V0 to primary vertex
56+
5557
} // namespace lambdapair
5658
DECLARE_SOA_TABLE(LambdaPairs, "AOD", "LAMBDAPAIR",
5759
o2::soa::Index<>,
@@ -71,7 +73,8 @@ DECLARE_SOA_TABLE(LambdaPairs, "AOD", "LAMBDAPAIR",
7173
lambdapair::ProtonEta,
7274
lambdapair::ProtonPhi,
7375
lambdapair::ProtonIndex,
74-
lambdapair::PionIndex);
76+
lambdapair::PionIndex,
77+
lambdapair::DcaV0ToPV);
7578

7679
using LambdaPair = LambdaPairs::iterator;
7780

@@ -105,6 +108,7 @@ DECLARE_SOA_COLUMN(ProtonEtamc, protonEtamc, float); //! Proto
105108
DECLARE_SOA_COLUMN(ProtonPhimc, protonPhimc, float); //! Proton Phi in montecarlo
106109
DECLARE_SOA_COLUMN(ProtonIndexmc, protonIndexmc, int); //! Proton index in montecarlo
107110
DECLARE_SOA_COLUMN(PionIndexmc, pionIndexmc, int); //! Pion index in montecarlo
111+
DECLARE_SOA_COLUMN(DcaV0ToPVmc, dcaV0ToPVmc, float); //! DCA of V0 to primary vertex
108112
} // namespace lambdapairmc
109113
DECLARE_SOA_TABLE(LambdaPairmcs, "AOD", "LAMBDAPAIRMC",
110114
o2::soa::Index<>,
@@ -124,7 +128,8 @@ DECLARE_SOA_TABLE(LambdaPairmcs, "AOD", "LAMBDAPAIRMC",
124128
lambdapairmc::ProtonEtamc,
125129
lambdapairmc::ProtonPhimc,
126130
lambdapairmc::ProtonIndexmc,
127-
lambdapairmc::PionIndexmc);
131+
lambdapairmc::PionIndexmc,
132+
lambdapairmc::DcaV0ToPVmc);
128133

129134
using LambdaPairmc = LambdaPairmcs::iterator;
130135

PWGLF/TableProducer/Strangeness/lambdaspincorrelation.cxx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ struct lambdaspincorrelation {
298298
std::vector<int> positiveIndex = {};
299299
std::vector<int> negativeIndex = {};
300300
std::vector<float> dcaBetweenDaughter = {};
301+
std::vector<float> dcaV0ToPV = {};
301302
int numbV0 = 0;
302303
// LOGF(info, "event collisions: (%d)", collision.index());
303304
auto centrality = collision.centFT0C();
@@ -355,6 +356,7 @@ struct lambdaspincorrelation {
355356
positiveIndex.push_back(postrack1.globalIndex());
356357
negativeIndex.push_back(negtrack1.globalIndex());
357358
v0Cospa.push_back(v0.v0cosPA());
359+
dcaV0ToPV.push_back(std::abs(v0.dcav0topv()));
358360
v0Radius.push_back(v0.v0radius());
359361
dcaPositive.push_back(std::abs(v0.dcapostopv()));
360362
dcaNegative.push_back(std::abs(v0.dcanegtopv()));
@@ -391,7 +393,7 @@ struct lambdaspincorrelation {
391393
lambdaDummy = lambdaMother.at(i5);
392394
protonDummy = protonDaughter.at(i5);
393395
pionDummy = pionDaughter.at(i5);
394-
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));
396+
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));
395397
}
396398
}
397399
}
@@ -410,6 +412,7 @@ struct lambdaspincorrelation {
410412
std::vector<int> positiveIndex = {};
411413
std::vector<int> negativeIndex = {};
412414
std::vector<float> dcaBetweenDaughter = {};
415+
std::vector<float> dcaV0ToPV = {};
413416
int numbV0 = 0;
414417
// LOGF(info, "event collisions: (%d)", collision.index());
415418
auto centrality = collision.centFT0C();
@@ -470,6 +473,7 @@ struct lambdaspincorrelation {
470473
dcaPositive.push_back(std::abs(v0.dcapostopv()));
471474
dcaNegative.push_back(std::abs(v0.dcanegtopv()));
472475
dcaBetweenDaughter.push_back(std::abs(v0.dcaV0daughters()));
476+
dcaV0ToPV.push_back(std::abs(v0.dcav0topv()));
473477
if (lambdaTag) {
474478
v0Status.push_back(0);
475479
proton = ROOT::Math::PxPyPzMVector(v0.pxpos(), v0.pypos(), v0.pzpos(), o2::constants::physics::MassProton);
@@ -502,7 +506,7 @@ struct lambdaspincorrelation {
502506
lambdaDummy = lambdaMother.at(i5);
503507
protonDummy = protonDaughter.at(i5);
504508
pionDummy = pionDaughter.at(i5);
505-
lambdaPairmc(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));
509+
lambdaPairmc(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));
506510
}
507511
}
508512
}
@@ -530,6 +534,7 @@ struct lambdaspincorrelation {
530534
std::vector<int> positiveIndex = {};
531535
std::vector<int> negativeIndex = {};
532536
std::vector<float> dcaBetweenDaughter = {};
537+
std::vector<float> dcaV0ToPV = {};
533538
int numbV0 = 0;
534539

535540
auto centrality = collision.centFT0C();
@@ -610,6 +615,7 @@ struct lambdaspincorrelation {
610615
negativeIndex.push_back(negtrack1.globalIndex());
611616

612617
v0Cospa.push_back(v0.v0cosPA());
618+
dcaV0ToPV.push_back(std::abs(v0.dcav0topv()));
613619
v0Radius.push_back(v0.v0radius());
614620
dcaPositive.push_back(std::abs(v0.dcapostopv()));
615621
dcaNegative.push_back(std::abs(v0.dcanegtopv()));
@@ -695,7 +701,8 @@ struct lambdaspincorrelation {
695701
protonDummy.Eta(),
696702
protonDummy.Phi(),
697703
positiveIndex.at(i5),
698-
negativeIndex.at(i5));
704+
negativeIndex.at(i5),
705+
dcaV0ToPV.at(i5));
699706
}
700707
}
701708
}

PWGLF/Tasks/Strangeness/lambdaspincorrderived.cxx

Lines changed: 43 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,13 @@ static inline int piIdx(const T& t)
168168
{
169169
return t.pionIndexmc();
170170
}
171+
172+
template <typename T>
173+
static inline float dcaV0ToPVMC(const T& t)
174+
{
175+
return t.dcaV0ToPVmc();
176+
}
177+
171178
} // namespace mcacc
172179

173180
// Optional fixed-leg correction pointers kept outside the task struct.
@@ -261,22 +268,28 @@ struct lambdaspincorrderived {
261268
Configurable<bool> fillWeightQAHistos{"fillWeightQAHistos", false, "Fill weighted/final-weighted REP/FIX QA maps"};
262269
Configurable<bool> fillAnalysisSparses{"fillAnalysisSparses", false, "Fill extra deltaR/deltaRap/deltaPhi Analysis THnSparse objects"};
263270
Configurable<bool> fillAdditionalSparses{"fillAdditionalSparses", false, "Fill extra rapidity/dphi/pair-mass THnSparse objects"};
264-
265271
Configurable<bool> checkDoubleStatus{"checkDoubleStatus", 0, "Check Double status"};
266-
Configurable<float> cosPA{"cosPA", 0.995, "Cosine Pointing Angle"};
267-
Configurable<float> radiusMin{"radiusMin", 3, "Minimum V0 radius"};
268-
Configurable<float> radiusMax{"radiusMax", 30, "Maximum V0 radius"};
269-
Configurable<float> dcaProton{"dcaProton", 0.1, "DCA Proton"};
270-
Configurable<float> dcaPion{"dcaPion", 0.2, "DCA Pion"};
271-
Configurable<float> dcaDaughters{"dcaDaughters", 1.0, "DCA between daughters"};
272+
272273
Configurable<float> ptMin{"ptMin", 0.5, "V0 Pt minimum"};
273274
Configurable<float> ptMax{"ptMax", 3.0, "V0 Pt maximum"};
274275
Configurable<float> MassMin{"MassMin", 1.09, "V0 Mass minimum"};
275276
Configurable<float> MassMax{"MassMax", 1.14, "V0 Mass maximum"};
276-
Configurable<float> rapidity{"rapidity", 0.5, "Rapidity cut on lambda"};
277277
Configurable<float> v0etaMixBuffer{"v0etaMixBuffer", 0.8, "Eta cut on mix event buffer"};
278+
Configurable<float> rapidity{"rapidity", 0.5, "Rapidity cut on lambda"};
278279
Configurable<float> v0eta{"v0eta", 0.8, "Eta cut on lambda"};
279280

281+
struct : ConfigurableGroup {
282+
std::string prefix = "v0Configuration";
283+
Configurable<float> cosPA{"cosPA", 0.995, "Cosine Pointing Angle"};
284+
Configurable<float> radiusMin{"radiusMin", 3, "Minimum V0 radius"};
285+
Configurable<float> radiusMax{"radiusMax", 30, "Maximum V0 radius"};
286+
Configurable<float> dcaProton{"dcaProton", 0.1, "DCA Proton"};
287+
Configurable<float> dcaPion{"dcaPion", 0.2, "DCA Pion"};
288+
Configurable<float> dcaDaughters{"dcaDaughters", 1.0, "DCA between daughters"};
289+
Configurable<float> dcaV0ToPV{"dcaV0ToPV", 1.2, "DCA V0 to PV cut on lambda"};
290+
291+
} v0Configurations;
292+
280293
// Event Mixing
281294
Configurable<int> cosDef{"cosDef", 1, "Defination of cos"};
282295

@@ -573,25 +586,30 @@ struct lambdaspincorrderived {
573586
if (candidate.lambdaMass() < MassMin || candidate.lambdaMass() > MassMax) {
574587
return false;
575588
}
576-
if (candidate.v0Cospa() < cosPA) {
589+
if (candidate.v0Cospa() < v0Configurations.cosPA) {
577590
return false;
578591
}
579592
if (checkDoubleStatus && candidate.doubleStatus()) {
580593
return false;
581594
}
582-
if (candidate.v0Radius() > radiusMax) {
595+
if (candidate.v0Radius() > v0Configurations.radiusMax) {
583596
return false;
584597
}
585-
if (candidate.v0Radius() < radiusMin) {
598+
if (candidate.v0Radius() < v0Configurations.radiusMin) {
586599
return false;
587600
}
588-
if (candidate.dcaBetweenDaughter() > dcaDaughters) {
601+
if (candidate.dcaBetweenDaughter() > v0Configurations.dcaDaughters) {
602+
return false;
603+
}
604+
605+
if (candidate.dcaV0ToPV() > v0Configurations.dcaV0ToPV) {
589606
return false;
590607
}
591-
if (candidate.v0Status() == 0 && (std::abs(candidate.dcaPositive()) < dcaProton || std::abs(candidate.dcaNegative()) < dcaPion)) {
608+
609+
if (candidate.v0Status() == 0 && (std::abs(candidate.dcaPositive()) < v0Configurations.dcaProton || std::abs(candidate.dcaNegative()) < v0Configurations.dcaPion)) {
592610
return false;
593611
}
594-
if (candidate.v0Status() == 1 && (std::abs(candidate.dcaPositive()) < dcaPion || std::abs(candidate.dcaNegative()) < dcaProton)) {
612+
if (candidate.v0Status() == 1 && (std::abs(candidate.dcaPositive()) < v0Configurations.dcaPion || std::abs(candidate.dcaNegative()) < v0Configurations.dcaProton)) {
595613
return false;
596614
}
597615
if (candidate.lambdaPt() < ptMin) {
@@ -1836,25 +1854,30 @@ struct lambdaspincorrderived {
18361854
if (mcacc::lamMass(candidate) < MassMin || mcacc::lamMass(candidate) > MassMax) {
18371855
return false;
18381856
}
1839-
if (mcacc::v0CosPA(candidate) < cosPA) {
1857+
if (mcacc::v0CosPA(candidate) < v0Configurations.cosPA) {
18401858
return false;
18411859
}
18421860
if (checkDoubleStatus && mcacc::doubleStatus(candidate)) {
18431861
return false;
18441862
}
1845-
if (mcacc::v0Radius(candidate) > radiusMax) {
1863+
if (mcacc::v0Radius(candidate) > v0Configurations.radiusMax) {
18461864
return false;
18471865
}
1848-
if (mcacc::v0Radius(candidate) < radiusMin) {
1866+
if (mcacc::v0Radius(candidate) < v0Configurations.radiusMin) {
18491867
return false;
18501868
}
1851-
if (mcacc::dcaDau(candidate) > dcaDaughters) {
1869+
if (mcacc::dcaDau(candidate) > v0Configurations.dcaDaughters) {
18521870
return false;
18531871
}
1854-
if (mcacc::v0Status(candidate) == 0 && (std::abs(mcacc::dcaPos(candidate)) < dcaProton || std::abs(mcacc::dcaNeg(candidate)) < dcaPion)) {
1872+
1873+
if (mcacc::dcaV0ToPVMC(candidate) > v0Configurations.dcaV0ToPV) {
1874+
return false;
1875+
}
1876+
1877+
if (mcacc::v0Status(candidate) == 0 && (std::abs(mcacc::dcaPos(candidate)) < v0Configurations.dcaProton || std::abs(mcacc::dcaNeg(candidate)) < v0Configurations.dcaPion)) {
18551878
return false;
18561879
}
1857-
if (mcacc::v0Status(candidate) == 1 && (std::abs(mcacc::dcaPos(candidate)) < dcaPion || std::abs(mcacc::dcaNeg(candidate)) < dcaProton)) {
1880+
if (mcacc::v0Status(candidate) == 1 && (std::abs(mcacc::dcaPos(candidate)) < v0Configurations.dcaPion || std::abs(mcacc::dcaNeg(candidate)) < v0Configurations.dcaProton)) {
18581881
return false;
18591882
}
18601883
if (mcacc::lamPt(candidate) < ptMin) {

0 commit comments

Comments
 (0)