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
11 changes: 5 additions & 6 deletions PWGCF/JCorran/Core/JFFlucAnalysisO2Hist.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
using namespace o2;
using namespace o2::framework;

JFFlucAnalysisO2Hist::JFFlucAnalysisO2Hist(HistogramRegistry& registry, AxisSpec& axisMultiplicity, AxisSpec& phiAxis, AxisSpec& etaAxis, AxisSpec& zvtAxis, AxisSpec& ptAxis, AxisSpec& massAxis, uint16_t multCorrMask, const TString& folder) : JFFlucAnalysis()
JFFlucAnalysisO2Hist::JFFlucAnalysisO2Hist(HistogramRegistry& registry, AxisSpec& axisMultiplicity, AxisSpec& phiAxis, AxisSpec& etaAxis, AxisSpec& zvtAxis, AxisSpec& ptAxis, AxisSpec& massAxis, AxisSpec& vnAxis, AxisSpec& fourAxisSC, AxisSpec& mixedAxis, AxisSpec& twoAxisSC, uint16_t multCorrMask, const TString& folder) : JFFlucAnalysis()
{

ph1[HIST_TH1_CENTRALITY] = std::get<std::shared_ptr<TH1>>(registry.add(Form("%s/h_cent", folder.Data()), "multiplicity/centrality", {HistType::kTH1F, {axisMultiplicity}})).get();
Expand Down Expand Up @@ -51,12 +51,11 @@ JFFlucAnalysisO2Hist::JFFlucAnalysisO2Hist(HistogramRegistry& registry, AxisSpec
pht[HIST_THN_PTETA] = std::get<std::shared_ptr<THnSparse>>(registry.add(Form("%s/h_pteta", folder.Data()), "(corrected) multiplicity/centrality, pT, eta, charge", {HistType::kTHnSparseF, {axisMultiplicity, ptAxis, etaAxis, chgAxis}})).get();
AxisSpec hAxis = {kNH, -0.5, static_cast<double>(kNH - 1) + 0.5, "#it{n}"};
AxisSpec kAxis = {nKL, -0.5, static_cast<double>(nKL - 1) + 0.5, "#it{k}"};
AxisSpec vnAxis = {2048, -0.1, 0.1, "#it{V}_#it{n}"};
pht[HIST_THN_SC_with_QC_4corr] = std::get<std::shared_ptr<THnSparse>>(registry.add(Form("%s/h_SC_with_QC_4corr", folder.Data()), "SC_with_QC_4corr", {HistType::kTHnSparseF, {axisMultiplicity, massAxis, hAxis, hAxis, {2048, -0.001, 0.001, "correlation"}}})).get();
pht[HIST_THN_SC_with_QC_2corr] = std::get<std::shared_ptr<THnSparse>>(registry.add(Form("%s/h_SC_with_QC_2corr", folder.Data()), "SC_with_QC_2corr", {HistType::kTHnSparseF, {axisMultiplicity, massAxis, hAxis, {2048, -0.1, 0.1, "correlation"}}})).get();
pht[HIST_THN_SC_with_QC_2corr_gap] = std::get<std::shared_ptr<THnSparse>>(registry.add(Form("%s/h_SC_with_QC_2corr_gap", folder.Data()), "SC_with_QC_2corr_gap", {HistType::kTHnSparseF, {axisMultiplicity, massAxis, hAxis, {2048, -0.1, 0.1, "correlation"}}})).get();
pht[HIST_THN_SC_with_QC_4corr] = std::get<std::shared_ptr<THnSparse>>(registry.add(Form("%s/h_SC_with_QC_4corr", folder.Data()), "SC_with_QC_4corr", {HistType::kTHnSparseF, {axisMultiplicity, massAxis, hAxis, hAxis, fourAxisSC}})).get();
pht[HIST_THN_SC_with_QC_2corr] = std::get<std::shared_ptr<THnSparse>>(registry.add(Form("%s/h_SC_with_QC_2corr", folder.Data()), "SC_with_QC_2corr", {HistType::kTHnSparseF, {axisMultiplicity, massAxis, hAxis, twoAxisSC}})).get();
pht[HIST_THN_SC_with_QC_2corr_gap] = std::get<std::shared_ptr<THnSparse>>(registry.add(Form("%s/h_SC_with_QC_2corr_gap", folder.Data()), "SC_with_QC_2corr_gap", {HistType::kTHnSparseF, {axisMultiplicity, massAxis, hAxis, twoAxisSC}})).get();
for (UInt_t i = HIST_THN_V4V2star_2; i < HIST_THN_COUNT; ++i)
pht[i] = std::get<std::shared_ptr<THnSparse>>(registry.add(Form("%s/h_corrC%02u", folder.Data(), i - HIST_THN_V4V2star_2), "correlator", {HistType::kTHnSparseF, {axisMultiplicity, massAxis, {2048, -3.0, 3.0, "correlation"}}})).get();
pht[i] = std::get<std::shared_ptr<THnSparse>>(registry.add(Form("%s/h_corrC%02u", folder.Data(), i - HIST_THN_V4V2star_2), "correlator", {HistType::kTHnSparseF, {axisMultiplicity, massAxis, mixedAxis}})).get();
for (UInt_t i = 0; i < HIST_THN_COUNT; ++i)
pht[i]->Sumw2();

Expand Down
2 changes: 1 addition & 1 deletion PWGCF/JCorran/Core/JFFlucAnalysisO2Hist.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class JFFlucAnalysisO2Hist : public JFFlucAnalysis
{
public:
JFFlucAnalysisO2Hist(o2::framework::HistogramRegistry&, o2::framework::AxisSpec&, o2::framework::AxisSpec&, o2::framework::AxisSpec&, o2::framework::AxisSpec&, o2::framework::AxisSpec&, o2::framework::AxisSpec&, uint16_t, const TString&);
JFFlucAnalysisO2Hist(o2::framework::HistogramRegistry&, o2::framework::AxisSpec&, o2::framework::AxisSpec&, o2::framework::AxisSpec&, o2::framework::AxisSpec&, o2::framework::AxisSpec&, o2::framework::AxisSpec&, o2::framework::AxisSpec&, o2::framework::AxisSpec&, o2::framework::AxisSpec&, o2::framework::AxisSpec&, uint16_t, const TString&);
~JFFlucAnalysisO2Hist();
};

Expand Down
13 changes: 11 additions & 2 deletions PWGCF/JCorran/Tasks/jflucAnalysisTask.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGCF/JCorran/Tasks/jflucAnalysisTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -64,12 +64,17 @@
O2_DEFINE_CONFIGURABLE(cfgMultCutFormula, std::string, "", "Multiplicity correlations cut formula. A result greater than zero results in accepted event. Parameters: [cFT0C] FT0C centrality, [mFV0A] V0A multiplicity, [mGlob] global track multiplicity, [mPV] PV track multiplicity")

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"};

Check failure on line 67 in PWGCF/JCorran/Tasks/jflucAnalysisTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
ConfigurableAxis etaAxis{"axisEta", {40, -2.0, 2.0}, "eta axis for histograms"};

Check failure on line 68 in PWGCF/JCorran/Tasks/jflucAnalysisTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
ConfigurableAxis zvtAxis{"axisZvt", {20, -10.0, 10.0}, "zvertex axis for histograms"};

Check failure on line 69 in PWGCF/JCorran/Tasks/jflucAnalysisTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
ConfigurableAxis ptAxis{"axisPt", {60, 0.0, 300.0}, "pt axis for histograms"};

Check failure on line 70 in PWGCF/JCorran/Tasks/jflucAnalysisTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
ConfigurableAxis massAxis{"axisMass", {1, 0.0, 10.0}, "mass axis for histograms"};

Check failure on line 71 in PWGCF/JCorran/Tasks/jflucAnalysisTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)

ConfigurableAxis vnCorrAxis{"vnCorrAxis", {2048, -0.1, 0.1}, "vn correlation axis"};
ConfigurableAxis fourCorrSCAxis{"4pCorrAxisSC", {2048, -0.001, 0.001}, "4-particle correlation axis for SC"};

Check failure on line 74 in PWGCF/JCorran/Tasks/jflucAnalysisTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
ConfigurableAxis twoCorrSCAxis{"2pCorrAxisSC", {2048, -0.1, 0.1}, "2-particle correlation axis for SC"};

Check failure on line 75 in PWGCF/JCorran/Tasks/jflucAnalysisTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
ConfigurableAxis mixedCorrAxis{"mixedCorrAxis", {2048, -3.0, 3.0}, "N-particle correlation axis"};

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
Expand All @@ -88,15 +93,19 @@
auto axisSpecZvt = AxisSpec(zvtAxis);
auto axisSpecPt = AxisSpec(ptAxis);
auto axisSpecMass = AxisSpec(massAxis);
auto axisSpecVn = AxisSpec(vnCorrAxis);
auto axisSpec4pSC = AxisSpec(fourCorrSCAxis);
auto axisSpec2pSC = AxisSpec(twoCorrSCAxis);
auto axisSpecMixed = AxisSpec(mixedCorrAxis);
if (doprocessJDerived || doprocessJDerivedCorrected || doprocessCFDerived || doprocessCFDerivedCorrected || doprocessCFDerivedMultSet || doprocessCFDerivedMultSetCorrected || doprocessMCCFDerived) {
pcf = new JFFlucAnalysisO2Hist(registry, axisSpecMult, axisSpecPhi, axisSpecEta, axisSpecZvt, axisSpecPt, axisSpecMass, cfgMultCorrelationsMask, "jfluc");
pcf = new JFFlucAnalysisO2Hist(registry, axisSpecMult, axisSpecPhi, axisSpecEta, axisSpecZvt, axisSpecPt, axisSpecMass, axisSpecVn, axisSpec4pSC, axisSpec2pSC, axisSpecMixed, cfgMultCorrelationsMask, "jfluc");
pcf->AddFlags(JFFlucAnalysis::kFlucEbEWeighting);
pcf->UserCreateOutputObjects();
} else {
pcf = 0;
}
if (doprocessCF2ProngDerived || doprocessCF2ProngDerivedCorrected) {
pcf2Prong = new JFFlucAnalysisO2Hist(registry, axisSpecMult, axisSpecPhi, axisSpecEta, axisSpecZvt, axisSpecPt, axisSpecMass, cfgMultCorrelationsMask, "jfluc2prong");
pcf2Prong = new JFFlucAnalysisO2Hist(registry, axisSpecMult, axisSpecPhi, axisSpecEta, axisSpecZvt, axisSpecPt, axisSpecMass, axisSpecVn, axisSpec4pSC, axisSpec2pSC, axisSpecMixed, cfgMultCorrelationsMask, "jfluc2prong");
pcf2Prong->AddFlags(JFFlucAnalysis::kFlucEbEWeighting);
pcf2Prong->UserCreateOutputObjects();

Expand Down Expand Up @@ -151,7 +160,7 @@
void analyze(CollisionT const& collision, POITrackT const& poiTracks, REFTrackT const& refTracks)
{
if constexpr (std::experimental::is_detected<hasInvMass, typename POITrackT::iterator>::value) {
for (auto& track : poiTracks)

Check failure on line 163 in PWGCF/JCorran/Tasks/jflucAnalysisTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
registry.fill(HIST("invMass"), track.invMass(), track.pt(), collision.multiplicity());
}
pcf2Prong->Init();
Expand All @@ -174,7 +183,7 @@
{
if (cfgMultCutFormula.value.empty())
return true;
for (uint i = 0; i < 4; ++i) {

Check failure on line 186 in PWGCF/JCorran/Tasks/jflucAnalysisTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if ((cfgMultCorrelationsMask.value & (1u << i)) == 0 || multCutFormulaParamIndex[i] == ~0u)
continue;
auto estIndex = std::popcount(cfgMultCorrelationsMask.value & ((1u << i) - 1));
Expand Down
Loading