Skip to content

Commit f488220

Browse files
prottayCMTProttay Das
andauthored
[PWGLF] Boosting daughter with v0 momentum (#8936)
Co-authored-by: Prottay Das <prottay@alipap1.cern.ch>
1 parent 647c4ee commit f488220

File tree

1 file changed

+21
-34
lines changed

1 file changed

+21
-34
lines changed

PWGLF/Tasks/Strangeness/lambdapolsp.cxx

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ struct lambdapolsp {
7777
// Configurable<bool> mycut{"mycut", false, "select tracks based on my cuts"};
7878
Configurable<bool> tofhit{"tofhit", true, "select tracks based on tof hit"};
7979
Configurable<bool> globalpt{"globalpt", true, "select tracks based on pt global vs tpc"};
80-
Configurable<bool> usefourvectormass{"usefourvectormass", true, "select invariant mass based on four vector"};
80+
Configurable<bool> useglobal{"useglobal", true, "flag to use global vs v0 momentum"};
8181
Configurable<bool> checksign{"checksign", true, "check sign of daughter tracks"};
8282
Configurable<int> useprofile{"useprofile", 3, "flag to select profile vs Sparse"};
8383
Configurable<int> QxyNbins{"QxyNbins", 100, "Number of bins in QxQy histograms"};
@@ -100,7 +100,6 @@ struct lambdapolsp {
100100
Configurable<int> cfgTPCcluster{"cfgTPCcluster", 70, "Number of TPC cluster"};
101101
Configurable<bool> isPVContributor{"isPVContributor", true, "is PV contributor"};
102102
Configurable<bool> checkwithpub{"checkwithpub", true, "checking results with published"};
103-
Configurable<bool> rejectmisident{"rejectmisident", true, "rejecting misidentification"};
104103
Configurable<bool> useTPCTOF{"useTPCTOF", true, "flag to use TPC and TOF"};
105104

106105
// Configs for V0
@@ -436,15 +435,6 @@ struct lambdapolsp {
436435
if (pid == 1 && TMath::Abs(track.tpcNSigmaPi()) > ConfDaughPIDCuts) {
437436
return false;
438437
}
439-
// for misidentification
440-
if (rejectmisident) {
441-
if (pid == 0 && TMath::Abs(track.tpcNSigmaPi()) < 3.0) {
442-
return false;
443-
}
444-
if (pid == 1 && TMath::Abs(track.tpcNSigmaPr()) < 3.0) {
445-
return false;
446-
}
447-
}
448438
}
449439

450440
if (pid == 0 && pt < cfgDaughPrPt) {
@@ -690,15 +680,24 @@ struct lambdapolsp {
690680
}
691681

692682
if (LambdaTag) {
693-
Proton = ROOT::Math::PxPyPzMVector(postrack.px(), postrack.py(), postrack.pz(), massPr);
694-
Pion = ROOT::Math::PxPyPzMVector(negtrack.px(), negtrack.py(), negtrack.pz(), massPi);
683+
if (useglobal) {
684+
Proton = ROOT::Math::PxPyPzMVector(postrack.px(), postrack.py(), postrack.pz(), massPr);
685+
Pion = ROOT::Math::PxPyPzMVector(negtrack.px(), negtrack.py(), negtrack.pz(), massPi);
686+
} else {
687+
Proton = ROOT::Math::PxPyPzMVector(v0.pxpos(), v0.pypos(), v0.pzpos(), massPr);
688+
Pion = ROOT::Math::PxPyPzMVector(v0.pxneg(), v0.pyneg(), v0.pzneg(), massPi);
689+
}
695690
}
696691
if (aLambdaTag) {
697-
Proton = ROOT::Math::PxPyPzMVector(negtrack.px(), negtrack.py(), negtrack.pz(), massPr);
698-
Pion = ROOT::Math::PxPyPzMVector(postrack.px(), postrack.py(), postrack.pz(), massPi);
692+
if (useglobal) {
693+
Proton = ROOT::Math::PxPyPzMVector(negtrack.px(), negtrack.py(), negtrack.pz(), massPr);
694+
Pion = ROOT::Math::PxPyPzMVector(postrack.px(), postrack.py(), postrack.pz(), massPi);
695+
} else {
696+
Proton = ROOT::Math::PxPyPzMVector(v0.pxneg(), v0.pyneg(), v0.pzneg(), massPr);
697+
Pion = ROOT::Math::PxPyPzMVector(v0.pxpos(), v0.pypos(), v0.pzpos(), massPi);
698+
}
699699
}
700700
Lambda = Proton + Pion;
701-
Lambdacopy = Proton + Pion;
702701
Lambda.SetM(massLambda);
703702

704703
ROOT::Math::Boost boost{Lambda.BoostToCM()};
@@ -733,15 +732,9 @@ struct lambdapolsp {
733732
auto candeta = 0.0;
734733

735734
if (LambdaTag) {
736-
if (usefourvectormass) {
737-
candmass = Lambdacopy.M();
738-
candpt = Lambdacopy.Pt();
739-
candeta = Lambdacopy.Eta();
740-
} else {
741-
candmass = v0.mLambda();
742-
candpt = v0.pt();
743-
candeta = v0.eta();
744-
}
735+
candmass = v0.mLambda();
736+
candpt = v0.pt();
737+
candeta = v0.eta();
745738

746739
histos.fill(HIST("hSparseLambdaPolA"), candmass, candpt, candeta, PolA, centrality);
747740
histos.fill(HIST("hSparseLambdaPolC"), candmass, candpt, candeta, PolC, centrality);
@@ -753,15 +746,9 @@ struct lambdapolsp {
753746
}
754747

755748
if (aLambdaTag) {
756-
if (usefourvectormass) {
757-
candmass = Lambdacopy.M();
758-
candpt = Lambdacopy.Pt();
759-
candeta = Lambdacopy.Eta();
760-
} else {
761-
candmass = v0.mAntiLambda();
762-
candpt = v0.pt();
763-
candeta = v0.eta();
764-
}
749+
candmass = v0.mAntiLambda();
750+
candpt = v0.pt();
751+
candeta = v0.eta();
765752

766753
histos.fill(HIST("hSparseAntiLambdaPolA"), candmass, candpt, candeta, PolA, centrality);
767754
histos.fill(HIST("hSparseAntiLambdaPolC"), candmass, candpt, candeta, PolC, centrality);

0 commit comments

Comments
 (0)