Skip to content

Commit f273983

Browse files
authored
modifing randomness mechanism in a pair rel. momentum calculation (#5618)
1 parent ef95782 commit f273983

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

PWGCF/Femto3D/Tasks/femto3dPairTask.cxx

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ struct FemtoCorrelations {
254254
SEhistos_1D[multBin][kTbin]->Fill(Pair->GetKstar()); // close pair rejection and fillig the SE histo
255255

256256
if (_fill3dCF) {
257-
TVector3 qLCMS = Pair->GetQLCMS();
257+
std::mt19937 mt(std::chrono::steady_clock::now().time_since_epoch().count());
258+
TVector3 qLCMS = std::pow(-1, (mt() % 2)) * Pair->GetQLCMS(); // introducing randomness to the pair order ([first, second]); important only for 3D because if there are any sudden order/correlation in the tables, it could couse unwanted asymmetries in the final 3d rel. momentum distributions; irrelevant in 1D case because the absolute value of the rel.momentum is taken
258259
SEhistos_3D[multBin][kTbin]->Fill(qLCMS.X(), qLCMS.Y(), qLCMS.Z());
259260
}
260261
}
@@ -301,14 +302,16 @@ struct FemtoCorrelations {
301302
mThistos[multBin][kTbin]->Fill(Pair->GetMt()); // test
302303

303304
if (_fill3dCF) {
304-
TVector3 qLCMS = Pair->GetQLCMS();
305+
std::mt19937 mt(std::chrono::steady_clock::now().time_since_epoch().count());
306+
TVector3 qLCMS = std::pow(-1, (mt() % 2)) * Pair->GetQLCMS(); // introducing randomness to the pair order ([first, second]); important only for 3D because if there are any sudden order/correlation in the tables, it could couse unwanted asymmetries in the final 3d rel. momentum distributions; irrelevant in 1D case because the absolute value of the rel.momentum is taken
305307
SEhistos_3D[multBin][kTbin]->Fill(qLCMS.X(), qLCMS.Y(), qLCMS.Z());
306308
}
307309
} else {
308310
MEhistos_1D[multBin][kTbin]->Fill(Pair->GetKstar());
309311

310312
if (_fill3dCF) {
311-
TVector3 qLCMS = Pair->GetQLCMS();
313+
std::mt19937 mt(std::chrono::steady_clock::now().time_since_epoch().count());
314+
TVector3 qLCMS = std::pow(-1, (mt() % 2)) * Pair->GetQLCMS(); // introducing randomness to the pair order ([first, second]); important only for 3D because if there are any sudden order/correlation in the tables, it could couse unwanted asymmetries in the final 3d rel. momentum distributions; irrelevant in 1D case because the absolute value of the rel.momentum is taken
312315
MEhistos_3D[multBin][kTbin]->Fill(qLCMS.X(), qLCMS.Y(), qLCMS.Z());
313316
qLCMSvskStar[multBin][kTbin]->Fill(qLCMS.X(), qLCMS.Y(), qLCMS.Z(), Pair->GetKstar());
314317
}
@@ -412,11 +415,6 @@ struct FemtoCorrelations {
412415
int centBin = std::floor((i->first).second);
413416
MultHistos[centBin]->Fill(col1->mult());
414417

415-
if (_fill3dCF) { // shuffling is important only for 3D because if there are any sudden order/correlation in the tables, it could couse unwanted asymmetries in the final 3d rel. momentum distributions; irrelevant in 1D case because the absolute value of the rel.momentum is taken
416-
std::mt19937 gen(std::chrono::steady_clock::now().time_since_epoch().count());
417-
std::shuffle(selectedtracks_1[col1->index()].begin(), selectedtracks_1[col1->index()].end(), gen);
418-
}
419-
420418
mixTracks(selectedtracks_1[col1->index()], centBin); // mixing SE identical
421419

422420
for (int indx2 = indx1 + 1; indx2 < EvPerBin; indx2++) { // nested loop for all the combinations of collisions in a chosen mult/vertex bin
@@ -449,11 +447,6 @@ struct FemtoCorrelations {
449447
int centBin = std::floor((i->first).second);
450448
MultHistos[centBin]->Fill(col1->mult());
451449

452-
if (_fill3dCF) {
453-
std::mt19937 gen(std::chrono::steady_clock::now().time_since_epoch().count());
454-
std::shuffle(selectedtracks_1[col1->index()].begin(), selectedtracks_1[col1->index()].end(), gen);
455-
}
456-
457450
mixTracks<0>(selectedtracks_1[col1->index()], selectedtracks_2[col1->index()], centBin); // mixing SE non-identical, in <> brackets: 0 -- SE; 1 -- ME
458451

459452
for (int indx2 = indx1 + 1; indx2 < EvPerBin; indx2++) { // nested loop for all the combinations of collisions in a chosen mult/vertex bin

0 commit comments

Comments
 (0)