Skip to content

Commit 11d88d5

Browse files
wang-yuanzhecreetz16alibuild
authored
[PWGLF] Add trigger selection for hypertriton 3body analysis (AliceO2Group#10659)
Co-authored-by: creetz16 <[email protected]> Co-authored-by: creetz16 <[email protected]> Co-authored-by: ALICE Action Bot <[email protected]>
1 parent c35d87b commit 11d88d5

File tree

3 files changed

+147
-22
lines changed

3 files changed

+147
-22
lines changed

PWGLF/TableProducer/Nuspex/decay3bodybuilder.cxx

Lines changed: 134 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ struct decay3bodyBuilder {
256256
// for KFParticle reconstruction
257257
struct : ConfigurableGroup {
258258
Configurable<bool> cfgSkimmedProcessing{"kfparticleConfigurations.cfgSkimmedProcessing", false, "Flag for skimmed dataset processing"};
259+
Configurable<std::string> triggerList{"kfparticleConfigurations.triggerList", "fH3L3Body", "List of triggers used to select events"};
260+
Configurable<bool> cfgOnlyKeepInterestedTrigger{"kfparticleConfigurations.cfgOnlyKeepInterestedTrigger", false, "Flag to keep only interested trigger"};
259261
Configurable<bool> fillCandidateFullTable{"kfparticleConfigurations.fillCandidateFullTable", false, "Switch to fill full table with candidate properties"};
260262
Configurable<bool> doSel8selection{"kfparticleConfigurations.doSel8selection", true, "flag for sel8 event selection"};
261263
Configurable<bool> doPosZselection{"kfparticleConfigurations.doPosZselection", true, "flag for posZ event selection"};
@@ -301,9 +303,13 @@ struct decay3bodyBuilder {
301303
Configurable<int> nEvtMixing{"kfparticleConfigurations.nEvtMixing", 5, "Number of events to mix"};
302304
ConfigurableAxis binsVtxZ{"kfparticleConfigurations.binsVtxZ", {VARIABLE_WIDTH, -10.0f, -8.f, -6.f, -4.f, -2.f, 0.f, 2.f, 4.f, 6.f, 8.f, 10.f}, "Mixing bins - z-vertex"};
303305
ConfigurableAxis binsMultiplicity{"kfparticleConfigurations.binsMultiplicity", {VARIABLE_WIDTH, 0.0f, 1.0f, 5.0f, 10.0f, 20.0f, 30.0f, 40.0f, 50.0f, 60.0f, 70.0f, 80.0f, 90.0f, 100.0f, 110.0f}, "Mixing bins - multiplicity"};
304-
ConfigurableAxis bins3BodyRadius{"kfparticleConfigurations.bins3BodyRadius", {VARIABLE_WIDTH, 0.0f, 0.5f, 1.0f, 1.5f, 2.0f, 2.5f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f, 20.0f, 30.0f, 40.0f, 50.0f, 100.0f}, "Mixing bins - 3body radius"};
305-
ConfigurableAxis bins3BodyPhi{"kfparticleConfigurations.bins3BodyPhi", {VARIABLE_WIDTH, 0.0f, 10.0f, 20.0f, 30.0f, 40.0f, 50.0f, 60.0f, 70.0f, 80.0f, 90.0f, 100.0f, 110.0f, 120.0f, 130.0f, 140.0f, 150.0f, 160.0f, 170.0f, 180.0f, 190.0f, 200.0f, 210.0f, 220.0f, 230.0f, 240.0f, 250.0f, 260.0f, 270.0f, 280.0f, 290.0f, 300.0f, 310.0f, 320.0f, 330.0f, 340.0f, 350.0f, 360.0f}, "Mixing bins - 3body phi"};
306-
ConfigurableAxis bins3BodyPosZ{"kfparticleConfigurations.bins3BodyPosZ", {VARIABLE_WIDTH, -500.0f, -200.0f, -100.0f, -70.0f, -60.0f, -50.0f, -40.0f, -35.0f, -30.0f, -25.0f, -20.0f, -15.0f, -13.0f, -10.0f, -8.0f, -6.0f, -4.0f, -2.0f, 0.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 13.0f, 15.0f, 20.0f, 25.0f, 30.0f, 35.0f, 40.0f, 50.0f, 60.0f, 70.0f, 100.0f, 200.0f, 500.0f}, "Mixing bins - 3body z position"};
306+
// 3body mixing
307+
Configurable<int> mixingType{"kfparticleConfigurations.mixingType", 0, "0: mix V0 from one event with bachelor from another, 1: mix pion and bachelor from one event with proton from another "};
308+
Configurable<bool> applySVertexerV0Cuts{"kfparticleConfigurations.applySVertexerV0Cuts", false, "Apply virtual V0 cuts applied in SVertexer in case of proton mixing"};
309+
ConfigurableAxis bins3BodyRadius{"kfparticleConfigurations.bins3BodyRadius", {VARIABLE_WIDTH, 0.0f, 0.5f, 1.0f, 1.5f, 2.0f, 3.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f, 20.0f, 30.0f, 1000.0}, "Mixing bins - 3body radius"};
310+
// ConfigurableAxis bins3BodyPhi{"kfparticleConfigurations.bins3BodyPhi", {VARIABLE_WIDTH, -180.0f*TMath::Pi()/180, -170.0f*TMath::Pi()/180, -160.0f*TMath::Pi()/180, -150.0f*TMath::Pi()/180, -140.0f*TMath::Pi()/180, -130.0f*TMath::Pi()/180, -120.0f*TMath::Pi()/180, -110.0f*TMath::Pi()/180, -100.0f*TMath::Pi()/180, -90.0f*TMath::Pi()/180, -80.0f*TMath::Pi()/180, -70.0f*TMath::Pi()/180, -60.0f*TMath::Pi()/180, -50.0f*TMath::Pi()/180, -40.0f*TMath::Pi()/180, -30.0f*TMath::Pi()/180, -20.0f*TMath::Pi()/180, -10.0f*TMath::Pi()/180, 0.0f, 10.0f*TMath::Pi()/180, 20.0f*TMath::Pi()/180, 30.0f*TMath::Pi()/180, 40.0f*TMath::Pi()/180, 50.0f*TMath::Pi()/180, 60.0f*TMath::Pi()/180, 70.0f*TMath::Pi()/180, 80.0f*TMath::Pi()/180, 90.0f*TMath::Pi()/180, 100.0f*TMath::Pi()/180, 110.0f*TMath::Pi()/180, 120.0f*TMath::Pi()/180, 130.0f*TMath::Pi()/180, 140.0f*TMath::Pi()/180, 150.0f*TMath::Pi()/180, 160.0f*TMath::Pi()/180, 170.0f*TMath::Pi()/180, 180.0f*TMath::Pi()/180}, "Mixing bins - 3body phi"};
311+
ConfigurableAxis bins3BodyPhi{"kfparticleConfigurations.bins3BodyPhi", {VARIABLE_WIDTH, -180.0f * TMath::Pi() / 180, -160.0f * TMath::Pi() / 180, -140.0f * TMath::Pi() / 180, -120.0f * TMath::Pi() / 180, -100.0f * TMath::Pi() / 180, -80.0f * TMath::Pi() / 180, -60.0f * TMath::Pi() / 180, -40.0f * TMath::Pi() / 180, -20.0f * TMath::Pi() / 180, 0.0f, 20.0f * TMath::Pi() / 180, 40.0f * TMath::Pi() / 180, 60.0f * TMath::Pi() / 180, 80.0f * TMath::Pi() / 180, 100.0f * TMath::Pi() / 180, 120.0f * TMath::Pi() / 180, 140.0f * TMath::Pi() / 180, 160.0f * TMath::Pi() / 180, 180.0f * TMath::Pi() / 180}, "Mixing bins - 3body phi"};
312+
ConfigurableAxis bins3BodyPosZ{"kfparticleConfigurations.bins3BodyPosZ", {VARIABLE_WIDTH, -300.0f, -42.0f, -13.0f, -6.0f, -4.0f, -2.0f, 0.0f, 2.0f, 4.0f, 6.0f, 13.0f, 42.0f, 300.0f}, "Mixing bins - 3body z position"};
307313
Configurable<bool> selectVtxZ3bodyMixing{"kfparticleConfigurations.selectVtxZ3bodyMixing", true, "Select same VtxZ events in case of 3body mixing"};
308314
Configurable<float> VtxZBin3bodyMixing{"kfparticleConfigurations.VtxZBin3bodyMixing", 1., "Bin width for event vtx z position in case of 3body mixing"};
309315
} kfparticleConfigurations;
@@ -348,7 +354,8 @@ struct decay3bodyBuilder {
348354
using BinningTypeKF = ColumnBinningPolicy<aod::collision::PosZ, aod::mult::MultNTracksPV>;
349355

350356
// 3body mixing
351-
using Binning3Body = ColumnBinningPolicy<aod::reduceddecay3body::Radius, aod::reduceddecay3body::Phi, aod::reduceddecay3body::PosZ>;
357+
// using Binning3Body = ColumnBinningPolicy<aod::reduceddecay3body::Radius, aod::reduceddecay3body::Phi, aod::reduceddecay3body::PosZ>;
358+
using Binning3Body = ColumnBinningPolicy<aod::reduceddecay3body::Radius, aod::reduceddecay3body::Phi>;
352359

353360
// Filters and slices
354361
Preslice<aod::Decay3Bodys> perCollision = o2::aod::decay3body::collisionId;
@@ -575,9 +582,20 @@ struct decay3bodyBuilder {
575582
if (doprocessRun3withKFParticleReduced3bodyMixing == true) {
576583
auto h3bodyCombinationCounter = registry.add<TH1>("QA/EM/h3bodyCombinationCounter", "h3bodyCombinationCounter", HistType::kTH1D, {{4, 0.0f, 4.0f}});
577584
h3bodyCombinationCounter->GetXaxis()->SetBinLabel(1, "total");
578-
h3bodyCombinationCounter->GetXaxis()->SetBinLabel(2, "bach sign/ID");
579-
h3bodyCombinationCounter->GetXaxis()->SetBinLabel(3, "not same collision");
580-
h3bodyCombinationCounter->GetXaxis()->SetBinLabel(4, "collision VtxZ");
585+
h3bodyCombinationCounter->GetXaxis()->SetBinLabel(2, "not same collision");
586+
h3bodyCombinationCounter->GetXaxis()->SetBinLabel(3, "collision VtxZ");
587+
h3bodyCombinationCounter->GetXaxis()->SetBinLabel(4, "bach sign/ID");
588+
h3bodyCombinationCounter->LabelsOption("v");
589+
// registry.add("QA/EM/h3bodyBinCounts", "h3bodyBinCounts", HistType::kTH3D, {{16, 0, 16, "bins radius"}, {36, 0, 36, "bins phi"}, {12, 0, 12, "bins pos Z"}});
590+
registry.add("QA/EM/h3bodyBinCounts", "h3bodyBinCounts", HistType::kTH2D, {{16, 0, 16, "bins radius"}, {18, 0, 18, "bins phi"}});
591+
592+
AxisSpec radiusAxis = {kfparticleConfigurations.bins3BodyRadius, "Radius (cm)"};
593+
AxisSpec phiAxis = {kfparticleConfigurations.bins3BodyPhi, "#phi (degree)"};
594+
AxisSpec posZAxis = {kfparticleConfigurations.bins3BodyPosZ, "position in z (cm)"};
595+
596+
registry.add("QA/EM/hRadius", "hRadius", HistType::kTH1F, {radiusAxis});
597+
registry.add("QA/EM/hPhi", "hPhi", HistType::kTH1F, {phiAxis});
598+
registry.add("QA/EM/hPosZ", "hPosZ", HistType::kTH1F, {posZAxis});
581599
}
582600
}
583601

@@ -587,7 +605,7 @@ struct decay3bodyBuilder {
587605
return;
588606
}
589607
if (kfparticleConfigurations.cfgSkimmedProcessing) {
590-
zorro.initCCDB(ccdb.service, bc.runNumber(), bc.timestamp(), "Counter");
608+
zorro.initCCDB(ccdb.service, bc.runNumber(), bc.timestamp(), kfparticleConfigurations.triggerList);
591609
zorro.populateHistRegistry(registry, bc.runNumber());
592610
}
593611

@@ -748,6 +766,9 @@ struct decay3bodyBuilder {
748766
// setMatLUT only after magfield has been initalized
749767
o2::base::Propagator::Instance()->setMatLUT(lut);
750768
}
769+
770+
// cache magnetic field info
771+
ccdbCache[runNumber] = d_bz;
751772
}
752773

753774
//------------------------------------------------------------------
@@ -1473,6 +1494,26 @@ struct decay3bodyBuilder {
14731494
}
14741495
registry.fill(HIST("Counters/hVtx3BodyCounterKFParticle"), kKfVtxV0MassConst);
14751496

1497+
// apply virtual V0 cuts used in SVertexer in case of 3body mixing with proton track
1498+
if (kfparticleConfigurations.mixingType == 1 && kfparticleConfigurations.applySVertexerV0Cuts) {
1499+
// V0 radius
1500+
if (std::sqrt(KFV0.GetX() * KFV0.GetX() + KFV0.GetY() * KFV0.GetY()) <= 0.5) {
1501+
return;
1502+
}
1503+
// pT
1504+
if (KFV0.GetPt() <= 0.01) {
1505+
return;
1506+
}
1507+
// pz/pT
1508+
if (KFV0.GetPz() / KFV0.GetPt() >= 2) {
1509+
return;
1510+
}
1511+
// cos(PA)
1512+
if (cpaXYFromKF(KFV0, kfpv) <= 0.9 || cpaFromKF(KFV0, kfpv) <= 0.8) {
1513+
return;
1514+
}
1515+
}
1516+
14761517
// -------- STEP 3: fit three body vertex --------
14771518
// Create KFParticle object from deuteron track
14781519
KFParticle kfpDeuteron;
@@ -1898,6 +1939,10 @@ struct decay3bodyBuilder {
18981939
isZorroSelected = zorro.isSelected(collision.template bc_as<aod::BCsWithTimestamps>().globalBC());
18991940
if (isZorroSelected) {
19001941
registry.fill(HIST("Counters/hEventCounterZorro"), 0.);
1942+
} else {
1943+
if (kfparticleConfigurations.cfgOnlyKeepInterestedTrigger) {
1944+
continue;
1945+
}
19011946
}
19021947
}
19031948

@@ -2150,37 +2195,108 @@ struct decay3bodyBuilder {
21502195

21512196
void processRun3withKFParticleReduced3bodyMixing(ReducedCollisionsMults const&, aod::RedIUTracks const&, soa::Join<aod::RedDecay3Bodys, aod::Red3BodyInfo> const& decay3bodys)
21522197
{
2153-
Binning3Body binningOnRadPhiPosZ{{kfparticleConfigurations.bins3BodyRadius, kfparticleConfigurations.bins3BodyPhi, kfparticleConfigurations.bins3BodyPosZ}, true};
2198+
// Define a 2D array to count 3bodies per bin (radius, phi, posZ)
2199+
std::vector<std::vector<int>> bin3bodyCounts(16, std::vector<int>(36, 0));
2200+
2201+
// Function to find bin index (returns -1 if out of range)
2202+
auto findBin = [](float value, const std::vector<float>& binEdges) -> int {
2203+
for (size_t i = 0; i < binEdges.size() - 1; ++i) {
2204+
if (value > binEdges[i] && value <= binEdges[i + 1]) {
2205+
return i;
2206+
}
2207+
}
2208+
return -1; // Out of range
2209+
};
2210+
2211+
int counter = 0;
2212+
// Loop over all collisions to count them in bins
2213+
for (auto& decay3body : decay3bodys) {
2214+
counter++;
2215+
float radius = decay3body.radius();
2216+
float phi = decay3body.phi();
2217+
float posZ = decay3body.posz();
2218+
2219+
registry.fill(HIST("QA/EM/hRadius"), radius);
2220+
registry.fill(HIST("QA/EM/hPhi"), phi);
2221+
registry.fill(HIST("QA/EM/hPosZ"), posZ);
2222+
2223+
// float degToRad = TMath::Pi()/180;
2224+
2225+
// Determine bin indices
2226+
int radiusBin = findBin(radius, {0.0f, 0.5f, 1.0f, 1.5f, 2.0f, 3.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f, 20.0f, 30.0f, 1000.0});
2227+
int phiBin = findBin(phi, {-180.0f * TMath::Pi() / 180, -160.0f * TMath::Pi() / 180, -140.0f * TMath::Pi() / 180, -120.0f * TMath::Pi() / 180, -100.0f * TMath::Pi() / 180, -80.0f * TMath::Pi() / 180, -60.0f * TMath::Pi() / 180, -40.0f * TMath::Pi() / 180, -20.0f * TMath::Pi() / 180, 0.0f, 20.0f * TMath::Pi() / 180, 40.0f * TMath::Pi() / 180, 60.0f * TMath::Pi() / 180, 80.0f * TMath::Pi() / 180, 100.0f * TMath::Pi() / 180, 120.0f * TMath::Pi() / 180, 140.0f * TMath::Pi() / 180, 160.0f * TMath::Pi() / 180, 180.0f * TMath::Pi() / 180});
2228+
if (radiusBin >= 0 && phiBin >= 0) { // && posZBin >= 0) {
2229+
bin3bodyCounts[radiusBin][phiBin]++; //[posZBin]++;
2230+
}
2231+
}
2232+
LOG(info) << "3body counter: " << counter;
2233+
2234+
// Print out the number of 3-body decays per bin
2235+
LOG(info) << "3body count per bin (radius, phi, posZ):";
2236+
for (size_t i = 0; i < bin3bodyCounts.size(); ++i) {
2237+
for (size_t j = 0; j < bin3bodyCounts[i].size(); ++j) {
2238+
LOG(info) << "Bin (" << i << ", " << j << "): " << bin3bodyCounts[i][j] << " 3bodies";
2239+
}
2240+
}
2241+
// Fill 3D histogram with numbers per bin
2242+
for (size_t i = 0; i < bin3bodyCounts.size(); ++i) {
2243+
for (size_t j = 0; j < bin3bodyCounts[i].size(); ++j) {
2244+
registry.fill(HIST("QA/EM/h3bodyBinCounts"), i, j, bin3bodyCounts[i][j]);
2245+
}
2246+
}
2247+
LOG(info) << "Integral of h3bodyBinCounts: " << registry.get<TH2>(HIST("QA/EM/h3bodyBinCounts"))->Integral();
2248+
2249+
Binning3Body binningOnRadPhi{{kfparticleConfigurations.bins3BodyRadius, kfparticleConfigurations.bins3BodyPhi}, true};
21542250

21552251
// Strictly upper index policy for decay3body objects binned by radius, phi and z position
2156-
for (auto& [decay3body1, decay3body2] : selfCombinations(binningOnRadPhiPosZ, kfparticleConfigurations.nEvtMixing, -1, decay3bodys, decay3bodys)) {
2252+
for (auto& [decay3body1, decay3body2] : selfPairCombinations(binningOnRadPhi, kfparticleConfigurations.nEvtMixing, -1, decay3bodys)) {
21572253
auto trackPos1 = decay3body1.template track0_as<aod::RedIUTracks>();
21582254
auto trackNeg1 = decay3body1.template track1_as<aod::RedIUTracks>();
21592255
auto trackBach1 = decay3body1.template track2_as<aod::RedIUTracks>();
2256+
auto trackPos2 = decay3body2.template track0_as<aod::RedIUTracks>();
2257+
auto trackNeg2 = decay3body2.template track1_as<aod::RedIUTracks>();
21602258
auto trackBach2 = decay3body2.template track2_as<aod::RedIUTracks>();
21612259

21622260
registry.fill(HIST("QA/EM/h3bodyCombinationCounter"), 0.5);
21632261

2164-
// ---------- selections ----------
2165-
if ((trackBach1.sign() > 0 && !(trackBach2.sign() > 0)) || (trackBach1.sign() < 0 && !(trackBach2.sign() < 0)) || trackBach1.globalIndex() == trackBach2.globalIndex()) { // only combine if trackBach2 has correct sign and is not same as trackBach1
2262+
// collision vertex selections
2263+
auto collision1 = decay3body1.template collision_as<ReducedCollisionsMults>();
2264+
auto collision2 = decay3body2.template collision_as<ReducedCollisionsMults>();
2265+
initCCDBfromRunNumber(collision2.runNumber());
2266+
initCCDBfromRunNumber(collision1.runNumber());
2267+
2268+
if (decay3body1.collisionId() == decay3body2.collisionId()) { // only combine if from different event
21662269
continue;
21672270
}
21682271
registry.fill(HIST("QA/EM/h3bodyCombinationCounter"), 1.5);
2169-
2170-
if (decay3body1.collisionId() == decay3body2.collisionId()) { // only combine if from different event
2272+
if (kfparticleConfigurations.selectVtxZ3bodyMixing && std::abs(collision1.posZ() - collision2.posZ()) > kfparticleConfigurations.VtxZBin3bodyMixing) { // only combine if collision similar in VtxZ
21712273
continue;
21722274
}
21732275
registry.fill(HIST("QA/EM/h3bodyCombinationCounter"), 2.5);
21742276

2175-
auto collision1 = decay3body1.template collision_as<ReducedCollisionsMults>();
2176-
auto collision2 = decay3body2.template collision_as<ReducedCollisionsMults>();
2177-
if (kfparticleConfigurations.selectVtxZ3bodyMixing && std::abs(collision1.posZ() - collision2.posZ()) > kfparticleConfigurations.VtxZBin3bodyMixing) { // only combine if collision similar in VtxZ
2277+
// ---------- selections ----------
2278+
if ((trackBach1.sign() > 0 && !(trackBach2.sign() > 0)) || (trackBach1.sign() < 0 && !(trackBach2.sign() < 0)) || trackBach1.globalIndex() == trackBach2.globalIndex()) { // only combine if trackBach2 has correct sign and is not same as trackBach1
21782279
continue;
21792280
}
21802281
registry.fill(HIST("QA/EM/h3bodyCombinationCounter"), 3.5);
21812282

21822283
// ---------- do candidate analysis ----------
2183-
buildVtx3BodyDataTableKFParticle(collision1, trackPos1, trackNeg1, trackBach2, -1 /*vtx3bodyID*/, bachelorcharge, trackBach2.tofNSigmaDe());
2284+
bool isMatter1 = false;
2285+
if (trackBach1.sign() > 0) {
2286+
isMatter1 = true;
2287+
}
2288+
if (kfparticleConfigurations.mixingType == 0) { // mix deuteron
2289+
buildVtx3BodyDataTableKFParticle(collision1, trackPos1, trackNeg1, trackBach2, -1 /*vtx3bodyID*/, bachelorcharge, trackBach2.tofNSigmaDe());
2290+
buildVtx3BodyDataTableKFParticle(collision2, trackPos2, trackNeg2, trackBach1, -1 /*vtx3bodyID*/, bachelorcharge, trackBach1.tofNSigmaDe());
2291+
} else if (kfparticleConfigurations.mixingType == 1) { // mix proton
2292+
if (isMatter1 == true) {
2293+
buildVtx3BodyDataTableKFParticle(collision1, trackPos2, trackNeg1, trackBach1, -1 /*vtx3bodyID*/, bachelorcharge, trackBach1.tofNSigmaDe());
2294+
buildVtx3BodyDataTableKFParticle(collision2, trackPos1, trackNeg2, trackBach2, -1 /*vtx3bodyID*/, bachelorcharge, trackBach2.tofNSigmaDe());
2295+
} else if (isMatter1 == false) {
2296+
buildVtx3BodyDataTableKFParticle(collision1, trackPos1, trackNeg2, trackBach1, -1 /*vtx3bodyID*/, bachelorcharge, trackBach1.tofNSigmaDe());
2297+
buildVtx3BodyDataTableKFParticle(collision2, trackPos2, trackNeg1, trackBach2, -1 /*vtx3bodyID*/, bachelorcharge, trackBach2.tofNSigmaDe());
2298+
}
2299+
}
21842300
} // end decay3body combinations loop
21852301
}
21862302
PROCESS_SWITCH(decay3bodyBuilder, processRun3withKFParticleReduced3bodyMixing, "Produce KFParticle mixed decay3body tables from derived decay3body data", false);

PWGLF/TableProducer/Nuspex/reduced3bodyCreator.cxx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ struct reduced3bodyCreator {
105105
// Zorro counting
106106
Configurable<bool> cfgSkimmedProcessing{"cfgSkimmedProcessing", false, "Skimmed dataset processing"};
107107
// Flag for trigger
108-
Configurable<bool> cfgOnlyKeepH3L3Body{"cfgOnlyKeepH3L3Body", false, "Flag to keep only H3L3Body trigger"};
108+
Configurable<bool> cfgOnlyKeepInterestedTrigger{"cfgOnlyKeepInterestedTrigger", false, "Flag to keep only interested trigger"};
109+
Configurable<std::string> triggerList{"triggerList", "fH3L3Body", "List of triggers used to select events"};
110+
109111
Configurable<int> cfgMaterialCorrection{"cfgMaterialCorrection", static_cast<int>(o2::base::Propagator::MatCorrType::USEMatCorrNONE), "Type of material correction for DCAFitter"};
110112

111113
int mRunNumber;
@@ -152,7 +154,7 @@ struct reduced3bodyCreator {
152154
void initZorroBC(aod::BCsWithTimestamps::iterator const& bc)
153155
{
154156
if (cfgSkimmedProcessing) {
155-
zorro.initCCDB(ccdb.service, bc.runNumber(), bc.timestamp(), "fH3L3Body");
157+
zorro.initCCDB(ccdb.service, bc.runNumber(), bc.timestamp(), triggerList);
156158
zorro.populateHistRegistry(registry, bc.runNumber());
157159
}
158160
}
@@ -352,7 +354,7 @@ struct reduced3bodyCreator {
352354

353355
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
354356
initCCDB(bc);
355-
if (cfgSkimmedProcessing && cfgOnlyKeepH3L3Body) {
357+
if (cfgSkimmedProcessing && cfgOnlyKeepInterestedTrigger) {
356358
if (triggeredCollisions[collision.globalIndex()] == false) {
357359
continue;
358360
}

PWGLF/TableProducer/Nuspex/threebodyRecoTask.cxx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ struct ThreebodyRecoTask {
101101
//------------------------------------------------------------------
102102
PresliceUnsorted<aod::Vtx3BodyDatas> perCollisionVtx3BodyDatas = o2::aod::vtx3body::collisionId;
103103

104+
// Configurable for trigger selection
105+
Configurable<std::string> triggerList{"triggerList", "fH3L3Body", "List of triggers used to select events"};
106+
Configurable<bool> cfgOnlyKeepInterestedTrigger{"cfgOnlyKeepInterestedTrigger", false, "Flag to keep only interested trigger"};
104107
// Configuration to enable like-sign analysis
105108
Configurable<bool> cfgLikeSignAnalysis{"cfgLikeSignAnalysis", false, "Enable like-sign analysis"};
106109
// Selection criteria
@@ -275,7 +278,7 @@ struct ThreebodyRecoTask {
275278
}
276279

277280
if (cfgSkimmedProcessing) {
278-
zorro.initCCDB(ccdb.service, bc.runNumber(), bc.timestamp(), "fH3L3Body");
281+
zorro.initCCDB(ccdb.service, bc.runNumber(), bc.timestamp(), triggerList);
279282
zorro.populateHistRegistry(registry, bc.runNumber());
280283
}
281284

@@ -337,6 +340,10 @@ struct ThreebodyRecoTask {
337340
bool zorroSelected = zorro.isSelected(bc.globalBC()); /// Just let Zorro do the accounting
338341
if (zorroSelected) {
339342
registry.fill(HIST("hEventCounter"), 3.5);
343+
} else {
344+
if (cfgOnlyKeepInterestedTrigger) {
345+
return false;
346+
}
340347
}
341348
}
342349

0 commit comments

Comments
 (0)