Skip to content

Commit a55ce0c

Browse files
committed
Add OTF process function
1 parent c5b6932 commit a55ce0c

File tree

1 file changed

+86
-80
lines changed

1 file changed

+86
-80
lines changed

PWGCF/GenericFramework/Tasks/flowGenericFramework.cxx

Lines changed: 86 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,10 @@
5252

5353
using namespace o2;
5454
using namespace o2::framework;
55-
using namespace o2::framework::expressions;
56-
using namespace o2::analysis;
57-
using namespace o2::constants::math;
5855

5956
#define O2_DEFINE_CONFIGURABLE(NAME, TYPE, DEFAULT, HELP) Configurable<TYPE> NAME{#NAME, DEFAULT, HELP};
6057

61-
namespace o2::analysis::genericframework
58+
namespace o2::analysis::gfw
6259
{
6360
std::vector<double> ptbinning = {0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.2, 2.4, 2.6, 2.8, 3, 3.5, 4, 5, 6, 8, 10};
6461
float ptpoilow = 0.2, ptpoiup = 10.0;
@@ -70,17 +67,15 @@ int vtxZbins = 40;
7067
float vtxZlow = -10.0, vtxZup = 10.0;
7168
int phibins = 72;
7269
float philow = 0.0;
73-
float phiup = TwoPI;
70+
float phiup = o2::constants::math::TwoPI;
7471
int nchbins = 300;
7572
float nchlow = 0;
7673
float nchup = 3000;
7774
std::vector<double> centbinning(90);
7875
int nBootstrap = 10;
7976
GFWRegions regions;
8077
GFWCorrConfigs configs;
81-
} // namespace o2::analysis::genericframework
82-
83-
using namespace o2::analysis::genericframework;
78+
} // namespace o2::analysis::gfw
8479

8580
struct FlowGenericFramework {
8681

@@ -208,39 +203,39 @@ struct FlowGenericFramework {
208203
void init(InitContext const&)
209204
{
210205
LOGF(info, "flowGenericFramework::init()");
211-
regions.SetNames(cfgRegions->GetNames());
212-
regions.SetEtaMin(cfgRegions->GetEtaMin());
213-
regions.SetEtaMax(cfgRegions->GetEtaMax());
214-
regions.SetpTDifs(cfgRegions->GetpTDifs());
215-
regions.SetBitmasks(cfgRegions->GetBitmasks());
216-
configs.SetCorrs(cfgCorrConfig->GetCorrs());
217-
configs.SetHeads(cfgCorrConfig->GetHeads());
218-
configs.SetpTDifs(cfgCorrConfig->GetpTDifs());
219-
configs.SetpTCorrMasks(cfgCorrConfig->GetpTCorrMasks());
220-
regions.Print();
221-
configs.Print();
222-
ptbinning = cfgGFWBinning->GetPtBinning();
223-
ptpoilow = cfgGFWBinning->GetPtPOImin();
224-
ptpoiup = cfgGFWBinning->GetPtPOImax();
225-
ptreflow = cfgGFWBinning->GetPtRefMin();
226-
ptrefup = cfgGFWBinning->GetPtRefMax();
227-
ptlow = cfgPtmin;
228-
ptup = cfgPtmax;
229-
etabins = cfgGFWBinning->GetEtaBins();
230-
vtxZbins = cfgGFWBinning->GetVtxZbins();
231-
phibins = cfgGFWBinning->GetPhiBins();
232-
philow = 0.0f;
233-
phiup = TwoPI;
234-
nchbins = cfgGFWBinning->GetNchBins();
235-
nchlow = cfgGFWBinning->GetNchMin();
236-
nchup = cfgGFWBinning->GetNchMax();
237-
centbinning = cfgGFWBinning->GetCentBinning();
206+
o2::analysis::gfw::regions.SetNames(cfgRegions->GetNames());
207+
o2::analysis::gfw::regions.SetEtaMin(cfgRegions->GetEtaMin());
208+
o2::analysis::gfw::regions.SetEtaMax(cfgRegions->GetEtaMax());
209+
o2::analysis::gfw::regions.SetpTDifs(cfgRegions->GetpTDifs());
210+
o2::analysis::gfw::regions.SetBitmasks(cfgRegions->GetBitmasks());
211+
o2::analysis::gfw::configs.SetCorrs(cfgCorrConfig->GetCorrs());
212+
o2::analysis::gfw::configs.SetHeads(cfgCorrConfig->GetHeads());
213+
o2::analysis::gfw::configs.SetpTDifs(cfgCorrConfig->GetpTDifs());
214+
o2::analysis::gfw::configs.SetpTCorrMasks(cfgCorrConfig->GetpTCorrMasks());
215+
o2::analysis::gfw::regions.Print();
216+
o2::analysis::gfw::configs.Print();
217+
o2::analysis::gfw::ptbinning = cfgGFWBinning->GetPtBinning();
218+
o2::analysis::gfw::ptpoilow = cfgGFWBinning->GetPtPOImin();
219+
o2::analysis::gfw::ptpoiup = cfgGFWBinning->GetPtPOImax();
220+
o2::analysis::gfw::ptreflow = cfgGFWBinning->GetPtRefMin();
221+
o2::analysis::gfw::ptrefup = cfgGFWBinning->GetPtRefMax();
222+
o2::analysis::gfw::ptlow = cfgPtmin;
223+
o2::analysis::gfw::ptup = cfgPtmax;
224+
o2::analysis::gfw::etabins = cfgGFWBinning->GetEtaBins();
225+
o2::analysis::gfw::vtxZbins = cfgGFWBinning->GetVtxZbins();
226+
o2::analysis::gfw::phibins = cfgGFWBinning->GetPhiBins();
227+
o2::analysis::gfw::philow = 0.0f;
228+
o2::analysis::gfw::phiup = o2::constants::math::TwoPI;
229+
o2::analysis::gfw::nchbins = cfgGFWBinning->GetNchBins();
230+
o2::analysis::gfw::nchlow = cfgGFWBinning->GetNchMin();
231+
o2::analysis::gfw::nchup = cfgGFWBinning->GetNchMax();
232+
o2::analysis::gfw::centbinning = cfgGFWBinning->GetCentBinning();
238233
cfgGFWBinning->Print();
239234

240-
AxisSpec phiAxis = {phibins, philow, phiup, "#phi"};
241-
AxisSpec etaAxis = {etabins, -cfgEta, cfgEta, "#eta"};
242-
AxisSpec vtxAxis = {vtxZbins, -cfgVtxZ, cfgVtxZ, "Vtx_{z} (cm)"};
243-
AxisSpec ptAxis = {ptbinning, "#it{p}_{T} GeV/#it{c}"};
235+
AxisSpec phiAxis = {o2::analysis::gfw::phibins, o2::analysis::gfw::philow, o2::analysis::gfw::phiup, "#phi"};
236+
AxisSpec etaAxis = {o2::analysis::gfw::etabins, -cfgEta, cfgEta, "#eta"};
237+
AxisSpec vtxAxis = {o2::analysis::gfw::vtxZbins, -cfgVtxZ, cfgVtxZ, "Vtx_{z} (cm)"};
238+
AxisSpec ptAxis = {o2::analysis::gfw::ptbinning, "#it{p}_{T} GeV/#it{c}"};
244239
std::string sCentralityEstimator;
245240
switch (cfgCentEstimator) {
246241
case kCentFT0C:
@@ -259,11 +254,11 @@ struct FlowGenericFramework {
259254
sCentralityEstimator = "FT0C";
260255
}
261256
sCentralityEstimator += " centrality (%)";
262-
AxisSpec centAxis = {centbinning, sCentralityEstimator.c_str()};
257+
AxisSpec centAxis = {o2::analysis::gfw::centbinning, sCentralityEstimator.c_str()};
263258
std::vector<double> nchbinning;
264-
int nchskip = (nchup - nchlow) / nchbins;
265-
for (int i = 0; i <= nchbins; ++i) {
266-
nchbinning.push_back(nchskip * i + nchlow + 0.5);
259+
int nchskip = (o2::analysis::gfw::nchup - o2::analysis::gfw::nchlow) / o2::analysis::gfw::nchbins;
260+
for (int i = 0; i <= o2::analysis::gfw::nchbins; ++i) {
261+
nchbinning.push_back(nchskip * i + o2::analysis::gfw::nchlow + 0.5);
267262
}
268263
AxisSpec nchAxis = {nchbinning, "N_{ch}"};
269264
AxisSpec t0cAxis = {70, 0, 70000, "N_{ch} (T0C)"};
@@ -279,8 +274,8 @@ struct FlowGenericFramework {
279274
int64_t now = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
280275
ccdb->setCreatedNotAfter(now);
281276

282-
int ptbins = ptbinning.size() - 1;
283-
fPtAxis = new TAxis(ptbins, &ptbinning[0]);
277+
int ptbins = o2::analysis::gfw::ptbinning.size() - 1;
278+
fPtAxis = new TAxis(ptbins, &o2::analysis::gfw::ptbinning[0]);
284279

285280
if (doprocessMCGen) {
286281
registry.add("MCGen/before/pt_gen", "", {HistType::kTH1D, {ptAxis}});
@@ -297,8 +292,8 @@ struct FlowGenericFramework {
297292
registry.add("trackQA/before/nTPCCrossedRows", "Number of crossed TPC Rows", {HistType::kTH1D, {{100, 40, 180}}});
298293

299294
registry.addClone("trackQA/before/", "trackQA/after/");
300-
registry.add("trackQA/after/pt_ref", "", {HistType::kTH1D, {{100, ptreflow, ptrefup}}});
301-
registry.add("trackQA/after/pt_poi", "", {HistType::kTH1D, {{100, ptpoilow, ptpoiup}}});
295+
registry.add("trackQA/after/pt_ref", "", {HistType::kTH1D, {{100, o2::analysis::gfw::ptreflow, o2::analysis::gfw::ptrefup}}});
296+
registry.add("trackQA/after/pt_poi", "", {HistType::kTH1D, {{100, o2::analysis::gfw::ptpoilow, o2::analysis::gfw::ptpoiup}}});
302297

303298
registry.add("eventQA/before/centrality", "", {HistType::kTH1D, {centAxis}});
304299
registry.add("eventQA/before/multiplicity", "", {HistType::kTH1D, {nchAxis}});
@@ -336,13 +331,13 @@ struct FlowGenericFramework {
336331
}
337332
}
338333

339-
if (regions.GetSize() < 0)
334+
if (o2::analysis::gfw::regions.GetSize() < 0)
340335
LOGF(error, "Configuration contains vectors of different size - check the GFWRegions configurable");
341-
for (auto i(0); i < regions.GetSize(); ++i) {
342-
fGFW->AddRegion(regions.GetNames()[i], regions.GetEtaMin()[i], regions.GetEtaMax()[i], (regions.GetpTDifs()[i]) ? ptbins + 1 : 1, regions.GetBitmasks()[i]);
336+
for (auto i(0); i < o2::analysis::gfw::regions.GetSize(); ++i) {
337+
fGFW->AddRegion(o2::analysis::gfw::regions.GetNames()[i], o2::analysis::gfw::regions.GetEtaMin()[i], o2::analysis::gfw::regions.GetEtaMax()[i], (o2::analysis::gfw::regions.GetpTDifs()[i]) ? ptbins + 1 : 1, o2::analysis::gfw::regions.GetBitmasks()[i]);
343338
}
344-
for (auto i = 0; i < configs.GetSize(); ++i) {
345-
corrconfigs.push_back(fGFW->GetCorrelatorConfig(configs.GetCorrs()[i], configs.GetHeads()[i], configs.GetpTDifs()[i]));
339+
for (auto i = 0; i < o2::analysis::gfw::configs.GetSize(); ++i) {
340+
corrconfigs.push_back(fGFW->GetCorrelatorConfig(o2::analysis::gfw::configs.GetCorrs()[i], o2::analysis::gfw::configs.GetHeads()[i], o2::analysis::gfw::configs.GetpTDifs()[i]));
346341
}
347342
if (corrconfigs.empty())
348343
LOGF(error, "Configuration contains vectors of different size - check the GFWCorrConfig configurable");
@@ -362,7 +357,7 @@ struct FlowGenericFramework {
362357
delete oba;
363358
fFCpt->setUseCentralMoments(cfgUseCentralMoments);
364359
fFCpt->setUseGapMethod(cfgUseGapMethod);
365-
fFCpt->initialise(multAxis, cfgMpar, configs, cfgNbootstrap);
360+
fFCpt->initialise(multAxis, cfgMpar, o2::analysis::gfw::configs, cfgNbootstrap);
366361
// Event selection - Alex
367362
if (cfgUseAdditionalEventCut) {
368363
fMultPVCutLow = new TF1("fMultPVCutLow", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x - 3.5*([5]+[6]*x+[7]*x*x+[8]*x*x*x+[9]*x*x*x*x)", 0, 100);
@@ -581,7 +576,7 @@ struct FlowGenericFramework {
581576
// auto multT0C = collision.multFT0C();
582577
auto multNTracksPV = collision.multNTracksPV();
583578

584-
if (vtxz > vtxZup || vtxz < vtxZlow)
579+
if (vtxz > o2::analysis::gfw::vtxZup || vtxz < o2::analysis::gfw::vtxZlow)
585580
return 0;
586581

587582
if (cfgMultCut) {
@@ -609,10 +604,10 @@ struct FlowGenericFramework {
609604
void fillWeights(const TTrack track, const double vtxz, const int& pid_index, const int& run)
610605
{
611606
if (cfgUsePID) {
612-
double ptpidmins[] = {ptpoilow, ptpoilow, 0.3, 0.5}; // min pt for ch, pi, ka, pr
613-
double ptpidmaxs[] = {ptpoiup, ptpoiup, 6.0, 6.0}; // max pt for ch, pi, ka, pr
614-
bool withinPtPOI = (ptpidmins[pid_index] < track.pt()) && (track.pt() < ptpidmaxs[pid_index]); // within POI pT range
615-
bool withinPtRef = (ptreflow < track.pt()) && (track.pt() < ptrefup); // within RF pT range
607+
double ptpidmins[] = {o2::analysis::gfw::ptpoilow, o2::analysis::gfw::ptpoilow, 0.3, 0.5}; // min pt for ch, pi, ka, pr
608+
double ptpidmaxs[] = {o2::analysis::gfw::ptpoiup, o2::analysis::gfw::ptpoiup, 6.0, 6.0}; // max pt for ch, pi, ka, pr
609+
bool withinPtPOI = (ptpidmins[pid_index] < track.pt()) && (track.pt() < ptpidmaxs[pid_index]); // within POI pT range
610+
bool withinPtRef = (o2::analysis::gfw::ptreflow < track.pt()) && (track.pt() < o2::analysis::gfw::ptrefup); // within RF pT range
616611
if (cfgRunByRun) {
617612
if (withinPtRef && !pid_index)
618613
th3sList[run][hNUAref]->Fill(track.phi(), track.eta(), vtxz); // pt-subset of charged particles for ref flow
@@ -649,11 +644,11 @@ struct FlowGenericFramework {
649644

650645
void createRunByRunHistograms(const int& run)
651646
{
652-
AxisSpec phiAxis = {phibins, philow, phiup, "#phi"};
653-
AxisSpec etaAxis = {etabins, -cfgEta, cfgEta, "#eta"};
654-
AxisSpec vtxAxis = {vtxZbins, -cfgVtxZ, cfgVtxZ, "Vtx_{z} (cm)"};
655-
AxisSpec nchAxis = {nchbins, nchlow, nchup, "N_{ch}"};
656-
AxisSpec centAxis = {centbinning, "Centrality (%)"};
647+
AxisSpec phiAxis = {o2::analysis::gfw::phibins, o2::analysis::gfw::philow, o2::analysis::gfw::phiup, "#phi"};
648+
AxisSpec etaAxis = {o2::analysis::gfw::etabins, -cfgEta, cfgEta, "#eta"};
649+
AxisSpec vtxAxis = {o2::analysis::gfw::vtxZbins, -cfgVtxZ, cfgVtxZ, "Vtx_{z} (cm)"};
650+
AxisSpec nchAxis = {o2::analysis::gfw::nchbins, o2::analysis::gfw::nchlow, o2::analysis::gfw::nchup, "N_{ch}"};
651+
AxisSpec centAxis = {o2::analysis::gfw::centbinning, "Centrality (%)"};
657652
std::vector<std::shared_ptr<TH1>> histos(kCount_TH1Names);
658653
histos[hPhi] = registry.add<TH1>(Form("%d/phi", run), "", {HistType::kTH1D, {phiAxis}});
659654
histos[hEta] = registry.add<TH1>(Form("%d/eta", run), "", {HistType::kTH1D, {etaAxis}});
@@ -704,7 +699,7 @@ struct FlowGenericFramework {
704699
if (std::abs(val) < 1) {
705700
(dt == kGen) ? fFCgen->FillProfile(corrconfigs.at(l_ind).Head.c_str(), centmult, val, dnx, rndm) : fFC->FillProfile(corrconfigs.at(l_ind).Head.c_str(), centmult, val, dnx, rndm);
706701
if (cfgUseGapMethod)
707-
fFCpt->fillVnPtProfiles(centmult, val, dnx, rndm, configs.GetpTCorrMasks()[l_ind]);
702+
fFCpt->fillVnPtProfiles(centmult, val, dnx, rndm, o2::analysis::gfw::configs.GetpTCorrMasks()[l_ind]);
708703
}
709704
continue;
710705
}
@@ -725,11 +720,13 @@ struct FlowGenericFramework {
725720
{
726721
if (tracks.size() < 1)
727722
return;
728-
if (centrality < centbinning.front() || centrality > centbinning.back())
723+
if (dt != kGen && (centrality < o2::analysis::gfw::centbinning.front() || centrality > o2::analysis::gfw::centbinning.back()))
729724
return;
730-
registry.fill(HIST("eventQA/eventSel"), 10.5);
731-
if (cfgRunByRun)
732-
th1sList[run][hEventSel]->Fill(10.5);
725+
if (dt != kGen) {
726+
registry.fill(HIST("eventQA/eventSel"), 10.5);
727+
if (cfgRunByRun)
728+
th1sList[run][hEventSel]->Fill(10.5);
729+
}
733730
float vtxz = collision.posZ();
734731
if (dt != kGen && cfgRunByRun) {
735732
th1sList[run][hVtxZ]->Fill(vtxz);
@@ -750,7 +747,7 @@ struct FlowGenericFramework {
750747
double q3x = 0, q3y = 0;
751748
double q4x = 0, q4y = 0;
752749
for (const auto& track : tracks) {
753-
bool withinPtRef = (ptreflow < track.pt()) && (track.pt() < ptrefup); // within RF pT rang
750+
bool withinPtRef = (o2::analysis::gfw::ptreflow < track.pt()) && (track.pt() < o2::analysis::gfw::ptrefup); // within RF pT rang
754751
if (withinPtRef) {
755752
q2x += std::cos(2 * track.phi());
756753
q2y += std::sin(2 * track.phi());
@@ -795,7 +792,7 @@ struct FlowGenericFramework {
795792
if (cfgFillQA)
796793
fillTrackQA<kReco, kBefore>(track, vtxz);
797794

798-
if (mcParticle.eta() < etalow || mcParticle.eta() > etaup || mcParticle.pt() < ptlow || mcParticle.pt() > ptup || track.tpcNClsFound() < cfgNcls)
795+
if (mcParticle.eta() < o2::analysis::gfw::etalow || mcParticle.eta() > o2::analysis::gfw::etaup || mcParticle.pt() < o2::analysis::gfw::ptlow || mcParticle.pt() > o2::analysis::gfw::ptup || track.tpcNClsFound() < cfgNcls)
799796
return;
800797

801798
int pidIndex = 0;
@@ -829,7 +826,7 @@ struct FlowGenericFramework {
829826
if (cfgFillQA)
830827
fillTrackQA<kGen, kBefore>(track, vtxz);
831828

832-
if (track.eta() < etalow || track.eta() > etaup || track.pt() < ptlow || track.pt() > ptup)
829+
if (track.eta() < o2::analysis::gfw::etalow || track.eta() > o2::analysis::gfw::etaup || track.pt() < o2::analysis::gfw::ptlow || track.pt() > o2::analysis::gfw::ptup)
833830
return;
834831

835832
int pidIndex = 0;
@@ -896,9 +893,9 @@ struct FlowGenericFramework {
896893
inline void fillGFW(TTrack track, const double& vtxz, int pid_index, DensityCorr densitycorrections)
897894
{
898895
if (cfgUsePID) { // Analysing POI flow with id'ed particles
899-
double ptmins[] = {ptpoilow, ptpoilow, 0.3, 0.5};
900-
double ptmaxs[] = {ptpoiup, ptpoiup, 6.0, 6.0};
901-
bool withinPtRef = (track.pt() > ptreflow && track.pt() < ptrefup);
896+
double ptmins[] = {o2::analysis::gfw::ptpoilow, o2::analysis::gfw::ptpoilow, 0.3, 0.5};
897+
double ptmaxs[] = {o2::analysis::gfw::ptpoiup, o2::analysis::gfw::ptpoiup, 6.0, 6.0};
898+
bool withinPtRef = (track.pt() > o2::analysis::gfw::ptreflow && track.pt() < o2::analysis::gfw::ptrefup);
902899
bool withinPtPOI = (track.pt() > ptmins[pid_index] && track.pt() < ptmaxs[pid_index]);
903900
bool withinPtNch = (track.pt() > ptmins[0] && track.pt() < ptmaxs[0]);
904901
if (!withinPtPOI && !withinPtRef)
@@ -919,8 +916,8 @@ struct FlowGenericFramework {
919916
if (withinPtNch && withinPtRef)
920917
fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), waccPOI, 32);
921918
} else { // Analysing only integrated flow
922-
bool withinPtRef = (track.pt() > ptreflow && track.pt() < ptrefup);
923-
bool withinPtPOI = (track.pt() > ptpoilow && track.pt() < ptpoiup);
919+
bool withinPtRef = (track.pt() > o2::analysis::gfw::ptreflow && track.pt() < o2::analysis::gfw::ptrefup);
920+
bool withinPtPOI = (track.pt() > o2::analysis::gfw::ptpoilow && track.pt() < o2::analysis::gfw::ptpoiup);
924921
if (!withinPtPOI && !withinPtRef)
925922
return;
926923
double weff = (dt == kGen) ? 1. : getEfficiency(track);
@@ -986,8 +983,8 @@ struct FlowGenericFramework {
986983
return;
987984
}
988985

989-
Filter collisionFilter = nabs(aod::collision::posZ) < cfgVtxZ;
990-
Filter trackFilter = nabs(aod::track::eta) < cfgEta && aod::track::pt > cfgPtmin&& aod::track::pt < cfgPtmax && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && nabs(aod::track::dcaXY) < cfgDCAxy&& nabs(aod::track::dcaZ) < cfgDCAz;
986+
o2::framework::expressions::Filter collisionFilter = nabs(aod::collision::posZ) < cfgVtxZ;
987+
o2::framework::expressions::Filter trackFilter = nabs(aod::track::eta) < cfgEta && aod::track::pt > cfgPtmin&& aod::track::pt < cfgPtmax && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && nabs(aod::track::dcaXY) < cfgDCAxy&& nabs(aod::track::dcaZ) < cfgDCAz;
991988
using GFWTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection, aod::TracksDCA, aod::pidTOFPi, aod::pidTPCPi, aod::pidTOFKa, aod::pidTPCKa, aod::pidTOFPr, aod::pidTPCPr>>;
992989

993990
void processData(soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentFV0As>>::iterator const& collision, aod::BCsWithTimestamps const&, GFWTracks const& tracks)
@@ -1083,7 +1080,7 @@ struct FlowGenericFramework {
10831080
}
10841081
PROCESS_SWITCH(FlowGenericFramework, processMCReco, "Process analysis for MC reconstructed events", false);
10851082

1086-
Filter mcCollFilter = nabs(aod::mccollision::posZ) < cfgVtxZ;
1083+
o2::framework::expressions::Filter mcCollFilter = nabs(aod::mccollision::posZ) < cfgVtxZ;
10871084
void processMCGen(soa::Filtered<aod::McCollisions>::iterator const& mcCollision, soa::SmallGroups<soa::Join<aod::McCollisionLabels, aod::Collisions, aod::CentFT0Cs>> const& collisions, aod::McParticles const& particles)
10881085
{
10891086
if (collisions.size() != 1)
@@ -1092,10 +1089,19 @@ struct FlowGenericFramework {
10921089
for (const auto& collision : collisions) {
10931090
centrality = collision.centFT0C();
10941091
}
1095-
processCollision<kGen>(mcCollision, particles, centrality, 0);
1092+
int run = 0;
1093+
processCollision<kGen>(mcCollision, particles, centrality, run);
10961094
}
10971095
PROCESS_SWITCH(FlowGenericFramework, processMCGen, "Process analysis for MC generated events", false);
10981096

1097+
void processOnTheFly(soa::Filtered<aod::McCollisions>::iterator const& mcCollision, aod::McParticles const& mcParticles)
1098+
{
1099+
float centrality = -1;
1100+
int run = 0;
1101+
processCollision<kGen>(mcCollision, mcParticles, centrality, run);
1102+
}
1103+
PROCESS_SWITCH(FlowGenericFramework, processOnTheFly, "Process analysis for MC on-the-fly generated events", false);
1104+
10991105
void processRun2(soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentRun2V0Ms>>::iterator const& collision, aod::BCsWithTimestamps const&, GFWTracks const& tracks)
11001106
{
11011107
auto bc = collision.bc_as<aod::BCsWithTimestamps>();

0 commit comments

Comments
 (0)