Skip to content

Commit b279deb

Browse files
authored
PWGCF : Femtouniverse -- Fixing bug in dphi calculation (#5643)
* PWGCF : Femtouniverse -- Fixing bug in dphi calculation The extra factor of 0.1 that was scaling the magnetic field is removed. However, after removing this factor, the asin(<arg>) function for calculating dphi was blowing up at certain (mostly higher) values of radii. This is also taken care of by only allowing abs(<arg>) < 1.0. * PWGCF : Femtouniverse -- Fixing bug in dphi calculation The extra factor of 0.1 that was scaling the magnetic field is removed. However, after removing this factor, the asin() function for calculating dphi was blowing up at certain (mostly higher) values of radii. This is also taken care of by only allowing abs() < 1.0. * Update FemtoUniverseDetaDphiStar.h * Update FemtoUniverseDetaDphiStar.h
1 parent b69080b commit b279deb

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
/// \brief FemtoUniverseDetaDphiStar - Checks particles for the close pair rejection.
1414
/// \author Laura Serksnyte, TU München, laura.serksnyte@tum.de
1515
/// \author Zuzanna Chochulska, WUT Warsaw & CTU Prague, zchochul@cern.ch
16+
/// \author Pritam Chakraborty, WUT Warsaw, pritam.chakraborty@cern.ch
1617

1718
#ifndef PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEDETADPHISTAR_H_
1819
#define PWGCF_FEMTOUNIVERSE_CORE_FEMTOUNIVERSEDETADPHISTAR_H_
@@ -377,7 +378,10 @@ class FemtoUniverseDetaDphiStar
377378
// End: Get the charge from cutcontainer using masks
378379
float pt = part.pt();
379380
for (size_t i = 0; i < 9; i++) {
380-
tmpVec.push_back(phi0 - std::asin(0.3 * charge * 0.1 * magfield * tmpRadiiTPC[i] * 0.01 / (2. * pt)));
381+
double arg = 0.3 * charge * magfield * tmpRadiiTPC[i] * 0.01 / (2. * pt);
382+
if (abs(arg) < 1.0) {
383+
tmpVec.push_back(phi0 - std::asin(arg));
384+
}
381385
}
382386
}
383387

@@ -426,12 +430,15 @@ class FemtoUniverseDetaDphiStar
426430
float charge1 = GetCharge(part1);
427431
float charge2 = GetCharge(part2);
428432

429-
double deltaphiconstFD = 0.3 * 0.1 * 0.01 / 2;
433+
double deltaphiconstFD = 0.3 / 2;
430434
// double deltaphiconstAF = 0.15;
431435
double afsi0b = deltaphiconstFD * magfield * charge1 * ChosenRadii / part1.pt();
432436
double afsi1b = deltaphiconstFD * magfield * charge2 * ChosenRadii / part2.pt();
437+
double dphis = 0.0;
433438

434-
double dphis = part2.phi() - part1.phi() + TMath::ASin(afsi1b) - TMath::ASin(afsi0b);
439+
if (abs(afsi0b) < 1.0 && abs(afsi0b) < 1.0) {
440+
dphis = part2.phi() - part1.phi() + TMath::ASin(afsi1b) - TMath::ASin(afsi0b);
441+
}
435442
return dphis;
436443
}
437444
};

0 commit comments

Comments
 (0)