@@ -86,6 +86,7 @@ struct highmasslambda {
8686 // fill output
8787 Configurable<int > cfgOccupancyCut{" cfgOccupancyCut" , 2500 , " Occupancy cut" };
8888 Configurable<bool > fillRotation{" fillRotation" , false , " fill rotation" };
89+ Configurable<bool > useSP{" useSP" , false , " useSP" };
8990 // events
9091 Configurable<float > cfgCutVertex{" cfgCutVertex" , 10 .0f , " Accepted z-vertex range" };
9192 Configurable<float > cfgCutCentralityMax{" cfgCutCentralityMax" , 50 .0f , " Accepted maximum Centrality" };
@@ -109,6 +110,8 @@ struct highmasslambda {
109110 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" };
110111 Configurable<float > nsigmaCutTPC{" nsigmacutTPC" , 3.0 , " Value of the TPC Nsigma cut" };
111112 Configurable<float > nsigmaCutTOF{" nsigmaCutTOF" , 3.0 , " TOF PID" };
113+ Configurable<float > nsigmaCutITS{" nsigmaCutITS" , 3.0 , " Value of the ITS Nsigma cut" };
114+
112115 // Configs for V0
113116 Configurable<float > ConfV0PtMin{" ConfV0PtMin" , 0 .f , " Minimum transverse momentum of V0" };
114117 Configurable<double > ConfV0DCADaughMax{" ConfV0DCADaughMax" , 0 .2f , " Maximum DCA between the V0 daughters" };
@@ -490,7 +493,7 @@ struct highmasslambda {
490493 if (!selectionTrack (track1)) {
491494 continue ;
492495 }
493- if (!(itsResponse.nSigmaITS <o2::track::PID::Proton>(track1) > -3.0 && itsResponse.nSigmaITS <o2::track::PID::Proton>(track1) < 3.0 )) {
496+ if (track1. p () < 1.0 && !(itsResponse.nSigmaITS <o2::track::PID::Proton>(track1) > -nsigmaCutITS && itsResponse.nSigmaITS <o2::track::PID::Proton>(track1) < nsigmaCutITS )) {
494497 continue ;
495498 }
496499 histos.fill (HIST (" hNsigmaProtonTPCPre" ), track1.tpcNSigmaPr (), track1.pt ());
@@ -542,7 +545,10 @@ struct highmasslambda {
542545 Lambdac = Proton + Kshort;
543546 auto phiminuspsi = GetPhiInRange (Lambdac.Phi () - psiFT0C);
544547 v2 = TMath::Cos (2.0 * phiminuspsi) * QFT0C;
545- if (Lambdac.M () > cMinLambdaMass && Lambdac.M () <= cMaxLambdaMass && std::abs (Lambdac.Rapidity ()) < confRapidity && Lambdac.Pt () > 2.0 && Lambdac.Pt () <= 6.0 ) {
548+ if (useSP) {
549+ v2 = TMath::Cos (2.0 * phiminuspsi);
550+ }
551+ if (Lambdac.M () > cMinLambdaMass && Lambdac.M () <= cMaxLambdaMass && std::abs (Lambdac.Rapidity ()) < confRapidity && Lambdac.Pt () > 1.0 && Lambdac.Pt () <= 6.0 ) {
546552 histos.fill (HIST (" hSparseV2SASameEvent_V2" ), Lambdac.M (), Lambdac.Pt (), v2, std::abs (track1.dcaXY ()), Proton.Pt ());
547553 }
548554 if (fillRotation) {
@@ -558,7 +564,10 @@ struct highmasslambda {
558564 LambdacRot = Proton + KshortRot;
559565 auto phiminuspsiRot = GetPhiInRange (LambdacRot.Phi () - psiFT0C);
560566 v2Rot = TMath::Cos (2.0 * phiminuspsiRot) * QFT0C;
561- if (LambdacRot.M () > cMinLambdaMass && LambdacRot.M () <= cMaxLambdaMass && std::abs (LambdacRot.Rapidity ()) < confRapidity && LambdacRot.Pt () > 2.0 && LambdacRot.Pt () <= 6.0 ) {
567+ if (useSP) {
568+ v2Rot = TMath::Cos (2.0 * phiminuspsiRot);
569+ }
570+ if (LambdacRot.M () > cMinLambdaMass && LambdacRot.M () <= cMaxLambdaMass && std::abs (LambdacRot.Rapidity ()) < confRapidity && LambdacRot.Pt () > 1.0 && LambdacRot.Pt () <= 6.0 ) {
562571 histos.fill (HIST (" hSparseV2SASameEventRotational_V2" ), LambdacRot.M (), LambdacRot.Pt (), v2Rot, std::abs (track1.dcaXY ()), Proton.Pt ());
563572 }
564573 }
@@ -611,7 +620,7 @@ struct highmasslambda {
611620 if (!selectionTrack (track1)) {
612621 continue ;
613622 }
614- if (!(itsResponse.nSigmaITS <o2::track::PID::Proton>(track1) > -3.0 && itsResponse.nSigmaITS <o2::track::PID::Proton>(track1) < 3.0 )) {
623+ if (track1. p () < 1.0 && !(itsResponse.nSigmaITS <o2::track::PID::Proton>(track1) > -nsigmaCutITS && itsResponse.nSigmaITS <o2::track::PID::Proton>(track1) < nsigmaCutITS )) {
615624 continue ;
616625 }
617626
@@ -648,7 +657,10 @@ struct highmasslambda {
648657 }
649658 auto phiminuspsi = GetPhiInRange (Lambdac.Phi () - psiFT0C);
650659 v2 = TMath::Cos (2.0 * phiminuspsi) * QFT0C;
651- if (occupancy1 < cfgOccupancyCut && occupancy2 < cfgOccupancyCut && Lambdac.M () > cMinLambdaMass && Lambdac.M () <= cMaxLambdaMass && std::abs (Lambdac.Rapidity ()) < confRapidity && Lambdac.Pt () > 2.0 && Lambdac.Pt () <= 6.0 ) {
660+ if (useSP) {
661+ v2 = TMath::Cos (2.0 * phiminuspsi);
662+ }
663+ if (occupancy1 < cfgOccupancyCut && occupancy2 < cfgOccupancyCut && Lambdac.M () > cMinLambdaMass && Lambdac.M () <= cMaxLambdaMass && std::abs (Lambdac.Rapidity ()) < confRapidity && Lambdac.Pt () > 1.0 && Lambdac.Pt () <= 6.0 ) {
652664 histos.fill (HIST (" hSparseV2SAMixedEvent_V2" ), Lambdac.M (), Lambdac.Pt (), v2, std::abs (track1.dcaXY ()), Proton.Pt ());
653665 }
654666 }
@@ -709,7 +721,7 @@ struct highmasslambda {
709721 if (!selectionTrack (track1)) {
710722 continue ;
711723 }
712- if (!(itsResponse.nSigmaITS <o2::track::PID::Proton>(track1) > -3.0 && itsResponse.nSigmaITS <o2::track::PID::Proton>(track1) < 3.0 )) {
724+ if (track1. p () < 1.0 && !(itsResponse.nSigmaITS <o2::track::PID::Proton>(track1) > -nsigmaCutITS && itsResponse.nSigmaITS <o2::track::PID::Proton>(track1) < nsigmaCutITS )) {
713725 continue ;
714726 }
715727
@@ -853,7 +865,9 @@ struct highmasslambda {
853865 Lambdac = Proton + Kshort;
854866 auto phiminuspsi = GetPhiInRange (Lambdac.Phi () - psiFT0C);
855867 v2 = TMath::Cos (2.0 * phiminuspsi) * QFT0C;
856-
868+ if (useSP) {
869+ v2 = TMath::Cos (2.0 * phiminuspsi);
870+ }
857871 double protonimpactparameter = impactParameter1.getY ();
858872 double kshortimpactparameter = impactParameter0.getY ();
859873
@@ -878,8 +892,8 @@ struct highmasslambda {
878892 continue ;
879893 }
880894
881- if (Lambdac.M () > cMinLambdaMass && Lambdac.M () <= cMaxLambdaMass && std::abs (Lambdac.Rapidity ()) < confRapidity && Lambdac.Pt () > 2 .0 && Lambdac.Pt () <= 6.0 ) {
882- histos.fill (HIST (" hSparseV2SASameEvent_V2_SVX" ), Lambdac.M (), Lambdac.Pt (), v2, decaylengthxy , CPAlambdac);
895+ if (Lambdac.M () > cMinLambdaMass && Lambdac.M () <= cMaxLambdaMass && std::abs (Lambdac.Rapidity ()) < confRapidity && Lambdac.Pt () > 1 .0 && Lambdac.Pt () <= 6.0 ) {
896+ histos.fill (HIST (" hSparseV2SASameEvent_V2_SVX" ), Lambdac.M (), Lambdac.Pt (), v2, decaylength , CPAlambdac);
883897 }
884898 if (fillRotation) {
885899 for (int nrotbkg = 0 ; nrotbkg < nBkgRotations; nrotbkg++) {
@@ -888,14 +902,48 @@ struct highmasslambda {
888902 auto anglestep = (angleend - anglestart) / (1.0 * (nBkgRotations - 1 ));
889903 auto rotangle = anglestart + nrotbkg * anglestep;
890904 histos.fill (HIST (" hRotation" ), rotangle);
891- auto rotKaonPx = Kshort.px () * std::cos (rotangle) - Kshort.py () * std::sin (rotangle);
892- auto rotKaonPy = Kshort.px () * std::sin (rotangle) + Kshort.py () * std::cos (rotangle);
893- KshortRot = ROOT::Math::PxPyPzMVector (rotKaonPx, rotKaonPy, Kshort.pz (), massK0s);
905+ float rotKaonPx = Kshort.px () * std::cos (rotangle) - Kshort.py () * std::sin (rotangle);
906+ float rotKaonPy = Kshort.px () * std::sin (rotangle) + Kshort.py () * std::cos (rotangle);
907+ // //////// DCA fitter ////////////////
908+ // LOGF(info, "Before dca fitter");
909+ std::array<float , 3 > pVecV0rot = {0 ., 0 ., 0 .};
910+ std::array<float , 3 > pVecBachrot = {0 ., 0 ., 0 .};
911+ const std::array<float , 3 > momentumV0rot = {rotKaonPx, rotKaonPy, v0.pz ()};
912+ auto trackV0rot = o2::track::TrackParCov (vertexV0, momentumV0rot, covV, 0 , true );
913+ trackV0rot.setAbsCharge (0 );
914+ trackV0rot.setPID (o2::track::PID::K0);
915+ int nCand2rot = 0 ;
916+ try {
917+ nCand2rot = df.process (trackV0rot, trackParCovBach);
918+ } catch (...) {
919+ continue ;
920+ }
921+ if (nCand2rot == 0 ) {
922+ continue ;
923+ }
924+ df.propagateTracksToVertex (); // propagate the bach and V0 to the Lc vertex
925+ df.getTrack (0 ).getPxPyPzGlo (pVecV0rot); // take the momentum at the Lc vertex
926+ df.getTrack (1 ).getPxPyPzGlo (pVecBachrot);
927+ const auto & secondaryVertexrot = df.getPCACandidate ();
928+ double phirot, thetarot;
929+ getPointDirection (std::array{collision.posX (), collision.posY (), collision.posZ ()}, secondaryVertexrot, phirot, thetarot);
930+ KshortRot = ROOT::Math::PxPyPzMVector (pVecV0rot[0 ], pVecV0rot[1 ], pVecV0rot[2 ], massK0s);
931+ Proton = ROOT::Math::PxPyPzMVector (pVecBachrot[0 ], pVecBachrot[1 ], pVecBachrot[2 ], massPr);
894932 LambdacRot = Proton + KshortRot;
895933 auto phiminuspsiRot = GetPhiInRange (LambdacRot.Phi () - psiFT0C);
896934 v2Rot = TMath::Cos (2.0 * phiminuspsiRot) * QFT0C;
897- if (LambdacRot.M () > cMinLambdaMass && LambdacRot.M () <= cMaxLambdaMass && std::abs (LambdacRot.Rapidity ()) < confRapidity && LambdacRot.Pt () > 2.0 && LambdacRot.Pt () <= 6.0 ) {
898- histos.fill (HIST (" hSparseV2SASameEventRotational_V2_SVX" ), LambdacRot.M (), LambdacRot.Pt (), v2Rot, decaylengthxy, CPAlambdac);
935+ if (useSP) {
936+ v2Rot = TMath::Cos (2.0 * phiminuspsiRot);
937+ }
938+ double decaylengthxrot = secondaryVertexrot[0 ] - collision.posX ();
939+ double decaylengthyrot = secondaryVertexrot[1 ] - collision.posY ();
940+ double decaylengthzrot = secondaryVertexrot[2 ] - collision.posZ ();
941+ double decaylengthrot = TMath::Sqrt (decaylengthxrot * decaylengthxrot + decaylengthyrot * decaylengthyrot + decaylengthzrot * decaylengthzrot);
942+ // double decaylengthxyrot = TMath::Sqrt(decaylengthxrot * decaylengthxrot + decaylengthyrot * decaylengthyrot);
943+ double anglesignrot = decaylengthxrot * LambdacRot.Px () + decaylengthyrot * LambdacRot.Py () + decaylengthzrot * LambdacRot.Pz ();
944+ double CPAlambdacrot = anglesignrot / (decaylengthrot * LambdacRot.P ());
945+ if (LambdacRot.M () > cMinLambdaMass && LambdacRot.M () <= cMaxLambdaMass && std::abs (LambdacRot.Rapidity ()) < confRapidity && LambdacRot.Pt () > 1.0 && LambdacRot.Pt () <= 6.0 ) {
946+ histos.fill (HIST (" hSparseV2SASameEventRotational_V2_SVX" ), LambdacRot.M (), LambdacRot.Pt (), v2Rot, decaylengthrot, CPAlambdacrot);
899947 }
900948 }
901949 }
0 commit comments