Skip to content

Commit 6c5b8e6

Browse files
jinhyunniJinhyun Parkalibuild
authored
[PWGHF] Xic0, Updated output table columns produced by treeCreatorToXiPiQa.cxx (#17242)
Co-authored-by: Jinhyun Park <jinhyun@Jinhyunui-MacBookPro.local> Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent c8c6eb7 commit 6c5b8e6

1 file changed

Lines changed: 46 additions & 28 deletions

File tree

PWGHF/TableProducer/treeCreatorToXiPiQa.cxx

Lines changed: 46 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "PWGHF/DataModel/CandidateSelectionTables.h"
2323
#include "PWGLF/DataModel/mcCentrality.h"
2424

25+
#include "Common/CCDB/EventSelectionParams.h"
2526
#include "Common/Core/RecoDecay.h"
2627
#include "Common/DataModel/Centrality.h"
2728
#include "Common/DataModel/EventSelection.h"
@@ -224,7 +225,9 @@ DECLARE_SOA_COLUMN(ParticlePdg, particlePdg, int);
224225
DECLARE_SOA_COLUMN(PtGenB, ptGenB, float);
225226
DECLARE_SOA_COLUMN(NContribMax, nContribMax, int);
226227
DECLARE_SOA_COLUMN(NRecoColl, nRecoColl, int);
227-
DECLARE_SOA_COLUMN(IsXic0WithRecoCollSel8, isXic0WithRecoCollSel8, bool);
228+
DECLARE_SOA_COLUMN(HasRecoCollTVX, hasRecoCollTVX, bool);
229+
DECLARE_SOA_COLUMN(HasRecoCollSel8, hasRecoCollSel8, bool);
230+
DECLARE_SOA_COLUMN(HasRecoCollSel8Zvtx, hasRecoCollSel8Zvtx, bool);
228231
} // namespace full
229232

230233
DECLARE_SOA_TABLE(HfToXiPiEvs, "AOD", "HFTOXIPIEV",
@@ -328,7 +331,9 @@ DECLARE_SOA_TABLE(HfCandToXiPiGen, "AOD", "HFCANDTOXIPIGEN",
328331
full::PtGenB,
329332
full::NContribMax,
330333
full::NRecoColl,
331-
full::IsXic0WithRecoCollSel8);
334+
full::HasRecoCollTVX,
335+
full::HasRecoCollSel8,
336+
full::HasRecoCollSel8Zvtx);
332337

333338
} // namespace o2::aod
334339

@@ -380,9 +385,9 @@ struct HfTreeCreatorToXiPiQa {
380385
//////////////////////////////////////////////////////
381386

382387
template <bool useCentrality, typename T>
383-
void fillEvent(const T& collision, float cutZPv)
388+
void fillEvent(const T& collision)
384389
{
385-
rowEv(collision.sel8(), std::abs(collision.posZ()) < cutZPv);
390+
rowEv(collision.sel8(), std::abs(collision.posZ()) < zPvCut);
386391
}
387392

388393
template <int svReco, int tableSize, bool useCentrality, typename MyEventTableType, typename T>
@@ -660,18 +665,29 @@ struct HfTreeCreatorToXiPiQa {
660665
void fillParticle(const CandType& mcParticles, const CollType& collisions)
661666
{
662667
for (const auto& particle : mcParticles) {
663-
// Mc.Gen
668+
664669
auto ptGen = particle.pt();
665670
auto yGen = particle.rapidityCharmBaryonGen();
666671

667672
int nContribMax = 0;
673+
bool recoCollPassedTvx = false;
668674
bool recoCollPassedSel8 = false;
675+
bool recoCollPassedSel8Zvtx = false;
676+
669677
auto mcCollision = particle.template mcCollision_as<McCollType>();
670678
const auto& recoCollsPerMcColl = collisions.sliceBy(colPerMcCollision, mcCollision.globalIndex());
679+
671680
for (const auto& recoCol : recoCollsPerMcColl) {
672681
nContribMax = recoCol.numContrib() > nContribMax ? recoCol.numContrib() : nContribMax;
673-
if (recoCol.sel8()) {
674-
recoCollPassedSel8 = true;
682+
if (recoCol.selection_bit(aod::evsel::kIsTriggerTVX)) {
683+
recoCollPassedTvx = true;
684+
if (recoCol.sel8()) {
685+
recoCollPassedSel8 = true;
686+
if (std::abs(recoCol.posZ()) < zPvCut) {
687+
recoCollPassedSel8Zvtx = true;
688+
break;
689+
}
690+
}
675691
}
676692
}
677693

@@ -688,7 +704,9 @@ struct HfTreeCreatorToXiPiQa {
688704
ptGenBhad,
689705
nContribMax,
690706
recoCollsPerMcColl.size(),
691-
recoCollPassedSel8);
707+
recoCollPassedTvx,
708+
recoCollPassedSel8,
709+
recoCollPassedSel8Zvtx);
692710
}
693711
}
694712

@@ -709,7 +727,7 @@ struct HfTreeCreatorToXiPiQa {
709727
// Filling event properties
710728
rowEv.reserve(collisions.size());
711729
for (const auto& collision : collisions) {
712-
fillEvent<false>(collision, zPvCut);
730+
fillEvent<false>(collision);
713731
}
714732

715733
// Filling candidate properties
@@ -726,7 +744,7 @@ struct HfTreeCreatorToXiPiQa {
726744
// Filling event properties
727745
rowEv.reserve(collisions.size());
728746
for (const auto& collision : collisions) {
729-
fillEvent<false>(collision, zPvCut);
747+
fillEvent<false>(collision);
730748
}
731749

732750
// Filling candidate properties
@@ -743,7 +761,7 @@ struct HfTreeCreatorToXiPiQa {
743761
// Filling event properties
744762
rowEv.reserve(collisions.size());
745763
for (const auto& collision : collisions) {
746-
fillEvent<true>(collision, zPvCut);
764+
fillEvent<true>(collision);
747765
}
748766

749767
// Filling candidate properties
@@ -760,7 +778,7 @@ struct HfTreeCreatorToXiPiQa {
760778
// Filling event properties
761779
rowEv.reserve(collisions.size());
762780
for (const auto& collision : collisions) {
763-
fillEvent<true>(collision, zPvCut);
781+
fillEvent<true>(collision);
764782
}
765783

766784
// Filling candidate properties
@@ -777,7 +795,7 @@ struct HfTreeCreatorToXiPiQa {
777795
// Filling event properties
778796
rowEv.reserve(collisions.size());
779797
for (const auto& collision : collisions) {
780-
fillEvent<true>(collision, zPvCut);
798+
fillEvent<true>(collision);
781799
}
782800

783801
// Filling candidate properties
@@ -803,7 +821,7 @@ struct HfTreeCreatorToXiPiQa {
803821
// Filling event properties
804822
rowEv.reserve(collisions.size());
805823
for (const auto& collision : collisions) {
806-
fillEvent<false>(collision, zPvCut);
824+
fillEvent<false>(collision);
807825
}
808826

809827
// Filling candidate properties
@@ -820,7 +838,7 @@ struct HfTreeCreatorToXiPiQa {
820838
// Filling event properties
821839
rowEv.reserve(collisions.size());
822840
for (const auto& collision : collisions) {
823-
fillEvent<true>(collision, zPvCut);
841+
fillEvent<true>(collision);
824842
}
825843

826844
// Filling candidate properties
@@ -837,7 +855,7 @@ struct HfTreeCreatorToXiPiQa {
837855
// Filling event properties
838856
rowEv.reserve(collisions.size());
839857
for (const auto& collision : collisions) {
840-
fillEvent<true>(collision, zPvCut);
858+
fillEvent<true>(collision);
841859
}
842860

843861
// Filling candidate properties
@@ -854,7 +872,7 @@ struct HfTreeCreatorToXiPiQa {
854872
// Filling event properties
855873
rowEv.reserve(collisions.size());
856874
for (const auto& collision : collisions) {
857-
fillEvent<true>(collision, zPvCut);
875+
fillEvent<true>(collision);
858876
}
859877

860878
// Filling candidate properties
@@ -882,7 +900,7 @@ struct HfTreeCreatorToXiPiQa {
882900
// Filling event properties
883901
rowEv.reserve(collsWithMcLable.size());
884902
for (const auto& collision : collsWithMcLable) {
885-
fillEvent<false>(collision, zPvCut);
903+
fillEvent<false>(collision);
886904
}
887905

888906
// Filling candidate properties
@@ -907,7 +925,7 @@ struct HfTreeCreatorToXiPiQa {
907925
// Filling event properties
908926
rowEv.reserve(collsWithMcLable.size());
909927
for (const auto& collision : collsWithMcLable) {
910-
fillEvent<false>(collision, zPvCut);
928+
fillEvent<false>(collision);
911929
}
912930

913931
// Filling candidate properties
@@ -932,7 +950,7 @@ struct HfTreeCreatorToXiPiQa {
932950
// Filling event properties
933951
rowEv.reserve(collsWithMcLable.size());
934952
for (const auto& collision : collsWithMcLable) {
935-
fillEvent<false>(collision, zPvCut);
953+
fillEvent<false>(collision);
936954
}
937955

938956
// Filling candidate properties
@@ -957,7 +975,7 @@ struct HfTreeCreatorToXiPiQa {
957975
// Filling event properties
958976
rowEv.reserve(collsWithMcLable.size());
959977
for (const auto& collision : collsWithMcLable) {
960-
fillEvent<true>(collision, zPvCut);
978+
fillEvent<true>(collision);
961979
}
962980

963981
// Filling candidate properties
@@ -982,7 +1000,7 @@ struct HfTreeCreatorToXiPiQa {
9821000
// Filling event properties
9831001
rowEv.reserve(collsWithMcLable.size());
9841002
for (const auto& collision : collsWithMcLable) {
985-
fillEvent<true>(collision, zPvCut);
1003+
fillEvent<true>(collision);
9861004
}
9871005

9881006
// Filling candidate properties
@@ -1007,7 +1025,7 @@ struct HfTreeCreatorToXiPiQa {
10071025
// Filling event properties
10081026
rowEv.reserve(collsWithMcLable.size());
10091027
for (const auto& collision : collsWithMcLable) {
1010-
fillEvent<true>(collision, zPvCut);
1028+
fillEvent<true>(collision);
10111029
}
10121030

10131031
// Filling candidate properties
@@ -1032,7 +1050,7 @@ struct HfTreeCreatorToXiPiQa {
10321050
// Filling event properties
10331051
rowEv.reserve(collsWithMcLable.size());
10341052
for (const auto& collision : collsWithMcLable) {
1035-
fillEvent<false>(collision, zPvCut);
1053+
fillEvent<false>(collision);
10361054
}
10371055

10381056
// Filling candidate properties
@@ -1068,7 +1086,7 @@ struct HfTreeCreatorToXiPiQa {
10681086
// Filling event properties
10691087
rowEv.reserve(collsWithMcLable.size());
10701088
for (const auto& collision : collsWithMcLable) {
1071-
fillEvent<false>(collision, zPvCut);
1089+
fillEvent<false>(collision);
10721090
}
10731091

10741092
// Filling candidate properties
@@ -1093,7 +1111,7 @@ struct HfTreeCreatorToXiPiQa {
10931111
// Filling event properties
10941112
rowEv.reserve(collsWithMcLable.size());
10951113
for (const auto& collision : collsWithMcLable) {
1096-
fillEvent<true>(collision, zPvCut);
1114+
fillEvent<true>(collision);
10971115
}
10981116

10991117
// Filling candidate properties
@@ -1118,7 +1136,7 @@ struct HfTreeCreatorToXiPiQa {
11181136
// Filling event properties
11191137
rowEv.reserve(collsWithMcLable.size());
11201138
for (const auto& collision : collsWithMcLable) {
1121-
fillEvent<true>(collision, zPvCut);
1139+
fillEvent<true>(collision);
11221140
}
11231141

11241142
// Filling candidate properties
@@ -1143,7 +1161,7 @@ struct HfTreeCreatorToXiPiQa {
11431161
// Filling event properties
11441162
rowEv.reserve(collsWithMcLable.size());
11451163
for (const auto& collision : collsWithMcLable) {
1146-
fillEvent<true>(collision, zPvCut);
1164+
fillEvent<true>(collision);
11471165
}
11481166

11491167
// Filling candidate table

0 commit comments

Comments
 (0)