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
29 changes: 17 additions & 12 deletions PWGLF/Tasks/Resonances/phiOO.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include <Framework/runDataProcessing.h>

#include "TRandom.h"
#include <TLorentzVector.h>

Check failure on line 41 in PWGLF/Tasks/Resonances/phiOO.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 <TMath.h>
#include <TMathBase.h>
#include <TVector2.h>
Expand All @@ -50,7 +50,7 @@
#include <cmath>
#include <cstddef>
#include <cstdlib>
#include <iostream>

Check failure on line 53 in PWGLF/Tasks/Resonances/phiOO.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <string>
#include <utility>
#include <vector>
Expand Down Expand Up @@ -78,10 +78,6 @@
Configurable<bool> cfg_Event_OccupancyCut{"cfg_Event_OccupancyCut", true, "Occupancy border cut"};
Configurable<float> cfg_Event_MaxOccupancy{"cfg_Event_MaxOccupancy", 1, "Max TPC Occupancy"};

ConfigurableAxis cfg_bins_Cent{"cfg_bins_Cent", {VARIABLE_WIDTH, 0.0, 1.0, 5.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 110.0}, "Binning of the centrality axis"};
ConfigurableAxis cfg_bins_MixVtx{"cfg_bins_MixVtx", {VARIABLE_WIDTH, -10.0f, -8.f, -6.f, -4.f, -2.f, 0.f, 2.f, 4.f, 6.f, 8.f, 10.f}, "Mixing bins - z-vertex"};
ConfigurableAxis cfg_bins_MixMult{"cfg_bins_MixMult", {VARIABLE_WIDTH, 0.0f, 1.0f, 5.0f, 10.0f, 20.0f, 30.0f, 40.0f, 50.0f, 60.0f, 70.0f, 80.0f}, "Mixing bins - z-vertex"};

// Track configurables
Configurable<std::string> cfg_Track_Sel{"cfg_Track_Sel", "globalTracks", "set track selections"};
Configurable<float> cfg_Track_MinPt{"cfg_Track_MinPt", 0.15, "set track min pT"};
Expand Down Expand Up @@ -120,28 +116,37 @@
Configurable<bool> cfg_Event_CutQA{"cfg_Event_CutsQA", true, "Enables Track QA plots"};
Configurable<bool> cfg_Track_CutQA{"cfg_Track_CutsQA", true, "Enables Track QA plots"};

// Configurables for axis
ConfigurableAxis binsDCAz{"binsDCAz", {40, -0.2, 0.2}, ""};
ConfigurableAxis binsDCAxy{"binsDCAxy", {40, -0.2, 0.2}, ""};
ConfigurableAxis cfg_bins_Cent{"cfg_bins_Cent", {VARIABLE_WIDTH, 0.0, 1.0, 5.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 110.0}, "Binning of the centrality axis"};
ConfigurableAxis cfg_bins_MixVtx{"cfg_bins_MixVtx", {VARIABLE_WIDTH, -10.0f, -8.f, -6.f, -4.f, -2.f, 0.f, 2.f, 4.f, 6.f, 8.f, 10.f}, "Mixing bins - z-vertex"};
ConfigurableAxis cfg_bins_MixMult{"cfg_bins_MixMult", {VARIABLE_WIDTH, 0.0f, 1.0f, 5.0f, 10.0f, 20.0f, 30.0f, 40.0f, 50.0f, 60.0f, 70.0f, 80.0f}, "Mixing bins - z-vertex"};

void init(o2::framework::InitContext&)
{
const AxisSpec MinvAxis = {cfg_Pair_MinvBins, cfg_Pair_MinvMin, cfg_Pair_MinvMax};
const AxisSpec PtAxis = {200, 0, 20.0};
const AxisSpec MultAxis = {100, 0, 100};
const AxisSpec dRAxis = {100, 0, 100};
const AxisSpec pidAxis = {100, -5, 5};
const AxisSpec axisDCAz{binsDCAz, "DCA_{z}"};
const AxisSpec axisDCAxy{binsDCAxy, "DCA_{XY}"};

// Event QA
if (cfg_Event_CutQA) {
histos.add("hPosZ_BC", "PosZ_BC", kTH1F, {{100, 0.0, 15.0}});
histos.add("hcentFT0C_BC", "centFT0C_BC", kTH1F, {{100, 0.0, 100.0}});
histos.add("hPosZ_BC", "PosZ_BC", kTH1F, {{240, -12.0, 12.0}});
histos.add("hcentFT0C_BC", "centFT0C_BC", kTH1F, {{110, 0.0, 110.0}});
histos.add("hOccupancy_BC", "Occupancy_BC", kTH1F, {{100, 0.0, 20000}});
//
histos.add("hcentFT0C_AC", "centFT0C_AC", kTH1F, {{100, 0.0, 100.0}});
histos.add("hPosZ_AC", "PosZ_AC", kTH1F, {{100, 0.0, 15.0}});
histos.add("hcentFT0C_AC", "centFT0C_AC", kTH1F, {{110, 0.0, 110.0}});
histos.add("hPosZ_AC", "PosZ_AC", kTH1F, {{240, -12.0, 12.0}});
histos.add("hOccupancy_AC", "Occupancy_AC", kTH1F, {{100, 0.0, 20000}});
}
// Track QA
if (cfg_Track_CutQA) {
histos.add("hDCArToPv_BC", "DCArToPv_BC", kTH1F, {{300, 0.0, 3.0}});
histos.add("hDCAzToPv_BC", "DCAzToPv_BC", kTH1F, {{300, 0.0, 3.0}});
histos.add("hDCArToPv_BC", "DCArToPv_BC", kTH1F, {axisDCAxy});
histos.add("hDCAzToPv_BC", "DCAzToPv_BC", kTH1F, {axisDCAz});
histos.add("hIsPrim_BC", "hIsPrim_BC", kTH1F, {{2, -0.5, 1.5}});
histos.add("hIsGood_BC", "hIsGood_BC", kTH1F, {{2, -0.5, 1.5}});
histos.add("hIsPrimCont_BC", "hIsPrimCont_BC", kTH1F, {{2, -0.5, 1.5}});
Expand All @@ -155,8 +160,8 @@
histos.add("hTPC_nSigma_v_pt_BC", "hTPC_nSigma_v_pt_BC", HistType::kTHnSparseD, {pidAxis, PtAxis});
histos.add("hTOF_nSigma_v_pt_BC", "hTOF_nSigma_v_pt_BC", HistType::kTHnSparseD, {pidAxis, PtAxis});
//
histos.add("hDCArToPv_AC", "DCArToPv_AC", kTH1F, {{300, 0.0, 3.0}});
histos.add("hDCAzToPv_AC", "DCAzToPv_AC", kTH1F, {{300, 0.0, 3.0}});
histos.add("hDCArToPv_AC", "DCArToPv_AC", kTH1F, {axisDCAxy});
histos.add("hDCAzToPv_AC", "DCAzToPv_AC", kTH1F, {axisDCAz});
histos.add("hIsPrim_AC", "hIsPrim_AC", kTH1F, {{2, -0.5, 1.5}});
histos.add("hIsGood_AC", "hIsGood_AC", kTH1F, {{2, -0.5, 1.5}});
histos.add("hIsPrimCont_AC", "hIsPrimCont_AC", kTH1F, {{2, -0.5, 1.5}});
Expand Down Expand Up @@ -438,9 +443,9 @@
continue;
auto part1 = track1.mcParticle();
auto part2 = track2.mcParticle();
if (std::fabs(part1.pdgCode()) != 321)

Check failure on line 446 in PWGLF/Tasks/Resonances/phiOO.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.
continue; // Not Kaon
if (std::fabs(part2.pdgCode()) != 321)

Check failure on line 448 in PWGLF/Tasks/Resonances/phiOO.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.
continue; // Not Kaon

if (!part1.has_mothers())
Expand All @@ -462,9 +467,9 @@
mothers2PDG.push_back(part2_mom.pdgCode());
}

if (mothers1PDG[0] != 333)

Check failure on line 470 in PWGLF/Tasks/Resonances/phiOO.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.
continue; // mother not phi
if (mothers2PDG[0] != 333)

Check failure on line 472 in PWGLF/Tasks/Resonances/phiOO.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.
continue; // mother not phi

if (mothers1[0] != mothers2[0])
Expand All @@ -478,7 +483,7 @@
template <typename TracksType>
std::pair<double, double> minvReconstruction(const TracksType& trk1, const TracksType& trk2, const bool QA)
{
TLorentzVector lDecayDaughter1, lDecayDaughter2, lResonance;

Check failure on line 486 in PWGLF/Tasks/Resonances/phiOO.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.
//====================================================

if (!trackSelection(trk1, QA) || !trackSelection(trk2, false))
Expand Down Expand Up @@ -613,7 +618,7 @@
}
}

if (fabs(collision.posZ()) > cfg_Event_VtxCut)

Check failure on line 621 in PWGLF/Tasks/Resonances/phiOO.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

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

if (recocolls.size() <= 0) { // not reconstructed
Expand All @@ -632,7 +637,7 @@
}

for (auto& particle : particles) {
if (particle.pdgCode() != 333)

Check failure on line 640 in PWGLF/Tasks/Resonances/phiOO.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.
continue;
if (std::fabs(particle.eta()) > cfg_Track_MaxEta)
continue;
Expand All @@ -640,7 +645,7 @@
if (cfg_Force_BR) {
bool baddecay = false;
for (auto& phidaughter : particle.daughters_as<aod::McParticles>()) {
if (std::fabs(phidaughter.pdgCode()) != 321) {

Check failure on line 648 in PWGLF/Tasks/Resonances/phiOO.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.
baddecay = true;
break;
}
Expand Down
Loading