Skip to content

Commit e7a258c

Browse files
authored
[PWGLF] adding sign for two particle polarization (#12368)
1 parent ae9aa1e commit e7a258c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

PWGLF/Tasks/Strangeness/lambdaTwoPartPolarization.cxx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ struct lambdaTwoPartPolarization {
182182

183183
ROOT::Math::PxPyPzMVector ProtonVec1, PionVec1, LambdaVec1, ProtonBoostedVec1, PionBoostedVec1;
184184
ROOT::Math::PxPyPzMVector ProtonVec2, PionVec2, LambdaVec2, ProtonBoostedVec2, PionBoostedVec2;
185+
int V01Tag;
186+
int V02Tag;
185187
double costhetastar1;
186188
double costhetastar2;
187189

@@ -292,10 +294,12 @@ struct lambdaTwoPartPolarization {
292294
if (LambdaTag) {
293295
ProtonVec1 = ROOT::Math::PxPyPzMVector(v01.pxpos(), v01.pypos(), v01.pzpos(), massPr);
294296
PionVec1 = ROOT::Math::PxPyPzMVector(v01.pxneg(), v01.pyneg(), v01.pzneg(), massPi);
297+
V01Tag = 0;
295298
}
296299
if (aLambdaTag) {
297300
ProtonVec1 = ROOT::Math::PxPyPzMVector(v01.pxneg(), v01.pyneg(), v01.pzneg(), massPr);
298301
PionVec1 = ROOT::Math::PxPyPzMVector(v01.pxpos(), v01.pypos(), v01.pzpos(), massPi);
302+
V01Tag = 1;
299303
}
300304
LambdaVec1 = ProtonVec1 + PionVec1;
301305
LambdaVec1.SetM(massLambda);
@@ -337,10 +341,12 @@ struct lambdaTwoPartPolarization {
337341
if (LambdaTag) {
338342
ProtonVec2 = ROOT::Math::PxPyPzMVector(v02.pxpos(), v02.pypos(), v02.pzpos(), massPr);
339343
PionVec2 = ROOT::Math::PxPyPzMVector(v02.pxneg(), v02.pyneg(), v02.pzneg(), massPi);
344+
V02Tag = 0;
340345
}
341346
if (aLambdaTag) {
342347
ProtonVec2 = ROOT::Math::PxPyPzMVector(v02.pxneg(), v02.pyneg(), v02.pzneg(), massPr);
343348
PionVec2 = ROOT::Math::PxPyPzMVector(v02.pxpos(), v02.pypos(), v02.pzpos(), massPi);
349+
V02Tag = 1;
344350
}
345351
LambdaVec2 = ProtonVec2 + PionVec2;
346352
LambdaVec2.SetM(massLambda);
@@ -356,6 +362,10 @@ struct lambdaTwoPartPolarization {
356362
weight *= cfgEffCor ? 1.0 / EffMap->GetBinContent(EffMap->GetXaxis()->FindBin(v02.pt()), EffMap->GetYaxis()->FindBin(centrality)) : 1.;
357363
weight *= cfgAccCor ? 1.0 / AccMap->GetBinContent(AccMap->GetXaxis()->FindBin(v02.pt()), AccMap->GetYaxis()->FindBin(v02.yLambda())) : 1.;
358364

365+
if (V01Tag != V02Tag) {
366+
weight *= -1.0;
367+
}
368+
359369
dphi = TVector2::Phi_0_2pi(v01.phi() - v02.phi());
360370
if (dphi > constants::math::PI * 1.5) {
361371
dphi -= constants::math::PI * 2.0;

0 commit comments

Comments
 (0)