Skip to content

Commit 4aadb6d

Browse files
committed
properly normalised counting of charge of MC tracks
1 parent efff747 commit 4aadb6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PWGUD/Tasks/upcRhoAnalysis.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ struct UpcRhoAnalysis {
548548
{
549549
int charge = 0;
550550
for (const auto& track : cutTracks)
551-
charge += track.pdgCode();
551+
charge += track.pdgCode() / std::abs(track.pdgCode());
552552
return charge;
553553
}
554554

0 commit comments

Comments
 (0)