Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 38 additions & 16 deletions PWGCF/GenericFramework/Tasks/flowGenericFramework.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ struct FlowGenericFramework {
TF1* fMultGlobalT0ACutHigh = nullptr;

// Track selection - pt-phi cuts
TF1* fPhiCutLow;
TF1* fPhiCutHigh;
TF1* fPhiCutLow = nullptr;
TF1* fPhiCutHigh = nullptr;

void init(InitContext const&)
{
Expand Down Expand Up @@ -334,11 +334,11 @@ struct FlowGenericFramework {
}
AxisSpec nchAxis = {nchbinning, "N_{ch}"};
AxisSpec bAxis = {200, 0, 20, "#it{b}"};
AxisSpec t0cAxis = {1000, 0, 10000, "N_{ch} (T0C)"};
AxisSpec t0aAxis = {300, 0, 30000, "N_{ch} (T0A)"};
AxisSpec v0aAxis = {800, 0, 80000, "N_{ch} (V0A)"};
AxisSpec multpvAxis = {600, 0, 600, "N_{ch} (PV)"};
AxisSpec occAxis = {600, 0, 3000, "occupancy"};
AxisSpec t0cAxis = {1000, 0, 50000, "N_{ch} (T0C)"};
AxisSpec t0aAxis = {1800, 0, 180000, "N_{ch} (T0A)"};
AxisSpec v0aAxis = {1800, 0, 180000, "N_{ch} (V0A)"};
AxisSpec multpvAxis = {3500, 0, 3500, "N_{ch} (PV)"};
AxisSpec occAxis = {500, 0, 5000, "occupancy"};
AxisSpec multAxis = (doprocessOnTheFly && !cfgUseNch) ? bAxis : (cfgUseNch) ? nchAxis
: centAxis;
AxisSpec dcaZAXis = {200, -2, 2, "DCA_{z} (cm)"};
Expand Down Expand Up @@ -380,8 +380,8 @@ struct FlowGenericFramework {
registry.add("eventQA/before/PVTracks_centT0C", "; FT0C centrality (%); N_{PV}", {HistType::kTH2D, {centAxis, multpvAxis}});
registry.add("eventQA/before/globalTracks_PVTracks", "; N_{PV}; N_{global}", {HistType::kTH2D, {multpvAxis, nchAxis}});
registry.add("eventQA/before/globalTracks_multT0A", "; multT0A; N_{global}", {HistType::kTH2D, {t0aAxis, nchAxis}});
registry.add("eventQA/before/globalTracks_multV0A", "; multV0A; N_{global}", {HistType::kTH2D, {t0aAxis, nchAxis}});
registry.add("eventQA/before/multV0A_multT0A", "; multV0A; multT0A", {HistType::kTH2D, {t0aAxis, t0aAxis}});
registry.add("eventQA/before/globalTracks_multV0A", "; multV0A; N_{global}", {HistType::kTH2D, {v0aAxis, nchAxis}});
registry.add("eventQA/before/multV0A_multT0A", "; multV0A; multT0A", {HistType::kTH2D, {t0aAxis, v0aAxis}});
registry.add("eventQA/before/multT0C_centT0C", "; multT0C; FT0C centrality (%)", {HistType::kTH2D, {centAxis, t0cAxis}});
registry.add("eventQA/before/occ_mult_cent", "; occupancy; N_{ch}; centrality (%)", {HistType::kTH3D, {occAxis, nchAxis, centAxis}});
registry.addClone("eventQA/before/", "eventQA/after/");
Expand Down Expand Up @@ -633,7 +633,7 @@ struct FlowGenericFramework {
}

template <typename TCollision>
bool eventSelected(TCollision collision, const int& multTrk, const float& centrality, const int& run)
bool eventSelected(TCollision collision, const int multTrk, const float& centrality, const int run)
{
// Cut on trigger alias
if (cfgEventCutFlags.cfgTVXinTRD) {
Expand Down Expand Up @@ -686,7 +686,7 @@ struct FlowGenericFramework {
}

template <typename TCollision>
bool selectMultiplicityCorrelation(TCollision collision, const int& multTrk, const float& centrality, const int& run)
bool selectMultiplicityCorrelation(TCollision collision, const int multTrk, const float& centrality, const int run)
{
auto multNTracksPV = collision.multNTracksPV();
if (multNTracksPV < fMultPVCutLow->Eval(centrality))
Expand Down Expand Up @@ -715,7 +715,7 @@ struct FlowGenericFramework {
}

template <typename TTrack>
bool trackSelected(TTrack track, const int& field)
bool trackSelected(TTrack track, const int field)
{
if (cfgTrackCuts.cfgTPCSectorCut) {
double phimodn = track.phi();
Expand Down Expand Up @@ -754,7 +754,7 @@ struct FlowGenericFramework {
};

template <typename TTrack>
void fillWeights(const TTrack track, const double vtxz, const int& pid_index, const int& run)
void fillWeights(const TTrack track, const double vtxz, const int pid_index, const int run)
{
if (cfgUsePID) {
double ptpidmins[] = {o2::analysis::gfw::ptpoilow, o2::analysis::gfw::ptpoilow, 0.3, 0.5}; // min pt for ch, pi, ka, pr
Expand Down Expand Up @@ -795,7 +795,7 @@ struct FlowGenericFramework {
return;
}

void createRunByRunHistograms(const int& run)
void createRunByRunHistograms(const int run)
{
AxisSpec phiAxis = {o2::analysis::gfw::phibins, o2::analysis::gfw::philow, o2::analysis::gfw::phiup, "#phi"};
AxisSpec phiModAxis = {100, 0, constants::math::PI / 9, "fmod(#varphi,#pi/9)"};
Expand Down Expand Up @@ -883,7 +883,7 @@ struct FlowGenericFramework {
}

template <DataType dt, typename TCollision, typename TTracks>
void processCollision(TCollision collision, TTracks tracks, const float& centrality, const int& field, const int& run)
void processCollision(TCollision collision, TTracks tracks, const float& centrality, const int field, const int run)
{
if (tracks.size() < 1)
return;
Expand Down Expand Up @@ -974,7 +974,7 @@ struct FlowGenericFramework {
};

template <typename TTrack>
inline void processTrack(TTrack const& track, const float& vtxz, const int& field, const int& run, DensityCorr densitycorrections, AcceptedTracks& acceptedTracks)
inline void processTrack(TTrack const& track, const float& vtxz, const int field, const int run, DensityCorr densitycorrections, AcceptedTracks& acceptedTracks)
{
if constexpr (framework::has_type_v<aod::mctracklabel::McParticleId, typename TTrack::all_columns>) {
if (track.mcParticleId() < 0 || !(track.has_mcParticle()))
Expand Down Expand Up @@ -1297,9 +1297,31 @@ struct FlowGenericFramework {
if (cfgRunByRun)
createRunByRunHistograms(run);
}

registry.fill(HIST("eventQA/eventSel"), 0.5);
if (cfgRunByRun)
th1sList[run][hEventSel]->Fill(0.5);

if (!collision.sel8())
return;

registry.fill(HIST("eventQA/eventSel"), 1.5);
if (cfgRunByRun)
th1sList[run][hEventSel]->Fill(1.5);

const auto centrality = getCentrality(collision);

if (cfgDoOccupancySel) {
int occupancy = collision.trackOccupancyInTimeRange();
registry.fill(HIST("eventQA/before/occ_mult_cent"), occupancy, tracks.size(), centrality);
if (occupancy < 0 || occupancy > cfgOccupancySelection)
return;
registry.fill(HIST("eventQA/after/occ_mult_cent"), occupancy, tracks.size(), centrality);
}
registry.fill(HIST("eventQA/eventSel"), 2.5);
if (cfgRunByRun)
th1sList[run][hEventSel]->Fill(2.5);

if (cfgFillQA)
fillEventQA<kBefore>(collision, tracks);
if (!eventSelected(collision, tracks.size(), centrality, run))
Expand Down
Loading