Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PWGLF] Improved rotational background #9637

Merged
merged 16 commits into from
Jan 30, 2025
Merged
Changes from 15 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
72 changes: 60 additions & 12 deletions PWGLF/Tasks/Resonances/highmasslambda.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
// fill output
Configurable<int> cfgOccupancyCut{"cfgOccupancyCut", 2500, "Occupancy cut"};
Configurable<bool> fillRotation{"fillRotation", false, "fill rotation"};
Configurable<bool> useSP{"useSP", false, "useSP"};
// events
Configurable<float> cfgCutVertex{"cfgCutVertex", 10.0f, "Accepted z-vertex range"};
Configurable<float> cfgCutCentralityMax{"cfgCutCentralityMax", 50.0f, "Accepted maximum Centrality"};
Expand All @@ -109,6 +110,8 @@
Configurable<int> PIDstrategy{"PIDstrategy", 0, "0: TOF Veto, 1: TOF Veto opti, 2: TOF, 3: TOF loose 1, 4: TOF loose 2, 5: old pt dep"};
Configurable<float> nsigmaCutTPC{"nsigmacutTPC", 3.0, "Value of the TPC Nsigma cut"};
Configurable<float> nsigmaCutTOF{"nsigmaCutTOF", 3.0, "TOF PID"};
Configurable<float> nsigmaCutITS{"nsigmaCutITS", 3.0, "Value of the ITS Nsigma cut"};

// Configs for V0
Configurable<float> ConfV0PtMin{"ConfV0PtMin", 0.f, "Minimum transverse momentum of V0"};
Configurable<double> ConfV0DCADaughMax{"ConfV0DCADaughMax", 0.2f, "Maximum DCA between the V0 daughters"};
Expand Down Expand Up @@ -476,12 +479,12 @@
histos.fill(HIST("hPsiFT0C"), centrality, psiFT0C, occupancy);
histos.fill(HIST("hPsiFT0A"), centrality, psiFT0A, occupancy);
histos.fill(HIST("hPsiTPC"), centrality, psiTPC, occupancy);
histos.fill(HIST("ResFT0CTPC"), centrality, QFT0C * QTPC * TMath::Cos(2.0 * (psiFT0C - psiTPC)));

Check warning on line 482 in PWGLF/Tasks/Resonances/highmasslambda.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.
histos.fill(HIST("ResFT0CTPCR"), centrality, QFT0C * QTPCR * TMath::Cos(2.0 * (psiFT0C - psiTPCR)));

Check warning on line 483 in PWGLF/Tasks/Resonances/highmasslambda.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.
histos.fill(HIST("ResFT0CTPCL"), centrality, QFT0C * QTPCL * TMath::Cos(2.0 * (psiFT0C - psiTPCL)));

Check warning on line 484 in PWGLF/Tasks/Resonances/highmasslambda.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.
histos.fill(HIST("ResTPCRTPCL"), centrality, QTPCR * QTPCL * TMath::Cos(2.0 * (psiTPCR - psiTPCL)));

Check warning on line 485 in PWGLF/Tasks/Resonances/highmasslambda.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.
histos.fill(HIST("ResFT0CFT0A"), centrality, QFT0C * QFT0A * TMath::Cos(2.0 * (psiFT0C - psiFT0A)));

Check warning on line 486 in PWGLF/Tasks/Resonances/highmasslambda.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.
histos.fill(HIST("ResFT0ATPC"), centrality, QTPC * QFT0A * TMath::Cos(2.0 * (psiTPC - psiFT0A)));

Check warning on line 487 in PWGLF/Tasks/Resonances/highmasslambda.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.
histos.fill(HIST("hCentrality"), centrality);
histos.fill(HIST("hVtxZ"), collision.posZ());
histos.fill(HIST("hOccupancy"), occupancy);
Expand All @@ -490,7 +493,7 @@
if (!selectionTrack(track1)) {
continue;
}
if (!(itsResponse.nSigmaITS<o2::track::PID::Proton>(track1) > -3.0 && itsResponse.nSigmaITS<o2::track::PID::Proton>(track1) < 3.0)) {
if (track1.p() < 1.0 && !(itsResponse.nSigmaITS<o2::track::PID::Proton>(track1) > -nsigmaCutITS && itsResponse.nSigmaITS<o2::track::PID::Proton>(track1) < nsigmaCutITS)) {
continue;
}
histos.fill(HIST("hNsigmaProtonTPCPre"), track1.tpcNSigmaPr(), track1.pt());
Expand Down Expand Up @@ -541,8 +544,11 @@
Kshort = ROOT::Math::PxPyPzMVector(v0.px(), v0.py(), v0.pz(), v0.mK0Short());
Lambdac = Proton + Kshort;
auto phiminuspsi = GetPhiInRange(Lambdac.Phi() - psiFT0C);
v2 = TMath::Cos(2.0 * phiminuspsi) * QFT0C;

Check warning on line 547 in PWGLF/Tasks/Resonances/highmasslambda.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 (Lambdac.M() > cMinLambdaMass && Lambdac.M() <= cMaxLambdaMass && std::abs(Lambdac.Rapidity()) < confRapidity && Lambdac.Pt() > 2.0 && Lambdac.Pt() <= 6.0) {
if (useSP) {
v2 = TMath::Cos(2.0 * phiminuspsi);

Check warning on line 549 in PWGLF/Tasks/Resonances/highmasslambda.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 (Lambdac.M() > cMinLambdaMass && Lambdac.M() <= cMaxLambdaMass && std::abs(Lambdac.Rapidity()) < confRapidity && Lambdac.Pt() > 1.0 && Lambdac.Pt() <= 6.0) {
histos.fill(HIST("hSparseV2SASameEvent_V2"), Lambdac.M(), Lambdac.Pt(), v2, std::abs(track1.dcaXY()), Proton.Pt());
}
if (fillRotation) {
Expand All @@ -557,8 +563,11 @@
KshortRot = ROOT::Math::PxPyPzMVector(rotKaonPx, rotKaonPy, Kshort.pz(), massK0s);
LambdacRot = Proton + KshortRot;
auto phiminuspsiRot = GetPhiInRange(LambdacRot.Phi() - psiFT0C);
v2Rot = TMath::Cos(2.0 * phiminuspsiRot) * QFT0C;

Check warning on line 566 in PWGLF/Tasks/Resonances/highmasslambda.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 (LambdacRot.M() > cMinLambdaMass && LambdacRot.M() <= cMaxLambdaMass && std::abs(LambdacRot.Rapidity()) < confRapidity && LambdacRot.Pt() > 2.0 && LambdacRot.Pt() <= 6.0) {
if (useSP) {
v2Rot = TMath::Cos(2.0 * phiminuspsiRot);

Check warning on line 568 in PWGLF/Tasks/Resonances/highmasslambda.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 (LambdacRot.M() > cMinLambdaMass && LambdacRot.M() <= cMaxLambdaMass && std::abs(LambdacRot.Rapidity()) < confRapidity && LambdacRot.Pt() > 1.0 && LambdacRot.Pt() <= 6.0) {
histos.fill(HIST("hSparseV2SASameEventRotational_V2"), LambdacRot.M(), LambdacRot.Pt(), v2Rot, std::abs(track1.dcaXY()), Proton.Pt());
}
}
Expand Down Expand Up @@ -611,7 +620,7 @@
if (!selectionTrack(track1)) {
continue;
}
if (!(itsResponse.nSigmaITS<o2::track::PID::Proton>(track1) > -3.0 && itsResponse.nSigmaITS<o2::track::PID::Proton>(track1) < 3.0)) {
if (track1.p() < 1.0 && !(itsResponse.nSigmaITS<o2::track::PID::Proton>(track1) > -nsigmaCutITS && itsResponse.nSigmaITS<o2::track::PID::Proton>(track1) < nsigmaCutITS)) {
continue;
}

Expand Down Expand Up @@ -648,7 +657,10 @@
}
auto phiminuspsi = GetPhiInRange(Lambdac.Phi() - psiFT0C);
v2 = TMath::Cos(2.0 * phiminuspsi) * QFT0C;
if (occupancy1 < cfgOccupancyCut && occupancy2 < cfgOccupancyCut && Lambdac.M() > cMinLambdaMass && Lambdac.M() <= cMaxLambdaMass && std::abs(Lambdac.Rapidity()) < confRapidity && Lambdac.Pt() > 2.0 && Lambdac.Pt() <= 6.0) {
if (useSP) {
v2 = TMath::Cos(2.0 * phiminuspsi);
}
if (occupancy1 < cfgOccupancyCut && occupancy2 < cfgOccupancyCut && Lambdac.M() > cMinLambdaMass && Lambdac.M() <= cMaxLambdaMass && std::abs(Lambdac.Rapidity()) < confRapidity && Lambdac.Pt() > 1.0 && Lambdac.Pt() <= 6.0) {
histos.fill(HIST("hSparseV2SAMixedEvent_V2"), Lambdac.M(), Lambdac.Pt(), v2, std::abs(track1.dcaXY()), Proton.Pt());
}
}
Expand Down Expand Up @@ -709,7 +721,7 @@
if (!selectionTrack(track1)) {
continue;
}
if (!(itsResponse.nSigmaITS<o2::track::PID::Proton>(track1) > -3.0 && itsResponse.nSigmaITS<o2::track::PID::Proton>(track1) < 3.0)) {
if (track1.p() < 1.0 && !(itsResponse.nSigmaITS<o2::track::PID::Proton>(track1) > -nsigmaCutITS && itsResponse.nSigmaITS<o2::track::PID::Proton>(track1) < nsigmaCutITS)) {
continue;
}

Expand Down Expand Up @@ -853,7 +865,9 @@
Lambdac = Proton + Kshort;
auto phiminuspsi = GetPhiInRange(Lambdac.Phi() - psiFT0C);
v2 = TMath::Cos(2.0 * phiminuspsi) * QFT0C;

if (useSP) {
v2 = TMath::Cos(2.0 * phiminuspsi);
}
double protonimpactparameter = impactParameter1.getY();
double kshortimpactparameter = impactParameter0.getY();

Expand All @@ -878,8 +892,8 @@
continue;
}

if (Lambdac.M() > cMinLambdaMass && Lambdac.M() <= cMaxLambdaMass && std::abs(Lambdac.Rapidity()) < confRapidity && Lambdac.Pt() > 2.0 && Lambdac.Pt() <= 6.0) {
histos.fill(HIST("hSparseV2SASameEvent_V2_SVX"), Lambdac.M(), Lambdac.Pt(), v2, decaylengthxy, CPAlambdac);
if (Lambdac.M() > cMinLambdaMass && Lambdac.M() <= cMaxLambdaMass && std::abs(Lambdac.Rapidity()) < confRapidity && Lambdac.Pt() > 1.0 && Lambdac.Pt() <= 6.0) {
histos.fill(HIST("hSparseV2SASameEvent_V2_SVX"), Lambdac.M(), Lambdac.Pt(), v2, decaylength, CPAlambdac);
}
if (fillRotation) {
for (int nrotbkg = 0; nrotbkg < nBkgRotations; nrotbkg++) {
Expand All @@ -890,12 +904,46 @@
histos.fill(HIST("hRotation"), rotangle);
auto rotKaonPx = Kshort.px() * std::cos(rotangle) - Kshort.py() * std::sin(rotangle);
auto rotKaonPy = Kshort.px() * std::sin(rotangle) + Kshort.py() * std::cos(rotangle);
KshortRot = ROOT::Math::PxPyPzMVector(rotKaonPx, rotKaonPy, Kshort.pz(), massK0s);
////////// DCA fitter ////////////////
// LOGF(info, "Before dca fitter");
std::array<float, 3> pVecV0rot = {0., 0., 0.};
std::array<float, 3> pVecBachrot = {0., 0., 0.};
const std::array<float, 3> momentumV0rot = {rotKaonPx, rotKaonPy, v0.pz()};
auto trackV0rot = o2::track::TrackParCov(vertexV0, momentumV0rot, covV, 0, true);
trackV0rot.setAbsCharge(0);
trackV0rot.setPID(o2::track::PID::K0);
int nCand2rot = 0;
try {
nCand2rot = df.process(trackV0rot, trackParCovBach);
} catch (...) {
continue;
}
if (nCand2rot == 0) {
continue;
}
df.propagateTracksToVertex(); // propagate the bach and V0 to the Lc vertex
df.getTrack(0).getPxPyPzGlo(pVecV0rot); // take the momentum at the Lc vertex
df.getTrack(1).getPxPyPzGlo(pVecBachrot);
const auto& secondaryVertexrot = df.getPCACandidate();
double phirot, thetarot;
getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertexrot, phirot, thetarot);
KshortRot = ROOT::Math::PxPyPzMVector(pVecV0rot[0], pVecV0rot[1], pVecV0rot[2], massK0s);
Proton = ROOT::Math::PxPyPzMVector(pVecBachrot[0], pVecBachrot[1], pVecBachrot[2], massPr);
LambdacRot = Proton + KshortRot;
auto phiminuspsiRot = GetPhiInRange(LambdacRot.Phi() - psiFT0C);
v2Rot = TMath::Cos(2.0 * phiminuspsiRot) * QFT0C;
if (LambdacRot.M() > cMinLambdaMass && LambdacRot.M() <= cMaxLambdaMass && std::abs(LambdacRot.Rapidity()) < confRapidity && LambdacRot.Pt() > 2.0 && LambdacRot.Pt() <= 6.0) {
histos.fill(HIST("hSparseV2SASameEventRotational_V2_SVX"), LambdacRot.M(), LambdacRot.Pt(), v2Rot, decaylengthxy, CPAlambdac);
if (useSP) {
v2Rot = TMath::Cos(2.0 * phiminuspsiRot);
}
double decaylengthxrot = secondaryVertexrot[0] - collision.posX();
double decaylengthyrot = secondaryVertexrot[1] - collision.posY();
double decaylengthzrot = secondaryVertexrot[2] - collision.posZ();
double decaylengthrot = TMath::Sqrt(decaylengthxrot * decaylengthxrot + decaylengthyrot * decaylengthyrot + decaylengthzrot * decaylengthzrot);
double decaylengthxyrot = TMath::Sqrt(decaylengthxrot * decaylengthxrot + decaylengthyrot * decaylengthyrot);
double anglesignrot = decaylengthxrot * LambdacRot.Px() + decaylengthyrot * LambdacRot.Py() + decaylengthzrot * LambdacRot.Pz();
double CPAlambdacrot = anglesignrot / (decaylengthrot * LambdacRot.P());
if (LambdacRot.M() > cMinLambdaMass && LambdacRot.M() <= cMaxLambdaMass && std::abs(LambdacRot.Rapidity()) < confRapidity && LambdacRot.Pt() > 1.0 && LambdacRot.Pt() <= 6.0) {
histos.fill(HIST("hSparseV2SASameEventRotational_V2_SVX"), LambdacRot.M(), LambdacRot.Pt(), v2Rot, decaylengthrot, CPAlambdacrot);
}
}
}
Expand Down
Loading