Skip to content

Commit 3d97782

Browse files
ercolessifgrosa
andauthored
Update MC/config/PWGHF/ini/tests/GeneratorHFTrigger_LambdaBToDeuteron.C
Co-authored-by: Fabrizio <fabrizio.grosa@cern.ch>
1 parent 377d8a5 commit 3d97782

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

MC/config/PWGHF/ini/tests/GeneratorHFTrigger_LambdaBToDeuteron.C

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ int External()
4545
std::cout <<"# signal hadrons: " << nSignals << "\n";
4646
std::cout <<"# signal hadrons decaying into nuclei: " << nSignalGoodDecay << "\n";
4747

48-
float fracForcedDecays = float(nSignalGoodDecay) / nSignals;
49-
if (fracForcedDecays < 0.8) // we put some tolerance (lambdaB in MB events do not coalesce)
48+
float fracForcedDecays = nSignals ? float(nSignalGoodDecay) / nSignals : 0.0f;
49+
float uncFracForcedDecays = nSignals ? std::sqrt(fracForcedDecays * (1 - fracForcedDecays) / nSignals) : 1.0f;
50+
if (1 - fracForcedDecays > 0.2 + uncFracForcedDecays) // we put some tolerance (lambdaB in MB events do not coalesce)
5051
{
5152
std::cerr << "Fraction of signals decaying into nuclei: " << fracForcedDecays << ", lower than expected\n";
5253
return 1;

0 commit comments

Comments
 (0)