diff --git a/PWGLF/Tasks/Resonances/highmasslambda.cxx b/PWGLF/Tasks/Resonances/highmasslambda.cxx index 072eb11d315..85dda8d4fa7 100644 --- a/PWGLF/Tasks/Resonances/highmasslambda.cxx +++ b/PWGLF/Tasks/Resonances/highmasslambda.cxx @@ -86,6 +86,7 @@ struct highmasslambda { // fill output Configurable cfgOccupancyCut{"cfgOccupancyCut", 2500, "Occupancy cut"}; Configurable fillRotation{"fillRotation", false, "fill rotation"}; + Configurable useSP{"useSP", false, "useSP"}; // events Configurable cfgCutVertex{"cfgCutVertex", 10.0f, "Accepted z-vertex range"}; Configurable cfgCutCentralityMax{"cfgCutCentralityMax", 50.0f, "Accepted maximum Centrality"}; @@ -109,6 +110,8 @@ struct highmasslambda { Configurable 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 nsigmaCutTPC{"nsigmacutTPC", 3.0, "Value of the TPC Nsigma cut"}; Configurable nsigmaCutTOF{"nsigmaCutTOF", 3.0, "TOF PID"}; + Configurable nsigmaCutITS{"nsigmaCutITS", 3.0, "Value of the ITS Nsigma cut"}; + // Configs for V0 Configurable ConfV0PtMin{"ConfV0PtMin", 0.f, "Minimum transverse momentum of V0"}; Configurable ConfV0DCADaughMax{"ConfV0DCADaughMax", 0.2f, "Maximum DCA between the V0 daughters"}; @@ -490,7 +493,7 @@ struct highmasslambda { if (!selectionTrack(track1)) { continue; } - if (!(itsResponse.nSigmaITS(track1) > -3.0 && itsResponse.nSigmaITS(track1) < 3.0)) { + if (track1.p() < 1.0 && !(itsResponse.nSigmaITS(track1) > -nsigmaCutITS && itsResponse.nSigmaITS(track1) < nsigmaCutITS)) { continue; } histos.fill(HIST("hNsigmaProtonTPCPre"), track1.tpcNSigmaPr(), track1.pt()); @@ -542,7 +545,10 @@ struct highmasslambda { Lambdac = Proton + Kshort; auto phiminuspsi = GetPhiInRange(Lambdac.Phi() - psiFT0C); v2 = TMath::Cos(2.0 * phiminuspsi) * QFT0C; - 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); + } + 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) { @@ -558,7 +564,10 @@ struct highmasslambda { 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) { + if (useSP) { + v2Rot = TMath::Cos(2.0 * phiminuspsiRot); + } + 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()); } } @@ -611,7 +620,7 @@ struct highmasslambda { if (!selectionTrack(track1)) { continue; } - if (!(itsResponse.nSigmaITS(track1) > -3.0 && itsResponse.nSigmaITS(track1) < 3.0)) { + if (track1.p() < 1.0 && !(itsResponse.nSigmaITS(track1) > -nsigmaCutITS && itsResponse.nSigmaITS(track1) < nsigmaCutITS)) { continue; } @@ -648,7 +657,10 @@ struct highmasslambda { } 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()); } } @@ -709,7 +721,7 @@ struct highmasslambda { if (!selectionTrack(track1)) { continue; } - if (!(itsResponse.nSigmaITS(track1) > -3.0 && itsResponse.nSigmaITS(track1) < 3.0)) { + if (track1.p() < 1.0 && !(itsResponse.nSigmaITS(track1) > -nsigmaCutITS && itsResponse.nSigmaITS(track1) < nsigmaCutITS)) { continue; } @@ -853,7 +865,9 @@ struct highmasslambda { 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(); @@ -878,8 +892,8 @@ struct highmasslambda { 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++) { @@ -888,14 +902,48 @@ struct highmasslambda { auto anglestep = (angleend - anglestart) / (1.0 * (nBkgRotations - 1)); auto rotangle = anglestart + nrotbkg * anglestep; 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); + float rotKaonPx = Kshort.px() * std::cos(rotangle) - Kshort.py() * std::sin(rotangle); + float rotKaonPy = Kshort.px() * std::sin(rotangle) + Kshort.py() * std::cos(rotangle); + ////////// DCA fitter //////////////// + // LOGF(info, "Before dca fitter"); + std::array pVecV0rot = {0., 0., 0.}; + std::array pVecBachrot = {0., 0., 0.}; + const std::array 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); } } }