Skip to content

Commit 8de6992

Browse files
Merge branch 'AliceO2Group:master' into master
2 parents 8d32d5c + b17ec6d commit 8de6992

File tree

14 files changed

+278
-66
lines changed

14 files changed

+278
-66
lines changed

EventFiltering/PWGHF/HFFilter.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ struct HfFilter { // Main struct for HF triggers
223223
std::array<std::shared_ptr<TH1>, kNCharmParticles> hBDTScoreNonPrompt{};
224224
std::array<std::shared_ptr<TH2>, kNV0> hArmPod{};
225225
std::shared_ptr<TH2> hV0Selected;
226-
std::array<std::shared_ptr<TH1>, 2> hMassXi{}; // not tracked and tracked
226+
std::array<std::shared_ptr<TH2>, 2> hMassXi{}; // not tracked and tracked
227227
std::array<std::shared_ptr<TH2>, kNBeautyParticles> hCpaVsPtB{};
228228
std::array<std::shared_ptr<TH2>, kNBeautyParticles> hDecayLengthVsPtB{};
229229
std::array<std::shared_ptr<TH2>, kNBeautyParticles> hImpactParamProductVsPtB{};
@@ -390,8 +390,8 @@ struct HfFilter { // Main struct for HF triggers
390390
for (int iV0{kPhoton}; iV0 < kNV0; ++iV0) {
391391
hArmPod[iV0] = registry.add<TH2>(Form("fArmPod%s", v0Names[iV0].data()), Form("Armenteros Podolanski plot for selected %s;#it{#alpha};#it{q}_{T} (GeV/#it{c})", v0Labels[iV0].data()), HistType::kTH2D, {alphaAxis, qtAxis});
392392
}
393-
hMassXi[0] = registry.add<TH1>("fMassXi", "#it{M} distribution of #Xi candidates;#it{M} (GeV/#it{c}^{2});counts", HistType::kTH1D, {{100, 1.28f, 1.36f}});
394-
hMassXi[1] = registry.add<TH1>("fMassTrackedXi", "#it{M} distribution of #Xi candidates;#it{M} (GeV/#it{c}^{2});counts", HistType::kTH1D, {{100, 1.28f, 1.36f}});
393+
hMassXi[0] = registry.add<TH2>("fMassXi", "#it{M} distribution of #Xi candidates;sign;#it{M} (GeV/#it{c}^{2});counts", HistType::kTH2D, {{3, -1.5f, 1.5f}, {100, 1.28f, 1.36f}});
394+
hMassXi[1] = registry.add<TH2>("fMassTrackedXi", "#it{M} distribution of #Xi candidates;sign;#it{M} (GeV/#it{c}^{2});counts", HistType::kTH2D, {{3, -1.5f, 1.5f}, {100, 1.28f, 1.36f}});
395395

396396
if (activateQA > 1) {
397397
hPrDePID[0] = registry.add<TH2>("fProtonTPCPID", "#it{N}_{#sigma}^{TPC} vs. #it{p} for selected protons;#it{p} (GeV/#it{c});#it{N}_{#sigma}^{TPC}", HistType::kTH2D, {pAxis, nSigmaAxis});
@@ -1827,9 +1827,9 @@ struct HfFilter { // Main struct for HF triggers
18271827
}
18281828

18291829
if (activateQA) {
1830-
hMassXi[0]->Fill(cascCand.mXi);
1830+
hMassXi[0]->Fill(cascCand.sign, cascCand.mXi);
18311831
if (hasStrangeTrack) {
1832-
hMassXi[1]->Fill(cascCand.mXi);
1832+
hMassXi[1]->Fill(cascCand.sign, cascCand.mXi);
18331833
}
18341834
}
18351835

EventFiltering/PWGHF/HFFilterHelpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1651,7 +1651,7 @@ inline bool HfFilterHelper::isSelectedCascade(const Casc& casc)
16511651
}
16521652

16531653
// V0 mass
1654-
if (std::fabs(casc.v0.mLambda - massLambda) > mDeltaMassLambdaFromXi) {
1654+
if ((casc.sign < 0 && std::fabs(casc.v0.mLambda - massLambda) > mDeltaMassLambdaFromXi) || (casc.sign > 0 && std::fabs(casc.v0.mAntiLambda - massLambda) > mDeltaMassLambdaFromXi)) {
16551655
return false;
16561656
}
16571657

PWGCF/FemtoDream/Core/femtoDreamMath.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,18 @@ class FemtoDreamMath
140140
return std::sqrt(std::pow(getkT(part1, mass1, part2, mass2), 2.) + std::pow(0.5 * (mass1 + mass2), 2.));
141141
}
142142

143+
template <typename T1>
144+
static float calcInvMassV0(const T1& trackpos, const float masspos, const T1& trackneg, const float massneg)
145+
{
146+
// calculate the invariant mass
147+
const ROOT::Math::PtEtaPhiMVector posDaug(trackpos.pt(), trackpos.eta(), trackpos.phi(), masspos);
148+
const ROOT::Math::PtEtaPhiMVector negDaug(trackneg.pt(), trackneg.eta(), trackneg.phi(), massneg);
149+
// const ROOT::Math::PxPyPzMVector v0 = negDaug + posDaug;
150+
const ROOT::Math::PtEtaPhiMVector v0 = negDaug + posDaug;
151+
152+
return v0.M();
153+
}
154+
143155
template <typename T1>
144156
static float getInvMassCascade(const T1& trackpos, const float masspos, const T1& trackneg, const float massneg, const T1& trackbach, const float massbach, const float massv0)
145157
{

PWGCF/FemtoDream/Tasks/femtoDreamDebugV0.cxx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515

1616
#include "PWGCF/DataModel/FemtoDerived.h"
1717
#include "PWGCF/FemtoDream/Core/femtoDreamEventHisto.h"
18+
#include "PWGCF/FemtoDream/Core/femtoDreamMath.h"
1819
#include "PWGCF/FemtoDream/Core/femtoDreamParticleHisto.h"
20+
#include "PWGCF/FemtoDream/Core/femtoDreamUtils.h"
1921

2022
#include "DataFormatsParameters/GRPObject.h"
2123
#include "Framework/ASoAHelpers.h"
@@ -68,6 +70,11 @@ struct femtoDreamDebugV0 {
6870
ConfigurableAxis ConfChildTempFitVarBins{"ConfChildTempFitVarBins", {300, -0.15, 0.15}, "V0 child: binning of the TempFitVar in the pT vs. TempFitVar plot"};
6971
ConfigurableAxis ConfChildTempFitVarpTBins{"ConfChildTempFitVarpTBins", {20, 0.5, 4.05}, "V0 child: pT binning of the pT vs. TempFitVar plot"};
7072

73+
Configurable<bool> ConfIsLambda{"ConfIsLambda", false, "Set to true if V0 is Lambda, false if K0s"};
74+
Configurable<bool> ConfRejectCompetingMass{"ConfRejectCompetingMass", false, "Reject the competing Cascade Mass (use only for debugging. More efficient to exclude it already at the producer level)"};
75+
Configurable<float> ConfCompetingV0MassLowLimit{"ConfCompetingV0MassLowLimit", 0., "Lower Limit of the invariant mass window within which to reject the V0"};
76+
Configurable<float> ConfCompetingV0MassUpLimit{"ConfCompetingV0MassUpLimit", 0., "Upper Limit of the invariant mass window within which to reject the V0"};
77+
7178
using FemtoFullParticles = soa::Join<aod::FDParticles, aod::FDExtParticles>;
7279
Partition<FemtoFullParticles> partsV0 = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kV0)) && (ncheckbit(aod::femtodreamparticle::cut, ConfV01_CutBit));
7380
Preslice<FemtoFullParticles> perCol = aod::femtodreamparticle::fdCollisionId;
@@ -84,13 +91,21 @@ struct femtoDreamDebugV0 {
8491
HistogramRegistry EventRegistry{"Event", {}, OutputObjHandlingPolicy::AnalysisObject};
8592
HistogramRegistry V0Registry{"FullV0QA", {}, OutputObjHandlingPolicy::AnalysisObject};
8693

94+
float massProton;
95+
float massPion;
96+
8797
void init(InitContext&)
8898
{
8999
eventHisto.init(&EventRegistry, false);
90100
posChildHistos.init(&V0Registry, ConfBinmult, ConfDummy, ConfV0ChildTempFitVarMomentumBins, ConfDummy, ConfDummy, ConfChildTempFitVarBins, ConfV0ChildNsigmaTPCBins, ConfV0ChildNsigmaTOFBins, ConfV0ChildNsigmaTPCTOFBins, ConfV0ChildNsigmaITSBins, ConfV0InvMassBins, ConfDummy, false, ConfV01_ChildPos_PDGCode.value, true);
91101
negChildHistos.init(&V0Registry, ConfBinmult, ConfDummy, ConfV0ChildTempFitVarMomentumBins, ConfDummy, ConfDummy, ConfChildTempFitVarBins, ConfV0ChildNsigmaTPCBins, ConfV0ChildNsigmaTOFBins, ConfV0ChildNsigmaTPCTOFBins, ConfV0ChildNsigmaITSBins, ConfV0InvMassBins, ConfDummy, false, ConfV01_ChildNeg_PDGCode, true);
92102
motherHistos.init(&V0Registry, ConfBinmult, ConfDummy, ConfV0TempFitVarMomentumBins, ConfDummy, ConfDummy, ConfV0TempFitVarBins, ConfV0ChildNsigmaTPCBins, ConfV0ChildNsigmaTOFBins, ConfV0ChildNsigmaTPCTOFBins, ConfV0ChildNsigmaITSBins, ConfV0InvMassBins, ConfDummy, false, ConfV01_PDGCode.value, true);
93103
V0Registry.add("hArmenterosPodolanski/hArmenterosPodolanskiPlot", "; #alpha; p_{T} (MeV/#it{c})", kTH2F, {{100, -1, 1}, {500, -0.3, 2}});
104+
105+
massProton = o2::analysis::femtoDream::getMass(2212);
106+
massPion = o2::analysis::femtoDream::getMass(211);
107+
// massProton = getMass(2212);
108+
// massPion = getMass(211);
94109
}
95110

96111
/// Porduce QA plots for V0 selection in FemtoDream framework
@@ -132,6 +147,24 @@ struct femtoDreamDebugV0 {
132147
TVector3 p_perp = p_plus - (p_parent * (pL_plus / p_parent.Mag()));
133148
double qtarm = p_perp.Mag();
134149

150+
// Competing mass rejection
151+
if (ConfRejectCompetingMass) {
152+
float invMassCompetingV0;
153+
if (ConfIsLambda) {
154+
if (part.sign() < 0) {
155+
invMassCompetingV0 = FemtoDreamMath::calcInvMassV0(posChild, massPion, negChild, massProton);
156+
} else {
157+
invMassCompetingV0 = FemtoDreamMath::calcInvMassV0(posChild, massProton, negChild, massPion);
158+
}
159+
} else {
160+
invMassCompetingV0 = FemtoDreamMath::calcInvMassV0(posChild, massPion, negChild, massPion);
161+
}
162+
if (invMassCompetingV0 > ConfCompetingV0MassLowLimit.value &&
163+
invMassCompetingV0 < ConfCompetingV0MassUpLimit.value) {
164+
continue;
165+
}
166+
}
167+
135168
V0Registry.fill(HIST("hArmenterosPodolanski/hArmenterosPodolanskiPlot"), alpha, qtarm);
136169

137170
motherHistos.fillQA<false, true>(part, static_cast<aod::femtodreamparticle::MomentumType>(ConfV0TempFitVarMomentum.value), col.multNtr(), col.multV0M());

PWGCF/Flow/Tasks/flowMc.cxx

Lines changed: 47 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ struct FlowMc {
7878
O2_DEFINE_CONFIGURABLE(cfgFlowEfficiency, std::string, "", "CCDB path to efficiency object")
7979
O2_DEFINE_CONFIGURABLE(cfgCentVsIPTruth, std::string, "", "CCDB path to centrality vs IP truth")
8080
O2_DEFINE_CONFIGURABLE(cfgIsGlobalTrack, bool, false, "Use global tracks instead of hasTPC&&hasITS")
81-
O2_DEFINE_CONFIGURABLE(cfgK0Lambda0Enabled, bool, false, "Add K0 and Lambda0")
81+
O2_DEFINE_CONFIGURABLE(cfgK0Lambda0Enabled, bool, true, "Add K0 and Lambda0")
8282
O2_DEFINE_CONFIGURABLE(cfgFlowCumulantEnabled, bool, false, "switch of calculating flow")
8383
O2_DEFINE_CONFIGURABLE(cfgFlowCumulantNbootstrap, int, 30, "Number of subsamples")
8484
O2_DEFINE_CONFIGURABLE(cfgTrackDensityCorrUse, bool, false, "Use track density efficiency correction")
@@ -96,7 +96,6 @@ struct FlowMc {
9696

9797
Configurable<std::vector<double>> cfgTrackDensityP0{"cfgTrackDensityP0", std::vector<double>{0.6003720411, 0.6152630970, 0.6288860646, 0.6360694031, 0.6409494798, 0.6450540203, 0.6482117301, 0.6512592056, 0.6640008690, 0.6862631416, 0.7005738691, 0.7106567432, 0.7170728333}, "parameter 0 for track density efficiency correction"};
9898
Configurable<std::vector<double>> cfgTrackDensityP1{"cfgTrackDensityP1", std::vector<double>{-1.007592e-05, -8.932635e-06, -9.114538e-06, -1.054818e-05, -1.220212e-05, -1.312304e-05, -1.376433e-05, -1.412813e-05, -1.289562e-05, -1.050065e-05, -8.635725e-06, -7.380821e-06, -6.201250e-06}, "parameter 1 for track density efficiency correction"};
99-
float maxEta = 0.8;
10099

101100
ConfigurableAxis axisB{"axisB", {100, 0.0f, 20.0f}, ""};
102101
ConfigurableAxis axisCentrality{"axisCentrality", {VARIABLE_WIDTH, 0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90}, "X axis for histograms"};
@@ -162,9 +161,10 @@ struct FlowMc {
162161
const AxisSpec axisEta{20, -1., 1., "#eta"};
163162
const AxisSpec axisCounter{1, 0, +1, ""};
164163
// QA histograms
165-
histos.add<TH1>("mcEventCounter", "Monte Carlo Truth EventCounter", HistType::kTH1F, {axisCounter});
166-
histos.add<TH1>("numberOfRecoCollisions", "numberOfRecoCollisions", HistType::kTH1F, {{10, -0.5f, 9.5f}});
167-
histos.add<TH1>("RecoEventCounter", "Reconstruction EventCounter", HistType::kTH1F, {axisCounter});
164+
histos.add<TH1>("mcEventCounter", "Monte Carlo Truth EventCounter", HistType::kTH1F, {{5, 0, 5}});
165+
histos.add<TH1>("numberOfRecoCollisions", "numberOfRecoCollisions", HistType::kTH1F, {{10, -1.5f, 8.5f}});
166+
histos.add<TH1>("RecoEventCounter", "Reconstruction EventCounter", HistType::kTH1F, {{5, 0, 5}});
167+
histos.add<TH1>("RecoProcessEventCounter", "Reconstruction EventCounter", HistType::kTH1F, {{5, 0, 5}});
168168
histos.add<TH1>("hnTPCClu", "Number of found TPC clusters", HistType::kTH1D, {{100, 40, 180}});
169169
histos.add<TH1>("hnITSClu", "Number of found ITS clusters", HistType::kTH1D, {{100, 0, 20}});
170170
// pT histograms
@@ -209,6 +209,8 @@ struct FlowMc {
209209
histos.add<TH1>("hPtMCGen", "Monte Carlo Truth; pT (GeV/c);", {HistType::kTH1D, {axisPt}});
210210
histos.add<TH3>("hEtaPtVtxzMCGen", "Monte Carlo Truth; #eta; p_{T} (GeV/c); V_{z} (cm);", {HistType::kTH3D, {axisEta, axisPt, axisVertex}});
211211
histos.add<TH1>("hPtMCGlobal", "Monte Carlo Global; pT (GeV/c);", {HistType::kTH1D, {axisPt}});
212+
histos.add<TH1>("hPtReco", "Monte Carlo Reco Global; pT (GeV/c);", {HistType::kTH1D, {axisPt}});
213+
histos.add<TH1>("hPtReco_PhysicalPrimary", "Monte Carlo Reco Global; pT (GeV/c);", {HistType::kTH1D, {axisPt}});
212214
histos.add<TH3>("hEtaPtVtxzMCGlobal", "Monte Carlo Global; #eta; p_{T} (GeV/c); V_{z} (cm);", {HistType::kTH3D, {axisEta, axisPt, axisVertex}});
213215
histos.add<TH1>("hPhiWeightedTrDen", "corrected #phi distribution, considering track density", {HistType::kTH1D, {axisPhi}});
214216

@@ -447,9 +449,9 @@ struct FlowMc {
447449
return myTrackSel.IsSelected(track);
448450
}
449451

450-
void process(FilteredMcCollisions::iterator const& mcCollision, aod::BCsWithTimestamps const&, soa::SmallGroups<soa::Join<aod::McCollisionLabels, aod::Collisions, aod::EvSels>> const& collisions, FilteredMcParticles const& mcParticles, FilteredTracks const&)
452+
void processMCTrue(FilteredMcCollisions::iterator const& mcCollision, aod::BCsWithTimestamps const&, soa::SmallGroups<soa::Join<aod::McCollisionLabels, aod::Collisions, aod::EvSels>> const& collisions, FilteredMcParticles const& mcParticles, FilteredTracks const&)
451453
{
452-
454+
histos.fill(HIST("mcEventCounter"), 0.5);
453455
float imp = mcCollision.impactParameter();
454456
float evPhi = mcCollision.eventPlaneAngle();
455457
float vtxz = mcCollision.posZ();
@@ -465,21 +467,23 @@ struct FlowMc {
465467
loadCorrections(bc.timestamp());
466468

467469
if (collisions.size() > -1) {
468-
histos.fill(HIST("mcEventCounter"), 0.5);
469470
histos.fill(HIST("numberOfRecoCollisions"), collisions.size()); // number of times coll was reco-ed
471+
histos.fill(HIST("RecoEventCounter"), 0.5);
470472
if (cfgRecoEvRejectMC) {
471473
if (collisions.size() != 1) { // only pass those have one reconstruction event
472474
return;
473475
}
476+
histos.fill(HIST("RecoEventCounter"), 1.5);
474477
for (auto const& collision : collisions) {
475478
if (!eventSelected(collision))
476479
return;
477480
}
481+
histos.fill(HIST("RecoEventCounter"), 2.5);
478482
}
479-
histos.fill(HIST("RecoEventCounter"), 0.5);
480483
}
484+
histos.fill(HIST("RecoEventCounter"), 3.5);
481485

482-
if (imp > minB && imp < maxB) {
486+
if (imp >= minB && imp <= maxB) {
483487
// event within range
484488
histos.fill(HIST("hImpactParameter"), imp);
485489
histos.fill(HIST("hEventPlaneAngle"), evPhi);
@@ -502,7 +506,7 @@ struct FlowMc {
502506
continue;
503507
if (!mcParticle.isPhysicalPrimary())
504508
continue;
505-
if (std::fabs(mcParticle.eta()) > maxEta) // main acceptance
509+
if (std::fabs(mcParticle.eta()) > cfgCutEta) // main acceptance
506510
continue;
507511
if (mcParticle.has_tracks()) {
508512
auto const& tracks = mcParticle.tracks_as<FilteredTracks>();
@@ -551,7 +555,7 @@ struct FlowMc {
551555

552556
if (!mcParticle.isPhysicalPrimary())
553557
continue;
554-
if (std::fabs(mcParticle.eta()) > maxEta) // main acceptance
558+
if (std::fabs(mcParticle.eta()) > cfgCutEta) // main acceptance
555559
continue;
556560

557561
float deltaPhi = mcParticle.phi() - mcCollision.eventPlaneAngle();
@@ -696,6 +700,37 @@ struct FlowMc {
696700
}
697701
histos.fill(HIST("hNchVsImpactParameter"), imp, nCh);
698702
}
703+
PROCESS_SWITCH(FlowMc, processMCTrue, "process pure simulation information", true);
704+
705+
void processReco(soa::Join<aod::Collisions, aod::EvSels, aod::McCollisionLabels>::iterator const& collision, aod::BCsWithTimestamps const&, FilteredTracks const& tracks, aod::McParticles const&, aod::McCollisions const&)
706+
{
707+
histos.fill(HIST("RecoProcessEventCounter"), 0.5);
708+
if (!eventSelected(collision))
709+
return;
710+
histos.fill(HIST("RecoProcessEventCounter"), 1.5);
711+
if (tracks.size() < 1)
712+
return;
713+
histos.fill(HIST("RecoProcessEventCounter"), 2.5);
714+
for (const auto& track : tracks) {
715+
if (!trackSelected(track))
716+
continue;
717+
histos.fill(HIST("hPtReco"), track.pt());
718+
auto mcParticle = track.mcParticle();
719+
int pdgCode = std::abs(mcParticle.pdgCode());
720+
bool extraPDGType = true;
721+
if (cfgK0Lambda0Enabled) {
722+
extraPDGType = (pdgCode != PDG_t::kK0Short && pdgCode != PDG_t::kLambda0);
723+
}
724+
if (extraPDGType && pdgCode != PDG_t::kElectron && pdgCode != PDG_t::kMuonMinus && pdgCode != PDG_t::kPiPlus && pdgCode != kKPlus && pdgCode != PDG_t::kProton)
725+
continue;
726+
if (!mcParticle.isPhysicalPrimary())
727+
continue;
728+
if (std::fabs(mcParticle.eta()) > cfgCutEta) // main acceptance
729+
continue;
730+
histos.fill(HIST("hPtReco_PhysicalPrimary"), track.pt());
731+
}
732+
}
733+
PROCESS_SWITCH(FlowMc, processReco, "process reconstructed information", true);
699734
};
700735

701736
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)

PWGCF/Flow/Tasks/flowTask.cxx

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#include "TList.h"
4242
#include <TF1.h>
4343
#include <TObjArray.h>
44+
#include <TPDGCode.h>
4445
#include <TProfile.h>
4546
#include <TRandom3.h>
4647

@@ -300,6 +301,7 @@ struct FlowTask {
300301
std::string hCentTitle = "Centrality distribution, Estimator " + std::to_string(cfgCentEstimator);
301302
registry.add("hCent", hCentTitle.c_str(), {HistType::kTH1D, {{100, 0, 100}}});
302303
if (doprocessMCGen) {
304+
registry.add("MCGen/hMCEventCount", "Number of Event;; Count", {HistType::kTH1D, {{5, 0, 5}}});
303305
registry.add("MCGen/MChVtxZ", "Vexter Z distribution", {HistType::kTH1D, {axisVertex}});
304306
registry.add("MCGen/MChMult", "Multiplicity distribution", {HistType::kTH1D, {{3000, 0.5, 3000.5}}});
305307
registry.add("MCGen/MChCent", hCentTitle.c_str(), {HistType::kTH1D, {{100, 0, 100}}});
@@ -360,7 +362,7 @@ struct FlowTask {
360362
if (doprocessMCGen) {
361363
registry.add("MCGen/MChPhi", "#phi distribution", {HistType::kTH1D, {axisPhi}});
362364
registry.add("MCGen/MChEta", "#eta distribution", {HistType::kTH1D, {axisEta}});
363-
registry.add("MCGen/MChPtRef", "p_{T} distribution after cut", {HistType::kTH1D, {axisPtHist}});
365+
registry.add("MCGen/MChPt", "p_{T} distribution after cut", {HistType::kTH1D, {axisPtHist}});
364366
registry.add("hMeanPtWithinGap08_MC", "mean p_{T}", {HistType::kTProfile, {axisIndependent}});
365367
for (auto i = 0; i < cfgNbootstrap; i++) {
366368
bootstrapArray[i][kMeanPtWithinGap08_MC] = registry.add<TProfile>(Form("BootstrapContainer_%d/hMeanPtWithinGap08_MC", i), "", {HistType::kTProfile, {axisIndependent}});
@@ -1242,14 +1244,26 @@ struct FlowTask {
12421244

12431245
void processMCGen(FilteredMcCollisions::iterator const& mcCollision, FilteredSmallGroupMcCollisions const& collisions, FilteredMcParticles const& mcParticles)
12441246
{
1247+
registry.fill(HIST("MCGen/hMCEventCount"), 0.5);
12451248
if (collisions.size() != 1)
12461249
return;
1250+
registry.fill(HIST("MCGen/hMCEventCount"), 1.5);
12471251

12481252
float cent = -1.;
12491253
for (const auto& collision : collisions) {
12501254
cent = getCentrality(collision);
12511255
}
12521256

1257+
if (cfgUseAdditionalEventCut) {
1258+
for (auto const& collision : collisions) {
1259+
if (!collision.sel8())
1260+
return;
1261+
if (!eventSelected(collision, mcParticles.size(), cent))
1262+
return;
1263+
}
1264+
}
1265+
registry.fill(HIST("MCGen/hMCEventCount"), 2.5);
1266+
12531267
float lRandom = fRndm->Rndm();
12541268
float vtxz = mcCollision.posZ();
12551269
registry.fill(HIST("MCGen/MChVtxZ"), vtxz);
@@ -1262,26 +1276,25 @@ struct FlowTask {
12621276
fGFW->Clear();
12631277
fFCptgen->clearVector();
12641278

1265-
if (cfgUseAdditionalEventCut) {
1266-
for (auto const& collision : collisions) {
1267-
if (!eventSelected(collision, mcParticles.size(), cent))
1268-
return;
1269-
}
1270-
}
1271-
12721279
double ptSum_Gap08 = 0.;
12731280
double count_Gap08 = 0.;
12741281
for (const auto& mcParticle : mcParticles) {
1282+
int pdgCode = std::abs(mcParticle.pdgCode());
1283+
bool extraPDGType = (pdgCode != PDG_t::kK0Short && pdgCode != PDG_t::kLambda0);
1284+
if (extraPDGType && pdgCode != PDG_t::kElectron && pdgCode != PDG_t::kMuonMinus && pdgCode != PDG_t::kPiPlus && pdgCode != kKPlus && pdgCode != PDG_t::kProton)
1285+
continue;
12751286
if (!mcParticle.isPhysicalPrimary())
12761287
continue;
1288+
if (std::fabs(mcParticle.eta()) > cfgCutEta) // main acceptance
1289+
continue;
12771290
bool withinPtPOI = (cfgCutPtPOIMin < mcParticle.pt()) && (mcParticle.pt() < cfgCutPtPOIMax); // within POI pT range
12781291
bool withinPtRef = (cfgCutPtRefMin < mcParticle.pt()) && (mcParticle.pt() < cfgCutPtRefMax); // within RF pT range
12791292
bool withinEtaGap08 = (std::abs(mcParticle.eta()) < cfgCutEta);
12801293

1294+
registry.fill(HIST("MCGen/MChPt"), mcParticle.pt());
12811295
if (withinPtRef) {
12821296
registry.fill(HIST("MCGen/MChPhi"), mcParticle.phi());
12831297
registry.fill(HIST("MCGen/MChEta"), mcParticle.eta());
1284-
registry.fill(HIST("MCGen/MChPtRef"), mcParticle.pt());
12851298
if (withinEtaGap08) {
12861299
ptSum_Gap08 += mcParticle.pt();
12871300
count_Gap08 += 1.;

0 commit comments

Comments
 (0)