Skip to content

Commit

Permalink
Use uint32_t for intermediate calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
mpuccio committed Aug 22, 2024
1 parent 80a7f35 commit e714151
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Detectors/AOD/src/AODProducerWorkflowSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2487,7 +2487,7 @@ AODProducerWorkflowDPL::TrackExtraInfo AODProducerWorkflowDPL::processBarrelTrac
extraInfoHolder.tpcNClsFindableMinusFound = tpcOrig.getNClusters() - tpcClData.found;
extraInfoHolder.tpcNClsFindableMinusCrossedRows = tpcOrig.getNClusters() - tpcClData.crossed;
extraInfoHolder.tpcNClsShared = tpcClData.shared;
uint8_t clsFractionUsedForPID = (tpcOrig.getdEdx().NHitsIROC + tpcOrig.getdEdx().NHitsOROC1 + tpcOrig.getdEdx().NHitsOROC2 + tpcOrig.getdEdx().NHitsOROC3) * 8 / tpcClData.found;
uint32_t clsFractionUsedForPID = (tpcOrig.getdEdx().NHitsIROC + tpcOrig.getdEdx().NHitsOROC1 + tpcOrig.getdEdx().NHitsOROC2 + tpcOrig.getdEdx().NHitsOROC3) * 8 / tpcClData.found;
clsFractionUsedForPID = clsFractionUsedForPID > 7u ? 7u : clsFractionUsedForPID; // 7 is the maximum value
extraInfoHolder.flags |= clsFractionUsedForPID << 25;
if (src == GIndex::TPC) { // standalone TPC track should set its time from their timebins range
Expand Down

0 comments on commit e714151

Please sign in to comment.