Skip to content

Commit

Permalink
PWGEM/Dilepton: add occupancy filter for speed-up (AliceO2Group#7420)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsekihat authored Aug 25, 2024
1 parent 142200b commit c41071f
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions PWGEM/Dilepton/Core/Dilepton.h
Original file line number Diff line number Diff line change
Expand Up @@ -967,6 +967,7 @@ struct Dilepton {

Filter collisionFilter_centrality = (cfgCentMin < o2::aod::cent::centFT0M && o2::aod::cent::centFT0M < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0A && o2::aod::cent::centFT0A < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0C && o2::aod::cent::centFT0C < cfgCentMax);
Filter collisionFilter_multiplicity = cfgNtracksPV08Min <= o2::aod::mult::multNTracksPV && o2::aod::mult::multNTracksPV < cfgNtracksPV08Max;
Filter collisionFilter_occupancy = eventcuts.cfgOccupancyMin <= o2::aod::evsel::trackOccupancyInTimeRange && o2::aod::evsel::trackOccupancyInTimeRange < eventcuts.cfgOccupancyMax;
using FilteredMyCollisions = soa::Filtered<MyCollisions>;

SliceCache cache;
Expand Down
1 change: 1 addition & 0 deletions PWGEM/Dilepton/Core/DileptonMC.h
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,7 @@ struct DileptonMC {

Filter collisionFilter_centrality = (cfgCentMin < o2::aod::cent::centFT0M && o2::aod::cent::centFT0M < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0A && o2::aod::cent::centFT0A < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0C && o2::aod::cent::centFT0C < cfgCentMax);
Filter collisionFilter_multiplicity = cfgNtracksPV08Min <= o2::aod::mult::multNTracksPV && o2::aod::mult::multNTracksPV < cfgNtracksPV08Max;
Filter collisionFilter_occupancy = eventcuts.cfgOccupancyMin <= o2::aod::evsel::trackOccupancyInTimeRange && o2::aod::evsel::trackOccupancyInTimeRange < eventcuts.cfgOccupancyMax;
using FilteredMyCollisions = soa::Filtered<MyCollisions>;

template <typename TCollisions, typename TMCLeptons, typename TPreslice, typename TCut, typename TMCCollisions, typename TMCParticles>
Expand Down
1 change: 1 addition & 0 deletions PWGEM/Dilepton/Core/PhotonHBT.h
Original file line number Diff line number Diff line change
Expand Up @@ -1208,6 +1208,7 @@ struct PhotonHBT {

Filter collisionFilter_centrality = (cfgCentMin < o2::aod::cent::centFT0M && o2::aod::cent::centFT0M < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0A && o2::aod::cent::centFT0A < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0C && o2::aod::cent::centFT0C < cfgCentMax);
Filter collisionFilter_multiplicity = cfgNtracksPV08Min <= o2::aod::mult::multNTracksPV && o2::aod::mult::multNTracksPV < cfgNtracksPV08Max;
Filter collisionFilter_occupancy = eventcuts.cfgOccupancyMin <= o2::aod::evsel::trackOccupancyInTimeRange && o2::aod::evsel::trackOccupancyInTimeRange < eventcuts.cfgOccupancyMax;
using FilteredMyCollisions = soa::Filtered<MyCollisions>;

int ndf = 0;
Expand Down
1 change: 1 addition & 0 deletions PWGEM/Dilepton/Core/SingleTrackQC.h
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,7 @@ struct SingleTrackQC {

Filter collisionFilter_centrality = (cfgCentMin < o2::aod::cent::centFT0M && o2::aod::cent::centFT0M < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0A && o2::aod::cent::centFT0A < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0C && o2::aod::cent::centFT0C < cfgCentMax);
Filter collisionFilter_multiplicity = cfgNtracksPV08Min <= o2::aod::mult::multNTracksPV && o2::aod::mult::multNTracksPV < cfgNtracksPV08Max;
Filter collisionFilter_occupancy = eventcuts.cfgOccupancyMin <= o2::aod::evsel::trackOccupancyInTimeRange && o2::aod::evsel::trackOccupancyInTimeRange < eventcuts.cfgOccupancyMax;
using FilteredMyCollisions = soa::Filtered<MyCollisions>;

void processQC(FilteredMyCollisions const& collisions, Types const&... args)
Expand Down
1 change: 1 addition & 0 deletions PWGEM/Dilepton/Core/SingleTrackQCMC.h
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,7 @@ struct SingleTrackQCMC {

Filter collisionFilter_centrality = (cfgCentMin < o2::aod::cent::centFT0M && o2::aod::cent::centFT0M < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0A && o2::aod::cent::centFT0A < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0C && o2::aod::cent::centFT0C < cfgCentMax);
Filter collisionFilter_multiplicity = cfgNtracksPV08Min <= o2::aod::mult::multNTracksPV && o2::aod::mult::multNTracksPV < cfgNtracksPV08Max;
Filter collisionFilter_occupancy = eventcuts.cfgOccupancyMin <= o2::aod::evsel::trackOccupancyInTimeRange && o2::aod::evsel::trackOccupancyInTimeRange < eventcuts.cfgOccupancyMax;
using FilteredMyCollisions = soa::Filtered<MyCollisions>;

Partition<aod::EMMCParticles> electronsMC = nabs(o2::aod::mcparticle::pdgCode) == 11; // e+, e-
Expand Down
8 changes: 6 additions & 2 deletions PWGEM/Dilepton/Tasks/eventQC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct eventQC {
Configurable<int> cfgCentEstimator{"cfgCentEstimator", 2, "FT0M:0, FT0A:1, FT0C:2"};
Configurable<float> cfgCentMin{"cfgCentMin", 0, "min. centrality"};
Configurable<float> cfgCentMax{"cfgCentMax", 999.f, "max. centrality"};
ConfigurableAxis ConfPtBins{"ConfPtBins", {VARIABLE_WIDTH, 0.00, 0.10, 0.15, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90, 1.00, 1.10, 1.20, 1.30, 1.40, 1.50, 1.60, 1.70, 1.80, 1.90, 2.00, 2.50, 3.00, 3.50, 4.00, 4.50, 5.00, 6.00, 7.00, 8.00, 9.00, 10.00}, "pT bins for output histograms"};
ConfigurableAxis ConfPtBins{"ConfPtBins", {VARIABLE_WIDTH, 0.00, 0.05, 0.10, 0.15, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90, 1.00, 1.10, 1.20, 1.30, 1.40, 1.50, 1.60, 1.70, 1.80, 1.90, 2.00, 2.50, 3.00, 3.50, 4.00, 4.50, 5.00, 6.00, 7.00, 8.00, 9.00, 10.00}, "pT bins for output histograms"};

struct : ConfigurableGroup {
std::string prefix = "eventcut_group";
Expand Down Expand Up @@ -188,6 +188,8 @@ struct eventQC {
const AxisSpec axis_sign{3, -1.5, +1.5, "sign"};
fRegistry.add("Track/hs", "rec. single electron", kTHnSparseD, {axis_pt, axis_eta, axis_phi, axis_sign}, true);
fRegistry.add("Track/hQoverPt", "q/pT;q/p_{T} (GeV/c)^{-1}", kTH1F, {{400, -20, 20}}, false);
fRegistry.add("Track/hSigma1Pt", "#sigma_{1/p_{T}} vs. q/p_{T};q/p_{T} (GeV/c)^{-1};#sigma_{1/p_{T}} (GeV/c)^{-1}", kTH2F, {{400, -20, 20}, {200, 0, 0.2}}, false);
fRegistry.add("Track/hRelSigma1Pt", "relative p_{T} resolution;p_{T} (GeV/c);#sigma_{1/p_{T}} #times p_{T}", kTH2F, {{1000, 0, 10}, {100, 0, 0.1}}, false);
fRegistry.add("Track/hDCAxyz", "DCA xy vs. z;DCA_{xy} (cm);DCA_{z} (cm)", kTH2F, {{200, -1.0f, 1.0f}, {200, -1.0f, 1.0f}}, false);
fRegistry.add("Track/hDCAxyzSigma", "DCA xy vs. z;DCA_{xy} (#sigma);DCA_{z} (#sigma)", kTH2F, {{200, -10.0f, 10.0f}, {200, -10.0f, 10.0f}}, false);
fRegistry.add("Track/hDCAxyRes_Pt", "DCA_{xy} resolution vs. pT;p_{T} (GeV/c);DCA_{xy} resolution (#mum)", kTH2F, {{200, 0, 10}, {200, 0., 400}}, false);
Expand Down Expand Up @@ -219,7 +221,9 @@ struct eventQC {
void fillTrackInfo(TTrack const& track)
{
fRegistry.fill(HIST("Track/hs"), track.pt(), track.eta(), track.phi(), track.sign());
fRegistry.fill(HIST("Track/hQoverPt"), track.sign() / track.pt());
fRegistry.fill(HIST("Track/hQoverPt"), track.signed1Pt());
fRegistry.fill(HIST("Track/hSigma1Pt"), track.signed1Pt(), track.sigma1Pt());
fRegistry.fill(HIST("Track/hRelSigma1Pt"), track.pt(), track.sigma1Pt() * track.pt());
fRegistry.fill(HIST("Track/hDCAxyz"), track.dcaXY(), track.dcaZ());
fRegistry.fill(HIST("Track/hDCAxyzSigma"), track.dcaXY() / sqrt(track.cYY()), track.dcaZ() / sqrt(track.cZZ()));
fRegistry.fill(HIST("Track/hDCAxyRes_Pt"), track.pt(), sqrt(track.cYY()) * 1e+4); // convert cm to um
Expand Down
1 change: 1 addition & 0 deletions PWGEM/PhotonMeson/Tasks/pcmQC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ struct PCMQC {

Preslice<MyV0Photons> perCollision = aod::v0photonkf::emeventId;
Filter collisionFilter_centrality = (cfgCentMin < o2::aod::cent::centFT0M && o2::aod::cent::centFT0M < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0A && o2::aod::cent::centFT0A < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0C && o2::aod::cent::centFT0C < cfgCentMax);
Filter collisionFilter_occupancy = eventcuts.cfgOccupancyMin <= o2::aod::evsel::trackOccupancyInTimeRange && o2::aod::evsel::trackOccupancyInTimeRange < eventcuts.cfgOccupancyMax;
using FilteredMyCollisions = soa::Filtered<MyCollisions>;

void processQC(FilteredMyCollisions const& collisions, MyV0Photons const& v0photons, aod::V0Legs const&)
Expand Down
1 change: 1 addition & 0 deletions PWGEM/PhotonMeson/Tasks/pcmQCMC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ struct PCMQCMC {
}

Filter collisionFilter_centrality = (cfgCentMin < o2::aod::cent::centFT0M && o2::aod::cent::centFT0M < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0A && o2::aod::cent::centFT0A < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0C && o2::aod::cent::centFT0C < cfgCentMax);
Filter collisionFilter_occupancy = eventcuts.cfgOccupancyMin <= o2::aod::evsel::trackOccupancyInTimeRange && o2::aod::evsel::trackOccupancyInTimeRange < eventcuts.cfgOccupancyMax;
using FilteredMyCollisions = soa::Filtered<MyCollisions>;

Preslice<MyV0Photons> perCollision = aod::v0photonkf::emeventId;
Expand Down

0 comments on commit c41071f

Please sign in to comment.