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
19 changes: 18 additions & 1 deletion PWGLF/Tasks/Strangeness/phik0shortanalysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,13 @@

mcEventHist.add("hGenMCVertexZ", "hGenMCVertexZ", kTH1F, {vertexZAxis});
mcEventHist.add("hGenMCMultiplicityPercent", "GenMC Multiplicity Percentile", kTH1F, {binnedmultAxis});
mcEventHist.add("hGenMCAssocRecoMultiplicityPercent", "GenMC AssocReco Multiplicity Percentile", kTH1F, {binnedmultAxis});

// Eta distribution for dN/deta values estimation in MC
mcEventHist.add("h2RecMCEtaDistribution", "Eta vs multiplicity in MCReco", kTH2F, {binnedmultAxis, etaAxis});
mcEventHist.add("h2GenMCEtaDistribution", "Eta vs multiplicity in MCGen", kTH2F, {binnedmultAxis, etaAxis});
mcEventHist.add("h2GenMCEtaDistributionAssocReco", "Eta vs multiplicity in MCGen Assoc Reco", kTH2F, {binnedmultAxis, etaAxis});
mcEventHist.add("h2GenMCEtaDistributionAssocReco2", "Eta vs multiplicity in MCGen Assoc Reco", kTH2F, {binnedmultAxis, etaAxis});

// Phi topological/PID cuts
dataPhiHist.add("h2DauTracksPhiDCAxyPreCutData", "Dcaxy distribution vs pt before DCAxy cut", kTH2F, {{100, 0.0, 5.0, "#it{p}_{T} (GeV/#it{c})"}, {2000, -0.05, 0.05, "DCA_{xy} (cm)"}});
Expand Down Expand Up @@ -1550,7 +1552,7 @@
if (mcTrack.isPhysicalPrimary()) {
mcPionHist.fill(HIST("h3RecMCDCAxyPrimPi"), track.pt(), track.dcaXY());
} else {
if (mcTrack.getProcess() == 4) { // Selection of secondary pions from weak decay

Check failure on line 1555 in PWGLF/Tasks/Strangeness/phik0shortanalysis.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.
mcPionHist.fill(HIST("h3RecMCDCAxySecWeakDecayPi"), track.pt(), track.dcaXY());
} else { // Selection of secondary pions from material interactions
mcPionHist.fill(HIST("h3RecMCDCAxySecMaterialPi"), track.pt(), track.dcaXY());
Expand Down Expand Up @@ -2023,7 +2025,7 @@
if (mcParticle1.pdgCode() != o2::constants::physics::Pdg::kPhi)
continue;
auto kDaughters = mcParticle1.daughters_as<aod::McParticles>();
if (kDaughters.size() != 2)

Check failure on line 2028 in PWGLF/Tasks/Strangeness/phik0shortanalysis.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.
continue;
bool isPosKaon = false, isNegKaon = false;
for (const auto& kDaughter : kDaughters) {
Expand Down Expand Up @@ -2160,7 +2162,7 @@
continue;
if (cfgisGenMCForClosure) {
auto kDaughters = mcParticle2.daughters_as<aod::McParticles>();
if (kDaughters.size() != 2)

Check failure on line 2165 in PWGLF/Tasks/Strangeness/phik0shortanalysis.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.
continue;
bool isPosKaon = false, isNegKaon = false;
for (const auto& kDaughter : kDaughters) {
Expand Down Expand Up @@ -2237,7 +2239,7 @@
continue;
if (cfgisGenMCForClosure) {
auto kDaughters = mcParticle2.daughters_as<aod::McParticles>();
if (kDaughters.size() != 2)

Check failure on line 2242 in PWGLF/Tasks/Strangeness/phik0shortanalysis.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.
continue;
bool isPosKaon = false, isNegKaon = false;
for (const auto& kDaughter : kDaughters) {
Expand Down Expand Up @@ -2322,6 +2324,19 @@

mcEventHist.fill(HIST("h2RecMCEtaDistribution"), genmultiplicity, mcTrack.eta());
}

for (const auto& mcParticle : mcParticlesThisColl) {
if (!mcParticle.isPhysicalPrimary() || std::abs(mcParticle.eta()) > trackConfigs.etaMax)
continue;

auto pdgTrack = pdgDB->GetParticle(mcParticle.pdgCode());
if (pdgTrack == nullptr)
continue;
if (pdgTrack->Charge() == trackConfigs.cfgCutCharge)
continue;

mcEventHist.fill(HIST("h2GenMCEtaDistributionAssocReco"), genmultiplicity, mcParticle.eta());
}
}

PROCESS_SWITCH(Phik0shortanalysis, processdNdetaWPhiMCReco, "Process function for dN/deta values in MCReco", false);
Expand All @@ -2345,6 +2360,8 @@

float genmultiplicity = mcCollision.centFT0M();
mcEventHist.fill(HIST("hGenMCMultiplicityPercent"), genmultiplicity);
if (isAssocColl)
mcEventHist.fill(HIST("hGenMCAssocRecoMultiplicityPercent"), genmultiplicity);

for (const auto& mcParticle : mcParticles) {
if (!mcParticle.isPhysicalPrimary() || std::abs(mcParticle.eta()) > trackConfigs.etaMax)
Expand All @@ -2358,7 +2375,7 @@

mcEventHist.fill(HIST("h2GenMCEtaDistribution"), genmultiplicity, mcParticle.eta());
if (isAssocColl)
mcEventHist.fill(HIST("h2GenMCEtaDistributionAssocReco"), genmultiplicity, mcParticle.eta());
mcEventHist.fill(HIST("h2GenMCEtaDistributionAssocReco2"), genmultiplicity, mcParticle.eta());
}
}

Expand Down
Loading