Skip to content

Commit 1d390a7

Browse files
committed
Minor adjustments
1 parent 14358f2 commit 1d390a7

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -347,9 +347,9 @@ struct strangenesstofpid {
347347
std::array<float, 3> xyz;
348348
track.getXYZGlo(xyz);
349349
float segmentedR = segmentedRadius(xyz[0], xyz[1]);
350-
timeProton = ltIntegral.getTOF(o2::track::PID::Proton);
351-
timeKaon = ltIntegral.getTOF(o2::track::PID::Kaon);
352-
timePion = ltIntegral.getTOF(o2::track::PID::Pion);
350+
float currentTimeProton = ltIntegral.getTOF(o2::track::PID::Proton);
351+
float currentTimeKaon = ltIntegral.getTOF(o2::track::PID::Kaon);
352+
float currentTimePion = ltIntegral.getTOF(o2::track::PID::Pion);
353353
histos.fill(HIST("hTOFPosition"), xyz[0], xyz[1]); // for debugging purposes
354354

355355
// correct for TOF segmentation
@@ -374,18 +374,18 @@ struct strangenesstofpid {
374374
float timeKaonFinal = ltIntegral.getTOF(o2::track::PID::Kaon);
375375
float timePionFinal = ltIntegral.getTOF(o2::track::PID::Pion);
376376
float fraction = (tofPosition - segmentedR)/(segmentedRFinal-segmentedR+1e-6); // proportional fraction
377-
timeProton = timeProton + (timeProtonFinal-timeProton)*fraction;
378-
timeKaon = timeKaon + (timeKaonFinal-timeKaon)*fraction;
379-
timePion = timeProton + (timePionFinal-timePion)*fraction;
377+
timeProton = currentTimeProton + (timeProtonFinal-timeProton)*fraction;
378+
timeKaon = currentTimeKaon + (timeKaonFinal-timeKaon)*fraction;
379+
timePion = currentTimePion + (timePionFinal-timePion)*fraction;
380380
histos.fill(HIST("hTOFPositionFinal"), previousX+fraction*(xyz[0]-previousX), previousY+fraction*(xyz[1]-previousY)); // for debugging purposes
381-
break;
381+
return; // get out of the entire function and return (don't just break)
382382
}
383383

384384
// prepare for next step by setting current position and desired variables
385385
segmentedR = segmentedRadius(xyz[0], xyz[1]);
386-
timeProton = ltIntegral.getTOF(o2::track::PID::Proton);
387-
timeKaon = ltIntegral.getTOF(o2::track::PID::Kaon);
388-
timePion = ltIntegral.getTOF(o2::track::PID::Pion);
386+
currentTimeProton = ltIntegral.getTOF(o2::track::PID::Proton);
387+
currentTimeKaon = ltIntegral.getTOF(o2::track::PID::Kaon);
388+
currentTimePion = ltIntegral.getTOF(o2::track::PID::Pion);
389389
}
390390
}
391391
}

0 commit comments

Comments
 (0)