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
36 changes: 31 additions & 5 deletions PWGCF/JCorran/Core/JFFlucAnalysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -84,27 +84,27 @@

#define C(u) TComplex::Conjugate(u)
// TODO: conjugate macro
inline TComplex TwoGap(const TComplex (&Qa)[JFFlucAnalysis::kNH][JFFlucAnalysis::nKL], const TComplex (&Qb)[JFFlucAnalysis::kNH][JFFlucAnalysis::nKL], UInt_t a, UInt_t b)

Check warning on line 87 in PWGCF/JCorran/Core/JFFlucAnalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
{
return Qa[a][1] * C(Qb[b][1]);
}

inline TComplex ThreeGap(const TComplex (&Qa)[JFFlucAnalysis::kNH][JFFlucAnalysis::nKL], const TComplex (&Qb)[JFFlucAnalysis::kNH][JFFlucAnalysis::nKL], UInt_t a, UInt_t b, UInt_t c)

Check warning on line 92 in PWGCF/JCorran/Core/JFFlucAnalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
{
return Qa[a][1] * C(Qb[b][1] * Qb[c][1] - Qb[b + c][2]);
}

inline TComplex FourGap22(const TComplex (&Qa)[JFFlucAnalysis::kNH][JFFlucAnalysis::nKL], const TComplex (&Qb)[JFFlucAnalysis::kNH][JFFlucAnalysis::nKL], UInt_t a, UInt_t b, UInt_t c, UInt_t d)

Check warning on line 97 in PWGCF/JCorran/Core/JFFlucAnalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
{
return Qa[a][1] * Qa[b][1] * C(Qb[c][1] * Qb[d][1]) - Qa[a + b][2] * C(Qb[c][1] * Qb[d][1]) - Qa[a][1] * Qa[b][1] * C(Qb[c + d][2]) + Qa[a + b][2] * C(Qb[c + d][2]);
}

inline TComplex FourGap13(const TComplex (&Qa)[JFFlucAnalysis::kNH][JFFlucAnalysis::nKL], const TComplex (&Qb)[JFFlucAnalysis::kNH][JFFlucAnalysis::nKL], UInt_t a, UInt_t b, UInt_t c, UInt_t d)

Check warning on line 102 in PWGCF/JCorran/Core/JFFlucAnalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
{
return Qa[a][1] * C(Qb[b][1] * Qb[c][1] * Qb[d][1] - Qb[b + c][2] * Qb[d][1] - Qb[b + d][2] * Qb[c][1] - Qb[c + d][2] * Qb[b][1] + 2.0 * Qb[b + c + d][3]);
}

inline TComplex SixGap33(const TComplex (&Qa)[JFFlucAnalysis::kNH][JFFlucAnalysis::nKL], const TComplex (&Qb)[JFFlucAnalysis::kNH][JFFlucAnalysis::nKL], UInt_t n1, UInt_t n2, UInt_t n3, UInt_t n4, UInt_t n5, UInt_t n6)

Check warning on line 107 in PWGCF/JCorran/Core/JFFlucAnalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
{
return Qa[n1][1] * Qa[n2][1] * Qa[n3][1] * C(Qb[n4][1] * Qb[n5][1] * Qb[n6][1]) - Qa[n1][1] * Qa[n2][1] * Qa[n3][1] * C(Qb[n4 + n5][2] * Qb[n6][1]) - Qa[n1][1] * Qa[n2][1] * Qa[n3][1] * C(Qb[n4 + n6][2] * Qb[n5][1]) - Qa[n1][1] * Qa[n2][1] * Qa[n3][1] * C(Qb[n5 + n6][2] * Qb[n4][1]) + 2.0 * Qa[n1][1] * Qa[n2][1] * Qa[n3][1] * C(Qb[n4 + n5 + n6][3]) - Qa[n1 + n2][2] * Qa[n3][1] * C(Qb[n4][1] * Qb[n5][1] * Qb[n6][1]) + Qa[n1 + n2][2] * Qa[n3][1] * C(Qb[n4 + n5][2] * Qb[n6][1]) + Qa[n1 + n2][2] * Qa[n3][1] * C(Qb[n4 + n6][2] * Qb[n5][1]) + Qa[n1 + n2][2] * Qa[n3][1] * C(Qb[n5 + n6][2] * Qb[n4][1]) - 2.0 * Qa[n1 + n2][2] * Qa[n3][1] * C(Qb[n4 + n5 + n6][3]) - Qa[n1 + n3][2] * Qa[n2][1] * C(Qb[n4][1] * Qb[n5][1] * Qb[n6][1]) + Qa[n1 + n3][2] * Qa[n2][1] * C(Qb[n4 + n5][2] * Qb[n6][1]) + Qa[n1 + n3][2] * Qa[n2][1] * C(Qb[n4 + n6][2] * Qb[n5][1]) + Qa[n1 + n3][2] * Qa[n2][1] * C(Qb[n5 + n6][2] * Qb[n4][1]) - 2.0 * Qa[n1 + n3][2] * Qa[n2][1] * C(Qb[n4 + n5 + n6][3]) - Qa[n2 + n3][2] * Qa[n1][1] * C(Qb[n4][1] * Qb[n5][1] * Qb[n6][1]) + Qa[n2 + n3][2] * Qa[n1][1] * C(Qb[n4 + n5][2] * Qb[n6][1]) + Qa[n2 + n3][2] * Qa[n1][1] * C(Qb[n4 + n6][2] * Qb[n5][1]) + Qa[n2 + n3][2] * Qa[n1][1] * C(Qb[n5 + n6][2] * Qb[n4][1]) - 2.0 * Qa[n2 + n3][2] * Qa[n1][1] * C(Qb[n4 + n5 + n6][3]) + 2.0 * Qa[n1 + n2 + n3][3] * C(Qb[n4][1] * Qb[n5][1] * Qb[n6][1]) - 2.0 * Qa[n1 + n2 + n3][3] * C(Qb[n4 + n5][2] * Qb[n6][1]) - 2.0 * Qa[n1 + n2 + n3][3] * C(Qb[n4 + n6][2] * Qb[n5][1]) - 2.0 * Qa[n1 + n2 + n3][3] * C(Qb[n5 + n6][2] * Qb[n4][1]) + 4.0 * Qa[n1 + n2 + n3][3] * C(Qb[n4 + n5 + n6][3]);
}
Expand All @@ -116,6 +116,13 @@
return n >= 0 ? pqvecs->QvectorQC[n][p] : C(pqvecs->QvectorQC[-n][p]);
}

TComplex JFFlucAnalysis::Q(const JQVectorsT& qvecs, int n, int p)
{
// Return QvectorQC
// Q{-n, p} = Q{n, p}*
return n >= 0 ? qvecs.QvectorQC[n][p] : C(qvecs.QvectorQC[-n][p]);
}

TComplex JFFlucAnalysis::Two(int n1, int n2)
{
// two-particle correlation <exp[i(n1*phi1 + n2*phi2)]>
Expand All @@ -124,9 +131,26 @@

TComplex JFFlucAnalysis::Four(int n1, int n2, int n3, int n4)
{

return Q(n1, 1) * Q(n2, 1) * Q(n3, 1) * Q(n4, 1) - Q(n1 + n2, 2) * Q(n3, 1) * Q(n4, 1) - Q(n2, 1) * Q(n1 + n3, 2) * Q(n4, 1) - Q(n1, 1) * Q(n2 + n3, 2) * Q(n4, 1) + 2. * Q(n1 + n2 + n3, 3) * Q(n4, 1) - Q(n2, 1) * Q(n3, 1) * Q(n1 + n4, 2) + Q(n2 + n3, 2) * Q(n1 + n4, 2) - Q(n1, 1) * Q(n3, 1) * Q(n2 + n4, 2) + Q(n1 + n3, 2) * Q(n2 + n4, 2) + 2. * Q(n3, 1) * Q(n1 + n2 + n4, 3) - Q(n1, 1) * Q(n2, 1) * Q(n3 + n4, 2) + Q(n1 + n2, 2) * Q(n3 + n4, 2) + 2. * Q(n2, 1) * Q(n1 + n3 + n4, 3) + 2. * Q(n1, 1) * Q(n2 + n3 + n4, 3) - 6. * Q(n1 + n2 + n3 + n4, 4);
}

TComplex JFFlucAnalysis::TwoDiff(int n1, int n2)
{
#define dp(n, p) Q(*pqvecs, n, p) // POI
#define dQ(n, p) Q(*pqvecsRef, n, p) // REF
#define dq(n, p) dp(n, p) //(dp(n,p)+dQ(n,p)) //POI+REF in narrow bin. Since there is no mass for ref, q = POI
// #define dq(n,p) (dp(n,p)+dQ(n,p)) //POI+REF in narrow bin. Since there is no mass for ref, q = POI
return dp(n1, 1) * dQ(n2, 1) - dq(n1 + n2, 2);
}

TComplex JFFlucAnalysis::FourDiff(int n1, int n2, int n3, int n4)
{
return dp(n1, 1) * dQ(n2, 1) * dQ(n3, 1) * dQ(n4, 1) - dq(n1 + n2, 2) * dQ(n3, 1) * dQ(n4, 1) - dq(n1 + n3, 2) * dQ(n2, 1) * dQ(n4, 1) - dp(n1, 1) * dQ(n2 + n3, 2) * dQ(n4, 1) + 2. * dq(n1 + n2 + n3, 3) * dQ(n4, 1) - dQ(n2, 1) * dQ(n3, 1) * dq(n1 + n4, 2) + dQ(n2 + n3, 2) * dq(n1 + n4, 2) - dp(n1, 1) * dQ(n3, 1) * dQ(n2 + n4, 2) + dq(n1 + n3, 2) * dQ(n2 + n4, 2) + 2. * dQ(n3, 1) * dq(n1 + n2 + n4, 3) - dp(n1, 1) * dQ(n2, 1) * dQ(n3 + n4, 2) + dq(n1 + n2, 2) * dQ(n3 + n4, 2) + 2. * dQ(n2, 1) * dq(n1 + n3 + n4, 3) + 2. * dp(n1, 1) * dQ(n2 + n3 + n4, 3) - 6. * dq(n1 + n2 + n3 + n4, 4);
}

#undef dp
#undef dQ
#undef dq
#undef C

//________________________________________________________________________
Expand All @@ -136,15 +160,15 @@
TComplex ncorr[kNH][nKL];
TComplex ncorr2[kNH][nKL][kcNH][nKL];

for (UInt_t i = 0; i < 2; ++i) {

Check warning on line 163 in PWGCF/JCorran/Core/JFFlucAnalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
if ((subeventMask & (1 << i)) == 0)
continue;
decltype(pqvecs->QvectorQCgap[i])& Qa = pqvecs->QvectorQCgap[i]; // this is for one differential bin only.
decltype(pqvecs->QvectorQCgap[1 - i])& Qb = (pqvecsRef ? pqvecsRef : pqvecs)->QvectorQCgap[1 - i]; // A & B subevents from POI and REF, when given
Double_t ref_2p = TwoGap(Qa, Qb, 0, 0).Re();

Check warning on line 168 in PWGCF/JCorran/Core/JFFlucAnalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
Double_t ref_3p = ThreeGap(Qa, Qb, 0, 0, 0).Re();

Check warning on line 169 in PWGCF/JCorran/Core/JFFlucAnalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
Double_t ref_4p = FourGap22(Qa, Qb, 0, 0, 0, 0).Re();

Check warning on line 170 in PWGCF/JCorran/Core/JFFlucAnalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
Double_t ref_4pB = FourGap13(Qa, Qb, 0, 0, 0, 0).Re();

Check warning on line 171 in PWGCF/JCorran/Core/JFFlucAnalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
Double_t ref_6p = SixGap33(Qa, Qb, 0, 0, 0, 0, 0, 0).Re();

Double_t ebe_2p_weight = 1.0;
Expand Down Expand Up @@ -296,19 +320,21 @@
}
}

auto four = [&](int a, int b, int c, int d) -> TComplex { return pqvecsRef ? FourDiff(a, b, c, d) : Four(a, b, c, d); };
auto two = [&](int a, int b) -> TComplex { return pqvecsRef ? TwoDiff(a, b) : Two(a, b); };
Double_t event_weight_four = 1.0;
Double_t event_weight_two = 1.0;
if (flags & kFlucEbEWeighting) {
event_weight_four = Four(0, 0, 0, 0).Re();
event_weight_two = Two(0, 0).Re();
event_weight_four = four(0, 0, 0, 0).Re();
event_weight_two = two(0, 0).Re();
}

for (UInt_t ih = 2; ih < kNH; ih++) {
for (UInt_t ihh = 2, mm = (ih < kcNH ? ih : static_cast<UInt_t>(kcNH)); ihh < mm; ihh++) {
TComplex scfour = Four(ih, ihh, -ih, -ihh) / Four(0, 0, 0, 0).Re();
TComplex scfour = four(ih, ihh, -ih, -ihh) / four(0, 0, 0, 0).Re();
pht[HIST_THN_SC_with_QC_4corr]->Fill(fCent, fAvgInvariantMass, ih, ihh, scfour.Re(), event_weight_four);
}
TComplex sctwo = Two(ih, -ih) / Two(0, 0).Re();
TComplex sctwo = two(ih, -ih) / two(0, 0).Re();
pht[HIST_THN_SC_with_QC_2corr]->Fill(fCent, fAvgInvariantMass, ih, sctwo.Re(), event_weight_two);
}
}
Expand Down
18 changes: 11 additions & 7 deletions PWGCF/JCorran/Core/JFFlucAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class JFFlucAnalysis : public TNamed
TComplex Q(int n, int p);
TComplex Two(int n1, int n2);
TComplex Four(int n1, int n2, int n3, int n4);
TComplex TwoDiff(int n1, int n2);
TComplex FourDiff(int n1, int n2, int n3, int n4);
void UserExec(Option_t* option);
void Terminate(Option_t*);

Expand Down Expand Up @@ -124,6 +126,7 @@ class JFFlucAnalysis : public TNamed
kK4,
nKL }; // order
using JQVectorsT = JQVectors<TComplex, kNH, nKL, true>;
TComplex Q(const JQVectorsT& qvecs, int n, int p);
inline void SetJQVectors(const JQVectorsT* _pqvecs)
{
pqvecs = _pqvecs;
Expand All @@ -140,10 +143,10 @@ class JFFlucAnalysis : public TNamed
template <class T>
using hasWeightEff = decltype(std::declval<T&>().weightEff());
template <class T>
using hasType = decltype(std::declval<T&>().particleType());
using hasSign = decltype(std::declval<T&>().sign());

template <class JInputClass>
inline void FillQA(JInputClass& inputInst, UInt_t type = 0)
inline void FillQA(JInputClass& inputInst, UInt_t type = 0u)
{
ph1[HIST_TH1_CENTRALITY]->Fill(fCent);
ph1[HIST_TH1_IMPACTPARAM]->Fill(fImpactParameter);
Expand All @@ -153,19 +156,20 @@ class JFFlucAnalysis : public TNamed
using JInputClassIter = typename JInputClass::iterator;
if constexpr (std::experimental::is_detected<hasWeightEff, const JInputClassIter>::value)
corrInv /= track.weightEff();
pht[HIST_THN_PTETA]->Fill(fCent, track.pt(), track.eta(), corrInv);
if constexpr (std::experimental::is_detected<hasSign, const JInputClassIter>::value)
pht[HIST_THN_PTETA]->Fill(fCent, track.pt(), track.eta(), track.sign(), corrInv);
else
pht[HIST_THN_PTETA]->Fill(fCent, track.pt(), track.eta(), 0.0, corrInv);
if constexpr (std::experimental::is_detected<hasWeightNUA, const JInputClassIter>::value)
corrInv /= track.weightNUA();
pht[HIST_THN_PHIETA]->Fill(fCent, track.phi(), track.eta(), corrInv);
if constexpr (std::experimental::is_detected<hasType, const JInputClassIter>::value)
type = track.particleType();
pht[HIST_THN_PHIETAZ]->Fill(fCent, static_cast<Double_t>(type), track.phi(), track.eta(), fVertex, corrInv);
}

ph1[HIST_TH1_ZVERTEX]->Fill(fVertex);
}

#define kcNH kH6 // max second dimension + 1
#define kcNH kH4 // max second dimension + 1
protected:
Float_t fVertex; //!
Float_t fAvgInvariantMass; //!
Expand All @@ -178,7 +182,7 @@ class JFFlucAnalysis : public TNamed
const JQVectorsT* pqvecsRef; //!

TH1* ph1[HIST_TH1_COUNT]; //!
THn* pht[HIST_THN_COUNT]; //!
THnSparse* pht[HIST_THN_COUNT]; //!
THnSparse* phs[HIST_THN_SPARSE_COUNT]; //!

ClassDef(JFFlucAnalysis, 1)
Expand Down
22 changes: 10 additions & 12 deletions PWGCF/JCorran/Core/JFFlucAnalysisO2Hist.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,26 @@

using namespace o2;

JFFlucAnalysisO2Hist::JFFlucAnalysisO2Hist(HistogramRegistry& registry, AxisSpec& axisMultiplicity, AxisSpec& phiAxis, AxisSpec& etaAxis, AxisSpec& zvtAxis, AxisSpec& massAxis, const TString& folder) : JFFlucAnalysis()
JFFlucAnalysisO2Hist::JFFlucAnalysisO2Hist(HistogramRegistry& registry, AxisSpec& axisMultiplicity, AxisSpec& phiAxis, AxisSpec& etaAxis, AxisSpec& zvtAxis, AxisSpec& ptAxis, AxisSpec& massAxis, 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();
ph1[HIST_TH1_IMPACTPARAM] = std::get<std::shared_ptr<TH1>>(registry.add(Form("%s/h_IP", folder.Data()), "impact parameter", {HistType::kTH1F, {{400, -2.0, 20.0}}})).get();
ph1[HIST_TH1_ZVERTEX] = std::get<std::shared_ptr<TH1>>(registry.add(Form("%s/h_vertex", folder.Data()), "z vertex", {HistType::kTH1F, {{100, -20.0, 20.0}}})).get();
//
// TODO: these shall be configurable
std::vector<double> ptBinning = {0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 6.0, 10.0};
AxisSpec ptAxis = {ptBinning, "#it{p}_{T} (GeV/c)"};

AxisSpec chgAxis = {3, -1.5, 1.5, "charge"};
AxisSpec typeAxis = {2, -0.5, 1.5, "type"};
pht[HIST_THN_PHIETAZ] = std::get<std::shared_ptr<THn>>(registry.add(Form("%s/h_phietaz", folder.Data()), "multiplicity/centrality, type, phi, eta, z", {HistType::kTHnF, {axisMultiplicity, typeAxis, phiAxis, etaAxis, zvtAxis}})).get();
pht[HIST_THN_PTETA] = std::get<std::shared_ptr<THn>>(registry.add(Form("%s/h_pteta", folder.Data()), "(corrected) multiplicity/centrality, pT, eta", {HistType::kTHnF, {axisMultiplicity, ptAxis, etaAxis}})).get();
pht[HIST_THN_PHIETA] = std::get<std::shared_ptr<THn>>(registry.add(Form("%s/h_phieta", folder.Data()), "(corrected) multiplicity/centrality, phi, eta", {HistType::kTHnF, {axisMultiplicity, phiAxis, etaAxis}})).get();
pht[HIST_THN_PHIETAZ] = std::get<std::shared_ptr<THnSparse>>(registry.add(Form("%s/h_phietaz", folder.Data()), "multiplicity/centrality, type, phi, eta, z", {HistType::kTHnSparseF, {axisMultiplicity, typeAxis, phiAxis, etaAxis, zvtAxis}})).get();
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();
pht[HIST_THN_PHIETA] = std::get<std::shared_ptr<THnSparse>>(registry.add(Form("%s/h_phieta", folder.Data()), "(corrected) multiplicity/centrality, phi, eta", {HistType::kTHnSparseF, {axisMultiplicity, phiAxis, etaAxis}})).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<THn>>(registry.add(Form("%s/h_SC_with_QC_4corr", folder.Data()), "SC_with_QC_4corr", {HistType::kTHnF, {axisMultiplicity, massAxis, hAxis, hAxis, {2048, -0.001, 0.001, "correlation"}}})).get();
pht[HIST_THN_SC_with_QC_2corr] = std::get<std::shared_ptr<THn>>(registry.add(Form("%s/h_SC_with_QC_2corr", folder.Data()), "SC_with_QC_2corr", {HistType::kTHnF, {axisMultiplicity, massAxis, hAxis, {2048, -0.1, 0.1, "correlation"}}})).get();
pht[HIST_THN_SC_with_QC_2corr_gap] = std::get<std::shared_ptr<THn>>(registry.add(Form("%s/h_SC_with_QC_2corr_gap", folder.Data()), "SC_with_QC_2corr_gap", {HistType::kTHnF, {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, {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();
for (UInt_t i = HIST_THN_V4V2star_2; i < HIST_THN_COUNT; ++i)
pht[i] = std::get<std::shared_ptr<THn>>(registry.add(Form("%s/h_corrC%02u", folder.Data(), i - HIST_THN_V4V2star_2), "correlator", {HistType::kTHnF, {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, {2048, -3.0, 3.0, "correlation"}}})).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 @@ -23,7 +23,7 @@ using namespace o2::framework;
class JFFlucAnalysisO2Hist : public JFFlucAnalysis
{
public:
JFFlucAnalysisO2Hist(HistogramRegistry&, AxisSpec&, AxisSpec&, AxisSpec&, AxisSpec&, AxisSpec&, const TString&);
JFFlucAnalysisO2Hist(HistogramRegistry&, AxisSpec&, AxisSpec&, AxisSpec&, AxisSpec&, AxisSpec&, AxisSpec&, const TString&);
~JFFlucAnalysisO2Hist();
};

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 @@ -65,7 +65,7 @@ class JQVectors : public std::conditional_t<gap, JQVectorsGapBase<Q, nh, nk>, JQ
continue;
using JInputClassIter = typename JInputClass::iterator;
if constexpr (std::experimental::is_detected<hasInvMass, const JInputClassIter>::value) {
if (track.invMass() < massMin || track.invMass() > massMax)
if (track.invMass() < massMin || track.invMass() >= massMax)
continue;
}

Expand Down
8 changes: 5 additions & 3 deletions PWGCF/JCorran/Tasks/jflucAnalysisTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ struct jflucAnalysisTask {
ConfigurableAxis phiAxis{"axisPhi", {50, 0.0, o2::constants::math::TwoPI}, "phi axis for histograms"};
ConfigurableAxis etaAxis{"axisEta", {40, -2.0, 2.0}, "eta axis for histograms"};
ConfigurableAxis zvtAxis{"axisZvt", {20, -10.0, 10.0}, "zvertex axis for histograms"};
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
Expand All @@ -71,16 +72,17 @@ struct jflucAnalysisTask {
auto axisSpecPhi = AxisSpec(phiAxis);
auto axisSpecEta = AxisSpec(etaAxis);
auto axisSpecZvt = AxisSpec(zvtAxis);
auto axisSpecPt = AxisSpec(ptAxis);
auto axisSpecMass = AxisSpec(massAxis);
if (doprocessJDerived || doprocessJDerivedCorrected || doprocessCFDerived || doprocessCFDerivedCorrected) {
pcf = new JFFlucAnalysisO2Hist(registry, axisSpecMult, axisSpecPhi, axisSpecEta, axisSpecZvt, axisSpecMass, "jfluc");
pcf = new JFFlucAnalysisO2Hist(registry, axisSpecMult, axisSpecPhi, axisSpecEta, axisSpecZvt, axisSpecPt, axisSpecMass, "jfluc");
pcf->AddFlags(JFFlucAnalysis::kFlucEbEWeighting);
pcf->UserCreateOutputObjects();
} else {
pcf = 0;
}
if (doprocessCF2ProngDerived || doprocessCF2ProngDerivedCorrected) {
pcf2Prong = new JFFlucAnalysisO2Hist(registry, axisSpecMult, axisSpecPhi, axisSpecEta, axisSpecZvt, axisSpecMass, "jfluc2prong");
pcf2Prong = new JFFlucAnalysisO2Hist(registry, axisSpecMult, axisSpecPhi, axisSpecEta, axisSpecZvt, axisSpecPt, axisSpecMass, "jfluc2prong");
pcf2Prong->AddFlags(JFFlucAnalysis::kFlucEbEWeighting);
pcf2Prong->UserCreateOutputObjects();

Expand Down Expand Up @@ -116,8 +118,8 @@ struct jflucAnalysisTask {
pcf2Prong->Init();
pcf2Prong->SetEventCentrality(collision.multiplicity());
pcf2Prong->SetEventVertex(collision.posZ());
pcf2Prong->FillQA(poiTracks, 1u); // type = 1, all POI tracks in this list are of the same type
pcf2Prong->FillQA(refTracks, 0u);
pcf2Prong->FillQA(poiTracks, 1u); // type = 1, all POI tracks in this list are of the same type
qvecsRef.Calculate(refTracks, etamin, etamax);
pcf2Prong->SetJQVectors(&qvecs, &qvecsRef);
const AxisSpec& a = AxisSpec(massAxis);
Expand Down
6 changes: 4 additions & 2 deletions PWGCF/JCorran/Tasks/jflucWeightsLoader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/// \since May 2024

#include <experimental/type_traits>
#include <string>
#include <TFile.h>
#include <THn.h>

Expand Down Expand Up @@ -94,7 +95,8 @@ struct jflucWeightsLoader {
float phiWeight, effWeight;
if (ph) {
UInt_t partType = 0; // partType 0 = all charged hadrons
if constexpr (std::experimental::is_detected<hasDecay, typename TrackT::iterator>::value) {
// TODO: code below to be enabled
/*if constexpr (std::experimental::is_detected<hasDecay, typename TrackT::iterator>::value) {
switch (track.decay()) {
case aod::cf2prongtrack::D0ToPiK:
case aod::cf2prongtrack::D0barToKPi:
Expand All @@ -103,7 +105,7 @@ struct jflucWeightsLoader {
default:
break;
}
}
}*/
const Double_t coords[] = {collision.multiplicity(), static_cast<Double_t>(partType), track.phi(), track.eta(), collision.posZ()};
phiWeight = ph->GetBinContent(ph->GetBin(coords));
} else {
Expand Down
1 change: 0 additions & 1 deletion PWGCF/TableProducer/filterCorrelations.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "Common/DataModel/Centrality.h"

#include <TH3F.h>
#include <TDatabasePDG.h>

using namespace o2;
using namespace o2::framework;
Expand Down
Loading