Skip to content

Commit fb3114b

Browse files
committed
Updated external generator test
1 parent fb59265 commit fb3114b

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

MC/config/common/ini/tests/GeneratorTPCloopers.C

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@ int External() {
2121
tree->GetEntry(i);
2222
for (auto &track : *tracks)
2323
{
24-
auto pdg = track.GetPdgCode();
25-
if (pdg == 11) {
26-
count_e++;
27-
} else if (pdg == -11) {
28-
count_p++;
29-
} else {
30-
std::cerr << "Found unexpected PDG code: " << pdg << "\n";
31-
return 1;
32-
}
24+
auto pdg = track.GetPdgCode();
25+
if (pdg == 11) {
26+
count_e++;
27+
} else if (pdg == -11) {
28+
count_p++;
29+
} else {
30+
std::cerr << "Found unexpected PDG code: " << pdg << "\n";
31+
return 1;
32+
}
3333
}
3434
}
35-
if (count_e != count_p) {
36-
std::cerr << "Mismatch in number of electrons and positrons: " << count_e << " vs " << count_p << "\n";
35+
if (count_e < count_p) {
36+
std::cerr << "Less electrons than positrons: " << count_e << " vs " << count_p << "\n";
3737
return 1;
38-
}
38+
}
3939
file.Close();
4040

4141
return 0;

0 commit comments

Comments
 (0)