Skip to content
Merged
Changes from all 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
47 changes: 44 additions & 3 deletions PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
Configurable<bool> doTOFQA{"doTOFQA", false, "do TOF QA histograms"};
Configurable<int> doDetectPropQA{"doDetectPropQA", 0, "do Detector/ITS map QA: 0: no, 1: 4D, 2: 5D with mass; 3: plain in 3D"};
Configurable<bool> doEtaPhiQA{"doEtaPhiQA", false, "do Eta/Phi QA histograms"};
Configurable<bool> doEventMCQA{"doEventMCQA", false, "do MC event QA histograms"};

Configurable<bool> doPlainTopoQA{"doPlainTopoQA", true, "do simple 1D QA of candidates"};
Configurable<float> qaMinPt{"qaMinPt", 0.0f, "minimum pT for QA plots"};
Expand Down Expand Up @@ -332,6 +333,7 @@
ConfigurableAxis axisMultFT0M{"axisMultFT0M", {500, 0.0f, +100000.0f}, "Multiplicity FT0M"};
ConfigurableAxis axisMultFT0C{"axisMultFT0C", {500, 0.0f, +10000.0f}, "Multiplicity FT0C"};
ConfigurableAxis axisMultFV0A{"axisMultFV0A", {500, 0.0f, +100000.0f}, "Multiplicity FV0A"};
ConfigurableAxis axisRapidity{"axisRapidity", {200, -1.0f, 1.0f}, "rapidity axis for analysis"};

ConfigurableAxis axisRawCentrality{"axisRawCentrality", {VARIABLE_WIDTH, 0.000f, 52.320f, 75.400f, 95.719f, 115.364f, 135.211f, 155.791f, 177.504f, 200.686f, 225.641f, 252.645f, 281.906f, 313.850f, 348.302f, 385.732f, 426.307f, 470.146f, 517.555f, 568.899f, 624.177f, 684.021f, 748.734f, 818.078f, 892.577f, 973.087f, 1058.789f, 1150.915f, 1249.319f, 1354.279f, 1465.979f, 1584.790f, 1710.778f, 1844.863f, 1985.746f, 2134.643f, 2291.610f, 2456.943f, 2630.653f, 2813.959f, 3006.631f, 3207.229f, 3417.641f, 3637.318f, 3865.785f, 4104.997f, 4354.938f, 4615.786f, 4885.335f, 5166.555f, 5458.021f, 5762.584f, 6077.881f, 6406.834f, 6746.435f, 7097.958f, 7462.579f, 7839.165f, 8231.629f, 8635.640f, 9052.000f, 9484.268f, 9929.111f, 10389.350f, 10862.059f, 11352.185f, 11856.823f, 12380.371f, 12920.401f, 13476.971f, 14053.087f, 14646.190f, 15258.426f, 15890.617f, 16544.433f, 17218.024f, 17913.465f, 18631.374f, 19374.983f, 20136.700f, 20927.783f, 21746.796f, 22590.880f, 23465.734f, 24372.274f, 25314.351f, 26290.488f, 27300.899f, 28347.512f, 29436.133f, 30567.840f, 31746.818f, 32982.664f, 34276.329f, 35624.859f, 37042.588f, 38546.609f, 40139.742f, 41837.980f, 43679.429f, 45892.130f, 400000.000f}, "raw centrality signal"}; // for QA

Expand Down Expand Up @@ -548,21 +550,21 @@
BITSET(maskTrackProperties, selPosDeepSec);
BITSET(maskTrackProperties, selPosGoodTPCTrack);
// TPC signal is available: ask for positive track PID
if (v0Selections.tpcPidNsigmaCut < 1e+5) { // safeguard for no cut

Check failure on line 553 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

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.
BITSET(maskK0ShortSpecific, selTPCPIDPositivePion);
BITSET(maskLambdaSpecific, selTPCPIDPositiveProton);
BITSET(maskAntiLambdaSpecific, selTPCPIDPositivePion);
}
// TOF PID
if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutK0Pi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut

Check failure on line 559 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

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.
BITSET(maskK0ShortSpecific, selTOFNSigmaPositivePionK0Short);
BITSET(maskK0ShortSpecific, selTOFDeltaTPositivePionK0Short);
}
if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutLaPr < 1e+5 || v0Selections.maxDeltaTimeProton < 1e+6) { // safeguard for no cut

Check failure on line 563 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

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.
BITSET(maskLambdaSpecific, selTOFNSigmaPositiveProtonLambda);
BITSET(maskLambdaSpecific, selTOFDeltaTPositiveProtonLambda);
}
if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutLaPi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut

Check failure on line 567 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

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.
BITSET(maskAntiLambdaSpecific, selTOFNSigmaPositivePionLambda);
BITSET(maskAntiLambdaSpecific, selTOFDeltaTPositivePionLambda);
}
Expand All @@ -570,21 +572,21 @@
BITSET(maskTrackProperties, selPosGoodTPCTrack);
BITSET(maskTrackProperties, selPosGoodITSTrack);
// TPC signal is available: ask for positive track PID
if (v0Selections.tpcPidNsigmaCut < 1e+5) { // safeguard for no cut

Check failure on line 575 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

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.
BITSET(maskK0ShortSpecific, selTPCPIDPositivePion);
BITSET(maskLambdaSpecific, selTPCPIDPositiveProton);
BITSET(maskAntiLambdaSpecific, selTPCPIDPositivePion);
}
// TOF PID
if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutK0Pi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut

Check failure on line 581 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

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.
BITSET(maskK0ShortSpecific, selTOFNSigmaPositivePionK0Short);
BITSET(maskK0ShortSpecific, selTOFDeltaTPositivePionK0Short);
}
if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutLaPr < 1e+5 || v0Selections.maxDeltaTimeProton < 1e+6) { // safeguard for no cut

Check failure on line 585 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

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.
BITSET(maskLambdaSpecific, selTOFNSigmaPositiveProtonLambda);
BITSET(maskLambdaSpecific, selTOFDeltaTPositiveProtonLambda);
}
if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutLaPi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut

Check failure on line 589 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

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.
BITSET(maskAntiLambdaSpecific, selTOFNSigmaPositivePionLambda);
BITSET(maskAntiLambdaSpecific, selTOFDeltaTPositivePionLambda);
}
Expand All @@ -599,13 +601,13 @@
BITSET(maskTrackProperties, selNegDeepSec);
BITSET(maskTrackProperties, selNegGoodTPCTrack);
// TPC signal is available: ask for negative track PID
if (v0Selections.tpcPidNsigmaCut < 1e+5) { // safeguard for no cut

Check failure on line 604 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

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.
BITSET(maskK0ShortSpecific, selTPCPIDNegativePion);
BITSET(maskLambdaSpecific, selTPCPIDNegativePion);
BITSET(maskAntiLambdaSpecific, selTPCPIDNegativeProton);
}
// TOF PID
if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requireNegHasTOF || v0Selections.tofPidNsigmaCutK0Pi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut

Check failure on line 610 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

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.
BITSET(maskK0ShortSpecific, selTOFNSigmaNegativePionK0Short);
BITSET(maskK0ShortSpecific, selTOFDeltaTNegativePionK0Short);
}
Expand Down Expand Up @@ -778,6 +780,13 @@
}
}

if (doEventMCQA) {
histos.add("hMultFT0MVsMultMC", "hMultFT0MVsMultMC;FT0M amplitude;#it{N}_{ch}(|#it{#eta}|<0.5)", kTH2D, {axisConfigurations.axisMultFT0M, axisConfigurations.axisNch});
histos.add("hMultFT0CVsMultMC", "hMultFT0CVsMultMC;FT0C amplitude;#it{N}_{ch}(|#it{#eta}|<0.5)", kTH2D, {axisConfigurations.axisMultFT0C, axisConfigurations.axisNch});
histos.add("hMultNGlobalVsMultMC", "hMultNGlobalVsMultMC;#it{N}_{ch}(global tracks);#it{N}_{ch} (|#it{#eta}|<0.5)", kTH2D, {axisConfigurations.axisNch, axisConfigurations.axisNch});
histos.add("hMultFV0AVsMultMC", "hMultFV0AVsMultMC;FV0A amplitude;#it{N}_{ch}(|#it{#eta}|<0.5)", kTH2D, {axisConfigurations.axisMultFV0A, axisConfigurations.axisNch});
}

histos.add("hEventPVz", "hEventPVz", kTH1D, {{100, -20.0f, +20.0f}});
histos.add("hCentralityVsPVz", "hCentralityVsPVz", kTH2D, {axisConfigurations.axisCentralityFine, {100, -20.0f, +20.0f}});
if (doprocessGeneratedRun3 || doprocessGeneratedRun2) {
Expand Down Expand Up @@ -1193,6 +1202,11 @@
histos.add("GeneralQA/h2dArmenterosAll", "h2dArmenterosAll", kTH2D, {axisConfigurations.axisAPAlpha, axisConfigurations.axisAPQt});
histos.add("GeneralQA/h2dArmenterosSelected", "h2dArmenterosSelected", kTH2D, {axisConfigurations.axisAPAlpha, axisConfigurations.axisAPQt});

if (doprocessMonteCarloRun3 || doprocessMonteCarloRun2) {
histos.add("GeneralQA/h2dRapVsRapGen", "h2dRapVsRapGen;Rapidity;Generated rapidity", kTH2D, {axisConfigurations.axisRapidity, axisConfigurations.axisRapidity});
histos.add("GeneralQA/h2dPtVsPtGen", "h2dPtVsPtGen;#it{p}_{T} (GeV/#it{c});#it{p}_{T}^{MC} (GeV/#it{c})", kTH2D, {axisConfigurations.axisPt, axisConfigurations.axisPt});
}

// Creation of histograms: MC generated
if ((doprocessGeneratedRun3 || doprocessGeneratedRun2)) {
if (useMcCentrality) {
Expand Down Expand Up @@ -1862,7 +1876,7 @@
}

template <typename TV0>
void analyseCandidate(TV0 const& v0, float pt, float centrality, uint64_t selMap, uint8_t gapSide, int& nK0Shorts, int& nLambdas, int& nAntiLambdas)
void analyseCandidate(TV0 const& v0, float pt, float rapidityLambda, float rapidityK0Short, float centrality, uint64_t selMap, uint8_t gapSide, int& nK0Shorts, int& nLambdas, int& nAntiLambdas)
// precalculate this information so that a check is one mask operation, not many
{
bool passK0ShortSelections = false;
Expand Down Expand Up @@ -2047,6 +2061,10 @@
histos.fill(HIST("K0Short/h5dPosPhiVsEta"), centrality, v0.positivept(), invMassK0Short, v0.positivephi(), v0.positiveeta());
histos.fill(HIST("K0Short/h5dNegPhiVsEta"), centrality, v0.negativept(), invMassK0Short, v0.negativephi(), v0.negativeeta());
}
if (doprocessMonteCarloRun3 || doprocessMonteCarloRun2) {
histos.fill(HIST("GeneralQA/h2dRapVsRapGen"), v0.yK0Short(), rapidityK0Short);
histos.fill(HIST("GeneralQA/h2dPtVsPtGen"), v0.pt(), pt);
}
nK0Shorts++;
}
if (passLambdaSelections && analyseLambda) {
Expand Down Expand Up @@ -2133,6 +2151,10 @@
histos.fill(HIST("Lambda/h5dPosPhiVsEta"), centrality, v0.positivept(), invMassLambda, v0.positivephi(), v0.positiveeta());
histos.fill(HIST("Lambda/h5dNegPhiVsEta"), centrality, v0.negativept(), invMassLambda, v0.negativephi(), v0.negativeeta());
}
if (doprocessMonteCarloRun3 || doprocessMonteCarloRun2) {
histos.fill(HIST("GeneralQA/h2dRapVsRapGen"), v0.yLambda(), rapidityLambda);
histos.fill(HIST("GeneralQA/h2dPtVsPtGen"), v0.pt(), pt);
}
nLambdas++;
}
if (passAntiLambdaSelections && analyseAntiLambda) {
Expand Down Expand Up @@ -2219,6 +2241,10 @@
histos.fill(HIST("AntiLambda/h5dPosPhiVsEta"), centrality, v0.positivept(), invMassAntiLambda, v0.positivephi(), v0.positiveeta());
histos.fill(HIST("AntiLambda/h5dNegPhiVsEta"), centrality, v0.negativept(), invMassAntiLambda, v0.negativephi(), v0.negativeeta());
}
if (doprocessMonteCarloRun3 || doprocessMonteCarloRun2) {
histos.fill(HIST("GeneralQA/h2dRapVsRapGen"), v0.yLambda(), rapidityLambda);
histos.fill(HIST("GeneralQA/h2dPtVsPtGen"), v0.pt(), pt);
}
nAntiLambdas++;
}

Expand Down Expand Up @@ -2831,6 +2857,10 @@
// If so, we consider it
bool atLeastOne = false;
int biggestNContribs = -1;
float multFT0M = -1.f;
float multFT0C = -1.f;
float multNGlobal = -1.f;
float multFV0A = -1.f;
float centrality = 100.5f;
int nCollisions = 0;
for (auto const& collision : groupedCollisions) {
Expand All @@ -2843,6 +2873,10 @@
if (biggestNContribs < collision.multPVTotalContributors()) {
biggestNContribs = collision.multPVTotalContributors();
centrality = getCentralityRun3(collision, useMcCentrality);
multFT0M = collision.multFT0A() + collision.multFT0C();
multFT0C = collision.multFT0C();
multNGlobal = collision.multNTracksGlobal();
multFV0A = collision.multFV0A();
}
} else { // we are in Run 2: there should be only one collision in groupedCollisions
centrality = eventSelections.useSPDTrackletsCent ? collision.centRun2SPDTracklets() : collision.centRun2V0M();
Expand All @@ -2859,6 +2893,13 @@
histos.fill(HIST("hCentralityVsPVzMC"), centrality, mcCollision.posZ());
histos.fill(HIST("hEventPVzMC"), mcCollision.posZ());

if (doEventMCQA) {
histos.fill(HIST("hMultFT0MVsMultMC"), multFT0M, mcCollision.multMCNParticlesEta05());
histos.fill(HIST("hMultFT0CVsMultMC"), multFT0C, mcCollision.multMCNParticlesEta05());
histos.fill(HIST("hMultNGlobalVsMultMC"), multNGlobal, mcCollision.multMCNParticlesEta05());
histos.fill(HIST("hMultFV0AVsMultMC"), multFV0A, mcCollision.multMCNParticlesEta05());
}

if (atLeastOne) {
if constexpr (run3) {
if (useMcCentrality) {
Expand Down Expand Up @@ -2930,7 +2971,7 @@
BITSET(selMap, selPhysPrimLambda);
BITSET(selMap, selPhysPrimAntiLambda);

analyseCandidate(v0, v0.pt(), centrality, selMap, selGapSide, nK0Shorts, nLambdas, nAntiLambdas);
analyseCandidate(v0, v0.pt(), v0.yLambda(), v0.yK0Short(), centrality, selMap, selGapSide, nK0Shorts, nLambdas, nAntiLambdas);
} // end v0 loop

// fill the histograms with the number of reconstructed K0s/Lambda/antiLambda per collision
Expand Down Expand Up @@ -3018,7 +3059,7 @@
BITSET(selMap, selPhysPrimAntiLambda);
}

analyseCandidate(v0, ptmc, centrality, selMap, selGapSide, nK0Shorts, nLambdas, nAntiLambdas);
analyseCandidate(v0, ptmc, ymc, ymc, centrality, selMap, selGapSide, nK0Shorts, nLambdas, nAntiLambdas);

if (doCollisionAssociationQA) {
// check collision association explicitly
Expand Down
Loading