Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Common/Core/PID/TPCPIDResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#ifndef COMMON_CORE_PID_TPCPIDRESPONSE_H_
#define COMMON_CORE_PID_TPCPIDRESPONSE_H_

#include <DataFormatsTPC/BetheBlochAleph.h>
#include <MathUtils/BetheBlochAleph.h>
#include <Framework/Logger.h>
#include <ReconstructionDataFormats/PID.h>

Expand Down Expand Up @@ -116,7 +116,7 @@
if (!track.hasTPC()) {
return -999.f;
}
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);
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);
return bethe >= 0.f ? bethe : -999.f;
}

Expand Down Expand Up @@ -145,12 +145,12 @@
const double p = track.tpcInnerParam();
const double mass = o2::track::pid_constants::sMasses[id];
const double bg = p / mass;
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);
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);
const double relReso = GetRelativeResolutiondEdx(p, mass, o2::track::pid_constants::sCharges[id], mResolutionParams[3]);

const std::vector<double> values{1.f / dEdx, track.tgl(), std::sqrt(ncl), relReso, track.signed1Pt(), multTPC / mMultNormalization};

const float reso = sqrt(pow(mResolutionParams[0], 2) * values[0] + pow(mResolutionParams[1], 2) * (values[2] * mResolutionParams[5]) * pow(values[0] / sqrt(1 + pow(values[1], 2)), mResolutionParams[2]) + values[2] * pow(values[3], 2) + pow(mResolutionParams[4] * values[4], 2) + pow(values[5] * mResolutionParams[6], 2) + pow(values[5] * (values[0] / sqrt(1 + pow(values[1], 2))) * mResolutionParams[7], 2)) * dEdx * mMIP;

Check failure on line 153 in Common/Core/PID/TPCPIDResponse.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
reso >= 0.f ? resolution = reso : resolution = -999.f;
}
return resolution;
Expand Down Expand Up @@ -210,10 +210,10 @@
inline float Response::GetRelativeResolutiondEdx(const float p, const float mass, const float charge, const float resol) const
{
const float bg = p / mass;
const float dEdx = o2::tpc::BetheBlochAleph(bg, mBetheBlochParams[0], mBetheBlochParams[1], mBetheBlochParams[2], mBetheBlochParams[3], mBetheBlochParams[4]) * std::pow(charge, mChargeFactor);
const float dEdx = o2::common::BetheBlochAleph(bg, mBetheBlochParams[0], mBetheBlochParams[1], mBetheBlochParams[2], mBetheBlochParams[3], mBetheBlochParams[4]) * std::pow(charge, mChargeFactor);
const float deltaP = resol * std::sqrt(dEdx);
const float bgDelta = p * (1 + deltaP) / mass;
const float dEdx2 = o2::tpc::BetheBlochAleph(bgDelta, mBetheBlochParams[0], mBetheBlochParams[1], mBetheBlochParams[2], mBetheBlochParams[3], mBetheBlochParams[4]) * std::pow(charge, mChargeFactor);
const float dEdx2 = o2::common::BetheBlochAleph(bgDelta, mBetheBlochParams[0], mBetheBlochParams[1], mBetheBlochParams[2], mBetheBlochParams[3], mBetheBlochParams[4]) * std::pow(charge, mChargeFactor);
const float deltaRel = std::abs(dEdx2 - dEdx) / dEdx;
return deltaRel;
}
Expand Down
6 changes: 3 additions & 3 deletions DPG/Tasks/AOTTrack/qaEventTrackLite.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in DPG/Tasks/AOTTrack/qaEventTrackLite.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -30,7 +30,7 @@
#include "Common/DataModel/TrackSelectionTables.h"
#include "Common/Core/TrackSelection.h"
#include "Common/Core/TrackSelectionDefaults.h"
#include "DataFormatsTPC/BetheBlochAleph.h"
#include "MathUtils/BetheBlochAleph.h"
#include "ReconstructionDataFormats/PID.h"

#include "TF1.h"
Expand Down Expand Up @@ -73,8 +73,8 @@
Configurable<float> chi2TpcMin{"chi2TpcMin", -1001.f, "Max TPC chi2"};
Configurable<float> chi2TpcMax{"chi2TpcMax", 1000.f, "Max TPC chi2"};
Configurable<std::string> tpcSplinesPeriod{"tpcSplinesPeriod", std::string(""), "Period of used TPC dEdx splines"};
Configurable<bool> b_tpcResProton{"b_tpcResProton", false, "Do TPC dEdx residuals around proton hypothesis"};

Check failure on line 76 in DPG/Tasks/AOTTrack/qaEventTrackLite.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<bool> b_tpcResKaon{"b_tpcResKaon", false, "Do TPC dEdx residuals around kaon hypothesis"};

Check failure on line 77 in DPG/Tasks/AOTTrack/qaEventTrackLite.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<bool> b_tpcResPion{"b_tpcResPion", false, "Do TPC dEdx residuals around pion hypothesis"};
// TOF selections
Configurable<float> chi2TofMin{"chi2TofMin", -1001.f, "Max TOF chi2"};
Expand Down Expand Up @@ -138,11 +138,11 @@
///
/// From A. Kalteyer:
/// const float bethe = mMIP
/// * o2::tpc::BetheBlochAleph(track.tpcInnerParam() / o2::track::pid_constants::sMasses[id]
/// * o2::common::BetheBlochAleph(track.tpcInnerParam() / o2::track::pid_constants::sMasses[id]
/// , mBetheBlochParams[0], mBetheBlochParams[1], mBetheBlochParams[2], mBetheBlochParams[3], mBetheBlochParams[4])
/// * std::pow((float)o2::track::pid_constants::sCharges[id], mChargeFactor);
///
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.;
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.;
}
void setUpBetheBlockAleph(std::string str_case)
{
Expand Down Expand Up @@ -404,7 +404,7 @@
histos.fill(HIST("Tracks/TPC/tpcNClsFoundvsPt"), track.pt(), track.tpcNClsFound());
histos.fill(HIST("Tracks/TPC/tpcCrossedRowsvsPt"), track.pt(), track.tpcNClsCrossedRows());
histos.fill(HIST("Tracks/TPC/tpcCrossedRowsOverFindableClsvsPt"), track.pt(), track.tpcCrossedRowsOverFindableCls());
const double p = track.pt() / (sin(2 * atan2(1, exp(track.eta()))));

Check failure on line 407 in DPG/Tasks/AOTTrack/qaEventTrackLite.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
histos.fill(HIST("Tracks/TPC/dEdxvsP"), p, track.tpcSignal());
histos.fill(HIST("Tracks/TPC/dEdxvsPvsEta"), p, track.eta(), track.tpcSignal());
if (betheBlock.initBBok) {
Expand Down Expand Up @@ -623,8 +623,8 @@
} else if (pdgCodeSel != 0) {
return false;
}
const int abspdgcode = abs(pdgcode);

Check failure on line 626 in DPG/Tasks/AOTTrack/qaEventTrackLite.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
if (pdgCodeSelMode == 1 || pdgCodeSelMode == 2) {

Check failure on line 627 in DPG/Tasks/AOTTrack/qaEventTrackLite.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.

Check failure on line 627 in DPG/Tasks/AOTTrack/qaEventTrackLite.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
switch (abspdgcode) {
case 11: // electron
case 13: // muon
Expand All @@ -634,7 +634,7 @@
return true;
}

if (pdgCodeSelMode == 2) {

Check failure on line 637 in DPG/Tasks/AOTTrack/qaEventTrackLite.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.

Check failure on line 637 in DPG/Tasks/AOTTrack/qaEventTrackLite.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
switch (abspdgcode) {
case 3222: // Σ+
case 3112: // Σ−
Expand Down
4 changes: 2 additions & 2 deletions EventFiltering/PWGHF/HFFilterHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <CommonConstants/MathConstants.h>
#include <CommonConstants/PhysicsConstants.h>
#include <DCAFitter/DCAFitterN.h>
#include <DataFormatsTPC/BetheBlochAleph.h>
#include <MathUtils/BetheBlochAleph.h>
#include <DetectorsBase/Propagator.h>
#include <Framework/ASoA.h>
#include <Framework/AnalysisDataModel.h>
Expand Down Expand Up @@ -2513,7 +2513,7 @@ inline float HfFilterHelper::getTPCSplineCalib(const float tpcPin, const float d
}

auto bgScaling = 1 / mMassPar;
double expBethe = tpc::BetheBlochAleph(static_cast<double>(tpcPin * bgScaling), mBetheBlochPiKaPrDe[pidSpecies][0], mBetheBlochPiKaPrDe[pidSpecies][1], mBetheBlochPiKaPrDe[pidSpecies][2], mBetheBlochPiKaPrDe[pidSpecies][3], mBetheBlochPiKaPrDe[pidSpecies][4]);
double expBethe = common::BetheBlochAleph(static_cast<double>(tpcPin * bgScaling), mBetheBlochPiKaPrDe[pidSpecies][0], mBetheBlochPiKaPrDe[pidSpecies][1], mBetheBlochPiKaPrDe[pidSpecies][2], mBetheBlochPiKaPrDe[pidSpecies][3], mBetheBlochPiKaPrDe[pidSpecies][4]);
double expSigma = expBethe * mBetheBlochPiKaPrDe[pidSpecies][5];
return static_cast<float>((dEdx - expBethe) / expSigma);
}
Expand Down
2 changes: 1 addition & 1 deletion EventFiltering/PWGLF/filterdoublephi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "CCDB/BasicCCDBManager.h"
#include "CCDB/CcdbApi.h"
#include "CommonConstants/MathConstants.h"
#include "DataFormatsTPC/BetheBlochAleph.h"
#include "MathUtils/BetheBlochAleph.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/AnalysisTask.h"
Expand Down
4 changes: 2 additions & 2 deletions EventFiltering/PWGLF/filterf1proton.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include "CommonConstants/PhysicsConstants.h"
#include "DataFormatsParameters/GRPMagField.h"
#include "DataFormatsParameters/GRPObject.h"
#include "DataFormatsTPC/BetheBlochAleph.h"
#include "MathUtils/BetheBlochAleph.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/AnalysisTask.h"
Expand Down Expand Up @@ -298,7 +298,7 @@ struct filterf1proton {
template <typename T>
double updatePID(T const& track, double bgScaling, std::vector<double> BB)
{
double expBethe = tpc::BetheBlochAleph(static_cast<double>(track.tpcInnerParam() * bgScaling), BB[0], BB[1], BB[2], BB[3], BB[4]);
double expBethe = common::BetheBlochAleph(static_cast<double>(track.tpcInnerParam() * bgScaling), BB[0], BB[1], BB[2], BB[3], BB[4]);
double expSigma = expBethe * BB[5];
return static_cast<float>((track.tpcSignal() - expBethe) / expSigma);
}
Expand Down
4 changes: 2 additions & 2 deletions EventFiltering/PWGLF/nucleiFilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "DataFormatsParameters/GRPMagField.h"
#include "DataFormatsParameters/GRPObject.h"
#include "DataFormatsTOF/ParameterContainers.h"
#include "DataFormatsTPC/BetheBlochAleph.h"
#include "MathUtils/BetheBlochAleph.h"
#include "DetectorsBase/GeometryManager.h"
#include "DetectorsBase/Propagator.h"
#include "Framework/ASoAHelpers.h"
Expand Down Expand Up @@ -311,7 +311,7 @@ struct nucleiFilter {

auto getNsigma = [&](const auto& track, int iN, int iC) {
float fixTPCrigidity{(cfgFixTPCinnerParam && (track.pidForTracking() == track::PID::Helium3 || track.pidForTracking() == track::PID::Alpha)) ? 0.5f : 1.f};
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))};
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))};
double expSigma{expBethe * cfgBetheBlochParams->get(iN, 5u)};
return static_cast<float>((track.tpcSignal() - expBethe) / expSigma);
};
Expand Down
4 changes: 2 additions & 2 deletions PWGCF/Femto/FemtoNuclei/TableProducer/HadNucleiFemto.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include "CCDB/BasicCCDBManager.h"
#include "DataFormatsParameters/GRPMagField.h"
#include "DataFormatsParameters/GRPObject.h"
#include "DataFormatsTPC/BetheBlochAleph.h"
#include "MathUtils/BetheBlochAleph.h"
#include "DetectorsBase/GeometryManager.h"
#include "DetectorsBase/Propagator.h"
#include "Framework/ASoAHelpers.h"
Expand Down Expand Up @@ -618,7 +618,7 @@ struct HadNucleiFemto {
template <typename Ttrack>
float computeNSigmaDe(const Ttrack& candidate)
{
float expTPCSignal = o2::tpc::BetheBlochAleph(static_cast<float>(candidate.tpcInnerParam() / constants::physics::MassDeuteron), mBBparamsDe[0], mBBparamsDe[1], mBBparamsDe[2], mBBparamsDe[3], mBBparamsDe[4]);
float expTPCSignal = o2::common::BetheBlochAleph(static_cast<float>(candidate.tpcInnerParam() / constants::physics::MassDeuteron), mBBparamsDe[0], mBBparamsDe[1], mBBparamsDe[2], mBBparamsDe[3], mBBparamsDe[4]);
double resoTPC{expTPCSignal * mBBparamsDe[5]};
return static_cast<float>((candidate.tpcSignal() - expTPCSignal) / resoTPC);
}
Expand Down
12 changes: 6 additions & 6 deletions PWGCF/Flow/Tasks/flowEsePHe3.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include "Common/DataModel/TrackSelectionTables.h"

#include "CommonConstants/PhysicsConstants.h"
#include "DataFormatsTPC/BetheBlochAleph.h"
#include "MathUtils/BetheBlochAleph.h"
#include "Framework/ASoA.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/AnalysisDataModel.h"
Expand Down Expand Up @@ -438,35 +438,35 @@ struct FlowEsePHe3 {
switch (POI) {
case ese_parameters::kProton: {
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]};
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))};
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))};
double expSigma{expBethe * cfgBetheBlochParams->get(0u, 5u)};
double nSigmaTPC{static_cast<float>((track.tpcSignal() - expBethe) / expSigma)};
return nSigmaTPC;
}
case ese_parameters::kDeuteron: {
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]};
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))};
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))};
double expSigma{expBethe * cfgBetheBlochParams->get(1u, 5u)};
double nSigmaTPC{static_cast<float>((track.tpcSignal() - expBethe) / expSigma)};
return nSigmaTPC;
}
case ese_parameters::kTriton: {
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]};
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))};
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))};
double expSigma{expBethe * cfgBetheBlochParams->get(2u, 5u)};
double nSigmaTPC{static_cast<float>((track.tpcSignal() - expBethe) / expSigma)};
return nSigmaTPC;
}
case ese_parameters::kHe3: {
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]};
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))};
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))};
double expSigma{expBethe * cfgBetheBlochParams->get(3u, 5u)};
double nSigmaTPC{static_cast<float>((track.tpcSignal() - expBethe) / expSigma)};
return nSigmaTPC;
}
case ese_parameters::kAlpha: {
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]};
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))};
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))};
double expSigma{expBethe * cfgBetheBlochParams->get(4u, 5u)};
double nSigmaTPC{static_cast<float>((track.tpcSignal() - expBethe) / expSigma)};
return nSigmaTPC;
Expand Down
6 changes: 3 additions & 3 deletions PWGLF/TableProducer/Common/lfTPCPID.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include "Framework/HistogramRegistry.h"
#include "Framework/RunningWorkflowInfo.h"
#include "Framework/StaticFor.h"
#include "DataFormatsTPC/BetheBlochAleph.h"
#include "MathUtils/BetheBlochAleph.h"
#include "TableHelper.h"

using namespace o2;
Expand Down Expand Up @@ -510,9 +510,9 @@ struct lfTpcPid {
corr = params.postCorrectionFun->Eval(track.tpcInnerParam());
}
if (params.isSimple) {
return o2::tpc::BetheBlochAleph(track.tpcInnerParam() * invmass, params.bb1, params.bb2, params.bb3, params.bb4, params.bb5) + corr;
return o2::common::BetheBlochAleph(track.tpcInnerParam() * invmass, params.bb1, params.bb2, params.bb3, params.bb4, params.bb5) + corr;
}
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;
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;
}

template <o2::track::PID::ID id, typename T>
Expand Down
2 changes: 1 addition & 1 deletion PWGLF/TableProducer/Common/zdcSP.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <CCDB/BasicCCDBManager.h>
#include <DataFormatsParameters/GRPMagField.h>
#include <DataFormatsParameters/GRPObject.h>
#include <DataFormatsTPC/BetheBlochAleph.h>
#include <MathUtils/BetheBlochAleph.h>
#include <DetectorsBase/GeometryManager.h>
#include <DetectorsBase/Propagator.h>
#include <Framework/ASoAHelpers.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ struct LfTreeCreatorClusterStudies {
{
bool heliumPID = candidate.pidForTracking() == o2::track::PID::Helium3 || candidate.pidForTracking() == o2::track::PID::Alpha;
float correctedTPCinnerParam = (heliumPID && he3setting_compensatePIDinTracking) ? candidate.tpcInnerParam() / 2.f : candidate.tpcInnerParam();
float expTPCSignal = o2::tpc::BetheBlochAleph(static_cast<float>(correctedTPCinnerParam * 2.f / constants::physics::MassHelium3), m_BBparamsHe[0], m_BBparamsHe[1], m_BBparamsHe[2], m_BBparamsHe[3], m_BBparamsHe[4]);
float expTPCSignal = o2::common::BetheBlochAleph(static_cast<float>(correctedTPCinnerParam * 2.f / constants::physics::MassHelium3), m_BBparamsHe[0], m_BBparamsHe[1], m_BBparamsHe[2], m_BBparamsHe[3], m_BBparamsHe[4]);
double resoTPC{expTPCSignal * m_BBparamsHe[5]};
return static_cast<float>((candidate.tpcSignal() - expTPCSignal) / resoTPC);
}
Expand Down
6 changes: 3 additions & 3 deletions PWGLF/TableProducer/Nuspex/ebyeMaker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "DCAFitter/DCAFitterN.h"
#include "DataFormatsParameters/GRPMagField.h"
#include "DataFormatsParameters/GRPObject.h"
#include "DataFormatsTPC/BetheBlochAleph.h"
#include "MathUtils/BetheBlochAleph.h"
#include "DetectorsBase/GeometryManager.h"
#include "DetectorsBase/Propagator.h"
#include "Framework/ASoAHelpers.h"
Expand Down Expand Up @@ -409,7 +409,7 @@ struct EbyeMaker {
{
if ((doprocessMiniRun2 || doprocessMiniMcRun2) && track.hasITS()) {
auto extra = trackExtraRun2.rawIteratorAt(track.globalIndex());
double expBethe{tpc::BetheBlochAleph(static_cast<double>(track.p() / kPartMass[0]), cfgBetheBlochParamsITS->get("p0"), cfgBetheBlochParamsITS->get("p1"), cfgBetheBlochParamsITS->get("p2"), cfgBetheBlochParamsITS->get("p3"), cfgBetheBlochParamsITS->get("p4"))};
double expBethe{common::BetheBlochAleph(static_cast<double>(track.p() / kPartMass[0]), cfgBetheBlochParamsITS->get("p0"), cfgBetheBlochParamsITS->get("p1"), cfgBetheBlochParamsITS->get("p2"), cfgBetheBlochParamsITS->get("p3"), cfgBetheBlochParamsITS->get("p4"))};
double expSigma{expBethe * cfgBetheBlochParamsITS->get("resolution")};
auto nSigmaITS = static_cast<float>((extra.itsSignal() - expBethe) / expSigma);
return std::make_pair(extra.itsSignal(), nSigmaITS);
Expand All @@ -420,7 +420,7 @@ struct EbyeMaker {
template <class T>
float getCustomTPCPID(T const& track, float const mass, int const ip = 0)
{
double expBethe{tpc::BetheBlochAleph(static_cast<double>(track.tpcInnerParam() / mass), cfgBetheBlochParams->get(ip, "p0"), cfgBetheBlochParams->get(ip, "p1"), cfgBetheBlochParams->get(ip, "p2"), cfgBetheBlochParams->get(ip, "p3"), cfgBetheBlochParams->get(ip, "p4"))};
double expBethe{common::BetheBlochAleph(static_cast<double>(track.tpcInnerParam() / mass), cfgBetheBlochParams->get(ip, "p0"), cfgBetheBlochParams->get(ip, "p1"), cfgBetheBlochParams->get(ip, "p2"), cfgBetheBlochParams->get(ip, "p3"), cfgBetheBlochParams->get(ip, "p4"))};
double expSigma{expBethe * cfgBetheBlochParams->get(ip, "resolution")};
return static_cast<float>((track.tpcSignal() - expBethe) / expSigma);
}
Expand Down
Loading
Loading