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
44 changes: 36 additions & 8 deletions PWGLF/Tasks/Nuspex/piKpRAA.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ struct PiKpRAA {
const AxisSpec axisPt{binsPt, "#it{p}_{T} (GeV/#it{c})"};
const AxisSpec axisPtV0s{binsPtV0s, "#it{p}_{T} (GeV/#it{c})"};
const AxisSpec axisCent{binsCent, "Centrality Perc."};
const auto latexEta = std::vector<std::string>(vecLatexEta);
const auto endingEta = std::vector<std::string>(vecEndingEta);
const auto latexEta = (std::vector<std::string>)vecLatexEta;
const auto endingEta = (std::vector<std::string>)vecEndingEta;

registry.add("EventCounter", ";;Events", kTH1F, {axisEvent});
registry.add("HasBCVsFT0VsTVXVsEvSel", "Alls=1 | BC=2 | FT0=3 | TVX=4 | EvSel=5;;", kTH1F, {{5, 0.5, 5.5}});
Expand Down Expand Up @@ -593,11 +593,19 @@ struct PiKpRAA {
registry.add("PtKaVsNchMCFwd_HasFT0AndTVX", "Gen Evts W/at leas One Rec. Coll + FT0 Info & TVX triggered;;Gen. Nch Forward;", kTH2F, {axisPt, axisNch});
registry.add("PtPrVsNchMCFwd_HasFT0AndTVX", "Gen Evts W/at leas One Rec. Coll + FT0 Info & TVX triggered;;Gen. Nch Forward;", kTH2F, {axisPt, axisNch});

registry.add("PtPiVsNchMCFwd_HasFT0", "Gen Evts W/at leas One Rec. Coll + FT0 Info;;Gen. Nch Forward;", kTH2F, {axisPt, axisNch});
registry.add("PtKaVsNchMCFwd_HasFT0", "Gen Evts W/at leas One Rec. Coll + FT0 Info;;Gen. Nch Forward;", kTH2F, {axisPt, axisNch});
registry.add("PtPrVsNchMCFwd_HasFT0", "Gen Evts W/at leas One Rec. Coll + FT0 Info;;Gen. Nch Forward;", kTH2F, {axisPt, axisNch});

// DENOMITOR OF THE SIGNAL LOSS. USES ALL THE RECONSTRUCTED COLLISIONS EVENT IF RECONSTRUCTED MULTIPLE TIMES (A LA PI0)
registry.add("PtPiVsNchMCFwd_HasFT0AndTVX_BestCollIdx", "Gen Evts W/best Coll Idx + FT0 Info & TVX triggered;;Gen. Nch Forward;", kTH2F, {axisPt, axisNch});
registry.add("PtKaVsNchMCFwd_HasFT0AndTVX_BestCollIdx", "Gen Evts W/best Coll Idx + FT0 Info & TVX triggered;;Gen. Nch Forward;", kTH2F, {axisPt, axisNch});
registry.add("PtPrVsNchMCFwd_HasFT0AndTVX_BestCollIdx", "Gen Evts W/best Coll Idx + FT0 Info & TVX triggered;;Gen. Nch Forward;", kTH2F, {axisPt, axisNch});

registry.add("PtPiVsNchMCFwd_HasFT0_BestCollIdx", "Gen Evts W/best Coll Idx + FT0 Info;;Gen. Nch Forward;", kTH2F, {axisPt, axisNch});
registry.add("PtKaVsNchMCFwd_HasFT0_BestCollIdx", "Gen Evts W/best Coll Idx + FT0 Info;;Gen. Nch Forward;", kTH2F, {axisPt, axisNch});
registry.add("PtPrVsNchMCFwd_HasFT0_BestCollIdx", "Gen Evts W/best Coll Idx + FT0 Info;;Gen. Nch Forward;", kTH2F, {axisPt, axisNch});

// =======================================

// NUMERATOR OF THE SIGNAL LOSS. BASED ONLY ON THE COLLISION WITH THE LARGEST NUMBER OF CONTRIBUTORS TO PV
Expand Down Expand Up @@ -693,8 +701,8 @@ struct PiKpRAA {
LOG(info) << "\tdcaSelectionsLoaded=" << cfgDCA.dcaSelectionsLoaded;
}

auto vecLowEtaSel = std::vector<double>(vecLowEta);
auto vecUpEtaSel = std::vector<double>(vecUpEta);
auto vecLowEtaSel = (std::vector<double>)vecLowEta;
auto vecUpEtaSel = (std::vector<double>)vecUpEta;
LOGF(info, "vecLowEta: %s", printArray(vecLowEtaSel).c_str());
LOGF(info, "vecUpEta: %s", printArray(vecUpEtaSel).c_str());
LOGF(info, "vecEndingEta: %s", printArray(endingEta).c_str());
Expand All @@ -707,8 +715,8 @@ struct PiKpRAA {
// Table's size: " << collisions.tableSize() << "\n";
// LOG(info) << "Run number: " << foundBC.runNumber() << "\n";

const auto& kLowEta = std::vector<double>(vecLowEta);
const auto& kHighEta = std::vector<double>(vecUpEta);
const auto& kLowEta = (std::vector<double>)vecLowEta;
const auto& kHighEta = (std::vector<double>)vecUpEta;

const auto& foundBC = collision.foundBC_as<BCsRun3>();
const uint64_t timeStamp{foundBC.timestamp()};
Expand Down Expand Up @@ -1299,8 +1307,8 @@ struct PiKpRAA {
void processSignalLoss(aod::McCollisions::iterator const& mccollision, soa::SmallGroups<ColEvSelsMC> const& collisions, BCsRun3 const& /*bcs*/, aod::FT0s const& /*ft0s*/, aod::McParticles const& mcParticles, TracksMC const& tracksMC)
{

const auto& kLowEta = std::vector<double>(vecLowEta);
const auto& kHighEta = std::vector<double>(vecUpEta);
const auto& kLowEta = (std::vector<double>)vecLowEta;
const auto& kHighEta = (std::vector<double>)vecUpEta;
registry.fill(HIST("EventCounterMC"), 0.5);

//---------------------------
Expand Down Expand Up @@ -1540,11 +1548,13 @@ struct PiKpRAA {
bool hasft0{false};
bool hastvx{false};
bool hasBcFT0TVX{false};
bool hasBcFT0{false};

hasbc = collision.has_foundBC();
hasft0 = collision.has_foundFT0();
hastvx = collision.selection_bit(o2::aod::evsel::kIsTriggerTVX);
hasBcFT0TVX = (hasbc && hasft0 && hastvx);
hasBcFT0 = (hasbc && hasft0);

if (hasBcFT0TVX) {
// NUMERATOR/DENOMINATOR OF THE EVENT LOSS
Expand Down Expand Up @@ -1605,6 +1615,12 @@ struct PiKpRAA {

// TO COMPUTE SIGNAL LOSS RELATIVE TO THE MC SIGNAL OF EVENTS WITH FT0 INFO + TVX-TRIGGERED
if (particle.pdgCode() == PDG_t::kPiPlus || particle.pdgCode() == PDG_t::kPiMinus) {
if (hasBcFT0) {
registry.fill(HIST("PtPiVsNchMCFwd_HasFT0"), particle.pt(), nChMCForward);
if (isBestCollIndex) {
registry.fill(HIST("PtPiVsNchMCFwd_HasFT0_BestCollIdx"), particle.pt(), nChMCForward);
}
}
if (hasBcFT0TVX) {
registry.fill(HIST("PtPiVsNchMC_HasFT0AndTVX"), particle.pt(), nChMCTPCAcc);
registry.fill(HIST("PtPiVsNchMCFwd_HasFT0AndTVX"), particle.pt(), nChMCForward);
Expand All @@ -1614,6 +1630,12 @@ struct PiKpRAA {
}
}
} else if (particle.pdgCode() == PDG_t::kKPlus || particle.pdgCode() == PDG_t::kKMinus) {
if (hasBcFT0) {
registry.fill(HIST("PtKaVsNchMCFwd_HasFT0"), particle.pt(), nChMCForward);
if (isBestCollIndex) {
registry.fill(HIST("PtKaVsNchMCFwd_HasFT0_BestCollIdx"), particle.pt(), nChMCForward);
}
}
if (hasBcFT0TVX) {
registry.fill(HIST("PtKaVsNchMC_HasFT0AndTVX"), particle.pt(), nChMCTPCAcc);
registry.fill(HIST("PtKaVsNchMCFwd_HasFT0AndTVX"), particle.pt(), nChMCForward);
Expand All @@ -1623,6 +1645,12 @@ struct PiKpRAA {
}
}
} else if (particle.pdgCode() == PDG_t::kProton || particle.pdgCode() == PDG_t::kProtonBar) {
if (hasBcFT0) {
registry.fill(HIST("PtPrVsNchMCFwd_HasFT0"), particle.pt(), nChMCForward);
if (isBestCollIndex) {
registry.fill(HIST("PtPrVsNchMCFwd_HasFT0_BestCollIdx"), particle.pt(), nChMCForward);
}
}
if (hasBcFT0TVX) {
registry.fill(HIST("PtPrVsNchMC_HasFT0AndTVX"), particle.pt(), nChMCTPCAcc);
registry.fill(HIST("PtPrVsNchMCFwd_HasFT0AndTVX"), particle.pt(), nChMCForward);
Expand Down
Loading