Skip to content
Merged
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
27 changes: 13 additions & 14 deletions PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@
std::array<float, 3> momDe = {99.f, 99.f, 99.f};
std::array<float, 3> momPi = {99.f, 99.f, 99.f};


float signDe = 1.f;
float signPi = 1.f;
float invMass = -10.f;
Expand Down Expand Up @@ -288,7 +287,7 @@
for (int i = 0; i < numParticles; i++) {
mBBparamsDe[i] = settingBetheBlochParams->get("De", Form("p%i", i));
}
mBBparamsDe[5] = settingBetheBlochParams->get("De", "resolution");
mBBparamsDe[5] = settingBetheBlochParams->get("De", "resolution");

std::vector<std::string> selectionLabels = {"All", "Track selection", "PID"};
for (int i = 0; i < Selections::kAll; i++) {
Expand Down Expand Up @@ -403,7 +402,7 @@
auto tpcNSigmaPi = candidate.tpcNSigmaPi();
mQaRegistry.fill(HIST("h2NsigmaPiTPC_preselection"), candidate.tpcInnerParam(), tpcNSigmaPi);
if (std::abs(candidate.pt()) < settingCutPiptMin || std::abs(candidate.pt()) > settingCutPiptMax)
return false;
return false;
if (candidate.hasTOF() && candidate.tpcInnerParam() > settingCutPinMinTOFPi) {
auto tofNSigmaPi = candidate.tofNSigmaPi();
auto combNsigma = std::sqrt(tofNSigmaPi * tofNSigmaPi + tpcNSigmaPi * tpcNSigmaPi);
Expand All @@ -415,12 +414,12 @@
if (combNsigma > settingCutNsigmaTOFTPCPi) {
return false;
}
mQaRegistry.fill(HIST("h2NsigmaPiTPC"), candidate.sign() *candidate.pt(), tpcNSigmaPi);
mQaRegistry.fill(HIST("h2NsigmaPiTOF"), candidate.sign() *candidate.pt(), tofNSigmaPi);
mQaRegistry.fill(HIST("h2NsigmaPiComb"), candidate.sign() *candidate.pt(), combNsigma);
mQaRegistry.fill(HIST("h2NsigmaPiTPC"), candidate.sign() * candidate.pt(), tpcNSigmaPi);
mQaRegistry.fill(HIST("h2NsigmaPiTOF"), candidate.sign() * candidate.pt(), tofNSigmaPi);
mQaRegistry.fill(HIST("h2NsigmaPiComb"), candidate.sign() * candidate.pt(), combNsigma);
return true;
} else if (std::abs(tpcNSigmaPi) < settingCutNsigmaTPCPi) {
mQaRegistry.fill(HIST("h2NsigmaPiTPC"), candidate.sign() *candidate.pt(), tpcNSigmaPi);
mQaRegistry.fill(HIST("h2NsigmaPiTPC"), candidate.sign() * candidate.pt(), tpcNSigmaPi);
return true;
}
return false;
Expand All @@ -444,16 +443,16 @@
return false;
}
float tpcNSigmaDe;
if(settingUseBBcomputeDeNsigma) {
tpcNSigmaDe = computeNSigmaDe(candidate);
}else{
tpcNSigmaDe = candidate.tpcNSigmaDe();
if (settingUseBBcomputeDeNsigma) {
tpcNSigmaDe = computeNSigmaDe(candidate);
} else {
tpcNSigmaDe = candidate.tpcNSigmaDe();
}

mQaRegistry.fill(HIST("h2NsigmaDeTPC_preselection"), candidate.sign() * candidate.pt(), tpcNSigmaDe);
mQaRegistry.fill(HIST("h2NsigmaDeTPC_preselecComp"), candidate.sign() * candidate.pt(), candidate.tpcNSigmaDe());
if (std::abs(candidate.pt()) < settingCutDeptMin || std::abs(candidate.pt()) > settingCutDeptMax)
return false;
return false;
if (candidate.hasTOF() && candidate.tpcInnerParam() > settingCutPinMinTOFITSDe) {
auto tofNSigmaDe = candidate.tofNSigmaDe();
auto combNsigma = std::sqrt(tofNSigmaDe * tofNSigmaDe + tpcNSigmaDe * tpcNSigmaDe);
Expand All @@ -475,7 +474,7 @@
}
mQaRegistry.fill(HIST("h2NsigmaDeTPC"), candidate.sign() * candidate.pt(), tpcNSigmaDe);
mQaRegistry.fill(HIST("h2NSigmaDeITS"), candidate.sign() * candidate.pt(), itsnSigmaDe);
//mQaRegistry.fill(HIST("h2NsigmaDeComb"), candidate.sign() * candidate.pt(), combNsigma);
// mQaRegistry.fill(HIST("h2NsigmaDeComb"), candidate.sign() * candidate.pt(), combNsigma);
mQaRegistry.fill(HIST("h2dEdxDecandidates"), candidate.sign() * tpcInnerParam, candidate.tpcSignal());
return true;
}
Expand Down Expand Up @@ -727,10 +726,10 @@

double computePrTPCnsig(double InnerParamTPCHad, double SignalTPCHad)
{
double m_BBparamsProton[6] = {-54.42066571222577, 0.2857381250239097, 1.247140602468868, 0.6297483918147729, 2.985438833884555, 0.09};

Check failure on line 729 in PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.

float TPCinnerParam = InnerParamTPCHad;

Check failure on line 731 in PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
float expTPCSignal = o2::tpc::BetheBlochAleph((TPCinnerParam / 0.9382721), m_BBparamsProton[0], m_BBparamsProton[1], m_BBparamsProton[2], m_BBparamsProton[3], m_BBparamsProton[4]);

Check failure on line 732 in PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-mass]

Avoid hard-coded particle masses. Use o2::constants::physics::Mass... instead.
double resoTPC{expTPCSignal * m_BBparamsProton[5]};
return ((SignalTPCHad - expTPCSignal) / resoTPC);
}
Expand All @@ -741,7 +740,7 @@
const float kp0 = 1.22204e-02;
const float kp1 = 7.48467e-01;

double fSigmaTOFMassHad = (kp0 * TMath::Exp(kp1 * TMath::Abs(ptHad))) * fExpTOFMassHad;

Check failure on line 743 in PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
double fNSigmaTOFHad = (MassTOFHad - fExpTOFMassHad) / fSigmaTOFMassHad;
return fNSigmaTOFHad;
}
Expand All @@ -751,8 +750,8 @@
constexpr double massDe = o2::constants::physics::MassDeuteron;
constexpr double massHad = o2::constants::physics::MassPiPlus;

const ROOT::Math::PtEtaPhiMVector De(std::abs(piDecand.recoPtDe()), piDecand.recoEtaDe(), piDecand.recoPhiDe(), massDe);

Check failure on line 753 in PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
const ROOT::Math::PtEtaPhiMVector Had(std::abs(piDecand.recoPtPi()), piDecand.recoEtaPi(), piDecand.recoPhiPi(), massHad);

Check failure on line 754 in PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
const ROOT::Math::PtEtaPhiMVector trackSum = De + Had;

const float beta = trackSum.Beta();
Expand All @@ -775,12 +774,12 @@
{
double PrTPCnsigma = computePrTPCnsig(piDecand.momPiTPC, piDecand.tpcSignalPi);
double PrTOFnsigma = tofNSigmaCalculation(piDecand.massTOFPi, piDecand.recoPtPi());
if (abs(PrTPCnsigma) < settingCutNsigTPCPrMin)

Check failure on line 777 in PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return;
if (abs(PrTOFnsigma) < settingCutNsigTOFPrMin)

Check failure on line 779 in PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return;
float DeDCAxyMin = 0.015 + 0.0305 / TMath::Power(piDecand.recoPtDe(), 1.1);

Check failure on line 781 in PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
if (abs(piDecand.dcaxyDe) > DeDCAxyMin || abs(piDecand.dcazDe) > settingCutDeDCAzMin || abs(piDecand.dcaxyPi) > settingCutPiDCAxyMin || abs(piDecand.dcazPi) > settingCutPiDCAzMin)

Check failure on line 782 in PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return;

fillHistograms(piDecand);
Expand Down
Loading