Skip to content

Commit d76b432

Browse files
authored
[PWGLF] Fixed bug in histos filling in phik0sanalysis.cxx (#8832)
1 parent 8c22488 commit d76b432

File tree

1 file changed

+30
-12
lines changed

1 file changed

+30
-12
lines changed

PWGLF/Tasks/Strangeness/phik0sanalysis.cxx

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,8 @@ struct phik0shortanalysis {
684684
}
685685
}
686686

687-
TLorentzVector recK0S(v0.px(), v0.py(), v0.pz(), v0.mK0Short());
687+
TLorentzVector recK0S;
688+
recK0S.SetXYZM(v0.px(), v0.py(), v0.pz(), v0.mK0Short());
688689

689690
if (std::abs(recK0S.Rapidity()) > cfgyAcceptance)
690691
continue;
@@ -715,7 +716,8 @@ struct phik0shortanalysis {
715716
if (!selectionPion(track))
716717
continue;
717718

718-
TLorentzVector recPi(track.px(), track.py(), track.pz(), massPi);
719+
TLorentzVector recPi;
720+
recPi.SetXYZM(track.px(), track.py(), track.pz(), massPi);
719721

720722
if (std::abs(recPi.Rapidity()) > cfgyAcceptance)
721723
continue;
@@ -763,7 +765,9 @@ struct phik0shortanalysis {
763765
if (!selectionV0(v0, posDaughterTrack, negDaughterTrack))
764766
continue;
765767

766-
TLorentzVector recK0S(v0.px(), v0.py(), v0.pz(), v0.mK0Short());
768+
TLorentzVector recK0S;
769+
recK0S.SetXYZM(v0.px(), v0.py(), v0.pz(), v0.mK0Short());
770+
767771
if (std::abs(recK0S.Rapidity()) > cfgyAcceptance)
768772
continue;
769773

@@ -835,7 +839,9 @@ struct phik0shortanalysis {
835839
if (!selectionPion(track))
836840
continue;
837841

838-
TLorentzVector vecPi(track.px(), track.py(), track.pz(), massPi);
842+
TLorentzVector vecPi;
843+
vecPi.SetXYZM(track.px(), track.py(), track.pz(), massPi);
844+
839845
if (std::abs(vecPi.Rapidity()) > cfgyAcceptance)
840846
continue;
841847

@@ -1001,7 +1007,8 @@ struct phik0shortanalysis {
10011007
if (!selectionV0(v0, posDaughterTrack, negDaughterTrack))
10021008
continue;
10031009

1004-
TLorentzVector recK0S(v0.px(), v0.py(), v0.pz(), v0.mK0Short());
1010+
TLorentzVector recK0S;
1011+
recK0S.SetXYZM(v0.px(), v0.py(), v0.pz(), v0.mK0Short());
10051012

10061013
if (std::abs(recK0S.Rapidity()) > cfgyAcceptance)
10071014
continue;
@@ -1037,7 +1044,8 @@ struct phik0shortanalysis {
10371044
if (!selectionPion(track))
10381045
continue;
10391046

1040-
TLorentzVector recPi(track.px(), track.py(), track.pz(), massPi);
1047+
TLorentzVector recPi;
1048+
recPi.SetXYZM(track.px(), track.py(), track.pz(), massPi);
10411049

10421050
if (std::abs(recPi.Rapidity()) > cfgyAcceptance)
10431051
continue;
@@ -1109,7 +1117,9 @@ struct phik0shortanalysis {
11091117
if (!selectionV0(v0, posDaughterTrack, negDaughterTrack))
11101118
continue;
11111119

1112-
TLorentzVector recK0S(v0.px(), v0.py(), v0.pz(), v0.mK0Short());
1120+
TLorentzVector recK0S;
1121+
recK0S.SetXYZM(v0.px(), v0.py(), v0.pz(), v0.mK0Short());
1122+
11131123
if (std::abs(recK0S.Rapidity()) > cfgyAcceptance)
11141124
continue;
11151125

@@ -1219,7 +1229,9 @@ struct phik0shortanalysis {
12191229
if (!selectionPion(track))
12201230
continue;
12211231

1222-
TLorentzVector recPi(track.px(), track.py(), track.pz(), massPi);
1232+
TLorentzVector recPi;
1233+
recPi.SetXYZM(track.px(), track.py(), track.pz(), massPi);
1234+
12231235
if (std::abs(recPi.Rapidity()) > cfgyAcceptance)
12241236
continue;
12251237

@@ -1359,7 +1371,8 @@ struct phik0shortanalysis {
13591371
if (!selectionV0(v0, posDaughterTrack, negDaughterTrack))
13601372
continue;
13611373

1362-
TLorentzVector recK0S(v0.px(), v0.py(), v0.pz(), v0.mK0Short());
1374+
TLorentzVector recK0S;
1375+
recK0S.SetXYZM(v0.px(), v0.py(), v0.pz(), v0.mK0Short());
13631376

13641377
if (std::abs(recK0S.Rapidity()) > cfgyAcceptance)
13651378
continue;
@@ -1390,7 +1403,8 @@ struct phik0shortanalysis {
13901403
if (!selectionPion(track))
13911404
continue;
13921405

1393-
TLorentzVector recPi(track.px(), track.py(), track.pz(), massPi);
1406+
TLorentzVector recPi;
1407+
recPi.SetXYZM(track.px(), track.py(), track.pz(), massPi);
13941408

13951409
if (std::abs(recPi.Rapidity()) > cfgyAcceptance)
13961410
continue;
@@ -1441,7 +1455,9 @@ struct phik0shortanalysis {
14411455
if (!selectionV0(v0, posDaughterTrack, negDaughterTrack))
14421456
continue;
14431457

1444-
TLorentzVector recK0S(v0.px(), v0.py(), v0.pz(), v0.mK0Short());
1458+
TLorentzVector recK0S;
1459+
recK0S.SetXYZM(v0.px(), v0.py(), v0.pz(), v0.mK0Short());
1460+
14451461
if (std::abs(recK0S.Rapidity()) > cfgyAcceptance)
14461462
continue;
14471463

@@ -1514,7 +1530,9 @@ struct phik0shortanalysis {
15141530
if (!selectionPion(track))
15151531
continue;
15161532

1517-
TLorentzVector vecPi(track.px(), track.py(), track.pz(), massPi);
1533+
TLorentzVector vecPi;
1534+
vecPi.SetXYZM(track.px(), track.py(), track.pz(), massPi);
1535+
15181536
if (std::abs(vecPi.Rapidity()) > cfgyAcceptance)
15191537
continue;
15201538

0 commit comments

Comments
 (0)