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
3 changes: 1 addition & 2 deletions PWGHF/HFC/Tasks/taskCharmHadronsFemtoDream.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2022 CERN and copyright holders of ALICE O2.

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

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -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,14 +66,14 @@
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"};
ConfigurableAxis binNSigmaTOF{"binNSigmaTOF", {3000, -15, 15}, "Binning of the Nsigma TOF plot"};
ConfigurableAxis binNSigmaTPCTOF{"binNSigmaTPCTOF", {3000, -15, 15}, "Binning of the Nsigma TPC+TOF plot"};
ConfigurableAxis binTPCClusters{"binTPCClusters", {163, -0.5, 162.5}, "Binning of TPC found clusters plot"};
Configurable<int> ConfTempFitVarMomentum{"ConfTempFitVarMomentum", 0, "Momentum used for binning: 0 -> pt; 1 -> preco; 2 -> ptpc"};

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

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.

/// Particle 2 (Charm Hadrons)
Configurable<float> charmHadBkgBDTmax{"charmHadBkgBDTmax", 1., "Maximum background bdt score for Charm Hadron (particle 2)"};
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 @@ -251,8 +251,7 @@
p1.tpcNClsFindable(),
p1.tpcNClsCrossedRows(),
p1.tpcNSigmaPr(),
p1.tofNSigmaPr()
);
p1.tofNSigmaPr());
}

/// This function processes the same event and takes care of all the histogramming
Expand Down Expand Up @@ -280,7 +279,7 @@

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

Check failure on line 282 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 @@ -374,7 +373,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 376 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 @@ -386,7 +385,7 @@
}

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

Check failure on line 388 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
Loading