Skip to content
Draft
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
80 changes: 38 additions & 42 deletions PWGLF/TableProducer/Strangeness/cascadeflow.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,15 @@
auto vecCutDir = std::vector<int>{cutDir, cutDir + nCutScores};

// default values for the cuts
constexpr double cuts[nBinsPt][nCutScores] = { // background, signal
{0., 0.9},
{0., 0.9},
{0., 0.9},
{0., 0.9},
{0., 0.9},
{0., 0.9},
{0., 0.9},
{0., 0.9}};
constexpr double cuts[nBinsPt][nCutScores] = {// background, signal
{0., 0.9},
{0., 0.9},
{0., 0.9},
{0., 0.9},
{0., 0.9},
{0., 0.9},
{0., 0.9},
{0., 0.9}};

// row labels
static const std::vector<std::string> labelsPt = {
Expand Down Expand Up @@ -425,10 +425,8 @@
// return false;
// }

if (isFillHisto)
histos.fill(HIST("hNEvents"), 8.5);

if (isFillHisto) {
histos.fill(HIST("hNEvents"), 8.5);
histos.fill(HIST("hEventNchCorrelation"), collision.multNTracksPVeta1(), collision.multNTracksGlobal());
histos.fill(HIST("hEventPVcontributorsVsCentrality"), collision.centFT0C(), collision.multNTracksPVeta1());
histos.fill(HIST("hEventGlobalTracksVsCentrality"), collision.centFT0C(), collision.multNTracksGlobal());
Expand Down Expand Up @@ -568,13 +566,12 @@

int currentRunNumber = -999;
int lastRunNumber = -999;
TProfile3D* shiftprofile;
TProfile3D* shiftprofileFT0C;
TProfile3D* shiftprofileFV0A;
TProfile3D* shiftprofileFT0A;
TProfile3D* shiftprofileTPCL;
TProfile3D* shiftprofileTPCR;
std::string fullCCDBShiftCorrPath;
TProfile3D* shiftprofile = nullptr;
TProfile3D* shiftprofileFT0C = nullptr;
TProfile3D* shiftprofileFV0A = nullptr;
TProfile3D* shiftprofileFT0A = nullptr;
TProfile3D* shiftprofileTPCL = nullptr;
TProfile3D* shiftprofileTPCR = nullptr;
std::string fullCCDBShiftCorrPathFT0C;
std::string fullCCDBShiftCorrPathFV0A;
std::string fullCCDBShiftCorrPathFT0A;
Expand All @@ -587,7 +584,7 @@
auto deltapsiFT0C = 0.0;
int nmode = 2;

for (int ishift = 1; ishift <= 10; ishift++) {

Check failure on line 587 in PWGLF/TableProducer/Strangeness/cascadeflow.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.
auto coeffshiftxFT0C = shiftprofile->GetBinContent(shiftprofile->FindBin(coll.centFT0C(), 0.5, ishift - 0.5));
auto coeffshiftyFT0C = shiftprofile->GetBinContent(shiftprofile->FindBin(coll.centFT0C(), 1.5, ishift - 0.5));

Expand All @@ -605,7 +602,7 @@
auto deltapsiFT0A = 0.0;
auto deltapsiTPCA = 0.0;
auto deltapsiTPCC = 0.0;
for (int ishift = 1; ishift <= 10; ishift++) {

Check failure on line 605 in PWGLF/TableProducer/Strangeness/cascadeflow.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.
auto coeffshiftxFT0C = shiftprofileA->GetBinContent(shiftprofileA->FindBin(coll.centFT0C(), 0.5, ishift - 0.5));
auto coeffshiftyFT0C = shiftprofileA->GetBinContent(shiftprofileA->FindBin(coll.centFT0C(), 1.5, ishift - 0.5));
auto coeffshiftxTPCA = shiftprofileB->GetBinContent(shiftprofileB->FindBin(coll.centFT0C(), 0.5, ishift - 0.5));
Expand Down Expand Up @@ -640,16 +637,16 @@
}

// objects to use for acceptance correction
TH2F* hAcceptanceXi;
TH2F* hAcceptanceOmega;
TH2F* hAcceptanceLambda;
TH2F* hAcceptancePrimaryLambda;
TH2F* hAcceptanceXi = nullptr;
TH2F* hAcceptanceOmega = nullptr;
TH2F* hAcceptanceLambda = nullptr;
TH2F* hAcceptancePrimaryLambda = nullptr;

// objects to use for resolution correction
TH1F* hReso;
TH1F* hReso = nullptr;

// objects to use for centrality weight
TH1F* hCentWeight;
TH1F* hCentWeight = nullptr;

HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject, false, true};
HistogramRegistry histosMCGen{"histosMCGen", {}, OutputObjHandlingPolicy::AnalysisObject, false, true};
Expand Down Expand Up @@ -1349,7 +1346,7 @@
histos.fill(HIST("Psi_EP_TPCA_notshifted"), coll.centFT0C(), psiTPCA);
histos.fill(HIST("Psi_EP_TPCC_notshifted"), coll.centFT0C(), psiTPCC);

for (int ishift = 1; ishift <= 10; ishift++) {

Check failure on line 1349 in PWGLF/TableProducer/Strangeness/cascadeflow.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.
histos.fill(HIST("ShiftFT0C"), coll.centFT0C(), 0.5, ishift - 0.5, std::sin(ishift * 2 * psiT0C));
histos.fill(HIST("ShiftFT0C"), coll.centFT0C(), 1.5, ishift - 0.5, std::cos(ishift * 2 * psiT0C));

Expand Down Expand Up @@ -1480,7 +1477,7 @@
// polarization variables
double masses[2]{o2::constants::physics::MassXiMinus, o2::constants::physics::MassOmegaMinus};
ROOT::Math::PxPyPzMVector cascadeVector[2], lambdaVector, protonVector;
float cosThetaStarLambda[2], cosThetaStarProton;
double cosThetaStarLambda[2], cosThetaStarProton;

double massLambda = casc.mLambda();
if (fillingConfigs.isFillNominalMass)
Expand Down Expand Up @@ -1652,14 +1649,14 @@

// select only events used for the calibration of the event plane
if (isGoodEventEP) {
if (std::abs(coll.qvecFT0CRe()) > 990 || std::abs(coll.qvecFT0CIm()) > 990 || std::abs(coll.qvecBNegRe()) > 990 || std::abs(coll.qvecBNegIm()) > 990 || std::abs(coll.qvecBPosRe()) > 990 || std::abs(coll.qvecBPosIm()) > 990) {

Check failure on line 1652 in PWGLF/TableProducer/Strangeness/cascadeflow.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.
return;
}
}

// event has FT0C event plane
bool hasEventPlane = 0;
if (std::abs(coll.qvecFT0CRe()) < 990 && std::abs(coll.qvecFT0CIm()) < 990)

Check failure on line 1659 in PWGLF/TableProducer/Strangeness/cascadeflow.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.
hasEventPlane = 1;

histos.fill(HIST("hNEvents"), 9.5);
Expand All @@ -1681,7 +1678,7 @@
histos.fill(HIST("Psi_EP_TPCA_notshifted"), coll.centFT0C(), psiTPCA);
histos.fill(HIST("Psi_EP_TPCC_notshifted"), coll.centFT0C(), psiTPCC);
float psiT0CCorr = psiT0C;
for (int ishift = 1; ishift <= 10; ishift++) {

Check failure on line 1681 in PWGLF/TableProducer/Strangeness/cascadeflow.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.
histos.fill(HIST("ShiftFT0C"), coll.centFT0C(), 0.5, ishift - 0.5, std::sin(ishift * 2 * psiT0C));
histos.fill(HIST("ShiftFT0C"), coll.centFT0C(), 1.5, ishift - 0.5, std::cos(ishift * 2 * psiT0C));

Expand Down Expand Up @@ -1805,7 +1802,7 @@
// polarization variables
double masses[nParticles]{o2::constants::physics::MassXiMinus, o2::constants::physics::MassOmegaMinus};
ROOT::Math::PxPyPzMVector cascadeVector[nParticles], lambdaVector, protonVector;
float cosThetaStarLambda[nParticles], cosThetaStarProton;
double cosThetaStarLambda[nParticles], cosThetaStarProton;

double massLambda = casc.mLambda();
if (fillingConfigs.isFillNominalMass)
Expand Down Expand Up @@ -2017,7 +2014,7 @@
histos.fill(HIST("hEventCentralityBefEPSelT0M"), coll.centFT0M());
// select only events used for the calibration of the event plane
if (isGoodEventEP) {
if (std::abs(qvecRe) > 990 || std::abs(qvecIm) > 990 || std::abs(coll.qvecBNegRe()) > 990 || std::abs(coll.qvecBNegIm()) > 990 || std::abs(coll.qvecBPosRe()) > 990 || std::abs(coll.qvecBPosIm()) > 990) {

Check failure on line 2017 in PWGLF/TableProducer/Strangeness/cascadeflow.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.
return;
}
}
Expand Down Expand Up @@ -2051,7 +2048,7 @@
histos.fill(HIST("Psi_EP_TPCA_notshifted"), coll.centFT0C(), psiTPCA);
histos.fill(HIST("Psi_EP_TPCC_notshifted"), coll.centFT0C(), psiTPCC);
float psiT0CCorr = psiT0C;
for (int ishift = 1; ishift <= 10; ishift++) {

Check failure on line 2051 in PWGLF/TableProducer/Strangeness/cascadeflow.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.
histos.fill(HIST("ShiftFT0C"), collisionCentrality, 0.5, ishift - 0.5, std::sin(ishift * 2 * psiT0C));
histos.fill(HIST("ShiftFT0C"), collisionCentrality, 1.5, ishift - 0.5, std::cos(ishift * 2 * psiT0C));

Expand Down Expand Up @@ -2134,7 +2131,6 @@
centWeight = hCentWeight->GetBinContent(centBin);
}

std::vector<float> bdtScore[nParticles];
for (auto const& v0 : V0s) {

/// Add some minimal cuts for single track variables (min number of TPC clusters)
Expand Down Expand Up @@ -2253,31 +2249,31 @@
histos.fill(HIST("hLambdaPhi"), v0.phi());
histos.fill(HIST("hlambdaminuspsiT0C"), lambdaminuspsiT0C);

double invMassLambda = 0;
if (chargeIndex == 0)
invMassLambda = v0.mLambda();
else if (chargeIndex == 1)
invMassLambda = v0.mAntiLambda();
else
invMassLambda = v0.mLambda();

if (fillingConfigs.isFillTHNLambda) {
if (fillingConfigs.isFillTHN_V2)
histos.get<THn>(HIST("hLambdaV2"))->Fill(collisionCentrality, chargeIndex, v0.pt(), v0.mLambda(), v2CEP);
histos.get<THn>(HIST("hLambdaV2"))->Fill(collisionCentrality, chargeIndex, v0.pt(), invMassLambda, v2CEP);
if (fillingConfigs.isFillTHN_Pz) {
// histos.get<THn>(HIST("hLambdaPzs2"))->Fill(collisionCentrality, chargeIndex, v0.pt(), v0.mLambda(), pzs2Lambda);
histos.get<THn>(HIST("hLambdaPzs2"))->Fill(collisionCentrality, chargeIndex, v0.pt(), v0.mLambda(), pzs2Lambda, centWeight);
// histos.get<THn>(HIST("hLambdaPzs2"))->Fill(collisionCentrality, chargeIndex, v0.pt(), invMassLambda, pzs2Lambda);
histos.get<THn>(HIST("hLambdaPzs2"))->Fill(collisionCentrality, chargeIndex, v0.pt(), invMassLambda, pzs2Lambda, centWeight);
}
if (fillingConfigs.isFillTHN_Acc)
histos.get<THn>(HIST("hLambdaCos2Theta"))->Fill(collisionCentrality, chargeIndex, v0.eta(), v0.pt(), v0.mLambda(), cos2ThetaLambda);
histos.get<THn>(HIST("hLambdaCos2Theta"))->Fill(collisionCentrality, chargeIndex, v0.eta(), v0.pt(), invMassLambda, cos2ThetaLambda);
}
if (fillingConfigs.isFillTHNLambda_PzVsPsi) {
if (fillingConfigs.isFillTHN_Pz)
histos.get<THn>(HIST("hLambdaPzVsPsi"))->Fill(collisionCentrality, chargeIndex, v0.pt(), v0.mLambda(), cosThetaLambda, 2 * lambdaminuspsiT0C, centWeight);
histos.get<THn>(HIST("hLambdaPzVsPsi"))->Fill(collisionCentrality, chargeIndex, v0.pt(), invMassLambda, cosThetaLambda, 2 * lambdaminuspsiT0C, centWeight);
if (fillingConfigs.isFillTHN_Acc)
histos.get<THn>(HIST("hLambdaCos2ThetaVsPsi"))->Fill(collisionCentrality, chargeIndex, v0.eta(), v0.pt(), v0.mLambda(), cos2ThetaLambda, 2 * lambdaminuspsiT0C);
histos.get<THn>(HIST("hLambdaCos2ThetaVsPsi"))->Fill(collisionCentrality, chargeIndex, v0.eta(), v0.pt(), invMassLambda, cos2ThetaLambda, 2 * lambdaminuspsiT0C);
}

double invMassLambda = 0;
if (chargeIndex == 0)
invMassLambda = v0.mLambda();
else if (chargeIndex == 1)
invMassLambda = v0.mAntiLambda();
else
invMassLambda = v0.mLambda();

// mass selection
if (invMassLambda < V0Configs.MinMassLambdaInTree || invMassLambda > V0Configs.MaxMassLambdaInTree)
continue;
Expand All @@ -2296,14 +2292,14 @@

// select only events used for the calibration of the event plane
if (isGoodEventEP) {
if (std::abs(coll.qvecFT0CRe()) > 990 || std::abs(coll.qvecFT0CIm()) > 990 || std::abs(coll.qvecBNegRe()) > 990 || std::abs(coll.qvecBNegIm()) > 990 || std::abs(coll.qvecBPosRe()) > 990 || std::abs(coll.qvecBPosIm()) > 990) {

Check failure on line 2295 in PWGLF/TableProducer/Strangeness/cascadeflow.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.
return;
}
}

// event has FT0C event plane
bool hasEventPlane = 0;
if (std::abs(coll.qvecFT0CRe()) < 990 && std::abs(coll.qvecFT0CIm()) < 990)

Check failure on line 2302 in PWGLF/TableProducer/Strangeness/cascadeflow.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.
hasEventPlane = 1;

// event has spectator plane
Expand Down
Loading