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
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
/// Particle part
ConfigurableAxis confTempFitVarBins{"confTempFitVarBins", {300, -0.15, 0.15}, "binning of the TempFitVar in the pT vs. TempFitVar plot"};
ConfigurableAxis confTempFitVarpTBins{"confTempFitVarpTBins", {20, 0.5, 4.05}, "pT binning of the pT vs. TempFitVar plot"};
ConfigurableAxis confTOFnSigmaBins{"confTOFnSigmaBins", {200, -4.975, 5.025}, "Binning of the TOF Nsigma vs. pT vs. centrality plot"};

/// Correlation part
ConfigurableAxis confMultBins{"confMultBins", {VARIABLE_WIDTH, 0.0f, 4.0f, 8.0f, 12.0f, 16.0f, 20.0f, 24.0f, 28.0f, 32.0f, 36.0f, 40.0f, 44.0f, 48.0f, 52.0f, 56.0f, 60.0f, 64.0f, 68.0f, 72.0f, 76.0f, 80.0f, 84.0f, 88.0f, 92.0f, 96.0f, 100.0f, 200.0f, 99999.f}, "Mixing bins - multiplicity or centrality"}; // \todo to be obtained from the hash task
Expand Down Expand Up @@ -356,6 +357,27 @@
return false;
}

template <typename PartType>
float whichTOFNSigma(int PDGcode, PartType part)
{
switch (PDGcode) {
case 2212: // Proton+
case -2212: // Proton-
return trackCuts.getNsigmaTOF(part, o2::track::PID::Proton);
case 211: // Pion+
case -211: // Pion-
case 111: // Pion 0
return trackCuts.getNsigmaTOF(part, o2::track::PID::Pion);
case 321: // Kaon+
case -321: // Kaon-
case 130: // Kaon 0 LONG
case 310: // Kaon 0 SHORT
return trackCuts.getNsigmaTOF(part, o2::track::PID::Kaon);
Comment on lines +363 to +375

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you using magic numbers instead of named constants?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am correcting it now. The linter did not point out the issues in those changes.

default:
return 0;
}
}

void init(InitContext&)
{
colBinning = ColumnBinningPolicy<aod::collision::PosZ, aod::femtouniversecollision::MultV0M>{{confVtxBins, confMultBins}, true};
Expand All @@ -365,6 +387,8 @@
trackHistoPartOne.init(&qaRegistry, confTempFitVarpTBins, confTempFitVarBins, twotracksconfigs.confIsMC, trackonefilter.confPDGCodePartOne, true);

trackHistoPartTwo.init(&qaRegistry, confTempFitVarpTBins, confTempFitVarBins, twotracksconfigs.confIsMC, tracktwofilter.confPDGCodePartTwo, true);
qaRegistry.add("Tracks_one/nSigmaTOF", "; #it{p} (GeV/#it{c}); n#sigma_{TOF}; Centrality", kTH3F, {confTempFitVarpTBins, confTOFnSigmaBins, confMultBins});
qaRegistry.add("Tracks_two/nSigmaTOF", "; #it{p} (GeV/#it{c}); n#sigma_{TOF}; Centrality", kTH3F, {confTempFitVarpTBins, confTOFnSigmaBins, confMultBins});

if (confFillDebug) {
sphericityRegistry.add("sphericity", ";Sphericity;Entries", kTH1F, {{150, 0.0, 3, "Sphericity"}});
Expand Down Expand Up @@ -481,6 +505,7 @@
continue;
}
trackHistoPartOne.fillQA<isMC, true>(part);
qaRegistry.fill(HIST("Tracks_one/nSigmaTOF"), part.pt(), whichTOFNSigma(trackonefilter.confPDGCodePartOne, part), multCol);
}
}

Expand All @@ -490,6 +515,7 @@
continue;
}
trackHistoPartTwo.fillQA<isMC, true>(part);
qaRegistry.fill(HIST("Tracks_two/nSigmaTOF"), part.pt(), whichTOFNSigma(tracktwofilter.confPDGCodePartTwo, part), multCol);
}
}

Expand Down Expand Up @@ -524,7 +550,7 @@
randgen = new TRandom2(0);
rand = randgen->Rndm();

if (rand > 0.5) {

Check failure on line 553 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.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.
part1 = p2;
part2 = p1;
}
Expand Down Expand Up @@ -563,7 +589,7 @@
randgen = new TRandom2(0);
rand = randgen->Rndm();

if (rand > 0.5) {

Check failure on line 592 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.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.
part1 = p2;
part2 = p1;
}
Expand Down Expand Up @@ -716,7 +742,7 @@
randgen = new TRandom2(0);
rand = randgen->Rndm();

if (rand > 0.5) {

Check failure on line 745 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.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.
part1 = p2;
part2 = p1;
}
Expand Down Expand Up @@ -891,7 +917,7 @@
randgen = new TRandom2(0);
rand = randgen->Rndm();

if (rand > 0.5) {

Check failure on line 920 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.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.
part1 = p2;
part2 = p1;
}
Expand Down
Loading