Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion PWGCF/JCorran/Core/JFFlucAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
kSubEvent_A = 0x1,
kSubEvent_B = 0x2
};
inline void SelectSubevents(UInt_t _subeventMask) { subeventMask = _subeventMask; }

Check failure on line 54 in PWGCF/JCorran/Core/JFFlucAnalysis.h

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
enum HIST_TH1 {
HIST_TH1_CENTRALITY,
HIST_TH1_IMPACTPARAM,
Expand Down Expand Up @@ -103,7 +103,7 @@
enum {
kFlucEbEWeighting = 0x1
};
inline void AddFlags(UInt_t _flags) { flags |= _flags; }

Check failure on line 106 in PWGCF/JCorran/Core/JFFlucAnalysis.h

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.

enum { kH0,
kH1,
Expand Down Expand Up @@ -146,16 +146,16 @@
using hasSign = decltype(std::declval<T&>().sign());

template <class JInputClass>
inline void FillQA(JInputClass& inputInst, UInt_t type = 0u)

Check failure on line 149 in PWGCF/JCorran/Core/JFFlucAnalysis.h

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
{
ph1[HIST_TH1_CENTRALITY]->Fill(fCent);
ph1[HIST_TH1_IMPACTPARAM]->Fill(fImpactParameter);

for (auto& track : inputInst) {
Double_t corrInv = 1.0;

Check failure on line 155 in PWGCF/JCorran/Core/JFFlucAnalysis.h

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
using JInputClassIter = typename JInputClass::iterator;
if constexpr (std::experimental::is_detected<hasWeightEff, const JInputClassIter>::value)
corrInv /= track.weightEff();
corrInv *= track.weightEff();
if constexpr (std::experimental::is_detected<hasSign, const JInputClassIter>::value)
pht[HIST_THN_PTETA]->Fill(fCent, track.pt(), track.eta(), track.sign(), corrInv);
else
Expand All @@ -163,7 +163,7 @@
if constexpr (std::experimental::is_detected<hasWeightNUA, const JInputClassIter>::value)
corrInv /= track.weightNUA();
pht[HIST_THN_PHIETA]->Fill(fCent, track.phi(), track.eta(), corrInv);
pht[HIST_THN_PHIETAZ]->Fill(fCent, static_cast<Double_t>(type), track.phi(), track.eta(), fVertex, corrInv);

Check failure on line 166 in PWGCF/JCorran/Core/JFFlucAnalysis.h

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
}

ph1[HIST_TH1_ZVERTEX]->Fill(fVertex);
Expand All @@ -171,11 +171,11 @@

#define kcNH kH4 // max second dimension + 1
protected:
Float_t fVertex; //!

Check failure on line 174 in PWGCF/JCorran/Core/JFFlucAnalysis.h

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
Float_t fAvgInvariantMass; //!

Check failure on line 175 in PWGCF/JCorran/Core/JFFlucAnalysis.h

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
Float_t fCent; //!

Check failure on line 176 in PWGCF/JCorran/Core/JFFlucAnalysis.h

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
Float_t fImpactParameter; //!

Check failure on line 177 in PWGCF/JCorran/Core/JFFlucAnalysis.h

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
UInt_t subeventMask; //!

Check failure on line 178 in PWGCF/JCorran/Core/JFFlucAnalysis.h

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
UInt_t flags; //!

const JQVectorsT* pqvecs; //!
Expand Down
2 changes: 1 addition & 1 deletion PWGCF/JCorran/Core/JQVectors.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class JQVectors : public std::conditional_t<gap, JQVectorsGapBase<Q, nh, nk>, JQ
if constexpr (std::experimental::is_detected<hasWeightNUA, const JInputClassIter>::value)
tf /= track.weightNUA();
if constexpr (std::experimental::is_detected<hasWeightEff, const JInputClassIter>::value)
tf /= track.weightEff();
tf *= track.weightEff();
}
}
}
Expand Down
51 changes: 38 additions & 13 deletions PWGCF/JCorran/Tasks/jflucAnalysisTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,27 @@
/// \author Dong Jo Kim (djkim@jyu.fi)
/// \since Sep 2022

#include <deque>
#include "Common/Core/TrackSelection.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/TrackSelectionTables.h"

#include "Framework/AnalysisTask.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/RunningWorkflowInfo.h"
#include "Framework/AnalysisTask.h"
#include "Framework/HistogramRegistry.h"

#include "Common/DataModel/EventSelection.h"
#include "Common/Core/TrackSelection.h"
#include "Common/DataModel/TrackSelectionTables.h"
#include "Common/DataModel/Centrality.h"
#include "Framework/RunningWorkflowInfo.h"
#include "ReconstructionDataFormats/V0.h"

#include <deque>

// #include "CCDB/BasicCCDBManager.h"

#include "PWGCF/JCorran/DataModel/JCatalyst.h"
#include "PWGCF/DataModel/CorrelationsDerived.h"
#include "JFFlucAnalysis.h"
#include "JFFlucAnalysisO2Hist.h"

#include "PWGCF/DataModel/CorrelationsDerived.h"
#include "PWGCF/JCorran/DataModel/JCatalyst.h"

#include "Framework/runDataProcessing.h"

using namespace o2;
Expand All @@ -52,6 +54,7 @@ struct jflucAnalysisTask {
O2_DEFINE_CONFIGURABLE(etamax, float, 0.8, "Maximum eta for tracks");
O2_DEFINE_CONFIGURABLE(ptmin, float, 0.2, "Minimum pt for tracks");
O2_DEFINE_CONFIGURABLE(ptmax, float, 5.0, "Maximum pt for tracks");
O2_DEFINE_CONFIGURABLE(cfgCentBinsForMC, int, 0, "0 = OFF and 1 = ON for data like multiplicity/centrality bins for MC process");

ConfigurableAxis axisMultiplicity{"axisMultiplicity", {VARIABLE_WIDTH, 0, 5, 10, 20, 30, 40, 50, 100.1}, "multiplicity / centrality axis for histograms"};
ConfigurableAxis phiAxis{"axisPhi", {50, 0.0, o2::constants::math::TwoPI}, "phi axis for histograms"};
Expand All @@ -60,8 +63,9 @@ struct jflucAnalysisTask {
ConfigurableAxis ptAxis{"axisPt", {60, 0.0, 300.0}, "pt axis for histograms"};
ConfigurableAxis massAxis{"axisMass", {1, 0.0, 10.0}, "mass axis for histograms"};

Filter jtrackFilter = (aod::jtrack::pt > ptmin) && (aod::jtrack::pt < ptmax); // eta cuts done by jfluc
Filter cftrackFilter = (aod::cftrack::pt > ptmin) && (aod::cftrack::pt < ptmax); // eta cuts done by jfluc
Filter jtrackFilter = (aod::jtrack::pt > ptmin) && (aod::jtrack::pt < ptmax); // eta cuts done by jfluc
Filter cftrackFilter = (aod::cftrack::pt > ptmin) && (aod::cftrack::pt < ptmax); // eta cuts done by jfluc
Filter cfmcparticleFilter = (aod::cfmcparticle::pt > ptmin) && (aod::cfmcparticle::pt < ptmax) && (aod::cfmcparticle::sign != 0); // eta cuts done by jfluc
Filter cf2pFilter = (aod::cf2prongtrack::pt > ptmin) && (aod::cf2prongtrack::pt < ptmax);

HistogramRegistry registry{"registry"};
Expand All @@ -74,7 +78,7 @@ struct jflucAnalysisTask {
auto axisSpecZvt = AxisSpec(zvtAxis);
auto axisSpecPt = AxisSpec(ptAxis);
auto axisSpecMass = AxisSpec(massAxis);
if (doprocessJDerived || doprocessJDerivedCorrected || doprocessCFDerived || doprocessCFDerivedCorrected) {
if (doprocessJDerived || doprocessJDerivedCorrected || doprocessCFDerived || doprocessCFDerivedCorrected || doprocessMCCFDerived) {
pcf = new JFFlucAnalysisO2Hist(registry, axisSpecMult, axisSpecPhi, axisSpecEta, axisSpecZvt, axisSpecPt, axisSpecMass, "jfluc");
pcf->AddFlags(JFFlucAnalysis::kFlucEbEWeighting);
pcf->UserCreateOutputObjects();
Expand Down Expand Up @@ -166,6 +170,27 @@ struct jflucAnalysisTask {
}
PROCESS_SWITCH(jflucAnalysisTask, processCF2ProngDerivedCorrected, "Process CF derived data with 2-prongs as POI and charged particles as REF with corrections.", false);

void processMCCFDerived(aod::CFMcCollision const& mcCollision, soa::Filtered<aod::CFMcParticles> const& particles, soa::SmallGroups<aod::CFCollisionsWithLabel> const& collisions)
{
auto multiplicity = mcCollision.multiplicity();
if (cfgCentBinsForMC > 0) {
if (collisions.size() == 0) {
return;
}
for (const auto& collision : collisions) {
multiplicity = collision.multiplicity();
}
}
pcf->Init();
pcf->SetEventCentrality(multiplicity);
pcf->SetEventVertex(mcCollision.posZ());
pcf->FillQA(particles);
qvecs.Calculate(particles, etamin, etamax);
pcf->SetJQVectors(&qvecs);
pcf->UserExec("");
}
PROCESS_SWITCH(jflucAnalysisTask, processMCCFDerived, "Process CF derived MC data", false);

JFFlucAnalysis::JQVectorsT qvecs;
JFFlucAnalysis::JQVectorsT qvecsRef;
JFFlucAnalysisO2Hist* pcf;
Expand Down
Loading