Skip to content
Closed
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
42 changes: 21 additions & 21 deletions PWGUD/Tasks/flowMcUpc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,31 @@
/// \since Apr/2/2026
/// \brief flow efficiency analysis on UPC MC

#include <CCDB/BasicCCDBManager.h>
#include "PWGUD/Core/SGSelector.h"
#include "PWGUD/DataModel/UDTables.h"
#include <vector>
#include <string>
#include "Framework/AnalysisDataModel.h"
#include "Framework/AnalysisTask.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/runDataProcessing.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/RunningWorkflowInfo.h"
#include "Common/DataModel/TrackSelectionTables.h"

#include "Common/Core/RecoDecay.h"
#include "Common/Core/TrackSelection.h"
#include "Common/Core/TrackSelectionDefaults.h"
#include "Common/Core/trackUtilities.h"
#include "Common/DataModel/TrackSelectionTables.h"

#include "Framework/ASoAHelpers.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/AnalysisTask.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/RunningWorkflowInfo.h"
#include "Framework/runDataProcessing.h"
#include "ReconstructionDataFormats/Track.h"
#include <CCDB/BasicCCDBManager.h>

#include <TF1.h>
#include <TPDGCode.h>
#include <TProfile.h>
#include <TRandom3.h>
#include <TPDGCode.h>
#include <TF1.h>

#include <string>
#include <vector>

using namespace o2;
using namespace o2::framework;
Expand All @@ -54,7 +58,6 @@ struct FlowMcUpc {
O2_DEFINE_CONFIGURABLE(cfgCutDCAxy, float, 0.2f, "DCAxy cut for tracks")
O2_DEFINE_CONFIGURABLE(cfgDcaxy, bool, true, "choose dcaxy")


ConfigurableAxis axisB{"axisB", {100, 0.0f, 20.0f}, ""};
ConfigurableAxis axisPt{"axisPt", {VARIABLE_WIDTH, 0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f, 1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f, 1.9f, 2.0f, 2.2f, 2.4f, 2.6f, 2.8f, 3.0f, 3.2f, 3.4f, 3.6f, 3.8f, 4.0f, 4.4f, 4.8f, 5.2f, 5.6f, 6.0f, 6.5f, 7.0f, 7.5f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}, "pt axis"};
// Connect to ccdb
Expand All @@ -65,7 +68,6 @@ struct FlowMcUpc {

using McParticles = soa::Join<aod::UDMcParticles, aod::UDMcTrackLabels>;


void init(InitContext&)
{
ccdb->setURL(ccdbUrl.value);
Expand All @@ -85,7 +87,6 @@ struct FlowMcUpc {
histos.add<TH3>("hEtaPtVtxzMCGen", "Monte Carlo Truth; #eta; p_{T} (GeV/c); V_{z} (cm);", {HistType::kTH3D, {axisEta, axisPt, axisVertex}});
histos.add<TH1>("hPtReco", "Monte Carlo Reco Global; pT (GeV/c);", {HistType::kTH1D, {axisPt}});
histos.add<TH3>("hEtaPtVtxzMCReco", "Monte Carlo Global; #eta; p_{T} (GeV/c); V_{z} (cm);", {HistType::kTH3D, {axisEta, axisPt, axisVertex}});

}

// template <typename TCollision>
Expand Down Expand Up @@ -136,12 +137,11 @@ struct FlowMcUpc {
continue;
// if (std::fabs(mcParticle.eta()) > cfgCutEta) // main acceptance
// continue;

histos.fill(HIST("hPtMCGen"), pt);
histos.fill(HIST("hEtaPtVtxzMCGen"), eta, pt, vtxz);
}
}

}
PROCESS_SWITCH(FlowMcUpc, processMCTrue, "process pure simulation information", true);

Expand All @@ -165,9 +165,9 @@ struct FlowMcUpc {

for (const auto& track : tracks) {
auto momentum = std::array<double, 3>{track.px(), track.py(), track.pz()};
double pt = RecoDecay::pt(momentum);
double phi = RecoDecay::phi(momentum);
double eta = RecoDecay::eta(momentum);
double pt = RecoDecay::pt(momentum);
double phi = RecoDecay::phi(momentum);
double eta = RecoDecay::eta(momentum);
if (!trackSelected(track) || (!track.has_udMcParticle()))
continue;
auto mcParticle = track.udMcParticle();
Expand All @@ -178,7 +178,7 @@ struct FlowMcUpc {
// continue;
if (!mcParticle.isPhysicalPrimary())
continue;

histos.fill(HIST("hPtReco"), pt);
histos.fill(HIST("hEtaPtVtxzMCReco"), eta, pt, vtxz);
}
Expand Down