Skip to content

Commit d04d7e7

Browse files
committed
Fix logic to check fraction of good decays
1 parent acb7c46 commit d04d7e7

File tree

35 files changed

+70
-70
lines changed

35 files changed

+70
-70
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ int External()
9191
}
9292

9393
float fracForcedDecays = nSignals ? float(nSignalGoodDecay) / nSignals : 0.0f;
94-
float uncFracForcedDecays = nSignals ? std::sqrt(fracForcedDecays * (1 - fracForcedDecays) / nSignals) / nSignals : 1.0f;
95-
if (std::abs(fracForcedDecays - 0.75) > uncFracForcedDecays) // we put some tolerance (e.g. due to oscillations which might change the final state)
94+
float uncFracForcedDecays = nSignals ? std::sqrt(fracForcedDecays * (1 - fracForcedDecays) / nSignals) : 1.0f;
95+
if (1 - fracForcedDecays > 0.15 + uncFracForcedDecays) // we put some tolerance (e.g. due to oscillations which might change the final state)
9696
{
9797
std::cerr << "Fraction of signals decaying into the correct channel " << fracForcedDecays << " lower than expected\n";
9898
return 1;

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

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

4848
float fracForcedDecays = nSignals ? float(nSignalGoodDecay) / nSignals : 0.0f;
49-
float uncFracForcedDecays = nSignals ? std::sqrt(fracForcedDecays * (1 - fracForcedDecays) / nSignals) / nSignals : 1.0f;
50-
if (std::abs(fracForcedDecays - 0.8) > uncFracForcedDecays) // we put some tolerance (lambdaB in MB events do not coalesce)
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)
5151
{
5252
std::cerr << "Fraction of signals decaying into nuclei: " << fracForcedDecays << ", lower than expected\n";
5353
return 1;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ int External()
8383
}
8484

8585
float fracForcedDecays = nSignals ? float(nSignalGoodDecay) / nSignals : 0.0f;
86-
float uncFracForcedDecays = nSignals ? std::sqrt(fracForcedDecays * (1 - fracForcedDecays) / nSignals) / nSignals : 1.0f;
87-
if (std::abs(fracForcedDecays - 0.85) > uncFracForcedDecays) // we put some tolerance (e.g. due to oscillations which might change the final state)
86+
float uncFracForcedDecays = nSignals ? std::sqrt(fracForcedDecays * (1 - fracForcedDecays) / nSignals) : 1.0f;
87+
if (1 - fracForcedDecays > 0.15 + uncFracForcedDecays) // we put some tolerance (e.g. due to oscillations which might change the final state)
8888
{
8989
std::cerr << "Fraction of signals decaying into the correct channel " << fracForcedDecays << " lower than expected\n";
9090
return 1;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ int External()
8383
}
8484

8585
float fracForcedDecays = nSignals ? float(nSignalGoodDecay) / nSignals : 0.0f;
86-
float uncFracForcedDecays = nSignals ? std::sqrt(fracForcedDecays * (1 - fracForcedDecays) / nSignals) / nSignals : 1.0f;
87-
if (std::abs(fracForcedDecays - 0.85) > uncFracForcedDecays) // we put some tolerance (e.g. due to oscillations which might change the final state)
86+
float uncFracForcedDecays = nSignals ? std::sqrt(fracForcedDecays * (1 - fracForcedDecays) / nSignals) : 1.0f;
87+
if (1 - fracForcedDecays > 0.15 + uncFracForcedDecays) // we put some tolerance (e.g. due to oscillations which might change the final state)
8888
{
8989
std::cerr << "Fraction of signals decaying into the correct channel " << fracForcedDecays << " lower than expected\n";
9090
return 1;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ int External() {
106106
}
107107

108108
float fracForcedDecays = nSignals ? float(nSignalGoodDecay) / nSignals : 0.0f;
109-
float uncFracForcedDecays = nSignals ? std::sqrt(fracForcedDecays * (1 - fracForcedDecays) / nSignals) / nSignals : 1.0f;
110-
if (std::abs(fracForcedDecays - 0.85) > uncFracForcedDecays) { // we put some tolerance (e.g. due to oscillations which might change the final state)
109+
float uncFracForcedDecays = nSignals ? std::sqrt(fracForcedDecays * (1 - fracForcedDecays) / nSignals) : 1.0f;
110+
if (1 - fracForcedDecays > 0.15 + uncFracForcedDecays) { // we put some tolerance (e.g. due to oscillations which might change the final state)
111111
std::cerr << "Fraction of signals decaying into the correct channel " << fracForcedDecays << " lower than expected\n";
112112
return 1;
113113
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ int External() {
106106
}
107107

108108
float fracForcedDecays = nSignals ? float(nSignalGoodDecay) / nSignals : 0.0f;
109-
float uncFracForcedDecays = nSignals ? std::sqrt(fracForcedDecays * (1 - fracForcedDecays) / nSignals) / nSignals : 1.0f;
110-
if (std::abs(fracForcedDecays - 0.85) > uncFracForcedDecays) { // we put some tolerance (e.g. due to oscillations which might change the final state)
109+
float uncFracForcedDecays = nSignals ? std::sqrt(fracForcedDecays * (1 - fracForcedDecays) / nSignals) : 1.0f;
110+
if (1 - fracForcedDecays > 0.15 + uncFracForcedDecays) { // we put some tolerance (e.g. due to oscillations which might change the final state)
111111
std::cerr << "Fraction of signals decaying into the correct channel " << fracForcedDecays << " lower than expected\n";
112112
return 1;
113113
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ int External() {
9696
}
9797

9898
float fracForcedDecays = nSignals ? float(nSignalGoodDecay) / nSignals : 0.0f;
99-
float uncFracForcedDecays = nSignals ? std::sqrt(fracForcedDecays * (1 - fracForcedDecays) / nSignals) / nSignals : 1.0f;
100-
if (std::abs(fracForcedDecays - 0.85) > uncFracForcedDecays) { // we put some tolerance (e.g. due to oscillations which might change the final state)
99+
float uncFracForcedDecays = nSignals ? std::sqrt(fracForcedDecays * (1 - fracForcedDecays) / nSignals) : 1.0f;
100+
if (1 - fracForcedDecays > 0.15 + uncFracForcedDecays) { // we put some tolerance (e.g. due to oscillations which might change the final state)
101101
std::cerr << "Fraction of signals decaying into the correct channel " << fracForcedDecays << " lower than expected\n";
102102
return 1;
103103
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ int External() {
107107
}
108108

109109
float fracForcedDecays = nSignals ? float(nSignalGoodDecay) / nSignals : 0.0f;
110-
float uncFracForcedDecays = nSignals ? std::sqrt(fracForcedDecays * (1 - fracForcedDecays) / nSignals) / nSignals : 1.0f;
111-
if (std::abs(fracForcedDecays - 0.85) > uncFracForcedDecays) { // we put some tolerance (e.g. due to oscillations which might change the final state)
110+
float uncFracForcedDecays = nSignals ? std::sqrt(fracForcedDecays * (1 - fracForcedDecays) / nSignals) : 1.0f;
111+
if (1 - fracForcedDecays > 0.15 + uncFracForcedDecays) { // we put some tolerance (e.g. due to oscillations which might change the final state)
112112
std::cerr << "Fraction of signals decaying into the correct channel " << fracForcedDecays << " lower than expected\n";
113113
return 1;
114114
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ int External()
103103
}
104104

105105
float fracForcedDecays = nSignals ? float(nSignalGoodDecay) / nSignals : 0.0f;
106-
float uncFracForcedDecays = nSignals ? std::sqrt(fracForcedDecays * (1 - fracForcedDecays) / nSignals) / nSignals : 1.0f;
107-
if (std::abs(fracForcedDecays - 0.8) > uncFracForcedDecays) { // we put some tolerance (e.g. due to oscillations which might change the final state)
106+
float uncFracForcedDecays = nSignals ? std::sqrt(fracForcedDecays * (1 - fracForcedDecays) / nSignals) : 1.0f;
107+
if (1 - fracForcedDecays > 0.15 + uncFracForcedDecays) { // we put some tolerance (e.g. due to oscillations which might change the final state)
108108
std::cerr << "Fraction of signals decaying into the correct channel " << fracForcedDecays << " lower than expected\n";
109109
return 1;
110110
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ int External() {
9696
}
9797

9898
float fracForcedDecays = nSignals ? float(nSignalGoodDecay) / nSignals : 0.0f;
99-
float uncFracForcedDecays = nSignals ? std::sqrt(fracForcedDecays * (1 - fracForcedDecays) / nSignals) / nSignals : 1.0f;
100-
if (std::abs(fracForcedDecays - 0.85) > uncFracForcedDecays) { // we put some tolerance (e.g. due to oscillations which might change the final state)
99+
float uncFracForcedDecays = nSignals ? std::sqrt(fracForcedDecays * (1 - fracForcedDecays) / nSignals) : 1.0f;
100+
if (1 - fracForcedDecays > 0.15 + uncFracForcedDecays) { // we put some tolerance (e.g. due to oscillations which might change the final state)
101101
std::cerr << "Fraction of signals decaying into the correct channel " << fracForcedDecays << " lower than expected\n";
102102
return 1;
103103
}

0 commit comments

Comments
 (0)