Skip to content

Commit 129fdd8

Browse files
authored
[Common,PWGCF,PWGHF,PWGLF,DPG,Trigger] Drop old name for BetheBlochAleph function (#14397)
1 parent d67eb7e commit 129fdd8

34 files changed

+71
-71
lines changed

Common/Core/PID/TPCPIDResponse.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#ifndef COMMON_CORE_PID_TPCPIDRESPONSE_H_
1818
#define COMMON_CORE_PID_TPCPIDRESPONSE_H_
1919

20-
#include <DataFormatsTPC/BetheBlochAleph.h>
20+
#include <MathUtils/BetheBlochAleph.h>
2121
#include <Framework/Logger.h>
2222
#include <ReconstructionDataFormats/PID.h>
2323

@@ -116,7 +116,7 @@ inline float Response::GetExpectedSignal(const TrackType& track, const o2::track
116116
if (!track.hasTPC()) {
117117
return -999.f;
118118
}
119-
const float bethe = mMIP * o2::tpc::BetheBlochAleph(track.tpcInnerParam() / o2::track::pid_constants::sMasses[id], mBetheBlochParams[0], mBetheBlochParams[1], mBetheBlochParams[2], mBetheBlochParams[3], mBetheBlochParams[4]) * std::pow(static_cast<float>(o2::track::pid_constants::sCharges[id]), mChargeFactor);
119+
const float bethe = mMIP * o2::common::BetheBlochAleph(track.tpcInnerParam() / o2::track::pid_constants::sMasses[id], mBetheBlochParams[0], mBetheBlochParams[1], mBetheBlochParams[2], mBetheBlochParams[3], mBetheBlochParams[4]) * std::pow(static_cast<float>(o2::track::pid_constants::sCharges[id]), mChargeFactor);
120120
return bethe >= 0.f ? bethe : -999.f;
121121
}
122122

@@ -145,7 +145,7 @@ inline float Response::GetExpectedSigmaAtMultiplicity(const long multTPC, const
145145
const double p = track.tpcInnerParam();
146146
const double mass = o2::track::pid_constants::sMasses[id];
147147
const double bg = p / mass;
148-
const double dEdx = o2::tpc::BetheBlochAleph(static_cast<float>(bg), mBetheBlochParams[0], mBetheBlochParams[1], mBetheBlochParams[2], mBetheBlochParams[3], mBetheBlochParams[4]) * std::pow(static_cast<float>(o2::track::pid_constants::sCharges[id]), mChargeFactor);
148+
const double dEdx = o2::common::BetheBlochAleph(static_cast<float>(bg), mBetheBlochParams[0], mBetheBlochParams[1], mBetheBlochParams[2], mBetheBlochParams[3], mBetheBlochParams[4]) * std::pow(static_cast<float>(o2::track::pid_constants::sCharges[id]), mChargeFactor);
149149
const double relReso = GetRelativeResolutiondEdx(p, mass, o2::track::pid_constants::sCharges[id], mResolutionParams[3]);
150150

151151
const std::vector<double> values{1.f / dEdx, track.tgl(), std::sqrt(ncl), relReso, track.signed1Pt(), multTPC / mMultNormalization};
@@ -210,10 +210,10 @@ inline float Response::GetSignalDelta(const TrackType& trk, const o2::track::PID
210210
inline float Response::GetRelativeResolutiondEdx(const float p, const float mass, const float charge, const float resol) const
211211
{
212212
const float bg = p / mass;
213-
const float dEdx = o2::tpc::BetheBlochAleph(bg, mBetheBlochParams[0], mBetheBlochParams[1], mBetheBlochParams[2], mBetheBlochParams[3], mBetheBlochParams[4]) * std::pow(charge, mChargeFactor);
213+
const float dEdx = o2::common::BetheBlochAleph(bg, mBetheBlochParams[0], mBetheBlochParams[1], mBetheBlochParams[2], mBetheBlochParams[3], mBetheBlochParams[4]) * std::pow(charge, mChargeFactor);
214214
const float deltaP = resol * std::sqrt(dEdx);
215215
const float bgDelta = p * (1 + deltaP) / mass;
216-
const float dEdx2 = o2::tpc::BetheBlochAleph(bgDelta, mBetheBlochParams[0], mBetheBlochParams[1], mBetheBlochParams[2], mBetheBlochParams[3], mBetheBlochParams[4]) * std::pow(charge, mChargeFactor);
216+
const float dEdx2 = o2::common::BetheBlochAleph(bgDelta, mBetheBlochParams[0], mBetheBlochParams[1], mBetheBlochParams[2], mBetheBlochParams[3], mBetheBlochParams[4]) * std::pow(charge, mChargeFactor);
217217
const float deltaRel = std::abs(dEdx2 - dEdx) / dEdx;
218218
return deltaRel;
219219
}

DPG/Tasks/AOTTrack/qaEventTrackLite.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include "Common/DataModel/TrackSelectionTables.h"
3131
#include "Common/Core/TrackSelection.h"
3232
#include "Common/Core/TrackSelectionDefaults.h"
33-
#include "DataFormatsTPC/BetheBlochAleph.h"
33+
#include "MathUtils/BetheBlochAleph.h"
3434
#include "ReconstructionDataFormats/PID.h"
3535

3636
#include "TF1.h"
@@ -138,11 +138,11 @@ struct qaEventTrackLite {
138138
///
139139
/// From A. Kalteyer:
140140
/// const float bethe = mMIP
141-
/// * o2::tpc::BetheBlochAleph(track.tpcInnerParam() / o2::track::pid_constants::sMasses[id]
141+
/// * o2::common::BetheBlochAleph(track.tpcInnerParam() / o2::track::pid_constants::sMasses[id]
142142
/// , mBetheBlochParams[0], mBetheBlochParams[1], mBetheBlochParams[2], mBetheBlochParams[3], mBetheBlochParams[4])
143143
/// * std::pow((float)o2::track::pid_constants::sCharges[id], mChargeFactor);
144144
///
145-
return initBBok ? mMip * o2::tpc::BetheBlochAleph(x[0] / par[0], mBetheBlockAleph[0], mBetheBlockAleph[1], mBetheBlockAleph[2], mBetheBlockAleph[3], mBetheBlockAleph[4]) * std::pow(par[1], mChargeFactor) : 0.;
145+
return initBBok ? mMip * o2::common::BetheBlochAleph(x[0] / par[0], mBetheBlockAleph[0], mBetheBlockAleph[1], mBetheBlockAleph[2], mBetheBlockAleph[3], mBetheBlockAleph[4]) * std::pow(par[1], mChargeFactor) : 0.;
146146
}
147147
void setUpBetheBlockAleph(std::string str_case)
148148
{

EventFiltering/PWGHF/HFFilterHelpers.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include <CommonConstants/MathConstants.h>
3535
#include <CommonConstants/PhysicsConstants.h>
3636
#include <DCAFitter/DCAFitterN.h>
37-
#include <DataFormatsTPC/BetheBlochAleph.h>
37+
#include <MathUtils/BetheBlochAleph.h>
3838
#include <DetectorsBase/Propagator.h>
3939
#include <Framework/ASoA.h>
4040
#include <Framework/AnalysisDataModel.h>
@@ -2513,7 +2513,7 @@ inline float HfFilterHelper::getTPCSplineCalib(const float tpcPin, const float d
25132513
}
25142514

25152515
auto bgScaling = 1 / mMassPar;
2516-
double expBethe = tpc::BetheBlochAleph(static_cast<double>(tpcPin * bgScaling), mBetheBlochPiKaPrDe[pidSpecies][0], mBetheBlochPiKaPrDe[pidSpecies][1], mBetheBlochPiKaPrDe[pidSpecies][2], mBetheBlochPiKaPrDe[pidSpecies][3], mBetheBlochPiKaPrDe[pidSpecies][4]);
2516+
double expBethe = common::BetheBlochAleph(static_cast<double>(tpcPin * bgScaling), mBetheBlochPiKaPrDe[pidSpecies][0], mBetheBlochPiKaPrDe[pidSpecies][1], mBetheBlochPiKaPrDe[pidSpecies][2], mBetheBlochPiKaPrDe[pidSpecies][3], mBetheBlochPiKaPrDe[pidSpecies][4]);
25172517
double expSigma = expBethe * mBetheBlochPiKaPrDe[pidSpecies][5];
25182518
return static_cast<float>((dEdx - expBethe) / expSigma);
25192519
}

EventFiltering/PWGLF/filterdoublephi.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include "CCDB/BasicCCDBManager.h"
3030
#include "CCDB/CcdbApi.h"
3131
#include "CommonConstants/MathConstants.h"
32-
#include "DataFormatsTPC/BetheBlochAleph.h"
32+
#include "MathUtils/BetheBlochAleph.h"
3333
#include "Framework/ASoAHelpers.h"
3434
#include "Framework/AnalysisDataModel.h"
3535
#include "Framework/AnalysisTask.h"

EventFiltering/PWGLF/filterf1proton.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include "CommonConstants/PhysicsConstants.h"
3636
#include "DataFormatsParameters/GRPMagField.h"
3737
#include "DataFormatsParameters/GRPObject.h"
38-
#include "DataFormatsTPC/BetheBlochAleph.h"
38+
#include "MathUtils/BetheBlochAleph.h"
3939
#include "Framework/ASoAHelpers.h"
4040
#include "Framework/AnalysisDataModel.h"
4141
#include "Framework/AnalysisTask.h"
@@ -298,7 +298,7 @@ struct filterf1proton {
298298
template <typename T>
299299
double updatePID(T const& track, double bgScaling, std::vector<double> BB)
300300
{
301-
double expBethe = tpc::BetheBlochAleph(static_cast<double>(track.tpcInnerParam() * bgScaling), BB[0], BB[1], BB[2], BB[3], BB[4]);
301+
double expBethe = common::BetheBlochAleph(static_cast<double>(track.tpcInnerParam() * bgScaling), BB[0], BB[1], BB[2], BB[3], BB[4]);
302302
double expSigma = expBethe * BB[5];
303303
return static_cast<float>((track.tpcSignal() - expBethe) / expSigma);
304304
}

EventFiltering/PWGLF/nucleiFilter.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include "DataFormatsParameters/GRPMagField.h"
3030
#include "DataFormatsParameters/GRPObject.h"
3131
#include "DataFormatsTOF/ParameterContainers.h"
32-
#include "DataFormatsTPC/BetheBlochAleph.h"
32+
#include "MathUtils/BetheBlochAleph.h"
3333
#include "DetectorsBase/GeometryManager.h"
3434
#include "DetectorsBase/Propagator.h"
3535
#include "Framework/ASoAHelpers.h"
@@ -311,7 +311,7 @@ struct nucleiFilter {
311311

312312
auto getNsigma = [&](const auto& track, int iN, int iC) {
313313
float fixTPCrigidity{(cfgFixTPCinnerParam && (track.pidForTracking() == track::PID::Helium3 || track.pidForTracking() == track::PID::Alpha)) ? 0.5f : 1.f};
314-
double expBethe{tpc::BetheBlochAleph(static_cast<double>(track.tpcInnerParam() * fixTPCrigidity * bgScalings[iN][iC]), cfgBetheBlochParams->get(iN, 0u), cfgBetheBlochParams->get(iN, 1u), cfgBetheBlochParams->get(iN, 2u), cfgBetheBlochParams->get(iN, 3u), cfgBetheBlochParams->get(iN, 4u))};
314+
double expBethe{common::BetheBlochAleph(static_cast<double>(track.tpcInnerParam() * fixTPCrigidity * bgScalings[iN][iC]), cfgBetheBlochParams->get(iN, 0u), cfgBetheBlochParams->get(iN, 1u), cfgBetheBlochParams->get(iN, 2u), cfgBetheBlochParams->get(iN, 3u), cfgBetheBlochParams->get(iN, 4u))};
315315
double expSigma{expBethe * cfgBetheBlochParams->get(iN, 5u)};
316316
return static_cast<float>((track.tpcSignal() - expBethe) / expSigma);
317317
};

PWGCF/Femto/FemtoNuclei/TableProducer/HadNucleiFemto.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#include "CCDB/BasicCCDBManager.h"
4141
#include "DataFormatsParameters/GRPMagField.h"
4242
#include "DataFormatsParameters/GRPObject.h"
43-
#include "DataFormatsTPC/BetheBlochAleph.h"
43+
#include "MathUtils/BetheBlochAleph.h"
4444
#include "DetectorsBase/GeometryManager.h"
4545
#include "DetectorsBase/Propagator.h"
4646
#include "Framework/ASoAHelpers.h"
@@ -618,7 +618,7 @@ struct HadNucleiFemto {
618618
template <typename Ttrack>
619619
float computeNSigmaDe(const Ttrack& candidate)
620620
{
621-
float expTPCSignal = o2::tpc::BetheBlochAleph(static_cast<float>(candidate.tpcInnerParam() / constants::physics::MassDeuteron), mBBparamsDe[0], mBBparamsDe[1], mBBparamsDe[2], mBBparamsDe[3], mBBparamsDe[4]);
621+
float expTPCSignal = o2::common::BetheBlochAleph(static_cast<float>(candidate.tpcInnerParam() / constants::physics::MassDeuteron), mBBparamsDe[0], mBBparamsDe[1], mBBparamsDe[2], mBBparamsDe[3], mBBparamsDe[4]);
622622
double resoTPC{expTPCSignal * mBBparamsDe[5]};
623623
return static_cast<float>((candidate.tpcSignal() - expTPCSignal) / resoTPC);
624624
}

PWGCF/Flow/Tasks/flowEsePHe3.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#include "Common/DataModel/TrackSelectionTables.h"
4242

4343
#include "CommonConstants/PhysicsConstants.h"
44-
#include "DataFormatsTPC/BetheBlochAleph.h"
44+
#include "MathUtils/BetheBlochAleph.h"
4545
#include "Framework/ASoA.h"
4646
#include "Framework/ASoAHelpers.h"
4747
#include "Framework/AnalysisDataModel.h"
@@ -438,35 +438,35 @@ struct FlowEsePHe3 {
438438
switch (POI) {
439439
case ese_parameters::kProton: {
440440
const double bgScaling[2]{ese_parameters::Charges[0] * cfgMomentumScalingBetheBloch->get(0u, 0u) / ese_parameters::Masses[0], ese_parameters::Charges[0] * cfgMomentumScalingBetheBloch->get(0u, 1u) / ese_parameters::Masses[0]};
441-
double expBethe{tpc::BetheBlochAleph(static_cast<double>(correctedTpcInnerParam * bgScaling[iC]), cfgBetheBlochParams->get(0u, 0u), cfgBetheBlochParams->get(0u, 1u), cfgBetheBlochParams->get(0u, 2u), cfgBetheBlochParams->get(0u, 3u), cfgBetheBlochParams->get(0u, 4u))};
441+
double expBethe{common::BetheBlochAleph(static_cast<double>(correctedTpcInnerParam * bgScaling[iC]), cfgBetheBlochParams->get(0u, 0u), cfgBetheBlochParams->get(0u, 1u), cfgBetheBlochParams->get(0u, 2u), cfgBetheBlochParams->get(0u, 3u), cfgBetheBlochParams->get(0u, 4u))};
442442
double expSigma{expBethe * cfgBetheBlochParams->get(0u, 5u)};
443443
double nSigmaTPC{static_cast<float>((track.tpcSignal() - expBethe) / expSigma)};
444444
return nSigmaTPC;
445445
}
446446
case ese_parameters::kDeuteron: {
447447
const double bgScaling[2]{ese_parameters::Charges[1] * cfgMomentumScalingBetheBloch->get(1u, 0u) / ese_parameters::Masses[1], ese_parameters::Charges[1] * cfgMomentumScalingBetheBloch->get(1u, 1u) / ese_parameters::Masses[1]};
448-
double expBethe{tpc::BetheBlochAleph(static_cast<double>(correctedTpcInnerParam * bgScaling[iC]), cfgBetheBlochParams->get(1u, 0u), cfgBetheBlochParams->get(1u, 1u), cfgBetheBlochParams->get(1u, 2u), cfgBetheBlochParams->get(1u, 3u), cfgBetheBlochParams->get(1u, 4u))};
448+
double expBethe{common::BetheBlochAleph(static_cast<double>(correctedTpcInnerParam * bgScaling[iC]), cfgBetheBlochParams->get(1u, 0u), cfgBetheBlochParams->get(1u, 1u), cfgBetheBlochParams->get(1u, 2u), cfgBetheBlochParams->get(1u, 3u), cfgBetheBlochParams->get(1u, 4u))};
449449
double expSigma{expBethe * cfgBetheBlochParams->get(1u, 5u)};
450450
double nSigmaTPC{static_cast<float>((track.tpcSignal() - expBethe) / expSigma)};
451451
return nSigmaTPC;
452452
}
453453
case ese_parameters::kTriton: {
454454
const double bgScaling[2]{ese_parameters::Charges[2] * cfgMomentumScalingBetheBloch->get(2u, 0u) / ese_parameters::Masses[2], ese_parameters::Charges[2] * cfgMomentumScalingBetheBloch->get(2u, 1u) / ese_parameters::Masses[2]};
455-
double expBethe{tpc::BetheBlochAleph(static_cast<double>(correctedTpcInnerParam * bgScaling[iC]), cfgBetheBlochParams->get(2u, 0u), cfgBetheBlochParams->get(2u, 1u), cfgBetheBlochParams->get(2u, 2u), cfgBetheBlochParams->get(2u, 3u), cfgBetheBlochParams->get(2u, 4u))};
455+
double expBethe{common::BetheBlochAleph(static_cast<double>(correctedTpcInnerParam * bgScaling[iC]), cfgBetheBlochParams->get(2u, 0u), cfgBetheBlochParams->get(2u, 1u), cfgBetheBlochParams->get(2u, 2u), cfgBetheBlochParams->get(2u, 3u), cfgBetheBlochParams->get(2u, 4u))};
456456
double expSigma{expBethe * cfgBetheBlochParams->get(2u, 5u)};
457457
double nSigmaTPC{static_cast<float>((track.tpcSignal() - expBethe) / expSigma)};
458458
return nSigmaTPC;
459459
}
460460
case ese_parameters::kHe3: {
461461
const double bgScaling[2]{ese_parameters::Charges[3] * cfgMomentumScalingBetheBloch->get(3u, 0u) / ese_parameters::Masses[3], ese_parameters::Charges[3] * cfgMomentumScalingBetheBloch->get(3u, 1u) / ese_parameters::Masses[3]};
462-
double expBethe{tpc::BetheBlochAleph(static_cast<double>(correctedTpcInnerParam * bgScaling[iC]), cfgBetheBlochParams->get(3u, 0u), cfgBetheBlochParams->get(3u, 1u), cfgBetheBlochParams->get(3u, 2u), cfgBetheBlochParams->get(3u, 3u), cfgBetheBlochParams->get(3u, 4u))};
462+
double expBethe{common::BetheBlochAleph(static_cast<double>(correctedTpcInnerParam * bgScaling[iC]), cfgBetheBlochParams->get(3u, 0u), cfgBetheBlochParams->get(3u, 1u), cfgBetheBlochParams->get(3u, 2u), cfgBetheBlochParams->get(3u, 3u), cfgBetheBlochParams->get(3u, 4u))};
463463
double expSigma{expBethe * cfgBetheBlochParams->get(3u, 5u)};
464464
double nSigmaTPC{static_cast<float>((track.tpcSignal() - expBethe) / expSigma)};
465465
return nSigmaTPC;
466466
}
467467
case ese_parameters::kAlpha: {
468468
const double bgScaling[2]{ese_parameters::Charges[4] * cfgMomentumScalingBetheBloch->get(4u, 0u) / ese_parameters::Masses[4], ese_parameters::Charges[4] * cfgMomentumScalingBetheBloch->get(4u, 1u) / ese_parameters::Masses[4]};
469-
double expBethe{tpc::BetheBlochAleph(static_cast<double>(correctedTpcInnerParam * bgScaling[iC]), cfgBetheBlochParams->get(4u, 0u), cfgBetheBlochParams->get(4u, 1u), cfgBetheBlochParams->get(4u, 2u), cfgBetheBlochParams->get(4u, 3u), cfgBetheBlochParams->get(4u, 4u))};
469+
double expBethe{common::BetheBlochAleph(static_cast<double>(correctedTpcInnerParam * bgScaling[iC]), cfgBetheBlochParams->get(4u, 0u), cfgBetheBlochParams->get(4u, 1u), cfgBetheBlochParams->get(4u, 2u), cfgBetheBlochParams->get(4u, 3u), cfgBetheBlochParams->get(4u, 4u))};
470470
double expSigma{expBethe * cfgBetheBlochParams->get(4u, 5u)};
471471
double nSigmaTPC{static_cast<float>((track.tpcSignal() - expBethe) / expSigma)};
472472
return nSigmaTPC;

PWGLF/TableProducer/Common/lfTPCPID.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include "Framework/HistogramRegistry.h"
3636
#include "Framework/RunningWorkflowInfo.h"
3737
#include "Framework/StaticFor.h"
38-
#include "DataFormatsTPC/BetheBlochAleph.h"
38+
#include "MathUtils/BetheBlochAleph.h"
3939
#include "TableHelper.h"
4040

4141
using namespace o2;
@@ -510,9 +510,9 @@ struct lfTpcPid {
510510
corr = params.postCorrectionFun->Eval(track.tpcInnerParam());
511511
}
512512
if (params.isSimple) {
513-
return o2::tpc::BetheBlochAleph(track.tpcInnerParam() * invmass, params.bb1, params.bb2, params.bb3, params.bb4, params.bb5) + corr;
513+
return o2::common::BetheBlochAleph(track.tpcInnerParam() * invmass, params.bb1, params.bb2, params.bb3, params.bb4, params.bb5) + corr;
514514
}
515-
return params.mip * o2::tpc::BetheBlochAleph(track.tpcInnerParam() * invmass, params.bb1, params.bb2, params.bb3, params.bb4, params.bb5) * std::pow(charge, params.exp) + corr;
515+
return params.mip * o2::common::BetheBlochAleph(track.tpcInnerParam() * invmass, params.bb1, params.bb2, params.bb3, params.bb4, params.bb5) * std::pow(charge, params.exp) + corr;
516516
}
517517

518518
template <o2::track::PID::ID id, typename T>

PWGLF/TableProducer/Common/zdcSP.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <CCDB/BasicCCDBManager.h>
2727
#include <DataFormatsParameters/GRPMagField.h>
2828
#include <DataFormatsParameters/GRPObject.h>
29-
#include <DataFormatsTPC/BetheBlochAleph.h>
29+
#include <MathUtils/BetheBlochAleph.h>
3030
#include <DetectorsBase/GeometryManager.h>
3131
#include <DetectorsBase/Propagator.h>
3232
#include <Framework/ASoAHelpers.h>

0 commit comments

Comments
 (0)