Skip to content

Commit

Permalink
Merge branch 'AliceO2Group:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ljoergen authored Oct 25, 2024
2 parents 472bc31 + 9185290 commit 82666cd
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 40 deletions.
69 changes: 45 additions & 24 deletions PWGCF/Flow/Tasks/flowGFWOmegaXi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ struct FlowGFWOmegaXi {

// Connect to ccdb
Service<ccdb::BasicCCDBManager> ccdb;
O2_DEFINE_CONFIGURABLE(nolaterthan, int64_t, std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object")
O2_DEFINE_CONFIGURABLE(url, std::string, "http://ccdb-test.cern.ch", "url of the ccdb repository")
O2_DEFINE_CONFIGURABLE(cfgnolaterthan, int64_t, std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object")
O2_DEFINE_CONFIGURABLE(cfgurl, std::string, "http://alice-ccdb.cern.ch", "url of the ccdb repository")

// Define output
HistogramRegistry registry{"registry"};
Expand All @@ -140,47 +140,43 @@ struct FlowGFWOmegaXi {
using aodCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs, aod::Mults>>; // collisions filter
using DaughterTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::pidTPCPi, aod::pidTPCPr, aod::pidTPCKa>;

// Set the pt, mult and phi Axis;
o2::framework::AxisSpec axisPt = cfgaxisPt;
int nPtBins = axisPt.binEdges.size() - 1;
TAxis* fPtAxis = new TAxis(nPtBins, &(axisPt.binEdges)[0]);
// Declare the pt, mult and phi Axis;
int nPtBins = 0;
TAxis* fPtAxis = nullptr;

o2::framework::AxisSpec axisXiPt = cfgaxisPtXi;
int nXiPtBins = axisXiPt.binEdges.size() - 1;
TAxis* fXiPtAxis = new TAxis(nXiPtBins, &(axisXiPt.binEdges)[0]);
int nXiPtBins = 0;
TAxis* fXiPtAxis = nullptr;

o2::framework::AxisSpec axisV0Pt = cfgaxisPtV0;
int nV0PtBins = axisV0Pt.binEdges.size() - 1;
TAxis* fV0PtAxis = new TAxis(nV0PtBins, &(axisV0Pt.binEdges)[0]);
int nV0PtBins = 0;
TAxis* fV0PtAxis = nullptr;

o2::framework::AxisSpec axisMult = axisMultiplicity;
int nMultBins = axisMult.binEdges.size() - 1;
TAxis* fMultAxis = new TAxis(nMultBins, &(axisMult.binEdges)[0]);
int nMultBins = 0;
TAxis* fMultAxis = nullptr;

int nPhiBins = 60;
TAxis* fPhiAxis = new TAxis(nPhiBins, 0, constants::math::TwoPI);

TAxis* fOmegaMass = new TAxis(cfgOmegaMassbins, 1.63, 1.71);
TAxis* fOmegaMass = nullptr;

TAxis* fXiMass = new TAxis(cfgXiMassbins, 1.3, 1.37);
TAxis* fXiMass = nullptr;

TAxis* fK0sMass = new TAxis(cfgK0sMassbins, 0.4, 0.6);
TAxis* fK0sMass = nullptr;

TAxis* fLambdaMass = new TAxis(cfgLambdaMassbins, 1.08, 1.16);
TAxis* fLambdaMass = nullptr;

void init(InitContext const&) // Initialization
{
ccdb->setURL(url.value);
ccdb->setURL(cfgurl.value);
ccdb->setCaching(true);
ccdb->setCreatedNotAfter(nolaterthan.value);
ccdb->setCreatedNotAfter(cfgnolaterthan.value);

// Add some output objects to the histogram registry
registry.add("hPhi", "", {HistType::kTH1D, {cfgaxisPhi}});
registry.add("hEta", "", {HistType::kTH1D, {cfgaxisEta}});
registry.add("hVtxZ", "", {HistType::kTH1D, {cfgaxisVertex}});
registry.add("hMult", "", {HistType::kTH1D, {{3000, 0.5, 3000.5}}});
registry.add("hCent", "", {HistType::kTH1D, {{90, 0, 90}}});
registry.add("hPt", "", {HistType::kTH1D, {axisPt}});
registry.add("hPt", "", {HistType::kTH1D, {cfgaxisPt}});
registry.add("hEtaPhiVtxzREF", "", {HistType::kTH3D, {cfgaxisEta, cfgaxisPhi, {20, -10, 10}}});
registry.add("hEtaPhiVtxzPOIXi", "", {HistType::kTH3D, {cfgaxisEta, cfgaxisPhi, {20, -10, 10}}});
registry.add("hEtaPhiVtxzPOIOmega", "", {HistType::kTH3D, {cfgaxisEta, cfgaxisPhi, {20, -10, 10}}});
Expand All @@ -197,8 +193,8 @@ struct FlowGFWOmegaXi {
registry.get<TH2>(HIST("hEventCount"))->GetYaxis()->SetBinLabel(4, "Omega");

// cumulant of flow
registry.add("c22", ";Centrality (%) ; C_{2}{2}", {HistType::kTProfile2D, {axisPt, axisMultiplicity}});
registry.add("c24", ";Centrality (%) ; C_{2}{4}", {HistType::kTProfile2D, {axisPt, axisMultiplicity}});
registry.add("c22", ";Centrality (%) ; C_{2}{2}", {HistType::kTProfile2D, {cfgaxisPt, axisMultiplicity}});
registry.add("c24", ";Centrality (%) ; C_{2}{4}", {HistType::kTProfile2D, {cfgaxisPt, axisMultiplicity}});
// pt-diff cumulant of flow
registry.add("Xic22dpt", ";pt ; C_{2}{2} ", {HistType::kTProfile3D, {cfgaxisPtXi, cfgaxisXiminusMassforflow, axisMultiplicity}});
registry.add("Omegac22dpt", ";pt ; C_{2}{2} ", {HistType::kTProfile3D, {cfgaxisPtXi, cfgaxisOmegaminusMassforflow, axisMultiplicity}});
Expand All @@ -218,6 +214,31 @@ struct FlowGFWOmegaXi {
registry.add("InvMassK0s", "", {HistType::kTHnSparseF, {cfgaxisPtV0, axisK0sMass, cfgaxisEta, axisMultiplicity}});
registry.add("InvMassLambda", "", {HistType::kTHnSparseF, {cfgaxisPtV0, axisLambdaMass, cfgaxisEta, axisMultiplicity}});

// Set the pt, mult and phi Axis;
o2::framework::AxisSpec axisPt = cfgaxisPt;
nPtBins = axisPt.binEdges.size() - 1;
fPtAxis = new TAxis(nPtBins, &(axisPt.binEdges)[0]);

o2::framework::AxisSpec axisXiPt = cfgaxisPtXi;
nXiPtBins = axisXiPt.binEdges.size() - 1;
fXiPtAxis = new TAxis(nXiPtBins, &(axisXiPt.binEdges)[0]);

o2::framework::AxisSpec axisV0Pt = cfgaxisPtV0;
nV0PtBins = axisV0Pt.binEdges.size() - 1;
fV0PtAxis = new TAxis(nV0PtBins, &(axisV0Pt.binEdges)[0]);

o2::framework::AxisSpec axisMult = axisMultiplicity;
nMultBins = axisMult.binEdges.size() - 1;
fMultAxis = new TAxis(nMultBins, &(axisMult.binEdges)[0]);

fOmegaMass = new TAxis(cfgOmegaMassbins, 1.63, 1.71);

fXiMass = new TAxis(cfgXiMassbins, 1.3, 1.37);

fK0sMass = new TAxis(cfgK0sMassbins, 0.4, 0.6);

fLambdaMass = new TAxis(cfgLambdaMassbins, 1.08, 1.16);

fGFW->AddRegion("reffull", -0.8, 0.8, 1, 1); // ("name", etamin, etamax, ptbinnum, bitmask)eta region -0.8 to 0.8
// with (-0.5, 0.5) eta gap
fGFW->AddRegion("refN10", -0.8, -0.5, 1, 1);
Expand Down
22 changes: 11 additions & 11 deletions PWGLF/Tasks/Resonances/k892pmanalysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,9 @@ struct k892pmanalysis {
}

// apply the competing V0 rejection cut (excluding Lambda0 candidates, massLambdaPDG = 1115.683 MeV/c2)
if (abs(v0.mLambda() - massLambda0) < cV0MassWindow)
if (std::abs(v0.mLambda() - massLambda0) < cV0MassWindow)
continue;
if (abs(v0.mAntiLambda() - massAntiLambda0) < cV0MassWindow)
if (std::abs(v0.mAntiLambda() - massAntiLambda0) < cV0MassWindow)
continue;

if (!IsMix && !IsV0QAFilled) {
Expand Down Expand Up @@ -382,7 +382,7 @@ struct k892pmanalysis {
}

// Checking whether the mid-rapidity condition is met
if (abs(lResonance.Rapidity()) > 0.5) {
if (std::abs(lResonance.Rapidity()) > 0.5) {
continue;
}

Expand All @@ -401,7 +401,7 @@ struct k892pmanalysis {
histos.fill(HIST("k892pmMassPtMult3d"), lResonance.M(), lResonance.Pt(), multiplicity);
if constexpr (IsMC) {
// LOG(info) << "track PDG:\t" << trk.pdgCode() << "\tV0 PDG:\t" << v0.pdgCode();
if (abs(trk.pdgCode()) != 211 || abs(v0.pdgCode()) != 310) // Skip to next iteration if daughters are not charged pion + K0s/AntiK0s
if (std::abs(trk.pdgCode()) != 211 || std::abs(v0.pdgCode()) != 310) // Skip to next iteration if daughters are not charged pion + K0s/AntiK0s
continue;
if (trk.motherPDG() != v0.motherPDG())
continue;
Expand Down Expand Up @@ -444,17 +444,17 @@ struct k892pmanalysis {
void processMCTrue(aod::ResoMCParents& resoParents)
{
for (auto& part : resoParents) { // loop over all pre-filtered MC particles
if (abs(part.pdgCode()) != 323) // K*892(pm)
if (std::abs(part.pdgCode()) != 323) // K*892(pm)
continue;
if (abs(part.y()) > 0.5) // rapidity cut
if (std::abs(part.y()) > 0.5) // rapidity cut
continue;
bool pass1 = false;
bool pass2 = false;
/*// Sanity check: looking for K*0 resonances for sanity check
if (abs(part.pdgCode()) == 323) {
if (std::abs(part.pdgCode()) == 323) {
LOG(info) << "Found charged K*: " << part.pdgCode() << ". Daughters' PDG are " << part.daughterPDG1() << " and " << part.daughterPDG2();
}
if (abs(part.pdgCode()) == 313) {
if (std::abs(part.pdgCode()) == 313) {
LOG(info) << "Found non-charged K*: " << part.pdgCode() << ". Daughters' PDG are " << part.daughterPDG1() << " and " << part.daughterPDG2();
}*/

Expand All @@ -466,11 +466,11 @@ struct k892pmanalysis {
pass2 = true;
histos.fill(HIST("hK892pmCounter"), 1.5);
}
/*if (abs(part.daughterPDG1()) == 211)
/*if (std::abs(part.daughterPDG1()) == 211)
histos.fill(HIST("hDaughterCounter"), 0.5);
if (abs(part.daughterPDG2()) == 310)
if (std::abs(part.daughterPDG2()) == 310)
histos.fill(HIST("hDaughterCounter"), 1.5);
if (abs(part.daughterPDG1()) == 211 && abs(part.daughterPDG2()) == 310)
if (std::abs(part.daughterPDG1()) == 211 && std::abs(part.daughterPDG2()) == 310)
histos.fill(HIST("hDaughterCounter"), 2.5);*/
// if (!pass1 || !pass2) // Go on only if we have both decay products, else skip to next iteration
if (!pass1 && !pass2) // Go on only if we have both decay products, else skip to next iteration
Expand Down
5 changes: 5 additions & 0 deletions PWGLF/Tasks/Strangeness/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,8 @@ o2physics_add_dpl_workflow(strange-yield-pbpb
SOURCES strange-yield-pbpb.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(lambdak0sflattenicity
SOURCES lambdak0sflattenicity.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
File renamed without changes.
5 changes: 0 additions & 5 deletions PWGMM/UE/Tasks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,3 @@ o2physics_add_dpl_workflow(ue-zdc-analysis
SOURCES ue-zdc-analysys.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(ue-lambdak0sflattenicity
SOURCES lambdak0sflattenicity.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

0 comments on commit 82666cd

Please sign in to comment.