Skip to content
Merged
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
88 changes: 38 additions & 50 deletions PWGLF/TableProducer/Strangeness/cascadeflow.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -417,18 +417,9 @@
return false;
}

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

// TVX in TRD
// if (isNoTVXinTRD && collision.alias_bit(kTVXinTRD)){
// return false;
// }

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

if (isFillHisto) {
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 +559,11 @@

int currentRunNumber = -999;
int lastRunNumber = -999;
TProfile3D* shiftprofile;
TProfile3D* shiftprofileFT0C;
TProfile3D* shiftprofileFV0A;
TProfile3D* shiftprofileFT0A;
TProfile3D* shiftprofileTPCL;
TProfile3D* shiftprofileTPCR;
std::string fullCCDBShiftCorrPath;
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 +576,7 @@
auto deltapsiFT0C = 0.0;
int nmode = 2;

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

Check failure on line 579 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 +594,7 @@
auto deltapsiFT0A = 0.0;
auto deltapsiTPCA = 0.0;
auto deltapsiTPCC = 0.0;
for (int ishift = 1; ishift <= 10; ishift++) {

Check failure on line 597 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 +629,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 @@ -1232,8 +1221,8 @@
continue;
}

float sigmaRangeXi[2]{getNsigmaMass(cascadev2::Xi, casc.pt(), sideBandStart), getNsigmaMass(cascadev2::Xi, casc.pt(), sideBandEnd)};
float sigmaRangeOmega[2]{getNsigmaMass(cascadev2::Omega, casc.pt(), sideBandStart), getNsigmaMass(cascadev2::Omega, casc.pt(), sideBandEnd)};
const float sigmaRangeXi[2]{getNsigmaMass(cascadev2::Xi, casc.pt(), sideBandStart), getNsigmaMass(cascadev2::Xi, casc.pt(), sideBandEnd)};
const float sigmaRangeOmega[2]{getNsigmaMass(cascadev2::Omega, casc.pt(), sideBandStart), getNsigmaMass(cascadev2::Omega, casc.pt(), sideBandEnd)};

if ((std::abs(casc.mXi() - constants::physics::MassXiMinus) < sigmaRangeXi[0] ||
std::abs(casc.mXi() - constants::physics::MassXiMinus) > sigmaRangeXi[1]) &&
Expand Down Expand Up @@ -1349,7 +1338,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 1341 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 @@ -1404,7 +1393,7 @@
bool isCascCandidate = 0;
isCascCandidate = IsCascAccepted(casc, negExtra, posExtra, bachExtra, counter);
histos.fill(HIST("hCascade"), counter);
histos.fill(HIST("hCascadeDauSel"), (int)isCascCandidate);
histos.fill(HIST("hCascadeDauSel"), static_cast<int>(isCascCandidate));
if (!isCascCandidate)
continue;

Expand Down Expand Up @@ -1480,7 +1469,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 +1641,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 1644 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 1651 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 +1670,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 1673 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 @@ -1735,7 +1724,7 @@
bool isCascCandidate = 0;
isCascCandidate = IsCascAccepted(casc, negExtra, posExtra, bachExtra, counter);
histos.fill(HIST("hCascade"), counter);
histos.fill(HIST("hCascadeDauSel"), (int)isCascCandidate);
histos.fill(HIST("hCascadeDauSel"), static_cast<int>(isCascCandidate));
if (!isCascCandidate)
continue;

Expand Down Expand Up @@ -1805,7 +1794,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 +2006,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 2009 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 +2040,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 2043 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 +2123,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 @@ -2182,11 +2170,11 @@
histos.fill(HIST("hLambdaCandidate"), 3);
continue; // in case of ambiguity between Lambda and AntiLambda, I skip the particle; checked to be zero in range 1.105 - 1.125
}
if (v0.mLambda() > V0Configs.MinMassLambda && v0.mLambda() < V0Configs.MaxMassLambda)
if (v0.mLambda() > V0Configs.MinMassLambda && v0.mLambda() < V0Configs.MaxMassLambda) {
chargeIndex = 0;
else if (v0.mAntiLambda() > V0Configs.MinMassLambda && v0.mAntiLambda() < V0Configs.MaxMassLambda)
} else if (v0.mAntiLambda() > V0Configs.MinMassLambda && v0.mAntiLambda() < V0Configs.MaxMassLambda) {
chargeIndex = 1;
else {
} else {
chargeIndex = 2; // these are bkg candidates
histos.fill(HIST("hLambdaCandidate"), 4);
}
Expand All @@ -2211,7 +2199,7 @@
if (fillingConfigs.isFillNominalMass)
massLambda = o2::constants::physics::MassLambda;

float cosThetaStarProton[nCharges];
double cosThetaStarProton[nCharges] = {0};
ROOT::Math::PxPyPzMVector lambdaVector, protonVector[nCharges];
lambdaVector.SetCoordinates(v0.px(), v0.py(), v0.pz(), massLambda);
ROOT::Math::Boost lambdaBoost{lambdaVector.BoostToCM()};
Expand Down Expand Up @@ -2253,31 +2241,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 +2284,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 2287 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 2294 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 Expand Up @@ -2392,7 +2380,7 @@
bool isCascCandidate = 0;
isCascCandidate = IsCascAccepted(casc, negExtra, posExtra, bachExtra, counter);
histos.fill(HIST("hCascade"), counter);
histos.fill(HIST("hCascadeDauSel"), (int)isCascCandidate);
histos.fill(HIST("hCascadeDauSel"), static_cast<int>(isCascCandidate));
if (!isCascCandidate)
continue;

Expand Down Expand Up @@ -2551,7 +2539,7 @@
bool isCascCandidate = 0;
isCascCandidate = IsCascAccepted(casc, negExtra, posExtra, bachExtra, counter);
histos.fill(HIST("hCascade"), counter);
histos.fill(HIST("hCascadeDauSel"), (int)isCascCandidate);
histos.fill(HIST("hCascadeDauSel"), static_cast<int>(isCascCandidate));
if (!isCascCandidate)
continue;

Expand Down
Loading