Skip to content

Commit 03cd94c

Browse files
authored
[Common] kCSPEED -> o2::constants (AliceO2Group#9408)
1 parent 854dd74 commit 03cd94c

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

ALICE3/TableProducer/alice3-pidTOF.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ struct ALICE3pidTOFTask {
123123
if (!track.hasTOF()) {
124124
return -999.f;
125125
}
126-
return ((track.trackTime() - track.collision().collisionTime()) * 1000.f - o2::pid::tof::ExpTimes<Trks::iterator, id>::ComputeExpectedTime(track.tofExpMom() / o2::pid::tof::kCSPEED,
126+
return ((track.trackTime() - track.collision().collisionTime()) * 1000.f - o2::pid::tof::ExpTimes<Trks::iterator, id>::ComputeExpectedTime(track.tofExpMom() * o2::constants::physics::invLightSpeedCm2PS,
127127
track.length())) /
128128
sigma<id>(track);
129129
}
@@ -294,7 +294,7 @@ struct ALICE3pidTOFTaskQA {
294294
//
295295
// histos.fill(HIST("event/tofsignal"), t.p(), t.tofSignal());
296296
histos.fill(HIST("event/tofsignal"), t.p(), tofSignal);
297-
histos.fill(HIST("event/pexp"), t.p(), t.tofExpMom() / o2::pid::tof::kCSPEED);
297+
histos.fill(HIST("event/pexp"), t.p(), t.tofExpMom() * o2::constants::physics::invLightSpeedCm2PS);
298298
histos.fill(HIST("event/eta"), t.eta());
299299
histos.fill(HIST("event/length"), t.length());
300300
histos.fill(HIST("event/pt"), t.pt());

Common/Core/PID/PIDTOF.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ namespace o2::pid::tof
4141
{
4242

4343
// Utility values (to remove!)
44-
static constexpr float kCSPEED = TMath::C() * 1.0e2f * 1.0e-12f; /// Speed of light in TOF units (cm/ps)
45-
static constexpr float kCSPEDDInv = 1.f / kCSPEED; /// Inverse of the Speed of light in TOF units (ps/cm)
4644
static constexpr float defaultReturnValue = -999.f; /// Default return value in case TOF measurement is not available
4745

4846
/// \brief Class to handle the the TOF detector response for the TOF beta measurement

PWGLF/TableProducer/Nuspex/ebyeMaker.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ struct ebyeMaker {
708708
double expSigma{expBethe * cfgBetheBlochParams->get(iP, "resolution")};
709709
auto nSigmaTPC = static_cast<float>((track.tpcSignal() - expBethe) / expSigma);
710710

711-
float beta{track.hasTOF() ? track.length() / (track.tofSignal() - track.tofEvTime()) * o2::pid::tof::kCSPEDDInv : -999.f};
711+
float beta{track.hasTOF() ? track.length() / (track.tofSignal() - track.tofEvTime()) * o2::constants::physics::invLightSpeedCm2PS : -999.f};
712712
beta = std::min(1.f - 1.e-6f, std::max(1.e-4f, beta));
713713
float mass{track.tpcInnerParam() * std::sqrt(1.f / (beta * beta) - 1.f)};
714714
bool hasTof = track.hasTOF() && track.tofChi2() < 3;

PWGLF/Tasks/Nuspex/antidLambdaEbye.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ struct antidLambdaEbye {
636636
double expSigma{expBethe * config.cfgBetheBlochParams->get(iP, "resolution")};
637637
auto nSigmaTPC = static_cast<float>((track.tpcSignal() - expBethe) / expSigma);
638638

639-
float beta{track.hasTOF() ? track.length() / (track.tofSignal() - track.tofEvTime()) * o2::pid::tof::kCSPEDDInv : -999.f};
639+
float beta{track.hasTOF() ? track.length() / (track.tofSignal() - track.tofEvTime()) * o2::constants::physics::invLightSpeedCm2PS : -999.f};
640640
beta = std::min(1.f - 1.e-6f, std::max(1.e-4f, beta));
641641
float mass{track.tpcInnerParam() * std::sqrt(1.f / (beta * beta) - 1.f)};
642642
bool hasTof = track.hasTOF() && track.tofChi2() < 3;

0 commit comments

Comments
 (0)