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
4 changes: 2 additions & 2 deletions PWGHF/HFC/TableProducer/femtoDreamProducerDplus.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ struct HfFemtoDreamProducerDplus {

using GeneratedMc = soa::Filtered<soa::Join<aod::McParticles, aod::HfCand3ProngMcGen>>;

Filter filterSelectCandidateDplus = (aod::hf_sel_candidate_dplus::isSelDplusToPiKPi >= selectionFlagDplus || aod::hf_sel_candidate_dplus::isSelDplusToPiKPi >= selectionFlagDplus);
Filter filterSelectCandidateDplus = (aod::hf_sel_candidate_dplus::isSelDplusToPiKPi >= selectionFlagDplus || aod::hf_sel_candidate_dplus::isSelDplusToPiKPi >= selectionFlagDplus);

HistogramRegistry qaRegistry{"QAHistos", {}, OutputObjHandlingPolicy::AnalysisObject};
HistogramRegistry trackRegistry{"Tracks", {}, OutputObjHandlingPolicy::AnalysisObject};
Expand Down Expand Up @@ -560,7 +560,7 @@ struct HfFemtoDreamProducerDplus {
// Filling particle properties
rowCandCharmHadGen.reserve(particles.size());
for (const auto& particle : particles) {
if (std::abs(particle.flagMcMatchGen()) == hf_decay::hf_cand_3prong::DecayChannelMain:: DplusToPiKPi) {
if (std::abs(particle.flagMcMatchGen()) == hf_decay::hf_cand_3prong::DecayChannelMain::DplusToPiKPi) {
rowCandCharmHadGen(
particle.mcCollisionId(),
particle.flagMcMatchGen(),
Expand Down
11 changes: 6 additions & 5 deletions PWGHF/HFC/Tasks/taskCharmHadronsFemtoDream.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
ConfigurableAxis binMulPercentile{"binMulPercentile", {10, 0.0f, 100.0f}, "multiplicity percentile Binning"};
ConfigurableAxis binpTTrack{"binpTTrack", {50, 0.5, 10.05}, "pT binning of the pT vs. TempFitVar plot (Track)"};
ConfigurableAxis binEta{"binEta", {{200, -1.5, 1.5}}, "eta binning"};
ConfigurableAxis binPhi{"binPhi", {{200, 0, TMath::TwoPi()}}, "phi binning"};

Check failure on line 75 in PWGHF/HFC/Tasks/taskCharmHadronsFemtoDream.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
ConfigurableAxis binkT{"binkT", {150, 0., 9.}, "binning kT"};
ConfigurableAxis binkstar{"binkstar", {1500, 0., 6.}, "binning kstar"};
ConfigurableAxis binNSigmaTPC{"binNSigmaTPC", {1600, -8, 8}, "Binning of Nsigma TPC plot"};
Expand Down Expand Up @@ -184,15 +184,15 @@
HistogramRegistry registryCharmHadronQa{"registryCharmHadronQa"};
/// Partition for particle 1

Partition<FilteredFDParticles> partitionTrk1 = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && (ncheckbit(aod::femtodreamparticle::cut, cutBitTrack1)) && ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= pidThresTrack1, ncheckbit(aod::femtodreamparticle::pidcut, tpcBitTrack1), ncheckbit(aod::femtodreamparticle::pidcut, tpcTofBitTrack1));

Check failure on line 187 in PWGHF/HFC/Tasks/taskCharmHadronsFemtoDream.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.

Partition<FilteredFDMcParts> partitionMcTrk1 = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) &&
(ncheckbit(aod::femtodreamparticle::cut, cutBitTrack1)) &&
ifnode(aod::femtodreamparticle::pt * (nexp(aod::femtodreamparticle::eta) + nexp(-1.f * aod::femtodreamparticle::eta)) / 2.f <= pidThresTrack1, ncheckbit(aod::femtodreamparticle::pidcut, tpcBitTrack1), ncheckbit(aod::femtodreamparticle::pidcut, tpcTofBitTrack1));

Check failure on line 191 in PWGHF/HFC/Tasks/taskCharmHadronsFemtoDream.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.

/// Partition for particle 2
Partition<FilteredCharmCands> partitionCharmHadron = aod::fdhf::bdtBkg < charmHadBkgBDTmax && aod::fdhf::bdtFD < charmHadFdBDTmax && aod::fdhf::bdtFD > charmHadFdBDTmin&& aod::fdhf::bdtPrompt<charmHadPromptBDTmax && aod::fdhf::bdtPrompt> charmHadPromptBDTmin;
Partition<FilteredCharmMcCands> partitionMcCharmHadron = aod::fdhf::originMcRec == 1 || aod::fdhf::originMcRec == 2;

Check failure on line 195 in PWGHF/HFC/Tasks/taskCharmHadronsFemtoDream.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.

float massOne = o2::analysis::femtoDream::getMass(pdgCodeTrack1);
float massTwo = o2::analysis::femtoDream::getMass(charmHadPDGCode);
Expand Down Expand Up @@ -249,13 +249,14 @@
registryMixQa.fill(HIST("MixingQA/hSECollisionBins"), colBinningMult.getBin({col.posZ(), col.multNtr()}));
registryMixQa.fill(HIST("MixingQA/hSECollisionPool"), col.posZ(), col.multNtr());
}

/// Compute the charm hadron candidates mass with the daughter masses
/// assumes the candidate is either a D+ or Λc+
template<typename Candidate>
float getCharmHadronMass(const Candidate& cand) {
/// assumes the candidate is either a D+ or Λc+
template <typename Candidate>
float getCharmHadronMass(const Candidate& cand)
{
float invMass = 0.0f;
if (charmHadPDGCode == 4122) {

Check failure on line 259 in PWGHF/HFC/Tasks/taskCharmHadronsFemtoDream.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 259 in PWGHF/HFC/Tasks/taskCharmHadronsFemtoDream.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.
if (cand.candidateSelFlag() == 1) {
invMass = cand.m(std::array{o2::constants::physics::MassProton, o2::constants::physics::MassKPlus, o2::constants::physics::MassPiPlus});
return invMass;
Expand All @@ -265,7 +266,7 @@
}
}
// D+ → π K π (PDG: 411)
if (charmHadPDGCode == 411) {

Check failure on line 269 in PWGHF/HFC/Tasks/taskCharmHadronsFemtoDream.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 269 in PWGHF/HFC/Tasks/taskCharmHadronsFemtoDream.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.
invMass = cand.m(std::array{o2::constants::physics::MassPiPlus, o2::constants::physics::MassKPlus, o2::constants::physics::MassPiPlus});
return invMass;
}
Expand Down Expand Up @@ -296,7 +297,7 @@

// proton track charge
float chargeTrack = 0.;
if ((p1.cut() & 2) == 2) {

Check failure on line 300 in PWGHF/HFC/Tasks/taskCharmHadronsFemtoDream.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.
chargeTrack = PositiveCharge;
} else {
chargeTrack = NegativeCharge;
Expand Down Expand Up @@ -385,7 +386,7 @@

auto sliceTrk1 = part1->sliceByCached(aod::femtodreamparticle::fdCollisionId, collision1.globalIndex(), cache);
auto sliceCharmHad = part2->sliceByCached(aod::femtodreamparticle::fdCollisionId, collision2.globalIndex(), cache);
for (auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(sliceTrk1, sliceCharmHad))) {

Check failure on line 389 in PWGHF/HFC/Tasks/taskCharmHadronsFemtoDream.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.

if (useCPR.value) {
if (pairCloseRejectionME.isClosePair(p1, p2, parts, collision1.magField())) {
Expand All @@ -400,7 +401,7 @@
if (kstar > highkstarCut) {
continue;
}

float invMass = getCharmHadronMass(p2);

if (invMass < charmHadMinInvMass || invMass > charmHadMaxInvMass) {
Expand Down
Loading