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
52 changes: 39 additions & 13 deletions ALICE3/TableProducer/alice3-decaypreselector.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in ALICE3/TableProducer/alice3-decaypreselector.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -74,9 +74,6 @@
Configurable<float> nSigmaTOF{"nSigmaTOF", 4.0f, "Nsigma for TOF PID (if enabled)"};
Configurable<float> nSigmaRICH{"nSigmaRICH", 4.0f, "Nsigma for RICH PID (if enabled)"};

// Define o2 fitter, 2-prong, active memory (no need to redefine per event)
o2::vertexing::DCAFitterN<2> fitter;

// for bit-packed maps
std::vector<uint32_t> selectionMap;

Expand All @@ -92,7 +89,7 @@
if (track.has_mcParticle()) {
auto mcParticle = track.template mcParticle_as<aod::McParticles>();
if (mcParticle.has_mothers()) {
for (auto& mcParticleMother : mcParticle.template mothers_as<aod::McParticles>()) {

Check failure on line 92 in ALICE3/TableProducer/alice3-decaypreselector.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 (mcParticle.pdgCode() == pdg && mcParticleMother.pdgCode() == pdgMother)
returnValue = true;
}
Expand All @@ -104,7 +101,17 @@

void init(InitContext&)
{
// future dev if needed
auto h = histos.add<TH1>("TracksProcessed", "TracksProcessed", o2::framework::HistType::kTH1D, {{10, 0, 10}});
h->GetXaxis()->SetBinLabel(1, "TotalTracks");
h->GetXaxis()->SetBinLabel(2, "InnerTOFPiRejected");
h->GetXaxis()->SetBinLabel(3, "InnerTOFKaRejected");
h->GetXaxis()->SetBinLabel(4, "InnerTOFPrRejected");
h->GetXaxis()->SetBinLabel(5, "OuterTOFPiRejected ");
h->GetXaxis()->SetBinLabel(6, "OuterTOFKaRejected");
h->GetXaxis()->SetBinLabel(7, "OuterTOFPrRejected");
h->GetXaxis()->SetBinLabel(8, "RICHPiRejected");
h->GetXaxis()->SetBinLabel(9, "RICHKaRejected");
h->GetXaxis()->SetBinLabel(10, "RICHPrRejected");
}

// go declarative: use partitions instead of "if", then just toggle bits to allow for mask selection later
Expand All @@ -129,37 +136,56 @@
/// This process function ensures that all V0s are built. It will simply tag everything as true.
void processInitialize(aod::Tracks const& tracks)
{
histos.fill(HIST("TracksProcessed"), 0.5, tracks.size());
initializeMasks(tracks.size());
}
//*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*
void processFilterInnerTOF(tofTracks const&)
{
for (auto const& track : pInnerTOFPi)
for (auto const& track : pInnerTOFPi) {
bitoff(selectionMap[track.globalIndex()], kInnerTOFPion);
for (auto const& track : pInnerTOFKa)
histos.fill(HIST("TracksProcessed"), 1.5);
}
for (auto const& track : pInnerTOFKa) {
bitoff(selectionMap[track.globalIndex()], kInnerTOFKaon);
for (auto const& track : pInnerTOFPr)
histos.fill(HIST("TracksProcessed"), 2.5);
}
for (auto const& track : pInnerTOFPr) {
bitoff(selectionMap[track.globalIndex()], kInnerTOFProton);
histos.fill(HIST("TracksProcessed"), 3.5);
}
}
//*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*
void processFilterOuterTOF(tofTracks const&)
{
for (auto const& track : pOuterTOFPi)
for (auto const& track : pOuterTOFPi) {
bitoff(selectionMap[track.globalIndex()], kOuterTOFPion);
for (auto const& track : pOuterTOFKa)
histos.fill(HIST("TracksProcessed"), 4.5);
}
for (auto const& track : pOuterTOFKa) {
bitoff(selectionMap[track.globalIndex()], kOuterTOFKaon);
for (auto const& track : pOuterTOFPr)
histos.fill(HIST("TracksProcessed"), 5.5);
}
for (auto const& track : pOuterTOFPr) {
bitoff(selectionMap[track.globalIndex()], kOuterTOFProton);
histos.fill(HIST("TracksProcessed"), 6.5);
}
}
//*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*
void processFilterRICH(richTracks const&)
{
for (auto const& track : pRICHPi)
for (auto const& track : pRICHPi) {
bitoff(selectionMap[track.globalIndex()], kRICHPion);
for (auto const& track : pRICHKa)
histos.fill(HIST("TracksProcessed"), 7.5);
}
for (auto const& track : pRICHKa) {
bitoff(selectionMap[track.globalIndex()], kRICHKaon);
for (auto const& track : pRICHPr)
histos.fill(HIST("TracksProcessed"), 8.5);
}
for (auto const& track : pRICHPr) {
bitoff(selectionMap[track.globalIndex()], kRICHProton);
histos.fill(HIST("TracksProcessed"), 9.5);
}
}
//*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*
void processFilterOnMonteCarloTruth(labeledTracks const& tracks, aod::McParticles const&)
Expand Down
Loading