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
12 changes: 6 additions & 6 deletions PWGCF/Femto3D/Tasks/femto3dPairTaskMC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "PWGCF/Femto3D/Core/femto3dPairTask.h"
#include "PWGCF/Femto3D/DataModel/singletrackselector.h"
#include "TLorentzVector.h"

Check failure on line 25 in PWGCF/Femto3D/Tasks/femto3dPairTaskMC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.

#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
Expand Down Expand Up @@ -162,13 +162,13 @@
int N = _dcaBinning.value[0]; // number of bins -- must be odd otherwise will be increased by 1
if (N % 2 != 1)
N += 1;

std::unique_ptr<double[]> dca_bins;
if (static_cast<int>(_dcaBinning.value[2]) != 1.0) {
dca_bins = calc_var_bins(N + 1, _dcaBinning.value[1], static_cast<int>(_dcaBinning.value[2]));
} else {
dca_bins = calc_const_bins(N, -_dcaBinning.value[1], _dcaBinning.value[1]);
}
if (static_cast<int>(_dcaBinning.value[2]) != 1.0) {
dca_bins = calc_var_bins(N + 1, _dcaBinning.value[1], static_cast<int>(_dcaBinning.value[2]));
} else {
dca_bins = calc_const_bins(N, -_dcaBinning.value[1], _dcaBinning.value[1]);
}
auto const_bins = calc_const_bins(100, 0., 5.0);

for (unsigned int i = 0; i < _centBins.value.size() - 1; i++) {
Expand Down Expand Up @@ -275,8 +275,8 @@
template <typename Type>
void fillEtaPhi(Type const& tracks1, Type const& tracks2, unsigned int centBin)
{ // template for particles from the same collision non-identical
for (auto ii : tracks1) {

Check failure on line 278 in PWGCF/Femto3D/Tasks/femto3dPairTaskMC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
for (auto iii : tracks2) {

Check failure on line 279 in PWGCF/Femto3D/Tasks/femto3dPairTaskMC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.

Pair->SetPair(ii, iii);
float pair_kT = Pair->GetKt();
Expand Down Expand Up @@ -315,12 +315,12 @@
DoubleTrack_ME_histos[centBin][kTbin]->Fill(_dPhiMode.value == 0 ? Pair->GetPhiStarDiff(_radiusTPC) : Pair->GetAvgPhiStarDiff(), Pair->GetEtaDiff());
AvgSep_ME_histos[centBin][kTbin]->Fill(Pair->GetAvgSep());

if (abs(ii->pdgCode()) != _particlePDG_1.value || abs(iii->pdgCode()) != _particlePDG_2.value)

Check failure on line 318 in PWGCF/Femto3D/Tasks/femto3dPairTaskMC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

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

TLorentzVector first4momentumGen;

Check failure on line 321 in PWGCF/Femto3D/Tasks/femto3dPairTaskMC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
first4momentumGen.SetPtEtaPhiM(ii->pt_MC(), ii->eta_MC(), ii->phi_MC(), particle_mass(_particlePDG_1));
TLorentzVector second4momentumGen;

Check failure on line 323 in PWGCF/Femto3D/Tasks/femto3dPairTaskMC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
second4momentumGen.SetPtEtaPhiM(iii->pt_MC(), iii->eta_MC(), iii->phi_MC(), particle_mass(_particlePDG_2));

Resolution_histos[centBin][kTbin]->Fill(o2::aod::singletrackselector::GetKstarFrom4vectors(first4momentumGen, second4momentumGen, IsIdentical), Pair->GetKstar());
Expand Down Expand Up @@ -371,10 +371,10 @@
if (std::fabs(track.dcaXY()) > _dcaXY.value[0] + _dcaXY.value[1] * std::pow(track.pt(), _dcaXY.value[2]) || std::fabs(track.dcaZ()) > _dcaZ.value[0] + _dcaZ.value[1] * std::pow(track.pt(), _dcaZ.value[2]))
continue;

trackPDG = abs(track.pdgCode());

Check failure on line 374 in PWGCF/Femto3D/Tasks/femto3dPairTaskMC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

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

Purity_histos_1[centBin][0]->Fill(track.p());
if (trackPDG == 11 || trackPDG == 13 || trackPDG == 211 || trackPDG == 321 || trackPDG == 2212 || trackPDG == 1000010020)

Check failure on line 377 in PWGCF/Femto3D/Tasks/femto3dPairTaskMC.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.
Purity_histos_1[centBin][trackPDG]->Fill(track.p());

selectedtracks_1[track.singleCollSelId()].push_back(std::make_shared<decltype(track)>(track)); // filling the map: eventID <-> selected particles1
Expand All @@ -392,10 +392,10 @@
if (std::fabs(track.dcaXY()) > _dcaXY.value[0] + _dcaXY.value[1] * std::pow(track.pt(), _dcaXY.value[2]) || std::fabs(track.dcaZ()) > _dcaZ.value[0] + _dcaZ.value[1] * std::pow(track.pt(), _dcaZ.value[2]))
continue;

trackPDG = abs(track.pdgCode());

Check failure on line 395 in PWGCF/Femto3D/Tasks/femto3dPairTaskMC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

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

Purity_histos_2[centBin][0]->Fill(track.p());
if (trackPDG == 11 || trackPDG == 13 || trackPDG == 211 || trackPDG == 321 || trackPDG == 2212 || trackPDG == 1000010020)

Check failure on line 398 in PWGCF/Femto3D/Tasks/femto3dPairTaskMC.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.
Purity_histos_2[centBin][trackPDG]->Fill(track.p());

selectedtracks_2[track.singleCollSelId()].push_back(std::make_shared<decltype(track)>(track)); // filling the map: eventID <-> selected particles2
Expand Down
Loading