Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions PWGLF/DataModel/LFResonanceTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
DECLARE_SOA_COLUMN(IsInSel8, isInSel8, bool); //! InSel8
DECLARE_SOA_COLUMN(IsInAfterAllCuts, isInAfterAllCuts, bool); //! InAfterAllCuts
DECLARE_SOA_COLUMN(ImpactParameter, impactParameter, float); //! ImpactParameter
DECLARE_SOA_COLUMN(MCMultiplicity, mcMultiplicity, float); //! MC Multiplicity

Check failure on line 79 in PWGLF/DataModel/LFResonanceTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.

} // namespace resocollision
DECLARE_SOA_TABLE(ResoCollisions, "AOD", "RESOCOLLISION",
Expand Down Expand Up @@ -171,7 +171,7 @@
#define requireSign() requireTrackFlag(ResoTrackFlags::kSign)

#define DECLARE_DYN_TRKSEL_COLUMN(name, getter, mask) \
DECLARE_SOA_DYNAMIC_COLUMN(name, getter, [](ResoTrackFlags::flagtype flags) -> bool { return ResoTrackFlags::checkFlag(flags, mask); });

Check failure on line 174 in PWGLF/DataModel/LFResonanceTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.

DECLARE_SOA_INDEX_COLUMN(ResoCollision, resoCollision);
DECLARE_SOA_INDEX_COLUMN(ResoCollisionDF, resoCollisionDF);
Expand Down Expand Up @@ -211,7 +211,7 @@
DECLARE_SOA_COLUMN(DecayVtxY, decayVtxY, float); //! Y position of the decay vertex
DECLARE_SOA_COLUMN(DecayVtxZ, decayVtxZ, float); //! Z position of the decay vertex
DECLARE_SOA_COLUMN(Alpha, alpha, float); //! Alpha of the decay vertex
DECLARE_SOA_COLUMN(QtArm, qtarm, float); //! Armenteros Qt of the decay vertex

Check failure on line 214 in PWGLF/DataModel/LFResonanceTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(TpcSignal10, tpcSignal10, int8_t); //! TPC signal of the track x10
DECLARE_SOA_COLUMN(DaughterTPCNSigmaPosPi10, daughterTPCNSigmaPosPi10, int8_t); //! TPC PID x10 of the positive daughter as Pion
DECLARE_SOA_COLUMN(DaughterTPCNSigmaPosKa10, daughterTPCNSigmaPosKa10, int8_t); //! TPC PID x10 of the positive daughter as Kaon
Expand All @@ -231,6 +231,9 @@
DECLARE_SOA_COLUMN(DaughterTOFNSigmaBachPi10, daughterTOFNSigmaBachPi10, int8_t); //! TOF PID x10 of the bachelor daughter as Pion
DECLARE_SOA_COLUMN(DaughterTOFNSigmaBachKa10, daughterTOFNSigmaBachKa10, int8_t); //! TOF PID x10 of the bachelor daughter as Kaon
DECLARE_SOA_COLUMN(DaughterTOFNSigmaBachPr10, daughterTOFNSigmaBachPr10, int8_t); //! TOF PID x10 of the bachelor daughter as Proton
DECLARE_SOA_COLUMN(NCrossedRowsPos, nCrossedRowsPos, uint8_t); //! Number of TPC crossed rows of the positive daughter
DECLARE_SOA_COLUMN(NCrossedRowsNeg, nCrossedRowsNeg, uint8_t); //! Number of TPC crossed rows of the negative daughter
DECLARE_SOA_COLUMN(NCrossedRowsBach, nCrossedRowsBach, uint8_t); //! Number of TPC crossed rows of the bachelor daughter
// For MC
DECLARE_SOA_INDEX_COLUMN(McParticle, mcParticle); //! Index of the corresponding MC particle
DECLARE_SOA_COLUMN(IsPhysicalPrimary, isPhysicalPrimary, bool);
Expand Down Expand Up @@ -365,13 +368,13 @@
static uint8_t encodeNSigma(float nSigma)
{
const float x = std::abs(nSigma);
if (x <= 1.5)

Check failure on line 371 in PWGLF/DataModel/LFResonanceTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return 0; // Return 0 when absolute nSigma is smaller than 1.5
float t = (x - 1.5) / 0.2;
int encoded = static_cast<int>(std::ceil(t)); // (1.5,1.7]->1, ..., (3.3,3.5]->10
if (encoded < 1)
encoded = 1;
if (encoded > 10)

Check failure on line 377 in PWGLF/DataModel/LFResonanceTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
encoded = 10;
return static_cast<uint8_t>(encoded);
}
Expand All @@ -381,7 +384,7 @@
{
if (encoded == 0)
return 1.5;
if (encoded > 10)

Check failure on line 387 in PWGLF/DataModel/LFResonanceTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
encoded = 10;
return 1.5 + static_cast<float>(encoded) * 0.2;
}
Expand Down Expand Up @@ -443,12 +446,12 @@
static uint8_t encodeDCA(float DCA)
{
float x = std::fabs(DCA);
if (x < 0.1)

Check failure on line 449 in PWGLF/DataModel/LFResonanceTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return 0;
int encoded = static_cast<int>(std::ceil((x - 0.1) / 0.1)); // (0.1, 0.2] -> 1, ..., (1.4, 1.5] -> 14
if (encoded < 1)
encoded = 1;
if (encoded > 14)

Check failure on line 454 in PWGLF/DataModel/LFResonanceTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
encoded = 15;
return static_cast<uint8_t>(encoded);
}
Expand Down Expand Up @@ -643,6 +646,8 @@
v0data::DCAPosToPV,
v0data::DCANegToPV,
v0data::DCAV0ToPV,
resodaughter::NCrossedRowsPos,
resodaughter::NCrossedRowsNeg,
resodaughter::MLambda,
resodaughter::MAntiLambda,
resodaughter::MK0Short,
Expand Down Expand Up @@ -710,6 +715,9 @@
cascdata::DCAXYCascToPV,
cascdata::DCAZCascToPV,
cascdata::Sign,
resodaughter::NCrossedRowsPos,
resodaughter::NCrossedRowsNeg,
resodaughter::NCrossedRowsBach,
resodaughter::MLambda,
resodaughter::MXi,
resodaughter::TransRadius,
Expand Down
20 changes: 11 additions & 9 deletions PWGLF/TableProducer/Resonances/resonanceInitializer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@
int evtPlDetId = cfgEvtPl - evtPlRefAId * 10000 - evtPlRefBId * 100;

// MC Resonance parent filter
Partition<aod::McParticles> selectedMCParticles = (nabs(aod::mcparticle::pdgCode) == 313) // K*

Check failure on line 254 in PWGLF/TableProducer/Resonances/resonanceInitializer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
|| (nabs(aod::mcparticle::pdgCode) == 323) // K*pm

Check failure on line 255 in PWGLF/TableProducer/Resonances/resonanceInitializer.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
|| (nabs(aod::mcparticle::pdgCode) == 333) // phi
|| (nabs(aod::mcparticle::pdgCode) == 9010221) // f_0(980)
|| (nabs(aod::mcparticle::pdgCode) == 10221) // f_0(1370)
Expand Down Expand Up @@ -796,6 +796,8 @@
v0.dcapostopv(),
v0.dcanegtopv(),
v0.dcav0topv(),
static_cast<uint8_t>(v0.template posTrack_as<TrackType>().tpcNClsCrossedRows()),
static_cast<uint8_t>(v0.template negTrack_as<TrackType>().tpcNClsCrossedRows()),
v0.mLambda(),
v0.mAntiLambda(),
v0.mK0Short(),
Expand Down Expand Up @@ -858,6 +860,9 @@
casc.dcaXYCascToPV(),
casc.dcaZCascToPV(),
casc.sign(),
static_cast<uint8_t>(casc.template posTrack_as<TrackType>().tpcNClsCrossedRows()),
static_cast<uint8_t>(casc.template negTrack_as<TrackType>().tpcNClsCrossedRows()),
static_cast<uint8_t>(casc.template bachelor_as<TrackType>().tpcNClsCrossedRows()),
casc.mLambda(),
casc.mXi(),
casc.v0radius(), casc.cascradius(), casc.x(), casc.y(), casc.z());
Expand Down Expand Up @@ -1736,6 +1741,9 @@
resoSpheroCollisions(computeSpherocity(tracks, trackSphMin, trackSphDef));
resoEvtPlCollisions(0, 0, 0, 0);
fillMCCollision<false>(collision, mcParticles);
// Loop over all MC particles
auto mcParts = selectedMCParticles->sliceBy(perMcCollision, collision.mcCollision().globalIndex());
fillMCParticles(mcParts, mcParticles);

// Loop over tracks
if (FilterForDerivedTables.cfgBypassNoPairV0s && (V0s.size() < 1)) {
Expand All @@ -1746,10 +1754,6 @@
fillMicroTracks<true>(collision, tracks);
}
fillV0s<true>(collision, V0s, tracks);

// Loop over all MC particles
auto mcParts = selectedMCParticles->sliceBy(perMcCollision, collision.mcCollision().globalIndex());
fillMCParticles(mcParts, mcParticles);
}
PROCESS_SWITCH(ResonanceInitializer, processTrackV0MC, "Process for MC", false);

Expand Down Expand Up @@ -1825,6 +1829,9 @@
mult = mcCollision.multMCNParticlesEta10();

fillMCCollision<false>(collision, mcParticles, impactpar, mult);
// Loop over all MC particles
auto mcParts = selectedMCParticles->sliceBy(perMcCollision, mcId);
fillMCParticles(mcParts, mcParticles);

// Loop over tracks
if (FilterForDerivedTables.cfgBypassNoPairV0s && (V0s.size() < 1)) {
Expand All @@ -1839,16 +1846,11 @@
}
fillV0s<true>(collision, V0s, tracks);
fillCascades<true>(collision, Cascades, tracks);

// Loop over all MC particles
auto mcParts = selectedMCParticles->sliceBy(perMcCollision, mcId);
fillMCParticles(mcParts, mcParticles);
}
PROCESS_SWITCH(ResonanceInitializer, processTrackV0CascMC, "Process for MC", false);

// Following the discussions at the PAG meeting (https://indico.cern.ch/event/1583408/)
// we have introduced an auxiliary task that, when the resonanceInitializer.cxx is used,
// Only consider N_rec / N_gen i.e. not consider level of N_gen at least once
void processMCgen(soa::Join<aod::McCollisions, aod::McCentFT0Ms, aod::MultMCExtras>::iterator const& mcCollision,
aod::McParticles const& mcParticles,
const soa::SmallGroups<o2::soa::Join<ResoEvents001, aod::McCollisionLabels>>& collisions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,8 @@ struct ResonanceDaughterInitializer {
v0.dcapostopv(),
v0.dcanegtopv(),
v0.dcav0topv(),
0,
0,
v0.mLambda(),
v0.mAntiLambda(),
v0.mK0Short(),
Expand Down Expand Up @@ -1206,6 +1208,9 @@ struct ResonanceDaughterInitializer {
casc.dcaXYCascToPV(),
casc.dcaZCascToPV(),
casc.sign(),
0,
0,
0,
casc.mLambda(),
casc.mXi(),
casc.v0radius(), casc.cascradius(), casc.x(), casc.y(), casc.z());
Expand Down
88 changes: 60 additions & 28 deletions PWGLF/Tasks/Resonances/xi1530Analysisqa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ struct Xi1530Analysisqa {
Configurable<float> cMassXiminus{"cMassXiminus", 1.32171, "Mass of Xi baryon"};

Configurable<float> cMaxProperLifetimeCut{"cMaxProperLifetimeCut", 4.7, "Maximum proper lifetime cut for Xi- candidates"};
Configurable<float> cMinNCrossedRowsTPCPos{"cMinNCrossedRowsTPCPos", 50, "Minimum number of crossed rows in TPC for positive track in cascade"};
Configurable<float> cMinNCrossedRowsTPCNeg{"cMinNCrossedRowsTPCNeg", 50, "Minimum number of crossed rows in TPC for negative track in cascade"};
Configurable<float> cMinNCrossedRowsTPCBach{"cMinNCrossedRowsTPCBach", 50, "Minimum number of crossed rows in TPC for bachelor track in cascade"};

} cascadeConfig;

Expand Down Expand Up @@ -335,16 +338,16 @@ struct Xi1530Analysisqa {
if (histoConfig.additionalQAplots) {
// DCA QA to candidates for first pion and Xi-
histos.add("QAbefore/trkDCAxy_pi", "DCAxy distribution of pion track candidates", HistType::kTH2F, {ptAxis, dcaxyAxis});
histos.add("QAbefore/trkDCAxy_Xi", "DCAxy distribution of Xi- track candidates", HistType::kTH2F, {ptAxis, dcaxyAxis});
histos.add("QAbefore/trkDCAxy_xi", "DCAxy distribution of Xi- track candidates", HistType::kTH2F, {ptAxis, dcaxyAxis});

histos.add("QAbefore/trkDCAz_pi", "DCAz distribution of pion track candidates", HistType::kTH2F, {ptAxis, dcazAxis});
histos.add("QAbefore/trkDCAz_Xi", "DCAz distribution of Xi- track candidates", HistType::kTH2F, {ptAxis, dcazAxis});
histos.add("QAbefore/trkDCAz_xi", "DCAz distribution of Xi- track candidates", HistType::kTH2F, {ptAxis, dcazAxis});

histos.add("QAafter/trkDCAxy_pi", "DCAxy distribution of pion track candidates", HistType::kTH2F, {ptAxis, dcaxyAxis});
histos.add("QAafter/trkDCAxy_Xi", "DCAxy distribution of Xi- track candidates", HistType::kTH2F, {ptAxis, dcaxyAxis});
histos.add("QAafter/trkDCAxy_xi", "DCAxy distribution of Xi- track candidates", HistType::kTH2F, {ptAxis, dcaxyAxis});

histos.add("QAafter/trkDCAz_pi", "DCAz distribution of pion track candidates", HistType::kTH2F, {ptAxis, dcazAxis});
histos.add("QAafter/trkDCAz_Xi", "DCAz distribution of Xi- track candidates", HistType::kTH2F, {ptAxis, dcazAxis});
histos.add("QAafter/trkDCAz_xi", "DCAz distribution of Xi- track candidates", HistType::kTH2F, {ptAxis, dcazAxis});
}

if (histoConfig.pidPlots) {
Expand Down Expand Up @@ -464,6 +467,9 @@ struct Xi1530Analysisqa {
histos.add("QAbefore/V0Radius", "V0 Radius distribution as pt", HistType::kTH2F, {ptAxis, transRadiusAxis});
histos.add("QAbefore/CascRadius", "Casc Radius distribution as pt", HistType::kTH2F, {ptAxis, transRadiusAxis});
histos.add("QAbefore/ProperLifetime", "Proper Lifetime distribution as pt", HistType::kTH2F, {ptAxis, properLifetimeAxis});
histos.add("QAbefore/NCrossedRowsPos", "Number of crossed rows in TPC for positive daughter in V0s", HistType::kTH2F, {ptAxis, {200, 0, 200, "N crossed rows"}});
histos.add("QAbefore/NCrossedRowsNeg", "Number of crossed rows in TPC for negative daughter in V0s", HistType::kTH2F, {ptAxis, {200, 0, 200, "N crossed rows"}});
histos.add("QAbefore/NCrossedRowsBach", "Number of crossed rows in TPC for bachelor in Cascades", HistType::kTH2F, {ptAxis, {200, 0, 200, "N crossed rows"}});

histos.add("QAafter/V0DCATopPV", "V0s DCA to PV distribution as pt", HistType::kTH2F, {ptAxis, dcaxyAxis});
histos.add("QAafter/V0DCADoughter", "V0s DCA Doughter distribution as pt", HistType::kTH2F, {ptAxis, dcaDaugAxis});
Expand All @@ -478,6 +484,9 @@ struct Xi1530Analysisqa {
histos.add("QAafter/V0Radius", "V0 Radius distribution as pt", HistType::kTH2F, {ptAxis, transRadiusAxis});
histos.add("QAafter/CascRadius", "Casc Radius distribution as pt", HistType::kTH2F, {ptAxis, transRadiusAxis});
histos.add("QAafter/ProperLifetime", "Proper Lifetime distribution as pt", HistType::kTH2F, {ptAxis, properLifetimeAxis});
histos.add("QAafter/NCrossedRowsPos", "Number of crossed rows in TPC for positive daughter in V0s", HistType::kTH2F, {ptAxis, {200, 0, 200, "N crossed rows"}});
histos.add("QAafter/NCrossedRowsNeg", "Number of crossed rows in TPC for negative daughter in V0s", HistType::kTH2F, {ptAxis, {200, 0, 200, "N crossed rows"}});
histos.add("QAafter/NCrossedRowsBach", "Number of crossed rows in TPC for bachelor in Cascades", HistType::kTH2F, {ptAxis, {200, 0, 200, "N crossed rows"}});

histos.add("QAMCTrue/V0DCATopPV", "V0s DCA to PV distribution as pt", HistType::kTH2F, {ptAxis, dcaxyAxis});
histos.add("QAMCTrue/V0DCADoughter", "V0s DCA Doughter distribution as pt", HistType::kTH2F, {ptAxis, dcaDaugAxis});
Expand All @@ -492,6 +501,9 @@ struct Xi1530Analysisqa {
histos.add("QAMCTrue/V0Radius", "V0 Radius distribution as pt", HistType::kTH2F, {ptAxis, transRadiusAxis});
histos.add("QAMCTrue/CascRadius", "Casc Radius distribution as pt", HistType::kTH2F, {ptAxis, transRadiusAxis});
histos.add("QAMCTrue/ProperLifetime", "Proper Lifetime distribution as pt", HistType::kTH2F, {ptAxis, properLifetimeAxis});
histos.add("QAMCTrue/NCrossedRowsPos", "Number of crossed rows in TPC for positive daughter in V0s", HistType::kTH2F, {ptAxis, {200, 0, 200, "N crossed rows"}});
histos.add("QAMCTrue/NCrossedRowsNeg", "Number of crossed rows in TPC for negative daughter in V0s", HistType::kTH2F, {ptAxis, {200, 0, 200, "N crossed rows"}});
histos.add("QAMCTrue/NCrossedRowsBach", "Number of crossed rows in TPC for bachelor in Cascades", HistType::kTH2F, {ptAxis, {200, 0, 200, "N crossed rows"}});
}
}

Expand Down Expand Up @@ -552,6 +564,12 @@ struct Xi1530Analysisqa {
return false;
if (std::abs(track.pt()) <= primarytrackConfig.cMinPtcut)
return false;
if (track.nCrossedRowsPos() <= cascadeConfig.cMinNCrossedRowsTPCPos)
return false;
if (track.nCrossedRowsNeg() <= cascadeConfig.cMinNCrossedRowsTPCNeg)
return false;
if (track.nCrossedRowsBach() <= cascadeConfig.cMinNCrossedRowsTPCBach)
return false;
if (primarytrackConfig.cDCAxyToPVAsPtForCasc) {
if (std::abs(track.dcaXYCascToPV()) >= (primarytrackConfig.cDCAxyToPVByPtCascP0 + primarytrackConfig.cDCAxyToPVByPtCascExp * track.pt()))
return false;
Expand Down Expand Up @@ -855,6 +873,9 @@ struct Xi1530Analysisqa {
auto trk2CascCosPA = trk2.cascCosPA();
auto trk2V0Radius = trk2.transRadius();
auto trk2CascRadius = trk2.cascTransRadius();
auto trks2NCrossedRowsPos = trk2.nCrossedRowsPos();
auto trks2NCrossedRowsNeg = trk2.nCrossedRowsNeg();
auto trks2NCrossedRowsBach = trk2.nCrossedRowsBach();

// QA before selections
float trk2NSigmaPiBachelorTPC = trk2.daughterTPCNSigmaBachPi();
Expand Down Expand Up @@ -906,8 +927,8 @@ struct Xi1530Analysisqa {

if (histoConfig.additionalQAplots) {
histos.fill(HIST("QAbefore/V0DCATopPV"), trk2ptXi, trk2DCAV0TopPV);
histos.fill(HIST("QAbefore/trkDCAxy_Xi"), trk2ptXi, trk2DCAXY);
histos.fill(HIST("QAbefore/trkDCAz_Xi"), trk2ptXi, trk2DCAZ);
histos.fill(HIST("QAbefore/trkDCAxy_xi"), trk2ptXi, trk2DCAXY);
histos.fill(HIST("QAbefore/trkDCAz_xi"), trk2ptXi, trk2DCAZ);
histos.fill(HIST("QAbefore/V0DCADoughter"), trk2ptXi, trk2DCAV0sDougthers);
histos.fill(HIST("QAbefore/CascDCADoughter"), trk2ptXi, trk2DCACascDougthers);
histos.fill(HIST("QAbefore/CascDCABachPV"), trk2ptXi, trk2DCABachPV);
Expand All @@ -920,6 +941,9 @@ struct Xi1530Analysisqa {
histos.fill(HIST("QAbefore/V0Mass"), trk2ptXi, massLambdaCand);
histos.fill(HIST("QAbefore/CascMass"), trk2ptXi, massXiCand);
histos.fill(HIST("QAbefore/ProperLifetime"), trk2ptXi, trk2ProperLifetime);
histos.fill(HIST("QAbefore/NCrossedRowsPos"), trk2ptXi, trks2NCrossedRowsPos);
histos.fill(HIST("QAbefore/NCrossedRowsNeg"), trk2ptXi, trks2NCrossedRowsNeg);
histos.fill(HIST("QAbefore/NCrossedRowsBach"), trk2ptXi, trks2NCrossedRowsBach);
}
}

Expand Down Expand Up @@ -982,8 +1006,8 @@ struct Xi1530Analysisqa {
}
if (histoConfig.additionalQAplots) {
histos.fill(HIST("QAafter/V0DCATopPV"), trk2ptXi, trk2DCAV0TopPV);
histos.fill(HIST("QAafter/trkDCAxy_Xi"), trk2ptXi, trk2DCAXY);
histos.fill(HIST("QAafter/trkDCAz_Xi"), trk2ptXi, trk2DCAZ);
histos.fill(HIST("QAafter/trkDCAxy_xi"), trk2ptXi, trk2DCAXY);
histos.fill(HIST("QAafter/trkDCAz_xi"), trk2ptXi, trk2DCAZ);
histos.fill(HIST("QAafter/V0DCADoughter"), trk2ptXi, trk2DCAV0sDougthers);
histos.fill(HIST("QAafter/CascDCADoughter"), trk2ptXi, trk2DCACascDougthers);
histos.fill(HIST("QAafter/CascDCABachPV"), trk2ptXi, trk2DCABachPV);
Expand All @@ -996,6 +1020,9 @@ struct Xi1530Analysisqa {
histos.fill(HIST("QAafter/V0Mass"), trk2ptXi, massLambdaCand);
histos.fill(HIST("QAafter/CascMass"), trk2ptXi, massXiCand);
histos.fill(HIST("QAafter/ProperLifetime"), trk2ptXi, trk2ProperLifetime);
histos.fill(HIST("QAafter/NCrossedRowsPos"), trk2ptXi, trks2NCrossedRowsPos);
histos.fill(HIST("QAafter/NCrossedRowsNeg"), trk2ptXi, trks2NCrossedRowsNeg);
histos.fill(HIST("QAafter/NCrossedRowsBach"), trk2ptXi, trks2NCrossedRowsBach);
}

if (additionalConfig.studyStableXi) {
Expand Down Expand Up @@ -1149,6 +1176,9 @@ struct Xi1530Analysisqa {
auto trk2CascCosPA = xiCand.cascCosPA();
auto trk2V0Radius = xiCand.transRadius();
auto trk2CascRadius = xiCand.cascTransRadius();
auto trks2NCrossedRowsPos = xiCand.nCrossedRowsPos();
auto trks2NCrossedRowsNeg = xiCand.nCrossedRowsNeg();
auto trks2NCrossedRowsBach = xiCand.nCrossedRowsBach();

// auto trk2ptPiBachelor = xiCand.pt();
float trk2NSigmaPiBachelorTPC = xiCand.daughterTPCNSigmaBachPi();
Expand All @@ -1170,8 +1200,8 @@ struct Xi1530Analysisqa {
histos.fill(HIST("QAMCTrue/trkDCAxy_pi"), pionCandPt, trk1DCAXY);
histos.fill(HIST("QAMCTrue/trkDCAz_pi"), pionCandPt, trk1DCAZ);
histos.fill(HIST("QAMCTrue/V0DCATopPV"), xiCandPt, trk2DCAV0TopPV);
histos.fill(HIST("QAMCTrue/trkDCAxy_Xi"), xiCandPt, trk2DCAXY);
histos.fill(HIST("QAMCTrue/trkDCAz_Xi"), xiCandPt, trk2DCAZ);
histos.fill(HIST("QAMCTrue/trkDCAxy_xi"), xiCandPt, trk2DCAXY);
histos.fill(HIST("QAMCTrue/trkDCAz_xi"), xiCandPt, trk2DCAZ);

histos.fill(HIST("QAMCTrue/V0DCADoughter"), xiCandPt, trk2DCAV0sDougthers);
histos.fill(HIST("QAMCTrue/CascDCADoughter"), xiCandPt, trk2DCACascDougthers);
Expand All @@ -1185,6 +1215,9 @@ struct Xi1530Analysisqa {
histos.fill(HIST("QAMCTrue/V0Mass"), xiCandPt, massLambdaCand);
histos.fill(HIST("QAMCTrue/CascMass"), xiCandPt, massXiCand);
histos.fill(HIST("QAMCTrue/ProperLifetime"), xiCandPt, trk2ProperLifetime);
histos.fill(HIST("QAMCTrue/NCrossedRowsPos"), xiCandPt, trks2NCrossedRowsPos);
histos.fill(HIST("QAMCTrue/NCrossedRowsNeg"), xiCandPt, trks2NCrossedRowsNeg);
histos.fill(HIST("QAMCTrue/NCrossedRowsBach"), xiCandPt, trks2NCrossedRowsBach);

histos.fill(HIST("QAMCTrue/TPC_Nsigma_pi_first_all"), Cent, pionCandPt, trk1NSigmaPiTPC);
if (hasSubsystemInfo(trk1NSigmaPiTOF)) {
Expand Down Expand Up @@ -1316,13 +1349,10 @@ struct Xi1530Analysisqa {
if (!pass1 || !pass2)
continue;

if (resoCollision.isInAfterAllCuts()) // after all event selection
{
if (part.pdgCode() > 0)
histos.fill(HIST("h3Xi1530Gen"), part.pt(), inCent, multiplicity);
else
histos.fill(HIST("h3Xi1530GenAnti"), part.pt(), inCent, multiplicity);
}
if (part.pdgCode() > 0)
histos.fill(HIST("h3Xi1530Gen"), part.pt(), inCent, multiplicity);
else
histos.fill(HIST("h3Xi1530GenAnti"), part.pt(), inCent, multiplicity);
}
}

Expand Down Expand Up @@ -1379,20 +1409,22 @@ struct Xi1530Analysisqa {
void processMEDF(aod::ResoCollisionDFs const& resoCollisions, aod::ResoTrackDFs const& resotracks, aod::ResoCascadeDFs const& cascTracks)
{

auto tracksTuple = std::make_tuple(resotracks, cascTracks);
/* Will be implemented once the DataFrame for cascade is ready. */

BinningTypeVtxZT0M colBinning{{mixingConfig.cfgVtxBins, mixingConfig.cfgMultBins}, true};
Pair<aod::ResoCollisionDFs, aod::ResoTrackDFs, aod::ResoCascadeDFs, BinningTypeVtxZT0M> pairs{colBinning, mixingConfig.nEvtMixing, -1, resoCollisions, tracksTuple, &cache};
// auto tracksTuple = std::make_tuple(resotracks, cascTracks);

for (const auto& [collision1, tracks1, collision2, tracks2] : pairs) {
// BinningTypeVtxZT0M colBinning{{mixingConfig.cfgVtxBins, mixingConfig.cfgMultBins}, true};
// Pair<aod::ResoCollisionDFs, aod::ResoTrackDFs, aod::ResoCascadeDFs, BinningTypeVtxZT0M> pairs{colBinning, mixingConfig.nEvtMixing, -1, resoCollisions, tracksTuple, &cache};

float multiplicity = 0.f;
auto inCent = collision1.cent();
if (histoConfig.multQA) {
histos.fill(HIST("multQA/h2MultCent"), inCent, multiplicity);
}
fillHistograms<false, false, true>(collision1, inCent, tracks1, tracks2);
}
// for (const auto& [collision1, tracks1, collision2, tracks2] : pairs) {

// float multiplicity = 0.f;
// auto inCent = collision1.cent();
// if (histoConfig.multQA) {
// histos.fill(HIST("multQA/h2MultCent"), inCent, multiplicity);
// }
// fillHistograms<false, false, true>(collision1, inCent, tracks1, tracks2);
// }
}

PROCESS_SWITCH(Xi1530Analysisqa, processData, "Process Event for Data", false);
Expand Down
Loading