Skip to content

Commit

Permalink
Move Partition out of process function (AliceO2Group#7696)
Browse files Browse the repository at this point in the history
* Move Pertition out of process function

* clang-format
  • Loading branch information
pbuehler authored Sep 16, 2024
1 parent 100912f commit b25257a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions EventFiltering/PWGUD/diffractionFilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,16 @@ struct DGFilterRun3 {
// using MFs = aod::MFTTracks;
using FWs = aod::FwdTracks;

// filter for global tracks
Filter globalTrackFilter = requireGlobalTrackInFilter();
using globalTracks = soa::Filtered<TCs>;

void process(CC const& collision,
BCs const& bcs,
TCs& tracks,
// MFs& mfttracks,
FWs& fwdtracks,
globalTracks& goodTracks,
aod::Zdcs& /*zdcs*/,
aod::FT0s& /*ft0s*/,
aod::FV0As& /*fv0as*/,
Expand All @@ -162,6 +167,7 @@ struct DGFilterRun3 {

// apply DG selection
auto isDGEvent = dgSelector.IsSelected(diffCuts, collision, bcRange, tracks, fwdtracks);
LOGF(debug, "isDGEvent %d", isDGEvent);

// update after cut histogram
registry.fill(HIST("stat/aftercuts"), isDGEvent + 2);
Expand Down Expand Up @@ -226,8 +232,9 @@ struct DGFilterRun3 {
// collisions
registry.fill(HIST("collisions/tracksAll"), tracks.size());
registry.fill(HIST("collisions/PVTracksAll"), collision.numContrib());
Partition<TCs> goodTracks = requireGlobalTrackInFilter();
goodTracks.bindTable(tracks);
// Partition<TCs> goodTracks = requireGlobalTrackInFilter();
// goodTracks.bindTable(tracks);
// LOGF(info, "# good tracks %d", goodTracks.size());
registry.get<TH1>(HIST("collisions/globalTracksAll"))->Fill(goodTracks.size());
auto netCharge = udhelpers::netCharge<true>(tracks);
registry.fill(HIST("collisions/netChargeAll"), collision.numContrib(), netCharge);
Expand Down
2 changes: 1 addition & 1 deletion PWGUD/Core/UDHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ T MCcompatibleBCs(F const& collision, int ndt, T const& bcs, int nMinBCs = 7)

// return if collisions has no associated BC
if (!collision.has_foundBC()) {
LOGF(info, "Collision %i - no BC found!", collision.globalIndex());
LOGF(debug, "Collision %i - no BC found!", collision.globalIndex());
return T{{bcs.asArrowTable()->Slice(0, 0)}, (uint64_t)0};
}

Expand Down

0 comments on commit b25257a

Please sign in to comment.