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
170 changes: 85 additions & 85 deletions PWGLF/Tasks/Strangeness/strangecasctrack.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 PWGLF/Tasks/Strangeness/strangecasctrack.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 All @@ -13,14 +13,16 @@
/// \brief Analysis of strangeness tracking efficiency via primary production of Omega and Xi in Run 3
/// \author Yakiv Paroviak (yakiv.paroviak@cern.ch)

#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
#include "PWGLF/DataModel/LFStrangenessTables.h"

#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/Multiplicity.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/Multiplicity.h"

#include "Framework/ASoAHelpers.h"
#include "Framework/AnalysisDataModel.h"
#include "PWGLF/DataModel/LFStrangenessTables.h"
#include "Framework/AnalysisTask.h"
#include "Framework/runDataProcessing.h"

using namespace o2;
using namespace o2::framework;
Expand All @@ -33,9 +35,9 @@

HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};

Configurable<bool> doProcessPP{"doprocesspp", true, "true for pp, false for PbPb and OO"};

Check failure on line 38 in PWGLF/Tasks/Strangeness/strangecasctrack.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.)
Configurable<bool> doProcessPbPb{"doprocesspbpb", false, "true for PbPb, false for pp and OO"};

Check failure on line 39 in PWGLF/Tasks/Strangeness/strangecasctrack.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.)
Configurable<bool> doProcessOO{"doprocessoo", false, "true for OO, false for pp and PbPb"};

Check failure on line 40 in PWGLF/Tasks/Strangeness/strangecasctrack.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.)

Configurable<bool> doProcessMC{"domc", false, "true for MC, false for data"};

Expand All @@ -48,10 +50,9 @@
ConfigurableAxis axisOmegaMass{"axisOmegaMass", {2000, 1.6, 1.8}, "#Omega M_{inv} (GeV/c^{2})"};
ConfigurableAxis axisXiMass{"axisXiMass", {2000, 1.2, 1.4}, "#Xi M_{inv} (GeV/c^{2})"};

Configurable<double> CutDCAtoPVxy{"cutpvdcaxy", 0.02f, "max cascade dca to PV in xy"};

Check failure on line 53 in PWGLF/Tasks/Strangeness/strangecasctrack.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
Configurable<double> CutDCAtoPVz{"cutpvdcaz", 0.02f, "max cascade dca to PV in z"};

Check failure on line 54 in PWGLF/Tasks/Strangeness/strangecasctrack.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.


void init(InitContext const&)
{
histos.add("Events/EvCounter", "Event Counter", kTH1F, {{1, 0, 1}});
Expand All @@ -60,106 +61,105 @@
histos.add("Events/PVz", "PV z position", kTH1F, {{100, -20, 20}});
histos.add("Events/Mult", "Multiplicity", kTH1F, {axisMult});

histos.add("Tracked/Phi", "Phi", kTH1F, {{100, 0., 2*M_PI}});
histos.add("Tracked/Phi", "Phi", kTH1F, {{100, 0., 2 * M_PI}});

Check failure on line 64 in PWGLF/Tasks/Strangeness/strangecasctrack.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pi-multiple-fraction]

Use multiples/fractions of PI defined in o2::constants::math.

Check failure on line 64 in PWGLF/Tasks/Strangeness/strangecasctrack.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
histos.add("Tracked/Eta", "Eta", kTH1F, {{102, -2.01, 2.01}});
histos.add("Tracked/DCAxy", "DCA to xy", kTH1F, {{500, 0., 0.5}});
histos.add("Tracked/DCAz", "DCA to z", kTH1F, {{500, 0., 0.5}});
histos.add("Tracked/EvMult", "Multiplicity of events with >=1 cascade", kTH1F, {axisMult});
histos.add("Tracked/MassOmega", "Invariant mass hypothesis",kTH1F, {axisOmegaMass});
histos.add("Tracked/MassOmega", "Invariant mass hypothesis", kTH1F, {axisOmegaMass});
histos.add("Tracked/MassXi", "Invariant mass hypothesis", kTH1F, {axisXiMass});
histos.add("Tracked/Omega", "",kTHnD, {axisOmegaMass, axisPt, axisMult});
histos.add("Tracked/Omega", "", kTHnD, {axisOmegaMass, axisPt, axisMult});
histos.add("Tracked/Xi", "", kTHnD, {axisXiMass, axisPt, axisMult});

histos.add("All/Phi", "Phi", kTH1F, {{100, 0., 2*M_PI}});
histos.add("All/Phi", "Phi", kTH1F, {{100, 0., 2 * M_PI}});

Check failure on line 74 in PWGLF/Tasks/Strangeness/strangecasctrack.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pi-multiple-fraction]

Use multiples/fractions of PI defined in o2::constants::math.

Check failure on line 74 in PWGLF/Tasks/Strangeness/strangecasctrack.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
histos.add("All/Eta", "Eta", kTH1F, {{102, -2.01, 2.01}});
histos.add("All/DCAxy", "DCA to xy", kTH1F, {{1000, 0, 1.}});
histos.add("All/DCAz", "DCA to z", kTH1F, {{1000, 0, 1.}});
histos.add("All/EvMult", "Multiplicity of events with >=1 cascade", kTH1F, {axisMult});
histos.add("All/MassOmega", "Invariant mass hypothesis",kTH1F, {axisOmegaMass});
histos.add("All/MassOmega", "Invariant mass hypothesis", kTH1F, {axisOmegaMass});
histos.add("All/MassXi", "Invariant mass hypothesis", kTH1F, {axisXiMass});
histos.add("All/Omega", "", kTHnD, {axisOmegaMass, axisPt, axisMult});
histos.add("All/Xi", "", kTHnD, {axisXiMass, axisPt, axisMult});
histos.add("All/Xi", "", kTHnD, {axisXiMass, axisPt, axisMult});
}


void processTracked(soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms, aod::CentFT0Cs, aod::PVMults>::iterator const& collision,
aod::TraCascDatas const& tracascades)
{
double mult = doProcessPP ? collision.centFT0M() : collision.centFT0C();
int64_t casccollid = 0;
for (auto const& cascade : tracascades) {

double dcaxy = cascade.dcaXYCascToPV();
double dcaz = cascade.dcaZCascToPV();
if (doApplyCuts && ((dcaxy > CutDCAtoPVxy) || (dcaz > CutDCAtoPVz))) continue; // DCA check

if (collision.index() != casccollid) {
histos.fill(HIST("Tracked/EvMult"), mult); // count and list mult of events with at least one cascade
casccollid = collision.index();
void processTracked(soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms, aod::CentFT0Cs, aod::PVMults>::iterator const& collision,
aod::TraCascDatas const& tracascades)
{
double mult = doProcessPP ? collision.centFT0M() : collision.centFT0C();
int64_t casccollid = 0;
for (auto const& cascade : tracascades) {

double dcaxy = cascade.dcaXYCascToPV();
double dcaz = cascade.dcaZCascToPV();
if (doApplyCuts && ((dcaxy > CutDCAtoPVxy) || (dcaz > CutDCAtoPVz)))
continue; // DCA check

if (collision.index() != casccollid) {
histos.fill(HIST("Tracked/EvMult"), mult); // count and list mult of events with at least one cascade
casccollid = collision.index();
}

double pt = cascade.pt();
double phi = cascade.phi();
double eta = cascade.eta();
double massXi = cascade.mXi();
double massOmega = cascade.mOmega();

histos.fill(HIST("Tracked/DCAxy"), dcaxy);
histos.fill(HIST("Tracked/DCAz"), dcaz);
histos.fill(HIST("Tracked/Phi"), phi);
histos.fill(HIST("Tracked/Eta"), eta);
histos.fill(HIST("Tracked/MassXi"), massXi);
histos.fill(HIST("Tracked/MassOmega"), massOmega);
histos.fill(HIST("Tracked/Xi"), massXi, pt, mult);
histos.fill(HIST("Tracked/Omega"), massOmega, pt, mult);
}

double pt = cascade.pt();
double phi = cascade.phi();
double eta = cascade.eta();
double massXi = cascade.mXi();
double massOmega = cascade.mOmega();

histos.fill(HIST("Tracked/DCAxy"), dcaxy);
histos.fill(HIST("Tracked/DCAz"), dcaz);
histos.fill(HIST("Tracked/Phi"), phi);
histos.fill(HIST("Tracked/Eta"), eta);
histos.fill(HIST("Tracked/MassXi"), massXi);
histos.fill(HIST("Tracked/MassOmega"), massOmega);
histos.fill(HIST("Tracked/Xi"), massXi, pt, mult);
histos.fill(HIST("Tracked/Omega"), massOmega, pt, mult);

}
}

void processAll(soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms, aod::CentFT0Cs, aod::PVMults>::iterator const& collision,
aod::CascDatas const& cascades)
{
histos.fill(HIST("Events/EvCounter"), 0.5);
double mult = doProcessPP ? collision.centFT0M() : collision.centFT0C();
histos.fill(HIST("Events/Mult"), mult);
double pvx = collision.posX();
double pvy = collision.posY();
double pvz = collision.posZ();
histos.fill(HIST("Events/PVx"), pvx);
histos.fill(HIST("Events/PVy"), pvy);
histos.fill(HIST("Events/PVz"), pvz);

int64_t casccollid = 0;
for (auto const& cascade : cascades) {

double dcaxy = cascade.dcaXYCascToPV();
double dcaz = cascade.dcaZCascToPV();
if (doApplyCuts && ((dcaxy > CutDCAtoPVxy) || (dcaz > CutDCAtoPVz))) continue; // DCA check

if (collision.index() != casccollid) {
histos.fill(HIST("All/EvMult"), mult); // count and list mult of events with at least one cascade
casccollid = collision.index();
void processAll(soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms, aod::CentFT0Cs, aod::PVMults>::iterator const& collision,
aod::CascDatas const& cascades)
{
histos.fill(HIST("Events/EvCounter"), 0.5);
double mult = doProcessPP ? collision.centFT0M() : collision.centFT0C();
histos.fill(HIST("Events/Mult"), mult);
double pvx = collision.posX();
double pvy = collision.posY();
double pvz = collision.posZ();
histos.fill(HIST("Events/PVx"), pvx);
histos.fill(HIST("Events/PVy"), pvy);
histos.fill(HIST("Events/PVz"), pvz);

int64_t casccollid = 0;
for (auto const& cascade : cascades) {

double dcaxy = cascade.dcaXYCascToPV();
double dcaz = cascade.dcaZCascToPV();
if (doApplyCuts && ((dcaxy > CutDCAtoPVxy) || (dcaz > CutDCAtoPVz)))
continue; // DCA check

if (collision.index() != casccollid) {
histos.fill(HIST("All/EvMult"), mult); // count and list mult of events with at least one cascade
casccollid = collision.index();
}

double pt = cascade.pt();
double phi = cascade.phi();
double eta = cascade.eta();
double massXi = cascade.mXi();
double massOmega = cascade.mOmega();

histos.fill(HIST("All/DCAxy"), dcaxy);
histos.fill(HIST("All/DCAz"), dcaz);
histos.fill(HIST("All/Phi"), phi);
histos.fill(HIST("All/Eta"), eta);
histos.fill(HIST("All/MassXi"), massXi);
histos.fill(HIST("All/MassOmega"), massOmega);
histos.fill(HIST("All/Xi"), massXi, pt, mult);
histos.fill(HIST("All/Omega"), massOmega, pt, mult);
}

double pt = cascade.pt();
double phi = cascade.phi();
double eta = cascade.eta();
double massXi = cascade.mXi();
double massOmega = cascade.mOmega();

histos.fill(HIST("All/DCAxy"), dcaxy);
histos.fill(HIST("All/DCAz"), dcaz);
histos.fill(HIST("All/Phi"), phi);
histos.fill(HIST("All/Eta"), eta);
histos.fill(HIST("All/MassXi"), massXi);
histos.fill(HIST("All/MassOmega"), massOmega);
histos.fill(HIST("All/Xi"), massXi, pt, mult);
histos.fill(HIST("All/Omega"), massOmega, pt, mult);

}
}
PROCESS_SWITCH(StrangeCascTrack, processTracked, "process tracked cascades", true);
PROCESS_SWITCH(StrangeCascTrack, processAll, "process all cascades", true);
PROCESS_SWITCH(StrangeCascTrack, processTracked, "process tracked cascades", true);
PROCESS_SWITCH(StrangeCascTrack, processAll, "process all cascades", true);
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
Expand Down
Loading