Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions PWGLF/DataModel/Reduced3BodyTables.h
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 warning on line 1 in PWGLF/DataModel/Reduced3BodyTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -8,7 +8,7 @@
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

Check warning on line 11 in PWGLF/DataModel/Reduced3BodyTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.

Check warning on line 11 in PWGLF/DataModel/Reduced3BodyTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \brief is missing, incorrect or misplaced.

Check warning on line 11 in PWGLF/DataModel/Reduced3BodyTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \author is missing, incorrect or misplaced.
#ifndef PWGLF_DATAMODEL_REDUCED3BODYTABLES_H_
#define PWGLF_DATAMODEL_REDUCED3BODYTABLES_H_

Expand All @@ -16,6 +16,8 @@
#include "Framework/AnalysisDataModel.h"
#include "Common/Core/RecoDecay.h"
#include "CommonConstants/PhysicsConstants.h"
#include "Common/DataModel/Multiplicity.h"
#include "Common/DataModel/Centrality.h"
#include "PWGLF/DataModel/Vtx3BodyTables.h"

namespace o2::aod
Expand Down Expand Up @@ -47,8 +49,8 @@
DECLARE_SOA_COLUMN(Tgl, tgl, float); //!
DECLARE_SOA_COLUMN(Signed1Pt, signed1Pt, float); //! (sign of charge)/Pt in c/GeV. Use pt() and sign() instead
DECLARE_SOA_EXPRESSION_COLUMN(Phi, phi, float, //! Phi of the track, in radians within [0, 2pi)
ifnode(nasin(aod::track::snp) + aod::track::alpha < 0.0f, nasin(aod::track::snp) + aod::track::alpha + o2::constants::math::TwoPI,

Check warning on line 52 in PWGLF/DataModel/Reduced3BodyTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[two-pi-add-subtract]

Consider using RecoDecay::constrainAngle to restrict angle to a given range.
ifnode(nasin(aod::track::snp) + aod::track::alpha >= o2::constants::math::TwoPI, nasin(aod::track::snp) + aod::track::alpha - o2::constants::math::TwoPI,

Check warning on line 53 in PWGLF/DataModel/Reduced3BodyTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[two-pi-add-subtract]

Consider using RecoDecay::constrainAngle to restrict angle to a given range.
nasin(aod::track::snp) + aod::track::alpha)));
DECLARE_SOA_EXPRESSION_COLUMN(Eta, eta, float, //! Pseudorapidity
-1.f * nlog(ntan(o2::constants::math::PIQuarter - 0.5f * natan(aod::track::tgl))));
Expand Down Expand Up @@ -137,11 +139,11 @@
aod::track::sigma1Pt* aod::track::sigma1Pt);

// tracks extra parameter definition
DECLARE_SOA_COLUMN(TPCInnerParam, tpcInnerParam, float); //! Momentum at inner wall of the TPC

Check warning on line 142 in PWGLF/DataModel/Reduced3BodyTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(Flags, flags, uint32_t); //! Track flags. Run 2: see TrackFlagsRun2Enum | Run 3: see TrackFlags
DECLARE_SOA_COLUMN(ITSClusterSizes, itsClusterSizes, uint32_t); //! Clusters sizes, four bits per a layer, starting from the innermost

Check warning on line 144 in PWGLF/DataModel/Reduced3BodyTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(TPCNClsFindable, tpcNClsFindable, uint8_t); //! Findable TPC clusters for this track geometry

Check warning on line 145 in PWGLF/DataModel/Reduced3BodyTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(TPCNClsFindableMinusFound, tpcNClsFindableMinusFound, int8_t); //! TPC Clusters: Findable - Found

Check warning on line 146 in PWGLF/DataModel/Reduced3BodyTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(TPCNClsFindableMinusCrossedRows, tpcNClsFindableMinusCrossedRows, int8_t); //! TPC Clusters: Findable - crossed rows
DECLARE_SOA_COLUMN(TRDPattern, trdPattern, uint8_t); //! Contributor to the track on TRD layer in bits 0-5, starting from the innermost, bit 6 indicates a potentially split tracklet, bit 7 if the track crossed a padrow
DECLARE_SOA_COLUMN(TPCChi2NCl, tpcChi2NCl, float); //! Chi2 / cluster for the TPC track segment
Expand Down
177 changes: 51 additions & 126 deletions PWGLF/TableProducer/Nuspex/decay3bodybuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,8 @@ struct decay3bodyBuilder {
HistogramRegistry registry{"registry", {}};

// hypothesis
Configurable<int> motherhyp{"motherhyp", 0, "hypothesis of the 3body decayed particle"}; // corresponds to hyp3body
int bachelorcharge = 1; // to be updated in Init base on the hypothesis
// o2::aod::pidtofgeneric::TofPidNewCollision<ColwithEvTimes::iterator, TrackExtPIDIUwithEvTimes::iterator> bachelorTOFPID; // to be updated in Init base on the hypothesis
Configurable<int> motherhyp{"motherhyp", 0, "hypothesis of the 3body decayed particle"}; // corresponds to hyp3body
int bachelorcharge = 1; // to be updated in Init base on the hypothesis
o2::aod::pidtofgeneric::TofPidNewCollision<TrackExtPIDIUwithEvTimes::iterator> bachelorTOFPID; // to be updated in Init base on the hypothesis

// Selection criteria
Expand Down Expand Up @@ -316,7 +315,6 @@ struct decay3bodyBuilder {
Configurable<float> emTpcPidNsigmaCut{"emTpcPidNsigmaCut", 5, "emTpcPidNsigmaCut"};
} EMTrackSel;

Preslice<TrackExtPIDIUwithEvTimes> tracksperCol = aod::track::collisionId;
SliceCache cache;
ConfigurableAxis axisPosZ{"axisPosZ", {40, -10, 10}, "Mixing bins - posZ"};
ConfigurableAxis axisCentrality{"axisCentrality", {10, 0, 100}, "Mixing bins - centrality"};
Expand Down Expand Up @@ -403,7 +401,7 @@ struct decay3bodyBuilder {
fitter3body.setMatCorrType(matCorr);

// Add histograms separately for different process functions
if (doprocessRun3 == true || doprocessRun3Reduced || doprocessRun3EM == true || doprocessRun3EMLikeSign == true) {
if (doprocessRun3 == true || doprocessRun3Reduced || doprocessRun3ReducedEM == true) {
registry.add("hEventCounter", "hEventCounter", HistType::kTH1F, {{1, 0.0f, 1.0f}});
auto hVtx3BodyCounter = registry.add<TH1>("hVtx3BodyCounter", "hVtx3BodyCounter", HistType::kTH1F, {{6, 0.0f, 6.0f}});
hVtx3BodyCounter->GetXaxis()->SetBinLabel(1, "Total");
Expand Down Expand Up @@ -1478,30 +1476,28 @@ struct decay3bodyBuilder {
} // end buildVtx3BodyDataTableKFParticle

//------------------------------------------------------------------
void processRun3(ColwithEvTimes const& collisions, TrackExtPIDIUwithEvTimes const& /*tracksIU*/, aod::Decay3Bodys const& decay3bodys, aod::BCsWithTimestamps const&)
void processRun3(ColwithEvTimes const& collisions, aod::Decay3Bodys const& decay3bodys, TrackExtPIDIUwithEvTimes const&, aod::BCsWithTimestamps const&)
{
vtxCandidates.clear();

for (const auto& collision : collisions) {
registry.fill(HIST("hEventCounter"), 0.5, collisions.size());

for (const auto& d3body : decay3bodys) {
auto t0 = d3body.track0_as<TrackExtPIDIUwithEvTimes>();
auto t1 = d3body.track1_as<TrackExtPIDIUwithEvTimes>();
auto t2 = d3body.track2_as<TrackExtPIDIUwithEvTimes>();
auto collision = d3body.collision_as<ColwithEvTimes>();
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
initCCDB(bc);
registry.fill(HIST("hEventCounter"), 0.5);

const auto& d3bodys_thisCollision = decay3bodys.sliceBy(perCollision, collision.globalIndex());
for (const auto& d3body : d3bodys_thisCollision) {
auto t0 = d3body.template track0_as<TrackExtPIDIUwithEvTimes>();
auto t1 = d3body.template track1_as<TrackExtPIDIUwithEvTimes>();
auto t2 = d3body.template track2_as<TrackExtPIDIUwithEvTimes>();

// Recalculate the TOF PID
double tofNSigmaBach = -999;
if (t2.has_collision() && t2.hasTOF()) {
auto originalcol = t2.template collision_as<ColwithEvTimes>();
tofNSigmaBach = bachelorTOFPID.GetTOFNSigma(t2, originalcol, collision);
}

fillVtxCand<ColwithEvTimes>(collision, t0, t1, t2, d3body.globalIndex(), bachelorcharge, tofNSigmaBach);
// Recalculate the TOF PID
double tofNSigmaBach = -999;
if (t2.has_collision() && t2.hasTOF()) {
auto originalcol = t2.template collision_as<ColwithEvTimes>();
tofNSigmaBach = bachelorTOFPID.GetTOFNSigma(t2, originalcol, collision);
}

fillVtxCand<ColwithEvTimes>(collision, t0, t1, t2, d3body.globalIndex(), bachelorcharge, tofNSigmaBach);
}

for (const auto& candVtx : vtxCandidates) {
Expand All @@ -1511,7 +1507,7 @@ struct decay3bodyBuilder {
PROCESS_SWITCH(decay3bodyBuilder, processRun3, "Produce DCA fitter decay3body tables", true);

//------------------------------------------------------------------
void processRun3Reduced(aod::ReducedCollisions const& collisions, aod::ReducedTracksIU const&, aod::ReducedDecay3Bodys const& decay3bodys, aod::BCsWithTimestamps const&)
void processRun3Reduced(aod::ReducedCollisions const& collisions, aod::ReducedDecay3Bodys const& decay3bodys, aod::ReducedTracksIU const&)
{
vtxCandidates.clear();

Expand All @@ -1520,13 +1516,10 @@ struct decay3bodyBuilder {
int lastRunNumber = -1;

for (const auto& d3body : decay3bodys) {
auto t0 = d3body.template track0_as<aod::ReducedTracksIU>();
auto t1 = d3body.template track1_as<aod::ReducedTracksIU>();
auto t2 = d3body.template track2_as<aod::ReducedTracksIU>();
auto collision = d3body.template collision_as<aod::ReducedCollisions>();
// auto bc = collision.bc_as<aod::BCsWithTimestamps>();
// initCCDB(bc);
// set magnetic field only when run number changes
auto t0 = d3body.track0_as<aod::ReducedTracksIU>();
auto t1 = d3body.track1_as<aod::ReducedTracksIU>();
auto t2 = d3body.track2_as<aod::ReducedTracksIU>();
auto collision = d3body.collision_as<aod::ReducedCollisions>();
if (collision.runNumber() != lastRunNumber) {
initCCDBReduced(collision.runNumber());
lastRunNumber = collision.runNumber(); // Update the last run number
Expand All @@ -1543,106 +1536,37 @@ struct decay3bodyBuilder {

//------------------------------------------------------------------
// Event-mixing background
void processRun3EM(FullCols const& collisions, TrackExtPIDIUwithEvTimes const& tracksIU, aod::BCsWithTimestamps const&)
void processRun3ReducedEM(ReducedCollisionsMultsCents const&, aod::ReducedDecay3Bodys const&, aod::ReducedTracksIU const&)
{

vtxCandidates.clear();

auto tracksTuple = std::make_tuple(tracksIU);
BinningType binningEvent{{axisPosZ, axisCentrality}, true};
SameKindPair<FullCols, TrackExtPIDIUwithEvTimes, BinningType> pair{binningEvent, EMTrackSel.nUseMixedEvent, -1, collisions, tracksTuple, &cache};

Partition<TrackExtPIDIUwithEvTimes> candProtons = aod::track::signed1Pt > 0.f && nabs(aod::track::eta) <= EMTrackSel.etacut && aod::track::pt >= EMTrackSel.minProtonPt && aod::track::pt <= EMTrackSel.maxProtonPt && aod::track::tpcNClsFindable >= (uint8_t)EMTrackSel.mintpcNClsproton && nabs(aod::pidtpc::tpcNSigmaPr) <= EMTrackSel.emTpcPidNsigmaCut;
Partition<TrackExtPIDIUwithEvTimes> candAntiProtons = aod::track::signed1Pt < 0.f && nabs(aod::track::eta) <= EMTrackSel.etacut && aod::track::pt >= EMTrackSel.minProtonPt && aod::track::pt <= EMTrackSel.maxProtonPt && aod::track::tpcNClsFindable >= (uint8_t)EMTrackSel.mintpcNClsproton && nabs(aod::pidtpc::tpcNSigmaPr) <= EMTrackSel.emTpcPidNsigmaCut;
Partition<TrackExtPIDIUwithEvTimes> candPionPlus = aod::track::signed1Pt > 0.f && nabs(aod::track::eta) <= EMTrackSel.etacut && aod::track::pt >= EMTrackSel.minPionPt && aod::track::pt <= EMTrackSel.maxPionPt && aod::track::tpcNClsFindable >= (uint8_t)EMTrackSel.mintpcNClspion && nabs(aod::pidtpc::tpcNSigmaPi) <= EMTrackSel.emTpcPidNsigmaCut;
Partition<TrackExtPIDIUwithEvTimes> candPionMinus = aod::track::signed1Pt < 0.f && nabs(aod::track::eta) <= EMTrackSel.etacut && aod::track::pt >= EMTrackSel.minPionPt && aod::track::pt <= EMTrackSel.maxPionPt && aod::track::tpcNClsFindable >= (uint8_t)EMTrackSel.mintpcNClspion && nabs(aod::pidtpc::tpcNSigmaPi) <= EMTrackSel.emTpcPidNsigmaCut;
Partition<TrackExtPIDIUwithEvTimes> candBachelors = aod::track::signed1Pt > 0.f && nabs(aod::track::eta) <= EMTrackSel.etacut && aod::track::pt >= EMTrackSel.minDeuteronPt && aod::track::pt <= EMTrackSel.maxDeuteronPt && aod::track::tpcNClsFindable >= (uint8_t)EMTrackSel.mintpcNClsbachelor && nabs(aod::pidtpc::tpcNSigmaDe) <= EMTrackSel.emTpcPidNsigmaCut;
Partition<TrackExtPIDIUwithEvTimes> candAntiBachelors = aod::track::signed1Pt < 0.f && nabs(aod::track::eta) <= EMTrackSel.etacut && aod::track::pt >= EMTrackSel.minDeuteronPt && aod::track::pt <= EMTrackSel.maxDeuteronPt && aod::track::tpcNClsFindable >= (uint8_t)EMTrackSel.mintpcNClsbachelor && nabs(aod::pidtpc::tpcNSigmaDe) <= EMTrackSel.emTpcPidNsigmaCut;
candProtons.bindTable(tracksIU);
candPionPlus.bindTable(tracksIU);
candAntiProtons.bindTable(tracksIU);
candPionMinus.bindTable(tracksIU);
candBachelors.bindTable(tracksIU);
candAntiBachelors.bindTable(tracksIU);

for (const auto& [c1, tracks1, c2, tracks2] : pair) {
if (EMTrackSel.em_event_sel8_selection && (!c1.sel8() || !c2.sel8())) {
continue;
}
auto bc = c1.bc_as<aod::BCsWithTimestamps>();
initCCDB(bc);
auto protons = candProtons->sliceByCached(aod::track::collisionId, c1.globalIndex(), cache);
auto pionsplus = candPionPlus->sliceByCached(aod::track::collisionId, c1.globalIndex(), cache);
auto antiprotons = candAntiProtons->sliceByCached(aod::track::collisionId, c1.globalIndex(), cache);
auto pionsminus = candPionMinus->sliceByCached(aod::track::collisionId, c1.globalIndex(), cache);
auto bachelors = candBachelors->sliceByCached(aod::track::collisionId, c2.globalIndex(), cache);
auto antibachelors = candAntiBachelors->sliceByCached(aod::track::collisionId, c2.globalIndex(), cache);

for (auto const& [tpos, tneg, tbach] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(protons, pionsminus, bachelors))) {
double tofNSigmaBach = bachelorTOFPID.GetTOFNSigma(tbach); // Recalculate the TOF PID
fillVtxCand<FullCols>(c1, tpos, tneg, tbach, -1, bachelorcharge, tofNSigmaBach);
}
for (auto const& [tpos, tneg, tbach] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(pionsplus, antiprotons, antibachelors))) {
double tofNSigmaBach = bachelorTOFPID.GetTOFNSigma(tbach); // Recalculate the TOF PID
fillVtxCand<FullCols>(c1, tpos, tneg, tbach, -1, bachelorcharge, tofNSigmaBach);
}
}

// Aviod break of preslice in following workflow
std::sort(vtxCandidates.begin(), vtxCandidates.end(), [](const vtxCandidate a, const vtxCandidate b) {
return a.collisionId < b.collisionId;
});
SameKindPair<ReducedCollisionsMultsCents, aod::ReducedDecay3Bodys, BinningType> pair{binningEvent, EMTrackSel.nUseMixedEvent, -1, &cache};

for (const auto& candVtx : vtxCandidates) {
fillVtx3BodyTable(candVtx);
}
}
PROCESS_SWITCH(decay3bodyBuilder, processRun3EM, "Produce event-mix background", false);

//------------------------------------------------------------------
// Event-mixing background + like-sign (to aviod deuteron with wrong collisionId)
void processRun3EMLikeSign(FullCols const& collisions, TrackExtPIDIUwithEvTimes const& tracksIU, aod::BCsWithTimestamps const&)
{
int lastRunNumber = -1;

vtxCandidates.clear();
for (const auto& [c0, decay3bodys0, c1, decay3bodys1] : pair) {
for (auto& [d3body0, d3body1] : combinations(soa::CombinationsFullIndexPolicy(decay3bodys0, decay3bodys1))) {
auto tpos0 = d3body0.track0_as<aod::ReducedTracksIU>();
auto tneg0 = d3body0.track1_as<aod::ReducedTracksIU>();
auto tbach0 = d3body0.track2_as<aod::ReducedTracksIU>();
auto tpos1 = d3body1.track0_as<aod::ReducedTracksIU>();
auto tneg1 = d3body1.track1_as<aod::ReducedTracksIU>();
auto tbach1 = d3body1.track2_as<aod::ReducedTracksIU>();

if (c0.runNumber() != lastRunNumber) {
initCCDBReduced(c0.runNumber());
lastRunNumber = c0.runNumber(); // Update the last run number
LOG(debug) << "CCDB initialized for run " << lastRunNumber;
}
fillVtxCand<FullCols>(c0, tpos0, tneg0, tbach1, -1, bachelorcharge, tbach1.tofNSigmaDe());

auto tracksTuple = std::make_tuple(tracksIU);
BinningType binningEvent{{axisPosZ, axisCentrality}, true};
SameKindPair<FullCols, TrackExtPIDIUwithEvTimes, BinningType> pair{binningEvent, 5, -1, collisions, tracksTuple, &cache};

Partition<TrackExtPIDIUwithEvTimes> candProtons = aod::track::signed1Pt > 0.f && nabs(aod::track::eta) <= EMTrackSel.etacut && aod::track::pt >= EMTrackSel.minProtonPt && aod::track::pt <= EMTrackSel.maxProtonPt && aod::track::tpcNClsFindable >= (uint8_t)EMTrackSel.mintpcNClsproton && nabs(aod::pidtpc::tpcNSigmaPr) <= EMTrackSel.emTpcPidNsigmaCut;
Partition<TrackExtPIDIUwithEvTimes> candPionPlus = aod::track::signed1Pt > 0.f && nabs(aod::track::eta) <= EMTrackSel.etacut && aod::track::pt >= EMTrackSel.minPionPt && aod::track::pt <= EMTrackSel.maxPionPt && aod::track::tpcNClsFindable >= (uint8_t)EMTrackSel.mintpcNClspion && nabs(aod::pidtpc::tpcNSigmaPi) <= EMTrackSel.emTpcPidNsigmaCut;
Partition<TrackExtPIDIUwithEvTimes> candAntiProtons = aod::track::signed1Pt < 0.f && nabs(aod::track::eta) <= EMTrackSel.etacut && aod::track::pt >= EMTrackSel.minProtonPt && aod::track::pt <= EMTrackSel.maxProtonPt && aod::track::tpcNClsFindable >= (uint8_t)EMTrackSel.mintpcNClsproton && nabs(aod::pidtpc::tpcNSigmaPr) <= EMTrackSel.emTpcPidNsigmaCut;
Partition<TrackExtPIDIUwithEvTimes> candPionMinus = aod::track::signed1Pt < 0.f && nabs(aod::track::eta) <= EMTrackSel.etacut && aod::track::pt >= EMTrackSel.minPionPt && aod::track::pt <= EMTrackSel.maxPionPt && aod::track::tpcNClsFindable >= (uint8_t)EMTrackSel.mintpcNClspion && nabs(aod::pidtpc::tpcNSigmaPi) <= EMTrackSel.emTpcPidNsigmaCut;
Partition<TrackExtPIDIUwithEvTimes> candBachelors = aod::track::signed1Pt > 0.f && nabs(aod::track::eta) <= EMTrackSel.etacut && aod::track::pt >= EMTrackSel.minDeuteronPt && aod::track::pt <= EMTrackSel.maxDeuteronPt && aod::track::tpcNClsFindable >= (uint8_t)EMTrackSel.mintpcNClsbachelor && nabs(aod::pidtpc::tpcNSigmaDe) <= EMTrackSel.emTpcPidNsigmaCut;
Partition<TrackExtPIDIUwithEvTimes> candAntiBachelors = aod::track::signed1Pt < 0.f && nabs(aod::track::eta) <= EMTrackSel.etacut && aod::track::pt >= EMTrackSel.minDeuteronPt && aod::track::pt <= EMTrackSel.maxDeuteronPt && aod::track::tpcNClsFindable >= (uint8_t)EMTrackSel.mintpcNClsbachelor && nabs(aod::pidtpc::tpcNSigmaDe) <= EMTrackSel.emTpcPidNsigmaCut;
candProtons.bindTable(tracksIU);
candPionPlus.bindTable(tracksIU);
candAntiProtons.bindTable(tracksIU);
candPionMinus.bindTable(tracksIU);
candBachelors.bindTable(tracksIU);
candAntiBachelors.bindTable(tracksIU);

for (const auto& [c1, tracks1, c2, tracks2] : pair) {
if (EMTrackSel.em_event_sel8_selection && (!c1.sel8() || !c2.sel8())) {
continue;
}
auto bc = c1.bc_as<aod::BCsWithTimestamps>();
initCCDB(bc);
auto protons = candProtons->sliceByCached(aod::track::collisionId, c1.globalIndex(), cache);
auto pionsplus = candPionPlus->sliceByCached(aod::track::collisionId, c1.globalIndex(), cache);
auto antiprotons = candAntiProtons->sliceByCached(aod::track::collisionId, c1.globalIndex(), cache);
auto pionsminus = candPionMinus->sliceByCached(aod::track::collisionId, c1.globalIndex(), cache);
auto bachelors = candBachelors->sliceByCached(aod::track::collisionId, c2.globalIndex(), cache);
auto antibachelors = candAntiBachelors->sliceByCached(aod::track::collisionId, c2.globalIndex(), cache);

for (auto const& [tpos, tneg, tbach] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(protons, pionsminus, antibachelors))) {
double tofNSigmaBach = bachelorTOFPID.GetTOFNSigma(tbach); // Recalculate the TOF PID
fillVtxCand<FullCols>(c1, tpos, tneg, tbach, -1, bachelorcharge, tofNSigmaBach);
}
for (auto const& [tpos, tneg, tbach] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(pionsplus, antiprotons, bachelors))) {
double tofNSigmaBach = bachelorTOFPID.GetTOFNSigma(tbach); // Recalculate the TOF PID
fillVtxCand<FullCols>(c1, tpos, tneg, tbach, -1, bachelorcharge, tofNSigmaBach);
if (c1.runNumber() != lastRunNumber) {
initCCDBReduced(c1.runNumber());
lastRunNumber = c1.runNumber(); // Update the last run number
LOG(debug) << "CCDB initialized for run " << lastRunNumber;
}
fillVtxCand<FullCols>(c1, tpos1, tneg1, tbach0, -1, bachelorcharge, tbach0.tofNSigmaDe());
}
}

Expand All @@ -1655,7 +1579,8 @@ struct decay3bodyBuilder {
fillVtx3BodyTable(candVtx);
}
}
PROCESS_SWITCH(decay3bodyBuilder, processRun3EMLikeSign, "Produce event-mix background with like-sign method", false);
PROCESS_SWITCH(decay3bodyBuilder, processRun3ReducedEM, "Produce event-mix background", false);

//------------------------------------------------------------------

void processRun3withKFParticle(ColwithEvTimes const& collisions, TrackExtPIDIUwithEvTimes const&, aod::Decay3Bodys const& decay3bodys, aod::BCsWithTimestamps const&)
Expand Down Expand Up @@ -2014,10 +1939,10 @@ struct decay3bodyLabelBuilder {

Configurable<float> TpcPidNsigmaCut{"TpcPidNsigmaCut", 5, "TpcPidNsigmaCut"};

void processDoNotBuildLabels(aod::Collisions::iterator const&)
void processDoNotBuildLabels(aod::Decay3BodyDataLink const&) // is it possible to have none parameter?
{
// dummy process function - should not be required in the future
}
};
PROCESS_SWITCH(decay3bodyLabelBuilder, processDoNotBuildLabels, "Do not produce MC label tables", true);

void processBuildLabels(aod::Decay3BodysLinked const& decay3bodys, aod::Vtx3BodyDatas const& vtx3bodydatas, MCLabeledTracksIU const&, aod::McParticles const&)
Expand Down
Loading
Loading