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
29 changes: 24 additions & 5 deletions PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
//
// Build hypertriton candidates from V0s and tracks

#include <memory>
#include <string>
#include <array>
#include <vector>
#include <algorithm>

#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
Expand Down Expand Up @@ -58,6 +62,7 @@
static const std::vector<std::string> betheBlochParNames{"p0", "p1", "p2", "p3", "p4", "resolution"};
static const std::vector<std::string> particleName{"He3"};
std::shared_ptr<TH1> hEvents;
std::shared_ptr<TH1> hEventsZorro;
std::shared_ptr<TH1> hZvtx;
std::shared_ptr<TH1> hCentFT0A;
std::shared_ptr<TH1> hCentFT0C;
Expand Down Expand Up @@ -243,10 +248,14 @@
hH4LMassBefSel = qaRegistry.add<TH1>("hH4LMassBefSel", ";M (GeV/#it{c}^{2}); ", HistType::kTH1D, {{60, 3.76, 3.84}});
hH4LMassTracked = qaRegistry.add<TH1>("hH4LMassTracked", ";M (GeV/#it{c}^{2}); ", HistType::kTH1D, {{60, 3.76, 3.84}});

hEvents = qaRegistry.add<TH1>("hEvents", ";Events; ", HistType::kTH1D, {{3, -0.5, 2.5}});
hEvents = qaRegistry.add<TH1>("hEvents", ";Events; ", HistType::kTH1D, {{2, -0.5, 1.5}});
hEvents->GetXaxis()->SetBinLabel(1, "All");
hEvents->GetXaxis()->SetBinLabel(2, "Selected");
hEvents->GetXaxis()->SetBinLabel(3, "Zorro He events");

hEventsZorro = qaRegistry.add<TH1>("hEventsZorro", ";Events; ", HistType::kTH1D, {{2, -0.5, 1.5}});
hEventsZorro->GetXaxis()->SetBinLabel(1, "Zorro before evsel");
hEventsZorro->GetXaxis()->SetBinLabel(2, "Zorro after evsel");

if (doprocessMC) {
hDecayChannel = qaRegistry.add<TH1>("hDecayChannel", ";Decay channel; ", HistType::kTH1D, {{2, -0.5, 1.5}});
hDecayChannel->GetXaxis()->SetBinLabel(1, "2-body");
Expand Down Expand Up @@ -331,17 +340,27 @@
initCCDB(bc);
hEvents->Fill(0.);

if (!collision.sel8() || std::abs(collision.posZ()) > 10) {
if (!collision.selection_bit(aod::evsel::kNoITSROFrameBorder)) {
continue;
}

bool zorroSelected = false;
if (cfgSkimmedProcessing) {
bool zorroSelected = zorro.isSelected(collision.template bc_as<aod::BCsWithTimestamps>().globalBC()); /// Just let Zorro do the accounting
// accounting done after ITS border cut, to properly correct with the MC
zorroSelected = zorro.isSelected(collision.template bc_as<aod::BCsWithTimestamps>().globalBC());
if (zorroSelected) {
hEvents->Fill(2.);
hEventsZorro->Fill(0.);
}
}

if (!collision.selection_bit(aod::evsel::kIsTriggerTVX) || !collision.selection_bit(aod::evsel::kNoTimeFrameBorder) || std::abs(collision.posZ()) > 10) {
continue;
}

if (zorroSelected) {
hEventsZorro->Fill(1.);
}

goodCollision[collision.globalIndex()] = true;
hEvents->Fill(1.);
hZvtx->Fill(collision.posZ());
Expand Down Expand Up @@ -520,7 +539,7 @@
if (mBBparamsHe[5] < 0) {
LOG(fatal) << "Bethe-Bloch parameters for He3 not set, please check your CCDB and configuration";
}
for (auto& v0 : V0s) {

Check warning on line 542 in PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
// if(v0.isStandardV0())
// continue;
auto posTrack = tracks.rawIteratorAt(v0.posTrackId());
Expand Down Expand Up @@ -561,7 +580,7 @@
svCreator.clearPools();
svCreator.fillBC2Coll(collisions, bcs);

for (auto& track : tracks) {

Check warning on line 583 in PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.

if (std::abs(track.eta()) > etaMax)
continue;
Expand All @@ -583,7 +602,7 @@
auto& svPool = svCreator.getSVCandPool(collisions);
LOG(debug) << "SV pool size: " << svPool.size();

for (auto& svCand : svPool) {

Check warning on line 605 in PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
auto heTrack = tracks.rawIteratorAt(svCand.tr0Idx);
auto piTrack = tracks.rawIteratorAt(svCand.tr1Idx);
auto collIdxs = svCand.collBracket;
Expand All @@ -594,7 +613,7 @@
}
void fillMCinfo(aod::McTrackLabels const& trackLabels, aod::McParticles const&)
{
for (auto& hypCand : hyperCandidates) {

Check warning on line 616 in PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
auto mcLabHe = trackLabels.rawIteratorAt(hypCand.heTrackID);
auto mcLabPi = trackLabels.rawIteratorAt(hypCand.piTrackID);

Expand All @@ -602,8 +621,8 @@
auto mcTrackHe = mcLabHe.mcParticle_as<aod::McParticles>();
auto mcTrackPi = mcLabPi.mcParticle_as<aod::McParticles>();
if (mcTrackHe.has_mothers() && mcTrackPi.has_mothers()) {
for (auto& heMother : mcTrackHe.mothers_as<aod::McParticles>()) {

Check warning on line 624 in PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
for (auto& piMother : mcTrackPi.mothers_as<aod::McParticles>()) {

Check warning on line 625 in PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (heMother.globalIndex() != piMother.globalIndex())
continue;
if (std::abs(mcTrackHe.pdgCode()) != heDauPdg || std::abs(mcTrackPi.pdgCode()) != 211)
Expand All @@ -611,10 +630,10 @@
if (std::abs(heMother.pdgCode()) != hyperPdg)
continue;

auto primVtx = array{heMother.vx(), heMother.vy(), heMother.vz()};

Check warning on line 633 in PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
auto secVtx = array{mcTrackHe.vx(), mcTrackHe.vy(), mcTrackHe.vz()};

Check warning on line 634 in PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
hypCand.gMom = array{heMother.px(), heMother.py(), heMother.pz()};

Check warning on line 635 in PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
hypCand.gMomHe3 = array{mcTrackHe.px(), mcTrackHe.py(), mcTrackHe.pz()};

Check warning on line 636 in PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
for (int i = 0; i < 3; i++) {
hypCand.gDecVtx[i] = secVtx[i] - primVtx[i];
}
Expand Down
Loading