File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -2353,7 +2353,10 @@ AODProducerWorkflowDPL::TrackExtraInfo AODProducerWorkflowDPL::processBarrelTrac
23532353 extraInfoHolder.length = intLen;
23542354 const float mass = o2::constants::physics::MassPionCharged; // default pid = pion
23552355 if (tofInt.getTOF (o2::track::PID::Pion) > 0 .f ) {
2356- const float expBeta = (intLen / (tofInt.getTOF (o2::track::PID::Pion) * cSpeed));
2356+ float expBeta = (intLen / (tofInt.getTOF (o2::track::PID::Pion) * cSpeed));
2357+ if (expBeta > o2::constants::math::Almost1) {
2358+ expBeta = o2::constants::math::Almost1;
2359+ }
23572360 extraInfoHolder.tofExpMom = mass * expBeta / std::sqrt (1 .f - expBeta * expBeta);
23582361 }
23592362 // correct the time of the track
@@ -2657,6 +2660,9 @@ void AODProducerWorkflowDPL::addRefGlobalBCsForTOF(const o2::dataformats::VtxTra
26572660 float tofExpMom = 0 .;
26582661 if (tofInt.getTOF (o2::track::PID::Pion) > 0 .f ) {
26592662 float expBeta = (intLen / (tofInt.getTOF (o2::track::PID::Pion) * cSpeed));
2663+ if (expBeta > o2::constants::math::Almost1) {
2664+ expBeta = o2::constants::math::Almost1;
2665+ }
26602666 tofExpMom = o2::constants::physics::MassPionCharged * expBeta / std::sqrt (1 .f - expBeta * expBeta);
26612667 } else {
26622668 continue ;
You can’t perform that action at this time.
0 commit comments