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
1 change: 0 additions & 1 deletion PWGHF/HFC/TableProducer/femtoDreamProducer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
/// \author Ravindra Singh, GSI, ravindra.singh@cern.ch
/// \author Biao Zhang, Heidelberg University, biao.zhang@cern.ch


#include <string>
#include <vector>
#include "CCDB/BasicCCDBManager.h"
Expand Down Expand Up @@ -298,7 +297,7 @@
// particle is from a decay -> getProcess() == 4
// particle is generated during transport -> getGenStatusCode() == -1
// list of mothers is not empty
} else if (particleMc.getProcess() == 4 && particleMc.getGenStatusCode() == -1 && !motherparticlesMc.empty()) {

Check failure on line 300 in PWGHF/HFC/TableProducer/femtoDreamProducer.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.
// get direct mother
auto motherparticleMc = motherparticlesMc.front();
pdgCodeMother = motherparticleMc.pdgCode();
Expand All @@ -306,7 +305,7 @@
// check if particle is material
// particle is from inelastic hadronic interaction -> getProcess() == 23
// particle is generated during transport -> getGenStatusCode() == -1
} else if (particleMc.getProcess() == 23 && particleMc.getGenStatusCode() == -1) {

Check failure on line 308 in PWGHF/HFC/TableProducer/femtoDreamProducer.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.
particleOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kMaterial;
// cross check to see if we missed a case
} else {
Expand Down
18 changes: 8 additions & 10 deletions PWGHF/HFC/Tasks/taskCharmHadronsFemtoDream.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/// \file taskCharmHadronsFemtoDream.cxx.cxx
/// \brief Tasks that reads the track tables used for the pairing and builds pairs of two tracks
/// \author Ravindra SIngh, GSI, ravindra.singh@cern.ch
/// \author Biao Zhang, Heidelberg University, biao.zhang@cern.ch

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

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.

#include <vector>
#include <string>
Expand Down Expand Up @@ -66,7 +66,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 69 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 @@ -178,15 +178,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 181 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 185 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 189 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 @@ -268,7 +268,7 @@

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

Check failure on line 271 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 @@ -332,13 +332,12 @@
processType,
charmHadMc,
originType);
fillFemtoResultTrkInfo(
fillFemtoResultTrkInfo(
p1.tpcNClsFound(),
p1.tpcNClsFindable(),
p1.tpcNClsCrossedRows(),
p1.tpcNSigmaPr(),
p1.tofNSigmaPr()
);
p1.tofNSigmaPr());

sameEventCont.setPair<isMc, true>(p1, p2, col.multNtr(), col.multV0M(), use4D, extendedPlots, smearingByOrigin);
}
Expand Down Expand Up @@ -368,7 +367,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 370 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 @@ -380,7 +379,7 @@
}

float chargeTrack = 0.;
if ((p1.cut() & 2) == 2) {

Check failure on line 382 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 @@ -435,13 +434,12 @@
processType,
charmHadMc,
originType);
fillFemtoResultTrkInfo(
p1.tpcNClsFound(),
p1.tpcNClsFindable(),
p1.tpcNClsCrossedRows(),
p1.tpcNSigmaPr(),
p1.tofNSigmaPr()
);
fillFemtoResultTrkInfo(
p1.tpcNClsFound(),
p1.tpcNClsFindable(),
p1.tpcNClsCrossedRows(),
p1.tpcNSigmaPr(),
p1.tofNSigmaPr());

// if constexpr (!isMc) mixedEventCont.setPair<isMc, true>(p1, p2, collision1.multNtr(), collision1.multV0M(), use4D, extendedPlots, smearingByOrigin);
mixedEventCont.setPair<isMc, true>(p1, p2, collision1.multNtr(), collision1.multV0M(), use4D, extendedPlots, smearingByOrigin);
Expand Down
Loading