Skip to content

Commit e04d84f

Browse files
committed
remove new line from Track::asString, set alpha to +-pi
1 parent 938cb93 commit e04d84f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

DataFormats/Reconstruction/include/ReconstructionDataFormats/TrackParametrization.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ GPUdi() TrackParametrization<value_T>::TrackParametrization(value_t x, value_t a
277277
: mX{x}, mAlpha{alpha}, mAbsCharge{char(gpu::CAMath::Abs(charge))}, mPID{pid}
278278
{
279279
// explicit constructor
280+
math_utils::detail::bringToPMPi<value_t>(mAlpha);
280281
for (int i = 0; i < kNParams; i++) {
281282
mP[i] = par[i];
282283
}
@@ -295,6 +296,7 @@ GPUdi() void TrackParametrization<value_T>::set(value_t x, value_t alpha, const
295296
{
296297
mX = x;
297298
mAlpha = alpha;
299+
math_utils::detail::bringToPMPi<value_t>(mAlpha);
298300
mAbsCharge = char(gpu::CAMath::Abs(charge));
299301
for (int i = 0; i < kNParams; i++) {
300302
mP[i] = par[i];
@@ -430,6 +432,7 @@ template <typename value_T>
430432
GPUdi() void TrackParametrization<value_T>::setAlpha(value_t v)
431433
{
432434
mAlpha = v;
435+
math_utils::detail::bringToPMPi<value_t>(mAlpha);
433436
}
434437

435438
//____________________________________________________________

DataFormats/Reconstruction/src/TrackParametrization.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ template <typename value_T>
575575
std::string TrackParametrization<value_T>::asString() const
576576
{
577577
// print parameters as string
578-
return fmt::format("X:{:+.4e} Alp:{:+.3e} Par: {:+.4e} {:+.4e} {:+.4e} {:+.4e} {:+.4e} |Q|:{:d} {:s}\n",
578+
return fmt::format("X:{:+.4e} Alp:{:+.3e} Par: {:+.4e} {:+.4e} {:+.4e} {:+.4e} {:+.4e} |Q|:{:d} {:s}",
579579
getX(), getAlpha(), getY(), getZ(), getSnp(), getTgl(), getQ2Pt(), getAbsCharge(), getPID().getName());
580580
}
581581

0 commit comments

Comments
 (0)